/* Kentora cockpit: layout + components. Tokens in /shared/tokens.css. */
@import url('/shared/tokens.css');

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px 12px; gap: 4px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand-mark { width: 28px; height: 28px; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-name span { color: var(--ink-3); font-weight: 500; }
.biz-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; margin-bottom: 10px; }
.biz-switch:hover { background: var(--surface-3); }
.biz-switch .biz-logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #f4b860, #d9822b); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.biz-switch .biz-text { min-width: 0; flex: 1; }
.biz-switch .biz-text strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-switch .biz-text span { font-size: 11.5px; color: var(--ink-3); }
.nav-group { margin-top: 10px; }
.nav-group-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 6px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 520; font-size: 13.5px; text-decoration: none; position: relative; }
.nav-item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav-item.is-active { background: var(--accent-wash); color: var(--accent-ink); }
.nav-item .nav-count { margin-left: auto; font-size: 11px; font-weight: 650; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.nav-item .nav-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; }
.nav-item .nav-soon { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.credit-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); text-decoration: none; }
.credit-chip:hover { text-decoration: none; background: var(--surface-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar .search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); cursor: text; }
.topbar .search input { border: 0; outline: 0; background: transparent; flex: 1; color: var(--ink); }
.topbar .spacer { flex: 1; }
.icon-btn.mobile-menu, .mobile-menu { display: none; }
.content { padding: 8px 28px 56px; max-width: 1320px; width: 100%; margin: 0 auto; }
.demo-banner { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 7px 16px; background: var(--ink); color: #fff; font-size: 12.5px; }
.demo-banner a { color: #fff; text-decoration: underline; }
.demo-banner button { background: rgba(255,255,255,.14); border: 0; color: #fff; padding: 3px 10px; border-radius: 999px; cursor: pointer; font-size: 12px; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-3); }
  .sidebar.is-open { transform: none; }
  .icon-btn.mobile-menu, .mobile-menu { display: inline-grid; }
  .content { padding: 8px 16px 48px; }
  .topbar { padding: 0 16px; }
  .topbar .search { display: none; }
}

/* ---------------------------------------------------------------- page structure */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head .soft { margin-top: 4px; max-width: 720px; }
.page-head .back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 16px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------------------------------------------------------------- card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-title p { font-size: 12.5px; margin-top: 2px; }
.card-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.card-actions { display: flex; gap: 6px; align-items: center; }
.card-body { padding: 14px 18px 18px; }
.card-flush .card-body { padding: 0; }
.card-flush .card-head { padding-bottom: 12px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------------------------------------------------------------- stat tiles */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-1); position: relative; min-width: 0; }
.stat.is-clickable { cursor: pointer; } .stat.is-clickable:hover { border-color: var(--line-2); }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 520; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.15; }
.stat-foot { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12.5px; flex-wrap: wrap; }
.stat-trend { position: absolute; right: 16px; bottom: 14px; }
.stat:has(.stat-trend) .stat-foot { padding-right: 104px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; padding: 1px 6px; border-radius: 999px; }
.delta-good { color: var(--good-ink); background: var(--good-wash); }
.delta-bad { color: var(--bad-ink); background: var(--bad-wash); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(47,107,255,.35), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.95); }
.btn-good { background: var(--good); color: #fff; }
.btn-wa { background: var(--wa); color: #06331d; }
.btn-wa:hover:not(:disabled) { filter: brightness(.96); }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; cursor: pointer; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.is-active { background: var(--accent-wash); color: var(--accent-ink); }
.icon-btn-sm { width: 30px; height: 30px; }
.icon-btn-lg { width: 40px; height: 40px; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spin-lg { width: 22px; height: 22px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--surface-3); color: var(--ink-2); }
.badge-good { background: var(--good-wash); color: var(--good-ink); }
.badge-warn { background: var(--warn-wash); color: var(--warn-ink); }
.badge-bad { background: var(--bad-wash); color: var(--bad-ink); }
.badge-info, .badge-accent { background: var(--accent-wash); color: var(--accent-ink); }
.badge-wa { background: color-mix(in srgb, var(--wa) 18%, transparent); color: var(--wa-dark); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; background: transparent; color: var(--ink-3); font-weight: 600; font-size: 13.5px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-count { font-size: 11px; background: var(--surface-3); color: var(--ink-2); padding: 0 6px; border-radius: 999px; line-height: 18px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-3); }
.segmented button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow: auto; border-radius: inherit; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; } .table th svg { display: inline; vertical-align: -2px; margin-left: 2px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.table-dense td { padding: 7px 12px; } .table-dense th { padding: 8px 12px; }
.table-click tbody tr { cursor: pointer; } .table-click tbody tr:hover td { background: var(--surface-2); }
.cell-main { font-weight: 600; } .cell-sub { font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.field-error { font-size: 12px; color: var(--bad-ink); font-weight: 550; }
.field.has-error .input { border-color: var(--bad); }
.field-inline { flex-direction: row; align-items: center; justify-content: space-between; }
.input { width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.input:disabled { background: var(--surface-3); color: var(--ink-3); }
.select { 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='%236e7787' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); overflow: hidden; }
.input-group:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.input-group .input { border: 0; box-shadow: none !important; border-radius: 0; }
.input-affix { display: grid; place-items: center; padding: 0 10px; color: var(--ink-3); background: var(--surface-2); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--ring); }
.toggle-text { display: flex; flex-direction: column; } .toggle-text .muted { font-size: 12px; }
.toggle.is-disabled { opacity: .55; cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.radio-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface); }
.radio-card:hover { border-color: var(--ink-3); }
.radio-card.is-checked { border-color: var(--accent); background: var(--accent-wash); box-shadow: 0 0 0 1px var(--accent) inset; }
.radio-card input { position: absolute; opacity: 0; }
.radio-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; margin-top: 1px; }
.radio-card.is-checked .radio-dot { border: 5px solid var(--accent); }
.radio-text { display: flex; flex-direction: column; gap: 2px; } .radio-text > span:first-child { font-weight: 600; } .radio-text .muted { font-size: 12.5px; }

