/* ============================================================
   TILSNA HR — PMS design system (teal / navy palette kept from v1)
   ============================================================ */
:root {
  --bg: #f2f6f8;
  --bg-soft: #e8eff2;
  --bg-tint: #f7fafb;
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.88);
  --ink: #12312e;
  --ink-2: #4a6360;
  --ink-3: #7d9491;
  --ink-4: #a3b5b3;
  --line: #dde8e9;
  --line-2: #eaf1f2;
  --acc: #0e8f80;
  --acc-2: #0b6e63;
  --acc-3: #56b3a4;
  --acc-soft: #d9efec;
  --acc-wash: #eef8f6;
  --acc-ink: #0a5c53;
  --navy: #123f57;
  --night: #0f2a33;
  --gold: #c98d26;
  --gold-soft: #fbf0db;
  --danger: #d4514d;
  --danger-ink: #9c2f2c;
  --danger-soft: #fbe9e8;
  --warn: #e08a2e;
  --warn-ink: #9a5413;
  --warn-soft: #fdf1e0;
  --ok: #2e9e6b;
  --ok-ink: #1d6e49;
  --ok-soft: #e2f4ea;
  --violet: #7c5cd6;
  --violet-ink: #5a3eb0;
  --violet-soft: #efeafc;
  --blue: #2f7fbf;
  --blue-ink: #215f91;
  --blue-soft: #e4f0f9;
  --sb-1: #0e2f38;
  --sb-2: #0d3d3c;
  --shadow-xs: 0 1px 2px rgba(18, 49, 46, .05);
  --shadow: 0 1px 2px rgba(18, 49, 46, .04), 0 6px 20px -12px rgba(18, 49, 46, .16);
  --shadow-lg: 0 2px 6px rgba(18, 49, 46, .06), 0 24px 48px -20px rgba(18, 49, 46, .3);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --sidebar-w: 252px;
  --font: "Sukhumvit Set", "IBM Plex Sans Thai", "Noto Sans Thai", "Thonburi", "Leelawadee UI", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; min-height: 100vh; }
