/* HrmGro design system — white, with a violet → cobalt → green spectrum.
   One family (Onest). The spectrum is the signature: the ribbon on top, the day ring on Home, module colours. */
:root {
  --canvas: #F6F6FB; --surface: #FFFFFF; --sunk: #F0EFF8; --line: #E6E4F0; --line-2: #D6D3E6;
  --ink: #1B1838; --ink-2: #4B4868; --muted: #75729A; --faint: #A3A0BF;
  --violet: #6D4AFF; --violet-2: #8B6DFF; --violet-bg: #F1EDFF; --violet-ink: #4B2BD6;
  --cobalt: #2F6BFF; --cobalt-bg: #EAF1FF; --cobalt-ink: #1F4FCC;
  --green: #14B88A; --green-bg: #E5F7F0; --green-ink: #0B7F5F;
  --amber: #E9970F; --amber-bg: #FFF4DF; --amber-ink: #9A5F00;
  --rose: #E5484D; --rose-bg: #FDECEC; --rose-ink: #B42328;
  --spectrum: linear-gradient(90deg, #6D4AFF 0%, #2F6BFF 52%, #14B88A 100%);
  --r-s: 8px; --r: 12px; --r-l: 18px;
  --shadow: 0 1px 2px rgba(27, 24, 56, .05), 0 4px 16px rgba(27, 24, 56, .05);
  --shadow-up: 0 12px 40px rgba(27, 24, 56, .14);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rail: 232px; --top: 60px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--canvas); font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; }