/* ---------------------------------------------------------------- feedback */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 13.5px; }
.callout > svg { flex: none; margin-top: 1px; }
.callout-body { flex: 1; } .callout strong { display: block; margin-bottom: 2px; }
.callout-info { background: var(--info-wash); border-color: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink); } .callout-info > svg { color: var(--accent); }
.callout-good { background: var(--good-wash); border-color: color-mix(in srgb, var(--good) 25%, transparent); } .callout-good > svg { color: var(--good); }
.callout-warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 35%, transparent); } .callout-warn > svg { color: var(--warn-ink); }
.callout-bad { background: var(--bad-wash); border-color: color-mix(in srgb, var(--bad) 30%, transparent); } .callout-bad > svg { color: var(--bad); }
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); margin-bottom: 6px; }
.empty p { max-width: 420px; }
.empty-action { margin-top: 10px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; }
.is-refreshing { opacity: .6; transition: opacity .15s; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-3); font-size: 13.5px; font-weight: 520; max-width: min(560px, 92vw); pointer-events: auto; animation: rise .18s ease-out; }
.toast-success svg { color: #4ade80; } .toast-error { background: var(--bad); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s; }
.progress-good span { background: var(--good); } .progress-warn span { background: var(--warn); } .progress-bad span { background: var(--bad); }

/* ---------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; z-index: 60; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-3); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.modal-head .soft { font-size: 13px; margin-top: 3px; }
.modal-body { padding: 12px 20px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.overlay-drawer { place-items: stretch end; padding: 0; }
.drawer { background: var(--surface); height: 100vh; display: flex; flex-direction: column; box-shadow: var(--shadow-3); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px 24px; }
.drawer .modal-foot { border-radius: 0; }
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); padding: 6px; z-index: 50; animation: pop .12s ease-out; }
.menu-right { right: 0; } .menu-left { left: 0; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-header { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 6px 10px 4px; font-weight: 600; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); font-size: 13.5px; }
.menu-item:hover { background: var(--surface-3); } .menu-item.is-danger { color: var(--bad-ink); } .menu-item span { flex: 1; }

/* ---------------------------------------------------------------- misc */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); font-weight: 650; flex: none; object-fit: cover; }
.avatar-accent { background: var(--accent-wash); color: var(--accent-ink); } .avatar-good { background: var(--good-wash); color: var(--good-ink); } .avatar-warn { background: var(--warn-wash); color: var(--warn-ink); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin: 0; }
.kv dt { font-size: 12px; color: var(--ink-3); } .kv dd { margin: 2px 0 0; font-weight: 600; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 550; font-size: 13px; }
.steps li + li::before { content: ''; width: 24px; height: 1px; background: var(--line-2); margin-right: 2px; }
.steps-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--ink-3); }
.steps li.is-current { color: var(--ink); } .steps li.is-current .steps-dot { background: var(--accent); color: #fff; }
.steps li.is-done .steps-dot { background: var(--good); color: #fff; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; }
.list-item.is-clickable { cursor: pointer; } .list-item.is-clickable:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; } .list-item .sub { font-size: 12.5px; color: var(--ink-3); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--ink-3); }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; color: var(--ink-2); }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; padding-left: 0; }
.chart-svg { width: 100%; display: block; overflow: visible; }
.chart-bar { transition: opacity .12s; } g:hover > .chart-bar, g:focus > .chart-bar { opacity: .82; }
.chart-yaxis { position: absolute; left: 0; top: 0; width: 40px; pointer-events: none; }
.chart-yaxis span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--chart-muted); font-variant-numeric: tabular-nums; }
.chart-xaxis { display: flex; font-size: 11px; color: var(--chart-muted); margin-top: -22px; height: 22px; align-items: center; pointer-events: none; }
.chart-xaxis span { text-align: center; white-space: nowrap; overflow: visible; display: flex; justify-content: center; }
.chart-xaxis-abs { position: relative; margin-top: -22px; display: block; }
.chart-xaxis-abs span { position: absolute; transform: translateX(-50%); top: 4px; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-2); padding: 8px 10px; min-width: 140px; font-size: 12px; }
.chart-tip-title { color: var(--ink-3); margin-bottom: 4px; font-weight: 550; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tip-row strong { font-size: 13px; color: var(--ink); } .chart-tip-row span { color: var(--ink-3); }
.chart-tip-row i.k-line { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }
.chart-tip-row i.k-box { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i.k-line { width: 14px; height: 0; border-top: 2px solid; display: inline-block; }
.chart-legend i.k-dash { width: 14px; height: 0; border-top: 2px dashed; display: inline-block; }
.chart-legend i.k-box { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.chart-endlabel { position: absolute; transform: translateY(-50%); font-size: 11.5px; font-weight: 650; color: var(--ink); pointer-events: none; white-space: nowrap; }
.chart-peak { position: absolute; transform: translate(-50%, -130%); font-size: 11px; font-weight: 650; color: var(--ink-2); pointer-events: none; }
.barlist { display: flex; flex-direction: column; gap: 10px; }
.barlist-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto; align-items: center; gap: 12px; }
.barlist-row.is-clickable { cursor: pointer; } .barlist-row.is-clickable:hover .barlist-label span:first-child { color: var(--accent-ink); }
.barlist-label { display: flex; flex-direction: column; min-width: 0; } .barlist-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; } .barlist-label .muted { font-size: 11.5px; }
.barlist-track { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.barlist-track span { display: block; height: 100%; background: var(--series-1); border-radius: 999px; }
.barlist-value { font-weight: 650; font-size: 13px; min-width: 64px; text-align: right; }
.meter-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.meter-track { height: 8px; border-radius: 999px; overflow: hidden; }
.meter-track span { display: block; height: 100%; border-radius: inherit; }
.meter-accent { background: var(--accent-wash); } .meter-accent span { background: var(--accent); }
.meter-warn { background: var(--warn-wash); } .meter-warn span { background: var(--warn); }
.meter-bad { background: var(--bad-wash); } .meter-bad span { background: var(--bad); }
.meter-good { background: var(--good-wash); } .meter-good span { background: var(--good); }
.score-ring-text { font-size: 13px; font-weight: 700; fill: var(--ink); }

/* ---------------------------------------------------------------- auth pages inside the SPA (MFA, onboarding) */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-2); padding: 28px; }
