/* People to People — дизайн-система «спокойный космос».
   Темы переключаются атрибутом data-theme на <html> (выбор внизу бокового меню, хранится в браузере):
   nebula «Туманность», orbit «Орбита», aurora «Аврора», sunrise «Рассвет», mars «Марс».
   Боковое меню во всех темах тёмное, в стиле сайта abvdevelop.com. */

/* ---- Светлый набор ---- */
:root, [data-theme="nebula"], [data-theme="sunrise"] {
  --amber: #FFD28A; --rose: #FF8FB3; --on-grad: #070B1A;
  --grad: linear-gradient(100deg, var(--c1), var(--c2));
  --bg-glow: radial-gradient(900px 500px at 85% -10%, rgba(var(--c2-rgb),.16), transparent 60%), radial-gradient(700px 420px at 30% 110%, rgba(var(--c1-rgb),.14), transparent 60%);
  --surface: rgba(255,255,255,.88); --surface-solid: #FFFFFF;
  --soft: #F3F5FA; --hover: #F6F8FD;
  --ink: #141A2E; --ink-2: #2A3150; --muted: #5B6580; --faint: #8A93AB;
  --line: #DDE3EF; --line-2: #EEF1F7;
  --good: #13784A;  --good-soft: #E3F6EC;
  --warn: #A15C07;  --warn-soft: #FFF1DE;
  --bad: #B4400B;   --bad-soft: #FDECE6;
  --violet-ink: #4B3FD1; --violet-soft: #ECEBFF;
  --primary-fg: #F4F7FF;
  --shadow: 0 1px 2px rgba(20,26,46,.05);
  --shadow-lg: 0 18px 40px -24px rgba(20,26,46,.35);
  --bar-base: linear-gradient(180deg, rgba(var(--c1-rgb),.75), var(--c1));
  --bar-extra: linear-gradient(180deg, rgba(var(--c2-rgb),.75), var(--c2));
  --track: #E6EAF3;
  --hero-fg: #F4F7FF; --hero-muted: #98A4B8;
  --off-day: repeating-linear-gradient(135deg, #F3F5FA 0 4px, #ECEFF6 4px 8px);
  --r: 16px; --r-sm: 11px;
  color-scheme: light;
}

/* ---- Тёмный набор ---- */
[data-theme="orbit"], [data-theme="aurora"], [data-theme="mars"] {
  --amber: #FFD28A; --rose: #FF8FB3; --on-grad: #070B1A;
  --grad: linear-gradient(100deg, var(--c1), var(--c2));
  --bg-glow: radial-gradient(1px 1px at 8% 12%, rgba(255,255,255,.5), transparent 60%), radial-gradient(1px 1px at 34% 6%, rgba(255,255,255,.35), transparent 60%), radial-gradient(1.5px 1.5px at 62% 18%, rgba(var(--c2-rgb),.7), transparent 60%), radial-gradient(1px 1px at 88% 9%, rgba(255,255,255,.45), transparent 60%), radial-gradient(1px 1px at 76% 44%, rgba(var(--c1-rgb),.5), transparent 60%), radial-gradient(1px 1px at 52% 88%, rgba(255,255,255,.3), transparent 60%), radial-gradient(900px 520px at 92% -8%, rgba(var(--c2-rgb),.16), transparent 62%), radial-gradient(800px 480px at 30% 112%, rgba(var(--c1-rgb),.10), transparent 62%);
  --surface: rgba(13,19,36,.80); --surface-solid: #0D1324;
  --soft: rgba(255,255,255,.04); --hover: rgba(var(--c1-rgb),.06);
  --ink: #F4F7FF; --ink-2: #E3E9F3; --muted: #98A4B8; --faint: #7E8AA3;
  --line: rgba(213,230,255,.12); --line-2: rgba(213,230,255,.07);
  --accent-soft: rgba(var(--c1-rgb),.12);
  --good: #8EF0C4;  --good-soft: rgba(110,231,183,.12);
  --warn: #FFD28A;  --warn-soft: rgba(255,210,138,.14);
  --bad: #FF9A8A;   --bad-soft: rgba(255,120,100,.14);
  --violet-ink: #C9C0FF; --violet-soft: rgba(169,155,255,.16);
  --primary-bg: #F4F7FF; --primary-fg: #070B1A; --primary-hover: #DCE6FA;
  --shadow: none;
  --shadow-lg: 0 30px 60px -40px rgba(var(--c1-rgb),.25);
  --bar-base: linear-gradient(180deg, rgba(var(--c1-rgb),.9), rgba(var(--c1-rgb),.45));
  --bar-extra: linear-gradient(180deg, rgba(var(--c2-rgb),.85), var(--c2));
  --track: rgba(213,230,255,.10);
  --hero-bg: transparent; --hero-fg: #F4F7FF; --hero-muted: #98A4B8;
  --off-day: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 4px, rgba(255,255,255,.05) 4px 8px);
  --r: 16px; --r-sm: 11px;
  color-scheme: dark;
}

