*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  transition: background var(--t-med) var(--e-out), color var(--t-med) var(--e-out);
}

img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 36;
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.08;
}

.display { font-size: clamp(34px, 5vw, 60px); line-height: .98; letter-spacing: -.03em; }
.eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); background-clip: content-box; }

::selection { background: var(--light-marker); color: #3A1C0B; }

#gl {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

.logo-mark .by-flag { fill: var(--brand); transition: fill var(--t-med) var(--e-out); }
.logo-mark .by-word { fill: var(--by-white); }
.logo-mark.is-mono .by-flag { fill: currentColor; }
.logo-mark.is-mono .by-word { fill: var(--ground); }

/* ---------- shell ---------- */

#app { position: relative; z-index: 1; height: 100%; }

.screen { position: absolute; inset: 0; }

.auth {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  height: 100%;
  overflow: hidden;
}
.auth__stage { position: relative; overflow: hidden; background: var(--surface); }
.auth__stage canvas { display: block; width: 100%; height: 100%; }
.auth__tagline {
  position: absolute;
  left: 56px; bottom: 54px; right: 56px;
  pointer-events: none;
}
.auth__tagline h2 { font-size: clamp(32px, 3.6vw, 52px); color: var(--ink); line-height: .98; }
.auth__tagline p { color: var(--ink-3); max-width: 38ch; margin: 14px 0 0; }
.auth__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  overflow-y: auto;
  background: var(--ground);
  border-left: 1px solid var(--line);
}
.auth__panel > * { max-width: 460px; width: 100%; }
.auth__logo { width: 136px; height: auto; margin-bottom: 34px; }
.profile-list { display: grid; gap: 10px; margin: 26px 0 0; }
.profile {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  text-align: left;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.profile__av {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: .02em;
  background: var(--brand-soft); color: var(--brand);
}
.profile__name { font-weight: 650; display: block; }
.profile__role { font-size: 12.5px; color: var(--ink-3); display: block; }
.profile__go { color: var(--ink-3); display: grid; place-items: center; }

.shell {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  height: 100%;
  transition: grid-template-columns var(--t-med) var(--e-out);
}
.shell.is-mini { grid-template-columns: var(--rail-mini) 1fr; }

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px 14px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.rail__top { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.rail__logo { width: 78px; height: auto; flex: none; transition: width var(--t-med) var(--e-out); }
.shell.is-mini .rail__logo { width: 44px; }
.rail__collapse {
  margin-left: auto; width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center; color: var(--ink-3);
  transition: background var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.rail__collapse:hover { background: var(--brand-soft); color: var(--brand); }
.shell.is-mini .rail__collapse { display: none; }

.rail__scroll { overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -6px; padding: 0 6px; position: relative; }
.rail__group { padding: 14px 10px 6px; }
.shell.is-mini .rail__group { opacity: 0; height: 10px; padding: 0; overflow: hidden; }

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-weight: 560;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  z-index: 1;
  will-change: transform;
}
.nav-item svg { width: 19px; height: 19px; stroke-width: 1.7; }
.nav-item__label { overflow: hidden; }
.shell.is-mini .nav-item { grid-template-columns: 22px; justify-content: center; padding: 10px; }
.shell.is-mini .nav-item__label, .shell.is-mini .nav-item__badge { display: none; }
.nav-item__badge {
  font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 99px; display: grid; place-items: center;
  background: var(--danger); color: #fff;
}
.nav-item.is-active { color: var(--brand); }
.nav-item.is-locked { opacity: .36; cursor: not-allowed; }
.nav-pill {
  position: absolute;
  left: 6px; right: 6px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-soft-2);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  will-change: transform;
}
.shell.is-mini .nav-pill { left: 6px; right: 6px; }

.rail__foot { padding: 12px 8px 2px; border-top: 1px solid var(--line); margin-top: 8px; }
.rail__user { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 6px; border-radius: var(--r-sm); text-align: left; }
.rail__user:hover { background: var(--brand-soft); }
.shell.is-mini .rail__user { grid-template-columns: 34px; }
.shell.is-mini .rail__user > :not(.profile__av) { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  height: var(--topbar);
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(18px, 3vw, 38px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ground) 76%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  z-index: 20;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.crumbs b { color: var(--ink); font-weight: 650; }
.topbar__spacer { flex: 1; }

.kbd-search {
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 12px 0 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink-3);
  font-size: 13px;
  min-width: 212px;
  transition: border-color var(--t-fast) var(--e-out), box-shadow var(--t-fast) var(--e-out);
}
.kbd-search:hover { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.kbd-search kbd {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-3);
  margin-left: auto;
}

.icon-btn {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--ink-2);
  position: relative;
  transition: background var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn__dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 99px; background: var(--danger);
  box-shadow: 0 0 0 2px var(--ground);
}