a { color: var(--acc-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--acc-soft); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.b { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hide { display: none !important; }

/* ------------------------------------------------ splash */
#splash { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; background: var(--bg); z-index: 99; transition: opacity .3s; }
#splash.hide { opacity: 0; pointer-events: none; display: flex !important; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3.5px solid var(--acc-soft); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: linear-gradient(150deg, #0d2b3d 0%, #0e5a51 55%, #12876f 100%); color: #eafaf6; }
.login-hero .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; mix-blend-mode: luminosity; }
.login-hero .shade { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10, 36, 47, .82), rgba(14, 90, 81, .55) 60%, rgba(16, 128, 105, .35)); }
.login-hero > div { position: relative; z-index: 1; }
.brandline { display: flex; align-items: center; gap: 14px; }
.brandline img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.brandline .t1 { font-size: 21px; font-weight: 700; letter-spacing: .3px; }
.brandline .t2 { font-size: 12.5px; opacity: .8; }
.login-hero h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.3; font-weight: 700; max-width: 520px; }
.login-hero p.lead { margin-top: 12px; max-width: 480px; opacity: .85; }
.hero-points { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.hero-points span { display: inline-flex; gap: 10px; align-items: center; font-size: 13.5px; opacity: .92; }
.hero-points .ic { color: #8fe3cf; flex: 0 0 auto; }
.login-hero .foot { font-size: 12px; opacity: .65; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 22px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 24px; margin-bottom: 4px; }
.login-card .sub { color: var(--ink-2); margin-bottom: 24px; font-size: 13.5px; }
.demo-block { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 16px; }
.demo-block .cap { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-chip { text-align: left; padding: 9px 11px; border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; transition: .15s; font-size: 12.5px; color: var(--ink-2); }
.demo-chip:hover { border-color: var(--acc); background: var(--acc-wash); }
.demo-chip b { display: block; color: var(--ink); font-size: 13px; }

/* ------------------------------------------------ forms */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.inwrap { position: relative; }
.inwrap .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s; font-size: 14px;
}
.inwrap input { padding-left: 38px; }
.field textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--acc); }
.rate-pick { display: flex; gap: 6px; }
.rate-pick button { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; color: var(--ink-2); }
.rate-pick button.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.opt-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-pick button { padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.opt-pick button.on { border-color: var(--acc); background: var(--acc-wash); color: var(--acc-ink); }
.err-box { background: var(--danger-soft); color: var(--danger-ink); border: 1px solid #f2c7c5; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  padding: 8px 15px; border-radius: 10px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; background: var(--acc); color: #fff; line-height: 1.4;
}
.btn:hover { background: var(--acc-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; padding: 11px; }
.btn.dark { background: var(--night); color: #fff; }
.btn.dark:hover { background: #163b47; }
.btn.outline { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn.outline:hover { border-color: #c5d6d6; background: var(--bg-tint); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn.soft { background: var(--acc-wash); color: var(--acc-ink); }
.btn.soft:hover { background: var(--acc-soft); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.xs { padding: 3px 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn .ic { flex: 0 0 auto; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); position: relative; transition: .15s; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn .pip { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--card); }
.link-btn { border: 0; background: none; color: var(--acc-2); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; padding: 0; }
.link-btn:hover { color: var(--acc-ink); text-decoration: underline; }

/* ------------------------------------------------ app shell */
#app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 auto; position: sticky; top: 0; height: 100vh; z-index: 40;
  background: linear-gradient(180deg, var(--sb-1) 0%, var(--sb-2) 100%); color: #cfe7e2; display: flex; flex-direction: column;
}
.sb-brand { display: flex; gap: 11px; align-items: center; padding: 18px 18px 14px; }
.sb-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.sb-brand .t1 { font-weight: 700; font-size: 15.5px; color: #fff; letter-spacing: .2px; line-height: 1.25; }
.sb-brand .t2 { font-size: 11px; color: #8fb5ae; }
.sb-nav { padding: 4px 12px 12px; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sb-sec { font-size: 10.5px; letter-spacing: .6px; color: #6f958f; padding: 14px 10px 6px; font-weight: 600; }
.sb-item {
  display: flex; align-items: center; gap: 11px; padding: 8.5px 11px; border-radius: 9px; color: #b8d6d0; font-size: 13.5px;
  margin-bottom: 1px; border: 0; width: 100%; background: transparent; text-align: left; transition: .14s; position: relative;
}
.sb-item .ic { flex: 0 0 auto; opacity: .85; }
.sb-item span.lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-item.active { background: linear-gradient(90deg, rgba(20, 184, 155, .26), rgba(20, 184, 155, .08)); color: #fff; }
.sb-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #14b89b; }
.sb-badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sb-beta { font-size: 10px; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.1); color: #a9cbc4; font-weight: 600; }
.sb-cycle { margin: 0 12px 10px; padding: 12px 13px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255,255,255,.06); }
.sb-cycle .k { font-size: 10.5px; color: #8fd8c8; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.sb-cycle .k i { width: 6px; height: 6px; border-radius: 50%; background: #3ad1b3; box-shadow: 0 0 0 3px rgba(58, 209, 179, .2); }
.sb-cycle .v { font-size: 13px; color: #fff; font-weight: 700; margin-top: 4px; }
.sb-cycle .bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.12); margin: 9px 0 6px; overflow: hidden; }
.sb-cycle .bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #14b89b, #5fd6bf); }
.sb-cycle .meta { display: flex; justify-content: space-between; font-size: 10.5px; color: #8fb5ae; gap: 8px; }
.sb-user { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .07); position: relative; }
.sb-user .nm { font-size: 13px; color: #fff; font-weight: 600; line-height: 1.25; }
.sb-user .rl { font-size: 11px; color: #8fb5ae; }
.sb-user .grow { flex: 1; min-width: 0; }
.sb-user .icon-btn { color: #a9cbc4; }
.sb-user .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 60px;
  padding: 0 24px; background: var(--card-glass); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); min-width: 0; white-space: nowrap; }
.crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--ink-4); }
.top-search {
  flex: 1 1 280px; max-width: 420px; margin-left: auto; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); background: var(--bg-tint); border-radius: 11px; color: var(--ink-3); font-size: 13px; cursor: text; transition: .15s;
}
.top-search:hover { border-color: #c9d9d9; background: #fff; }
.top-search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-3); font-weight: 600; }
.fy-pick { display: flex; align-items: center; gap: 2px; background: var(--bg-soft); border-radius: 10px; padding: 3px; }
.fy-pick button { border: 0; background: transparent; padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fy-pick button.on { background: var(--card); color: var(--acc-ink); box-shadow: var(--shadow-xs); }
.hamburger { display: none; }
.content { padding: 26px 30px 70px; max-width: 1440px; width: 100%; margin: 0 auto; }
.content.fade { opacity: .55; transition: opacity .15s; }

/* ------------------------------------------------ page head */
.page-head { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .eyebrow { font-size: 12px; font-weight: 700; color: var(--acc-2); letter-spacing: .2px; display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.page-head .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.page-head h1 { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -.2px; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; max-width: 680px; font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }

/* ------------------------------------------------ cards & layout */
.grid { display: grid; gap: 18px; }
.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-75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.g-57 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.g-84 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; }
.card-head { display: flex; gap: 10px 12px; align-items: flex-start; justify-content: space-between; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head > div:first-child { flex: 1 1 220px; }
.card-head h3 { font-size: 15px; font-weight: 700; line-height: 1.35; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ic { color: var(--acc); }
.card-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.card-head .tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.card-body { padding: 16px 20px 20px; flex: 1; min-width: 0; }
.card-body.flush { padding: 10px 0 4px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 18px; font-weight: 800; }
.section-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.section-head .meta { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

/* ------------------------------------------------ stat tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; overflow: hidden; }
.kpi .k { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.kpi .ib { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kpi .v { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; display: flex; align-items: baseline; gap: 6px; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.kpi .d { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.kpi .v .spark { margin-left: auto; align-self: center; display: inline-flex; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.delta.up { background: var(--ok-soft); color: var(--ok-ink); }
.delta.down { background: var(--danger-soft); color: var(--danger-ink); }
.delta.flat { background: var(--bg-soft); color: var(--ink-2); }
.delta.warn { background: var(--warn-soft); color: var(--warn-ink); }

/* ------------------------------------------------ chips, tags, avatars */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.chip.lg { font-size: 12.5px; padding: 4px 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; border: 1px solid var(--line); color: var(--ink-2); background: var(--card); white-space: nowrap; line-height: 1.6; }
.tag.okr { color: var(--acc-ink); border-color: #b9ddd7; background: var(--acc-wash); }
.tag.kpi { color: var(--navy); border-color: #c7d6e0; background: #f1f6f9; }
.link-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-ink); font-size: 11.5px; font-weight: 600; }
.link-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.avatar { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex: 0 0 auto; width: 36px; height: 36px; font-size: 13px; letter-spacing: .3px; user-select: none; }
.avatar.anon { background: var(--bg-soft) !important; color: var(--ink-3); }
.who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.who .nm { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .ps { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who > div { min-width: 0; }

/* ------------------------------------------------ progress */
.prog { height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; min-width: 50px; }
.prog > i { display: block; height: 100%; border-radius: 99px; background: var(--acc); transition: width .5s cubic-bezier(.2,.7,.3,1); }
.prog.thick { height: 8px; }
.prog-cell { display: flex; flex-direction: column; gap: 3px; min-width: 140px; }
.prog-cell .top { display: flex; align-items: center; gap: 10px; }
.prog-cell .top .prog { flex: 1; }
.prog-cell .top b { font-size: 12.5px; min-width: 40px; text-align: right; }
.prog-cell .bot { font-size: 11.5px; color: var(--ink-3); }

/* ------------------------------------------------ phases */
.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.phase { padding: 16px 18px 18px; border-right: 1px solid var(--line-2); position: relative; min-width: 0; }
.phase:last-child { border-right: 0; }
.phase .n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-bottom: 10px; border: 1.5px solid var(--line); color: var(--ink-3); background: var(--card); }
.phase.done .n { background: var(--acc-soft); color: var(--acc-ink); border-color: transparent; }
.phase.now { background: linear-gradient(160deg, #e6f6f2 0%, #f6fbfa 70%); }
.phase.now .n { background: var(--acc); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px rgba(14, 143, 128, .16); }
.phase .t { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.phase .r { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.phase .ds { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.phase .m { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.phase .m .prog { flex: 1; height: 5px; }
.phase .state { font-weight: 700; color: var(--acc-ink); }
.phase .state.late { color: var(--warn-ink); }

/* ------------------------------------------------ segmented / tabs / filters */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-soft); border-radius: 10px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-xs); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 10px 14px 11px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--acc); }
.tab .cnt { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); line-height: 18px; }
.tab.on .cnt { background: var(--acc-soft); color: var(--acc-ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.filters select, .filters input[type=search] { height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; color: var(--ink); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d9491' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; min-width: 140px; }
.filters input[type=search] { background-image: none; padding: 0 12px 0 34px; min-width: 220px; }
.filters .searchbox { position: relative; flex: 1 1 220px; max-width: 340px; }
.filters .searchbox .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.filters .searchbox input { width: 100%; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.filters .count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); padding-right: 6px; }
.dropdown { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; max-height: 360px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.menu button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13px; display: flex; gap: 8px; align-items: center; color: var(--ink); }
.menu button:hover { background: var(--bg-soft); }
.menu button.on { font-weight: 700; color: var(--acc-ink); }
.menu .sep { height: 1px; background: var(--line-2); margin: 5px 4px; }

/* ------------------------------------------------ OKR list (dashboard) */
.okr-list { display: flex; flex-direction: column; }
.okr-row { padding: 13px 20px; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; cursor: pointer; transition: background .12s; }
.okr-row:first-child { border-top: 0; }
.okr-row:hover { background: var(--bg-tint); }
.okr-row .meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.okr-row .ttl { font-weight: 700; font-size: 13.5px; margin-top: 2px; line-height: 1.4; }
.okr-row .val { text-align: right; grid-row: span 2; align-self: center; }
.okr-row .val b { font-size: 17px; font-weight: 800; }
.okr-row .val small { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.okr-row .val .pc { font-size: 11.5px; color: var(--ink-3); }
.okr-row .prog { grid-column: 1 / -1; margin-top: 6px; }

/* ------------------------------------------------ insight (dark) */
.insight {
  position: relative; overflow: hidden; border-radius: var(--r-lg); color: #d7ebe7; padding: 22px 22px 20px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(20, 184, 155, .32) 0%, rgba(20, 184, 155, 0) 55%), linear-gradient(160deg, #0d2833 0%, #0f3a3f 100%);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; min-width: 0;
}
.insight::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; bottom: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(217, 161, 60, .18), transparent 70%); pointer-events: none; }
.insight .badge { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 3px 11px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 10.5px; font-weight: 700; letter-spacing: .8px; color: #bfe9df; }
.insight .badge i { width: 6px; height: 6px; border-radius: 50%; background: #3ad1b3; box-shadow: 0 0 0 3px rgba(58, 209, 179, .22); }
.insight h3 { font-size: 19px; line-height: 1.4; color: #fff; font-weight: 700; margin: 14px 0 8px; }
.insight p { font-size: 12.5px; color: #9fc2bb; line-height: 1.6; }
.insight ul { list-style: none; margin: 16px 0 6px; display: flex; flex-direction: column; gap: 11px; position: relative; z-index: 1; }
.insight li { display: grid; grid-template-columns: 10px 1fr; gap: 9px; font-size: 12.5px; line-height: 1.55; color: #a9cbc4; }
.insight li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; background: #e9b44c; }
.insight li b { color: #fff; font-weight: 700; }
.insight .acts { display: flex; gap: 10px; align-items: center; margin-top: auto; padding-top: 16px; position: relative; z-index: 1; }
.insight .btn { background: #14b89b; color: #06231f; }
.insight .btn:hover { background: #3ad1b3; }
.insight .btn.ghost { background: transparent; color: #a9cbc4; }
.insight .btn.ghost:hover { color: #fff; background: rgba(255,255,255,.08); }
.insight .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.insight .tile { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 11px 13px; }
.insight .tile .k { font-size: 10.5px; letter-spacing: .6px; color: #8fb5ae; font-weight: 700; }
.insight .tile .v { color: #fff; font-weight: 600; font-size: 13.5px; margin-top: 3px; }
.insight blockquote { font-size: 15.5px; line-height: 1.75; color: #e8f6f2; margin-top: 14px; position: relative; z-index: 1; }

/* ------------------------------------------------ bar rows (HTML charts) */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: var(--lw, 120px) minmax(0, 1fr) var(--vw, 52px); gap: 12px; align-items: center; font-size: 12.5px; }
.bar-row .l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .l b { color: var(--ink); font-weight: 600; }
.bar-row .t { height: 8px; background: var(--bg-soft); border-radius: 99px; position: relative; }
.bar-row .t > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bar-row .t > s { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--ink-2); opacity: .5; }
.bar-row .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row.click { cursor: pointer; border-radius: 8px; }
.bar-row.click:hover .l { color: var(--acc-ink); }
.bar-row.tall .t { height: 18px; border-radius: 6px; background: var(--bg-tint); }
.bar-row.tall .t > i { border-radius: 0 5px 5px 0; }
.legend-list { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; font-size: 12.5px; }
.legend-list .li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 9px; align-items: center; color: var(--ink-2); }
.legend-list .li i { width: 10px; height: 10px; border-radius: 3px; }
.legend-list .li b { color: var(--ink); font-weight: 700; }
.legend-list .li span.r { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ activity feed */
.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 11px 20px; border-top: 1px solid var(--line-2); }
.feed-item:first-child { border-top: 0; }
.feed-item .tx { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.feed-item .tx b { color: var(--ink); font-weight: 700; }
.feed-item .tx a { color: var(--ink); font-weight: 700; }
.feed-item .mt { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.feed-ic { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--ink-2); }

/* ------------------------------------------------ lists */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line-2); min-width: 0; }
.list-row:first-child { border-top: 0; }
.list-row.click { cursor: pointer; transition: background .12s; }
.list-row.click:hover { background: var(--bg-tint); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .end { text-align: right; flex: 0 0 auto; }

/* ------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--ink-3); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-tint); position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; transition: background .12s; }
.tbl tbody tr.click:hover { background: var(--bg-tint); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .ttl { font-weight: 600; line-height: 1.45; min-width: 240px; max-width: 420px; }
.tbl .who { max-width: 230px; }
.tbl tfoot td { background: var(--bg-tint); font-weight: 700; border-top: 1px solid var(--line); }
.tbl.compact td { padding: 8px 12px; }
.tbl-foot { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--line-2); }

/* ------------------------------------------------ OKR cards (goals page) */
.okr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.okr-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.okr-card:hover { border-color: #b9ddd7; box-shadow: var(--shadow-lg); }
.okr-card .hd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.okr-card .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 7px; }
.okr-card h4 { font-size: 15.5px; line-height: 1.4; font-weight: 700; }
.okr-card .ds { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.kr-box { background: var(--bg-tint); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; }
.kr-box .cap { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 800; letter-spacing: .7px; color: var(--ink-3); margin-bottom: 6px; }
.kr { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 5px 0; color: var(--ink-2); }
.kr .ic { color: var(--ink-4); }
.kr.ok .ic { color: var(--ok); }
.kr .kv { font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; }
.okr-foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-3); }
.okr-foot b { display: block; color: var(--ink); font-size: 13px; margin-top: 1px; }
.okr-foot > div:nth-child(2) { text-align: center; }
.okr-foot > div:last-child { text-align: right; }
.ring-wrap { position: relative; display: inline-flex; }
.ring-wrap .rv { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; }

/* dept goal cards */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dept-card { padding: 16px 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s; gap: 10px; }
.dept-card:hover { border-color: #b9ddd7; box-shadow: var(--shadow-lg); }
.dept-card .top { display: flex; gap: 12px; align-items: center; }
.dept-code { display: inline-flex; padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: 12.5px; letter-spacing: .3px; background: var(--acc-wash); color: var(--acc-ink); }
.dept-code.support { background: var(--blue-soft); color: var(--blue-ink); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 11.5px; color: var(--ink-3); }
.mini-stats b { display: block; font-size: 16px; color: var(--ink); font-weight: 800; }
.mini-dist { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: var(--bg-soft); gap: 2px; }
.mini-dist i { display: block; height: 100%; }

/* cascade tree */
.tree { display: flex; flex-direction: column; gap: 10px; }
.tree-okr { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.tree-okr > .hd { display: grid; grid-template-columns: 24px minmax(0, 1fr) 160px 56px; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.tree-okr > .hd:hover { background: var(--bg-tint); }
.tree-kids { border-top: 1px solid var(--line-2); padding: 8px 16px 12px 52px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-tint); }
.tree-dept { display: grid; grid-template-columns: 90px minmax(0, 1fr) 70px 54px; gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 0; }

/* ------------------------------------------------ profile */
.profile-head { padding: 22px 24px 20px; }
.ph-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ph-top .avatar { width: 64px; height: 64px; font-size: 22px; box-shadow: 0 8px 20px -10px rgba(14, 143, 128, .6); }
.ph-top .eyebrow { font-size: 12px; font-weight: 700; color: var(--acc-2); }
.ph-top h2 { font-size: 24px; font-weight: 800; line-height: 1.3; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.ph-meta span { display: inline-flex; gap: 6px; align-items: center; }
.ph-meta .ic { color: var(--ink-3); }
.ph-top .grow { flex: 1; min-width: 240px; }
.ph-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.ph-stat .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ph-stat .v { font-size: 26px; font-weight: 800; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ph-stat .v small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.steps-mini { display: flex; gap: 4px; margin-top: 8px; }
.steps-mini i { flex: 1; height: 4px; border-radius: 4px; background: var(--bg-soft); }
.steps-mini i.on { background: var(--acc); }
.kpi-items { display: flex; flex-direction: column; }
.kpi-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.kpi-item:first-child { border-top: 0; }
.kpi-item .meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.kpi-item .ttl { font-weight: 700; font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.kpi-item .lnk { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-item .val { text-align: right; align-self: start; padding-top: 18px; }
.kpi-item .val b { font-size: 18px; font-weight: 800; }
.kpi-item .val small { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.kpi-item .val .u { display: block; font-size: 11px; color: var(--ink-3); }
.kpi-item .row2 { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 46px auto; gap: 10px; align-items: center; margin-top: 8px; }
.kpi-item .row2 b { font-size: 12px; text-align: right; color: var(--ink-2); }
.sw-item { border-radius: 12px; padding: 12px 14px; background: var(--bg-tint); border: 1px solid var(--line-2); }
.sw-item.opp { background: #fdf6ee; border-color: #f6e4cc; }
.sw-item .hd { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sw-item .hd b { font-size: 13.5px; line-height: 1.4; }
.sw-item q { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.55; }
.sw-item .ft { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.sw-list { display: flex; flex-direction: column; gap: 10px; }
.fb-item { border-radius: 12px; padding: 13px 14px; background: var(--bg-tint); border: 1px solid var(--line-2); }
.fb-item .hd { display: flex; gap: 10px; align-items: center; }
.fb-item .hd .grow { flex: 1; min-width: 0; }
.fb-item .nm { font-weight: 700; font-size: 13px; }
.fb-item .nm span { font-weight: 500; color: var(--ink-3); }
.fb-item .sb { font-size: 11.5px; color: var(--ink-3); }
.fb-item p { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
.fb-list { display: flex; flex-direction: column; gap: 10px; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--tl, var(--acc)); }
.tl-item.up::before { border-style: dashed; }
.tl-item .d { font-size: 11.5px; color: var(--ink-3); }
.tl-item .t { font-weight: 700; font-size: 13px; line-height: 1.4; margin-top: 1px; }
.tl-item .s { font-size: 12px; color: var(--ink-2); margin-top: 1px; }

/* ------------------------------------------------ funnel / heat / stack */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.fn-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 92px; gap: 12px; align-items: center; font-size: 12.5px; }
.fn-row .l { color: var(--ink-2); }
.fn-row .t { height: 22px; position: relative; }
.fn-row .t i { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 5px; min-width: 3px; }
.fn-row .v { text-align: right; font-variant-numeric: tabular-nums; }
.fn-row .v b { font-size: 13px; }
.fn-row .v span { color: var(--ink-3); font-size: 11.5px; }
.heat { display: grid; gap: 2px; font-size: 11.5px; }
.heat .hc { height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: default; }
.heat .hh { font-size: 10.5px; color: var(--ink-3); font-weight: 700; text-align: center; padding-bottom: 4px; align-self: end; }
.heat .hl { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); margin-top: 12px; }
.heat-legend .ramp { display: flex; height: 8px; width: 160px; border-radius: 4px; overflow: hidden; gap: 1px; }
.heat-legend .ramp i { flex: 1; }
.stack-rows { display: flex; flex-direction: column; gap: 10px; }
.stack-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 54px; gap: 12px; align-items: center; font-size: 12.5px; }
.stack-row .s { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--bg-soft); }
.stack-row .s i { display: block; height: 100%; }
.stack-row .l { font-weight: 600; color: var(--ink-2); }
.stack-row .v { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.div-rows { display: flex; flex-direction: column; gap: 9px; }
.div-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 54px; gap: 12px; align-items: center; font-size: 12.5px; }
.div-row .t { position: relative; height: 14px; }
.div-row .t::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-4); }
.div-row .t i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.div-row .l { font-weight: 600; color: var(--ink-2); }
.div-row .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.value-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.value-card { padding: 16px 18px; }
.value-card .hd { display: flex; gap: 10px; align-items: center; }
.value-card .ib { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--acc-wash); color: var(--acc-ink); }
.value-card .big { font-size: 28px; font-weight: 800; margin-top: 10px; display: flex; align-items: baseline; gap: 6px; }
.value-card .big small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.trio { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.trio .bar-row { --lw: 70px; --vw: 34px; font-size: 11.5px; }
.trio .bar-row .t { height: 6px; }

/* ------------------------------------------------ charts */
.chart { width: 100%; position: relative; min-height: 40px; }
.chart svg { display: block; overflow: visible; }
.ch-grid { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.ch-axis { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.ch-tick { font-size: 11px; fill: var(--ink-3); font-family: var(--font); font-variant-numeric: tabular-nums; }
.ch-lbl { font-size: 11.5px; fill: var(--ink-2); font-family: var(--font); }
.ch-val { font-size: 11px; font-weight: 700; fill: var(--ink); font-family: var(--font); font-variant-numeric: tabular-nums; }
.ch-zone { font-size: 10.5px; fill: var(--ink-3); font-family: var(--font); font-weight: 600; }
.ch-cross { stroke: var(--ink-3); stroke-width: 1; shape-rendering: crispEdges; pointer-events: none; }
.ch-hit { fill: transparent; cursor: crosshair; }
.ch-mark { transition: opacity .12s; }
.ch-mark:hover, .ch-mark.hov { opacity: .82; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.ch-legend.top { margin: 0; justify-content: flex-end; }
.ch-key { display: inline-flex; align-items: center; gap: 7px; }
.ch-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ch-key i.ln { width: 14px; height: 2.5px; border-radius: 2px; }
.ch-key i.ln.dash { background-image: linear-gradient(90deg, currentColor 50%, transparent 50%); background-size: 5px 2.5px; background-color: transparent !important; }
.ch-key b { color: var(--ink); }
.ch-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ch-table th, .ch-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); text-align: right; font-variant-numeric: tabular-nums; }
.ch-table th:first-child, .ch-table td:first-child { text-align: left; }
.ch-table th { color: var(--ink-3); font-weight: 700; font-size: 11.5px; background: var(--bg-tint); }
#viz-tip {
  position: fixed; z-index: 95; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 8px 11px; font-size: 12px; min-width: 120px; max-width: 280px; opacity: 0; transition: opacity .1s;
}
#viz-tip.on { opacity: 1; }
#viz-tip .tt { font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }
#viz-tip .tr { display: grid; grid-template-columns: 14px auto minmax(0, 1fr); gap: 7px; align-items: center; padding: 1px 0; }
#viz-tip .tr i { width: 12px; height: 3px; border-radius: 2px; }
#viz-tip .tr b { font-size: 13px; font-variant-numeric: tabular-nums; }
#viz-tip .tr span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viz-tip .tn { color: var(--ink-3); font-size: 11.5px; margin-top: 4px; }

/* ------------------------------------------------ modal, drawer, palette, toast */
.overlay { position: fixed; inset: 0; background: rgba(12, 35, 44, .42); backdrop-filter: blur(3px); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; animation: pop .18s cubic-bezier(.2,.8,.3,1); }
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 17px; font-weight: 800; flex: 1; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; font-weight: 400; }
.modal-body { padding: 16px 22px 6px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 22px 20px; }
.drawer-back { position: fixed; inset: 0; background: rgba(12, 35, 44, .32); z-index: 80; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--card); z-index: 81; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s cubic-bezier(.2,.8,.3,1); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line-2); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-body { padding: 18px 22px 30px; overflow-y: auto; flex: 1; }
.palette { background: var(--card); width: 100%; max-width: 620px; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; align-self: flex-start; margin-top: 10vh; animation: pop .15s; }
.palette .in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.palette .in input { flex: 1; border: 0; outline: none; font-size: 16px; background: transparent; }
.palette .res { max-height: 56vh; overflow-y: auto; padding: 6px 8px 10px; }
.palette .grp { font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 10px 10px 4px; letter-spacing: .3px; }
.palette .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.palette .it.sel, .palette .it:hover { background: var(--acc-wash); }
.palette .it .grow { flex: 1; min-width: 0; }
.palette .it .s { font-size: 11.5px; color: var(--ink-3); }
.palette .foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-3); }
.popover { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; }
.popover .ph { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.popover .pi { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; cursor: pointer; }
.popover .pi:hover { background: var(--bg-tint); }
.popover .pi:last-child { border-bottom: 0; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; visibility: hidden; background: var(--night); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: 99; transition: transform .22s, opacity .22s, visibility .22s; display: flex; gap: 9px; align-items: center; max-width: min(92vw, 480px); }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
#toast.error { background: var(--danger); }

/* ------------------------------------------------ misc */
.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); font-size: 13px; }
.empty .ic { width: 36px; height: 36px; opacity: .45; margin-bottom: 8px; }
.shimmer { height: 14px; border-radius: 7px; margin: 10px 0; background: linear-gradient(90deg, var(--bg-soft) 25%, var(--line-2) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: shim 1.2s infinite; }
.skel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
@keyframes shim { to { background-position: -200% 0; } }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px 26px; }
.kv { display: flex; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.kv b { min-width: 118px; color: var(--ink-3); font-weight: 600; flex: 0 0 auto; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; background: var(--acc-wash); color: var(--acc-ink); font-size: 12.5px; line-height: 1.55; }
.note.warn { background: var(--warn-soft); color: var(--warn-ink); }
.note .ic { flex: 0 0 auto; margin-top: 1px; }
.pill-stat { display: inline-flex; gap: 6px; align-items: baseline; }
.pill-stat b { font-size: 15px; }
.ai-report { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.ai-report h2 { font-size: 16.5px; margin: 18px 0 8px; color: var(--acc-ink); }
.ai-report h2:first-child { margin-top: 0; }
.ai-report h3 { font-size: 14.5px; margin: 14px 0 6px; }
.ai-report ul, .ai-report ol { padding-left: 22px; margin: 6px 0 10px; }
.ai-report li { margin-bottom: 4px; }
.ai-report p { margin-bottom: 8px; }
.ai-report blockquote { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 0 8px 8px 0; margin: 8px 0; font-size: 13px; }
.ai-report table { border-collapse: collapse; margin: 10px 0; font-size: 13px; width: 100%; }
.ai-report th, .ai-report td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.ai-report th { background: var(--bg-soft); }
.ai-report code { background: var(--bg-soft); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }
.q-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.q-chips button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--ink-2); }
.q-chips button:hover { border-color: var(--acc); color: var(--acc-ink); background: var(--acc-wash); }
.hist-item { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); transition: .13s; }
.hist-item:hover { border-color: var(--acc); background: var(--acc-wash); }
.hist-item.on { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.about-hero { border-radius: var(--r-lg); overflow: hidden; position: relative; color: #f0fbf7; background: linear-gradient(140deg, #0d2b3d, #0e5a51 60%, #148f75); padding: 36px; display: flex; gap: 30px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.about-hero img.hero-img { width: 300px; max-width: 100%; border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); }
.about-hero h2 { font-size: 24px; margin-bottom: 8px; }
.about-hero .badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #dff5ee; }
.formula { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; font-weight: 700; font-size: 15px; padding: 10px 0; }
.formula .fpart { background: var(--acc-wash); color: var(--acc-ink); border-radius: 12px; padding: 12px 18px; text-align: center; }
.formula .fpart span { display: block; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.formula .fop { font-size: 20px; color: var(--ink-3); }
.badge-soft { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rule-card { border-left: 4px solid var(--acc); padding: 14px 16px; border-radius: 12px; background: var(--bg-tint); }
.rule-card b { display: block; margin-bottom: 4px; }
.rule-card p { font-size: 12.5px; color: var(--ink-2); }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.dir-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dir-card:hover { border-color: #b9ddd7; box-shadow: var(--shadow-lg); }
.score-big { font-size: 22px; font-weight: 800; }

/* ------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phase:nth-child(3) { border-right: 0; }
  .phase:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .value-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .kpis, .ph-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-75, .g-57, .g-84, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .okr-grid { grid-template-columns: minmax(0, 1fr); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { min-height: 34vh; padding: 30px; }
  .hero-points { display: none; }
  .top-search span { display: none; }
  .top-search { flex: 0 0 auto; width: 40px; padding: 0; justify-content: center; }
  .top-search kbd { display: none; }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-lg); height: 100dvh; }
  .sidebar.open { transform: none; }
  .hamburger { display: inline-flex; }
  .content { padding: 18px 14px 60px; }
  .topbar { padding: 0 12px; }
  .crumbs .hide-sm { display: none; }
  #sb-scrim { position: fixed; inset: 0; background: rgba(13, 43, 61, .4); z-index: 35; }
  .g-2, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .phase { border-right: 0; border-top: 1px solid var(--line-2); }
  .phase:first-child { border-top: 0; }
  .page-head h1 { font-size: 23px; }
  .fy-pick button { padding: 5px 7px; }
  .topbar .cta-txt { display: none; }
}
@media (max-width: 560px) {
  .kpis, .ph-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .v { font-size: 26px; }
  .kpi .v .spark { display: none; }
  .value-cards { grid-template-columns: minmax(0, 1fr); }
  .okr-row { padding: 12px 16px; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .bar-row { --lw: 90px !important; }
  .fy-pick { display: none; }
}
@media (max-width: 340px) {
  .kpis, .ph-stats { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .sidebar, .topbar, .filters, .btn, #toast, .page-head .actions { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* ------------------------------------------------ timeline stepper (official 10-step schedule) */
.steps { display: flex; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: thin; }
.step { flex: 1 0 112px; position: relative; padding: 0 6px; text-align: center; }
.step::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step.done::before, .step.now::before { background: var(--acc); }
.step .knot { position: relative; z-index: 1; width: 30px; height: 30px; margin: 0 auto 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.step.done .knot { border-color: var(--acc); background: var(--acc); color: #fff; }
.step.now .knot { border-color: var(--acc); color: var(--acc-ink); box-shadow: 0 0 0 5px var(--acc-soft); }
.step .s-t { font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.step .s-d { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.step.now .s-t { color: var(--acc-ink); }
.step .tagp { display: inline-block; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 6px; margin-bottom: 4px; }
