
/* ==========================================================================
   Палитра (19.08.2026)

   Прежний фон #1C1A52 был очень насыщенным: тёмный и «цветной» одновременно —
   от такого сочетания глаза устают за полчаса работы, а текст кажется
   размытым. Новая база — тот же сине-фиолетовый род, но с низкой
   насыщенностью: цвет остаётся фирменным, читать становится спокойно.
   Фирменный градиент никуда не делся, но теперь работает точечно (логотип,
   активный пункт меню, главная кнопка), а не заливает каждую карточку.

   Контраст проверен по WCAG: основной текст ~14:1, второстепенный ~7,7:1,
   приглушённый ~5:1 — все пары проходят AA с запасом.
   ========================================================================== */
:root{
  --brand-gradient:linear-gradient(135deg,#1F7BDE 0%,#4B2CDB 42%,#7A28C9 72%,#C62A8B 100%);

  --bg:#0E1122;              /* фон страницы */
  --bg-elev:#141833;         /* сайдбар, «приподнятые» области */
  --bg-panel:#171B33;        /* карточка */
  --bg-panel-2:#1D2240;      /* поля ввода, вложенные блоки */

  --accent:#7C88FF;          /* ссылки и акценты на тёмном */
  --accent-strong:#5C6AF0;   /* заливка кнопок */
  --accent-dim:rgba(124,136,255,.14);

  --text:#EDEFF7;
  --text-dim:#AAB2CE;
  --text-faint:#858DAB;

  --line:rgba(150,163,214,.13);
  --line-strong:rgba(150,163,214,.28);

  --good:#5BD8A6;
  --warn:#F2B75C;
  --bad:#F58193;

  --radius:14px;
  --radius-sm:10px;
  --focus-ring:0 0 0 3px rgba(124,136,255,.38);

  --shadow:0 18px 44px rgba(4,6,18,.45);
  --surface-highlight:rgba(255,255,255,.035);
  --page-speckle:rgba(255,255,255,.012);
  --card-shadow:0 1px 0 rgba(255,255,255,.04) inset, 0 2px 6px rgba(4,6,18,.22), 0 12px 28px rgba(4,6,18,.20);
  --card-shadow-hover:0 1px 0 rgba(255,255,255,.06) inset, 0 4px 12px rgba(4,6,18,.28), 0 18px 40px rgba(4,6,18,.28);

  /* Совместимость: в разметке и старых правилах много --gold* */
  --gold:var(--accent-strong);
  --gold-light:var(--accent);
  --gold-dim:var(--accent-dim);
}
[data-theme="light"]{
  --bg:#F7F8FC;
  --bg-elev:#FFFFFF;
  --bg-panel:#FFFFFF;
  --bg-panel-2:#EFF2F9;

  --accent:#4A55D8;
  --accent-strong:#3A45C4;
  --accent-dim:rgba(74,85,216,.10);

  --text:#181D33;
  --text-dim:#4B5372;
  --text-faint:#767E9B;

  --line:rgba(28,34,64,.10);
  --line-strong:rgba(28,34,64,.20);

  --good:#12855C;
  --warn:#B4740F;
  --bad:#C0384B;

  --focus-ring:0 0 0 3px rgba(74,85,216,.28);
  --shadow:0 18px 44px rgba(35,44,90,.12);
  --surface-highlight:rgba(255,255,255,.9);
  --page-speckle:rgba(35,44,90,.02);
  --card-shadow:0 1px 2px rgba(35,44,90,.06), 0 6px 18px rgba(35,44,90,.06);
  --card-shadow-hover:0 2px 4px rgba(35,44,90,.08), 0 12px 28px rgba(35,44,90,.10);
}
*{box-sizing:border-box; margin:0; padding:0; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent;}
html,body{height:100%;}
::selection{background:var(--gold-dim); color:var(--text);}
::-webkit-scrollbar{width:7px; height:7px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--line-strong); border:2px solid transparent; border-radius:999px; background-clip:padding-box;}
::-webkit-scrollbar-thumb:hover{background:var(--gold); border:1px solid transparent; background-clip:padding-box;}
body{
  /* Подсветка углов осталась, но втрое слабее: раньше цветные пятна спорили
     с содержимым и добавляли фону «грязи». */
  background:
    radial-gradient(1200px 700px at 92% -14%, rgba(31,123,222,.05), transparent 64%),
    radial-gradient(820px 560px at 50% 114%, rgba(198,42,139,.022), transparent 72%),
    var(--bg);
  background-attachment:fixed;
  color:var(--text);
  font-family:'Inter', sans-serif;
  min-height:100vh;
  transition:background .4s ease, color .4s ease;
}
.mono{font-family:'JetBrains Mono', monospace;}
.serif{font-family:'Poppins', sans-serif;}

/* Layout */
.app{display:flex; min-height:100vh; max-width:100%;}
.sidebar{
  width:272px; flex-shrink:0;
  background:var(--bg-elev);
  border-right:1px solid var(--line);
  padding:18px 14px 12px;
  display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh; overflow:hidden;
  transition:background-color .4s ease, color .4s ease, border-color .4s ease;
}
.brand{display:flex; align-items:center; gap:11px; padding:0 7px 14px; border-bottom:1px solid var(--line); margin-bottom:12px; flex-shrink:0;}
.brand-mark{
  width:42px; height:42px; border-radius:50%;
  background:#FFFFFF;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  box-shadow:0 0 0 1px rgba(137,145,242,.10), 0 0 24px var(--gold-dim), 0 4px 14px rgba(30,25,90,.28);
}
.brand-mark .bm-text{
  font-family:'Poppins', sans-serif; font-weight:800; font-size:9.5px; line-height:0.98;
  color:var(--gold); text-align:center; letter-spacing:-0.02em;
}
.brand-text{line-height:1.15;}
.brand-text .n1{font-family:'Poppins', sans-serif; font-weight:600; font-size:16px; letter-spacing:.02em;}
.brand-text .n2{font-size:10.5px; color:var(--text-faint); letter-spacing:.12em; text-transform:uppercase; margin-top:2px;}

.sidebar > nav{flex:1; min-height:0; display:flex; flex-direction:column; gap:1px; overflow-y:auto; overscroll-behavior:contain; padding-right:2px;}
.nav-group{flex-shrink:0;}
.nav-group + .nav-group{margin-top:2px;}
.nav-group-label{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:7px 9px 5px; border:0; border-radius:7px; background:transparent;
  color:var(--text-faint); font:inherit; font-size:10px; font-weight:700; letter-spacing:.13em; text-transform:uppercase;
  text-align:left; cursor:pointer; transition:background-color .15s ease,color .15s ease;
}
.nav-group-label:hover{background:var(--gold-dim); color:var(--text-dim);}
.nav-group-label::after{
  content:''; width:6px; height:6px; flex:0 0 6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translate(-1px,-1px); transition:transform .18s ease;
}
.nav-group-label[aria-expanded="false"]::after{transform:rotate(-45deg) translate(-1px,1px);}
.nav-group-label[aria-disabled="true"]{cursor:default;}
.nav-group-items{display:flex; flex-direction:column; gap:1px;}
.nav-group-items[hidden]{display:none;}
.nav-group--management{margin-top:7px!important; padding-top:7px; border-top:1px solid var(--line);}
.nav-group--management .nav-group-label{color:var(--gold-light);}
.nav-group--secondary{margin-top:auto!important; padding-top:5px;}
.nav-item{
  display:flex; align-items:center; gap:10px; min-height:32px;
  padding:6px 9px; border-radius:8px; cursor:pointer;
  color:var(--text-dim); font-size:13px; font-weight:500;
  border:1px solid transparent;
  position:relative;
  transition:background-color .15s ease, color .15s ease, border-color .15s ease;
}
.nav-item:hover{background:var(--accent-dim); color:var(--text);}
/* Активный пункт: мягкая подложка и фирменная полоска слева. Раньше здесь
   была градиентная рамка с тенью — она перетягивала внимание с содержимого. */