.view-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; }
.view {
  padding: clamp(22px, 3vw, 40px) clamp(18px, 3vw, 40px) 96px;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}
.view-head { margin-bottom: 26px; display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.view-head h1 { font-size: clamp(27px, 3.2vw, 40px); }
.view-head p { margin: 8px 0 0; color: var(--ink-3); max-width: 70ch; }
.view-head__actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- primitives ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-pill);
  font-weight: 650; font-size: 14px;
  background: var(--surface-raised);
  color: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  will-change: transform;
  transition: border-color var(--t-fast) var(--e-out), background var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { border-color: var(--line-strong); }
.btn--primary {
  background: var(--grad-orange);
  color: #FFFFF0;
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover { border-color: transparent; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn--sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.ripple {
  position: absolute; border-radius: 99px; pointer-events: none;
  background: currentColor; opacity: .22; transform: scale(0);
}
.btn--primary .ripple { background: #FFFFF0; }

.card {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
  will-change: transform;
  transition: box-shadow var(--t-med) var(--e-out), border-color var(--t-med) var(--e-out);
}
.card--flat { box-shadow: none; background: var(--surface); }
.card--pad0 { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card__head h3 { font-size: 17px; }
.card__head .btn { margin-left: auto; }
.card.is-hoverable:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }

.grid { display: grid; gap: var(--gutter); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stack { display: grid; gap: var(--gutter); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.kpi { padding: 18px 20px 16px; overflow: hidden; }
.kpi__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kpi__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.kpi__icon svg { width: 17px; height: 17px; }
.kpi__label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.kpi__value { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -.028em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi__foot { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 12.5px; color: var(--ink-3); }
.kpi__spark { position: absolute; right: 0; bottom: 0; left: 0; height: 44px; opacity: .38; pointer-events: none; }

.trend { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 25px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 650;
  background: var(--surface-2); color: var(--ink-2);
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }
.chip--info { background: var(--info-soft); color: var(--info); }
.chip--brand { background: var(--brand-soft); color: var(--brand); }
.chip--accent { background: var(--accent-soft); color: #9B4FBC; }
:root[data-theme="dark"] .chip--accent { color: var(--accent); }
.chip--dot::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }

.seg {
  display: inline-flex; position: relative;
  padding: 3px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
}
.seg__thumb {
  position: absolute; top: 3px; left: 3px; height: calc(100% - 6px);
  border-radius: var(--r-pill); background: var(--surface-raised);
  box-shadow: var(--shadow-1); z-index: 0; will-change: transform, width;
}
.seg button {
  position: relative; z-index: 1;
  height: 30px; padding: 0 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 620; color: var(--ink-3);
  transition: color var(--t-fast) var(--e-out);
  white-space: nowrap;
}
.seg button.is-active { color: var(--brand); }

.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 640; color: var(--ink-3); }
.input, .select {
  height: 40px; padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  outline: none;
  width: 100%;
  transition: border-color var(--t-fast) var(--e-out), box-shadow var(--t-fast) var(--e-out);
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.select { appearance: none; cursor: pointer; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.switch { width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background var(--t-med) var(--e-out); }
.switch.is-on { background: var(--brand); }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: #fff; box-shadow: var(--shadow-1); will-change: transform; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface-raised); z-index: 2;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { position: relative; will-change: transform; }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand); transform: scaleY(0); transform-origin: center;
  transition: transform var(--t-med) var(--e-spring);
}
.table tbody tr:hover::after { transform: scaleY(1); }
.table tbody tr:hover { background: var(--brand-soft); }
.table tbody tr:last-child td { border-bottom: 0; }

.avatar {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800;
  background: var(--brand-soft); color: var(--brand);
}
.avatar--lg { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; }
.avatar--sm { width: 26px; height: 26px; border-radius: 9px; font-size: 10.5px; }
.person-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-cell b { font-weight: 640; display: block; }
.person-cell span { font-size: 12.5px; color: var(--ink-3); }

.bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad-orange); width: 0; will-change: width; }

.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--surface-2); }
.ring__fill { fill: none; stroke: var(--brand); stroke-linecap: round; }
.ring__center { position: absolute; display: grid; place-items: center; text-align: center; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty svg { width: 42px; height: 42px; opacity: .4; margin-bottom: 12px; }

.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(26, 12, 4, .34);
  backdrop-filter: blur(5px);
  opacity: 0;
}

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(560px, 94vw);
  background: var(--ground);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  will-change: transform;
}
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 22px; }