/* ---- Сами темы: акценты и фон ---- */
:root:not([data-theme]), [data-theme="nebula"] {   /* Туманность: голубой и фиолетовый, светлая работа */
  --c1: #7CC8FF; --c1-rgb: 124,200,255; --c1-light: #D7F0FF;
  --c2: #A99BFF; --c2-rgb: 169,155,255;
  --space: #070B1A; --space-2: #0B1022;
  --bg: #EEF1F8; --accent: #3B5BDB; --accent-ink: #2B44B0; --accent-soft: #E8EDFF;
  --primary-bg: #0B1022; --primary-hover: #1A2140; --hero-bg: #0B1022;
}
[data-theme="sunrise"] {         /* Рассвет: тёплый янтарь и роза, светлая работа */
  --c1: #FFB86B; --c1-rgb: 255,184,107; --c1-light: #FFE8CC;
  --c2: #FF8FB3; --c2-rgb: 255,143,179;
  --space: #1A0E1C; --space-2: #241326;
  --bg: #F7F1EC; --accent: #B4461F; --accent-ink: #8E3416; --accent-soft: #FDE9DC;
  --soft: #F8F2EE; --hover: #FBF6F2; --line: #EADFD8; --line-2: #F3ECE7; --track: #EFE5DE;
  --primary-bg: #241326; --primary-hover: #3A2140; --hero-bg: #241326;
  --off-day: repeating-linear-gradient(135deg, #F8F2EE 0 4px, #F1E9E3 4px 8px);
}
[data-theme="orbit"] {           /* Орбита: всё тёмное, как сайт */
  --c1: #7CC8FF; --c1-rgb: 124,200,255; --c1-light: #D7F0FF;
  --c2: #A99BFF; --c2-rgb: 169,155,255;
  --space: #070B1A; --space-2: #0B1022;
  --bg: #060A18; --accent: #9FD6FF; --accent-ink: #CBE9FF;
}
[data-theme="aurora"] {          /* Аврора: бирюза и индиго, северное сияние */
  --c1: #5EEAD4; --c1-rgb: 94,234,212; --c1-light: #CCFBF1;
  --c2: #818CF8; --c2-rgb: 129,140,248;
  --space: #03111A; --space-2: #061A24;
  --bg: #04121A; --accent: #7EE7D6; --accent-ink: #B8F5EB;
  --surface: rgba(8,28,38,.80); --surface-solid: #0A1E29;
}
[data-theme="mars"] {            /* Марс: тёмная тема с тёплым оранжевым */
  --c1: #FF9F6B; --c1-rgb: 255,159,107; --c1-light: #FFE0CC;
  --c2: #FFD28A; --c2-rgb: 255,210,138;
  --space: #140A08; --space-2: #1C0F0B;
  --bg: #120907; --accent: #FFB48A; --accent-ink: #FFD6BD;
  --surface: rgba(32,18,14,.82); --surface-solid: #20120E;
  --line: rgba(255,226,210,.12); --line-2: rgba(255,226,210,.07);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--bg-glow), var(--bg); background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
h1 { font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
h3 { font-size: 13px; font-weight: 700; margin: 0; }
.mono, .eyebrow, th { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Каркас ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 20px;
  color: #C5CEDD; background-color: var(--space);
  background-image: radial-gradient(1px 1px at 24px 40px, rgba(255,255,255,.75), transparent 60%), radial-gradient(1px 1px at 140px 120px, rgba(255,255,255,.5), transparent 60%), radial-gradient(1.5px 1.5px at 200px 300px, rgba(var(--c2-rgb),.8), transparent 60%), radial-gradient(1px 1px at 60px 520px, rgba(255,255,255,.55), transparent 60%), radial-gradient(1px 1px at 180px 700px, rgba(var(--c1-rgb),.7), transparent 60%), radial-gradient(260px 220px at 20% 8%, rgba(var(--c1-rgb),.16), transparent 70%), radial-gradient(300px 260px at 90% 75%, rgba(var(--c2-rgb),.18), transparent 70%);
  border-right: 1px solid rgba(213,230,255,.06);
}
.logo { display: flex; align-items: center; gap: 12px; padding: 2px 6px; color: #F4F7FF; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.logo:hover { color: #fff; }
.logo small { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em; color: #7E8AA3; font-weight: 400; }
.logo-mark { position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, var(--c1-light), var(--c1) 45%, var(--c2) 100%); box-shadow: 0 0 18px rgba(var(--c1-rgb),.45); }
.logo-mark::after { content: ""; position: absolute; left: -6px; right: -6px; top: 14px; height: 6px; border: 1.5px solid rgba(255,210,138,.85); border-radius: 50%; transform: rotate(-18deg); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #C5CEDD; font-weight: 500; }
.nav a svg { color: #7E8AA3; }
.nav a:hover { background: rgba(255,255,255,.05); color: #F4F7FF; }
.nav a.on { background: rgba(var(--c1-rgb),.12); color: #F4F7FF; font-weight: 700; }
.nav a.on svg { color: var(--c1); filter: drop-shadow(0 0 6px rgba(var(--c1-rgb),.7)); }
.side-today { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(213,230,255,.08); font-size: 13px; color: #E3E9F3; }
.side-today .eyebrow { color: #7E8AA3; font-size: 10px; display: block; margin-bottom: 4px; }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.side-user .who { flex: 1; min-width: 0; font-size: 13px; color: #E3E9F3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.side-user .avatar { background: #1A2340 !important; color: var(--c2) !important; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: #7E8AA3; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255,255,255,.06); color: #F4F7FF; }
.theme-switch { display: flex; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(213,230,255,.08); }
.theme-switch button { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: transform .12s; }
.theme-switch button:hover { transform: scale(1.12); }
.theme-switch button.on { box-shadow: 0 0 0 2px var(--space), 0 0 0 4px #F4F7FF; }
.theme-switch-label { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em; color: #7E8AA3; padding: 0 6px; }

.main { min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 34px 44px 64px; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .eyebrow { display: block; margin-bottom: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-solid); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow);
  transition: background .12s, border-color .12s, transform .12s;
}
.btn:hover { border-color: var(--faint); color: var(--ink); }
.btn.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.accent { background: var(--grad); border: 0; color: var(--on-grad); font-weight: 700; box-shadow: 0 6px 22px -8px rgba(var(--c1-rgb),.7); }
.btn.accent:hover { color: var(--on-grad); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn svg.i { width: 16px; height: 16px; }

/* ---------- Поверхности ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
a.stat-card:hover { border-color: var(--faint); color: var(--ink); }
.stat-card .lbl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card .lbl i { width: 8px; height: 8px; border-radius: 50%; }
.stat-card b { display: block; margin-top: 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .1em;
  padding: 14px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr:hover td { background: var(--hover); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.n { font-family: "IBM Plex Mono", monospace; font-size: 13.5px; }
tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--soft); }
.card table th { padding-left: 0; }
.card table td { padding-left: 0; }
.card table td:last-child, .card table th:last-child { padding-right: 0; }
.mini-bar { margin: 6px 0 0 auto; width: 92px; height: 4px; border-radius: 99px; background: var(--track); overflow: hidden; }
.mini-bar i { display: block; height: 4px; border-radius: 99px; background: var(--grad); }

/* ---------- Люди ---------- */
.person { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.person:hover { color: var(--ink); }
.person .nm { font-weight: 700; }
.person .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
[data-theme="orbit"] .avatar:not(.xl) { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); filter: saturate(1.1) brightness(.92); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; font-weight: 800; color: #0B1022 !important; background: radial-gradient(circle at 35% 30%, var(--c1-light), var(--c1) 55%, var(--c2)) !important; box-shadow: 0 0 0 6px rgba(var(--c1-rgb),.12), 0 0 30px rgba(var(--c1-rgb),.35); }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
[data-theme="orbit"] .pill::before { box-shadow: 0 0 8px currentColor; }
.pill.plain::before { display: none; }
.pill.active, .pill.confirmed { background: var(--good-soft); color: var(--good); }
.pill.onboarding { background: var(--violet-soft); color: var(--violet-ink); }
.pill.leave, .pill.planned { background: var(--warn-soft); color: var(--warn); }
.pill.left, .pill.cancelled { background: var(--soft); color: var(--faint); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: 0; flex: none; }
.neg { color: var(--bad); }
.pos { color: var(--good); }

/* ---------- Фильтры ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select, .select {
  height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid);
  font: inherit; color: var(--ink); box-shadow: var(--shadow);
}
.toolbar select, .select { padding-right: 34px; appearance: none; cursor: pointer;
  background: var(--surface-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238A93AB' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search svg { position: absolute; left: 13px; top: 12px; color: var(--faint); width: 17px; height: 17px; }
.search input { width: 100%; padding-left: 38px; }
input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---------- Формы ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; }
.field label.l { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input:not([type=checkbox]):not([type=color]), .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; background: var(--surface-solid); color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; padding: 11px 13px; resize: vertical; }
.field select { appearance: none; padding-right: 32px;
  background: var(--surface-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238A93AB' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--c1); box-shadow: 0 0 0 3px rgba(var(--c1-rgb),.25); }
.field input[type=color] { width: 54px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-solid); cursor: pointer; }
.field.check label { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; padding-top: 28px; }
.field.check.flat label { padding-top: 0; }
.field input[type=checkbox] { width: 17px; height: 17px; accent-color: #6E7CF0; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 12px; color: var(--bad); margin-top: 5px; }
.field.wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.form-section h2 { margin-bottom: 16px; }

details.adder { border: 1px dashed var(--line); border-radius: var(--r); background: var(--soft); }
details.adder > summary { list-style: none; cursor: pointer; padding: 13px 18px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 8px; }
details.adder > summary::-webkit-details-marker { display: none; }
details.adder > summary:hover { color: var(--accent-ink); }
details.adder[open] { border-style: solid; background: var(--surface); }
details.adder[open] > summary { border-bottom: 1px solid var(--line-2); }
details.adder > .in { padding: 18px; }

/* ---------- Сообщения ---------- */
.toasts { display: grid; gap: 8px; margin-bottom: 20px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toast.success { background: var(--good-soft); color: var(--good); }
.toast.warning { background: var(--warn-soft); color: var(--warn); }
.toast.error { background: var(--bad-soft); color: var(--bad); }

/* ---------- Карточка человека ---------- */
.hero {
  display: flex; gap: 22px; align-items: center; margin-bottom: 22px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 22px; color: var(--hero-fg); background-color: var(--hero-bg);
  background-image: radial-gradient(1px 1px at 60px 30px, rgba(255,255,255,.7), transparent 60%), radial-gradient(1px 1px at 420px 90px, rgba(255,255,255,.5), transparent 60%), radial-gradient(1.5px 1.5px at 700px 40px, rgba(255,210,138,.8), transparent 60%), radial-gradient(1px 1px at 860px 120px, rgba(var(--c1-rgb),.8), transparent 60%), radial-gradient(420px 220px at 85% 0%, rgba(var(--c2-rgb),.35), transparent 70%), radial-gradient(380px 200px at 10% 120%, rgba(var(--c1-rgb),.25), transparent 70%);
  box-shadow: var(--shadow-lg);
}
[data-theme="orbit"] .hero { padding: 6px 0; background-image: none; box-shadow: none; }
.hero .who { flex: 1; min-width: 240px; }
.hero h1 { color: var(--hero-fg); margin: 6px 0 10px; }
.hero .eyebrow { color: var(--hero-muted); }
.hero .btn:not(.accent) { background: rgba(255,255,255,.08); border-color: rgba(213,230,255,.18); color: #F4F7FF; box-shadow: none; }
.hero .btn:not(.accent):hover { background: rgba(255,255,255,.14); }
.hero .pill.active { background: rgba(110,231,183,.14); color: #8EF0C4; }
.hero .pill.onboarding { background: rgba(var(--c2-rgb),.18); color: #C9C0FF; }
.hero .pill.leave { background: rgba(255,210,138,.16); color: #FFD28A; }
.hero .pill.left { background: rgba(255,255,255,.08); color: #98A4B8; }
.hero .pill::before { box-shadow: 0 0 8px currentColor; }

.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; padding: 5px; margin-bottom: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--soft); }
.tabs a.on { background: var(--primary-bg); color: var(--primary-fg); font-weight: 700; }
.tabs .count { font-size: 11px; background: var(--soft); color: var(--muted); border-radius: 99px; padding: 1px 7px; }
.tabs a.on .count { background: rgba(var(--c1-rgb),.25); color: inherit; }

.summary { display: grid; gap: 14px; position: sticky; top: 24px; }
.summary .box { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.summary .box > div { padding: 15px 18px; border-bottom: 1px solid var(--line-2); }
.summary .box > div:last-child { border-bottom: 0; }
.summary .k { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.summary .v { font-weight: 700; }
.ring-card { border-radius: 18px; padding: 18px 20px 20px; text-align: center; background: var(--space-2); color: #F4F7FF; border: 1px solid rgba(213,230,255,.08); }
[data-theme="orbit"] .ring-card { background: var(--surface); border-color: var(--line); }
.ring-card .k { text-align: left; color: #98A4B8; }
.ring-card svg { display: block; margin: 8px auto 0; }
.ring-legend { display: flex; justify-content: center; gap: 14px; margin-top: 8px; font-size: 12px; color: #C5CEDD; flex-wrap: wrap; }
.ring-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ring-legend i { width: 8px; height: 8px; border-radius: 50%; }
.ring-card.neg .big-num { fill: #FF9A8A; }

dl.kv { display: grid; grid-template-columns: 200px 1fr; margin: 0; }
dl.kv dt, dl.kv dd { padding: 11px 0; border-bottom: 1px solid var(--line-2); margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { font-weight: 600; }
dl.kv dt:last-of-type, dl.kv dd:last-of-type { border-bottom: 0; }
dl.kv dd.empty-v { color: var(--faint); font-weight: 400; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { padding: 13px 15px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line-2); }
.kpi b { display: block; font-family: "IBM Plex Mono", monospace; font-size: 19px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.main { background: var(--primary-bg); border-color: var(--primary-bg); }
.kpi.main b { color: var(--primary-fg); }
.kpi.main span { color: var(--primary-fg); opacity: .75; }
.kpi.main.neg { background: var(--bad-soft); border-color: var(--bad-soft); }
.kpi.main.neg b, .kpi.main.neg span { color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; background: var(--surface); }
.chip b { font-family: "IBM Plex Mono", monospace; font-weight: 500; }

.moved { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--warn); margin-top: 3px; }

/* История */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px var(--surface-solid); }
.timeline li.c-plus::after { background: #3FCB8A; box-shadow: 0 0 0 4px var(--surface-solid), 0 0 10px rgba(63,203,138,.6); }
.timeline li.c-tilde::after { background: var(--c1); box-shadow: 0 0 0 4px var(--surface-solid), 0 0 10px rgba(var(--c1-rgb),.7); }
.timeline li.c-minus::after { background: var(--rose); box-shadow: 0 0 0 4px var(--surface-solid), 0 0 10px rgba(255,143,179,.6); }
.timeline .t { font-weight: 700; }
.timeline .meta { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--faint); margin-top: 2px; }
.timeline .chg { font-size: 13px; margin-top: 6px; color: var(--ink-2); }
.timeline .old { color: var(--faint); text-decoration: line-through; }
.timeline .reason { font-size: 13px; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 5px 10px; display: inline-block; margin-top: 7px; }

.note { padding: 14px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line-2); }
.note + .note { margin-top: 10px; }
.note.important { background: var(--warn-soft); border-color: transparent; }
.note .meta { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* Зарплата: «орбита» условий */
.orbit { position: relative; padding-left: 28px; }
.orbit::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--c2), var(--c1) 60%, var(--line)); }
.salary-line { position: relative; display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.salary-line:last-child { border-bottom: 0; }
.salary-line::before { content: ""; position: absolute; left: -27px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 0 4px var(--surface-solid), 0 0 12px rgba(var(--c1-rgb),.8); }
.salary-line:first-child::before { background: var(--c2); box-shadow: 0 0 0 4px var(--surface-solid), 0 0 12px rgba(var(--c2-rgb),.9); }
.salary-line:last-child::before { background: var(--faint); box-shadow: 0 0 0 4px var(--surface-solid); }
.salary-line .when { font-family: "IBM Plex Mono", monospace; color: var(--faint); font-size: 12.5px; padding-top: 4px; }
.salary-line .amt { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.salary-line .ev { font-size: 13px; color: var(--muted); margin-top: 2px; }
.delta { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 7px; margin-left: 10px; vertical-align: 2px; }
.delta.up { background: var(--good-soft); color: var(--good); }
.delta.down { background: var(--bad-soft); color: var(--bad); }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 150px; margin: 14px 0 6px; }
.bars .b { display: flex; flex-direction: column-reverse; height: 100%; border-radius: 8px; overflow: hidden; background: var(--soft); }
.bars .b i { display: block; }
.bars .b i.base { background: var(--bar-base); }
.bars .b i.extra { background: var(--bar-extra); }
.bars-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--faint); text-align: center; }

/* ---------- Календарь ---------- */
.cal-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: auto; background: var(--surface); box-shadow: var(--shadow-lg); }
.cal { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.cal th, .cal td { border: 0; padding: 0; background: transparent; }
.cal thead th { position: sticky; top: 0; background: var(--surface-solid); z-index: 2; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; }
.cal th.d { width: 34px; min-width: 34px; text-align: center; padding: 8px 0 6px; color: var(--faint); font-size: 10.5px; }
.cal th.d b { display: block; font-family: "Manrope", sans-serif; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.cal th.d.off b { color: var(--faint); }
.cal th.d.today b { background: var(--grad); color: var(--on-grad); border-radius: 8px; width: 26px; height: 26px; line-height: 26px; margin: 0 auto; box-shadow: 0 0 12px rgba(var(--c1-rgb),.6); }
.cal td.d { height: 46px; position: relative; border-bottom: 1px solid var(--line-2); }
.cal td.d.off { background: var(--off-day); }
.cal td.d.today { background: rgba(var(--c1-rgb),.08); }
.cal td.name, .cal th.name { position: sticky; left: 0; z-index: 3; background: var(--surface-solid); min-width: 230px; padding: 0 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2); }
.cal thead th.name { z-index: 4; }
.cal td.d > a.add { position: absolute; inset: 0; }
.cal td.d > a.add:hover { background: rgba(var(--c1-rgb),.14); }
.cal .bar { position: absolute; top: 11px; bottom: 11px; left: 0; right: 0; display: block; }
.cal .bar.s { left: 3px; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.cal .bar.e { right: 3px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.cal .bar.planned { opacity: .5; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.4) 0 3px, transparent 3px 6px) !important; }
.cal tfoot td { position: sticky; bottom: 0; background: var(--surface-solid); border-top: 1px solid var(--line); text-align: center; font-family: "IBM Plex Mono", monospace; font-size: 12px; height: 36px; color: var(--muted); }
.cal tfoot td.name { text-align: left; font-family: "Manrope", sans-serif; font-weight: 600; }
.cal tfoot td.hot { color: var(--bad); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--muted); margin-top: 14px; align-items: center; }

/* ---------- Настройки ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.subnav { position: sticky; top: 24px; display: grid; gap: 2px; }
.subnav .nav-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 0 10px; margin: 14px 0 4px; }
.subnav .nav-label:first-child { margin-top: 0; }
.subnav a { padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 600; }
.subnav a:hover { background: var(--soft); color: var(--ink); }
.subnav a.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
tr.inactive td { color: var(--faint); }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--faint); }

/* ---------- Вход ---------- */
.login {
  min-height: 100vh; display: grid; place-items: center; background-color: var(--space);
  background-image: radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.7), transparent 60%), radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,.5), transparent 60%), radial-gradient(1.5px 1.5px at 70% 30%, rgba(var(--c2-rgb),.8), transparent 60%), radial-gradient(1px 1px at 85% 80%, rgba(var(--c1-rgb),.7), transparent 60%), radial-gradient(700px 420px at 80% 10%, rgba(var(--c2-rgb),.25), transparent 65%), radial-gradient(600px 380px at 10% 100%, rgba(var(--c1-rgb),.18), transparent 65%);
}
.login .card { width: 400px; padding: 34px; background: rgba(13,19,36,.82); border: 1px solid rgba(213,230,255,.12); color: #F4F7FF; box-shadow: 0 30px 80px -30px rgba(var(--c1-rgb),.35); }
.login .card .muted { color: #98A4B8; }
.login .field label.l { color: #E3E9F3; }
.login .field input:not([type=checkbox]) { background: rgba(255,255,255,.05); border-color: rgba(213,230,255,.16); color: #F4F7FF; }
.login .btn.primary { background: var(--grad); border: 0; color: var(--on-grad); font-weight: 700; }

@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  .summary { position: static; }
  .settings { grid-template-columns: 1fr; }
  .subnav { position: static; display: flex; flex-wrap: wrap; }
  .subnav .nav-label { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; gap: 10px; }
  .side .nav { flex-direction: row; flex-wrap: wrap; }
  .side .logo small, .side-user .who, .side .quick, .side-today, .theme-switch-label { display: none; }
  .side-foot { margin: 0; }
  .page { padding: 20px 16px 48px; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { border: 0; padding-bottom: 0; }
}

/* =====================================================================
   Бренд и движение — по мотивам abvdevelop.com («ABV // AI»: орбита, ядро, спутники;
   проявление с размытием; «живые» точки). Всё отключается при prefers-reduced-motion.
   ===================================================================== */
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 4px; color: #F4F7FF; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; position: relative; flex: none; display: grid; place-items: center; }
.brand-mark::before, .brand-mark::after, .brand-mark i { content: ""; position: absolute; border-radius: 50%; }
.brand-mark::before { width: 32px; height: 32px; border: 1px solid var(--c1); opacity: .5; animation: p2pOrbitPulse 3s ease-in-out infinite; }
.brand-mark::after { width: 11px; height: 11px; background: radial-gradient(circle at 35% 30%, #fff, var(--c1) 55%, var(--c2)); box-shadow: 0 0 18px var(--c1), 0 0 4px #fff; }
.brand-mark i:nth-child(1) { inset: 0; animation: p2pSpin 9s linear infinite; }
.brand-mark i:nth-child(1)::before { content: ""; position: absolute; top: -1px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 8px var(--c2); }
.brand-mark i:nth-child(2) { inset: 4px; animation: p2pSpin 6s linear infinite reverse; }
.brand-mark i:nth-child(2)::before { content: ""; position: absolute; bottom: 0; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 6px var(--c1); }
.brand-mark i:nth-child(3) { width: 44px; height: 14px; border: 1px solid var(--c1); opacity: .35; transform: rotate(-30deg); }
.brand-text { display: grid; line-height: 1.1; }
.brand-line { display: flex; align-items: baseline; gap: 6px; font-weight: 800; letter-spacing: -.05em; }
.brand-word { font-size: 20px; }
.brand-slash { color: #7E8AA3; font-family: "IBM Plex Mono", monospace; font-weight: 400; letter-spacing: 0; }
.brand-ai { color: var(--c1); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-shadow: 0 0 14px rgba(var(--c1-rgb), .5); }
.brand-text small { margin-top: 3px; font-size: 11.5px; color: #98A4B8; font-weight: 600; letter-spacing: 0; }

/* Живое меню: мерцающие звёзды и медленно дрейфующая туманность */
.side { overflow: hidden; isolation: isolate; }
.side > * { position: relative; z-index: 1; }
.side::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(1px 1px at 30px 160px, #fff, transparent 60%), radial-gradient(1px 1px at 210px 60px, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 120px 420px, rgba(var(--c1-rgb),1), transparent 60%), radial-gradient(1px 1px at 40px 640px, #fff, transparent 60%), radial-gradient(1px 1px at 220px 560px, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 160px 820px, rgba(var(--c2-rgb),1), transparent 60%), radial-gradient(1px 1px at 90px 300px, #fff, transparent 60%);
  animation: p2pTwinkle 5s ease-in-out infinite; }
.side::after { content: ""; position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background: radial-gradient(240px 200px at 30% 30%, rgba(var(--c1-rgb), .14), transparent 70%), radial-gradient(260px 240px at 70% 70%, rgba(var(--c2-rgb), .16), transparent 70%);
  animation: p2pDrift 26s ease-in-out infinite alternate; }
.nav a { position: relative; transition: background .2s ease, color .2s ease; }
.nav a.on { box-shadow: inset 0 0 0 1px rgba(var(--c1-rgb), .18), 0 0 26px -10px rgba(var(--c1-rgb), .7); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--c1); box-shadow: 0 0 10px var(--c1); animation: p2pLivePulse 1.8s ease-in-out infinite; }

/* Проявление страницы: снизу вверх с размытием, лесенкой */
.page > * { animation: p2pReveal .65s cubic-bezier(.2,.75,.15,1) both; }
.page > *:nth-child(2) { animation-delay: .05s; } .page > *:nth-child(3) { animation-delay: .1s; }
.page > *:nth-child(4) { animation-delay: .15s; } .page > *:nth-child(5) { animation-delay: .2s; }
.page > *:nth-child(n+6) { animation-delay: .25s; }
.stats .stat-card { animation: p2pReveal .6s cubic-bezier(.2,.75,.15,1) both; }
.stats .stat-card:nth-child(2) { animation-delay: .06s; } .stats .stat-card:nth-child(3) { animation-delay: .12s; } .stats .stat-card:nth-child(4) { animation-delay: .18s; }
tbody tr { animation: p2pRowIn .45s ease both; }
tbody tr:nth-child(2) { animation-delay: .03s; } tbody tr:nth-child(3) { animation-delay: .06s; } tbody tr:nth-child(4) { animation-delay: .09s; }
tbody tr:nth-child(5) { animation-delay: .12s; } tbody tr:nth-child(6) { animation-delay: .15s; } tbody tr:nth-child(7) { animation-delay: .18s; }
tbody tr:nth-child(n+8) { animation-delay: .21s; }

/* Плашки-показатели: живые точки, подъём и свечение при наведении */
.stat-card { position: relative; overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.stat-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c1-rgb), .14), transparent 70%); pointer-events: none; }
.stat-card:hover { transform: translateY(-3px); border-color: rgba(var(--c1-rgb), .45); box-shadow: 0 14px 34px -18px rgba(var(--c1-rgb), .55); }
.stat-card .lbl i { animation: p2pLivePulse 2.2s ease-in-out infinite; }
.stat-card:nth-child(2) .lbl i { animation-delay: .5s; } .stat-card:nth-child(3) .lbl i { animation-delay: 1s; } .stat-card:nth-child(4) .lbl i { animation-delay: 1.5s; }
.card, .table-wrap, .summary .box { transition: border-color .25s ease, box-shadow .25s ease; }

/* Графики и прогресс «прорастают» */
.mini-bar i { transform-origin: left center; animation: p2pGrowX .9s cubic-bezier(.2,.75,.15,1) .25s both; }
.meter i { transform-origin: left center; animation: p2pGrowX .9s cubic-bezier(.2,.75,.15,1) .2s both; }
.bars .b i { transform-origin: bottom center; animation: p2pGrowY .9s cubic-bezier(.2,.75,.15,1) both; }
.bars .b:nth-child(2) i { animation-delay: .04s; } .bars .b:nth-child(3) i { animation-delay: .08s; } .bars .b:nth-child(4) i { animation-delay: .12s; }
.bars .b:nth-child(5) i { animation-delay: .16s; } .bars .b:nth-child(6) i { animation-delay: .2s; } .bars .b:nth-child(7) i { animation-delay: .24s; }
.bars .b:nth-child(8) i { animation-delay: .28s; } .bars .b:nth-child(9) i { animation-delay: .32s; } .bars .b:nth-child(10) i { animation-delay: .36s; }
.bars .b:nth-child(n+11) i { animation-delay: .4s; }
.ring-card .arc { animation: p2pRingDraw 1.2s cubic-bezier(.2,.75,.15,1) .2s both; }
.ring-card .arc-2 { animation-delay: .5s; }
.salary-line::before { animation: p2pLivePulse 2.6s ease-in-out infinite; }
.salary-line:first-child::before { animation-duration: 1.8s; }

/* Аватар в шапке профиля — на орбите */
.avatar-orbit { position: relative; width: 104px; height: 104px; display: grid; place-items: center; flex: none; }
.avatar-orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(var(--c1-rgb), .45); animation: p2pSpin 40s linear infinite; }
.avatar-orbit > i { position: absolute; inset: 0; border-radius: 50%; animation: p2pSpin 12s linear infinite; }
.avatar-orbit > i::before { content: ""; position: absolute; top: 6px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.avatar-orbit > i:nth-of-type(2) { animation-duration: 18s; animation-direction: reverse; }
.avatar-orbit > i:nth-of-type(2)::before { top: auto; bottom: 10px; width: 5px; height: 5px; background: var(--c2); box-shadow: 0 0 10px var(--c2); }

/* Кнопка-акцент: перелив */
.btn.accent { background-size: 200% 100%; background-image: linear-gradient(100deg, var(--c1), var(--c2), var(--c1)); transition: background-position .6s ease, transform .2s ease, box-shadow .2s ease; }
.btn.accent:hover { background-position: 100% 0; box-shadow: 0 10px 30px -8px rgba(var(--c1-rgb), .8); }

/* Экран входа: планета */
.login { position: relative; overflow: hidden; }
.login-planet { position: absolute; width: 560px; height: 560px; right: -120px; top: 50%; margin-top: -280px; pointer-events: none; }
.login-planet .sphere { position: absolute; inset: 120px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #F4FBFF 0, var(--c1) 22%, #3B4FB8 55%, #0B1022 78%);
  box-shadow: 0 0 80px rgba(var(--c1-rgb), .45), inset -30px -40px 80px rgba(5,8,22,.85); animation: p2pFloat 8s ease-in-out infinite; }
.login-planet .ring { position: absolute; inset: 180px -10px; border-radius: 50%; border: 2px solid rgba(var(--c2-rgb), .55); transform: rotate(-22deg); box-shadow: 0 0 24px rgba(var(--c2-rgb), .35); }
.login-planet .orbit { position: absolute; inset: 40px; border-radius: 50%; border: 1px dashed rgba(var(--c1-rgb), .25); animation: p2pSpin 60s linear infinite; }
.login-planet .orbit::before { content: ""; position: absolute; top: 14%; left: 14%; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 16px var(--amber); }
.login .card { position: relative; z-index: 1; animation: p2pReveal .7s cubic-bezier(.2,.75,.15,1) both; }

@keyframes p2pOrbitPulse { 0%,100% { transform: scale(.9); opacity: .35; } 50% { transform: scale(1.12); opacity: .85; } }
@keyframes p2pLivePulse { 0%,100% { transform: scale(.82); opacity: .55; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes p2pSpin { to { transform: rotate(360deg); } }
@keyframes p2pTwinkle { 0%,100% { opacity: .35; } 50% { opacity: .9; } }
@keyframes p2pDrift { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(8%, -6%) rotate(12deg); } }
@keyframes p2pReveal { from { opacity: 0; filter: blur(8px); transform: translateY(14px); } to { opacity: 1; filter: none; transform: none; } }
@keyframes p2pRowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes p2pGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes p2pGrowY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes p2pRingDraw { from { stroke-dasharray: 0 415; } }
@keyframes p2pFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 760px) { .login-planet { display: none; } }