.nav-item.active{
  color:var(--text); border-color:transparent; font-weight:600;
  background:var(--accent-dim);
}
[data-theme="light"] .nav-item.active{color:var(--text);}
.nav-item.active::before{
  content:''; position:absolute; left:-1px; top:50%; width:3px; height:20px; border-radius:0 3px 3px 0;
  background:var(--brand-gradient); transform:translateY(-50%) scaleY(0); transform-origin:center;
  animation:nav-indicator-in .38s cubic-bezier(.34,1.56,.64,1) .08s forwards;
}
.nav-ico{width:17px; height:17px; flex-shrink:0; opacity:.85; transition:transform .2s ease;}
.nav-item:not(.active):hover .nav-ico{transform:translateX(2px);}
.nav-item--admin{margin-top:6px; color:var(--gold-light);}
.nav-item--admin::after{content:''; position:absolute; top:-4px; left:9px; right:9px; height:1px; background:var(--line);}

.audience-toggle{
  display:flex; gap:4px; background:var(--bg-panel); border:1px solid var(--line); border-radius:11px;
  padding:4px; margin-bottom:6px;
}
.aud-btn{
  flex:1; text-align:center; padding:8px 6px; border-radius:8px; font-size:12px; font-weight:600;
  color:var(--text-faint); cursor:pointer; transition:.15s ease;
}
.aud-btn.active{background:var(--brand-gradient); color:#FFFFFF; box-shadow:0 6px 16px rgba(75,44,219,.22);}
.aud-btn:not(.active):hover{color:var(--text-dim);}
.nav-item[data-aud="staff"], .nav-item[data-aud="trainer"]{display:none;}
.theme-toggle{
  display:flex; align-items:center; justify-content:space-between;
  padding:7px 10px; border-radius:9px; border:1px solid var(--line);
  font-size:12px; color:var(--text-dim);
}
.switch{width:36px; height:20px; padding:0; background:var(--bg-panel); border:1px solid var(--line-strong); border-radius:20px; position:relative; cursor:pointer; flex-shrink:0; transition:background-color .4s ease, border-color .4s ease;}
.switch::after{content:''; position:absolute; width:14px; height:14px; border-radius:50%; background:var(--brand-gradient); top:2px; left:2px; transition:transform .38s cubic-bezier(.34,1.56,.64,1), background-color .4s ease; box-shadow:0 2px 8px var(--gold-dim);}
[data-theme="light"] .switch::after{left:2px; transform:translateX(16px);}
.sidebar-footer{flex-shrink:0; padding-top:8px; border-top:1px solid var(--line);}
.sidebar-user{margin-top:8px; padding:7px 9px; border:1px solid var(--line); border-radius:9px; display:flex; align-items:center; gap:9px;}
.sidebar-user .avatar{width:31px; height:31px; font-size:12px; flex-shrink:0;}
.sidebar-user__info{flex:1; min-width:0; line-height:1.25;}
.sidebar-user__name{font-size:12.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.sidebar-user__role{font-size:10.5px; color:var(--text-faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.sidebar-user form{margin:0;}
.sidebar-logout{padding:4px; border:0; background:none; color:var(--text-faint); font-size:15px; line-height:1; cursor:pointer;}
.sidebar-logout:hover{color:var(--bad);}

/* Main */
/* min-width:0 — иначе широкая таблица внутри распирает main как флекс-элемент,
   и вся страница уезжает вбок вместо того, чтобы таблица скроллилась у себя. */
main{flex:1; min-width:0; padding:34px 44px 80px; max-width:1240px;}
.section{display:block; animation:fade .4s ease;}
.section.active{display:block;}
@keyframes fade{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);}}

.eyebrow{display:flex; align-items:center; gap:8px; font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-faint); font-weight:700; margin-bottom:10px;}
.eyebrow::before{content:''; width:18px; height:2px; flex:0 0 18px; border-radius:999px; background:var(--brand-gradient);}
/* Заголовок был 40–50px — размер рекламной страницы, а не рабочего кабинета:
   он съедал первый экран и оттеснял данные вниз. */
h1.page-title{max-width:900px; font-family:'Poppins', sans-serif; font-weight:700; font-size:clamp(25px,2.4vw,32px); line-height:1.16; margin-bottom:10px; letter-spacing:-0.02em; text-wrap:balance; animation:page-fade-up .5s cubic-bezier(.22,1,.36,1) .02s backwards;}
p.lede{color:var(--text-dim); font-size:14.5px; line-height:1.62; max-width:760px; margin-bottom:26px; animation:page-fade-up .5s cubic-bezier(.22,1,.36,1) .08s backwards;}

.card{
  background:var(--bg-panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:20px 22px;
  box-shadow:var(--card-shadow);
  animation:card-fade-up .52s cubic-bezier(.22,1,.36,1) .14s backwards;
  transition:box-shadow .2s ease, border-color .2s ease, background-color .4s ease, color .4s ease;
}
/* Карточка больше не подпрыгивает под курсором: на странице их полтора
   десятка, и от общего дёрганья рябило в глазах. */
.card:hover{border-color:var(--line-strong); box-shadow:var(--card-shadow-hover);}
[data-theme="light"] .card:hover{box-shadow:var(--card-shadow-hover);}
.card:nth-child(1){animation-delay:.14s;}
.card:nth-child(2){animation-delay:.20s;}
.card:nth-child(3){animation-delay:.26s;}
.card:nth-child(4){animation-delay:.32s;}
.card:nth-child(5){animation-delay:.38s;}
.card:nth-child(6){animation-delay:.44s;}
.card:nth-child(7){animation-delay:.50s;}
.card:nth-child(8){animation-delay:.56s;}
.card:nth-child(n+9){animation-delay:.62s;}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:18px;}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:16px;}
.grid-3 > .card{position:relative; overflow:hidden;}
.grid-3 > .card::before{
  content:''; position:absolute; z-index:1; left:0; right:0; top:0; height:2px;
  background:var(--brand-gradient);
  opacity:0; transform:scaleX(.25); transform-origin:left; transition:opacity .2s ease, transform .28s cubic-bezier(.22,1,.36,1);
}
.grid-3 > .card:hover::before{opacity:1; transform:scaleX(1);}