.modal {
  position: fixed; z-index: 61; top: 50%; left: 50%;
  width: min(640px, 94vw); max-height: 86vh;
  transform: translate(-50%, -50%);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; overflow: hidden;
  will-change: transform, opacity;
}
.modal__head { padding: 22px 24px 0; }
.modal__body { padding: 18px 24px; overflow-y: auto; }
.modal__foot { padding: 16px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }

.palette {
  position: fixed; z-index: 70; top: 13vh; left: 50%;
  width: min(620px, 94vw);
  transform: translateX(-50%);
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  will-change: transform, opacity;
}
.palette__input { width: 100%; height: 56px; padding: 0 20px; border: 0; background: transparent; outline: none; font-size: 16px; }
.palette__list { max-height: 48vh; overflow-y: auto; padding: 6px; border-top: 1px solid var(--line); }
.palette__item {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm); text-align: left;
}
.palette__item.is-sel { background: var(--brand-soft); color: var(--brand); }
.palette__item small { color: var(--ink-3); font-size: 12px; }

.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: grid; gap: 10px; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 16px; min-width: 260px;
  border-radius: var(--r-md);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  font-size: 13.5px; font-weight: 580;
  will-change: transform, opacity;
}
.toast__icon { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast__icon svg { width: 15px; height: 15px; }

.tilt { transform-style: preserve-3d; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; border-radius: var(--r-sm); animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding: 0 0 20px; }
.timeline__item::before {
  content: ""; position: absolute; left: -24px; top: 5px;
  width: 10px; height: 10px; border-radius: 99px;
  background: var(--ground); border: 2.5px solid var(--brand);
}
.timeline__when { font-size: 12px; color: var(--ink-3); }

.flow { display: grid; gap: 0; }
.flow__step {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 14px;
  padding: 14px 16px; border-radius: var(--r-md);
  align-items: flex-start;
  position: relative;
  transition: background var(--t-med) var(--e-out);
}
.flow__step + .flow__step::before {
  content: ""; position: absolute; left: 34px; top: -14px; height: 14px; width: 2px;
  background: var(--line);
}
.flow__step.is-done + .flow__step::before { background: var(--ok); }
.flow__dot {
  width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-3); font-weight: 800; font-size: 13px;
  flex: none; position: relative;
}
.flow__dot svg { width: 17px; height: 17px; }
.flow__step.is-active { background: var(--brand-soft); }
.flow__step.is-active .flow__dot { background: var(--brand); color: #FFFFF0; }
.flow__step.is-done .flow__dot { background: var(--ok-soft); color: var(--ok); }
.flow__step.is-error .flow__dot { background: var(--danger-soft); color: var(--danger); }
.flow__title { font-weight: 620; }
.flow__desc { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.flow__meta { font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-3); }
.pulse-ring { position: absolute; inset: -4px; border-radius: 16px; border: 2px solid var(--brand); opacity: 0; pointer-events: none; }

.clocks { display: grid; gap: 10px; }
.clock-row { display: grid; grid-template-columns: 94px 1fr 72px; gap: 12px; align-items: center; font-size: 13px; }
.clock-row b { font-weight: 640; }
.clock-bar { height: 22px; border-radius: 8px; background: var(--surface-2); position: relative; overflow: hidden; }
.clock-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 8px; will-change: width; }
.clock-bar.ped i { background: linear-gradient(90deg, var(--info), #3ee6d8); }
.clock-bar.fin i { background: var(--grad-orange); }
.clock-gap { font-size: 12.5px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-weight: 620; }

.heat { display: grid; grid-template-columns: repeat(26, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); will-change: transform, opacity; }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--brand) 25%, var(--surface-2)); }
.heat i[data-l="2"] { background: color-mix(in srgb, var(--brand) 55%, var(--surface-2)); }
.heat i[data-l="3"] { background: var(--brand); }
.heat i[data-l="x"] { background: var(--danger-soft); box-shadow: inset 0 0 0 1.5px var(--danger); }