a { color: var(--violet-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 10px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .nowrap { white-space: nowrap; }
.ribbon { height: 4px; background: var(--spectrum); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; text-decoration: none !important; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 2px 8px rgba(109, 74, 255, .28); }
.btn.primary:hover { background: var(--violet-ink); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--rose-ink); border-color: #F3C3C5; }
.btn.danger:hover { background: var(--rose-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunk); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 40px; padding: 0; } .btn.icon.sm { width: 32px; }
.btn[disabled], .btn.busy { opacity: .6; pointer-events: none; }
.btn.block { width: 100%; }
label.f, div.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
label.f > em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 5px; }
input, select, textarea { width: 100%; font: 15px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; min-height: 42px; transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .15); }
input[readonly], input:disabled, select:disabled { background: var(--sunk); color: var(--ink-2); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--violet); vertical-align: -3px; margin: 0 8px 0 0; }
.f.err input, .f.err select, .f.err textarea { border-color: var(--rose); }
.f .msg { color: var(--rose-ink); font-size: 12px; margin-top: 5px; }
.check { display: flex; align-items: flex-start; gap: 2px; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.lock-note { display: flex; gap: 8px; align-items: center; font-size: 13px; background: var(--cobalt-bg); color: var(--cobalt-ink); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }

/* ---------- chips, pills, avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.pill.v { background: var(--violet-bg); color: var(--violet-ink); } .pill.c { background: var(--cobalt-bg); color: var(--cobalt-ink); }
.pill.g { background: var(--green-bg); color: var(--green-ink); } .pill.a { background: var(--amber-bg); color: var(--amber-ink); } .pill.r { background: var(--rose-bg); color: var(--rose-ink); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 650; font-size: 13px; color: #fff; background: var(--violet); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 28px; height: 28px; font-size: 11px; } .av.lg { width: 72px; height: 72px; font-size: 24px; } .av.xl { width: 96px; height: 96px; font-size: 32px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--cobalt-ink); background: var(--cobalt-bg); border-radius: 6px; padding: 1px 6px; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.rail .ribbon { flex: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--ink); text-decoration: none !important; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--spectrum); display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 750; }
.co { margin: 0 12px 10px; padding: 9px 10px; border-radius: 10px; background: var(--sunk); font-size: 13px; }
.co b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 14px; }
.nav .grp { font-size: 12px; color: var(--faint); font-weight: 600; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-weight: 550; font-size: 14px; text-decoration: none; position: relative; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.on { background: var(--violet-bg); color: var(--violet-ink); }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mod, var(--violet)); }
.nav a .n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nav a[data-mod=people] { --mod: var(--violet); } .nav a[data-mod=time] { --mod: var(--cobalt); } .nav a[data-mod=leave] { --mod: var(--green); }
.rail-foot { padding: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.main { margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 24px; background: rgba(246, 246, 251, .86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.search-btn { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 14px var(--font); cursor: pointer; text-align: left; }
.search-btn kbd { margin-left: auto; font: 600 11px var(--font); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.top .sp { flex: 1; }
.top .tb { position: relative; }
.top .tb .badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.me-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: 600 13.5px var(--font); color: var(--ink); }
.me-btn .av { width: 30px; height: 30px; font-size: 12px; }
.content { padding: 8px 24px 48px; max-width: 1280px; width: 100%; }
.banner { display: flex; align-items: center; gap: 12px; margin: 0 24px 12px; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.banner.warn { background: var(--amber-bg); color: var(--amber-ink); } .banner.bad { background: var(--rose-bg); color: var(--rose-ink); } .banner.info { background: var(--cobalt-bg); color: var(--cobalt-ink); }
.banner .btn { margin-left: auto; }
.tabbar { display: none; }

/* page head */
.ph { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 12px 0 20px; }
.ph .t { flex: 1; min-width: 200px; }
.ph h1 { font-size: 26px; }
.ph .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--sunk); gap: 2px; }
.seg button, .seg a { height: 32px; padding: 0 14px; border: 0; background: transparent; border-radius: 8px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 24, 56, .1); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { flex: none; height: 42px; padding: 0 12px; border: 0; background: none; font: 600 14px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.tabs .on { color: var(--ink); border-bottom-color: var(--violet); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.card.flat { box-shadow: none; }
.card > h3, .card .ch h3 { font-size: 15.5px; }
.ch { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ch h3 { flex: 1; }
.ch .lnk { font-size: 13px; font-weight: 600; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.span2 { grid-column: span 2; }
.stack > * + * { margin-top: 16px; }
.list { margin: 0; padding: 0; list-style: none; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 2px; }
.list > li .grow { flex: 1; min-width: 0; }
.list.click > li { cursor: pointer; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.list.click > li:hover { background: var(--sunk); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty svg.i { width: 34px; height: 34px; stroke-width: 1.4; color: var(--faint); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* KPI tiles: number first, label under, tinted per module */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: default; position: relative; }
button.kpi, a.kpi { cursor: pointer; text-decoration: none; } button.kpi:hover, a.kpi:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kpi .d { font-size: 12px; margin-top: 6px; color: var(--muted); }
.kpi.v-violet .v { color: var(--violet-ink); } .kpi.v-cobalt .v { color: var(--cobalt-ink); } .kpi.v-green .v { color: var(--green-ink); } .kpi.v-amber .v { color: var(--amber-ink); } .kpi.v-rose .v { color: var(--rose-ink); }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #FAFAFE; }
.tbl .r { text-align: right; } .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search], .toolbar .srch { max-width: 300px; }
.toolbar select { width: auto; min-width: 140px; }
.toolbar .sp { flex: 1; }

/* ---------- Home: the day ring (signature moment) ---------- */
.day { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding: 24px; position: relative; overflow: hidden; }
.day::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 107, 255, .08), transparent 70%); pointer-events: none; }
.ring { position: relative; width: 168px; height: 168px; }
.ring svg { width: 168px; height: 168px; transform: rotate(-90deg); }
.ring .trk { stroke: var(--sunk); }
.ring .bar { transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.ring .mid { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .mid b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.ring .mid small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.day h2 { font-size: 22px; margin-bottom: 4px; }
.day .when { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.punch { height: 52px; padding: 0 26px; border-radius: 14px; font-size: 16px; }
.punch.in { background: var(--spectrum); border: 0; color: #fff; box-shadow: 0 6px 20px rgba(47, 107, 255, .3); }
.punch.out { background: var(--ink); border-color: var(--ink); color: #fff; }
.punches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.punches span { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: var(--sunk); color: var(--ink-2); }
.bal { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.bal .b { border-radius: 12px; padding: 12px 14px; background: var(--sunk); position: relative; overflow: hidden; }
.bal .b::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--violet)); }
.bal .b b { font-size: 22px; font-weight: 700; display: block; letter-spacing: -.02em; }
.bal .b span { font-size: 12.5px; color: var(--ink-2); }
.bal .b small { display: block; font-size: 11.5px; color: var(--muted); }
.hello { margin: 14px 0 18px; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.hello h1 { font-size: 28px; flex: 1; }
.hello .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dh { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; padding-bottom: 2px; }
.cal .d { min-height: 64px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding: 6px 7px; font-size: 12px; position: relative; text-align: left; font-family: var(--font); color: var(--ink); cursor: default; }
.cal button.d { cursor: pointer; } .cal button.d:hover { border-color: var(--line-2); }
.cal .d .n { font-weight: 650; font-size: 13px; }
.cal .d .s { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; line-height: 1.25; }
.cal .d.today { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.cal .d.blank { background: transparent; border-color: transparent; }
.cal .d.present { background: var(--green-bg); border-color: #C7EBDD; } .cal .d.present .s { color: var(--green-ink); }
.cal .d.half_day, .cal .d.half_leave, .cal .d.missed { background: var(--amber-bg); border-color: #F6DDAE; } .cal .d.half_day .s, .cal .d.missed .s, .cal .d.half_leave .s { color: var(--amber-ink); }
.cal .d.absent { background: var(--rose-bg); border-color: #F6CDCF; } .cal .d.absent .s { color: var(--rose-ink); }
.cal .d.leave { background: var(--violet-bg); border-color: #DCD3FF; } .cal .d.leave .s { color: var(--violet-ink); }
.cal .d.weekoff, .cal .d.holiday { background: repeating-linear-gradient(135deg, #F7F7FB, #F7F7FB 6px, #F0EFF8 6px, #F0EFF8 12px); } .cal .d.weekoff .s, .cal .d.holiday .s { color: var(--muted); }
.cal .d.working { background: var(--cobalt-bg); border-color: #CADBFF; } .cal .d.working .s { color: var(--cobalt-ink); }
.cal .d .flag { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lcal .d { min-height: 78px; }
.lcal .chip { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 4px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lcal .chip.pend { opacity: .55; }

/* people */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.pcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.pcard.exited { opacity: .6; }
.prof-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 22px; position: relative; overflow: hidden; }
.prof-head::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--spectrum); }
.prof-head .info { flex: 1; min-width: 220px; }
.prof-head h1 { font-size: 24px; }
.prof-head .meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.prof-head .meta span { display: inline-flex; gap: 6px; align-items: center; }
.av-edit { position: relative; cursor: pointer; border: 0; padding: 0; background: none; border-radius: 50%; }
.av-edit::after { content: 'Change'; position: absolute; inset: 0; border-radius: 50%; background: rgba(27, 24, 56, .55); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.av-edit:hover::after { opacity: 1; }
.kv { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 9px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 16px 10px; }
.timeline li::before { content: ''; position: absolute; left: -18px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--violet); }
.timeline li.k-exit::before { border-color: var(--rose); } .timeline li.k-join::before { border-color: var(--green); background: var(--green); } .timeline li.k-promotion::before { border-color: var(--cobalt); }
.timeline b { display: block; } .timeline small { color: var(--muted); }
.org { overflow: auto; padding: 10px 0 30px; }
.org ul { list-style: none; margin: 0; padding: 22px 0 0; display: flex; justify-content: center; position: relative; }
.org li { position: relative; padding: 22px 8px 0; text-align: center; }
.org li::before, .org li::after { content: ''; position: absolute; top: 0; height: 22px; border-top: 2px solid var(--line-2); width: 50%; right: 50%; }
.org li::after { right: auto; left: 50%; border-left: 2px solid var(--line-2); }
.org li:only-child::before, .org li:only-child::after { display: none; } .org li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-right: 2px solid var(--line-2); border-radius: 0 6px 0 0; } .org li:first-child::after { border-radius: 6px 0 0 0; }
.org ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--line-2); height: 22px; }
.org > ul { padding-top: 0; } .org > ul > li { padding-top: 0; } .org > ul > li::before, .org > ul > li::after { display: none; }
.onode { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px 10px; min-width: 132px; max-width: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font: inherit; color: inherit; }
.onode:hover { border-color: var(--violet); }
.onode b { font-size: 13px; } .onode small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

/* threads */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; background: var(--sunk); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.mine { align-self: flex-end; background: var(--violet-bg); }
.msg.internal { background: var(--amber-bg); border: 1px dashed #EBC57D; }
.msg .by { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(27, 24, 56, .36); z-index: 60; opacity: 0; transition: opacity .18s; }
.scrim.on { opacity: 1; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61; display: flex; flex-direction: column; box-shadow: var(--shadow-up); transform: translateX(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.panel.on { transform: none; }
.panel.wide { width: min(780px, 100vw); }
.panel .ph2 { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel .ph2 h2 { flex: 1; font-size: 18px; }
.panel .pb { flex: 1; overflow-y: auto; padding: 20px; }
.panel .pf { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: #FCFCFE; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98); width: min(460px, calc(100vw - 32px)); background: var(--surface); border-radius: 18px; z-index: 62; box-shadow: var(--shadow-up); padding: 22px; opacity: 0; transition: opacity .16s, transform .16s; max-height: calc(100vh - 40px); overflow: auto; }
.modal.on { opacity: 1; transform: translate(-50%, -50%); }
.modal h2 { font-size: 18px; margin-bottom: 8px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.menu { position: absolute; z-index: 50; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-up); padding: 6px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; text-decoration: none; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--sunk); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .hd { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; width: 300px; }
.apps a { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.apps a:hover { border-color: var(--line-2); background: #FBFBFE; }
.apps a.cur { border-color: var(--violet); background: var(--violet-bg); }
.apps .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 750; }
.apps small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.apps .ap-h { grid-column: span 2; font-size: 12px; color: var(--muted); font-weight: 600; padding: 2px 4px 0; }
.toast-box { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-up); display: flex; gap: 10px; align-items: center; animation: tin .2s ease-out; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--rose-ink); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.cmd { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(600px, calc(100vw - 24px)); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-up); z-index: 70; overflow: hidden; }
.cmd input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; height: 56px; font-size: 16px; padding: 0 18px; box-shadow: none !important; }
.cmd .res { max-height: 56vh; overflow: auto; padding: 6px; }
.cmd .res .h { font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 10px 4px; }
.cmd .res a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.cmd .res a.sel, .cmd .res a:hover { background: var(--violet-bg); }
.notif li { align-items: flex-start !important; }
.notif li.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); margin-left: 6px; vertical-align: 2px; }
.support-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; height: 48px; padding: 0 18px 0 14px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; font: 600 14px var(--font); display: flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 8px 24px rgba(27, 24, 56, .25); }
.support-fab .badge { background: var(--green); border-radius: 99px; padding: 0 6px; font-size: 11px; }
.tour { position: fixed; z-index: 80; width: 300px; background: var(--ink); color: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-up); font-size: 14px; }
.tour h4 { font-size: 15px; margin-bottom: 4px; } .tour p { color: #D9D6F0; margin: 0 0 12px; }
.tour .acts { display: flex; gap: 8px; align-items: center; } .tour .acts .step { flex: 1; font-size: 12px; color: #A9A5CC; }
.tour .btn { height: 32px; font-size: 13px; } .tour .btn.ghost { color: #fff; } .tour .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.tour-hole { position: fixed; z-index: 79; border-radius: 12px; box-shadow: 0 0 0 4px var(--violet-2), 0 0 0 9999px rgba(27, 24, 56, .45); pointer-events: none; transition: all .25s; }

/* charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font: 11px var(--font); fill: var(--muted); }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 8px 10px; align-items: center; font-size: 13px; }
.hbar .tr { display: block; height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; } .hbar .fl { display: block; height: 100%; border-radius: 99px; background: var(--violet); }
.hbar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); } .hbar .vl { font-weight: 650; min-width: 28px; text-align: right; }
.heat { display: grid; grid-template-columns: 70px repeat(7, 1fr); gap: 4px; font-size: 12px; }
.heat div { height: 30px; border-radius: 6px; display: grid; place-items: center; font-weight: 600; }
.heat .hl { justify-content: start; color: var(--muted); font-weight: 500; place-items: center start; }
.progress { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--spectrum); border-radius: 99px; }
.skel { background: linear-gradient(90deg, var(--sunk), #F8F7FC, var(--sunk)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; min-height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .rail { display: none; }
  .main { margin-left: 0; }
  .top { padding: 0 14px; }
  .content { padding: 4px 16px 96px; }
  .banner { margin: 0 16px 10px; }
  .search-btn kbd { display: none; }
  .top .co-mob { display: flex; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; position: relative; }
  .tabbar a.on { color: var(--violet-ink); }
  .tabbar a .n { position: absolute; top: 0; left: 55%; min-width: 16px; height: 16px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .support-fab { bottom: 84px; right: 14px; padding: 0 14px; } .support-fab .lbl { display: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .row, .row3 { grid-template-columns: 1fr; }
  .day { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; }
  .punches { justify-content: center; }
  .ph h1, .hello h1 { font-size: 23px; }
  .cal { gap: 4px; } .cal .d { min-height: 50px; padding: 4px; } .cal .d .s { font-size: 9.5px; }
  .lcal .d { min-height: 60px; min-width: 0; overflow: hidden; } .lcal .chip { font-size: 9px; padding: 1px 3px; } .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); } .ch { flex-wrap: wrap; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; }
  .me-btn .nm { display: none; }
  .hide-m { display: none !important; }
  .tbl .hide-m { display: none; }
  .modal { padding: 18px; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- public site ---------- */
.site { background: var(--surface); }
.snav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.snav .in { max-width: 1160px; margin: auto; display: flex; align-items: center; gap: 22px; height: 66px; padding: 0 20px; }
.snav .links { display: flex; gap: 22px; flex: 1; }
.snav .links a { color: var(--ink-2); font-weight: 550; font-size: 14.5px; }
.snav .links a.on { color: var(--ink); }
.wrap { max-width: 1160px; margin: auto; padding: 0 20px; }
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 720; }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 520px; margin: 18px 0 26px; line-height: 1.5; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; } .hero .cta .btn { height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.hero .fine { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.spec-word { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mock { position: relative; border-radius: 22px; background: var(--canvas); border: 1px solid var(--line); padding: 18px; box-shadow: 0 30px 80px rgba(47, 107, 255, .12); }
.mock::before { content: ''; position: absolute; inset: -1px; border-radius: 22px; padding: 1px; background: var(--spectrum); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; pointer-events: none; }
.band { padding: 64px 0; } .band.alt { background: var(--canvas); }
.band h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.025em; max-width: 720px; }
.band .intro { color: var(--ink-2); font-size: 17px; max-width: 640px; margin-top: 10px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.feat .f { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.feat .f .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.feat .f h3 { font-size: 17px; margin-bottom: 6px; } .feat .f p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; } .ticks li { padding: 7px 0 7px 30px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ''; position: absolute; left: 0; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B7F5F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; align-items: stretch; }
.plan { border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; background: var(--surface); position: relative; }
.plan.hl { border-color: transparent; box-shadow: 0 20px 60px rgba(109, 74, 255, .16); }
.plan.hl::before { content: ''; position: absolute; inset: -2px; border-radius: 21px; padding: 2px; background: var(--spectrum); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 99px; }
.plan h3 { font-size: 19px; } .plan .desc { color: var(--muted); font-size: 14px; margin: 6px 0 18px; min-height: 42px; }
.plan .price { font-size: 40px; font-weight: 720; letter-spacing: -.03em; } .plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .min { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.plan .ticks { flex: 1; margin-bottom: 22px; } .plan .ticks li { font-size: 14.5px; }
.sfoot { border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--muted); font-size: 14px; }
.sfoot .in { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; } .sfoot a { color: var(--ink-2); }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth .side { background: var(--canvas); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .side::after { content: ''; position: absolute; width: 520px; height: 520px; right: -200px; bottom: -200px; border-radius: 50%; background: conic-gradient(from 200deg, #6D4AFF, #2F6BFF, #14B88A, #6D4AFF); filter: blur(70px); opacity: .22; }
.auth .side blockquote { font-size: 24px; line-height: 1.35; letter-spacing: -.015em; font-weight: 600; margin: 0; max-width: 440px; position: relative; z-index: 1; }
.auth .formside { display: grid; place-items: center; padding: 40px 20px; }
.auth form { width: min(400px, 100%); }
.auth h1 { font-size: 28px; margin-bottom: 6px; } .auth .sub { color: var(--muted); margin-bottom: 26px; }
.auth .err { background: var(--rose-bg); color: var(--rose-ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; display: none; } .auth .err.on { display: block; }
.helpc { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 40px 0 70px; }
.helpc nav h4 { font-size: 13px; color: var(--muted); margin: 18px 0 6px; } .helpc nav a { display: block; padding: 5px 0; color: var(--ink-2); font-size: 14.5px; }
.helpc nav a.on { color: var(--violet-ink); font-weight: 600; }
.prose { max-width: 680px; font-size: 16px; line-height: 1.7; color: var(--ink-2); } .prose h1 { font-size: 32px; color: var(--ink); margin-bottom: 8px; letter-spacing: -.02em; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; } .prose li { margin-bottom: 6px; } .prose strong { color: var(--ink); }
.hsearch { display: flex; gap: 8px; max-width: 560px; } .hsearch input { height: 50px; font-size: 16px; border-radius: 12px; }
.hgroups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0 70px; }
.hgroups .card a { display: block; padding: 6px 0; font-weight: 550; }
@media (max-width: 900px) {
  .hero, .duo, .auth, .helpc { grid-template-columns: 1fr; } .hero { padding-top: 36px; gap: 30px; }
  .feat, .plans, .hgroups { grid-template-columns: 1fr; } .snav .links { display: none; }
  .auth .side { display: none; } .band { padding: 44px 0; }
}
/* console */
.cons .rail { --rail: 220px; }