.stat-grid > .card{min-height:0; display:flex; flex-direction:column; justify-content:space-between; padding:18px 20px 16px;}
/* Полоска градиента была на каждой карточке — вместе они превращались в
   пёстрый забор. Оставляем тонкую акцентную линию только при наведении. */
.stat-grid > .card::before{height:2px; opacity:0; transform:scaleX(.3);}
.stat-grid > .card:hover::before{opacity:1; transform:scaleX(1);}
.stat-grid .stat-value{
  display:inline-block; align-self:flex-start; margin-top:2px;
  /* Числа больше не заливаем градиентом: он размывал цифры и ронял контраст */
  color:var(--text);
  font-family:'Poppins',sans-serif; font-size:26px; font-weight:700; line-height:1.15;
  letter-spacing:-.02em; font-variant-numeric:tabular-nums;
}
.stat-grid .stat-meta{margin-top:8px; color:var(--text-faint); font-size:12px; line-height:1.45;}
.stat-grid .stat-meta a{color:var(--gold-light); text-decoration:none; font-weight:600;}
.stat-grid .stat-value.stat-value-centered{align-self:center;}

.list-card{border-radius:18px; background:linear-gradient(180deg,var(--bg-panel),var(--bg-panel-2));}
.list-card:hover{transform:none; box-shadow:var(--card-shadow);}
.list-card > .eyebrow{margin:-24px -26px 14px; padding:15px 26px 14px; background:color-mix(in srgb,var(--bg-panel-2) 84%,transparent); border-bottom:1px solid var(--line);}
.attention-card{position:relative; overflow:hidden; background:linear-gradient(105deg,rgba(75,44,219,.11),transparent 45%),var(--bg-panel);}
.attention-card::before{content:''; position:absolute; inset:0 auto 0 0; width:3px; background:var(--brand-gradient);}
.feed-card{position:relative; padding-left:30px; border-radius:12px; box-shadow:0 1px 0 var(--surface-highlight) inset,0 10px 28px rgba(15,13,50,.09);}
.feed-card::before{content:''; position:absolute; left:0; top:18px; bottom:18px; width:2px; border-radius:0 999px 999px 0; background:var(--brand-gradient); opacity:.78;}
.feed-card:hover{transform:translateX(2px);}

/* HOME */
.hero{
  border:1px solid var(--line); border-radius:20px; padding:52px 48px; position:relative; overflow:hidden;
  background: linear-gradient(160deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  margin-bottom:40px;
}
.hero::before{
  content:''; position:absolute; right:-120px; top:-120px; width:340px; height:340px; border-radius:50%;
  background: radial-gradient(circle, var(--gold-dim), transparent 70%);
}
.hero h1{font-family:'Poppins', sans-serif; font-weight:600; font-size:46px; line-height:1.08; max-width:640px; letter-spacing:-0.015em; margin-bottom:18px;}
.hero p{color:var(--text-dim); font-size:16px; max-width:560px; line-height:1.6; margin-bottom:28px;}
.pill-row{display:flex; gap:10px; flex-wrap:wrap;}
.pill{border:1px solid var(--line-strong); border-radius:100px; padding:7px 16px; font-size:12.5px; color:var(--gold-light); font-weight:500;}

.values-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin:36px 0 44px 0;}
.value-card{border:1px solid var(--line); border-radius:12px; padding:22px 20px; background:var(--bg-panel);}
.value-card .vnum{font-family:'JetBrains Mono'; font-size:11px; color:var(--gold); margin-bottom:12px;}
.value-card h3{font-family:'Poppins', sans-serif; font-size:19px; margin-bottom:8px; font-weight:600;}
.value-card p{font-size:13px; color:var(--text-dim); line-height:1.55;}

.news-strip{display:flex; flex-direction:column; gap:0;}
.news-row{display:flex; justify-content:space-between; align-items:center; padding:16px 4px; border-bottom:1px solid var(--line);}
.news-row:last-child{border-bottom:none;}
.news-tag{font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--gold-light); background:linear-gradient(var(--bg-panel),var(--bg-panel)) padding-box,var(--brand-gradient) border-box; border:1px solid transparent; padding:4px 9px; border-radius:6px; margin-right:12px;}
.news-title{font-size:14px; font-weight:500;}
.news-date{font-size:12px; color:var(--text-faint); font-family:'JetBrains Mono';}