.dup-pair { display: grid; grid-template-columns: 1fr 54px 1fr; gap: 0; align-items: stretch; }
.dup-card { padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); will-change: transform, opacity; }
.dup-card dl { display: grid; grid-template-columns: 86px 1fr; gap: 6px 10px; margin: 12px 0 0; font-size: 13px; }
.dup-card dt { color: var(--ink-3); }
.dup-card dd { margin: 0; font-weight: 580; }
.dup-card dd mark { background: var(--light-marker); color: #3A1C0B; border-radius: 4px; padding: 0 3px; }
.dup-merge { display: grid; place-items: center; }
.dup-score { width: 46px; height: 46px; border-radius: 99px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-weight: 800; font-size: 13px; }

.teacher-phone {
  width: 330px; flex: none;
  border-radius: 38px; padding: 12px;
  background: var(--ink); box-shadow: var(--shadow-3);
}
.teacher-phone__screen { border-radius: 28px; background: var(--ground); overflow: hidden; height: 620px; display: flex; flex-direction: column; }
.teacher-phone__top { padding: 16px 18px 10px; background: var(--grad-orange); color: #FFFFF0; }
.teacher-phone__body { flex: 1; overflow-y: auto; padding: 14px; }
.att { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); margin-bottom: 8px; will-change: transform; }
.att__btns { display: flex; gap: 6px; }
.att__b { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.att__b svg { width: 16px; height: 16px; }
.att__b.is-on[data-v="p"] { background: var(--ok); color: #fff; }
.att__b.is-on[data-v="f"] { background: var(--danger); color: #fff; }
.att__b.is-on[data-v="j"] { background: var(--warn); color: #fff; }

.roadmap { display: flex; gap: var(--gutter); overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; }
.stage { flex: none; width: 320px; scroll-snap-align: start; }
.stage__n { font-family: var(--font-display); font-size: 46px; line-height: 1; color: var(--brand-soft-2); font-weight: 600; }
.stage.is-now .stage__n { color: var(--brand); }
.gate { font-size: 12.5px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); margin-top: 12px; }
.gate b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }

.pain { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pain:last-child { border-bottom: 0; }
.pain__n { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--danger-soft); color: var(--danger); }
.pain.sev-alto .pain__n { background: var(--warn-soft); color: var(--warn); }
.pain.sev-medio .pain__n { background: var(--surface-2); color: var(--ink-3); }

.lane { display: grid; gap: 10px; }
.lane__head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.lane__count { background: var(--surface-2); border-radius: 99px; padding: 1px 8px; font-size: 11px; }
.mini-card { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow-1); will-change: transform; }
.mini-card:hover { box-shadow: var(--shadow-2); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

.chart-wrap { position: relative; }
.chart-tip {
  position: absolute; pointer-events: none; opacity: 0;
  padding: 7px 11px; border-radius: 10px;
  background: var(--ink); color: var(--ground);
  font-size: 12px; font-weight: 640; white-space: nowrap;
  transform: translate(-50%, -140%);
  box-shadow: var(--shadow-2);
}

.stat-line { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-line.total { border-top: 2px solid var(--line-strong); border-bottom: 0; margin-top: 6px; padding-top: 12px; font-size: 15px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); position: relative; margin-bottom: 22px; overflow-x: auto; }
.tabs button { padding: 11px 14px; font-size: 14px; font-weight: 620; color: var(--ink-3); white-space: nowrap; transition: color var(--t-fast) var(--e-out); }
.tabs button.is-active { color: var(--brand); }
.tabs__ink { position: absolute; bottom: -1px; left: 0; height: 2.5px; border-radius: 99px; background: var(--brand); will-change: transform, width; }

.marker-hl { position: relative; display: inline; isolation: isolate; }
.marker-hl i {
  position: absolute; left: -3px; right: -3px; bottom: 1px; height: .62em; display: block;
  background: var(--light-marker); border-radius: 4px; z-index: -1;
  transform: scaleX(0); transform-origin: left;
}

@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: var(--rail-mini); }
  .shell .rail__logo { width: 44px; }
  .shell .nav-item { grid-template-columns: 22px; justify-content: center; padding: 10px; }
  .shell .nav-item__label, .shell .nav-item__badge, .shell .rail__group, .shell .rail__collapse { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth__stage { display: none; }
  .kbd-search { min-width: 44px; }
  .kbd-search span, .kbd-search kbd { display: none; }
}
@media (max-width: 680px) {
  :root { --gutter: 18px; }
  .g-2, .g-3, .g-4, .g-6 { grid-template-columns: minmax(0, 1fr); }
  .dup-pair { grid-template-columns: 1fr; }
  .dup-merge { padding: 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
