/* =============================================================================
   ОрбИТа · web/css/orbita.css — оформление веб-интерфейса
   -----------------------------------------------------------------------------
   Темы: светлая («бумага и чернила») и тёмная («ночное небо»).
   Все цвета — переменные (токены). data-theme на <html>: light | dark | auto.
   Шрифты: Unbounded (заголовки, знак), Golos Text (текст), JetBrains Mono (коды).
   ============================================================================= */

:root, [data-theme="light"] {
  --bg: #F4F1EA; --bg-grain: rgba(20, 33, 61, .035);
  --surface: #FFFFFF; --surface-2: #FAF8F3; --surface-3: #F0ECE3;
  --ink: #14213D; --ink-2: #47506A; --muted: #868C9E; --line: #E2DDD1; --line-2: #D3CCBD;
  --accent: #E39B2D; --accent-soft: #FBEBD2; --accent-ink: #7A4706;
  --primary: #14213D; --primary-ink: #FFFFFF; --primary-hover: #22335C;
  --ok: #2E8A57; --ok-soft: #E2F2E8; --warn: #B8700C; --warn-soft: #FBEFD9;
  --danger: #B93A2E; --danger-soft: #F8E2DF; --info: #2D63AE; --info-soft: #E1EAF7;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .07);
  --shadow-lg: 0 24px 60px rgba(20, 33, 61, .18);
  --focus: 0 0 0 3px rgba(227, 155, 45, .35);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A0F1D; --bg-grain: rgba(255, 255, 255, .025);
  --surface: #111A2E; --surface-2: #16203A; --surface-3: #1C2846;
  --ink: #E8ECF5; --ink-2: #AFB7CD; --muted: #7A839C; --line: #233050; --line-2: #2E3D63;
  --accent: #F2B14C; --accent-soft: rgba(242, 177, 76, .14); --accent-ink: #F6C77E;
  --primary: #F2B14C; --primary-ink: #14213D; --primary-hover: #F7C36D;
  --ok: #4FC487; --ok-soft: rgba(79, 196, 135, .14); --warn: #F0A93A; --warn-soft: rgba(240, 169, 58, .14);
  --danger: #F07466; --danger-soft: rgba(240, 116, 102, .14); --info: #78A7F0; --info-soft: rgba(120, 167, 240, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
  --focus: 0 0 0 3px rgba(242, 177, 76, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0A0F1D; --bg-grain: rgba(255, 255, 255, .025);
    --surface: #111A2E; --surface-2: #16203A; --surface-3: #1C2846;
    --ink: #E8ECF5; --ink-2: #AFB7CD; --muted: #7A839C; --line: #233050; --line-2: #2E3D63;
    --accent: #F2B14C; --accent-soft: rgba(242, 177, 76, .14); --accent-ink: #F6C77E;
    --primary: #F2B14C; --primary-ink: #14213D; --primary-hover: #F7C36D;
    --ok: #4FC487; --ok-soft: rgba(79, 196, 135, .14); --warn: #F0A93A; --warn-soft: rgba(240, 169, 58, .14);
    --danger: #F07466; --danger-soft: rgba(240, 116, 102, .14); --info: #78A7F0; --info-soft: rgba(120, 167, 240, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
    --focus: 0 0 0 3px rgba(242, 177, 76, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Golos Text', 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  background-image: radial-gradient(var(--bg-grain) 1px, transparent 1px); background-size: 4px 4px;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3 { font-family: 'Unbounded', 'Golos Text', sans-serif; font-weight: 700; letter-spacing: -.01em; margin: 0; }
a { color: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.accent { background: var(--accent); color: #14213D; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--danger); }
.btn.wide { width: 100%; height: 48px; font-size: 16px; }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon { width: 18px; height: 18px; flex: none; }

/* ----------------------------------------------------------------- поля */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, input[type="text"], input[type="password"], input[type="email"], input[type="search"], select {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); background: var(--surface); }
.input-wrap { position: relative; }
.input-wrap .eye { position: absolute; right: 6px; top: 6px; height: 34px; width: 38px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; }
.input-wrap .eye:hover { color: var(--ink); background: var(--surface-3); }
.code-input { font-family: 'JetBrains Mono', monospace; font-size: 22px; letter-spacing: .12em; text-align: center; text-transform: uppercase; height: 58px !important; }
.hint { font-size: 13px; color: var(--muted); }
.error-box { display: none; padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 14px; margin-bottom: 14px; }
.error-box.show { display: block; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------------------------------------------------------- страница входа */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; color: #E8ECF5; padding: 48px 56px;
  background: radial-gradient(120% 90% at 80% 20%, #1B2C55 0%, #0E1730 55%, #070B17 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand .stars { position: absolute; inset: 0; background-image:
  radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent), radial-gradient(1px 1px at 72% 12%, #fff6 50%, transparent),
  radial-gradient(1.5px 1.5px at 38% 64%, #fff7 50%, transparent), radial-gradient(1px 1px at 86% 72%, #fff5 50%, transparent),
  radial-gradient(1px 1px at 24% 86%, #fff6 50%, transparent), radial-gradient(1.5px 1.5px at 60% 38%, #fff5 50%, transparent),
  radial-gradient(1px 1px at 92% 44%, #fff7 50%, transparent), radial-gradient(1px 1px at 6% 52%, #fff5 50%, transparent); }
/* Орбиты — по центру левой части и целиком: размер по меньшей стороне панели. */
.auth-brand .orbits { position: absolute; left: 50%; top: 42%; width: min(84%, 64vh); max-width: 760px; transform: translate(-50%, -50%); opacity: .95; pointer-events: none; }
.brand-top, .brand-bottom { position: relative; z-index: 1; }
.brand-mark { display: flex; align-items: center; gap: 12px; font-family: 'Unbounded'; font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.brand-title { font-family: 'Unbounded'; font-weight: 700; font-size: clamp(44px, 6vw, 84px); line-height: .95; letter-spacing: -.03em; margin: 0 0 18px; }
.brand-title em { font-style: normal; color: #F2B14C; }
.brand-lead { max-width: 30ch; font-size: 18px; color: #AFB7CD; margin: 0; }
.brand-org { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #C8CEDD; font-size: 14px; max-width: 46ch; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; position: relative; }
.auth-tools { position: absolute; top: 20px; right: 20px; }
.auth-card { width: 100%; max-width: 420px; animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.auth-card h2 { font-size: clamp(21px, 5.6vw, 26px); margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-2); margin: 0 0 26px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); padding: 4px; border-radius: 14px; margin-bottom: 26px; }
.tabs button { height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.welcome { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--accent-soft); margin-bottom: 22px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: 'Unbounded'; font-weight: 700; font-size: 16px; background: var(--primary); color: var(--primary-ink); }
.welcome b { display: block; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: -6px 0 8px; }
.strength i { height: 5px; border-radius: 3px; background: var(--line); transition: background .2s; }
.strength.s1 i:nth-child(-n+1) { background: var(--danger); }
.strength.s2 i:nth-child(-n+2) { background: var(--warn); }
.strength.s3 i:nth-child(-n+3) { background: var(--ok); }
.strength.s4 i { background: var(--ok); }
.rules { list-style: none; padding: 0; margin: 0 0 20px; font-size: 13.5px; color: var(--muted); display: grid; gap: 3px; }
.rules li::before { content: '○'; margin-right: 8px; }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { content: '●'; }
.demo-note { margin-top: 22px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: 13px; color: var(--ink-2); }
.demo-note code { font-family: 'JetBrains Mono'; color: var(--accent-ink); font-weight: 700; }
.link-btn { border: 0; background: none; padding: 0; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------------------------------------------------------------- оболочка */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr) 300px; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar .brand-mark { color: var(--ink); padding: 4px 10px 22px; font-size: 18px; }
.nav { display: grid; gap: 2px; overflow-y: auto; }
.nav h4 { margin: 18px 10px 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.on { background: var(--primary); color: var(--primary-ink); }
.nav a.soon { opacity: .55; pointer-events: none; }
.nav a { min-width: 0; }
.nav a > span:not(.tag) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.nav a .tag { flex: none; margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.menu-toggle { display: none; }
.content { padding: 26px 28px 60px; animation: rise .35s ease both; }
.rightcol { border-left: 1px solid var(--line); padding: 22px 18px; display: grid; align-content: start; gap: 16px; background: var(--surface-2); }
.clock { font-family: 'Unbounded'; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.clock-date { color: var(--ink-2); margin-top: -4px; text-transform: capitalize; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.panel h3 { font-size: 13px; font-family: 'Golos Text'; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13.5px; }
.feed li { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid var(--accent); }
.feed time { font-size: 12px; color: var(--muted); }

/* меню пользователя и переключатель темы */
.user-chip .name { white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.user-chip .avatar { width: 32px; height: 32px; font-size: 12px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 20; }
.dropdown.open .dropdown-menu { display: block; animation: rise .15s ease both; }
.dropdown-menu button, .dropdown-menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 10px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none; }
.dropdown-menu button:hover, .dropdown-menu a:hover { background: var(--surface-3); }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.theme-seg { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 3px; gap: 2px; }
.theme-seg button { width: 34px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.theme-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* --------------------------------------------------------------- карточки */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.mod-card { position: relative; overflow: hidden; display: grid; gap: 8px; min-height: 140px; }
.mod-card h3 { font-size: 16px; }
a.mod-card.live { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.mod-card.live:hover { border-color: var(--accent); transform: translateY(-2px); }
.mod-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.mod-card .badge { justify-self: start; }
.mod-card::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; border: 10px solid var(--accent-soft); }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.hero h2 { font-size: 28px; }
.hero p { margin: 6px 0 0; color: var(--ink-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.mute { background: var(--surface-3); color: var(--muted); }

/* ---------------------------------------------------------------- таблица */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 360px; }
.filters { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.filters button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.filters button.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: auto; box-shadow: var(--shadow); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--surface-2); }
table.t tr.sel td { background: var(--accent-soft); }
table.t .who { min-width: 190px; }
table.t .who b { display: block; font-weight: 600; }
table.t .chips .chip { white-space: nowrap; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
table.t .who span { font-size: 12.5px; color: var(--muted); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.selbar { position: sticky; bottom: 18px; margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); animation: rise .2s ease both; }
.selbar .btn { height: 38px; }
.selbar .grow { flex: 1; }

/* ------------------------------------------------------------ модальное окно */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(8, 12, 24, .55); backdrop-filter: blur(3px); animation: fade .15s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 26px; animation: rise .25s cubic-bezier(.2,.8,.2,1) both; }
.modal h2 { font-size: 20px; margin-bottom: 4px; }
.modal .sub { color: var(--ink-2); margin: 0 0 20px; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.role-list { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding: 2px; margin-bottom: 16px; }
.role-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.role-item:hover { border-color: var(--line-2); }
.role-item b { display: block; font-size: 14px; }
.role-item span { font-size: 12.5px; color: var(--muted); }
.check-line { display: flex; gap: 10px; align-items: center; margin: 4px 0 16px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); transition: .25s; font-weight: 500; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------- адаптивность */
@media (max-width: 1480px) { .layout { grid-template-columns: 250px minmax(0, 1fr); } .rightcol { display: none; } }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: 260px; padding: 28px 22px; }
  .auth-brand .orbits { width: min(100%, 340px); top: 50%; opacity: .55; }
  .brand-title { font-size: 44px; }
  .brand-org { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .layout.nav-open .sidebar { transform: none; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 60px; }
  .user-chip .name { display: none; }
  .modal .row { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

/* ================================================================ кадры (hr.js) */
textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; resize: vertical; }
textarea:focus, input[type="date"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type="date"] { height: 46px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; width: 100%; }
input[readonly] { background: var(--surface-2); }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 18px; overflow-x: auto; }
.subtabs button { height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.subtabs button:hover { color: var(--ink); }
.subtabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs .cnt { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.toolbar select { width: auto; min-width: 200px; height: 38px; }
table.t tr.clickable { cursor: pointer; }
table.t tr.off td { color: var(--muted); }
.chip.mute { opacity: .55; }
.warn-text { color: var(--warn); }
.btn.danger-bg { background: var(--danger); color: #fff; }
.modal.wide { max-width: 860px; }
.modal .foot.left { justify-content: flex-start; margin-top: 0; }
.modal .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-head .close-x { margin-left: auto; align-self: flex-start; font-size: 16px; }
.sec { padding: 16px 0 4px; border-top: 1px solid var(--line); margin-top: 12px; }
.sec h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 12px; font-family: 'Golos Text'; }
.sec .field { margin-bottom: 12px; }
.jobs { display: grid; gap: 8px; margin-bottom: 10px; }
.job { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.job.off { opacity: .6; }
.job .grow, .acc .grow, .role-row .grow { flex: 1; min-width: 200px; }
.job .muted { font-size: 13px; margin: 2px 0 4px; }
.job-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acc { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.roles { display: grid; gap: 6px; margin-bottom: 10px; }
.role-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.role-row b { display: block; font-size: 14px; font-weight: 600; }
.role-row span { font-size: 12.5px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline.wrap { flex-wrap: wrap; }
.inline > input[type="text"], .inline > select { flex: 1; min-width: 160px; height: 38px; }
.inline .mini { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.inline .mini input { height: 38px; width: 150px; }
.grant .inline > select { flex: 1 1 100%; }
.grant .inline > input[type="text"] { flex: 1 1 220px; }
.notice { padding: 14px; border-radius: 14px; background: var(--accent-soft); margin-bottom: 16px; display: grid; gap: 10px; font-size: 14px; }
.dup { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.dup > div { display: grid; gap: 2px; }
.dup span { font-size: 12.5px; }
.plan-sum { margin: 12px 0 10px; font-size: 14px; }
.plan-table { max-height: 300px; margin-bottom: 14px; box-shadow: none; }
.plan-table table.t td { padding: 8px 12px; }
@media (max-width: 900px) { .modal .row3 { grid-template-columns: 1fr; } .toolbar select { min-width: 0; width: 100%; } }

/* ======================================================== приём (admission.js) */
.adm-sum { display: flex; gap: 18px; flex-wrap: wrap; margin: -2px 0 12px; font-size: 14px; color: var(--ink-2); }
.adm-sum b { color: var(--ink); font-family: 'Unbounded'; font-size: 15px; }
.appform .sec.first { border-top: 0; margin-top: 0; padding-top: 4px; }
.appform .plan-hint { margin: -4px 0 0; }
.grades { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)) minmax(150px, 1.4fr) minmax(170px, 1.4fr); gap: 10px; align-items: end; }
.grades input[type="number"] { height: 46px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; width: 100%; }
.score-box { display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 16px; font-size: 13px; }
.score-box b { font-size: 16px; }
.mini-in { width: 90px !important; height: 32px !important; display: inline-block; padding: 0 8px !important; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
.checks.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.checks .check-line { margin: 4px 0; }
.check-line.strong { font-weight: 600; }
.modal .foot.sticky { position: sticky; bottom: -24px; background: var(--surface); padding: 12px 0 4px; margin-top: 14px; border-top: 1px solid var(--line); }
.card-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; font-size: 14px; }
.card-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.kv-grid section h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 14px 0 8px; font-family: 'Golos Text'; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; overflow-wrap: anywhere; }
.jr-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.jr-nav { display: grid; gap: 4px; position: sticky; top: 80px; }
.jr-nav button { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.jr-nav button span { font-size: 12.5px; color: var(--ink-2); }
.jr-nav button em { font-style: normal; font-size: 12px; color: var(--muted); }
.jr-nav button.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.jr-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.jr-head h3 { font-size: 16px; }
table.t.jr { font-size: 12.5px; min-width: 1500px; }
table.t.jr th { white-space: normal; font-size: 11px; letter-spacing: .02em; text-transform: none; vertical-align: top; min-width: 70px; cursor: help; }
table.t.jr td { vertical-align: top; padding: 8px 10px; }
.rt-block { margin-bottom: 14px; }
.rt-block h3 { font-size: 16px; margin-bottom: 10px; }
.rt-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.rt-lists h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
table.t.rt td { padding: 7px 10px; }
table.t.rt tr.in td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
table.t.rt tr.cut td { border-bottom: 2px solid var(--ok); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.tile span { font-size: 13px; color: var(--muted); }
.tile b { font-family: 'Unbounded'; font-size: 26px; letter-spacing: -.02em; }
.tile em { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.bars { display: flex; gap: 6px; align-items: flex-end; height: 140px; overflow-x: auto; padding-bottom: 20px; }
.bar { flex: 0 0 26px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.bar i { display: block; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
table.t.st td, table.t.st th { padding: 8px 10px; }
table.t.st td.lack { color: var(--danger); font-weight: 700; }
table.t.st tr.tot td { font-weight: 700; background: var(--surface-2); }
.res-card { margin-bottom: 14px; }
.res-card h3 { font-size: 16px; }
.res-card .muted { font-size: 14px; margin: 4px 0 0; }
.res-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.res-head > div { flex: 1; min-width: 260px; }
.res-link { margin-top: 10px; }
.groups { display: grid; gap: 6px; margin-top: 12px; }
details.grp { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
details.grp summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; cursor: pointer; }
details.grp summary > span:not(.badge) { color: var(--ink-2); font-size: 14px; flex: 1; }
details.grp summary em { font-style: normal; font-size: 13px; color: var(--muted); }
details.grp ol { margin: 8px 0 4px; columns: 2; font-size: 14px; }
.legacy { margin-top: 10px; }
@media (max-width: 900px) {
  .grades { grid-template-columns: repeat(2, 1fr); }
  .checks.two, .kv-grid { grid-template-columns: 1fr; }
  .jr-layout { grid-template-columns: 1fr; }
  .jr-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  details.grp ol { columns: 1; }
  .kv { grid-template-columns: 120px 1fr; }
}
/* печать журнала регистрации — альбомный лист (именованная страница) */
.jr-print { page: journal; font-family: 'Golos Text', Arial, sans-serif; color: #000; }
.jr-print h3 { font-size: 12pt; margin: 0 0 4mm; text-align: center; }
.jr-print table { width: 100%; border-collapse: collapse; font-size: 7.5pt; }
.jr-print th, .jr-print td { border: 1px solid #000; padding: 1mm 1.2mm; vertical-align: top; text-align: left; }
.jr-print th { font-weight: 600; font-size: 6.5pt; }
.jr-print thead tr:last-child th { text-align: center; font-size: 7pt; }
@page journal { size: A4 landscape; margin: 10mm; }

/* ================================================= учебная часть (academic.js) */
table.t td.sel { width: 36px; }
.modal.xwide { max-width: 1080px; }
.adm-ord .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .adm-ord .row3 { grid-template-columns: 1fr; } }
table.t.compact th { padding: 10px 10px; }
table.t.compact td { padding: 8px 10px; font-size: 14px; }
table.t.compact .who { min-width: 0; }
table.t.compact .who b { white-space: nowrap; }
details.grp summary input[type="checkbox"] { width: 18px; height: 18px; }
.plan-table tr.on td { background: var(--accent-soft); }
/* печать списка группы — А4 книжная (именованная страница) */
.ls-print { page: list; font-family: 'Golos Text', Arial, sans-serif; color: #000; font-size: 10.5pt; }
.ls-print h3 { font-size: 13pt; margin: 0 0 2mm; text-align: center; }
.ls-print p { margin: 0 0 4mm; text-align: center; line-height: 1.35; }
.ls-print p.foot { text-align: right; margin-top: 3mm; font-size: 9pt; }
.ls-print table { width: 100%; border-collapse: collapse; }
.ls-print th, .ls-print td { border: 1px solid #000; padding: 1.2mm 1.6mm; vertical-align: top; text-align: left; }
.ls-print th { font-weight: 600; font-size: 9pt; text-align: center; }
@page list { size: A4 portrait; margin: 15mm 12mm; }

/* ============================================== учебный процесс (study.js) */
.plan-ed { max-height: 62vh; overflow: auto; }
.plan-ed table.t td { padding: 4px 6px; }
.plan-ed .pc { height: 30px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.plan-ed tr.pl-head td { background: var(--surface-2); }
.plan-ed tr.pl-head .pc { font-weight: 700; }
table.t tr.tot td { font-weight: 600; background: var(--surface-2); }
table.t td.lack { color: var(--danger); font-weight: 700; }
.palette { display: flex; flex-wrap: wrap; gap: 4px; }
.palette button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.palette button.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.palette i, .legend i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); font-weight: 700; font-size: 12px; color: #14213D; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.cal-wrap { overflow: auto; }
table.cal { border-collapse: separate; border-spacing: 0; font-size: 12px; user-select: none; }
table.cal th, table.cal td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; padding: 0; }
table.cal th.rl { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; padding: 4px 10px; min-width: 150px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
table.cal th.mo { background: var(--surface-2); font-weight: 600; color: var(--ink-2); padding: 4px 0; text-transform: none; }
table.cal th.wn { width: 24px; min-width: 24px; height: 24px; font-weight: 500; color: var(--muted); background: var(--surface-2); }
table.cal td.wk { width: 24px; min-width: 24px; height: 28px; font-weight: 700; color: #14213D; cursor: crosshair; }
table.cal td.wk.s2, table.cal th.wn.s2 { border-left: 2px solid var(--ink-2); }
table.cal td.cs, table.cal th.cs { min-width: 34px; padding: 0 4px; background: var(--surface-2); color: var(--ink-2); }
table.cal tr.sep th { background: var(--bg); text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; color: var(--muted); padding: 10px 10px 4px; }
table.cal tr.dirty th.rl { box-shadow: inset 3px 0 0 var(--accent); }
table.cal .cg { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
table.t.hours .hi { width: 100px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================================================== печать приглашений */
.print-page { padding: 24px; }
.print-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.print-tools .grow { flex: 1; }
.sheet {
  width: 210mm; min-height: 297mm; margin: 0 auto 24px; padding: 8mm; background: #fff; color: #14213D;
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 93.6mm; box-shadow: var(--shadow-lg);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.inv {
  position: relative; border: 1px dashed #B9B2A2; padding: 5mm 5.5mm 4.5mm; display: grid;
  grid-template-rows: auto auto 1fr auto; gap: 2.4mm; overflow: hidden; font-family: 'Golos Text', sans-serif;
}
.inv::before { content: '✂'; position: absolute; top: -3.2mm; left: 4mm; font-size: 11px; color: #B9B2A2; background: #fff; padding: 0 1mm; }
.inv-head { display: flex; align-items: center; gap: 2.5mm; font-size: 8.5pt; color: #47506A; }
.inv-head .mk { font-family: 'Unbounded'; font-weight: 700; font-size: 10pt; color: #14213D; }
.inv-head .org { margin-left: auto; text-align: right; max-width: 52mm; line-height: 1.2; }
.inv-title { font-family: 'Unbounded'; font-weight: 700; font-size: 8pt; letter-spacing: .12em; text-transform: uppercase; color: #B8700C; }
.inv-name { font-size: 13pt; font-weight: 700; line-height: 1.15; margin-top: .5mm; }
.inv-roles { font-size: 8pt; color: #47506A; margin-top: .6mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-body { display: grid; grid-template-columns: 30mm 1fr; gap: 4mm; align-items: center; }
.inv-qr { width: 30mm; height: 30mm; padding: 1.2mm; border-radius: 2.5mm; background: #fff; border: 1px solid #E2DDD1; }
.inv-qr svg { width: 100%; height: 100%; display: block; }
.inv-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 1.4mm; font-size: 8.4pt; line-height: 1.25; }
.inv-steps b { font-family: 'JetBrains Mono', monospace; font-weight: 700; word-break: break-all; }
.inv-steps li { counter-increment: s; display: grid; grid-template-columns: 4.6mm 1fr; gap: 1.6mm; }
.inv-steps li::before { content: counter(s); width: 4.6mm; height: 4.6mm; border-radius: 50%; background: #14213D; color: #fff; font-size: 7pt; font-weight: 700; display: grid; place-items: center; }
.inv-foot { display: grid; grid-template-columns: 1.4fr 1fr .85fr; gap: 1.2mm 4mm; padding-top: 2.2mm; border-top: 1px solid #E2DDD1; font-size: 7.6pt; color: #47506A; }
.inv-foot b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10pt; color: #14213D; letter-spacing: .03em; }
.inv-foot .code b { font-size: 10.5pt; color: #7A4706; white-space: nowrap; }
.inv-orbit { position: absolute; right: -16mm; bottom: -18mm; width: 46mm; height: 46mm; border-radius: 50%; border: 1.6mm solid #FBEBD2; pointer-events: none; }

#print-root { display: none; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { background: #fff !important; background-image: none !important; }
  #app, #toast, .overlay { display: none !important; }
  #print-root { display: block; }
  .sheet { margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
}

/* ---------------------------------------------------------- документооборот */
.nav a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.nav a .count.over { background: var(--danger); }
.tk-h { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 20px 0 8px; font-family: 'Golos Text'; }
table.t tr.over td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.doc-title { font-size: 16px; font-weight: 600; margin: 4px 0 12px; line-height: 1.4; }
.mytasks { display: grid; gap: 10px; margin-bottom: 14px; }
.mytask { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent); background: var(--accent-soft); font-size: 14px; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files li { display: grid; gap: 2px; font-size: 14px; }
.files a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.files .icon { width: 16px; height: 16px; }
.files span { font-size: 12.5px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.pick-row select { width: 100%; }
.chips.pk { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips.pk a { color: inherit; text-decoration: none; margin-left: 4px; }
.feed li a { color: var(--ink); text-decoration: none; }
.feed li a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- расписание */
.ok-text { color: var(--ok); } .danger-text { color: var(--danger); }
.sc-bar { gap: 8px; }
.sc-bar .sc-more { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.sc-wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.sc-cards { position: sticky; top: 8px; max-height: calc(100vh - 150px); overflow: auto; padding-right: 4px; }
.sc-cards .search { width: 100%; margin-bottom: 6px; }
.sc-cards h4 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sc-card { border: 1px solid var(--line); border-left: 4px solid hsl(var(--h) 60% 55%); border-radius: 10px; padding: 7px 9px; margin-bottom: 6px; background: var(--surface); cursor: pointer; display: grid; gap: 1px; font-size: 12.5px; }
.sc-card b { font-size: 13px; } .sc-card span { color: var(--ink-2); } .sc-card em { font-style: normal; font-weight: 600; color: var(--accent-ink); } .sc-card small { color: var(--muted); }
.sc-card:hover { border-color: var(--line-2); } .sc-card.on { outline: 2px solid var(--accent); background: var(--accent-soft); }
.sc-card.done { opacity: .6; } .sc-card.over em { color: var(--warn); }
.sc-main { min-width: 0; }
.sc-mode { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; font-size: 13.5px; }
.sc-mode select { height: 34px; width: auto; }
.sc-why { flex-basis: 100%; min-height: 18px; font-size: 12.5px; color: var(--ink-2); }
.sc-scroll { overflow: auto; max-height: calc(100vh - 210px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.sc-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.sc-grid th, .sc-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sc-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); padding: 6px 4px; min-width: 112px; font-weight: 700; }
.sc-grid thead .sc-corner { left: 0; z-index: 4; min-width: 0; }
.sc-grid .sc-day { position: sticky; left: 0; z-index: 2; background: var(--surface-2); width: 26px; min-width: 26px; padding: 0; }
.sc-grid .sc-day span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; display: block; margin: auto; }
.sc-grid .sc-pair { position: sticky; left: 26px; z-index: 2; background: var(--surface-2); width: 58px; min-width: 58px; font-weight: 700; padding: 2px 4px; text-align: center; }
.sc-grid .sc-pair small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.sc-grid tr.dstart > * { border-top: 2px solid var(--line-2); }
.sc-cell { vertical-align: top; padding: 2px; height: 42px; min-width: 112px; max-width: 150px; }
.sc-cell.c-ok { background: color-mix(in srgb, var(--ok) 16%, transparent); cursor: copy; }
.sc-cell.c-warn { background: color-mix(in srgb, var(--warn) 20%, transparent); cursor: copy; }
.sc-cell.c-block { background: color-mix(in srgb, var(--danger) 13%, transparent); cursor: not-allowed; }
.sc-cell.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.sc-cell.flash { animation: scflash 1.2s 2; }
@keyframes scflash { 50% { background: var(--danger-soft); } }
.ls { background: color-mix(in srgb, hsl(var(--h) 65% 55%) 20%, var(--surface)); border-left: 3px solid hsl(var(--h) 60% 50%); border-radius: 6px; padding: 2px 5px; margin-bottom: 2px; cursor: pointer; display: grid; line-height: 1.25; }
.ls b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.ls i { font-style: normal; font-weight: 700; color: var(--accent-ink); margin-right: 4px; }
.ls.faded { opacity: .45; }
table.av-grid td.av { cursor: pointer; text-align: center; color: var(--ok); font-size: 13px; user-select: none; }
table.av-grid td.av.bad { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
table.av-grid td.av.no { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
table.my-grid td { vertical-align: top; min-width: 130px; }
tr.mute td { opacity: .55; }
@media (max-width: 900px) { .sc-wrap { grid-template-columns: 1fr; } .sc-cards { position: static; max-height: 260px; } .sc-bar .sc-more { margin-left: 0; } }

/* ------------------------------------------------------- автоподбор и замены */
.btn.accent { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.ls.ghost { border: 1.5px dashed var(--accent); border-left-width: 3px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.ls.sb { cursor: pointer; }
.ls.sb em { font-style: normal; font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls.ch-replace { border-left-color: #E08A00; background: color-mix(in srgb, #F2A33A 24%, var(--surface)); } .ls.ch-replace em { color: #B86A00; }
.ls.ch-room { border-left-color: var(--info); background: color-mix(in srgb, var(--info) 18%, var(--surface)); } .ls.ch-room em { color: var(--info); }
.ls.ch-swap { border-left-color: #8E5BD8; background: color-mix(in srgb, #8E5BD8 18%, var(--surface)); } .ls.ch-swap em { color: #7A45C7; }
.ls.ch-in, .ls.ch-add { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, var(--surface)); } .ls.ch-in em, .ls.ch-add em { color: var(--ok); }
.ls.ch-cancel, .ls.ch-move, .ls.ch-merge { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.ls.ch-cancel b, .ls.ch-move b, .ls.ch-merge b { text-decoration: line-through; color: var(--muted); } .ls.ch-cancel em, .ls.ch-move em, .ls.ch-merge em { color: var(--danger); }
.ls.need { outline: 2px solid var(--danger); outline-offset: -2px; } .ls.need em { color: var(--danger); }
.ls.draft { border-style: dashed; border-width: 1.5px; border-left-width: 3px; }
.sb-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sb-legend .ls { display: inline-block; font-size: 11.5px; padding: 2px 8px; cursor: default; margin: 0; }
.sb-grid td.sc-cell { min-width: 132px; max-width: 170px; height: 48px; }
.sb-grid thead .sc-corner { position: sticky; left: 0; } .sb-grid .sc-pair { left: 0; }
.sb-inc { border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: 10px; padding: 7px 9px; margin-bottom: 6px; background: var(--surface); display: grid; gap: 2px; font-size: 12.5px; }
.sb-inc span { color: var(--ink-2); } .sb-inc a { font-size: 12px; justify-self: start; }
.sc-card.need-card { border-left-color: var(--danger); }
.my-ch li span b.warn-text, .my-ch li span b.danger-text { font-weight: 700; }

/* ------------------------------------------------------------- Успеваемость */
.j-head { align-items: center; }
.j-save { font-size: 12.5px; min-width: 100px; }
.j-hint { font-size: 13px; margin: 0 0 10px; }
.j-scroll { overflow: auto; max-height: calc(100vh - 250px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.j-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.j-grid th, .j-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: center; height: 30px; }
.j-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-weight: 700; padding: 4px 2px; font-size: 12px; line-height: 1.15; }
.j-grid thead th small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }
.j-grid .j-n { position: sticky; left: 0; z-index: 2; background: var(--surface-2); width: 30px; min-width: 30px; color: var(--muted); font-size: 12px; }
.j-grid .j-fio { position: sticky; left: 30px; z-index: 2; background: var(--surface); text-align: left; padding: 0 8px; min-width: 190px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 2px 0 0 var(--line-2); }
.j-grid thead .j-n, .j-grid thead .j-fio { z-index: 4; background: var(--surface-2); }
.j-grid .j-col { min-width: 44px; width: 44px; cursor: pointer; }
.j-grid th.j-col:hover { background: var(--accent-soft); }
.j-grid th.j-col.today { background: var(--accent-soft); color: var(--accent-ink); }
.j-grid th.j-col.chg { box-shadow: inset 0 -3px 0 var(--info); }
.j-grid th.j-col.extra, .j-grid td.extra { background: var(--surface-3); }
.j-grid .fut { color: var(--muted); }
.j-grid td.fut { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-3) 6px 7px); }
.j-grid td.j-cell { min-width: 44px; cursor: default; white-space: nowrap; font-size: 13.5px; }
.j-grid td.ed { cursor: cell; }
.j-grid td.ed:hover { background: var(--accent-soft); }
.j-grid .j-sum { min-width: 46px; background: var(--surface-2); font-size: 12.5px; }
.j-grid .j-fin { min-width: 54px; background: var(--info-soft); }
.j-grid tbody tr:hover td.j-fio, .j-grid tbody tr:hover td.j-cell:not(.extra):not(.fut) { background: var(--surface-2); }
.j-grid.sum .j-col { cursor: default; width: auto; min-width: 58px; }
.j-grid b.m5 { color: var(--ok); } .j-grid b.m4 { color: var(--info); } .j-grid b.m3 { color: var(--warn); } .j-grid b.m2 { color: var(--danger); }
.j-grid i.ab { font-style: normal; font-weight: 700; color: var(--danger); margin-right: 1px; text-transform: uppercase; font-size: 12px; }
.j-in { width: 100%; height: 28px; border: 0; outline: 2px solid var(--accent); outline-offset: -2px; text-align: center; font: inherit; font-weight: 700; background: var(--surface); color: var(--ink); padding: 0; }
table.t tr.mute td { color: var(--muted); }
table.t tr.sec-row td { background: var(--surface-2); }
.ktp-t input { width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
@media (max-width: 720px) { .j-grid .j-fio { min-width: 130px; max-width: 140px; } .j-scroll { max-height: none; } }

/* ------------------------------------------------------------- Уведомления */
ol.steps { margin: 6px 0 14px; padding-left: 22px; line-height: 1.55; }
ol.steps li { margin-bottom: 6px; }
.warn-card { background: var(--warn-soft); border-color: transparent; margin-bottom: 14px; }
.tg-preview { margin: 12px 0 4px; }
.tg-msg { background: var(--info-soft); color: var(--ink); border-radius: 14px 14px 14px 4px; padding: 10px 14px; max-width: 420px; font-size: 14px; line-height: 1.45; }

/* ---------------------------------------------------------------- библиотека */
.lib-desk { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .lib-desk { grid-template-columns: minmax(0, 1fr); } }
.lib-desk > .card { min-width: 0; }
.lib-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 12px; }
.lib-h .icon { width: 18px; height: 18px; }
.lib-scan { width: 100%; height: 46px; font-size: 16px; }
.lib-readers { display: grid; gap: 6px; margin-top: 10px; max-height: 320px; overflow: auto; }
.lib-reader { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.lib-reader:hover { border-color: var(--accent); }
.lib-reader span { font-size: 13px; color: var(--muted); }
.lib-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.lib-form-head { display: flex; gap: 8px; align-items: flex-start; }
.lib-form-head > div { flex: 1; }
.lib-issue { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.lib-issue .lib-scan { flex: 1; min-width: 220px; width: auto; }
.lib-log li { display: block; }
.lib-tile { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.lib-in { height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
table.lib-rows td { padding: 6px; }

/* наклейки 70×37 мм (24 на А4) и читательские билеты 85×55 мм (10 на А4) */
.lb-sheet { width: 210mm; height: 297mm; padding: 0; display: grid; grid-template-columns: repeat(3, 70mm); grid-auto-rows: 37.125mm; background: #fff; color: #000; page-break-after: always; break-after: page; }
.lb-sheet:last-child, .rc-sheet:last-child { page-break-after: auto; break-after: auto; }
.lb { display: grid; grid-template-columns: 25mm 1fr; gap: 2.5mm; align-items: center; padding: 3mm 3.5mm; overflow: hidden; font-family: 'Golos Text', Arial, sans-serif; }
.lb-qr { width: 25mm; height: 25mm; }
.lb-qr svg { width: 100%; height: 100%; display: block; }
.lb-t { display: grid; gap: 1mm; min-width: 0; }
.lb-org { font-size: 6.5pt; color: #444; line-height: 1.15; }
.lb-n { font-family: 'JetBrains Mono', monospace; font-size: 13pt; letter-spacing: .02em; }
.lb-b { font-size: 7.5pt; line-height: 1.2; max-height: 3.6em; overflow: hidden; }
.rc-sheet { width: 210mm; padding: 10mm 15mm; display: grid; grid-template-columns: repeat(2, 85mm); grid-auto-rows: 55mm; gap: 0 10mm; background: #fff; color: #000; page-break-after: always; break-after: page; }
.rc { border: 1px dashed #999; padding: 4mm 5mm; display: grid; grid-template-rows: auto 1fr; gap: 3mm; font-family: 'Golos Text', Arial, sans-serif; overflow: hidden; }
.rc-head { display: grid; gap: .5mm; border-bottom: 1px solid #ccc; padding-bottom: 2mm; }
.rc-head b { font-family: 'Unbounded', sans-serif; font-size: 8pt; letter-spacing: .1em; }
.rc-head span { font-size: 7pt; color: #444; }
.rc-body { display: grid; grid-template-columns: 25mm 1fr; gap: 4mm; align-items: center; }
.rc-body > div:last-child { display: grid; gap: 1.5mm; font-size: 8.5pt; }
.rc-name { font-size: 11pt; line-height: 1.2; }
.rc-n { font-family: 'JetBrains Mono', monospace; font-size: 9pt; }
.lib-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.lib-acts .btn.sm { height: 30px; padding: 0 10px; }

/* ------------------------------------------- кадры: личное дело и приказы */
.pf-sec { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.pf-sec summary { cursor: pointer; font-weight: 600; }
.pf-sec[open] summary { margin-bottom: 10px; }
.pf-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; }
.hd-print { page: list; font-family: 'Times New Roman', 'Golos Text', serif; color: #000; font-size: 11pt; line-height: 1.3; page-break-after: always; break-after: page; }
.hd-print:last-child { page-break-after: auto; break-after: auto; }
.hd-okud { text-align: right; font-size: 8pt; }
.hd-org { text-align: center; border-bottom: 1px solid #000; padding-bottom: 1mm; margin: 2mm 0 0; }
.hd-org::after { content: '(наименование организации)'; display: block; font-size: 7pt; }
.hd-print h3 { text-align: center; font-size: 13pt; margin: 5mm 0 4mm; }
.hd-print h3 small { font-weight: normal; font-size: 9pt; }
.hd-print h4 { font-size: 11pt; margin: 4mm 0 1.5mm; }
.hd-num { margin: 4mm 0 0 auto; border-collapse: collapse; }
.hd-num th, .hd-num td { border: 1px solid #000; padding: 1mm 3mm; font-size: 9pt; text-align: center; }
.hd-num td { font-weight: bold; font-size: 11pt; }
.hd-kv { width: 100%; border-collapse: collapse; margin: 2mm 0; }
.hd-kv th { width: 38%; text-align: left; font-weight: normal; font-size: 9pt; padding: 1.2mm 2mm 1.2mm 0; vertical-align: top; }
.hd-kv td { border-bottom: 1px solid #000; padding: 1.2mm 2mm; vertical-align: bottom; }
.hd-grid { width: 100%; border-collapse: collapse; margin: 2mm 0; }
.hd-grid th, .hd-grid td { border: 1px solid #000; padding: 1.2mm 1.6mm; font-size: 9.5pt; text-align: left; }
.hd-grid th { font-weight: 600; text-align: center; }
.hd-sign { margin-top: 8mm; }
.hd-cover { text-align: center; padding-top: 50mm; }
.hd-cover h1 { font-size: 24pt; margin: 30mm 0 8mm; }
.hd-cover h2 { font-size: 18pt; margin: 0 0 6mm; }
.hd-dates { text-align: left; margin: 60mm 0 0 100mm; line-height: 1.8; }