/* LADDER */
.ladder-wrap{position:relative; padding:20px 0 10px 0; margin-bottom:20px;}
.ladder{display:flex; flex-direction:column-reverse; gap:14px; max-width:760px;}
.rung{
  display:flex; align-items:center; gap:20px; border:1px solid var(--line); border-radius:14px;
  padding:20px 24px; background:var(--bg-panel); cursor:pointer; transition:.2s ease; position:relative;
}
.rung:hover{border-color:var(--line-strong); transform:translateX(4px);}
.rung .rlevel{font-family:'JetBrains Mono'; font-size:12px; color:var(--text-faint); width:26px;}
.rung .rbar{width:6px; align-self:stretch; border-radius:4px; background:var(--gold-dim);}
.rung.l1 .rbar{background:linear-gradient(180deg, #7C6420, transparent);}
.rung.l2 .rbar{background:linear-gradient(180deg, #A9821A, transparent);}
.rung.l3 .rbar{background:linear-gradient(180deg, #C9A227, transparent);}
.rung.l4 .rbar{background:linear-gradient(180deg, #E8C874, #C9A227);}
.rung .rbody h3{font-family:'Poppins', sans-serif; font-size:20px; font-weight:600; margin-bottom:4px;}
.rung .rbody p{font-size:13px; color:var(--text-dim);}
.rung .rarrow{margin-left:auto; color:var(--gold); font-size:18px; opacity:.6;}

.rung-detail{display:none; margin-top:14px; padding-top:14px; border-top:1px dashed var(--line);}
.rung-detail.open{display:block;}
.rung-detail ul{list-style:none; display:flex; flex-direction:column; gap:8px;}
.rung-detail li{font-size:13.5px; color:var(--text-dim); padding-left:18px; position:relative; line-height:1.5;}
.rung-detail li::before{content:'—'; position:absolute; left:0; color:var(--gold);}

/* DEV CENTER */
.dev-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:20px; margin-bottom:24px;}
.progress-track{height:8px; background:var(--bg-panel-2); border-radius:6px; overflow:hidden; border:1px solid var(--line); margin:8px 0 4px 0;}
.progress-fill{height:100%; background:var(--brand-gradient); border-radius:999px; box-shadow:0 0 14px rgba(122,40,201,.28); transform-origin:left; animation:progress-reveal .8s cubic-bezier(.22,1,.36,1) .16s both;}
.academy-progress-track{flex:1; height:6px; background:var(--bg-panel-2); border:1px solid var(--line); border-radius:999px; overflow:hidden;}
.checklist{display:flex; flex-direction:column; gap:10px; margin-top:14px;}
.check-item{display:flex; align-items:center; gap:11px; font-size:13.5px; padding:10px 12px; border:1px solid var(--line); border-radius:9px;}
.check-box{width:17px; height:17px; border-radius:5px; border:1.5px solid var(--line-strong); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--good);}
.check-box.done{background:var(--good); border-color:var(--good); color:var(--bg);}
.check-item.done span{color:var(--text-faint); text-decoration:line-through;}

/* ACADEMY */
.course-card{border:1px solid var(--line); border-radius:12px; padding:20px; background:var(--bg-panel); display:flex; flex-direction:column; gap:10px;}
.course-card .ctag{font-size:10.5px; color:var(--gold); letter-spacing:.08em; text-transform:uppercase;}
.course-card h4{font-family:'Poppins', sans-serif; font-size:16.5px; font-weight:600;}
.course-card p{font-size:12.5px; color:var(--text-dim); line-height:1.5;}
.course-meta{display:flex; justify-content:space-between; font-size:11.5px; color:var(--text-faint); margin-top:auto; padding-top:10px; border-top:1px solid var(--line); font-family:'JetBrains Mono';}

/* CABINET */
.profile-head{display:flex; gap:20px; align-items:center; margin-bottom:24px;}
.avatar{width:76px; height:76px; border-radius:16px; background:var(--brand-gradient); display:flex; align-items:center; justify-content:center; font-family:'Poppins', sans-serif; font-size:28px; color:#fff; font-weight:700; box-shadow:0 8px 24px rgba(75,44,219,.24),0 1px 0 rgba(255,255,255,.25) inset;}
.profile-head h2{font-family:'Poppins', sans-serif; font-size:24px; font-weight:600;}
.profile-head .psub{color:var(--text-dim); font-size:13.5px; margin-top:4px;}
.stat-mini{border:1px solid var(--line); border-radius:11px; padding:16px; text-align:left;}
.stat-mini .sval{font-family:'JetBrains Mono'; font-size:24px; font-weight:700; color:var(--gold-light);}
.stat-mini .slabel{font-size:11.5px; color:var(--text-faint); margin-top:4px; text-transform:uppercase; letter-spacing:.05em;}

/* CALCULATOR */
.calc-wrap{display:grid; grid-template-columns:1fr 1fr; gap:24px;}
.field{margin-bottom:16px;}
.field label{display:block; font-size:12.5px; color:var(--text-dim); margin-bottom:7px; font-weight:500;}
.field input{
  width:100%; padding:11px 13px; border-radius:9px; border:1px solid var(--line-strong);
  background:var(--bg-panel-2); color:var(--text); font-family:'JetBrains Mono'; font-size:14px;
}
.field input:focus{outline:none; border-color:var(--gold);}
.calc-result{background:var(--bg-panel-2); border:1px solid var(--line-strong); border-radius:14px; padding:26px;}
.result-row{display:flex; justify-content:space-between; padding:9px 0; font-size:13.5px; border-bottom:1px solid var(--line); color:var(--text-dim);}
.result-row span:last-child{font-family:'JetBrains Mono'; color:var(--text);}
.result-total{display:flex; justify-content:space-between; align-items:baseline; margin-top:16px; padding-top:16px;}
.result-total .tlabel{font-size:13px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em;}
.result-total .tval{font-family:'JetBrains Mono'; font-size:32px; font-weight:700; color:var(--gold-light);}

/* KPI DASHBOARD */
.kpi-card{border:1px solid var(--line); border-radius:12px; padding:18px; background:var(--bg-panel);}
.kpi-card .klabel{font-size:12px; color:var(--text-dim); margin-bottom:10px;}
.kpi-card .kval{font-family:'JetBrains Mono'; font-size:26px; font-weight:700;}
.kpi-card .kval.good{color:var(--good);}
.kpi-card .kval.warn{color:var(--gold-light);}
.bar-row{display:flex; align-items:center; gap:12px; margin-bottom:14px;}
.bar-row .blabel{width:180px; font-size:12.5px; color:var(--text-dim); flex-shrink:0;}
.bar-track{flex:1; height:10px; background:var(--bg-panel-2); border-radius:6px; overflow:hidden; border:1px solid var(--line);}
.bar-fill{height:100%; background:var(--brand-gradient); border-radius:999px; box-shadow:0 0 14px rgba(122,40,201,.24); transform-origin:left; animation:progress-reveal .8s cubic-bezier(.22,1,.36,1) .16s both;}
.bar-val{width:44px; text-align:right; font-family:'JetBrains Mono'; font-size:12px; color:var(--text-faint);}

/* KPI ENTRY */
.kpi-entry-table th{white-space:nowrap; font-size:11.5px;}
.kpi-entry-table td{vertical-align:middle;}
.kpi-input{width:74px; padding:5px 7px; font-size:12.5px; border-radius:7px; border:1px solid var(--line); background:var(--bg-panel-2); color:var(--text); font-family:'JetBrains Mono', monospace;}
.kpi-input:focus{outline:none; border-color:var(--gold); box-shadow:0 0 0 2px rgba(122,40,201,.18);}
.kpi-input--wide{width:150px; font-family:inherit;}
.kpi-input--money{width:88px;}
.kpi-entry-table input[type=checkbox]{width:16px; height:16px;}

/* DOCS */
.doc-row{display:flex; align-items:center; gap:14px; padding:14px 6px; border-bottom:1px solid var(--line);}
.doc-row:last-child{border-bottom:none;}
.doc-ico{width:34px; height:34px; border-radius:9px; background:linear-gradient(var(--bg-panel-2),var(--bg-panel-2)) padding-box,var(--brand-gradient) border-box; border:1px solid transparent; display:flex; align-items:center; justify-content:center; color:var(--gold-light); font-size:14px; flex-shrink:0; box-shadow:0 5px 14px rgba(49,38,164,.12);}
.doc-name{font-size:13.5px; font-weight:500; flex:1;}
.doc-meta{font-size:11.5px; color:var(--text-faint); font-family:'JetBrains Mono';}

/* ROLES */
.role-card{border:1px solid var(--line); border-radius:12px; padding:22px; background:var(--bg-panel);}
.role-card h4{font-family:'Poppins', sans-serif; font-size:17px; margin-bottom:10px;}
.role-card ul{list-style:none; display:flex; flex-direction:column; gap:7px;}
.role-card li{font-size:12.5px; color:var(--text-dim); padding-left:14px; position:relative;}
.role-card li::before{content:'·'; position:absolute; left:0; color:var(--gold); font-size:18px; line-height:0.7;}

/* INTEGRATIONS */
.int-chip{border:1px solid var(--line); border-radius:10px; padding:14px 16px; display:flex; align-items:center; gap:10px; font-size:13px; font-weight:500; background:var(--bg-panel);}
.int-dot{width:8px; height:8px; border-radius:50%; background:var(--good);}

footer.page-foot{margin-top:60px; padding-top:24px; border-top:1px solid var(--line); font-size:12px; color:var(--text-faint); display:flex; justify-content:space-between;}

/* COPYRIGHT / FOOTER */
.site-foot{margin-top:48px; padding:22px 4px 8px; border-top:1px solid var(--line); font-size:12px; line-height:1.7; color:var(--text-faint); display:flex; flex-direction:column; gap:4px; text-align:center;}
.site-foot__copy{font-weight:600; color:var(--text-dim); letter-spacing:.2px;}
.site-foot__copy .site-foot__brand{background:var(--brand-gradient); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;}
.site-foot__meta{display:flex; flex-wrap:wrap; gap:4px 14px; justify-content:center;}
.site-foot__meta span{white-space:nowrap;}
.site-foot__rights{opacity:.85;}
/* Компактный копирайт для standalone-страниц (вход, письма) */
.auth-foot{margin-top:26px; text-align:center; font-size:11.5px; line-height:1.65; color:var(--text-faint);}
.auth-foot .auth-foot__brand{font-weight:600; color:var(--text-dim);}

/* TOPBAR */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin-bottom:32px; padding-bottom:18px; border-bottom:1px solid var(--line);
}
.topbar-search{
  flex:1; max-width:360px; display:flex; align-items:center; gap:9px;
  background:var(--bg-panel); border:1px solid var(--line); border-radius:10px; padding:9px 14px;
  color:var(--text-faint); font-size:13px;
}
.topbar-actions{display:flex; align-items:center; gap:12px;}
.bell-wrap{position:relative; cursor:pointer;}
.bell-btn{
  width:38px; height:38px; border-radius:10px; border:1px solid var(--line); background:var(--bg-panel);
  display:flex; align-items:center; justify-content:center; font-size:16px; position:relative;
}
.bell-dot{position:absolute; top:6px; right:7px; width:8px; height:8px; border-radius:50%; background:var(--bad); border:2px solid var(--bg-panel);}
.notif-panel{
  display:none; position:absolute; right:0; top:46px; width:320px; background:var(--bg-panel);
  border:1px solid var(--line-strong); border-radius:12px; box-shadow:var(--shadow); z-index:20; padding:8px;
}
.notif-panel.open{display:block;}
.notif-item{padding:11px 12px; border-radius:8px; font-size:12.5px; color:var(--text-dim); line-height:1.5;}
.notif-item:hover{background:var(--gold-dim);}
.notif-item b{color:var(--text); font-weight:600;}
.notif-item .ntime{display:block; font-size:11px; color:var(--text-faint); margin-top:2px;}
.qa-btn{
  background:var(--brand-gradient); color:#fff; border:none; border-radius:10px; padding:9px 18px;
  font-size:13px; font-weight:600; cursor:pointer;
  box-shadow:0 8px 22px rgba(75,44,219,.24);
}

/* DASHBOARD */
.dash-top{display:grid; grid-template-columns:1.3fr 1fr; gap:18px; margin-bottom:18px;}
.dash-welcome{border-radius:16px; padding:26px 28px; background:linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2)); border:1px solid var(--line);}
.dash-welcome h2{font-family:'Poppins',sans-serif; font-size:22px; margin-bottom:6px;}
.dash-welcome p{font-size:13px; color:var(--text-dim);}
.quick-grid{display:flex; gap:10px; flex-wrap:wrap; margin-top:16px;}
.quick-chip{border:1px solid var(--line-strong); border-radius:9px; padding:8px 14px; font-size:12px; color:var(--gold-light); cursor:pointer;}
.quick-chip:hover{background:var(--gold-dim);}
.task-item{display:flex; align-items:center; gap:10px; padding:10px 4px; border-bottom:1px solid var(--line); font-size:13px;}
.task-item:last-child{border-bottom:none;}
.task-dot{width:7px; height:7px; border-radius:50%; background:var(--brand-gradient); box-shadow:0 0 10px rgba(122,40,201,.45); flex-shrink:0;}
.achv-row{display:flex; gap:10px; flex-wrap:wrap;}
.achv-badge{border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:12px; display:flex; align-items:center; gap:8px; background:var(--bg-panel);}

/* CALENDAR */
.cal-day{display:flex; gap:18px; padding:16px 4px; border-bottom:1px solid var(--line);}
.cal-day:last-child{border-bottom:none;}
.cal-date{width:56px; flex-shrink:0; text-align:center;}
.cal-date .cd-num{font-family:'JetBrains Mono'; font-size:20px; font-weight:700; color:var(--gold-light);}
.cal-date .cd-mon{font-size:10.5px; color:var(--text-faint); text-transform:uppercase;}
.cal-events{flex:1; display:flex; flex-direction:column; gap:8px;}
.cal-ev{display:flex; align-items:center; gap:10px; font-size:13px;}
.cal-ev-type{font-size:10px; text-transform:uppercase; letter-spacing:.05em; padding:3px 8px; border-radius:5px; background:var(--gold-dim); color:var(--gold-light); flex-shrink:0;}

/* DOC SEARCH */
.doc-search{display:flex; gap:10px; margin-bottom:18px; flex-wrap:wrap;}
.doc-search input{flex:1; min-width:220px; padding:11px 14px; border-radius:9px; border:1px solid var(--line-strong); background:var(--bg-panel-2); color:var(--text); font-size:13px;}
.doc-cat{border:1px solid var(--line); border-radius:100px; padding:7px 14px; font-size:12px; color:var(--text-dim); cursor:pointer;}
.doc-cat.active{background:var(--brand-gradient); color:#fff; border-color:transparent; box-shadow:0 7px 18px rgba(75,44,219,.2);}

/* LOGIN GATE */
.login-gate{
  position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center;
  background: radial-gradient(1200px 700px at 80% -10%, var(--gold-dim), transparent 60%), var(--bg);
  overflow:hidden; isolation:isolate;
}
.login-card{
  width:380px; background:var(--bg-panel); border:1px solid var(--line-strong); border-radius:18px;
  padding:36px 32px; box-shadow:var(--shadow); position:relative; z-index:2;
  animation:login-card-in .65s cubic-bezier(.22,1,.36,1) .08s backwards;
  transition:background-color .4s ease, color .4s ease, border-color .4s ease;
}
/* Светящиеся пятна на входе стали вдвое мягче: раньше они заливали экран
   сиреневым и спорили с карточкой формы. */
.login-orb{position:absolute; z-index:0; border-radius:50%; pointer-events:none; opacity:.16; filter:blur(110px); will-change:transform;}
.login-orb--one{width:460px; height:460px; left:-12%; top:-18%; background:#1F7BDE; animation:orb-drift-one 18s ease-in-out infinite alternate;}
.login-orb--two{width:380px; height:380px; right:-8%; bottom:-18%; background:#7A28C9; opacity:.12; animation:orb-drift-two 22s ease-in-out infinite alternate;}
.login-orb--three{width:300px; height:300px; right:16%; top:4%; background:linear-gradient(135deg,#4B2CDB,#C62A8B); opacity:.09; animation:orb-drift-three 25s ease-in-out infinite alternate;}
[data-theme="light"] .login-orb{opacity:.1;}
/* Логотип теперь сам круглый — белая подложка под ним смотрелась как ободок */
.login-card .lg-mark{width:54px; height:54px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px auto;}
.login-card .lg-mark .bm-text{font-family:'Poppins',sans-serif; font-weight:800; font-size:12px; line-height:0.98; color:var(--gold); text-align:center;}
.login-card h2{font-family:'Poppins',sans-serif; font-size:20px; text-align:center; margin-bottom:4px;}
.login-card p.lg-sub{font-size:12.5px; color:var(--text-faint); text-align:center; margin-bottom:24px;}
.login-card label{display:block; font-size:12px; color:var(--text-dim); margin-bottom:6px; font-weight:500;}
.login-card input, .login-card select{
  width:100%; padding:11px 13px; border-radius:9px; border:1px solid var(--line-strong);
  background:var(--bg-panel-2); color:var(--text); font-size:13.5px; margin-bottom:16px; font-family:'Inter',sans-serif;
}
.login-card button{
  width:100%; margin-top:4px;
}
.data-freshness{display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px 18px; margin:0 0 24px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--bg-panel-2);}
.data-freshness-copy{flex:1 1 360px; min-width:0;}
.data-freshness-status{display:flex; align-items:center; gap:8px; color:var(--text-dim); font-size:12.5px;}
.data-freshness-status svg{flex-shrink:0; color:var(--gold-light);}
.data-freshness-status strong{color:var(--text); font-weight:600;}
.data-freshness-hint{margin-top:4px; color:var(--text-faint); font-size:11.5px; line-height:1.45;}
.refresh-form{display:inline-flex; flex-shrink:0; margin:0;}
.btn-refresh{display:inline-flex; align-items:center; gap:7px; padding:8px 14px; font-size:12.5px; white-space:nowrap;}
.btn-refresh svg{flex-shrink:0;}
.btn-refresh.is-loading{opacity:.6; cursor:progress;}
.btn-refresh:disabled{opacity:.55; cursor:not-allowed; color:var(--text-faint);}
.btn-refresh.is-loading svg{animation:refresh-spin 1s linear infinite;}
@keyframes refresh-spin{to{transform:rotate(360deg);}}
.section-head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px;}

.login-hint{font-size:11px; color:var(--text-faint); text-align:center; margin-top:14px;}
.login-field-hint{font-size:11px; color:var(--text-faint); margin-top:6px; line-height:1.5;}
.login-field-hint code{font-family:'JetBrains Mono',monospace; font-size:10.5px; color:var(--text-dim); word-break:break-all;}
.app-hidden{display:none !important;}

/* USER CHIP + EDITABLE FORMS */
.user-chip{display:flex; align-items:center; gap:9px; border:1px solid var(--line); border-radius:10px; padding:6px 12px 6px 6px; background:var(--bg-panel); cursor:pointer;}
.user-chip .uc-avatar{width:26px; height:26px; border-radius:50%; background:var(--brand-gradient); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; box-shadow:0 4px 12px rgba(75,44,219,.22);}
.user-chip .uc-info{line-height:1.15;}
.user-chip .uc-name{font-size:12px; font-weight:600;}
.user-chip .uc-role{font-size:10px; color:var(--text-faint);}
.logout-btn{border:1px solid var(--line-strong); background:none; color:var(--text-dim); border-radius:9px; padding:6px 12px; font-size:11.5px; cursor:pointer;}
.logout-btn:hover{color:var(--bad); border-color:var(--bad);}

.editable-panel{border:1px dashed var(--line-strong); border-radius:12px; padding:18px; margin-bottom:20px; background:var(--gold-dim);}
.editable-panel .ep-title{font-size:12px; font-weight:700; color:var(--gold-light); text-transform:uppercase; letter-spacing:.05em; margin-bottom:12px;}
.ep-row{display:flex; gap:10px; margin-bottom:10px; flex-wrap:wrap;}
.ep-row input, .ep-row select{flex:1; min-width:150px; padding:10px 12px; border-radius:8px; border:1px solid var(--line-strong); background:var(--bg-panel); color:var(--text); font-size:13px;}
.ep-add-btn{background:var(--brand-gradient); color:#fff; border:none; border-radius:8px; padding:10px 18px; font-size:12.5px; font-weight:600; cursor:pointer; white-space:nowrap; box-shadow:0 7px 18px rgba(75,44,219,.2);}
.item-del{color:var(--text-faint); cursor:pointer; font-size:15px; padding:2px 6px; border-radius:5px; flex-shrink:0;}
.item-del:hover{color:var(--bad); background:rgba(240,134,138,0.12);}
[data-role]{display:none;}

.mobile-topbar{
  display:none; position:fixed; top:0; left:0; right:0; z-index:40;
  align-items:center; gap:12px; padding:12px 16px;
  background:var(--bg-panel-2); border-bottom:1px solid var(--line);
}
.burger{background:none; border:1px solid var(--line-strong); border-radius:8px; color:var(--text); font-size:16px; padding:6px 12px; cursor:pointer;}
.mobile-bottom-nav{display:none;}
.mobile-bottom-nav__item{
  position:relative; display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  padding:5px 4px; border:0; background:transparent; color:var(--text-faint); font:inherit; font-size:10px; font-weight:600;
  text-decoration:none; cursor:pointer;
}
.mobile-bottom-nav__item svg{flex-shrink:0;}
.mobile-bottom-nav__item.active{color:var(--gold-light);}
.mobile-bottom-nav__item.active::before{
  content:''; position:absolute; top:-6px; left:50%; width:28px; height:3px; border-radius:0 0 3px 3px;
  background:var(--brand-gradient); transform:translateX(-50%);
}

@media(max-width:1000px){
  body{background-attachment:scroll;}
  body.sidebar-open{overflow:hidden;}
  .sidebar{position:fixed; left:-290px; top:0; z-index:60; height:100vh; height:100dvh; transition:left .25s ease, background-color .4s ease, color .4s ease, border-color .4s ease; box-shadow:var(--shadow);}
  .sidebar.open{left:0;}
  .sidebar-backdrop{display:none; position:fixed; inset:0; background:rgba(10,8,40,0.5); z-index:50;}
  .sidebar-backdrop.show{display:block;}
  .mobile-topbar{display:flex;}
  /* Дашборд, Мой график и Мой KPI уже есть в нижней панели — в шторке «Ещё»
     их не повторяем, иначе меню дублирует само себя. */
  .nav-item--in-bottom-bar{display:none;}
  .mobile-bottom-nav{
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); position:fixed; left:0; right:0; bottom:0; z-index:45;
    min-height:62px; padding:6px 8px calc(6px + env(safe-area-inset-bottom));
    background:var(--bg-panel-2); border-top:1px solid var(--line); box-shadow:0 -10px 30px rgba(10,8,40,.18);
  }
  /* min-width:0 обязателен: main — флекс-элемент рядом с сайдбаром, без него
     он раздувался шире экрана и страница уезжала вбок на телефоне. */
  main{padding:72px 16px calc(82px + env(safe-area-inset-bottom)); min-width:0; max-width:100%;}
  h1.page-title{font-size:clamp(22px,5.4vw,28px); text-wrap:wrap;}
  p.lede{margin-bottom:22px; font-size:14px;}
  .grid-2,.grid-3,.grid-4,.calc-wrap,.values-grid{grid-template-columns:1fr;}
  .stat-grid > .card{min-height:138px;}
}

/* --- Django additions --- */

/* Поля без класса .input оставались в системном оформлении: на тёмной теме
   это белые прямоугольники посреди страницы — самое заметное «некрасиво».
   Приводим к общему виду все селекты, поля и текстовые области. */
select,
textarea,
input[type="text"], input[type="password"], input[type="email"], input[type="url"],
input[type="number"], input[type="tel"], input[type="search"], input[type="date"],
input[type="month"], input[type="time"], input[type="datetime-local"]{
  background:var(--bg-panel-2);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:9px 12px;
  font-family:inherit;
  font-size:13.5px;
  line-height:1.35;
  transition:border-color .15s ease, box-shadow .15s ease;
}
select{
  /* своя стрелка вместо системной — иначе в тёмной теме она белая на белом */
  appearance:none; -webkit-appearance:none;
  padding-right:32px;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 17px) 51%, calc(100% - 12px) 51%;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  cursor:pointer;
}
select:hover, textarea:hover, input:hover{border-color:var(--line-strong);}
select:focus, textarea:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="url"]:focus, input[type="number"]:focus, input[type="tel"]:focus,
input[type="search"]:focus, input[type="date"]:focus{
  outline:none; border-color:var(--accent); box-shadow:var(--focus-ring);
}
textarea{min-height:88px; line-height:1.55; resize:vertical;}
label{font-size:12.5px; color:var(--text-dim); font-weight:500;}
input[type="checkbox"], input[type="radio"]{accent-color:var(--accent-strong); cursor:pointer;}

.input{width:100%; background:var(--bg-panel-2); border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 13px; color:var(--text); font-size:14px; font-family:inherit; transition:border-color .15s ease, box-shadow .15s ease;}
.input::placeholder{color:var(--text-faint);}
.input:focus{outline:none; border-color:var(--accent); box-shadow:var(--focus-ring);}
.btn-primary{display:inline-block; position:relative; isolation:isolate; overflow:hidden; background:var(--brand-gradient); color:#fff; border:none; border-radius:var(--radius-sm); padding:10px 20px; font-size:13.5px; font-weight:600; cursor:pointer; text-decoration:none; box-shadow:0 6px 16px rgba(75,44,219,.22); transition:transform .2s ease, box-shadow .2s ease, filter .2s ease;}
.btn-primary::after{content:''; position:absolute; z-index:1; top:-70%; bottom:-70%; left:-35%; width:18%; background:rgba(255,255,255,.32); filter:blur(2px); transform:skewX(-22deg) translateX(-220%); pointer-events:none;}
.btn-primary:hover{transform:translateY(-1px); box-shadow:0 10px 28px var(--gold-dim); filter:saturate(1.06);}
.btn-primary:hover::after{transform:skewX(-22deg) translateX(900%); transition:transform .65s cubic-bezier(.22,1,.36,1);}
.btn-primary:active{transform:translateY(0) scale(.985); box-shadow:0 4px 14px var(--gold-dim);}
.btn-ghost{display:inline-block; background:transparent; color:var(--text-dim); border:1px solid var(--line); border-radius:10px; padding:10px 18px; font-size:13px; cursor:pointer; text-decoration:none;}
.btn-ghost:hover{color:var(--text); border-color:var(--line-strong);}
.btn-ghost.active{color:var(--text); background:linear-gradient(var(--bg-panel),var(--bg-panel)) padding-box,var(--brand-gradient) border-box; border-color:transparent; font-weight:600;}
.form-errors{color:var(--bad); font-size:13px; margin:8px 0;}
.messages{list-style:none; margin-bottom:20px;}
.messages li{padding:12px 16px; border-radius:10px; border:1px solid var(--line); background:var(--bg-panel); font-size:13.5px; margin-bottom:8px;}
.messages li.success{border-color:var(--good); color:var(--good);}
.data-table{width:100%; border-collapse:separate; border-spacing:0; font-size:13.5px;}
.table-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.data-table th{text-align:left; color:var(--text-faint); background:var(--bg-panel-2); font-size:10.5px; text-transform:uppercase; letter-spacing:.09em; padding:10px 12px; border-bottom:1px solid var(--line-strong); white-space:nowrap;}
/* Цифры в колонках выравниваются по разрядам — суммы и проценты читаются
   столбиком, а не «пляшут» по ширине символов. */
.data-table td{padding:11px 12px; border-bottom:1px solid var(--line); color:var(--text-dim); line-height:1.45; font-variant-numeric:tabular-nums; transition:background-color .15s ease, color .15s ease;}
.data-table tr:hover td{background:var(--accent-dim); color:var(--text);}
.data-table a{color:var(--accent); text-decoration:none;}
.data-table a:hover{text-decoration:underline;}
/* Раньше каждый бейдж носил градиентную рамку — в таблице из них получалась
   гирлянда. Нейтральный по умолчанию, цвет только там, где он что-то значит. */
.badge{display:inline-block; padding:3px 9px; border-radius:100px; font-size:11px; font-weight:600; letter-spacing:.01em; border:1px solid var(--line-strong); color:var(--text-dim); background:var(--bg-panel-2);}
.badge.good{color:var(--good); border-color:var(--good); border-color:color-mix(in srgb, var(--good) 55%, transparent); background:rgba(110,231,183,.10); background:color-mix(in srgb, var(--good) 12%, transparent);}
.badge.bad{color:var(--bad); border-color:var(--bad); border-color:color-mix(in srgb, var(--bad) 55%, transparent); background:rgba(240,134,138,.10); background:color-mix(in srgb, var(--bad) 12%, transparent);}
.avatar{width:36px; height:36px; border-radius:50%; background:var(--brand-gradient); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; box-shadow:0 7px 18px rgba(75,44,219,.24),0 1px 0 rgba(255,255,255,.24) inset;}
a.nav-item{text-decoration:none;}
.empty-note{color:var(--text-faint); font-size:13.5px; padding:18px 0;}
.empty-state{text-align:center; display:flex; flex-direction:column; align-items:center; padding:32px 22px; border:1px dashed var(--line-strong); border-radius:var(--radius);}
.empty-state-icon{width:52px; height:52px; padding:13px; color:var(--accent); margin-bottom:14px; flex-shrink:0; border-radius:16px; background:var(--accent-dim); border:1px solid var(--line);}
.empty-state h3{font-family:'Poppins',sans-serif; color:var(--text); font-size:18px; font-weight:600; margin-bottom:8px;}
.empty-state p{max-width:560px; color:var(--text-dim); line-height:1.6;}

a:focus-visible, button:focus-visible, .input:focus-visible,
select:focus-visible, textarea:focus-visible, input:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px;}

.kpi-trend-bar{width:100%; max-width:46px; border-radius:6px 6px 2px 2px; background:var(--brand-gradient); box-shadow:0 0 14px rgba(122,40,201,.2); transform-origin:left bottom; animation:progress-reveal .8s cubic-bezier(.22,1,.36,1) .18s both;}
.kpi-trend-point:nth-child(2) .kpi-trend-bar{animation-delay:.24s;}
.kpi-trend-point:nth-child(3) .kpi-trend-bar{animation-delay:.30s;}
.kpi-trend-point:nth-child(4) .kpi-trend-bar{animation-delay:.36s;}
.kpi-trend-point:nth-child(5) .kpi-trend-bar{animation-delay:.42s;}
.kpi-trend-point:nth-child(6) .kpi-trend-bar{animation-delay:.48s;}
.kpi-trend-point:nth-child(n+7) .kpi-trend-bar{animation-delay:.54s;}

@keyframes page-fade-up{from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);}}
@keyframes card-fade-up{from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:translateY(0);}}
@keyframes nav-indicator-in{to{transform:translateY(-50%) scaleY(1);}}
@keyframes progress-reveal{from{transform:scaleX(0);} to{transform:scaleX(1);}}
@keyframes login-card-in{from{opacity:0; transform:translateY(18px) scale(.98);} to{opacity:1; transform:translateY(0) scale(1);}}
@keyframes orb-drift-one{from{transform:translate3d(-2%, -3%, 0) scale(1);} to{transform:translate3d(18%, 14%, 0) scale(1.08);}}
@keyframes orb-drift-two{from{transform:translate3d(3%, 4%, 0) scale(1.05);} to{transform:translate3d(-20%, -12%, 0) scale(.94);}}
@keyframes orb-drift-three{from{transform:translate3d(0, -6%, 0) scale(.94);} to{transform:translate3d(-14%, 20%, 0) scale(1.12);}}

/* --- Логотип NEWTON (img вместо текстовой подложки) --- */
/* Свечение под логотипом было почти в половину его яркости — знак «плыл».
   Оставляем лёгкую тень, сам фирменный круг и так достаточно яркий. */
img.brand-mark{
  width:40px; height:40px; border-radius:50%; flex-shrink:0; background:transparent;
  box-shadow:0 3px 12px rgba(123,42,201,0.22); display:block;
}
img.lg-mark{
  width:54px; height:54px; border-radius:50%; display:block; margin:0 auto 16px auto;
  background:transparent; box-shadow:0 5px 18px rgba(123,42,201,0.24);
}
[data-theme="light"] img.brand-mark,
[data-theme="light"] img.lg-mark{ box-shadow:0 3px 12px rgba(123,42,201,0.16); }

/* --- Navigation and data-heavy pages --- */
.sidebar-search{display:flex; align-items:center; margin:0 0 8px; border:1px solid var(--line); border-radius:9px; background:var(--bg-panel); overflow:hidden; flex-shrink:0;}
.sidebar-search:focus-within{border-color:var(--gold);}
.sidebar-search input{width:100%; min-width:0; border:0; outline:0; padding:8px 2px 8px 10px; background:transparent; color:var(--text); font:inherit; font-size:12.5px;}
.sidebar-search input::placeholder{color:var(--text-faint);}
.sidebar-search button{display:flex; align-items:center; justify-content:center; padding:8px 9px; border:0; background:transparent; color:var(--text-faint); cursor:pointer;}
.sidebar-search button:hover{color:var(--gold-light);}

.breadcrumbs{display:flex; align-items:center; gap:8px; min-width:0; margin-bottom:14px; color:var(--text-faint); font-size:12px;}
.breadcrumbs a{color:var(--gold-light); text-decoration:none;}
.breadcrumbs span:last-child{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.page-heading{display:flex; align-items:flex-start; justify-content:space-between; gap:22px;}
.page-heading > div{min-width:0;}
.page-heading > .btn-ghost{flex-shrink:0; margin-top:6px;}
.schedule-summary{margin-bottom:20px;}
.schedule-summary .eyebrow{margin-bottom:8px;}
.filter-panel{margin-bottom:18px;}
.filter-grid{display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:14px;}
.filter-grid label > span{display:block; margin-bottom:6px; color:var(--text-dim); font-size:12px;}
.filter-search{grid-column:span 2;}
.filter-actions{display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:18px;}
.filter-actions > div{display:flex; gap:9px; flex-wrap:wrap;}
.check-label{display:flex; align-items:center; gap:8px; color:var(--text-dim); font-size:13px; cursor:pointer;}
.check-label input{width:16px; height:16px; accent-color:var(--gold);}
.view-tabs{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px;}
.table-context{margin-bottom:12px; color:var(--text-faint); font-size:13px;}
.pagination{flex:none; display:flex; flex-direction:row; align-items:center; justify-content:center; gap:12px; margin-top:18px; color:var(--text-faint); font-size:13px;}
.field-hint{margin-top:5px; color:var(--text-faint); font-size:11.5px; line-height:1.45;}

/* --- Рост и оценка тренеров --- */
.growth-stat-grid{display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:16px;}
.growth-filter-grid{grid-template-columns:repeat(5,minmax(145px,1fr));}
.growth-filter-control{
  width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--line-strong); border-radius:9px;
  background:var(--bg-panel-2); color:var(--text); font:inherit; font-size:13px;
}
.growth-filter-control:focus{outline:none; border-color:var(--gold);}
.growth-check-control{
  min-height:42px; display:flex; align-items:center; gap:9px; padding:9px 11px;
  border:1px solid var(--line-strong); border-radius:9px; background:var(--bg-panel-2);
  color:var(--text-dim); font-size:12.5px; cursor:pointer;
}
.growth-check-control input{width:16px; height:16px; flex:0 0 16px; accent-color:var(--gold);}
.growth-list-card{padding:0;}
.growth-list-card .table-scroll{padding:10px 12px 14px;}
.growth-table{min-width:1780px;}
.growth-table th a{color:var(--text-faint); text-decoration:none;}
.growth-table th a:hover{color:var(--gold-light);}
.growth-subvalue{margin-top:3px; color:var(--text-faint); font-size:11px; white-space:nowrap;}
.rate-sparkline{display:block; width:104px; height:30px; color:var(--gold-light); overflow:visible;}
.growth-detail-chart{display:block; width:100%; height:120px; margin:4px 0 20px; color:var(--gold-light); overflow:visible;}
.growth-kpi-chart{display:block; width:100%; height:150px; margin:4px 0 18px; color:var(--good); overflow:visible;}
.growth-detail-grid{align-items:start;}
.growth-detail-grid > .card{min-width:0;}
.rate-mismatch-marker{margin-top:5px; color:var(--bad); font-size:11.5px; font-weight:700; white-space:nowrap;}
.two-rates-badge{margin-top:3px; color:var(--gold-light);}

@media(max-width:760px){
  .page-heading{display:block;}
  .page-heading > .btn-ghost{margin:-22px 0 30px;}
  .filter-grid{grid-template-columns:1fr;}
  .growth-stat-grid,.growth-filter-grid{grid-template-columns:1fr;}
  .filter-search{grid-column:auto;}
  .filter-actions{align-items:flex-start; flex-direction:column;}
  .pagination{justify-content:space-between; flex-wrap:wrap;}
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{animation:none!important; transition:none!important; scroll-behavior:auto!important;}
}
