/* Kit Studio v2 - base components. Needs core/tokens.css. Section order: reset, type, layout/shell, buttons, forms, cards, badges, tabs,
   tables, overlays (modal, sheet, popover, menu, toast, tooltip, command palette), feedback (skeleton, empty, callout), data (kpi, progress, timeline), art. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink-2); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss03"; }
h1, h2, h3, h4, h5 { color: var(--ink); margin: 0; letter-spacing: -.012em; line-height: 1.25; font-weight: 650; }
p { margin: 0; }
a { color: var(--teal-700); text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; color: inherit; }
img, svg { max-width: 100%; }
::selection { background: var(--teal-200); }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); }
.ic { flex: none; vertical-align: middle; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.sp { flex: 1; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.skip-link { position: fixed; left: 12px; top: -52px; z-index: 1000; background: var(--teal-700); color: #fff; padding: 8px 14px; border-radius: 8px; transition: top .15s; text-decoration: none; }
.skip-link:focus { top: 10px; }
kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: #fff; line-height: 1.5; }

/* ---------- motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes ping { 0% { transform: scale(.8); opacity: .7; } 80%, 100% { transform: scale(2.2); opacity: 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { from { stroke-dashoffset: var(--len, 1000); } to { stroke-dashoffset: 0; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -10px); } }
.reveal { opacity: 0; animation: fadeUp .55s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms); }
.spin { animation: spin .8s linear infinite; }
html.static .reveal, html.static *, html.static *::before, html.static *::after { animation: none !important; transition: none !important; }
html.static .reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } .reveal { opacity: 1; } }

/* ---------- app shell ---------- */
#app { min-height: 100vh; }
#sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; transition: width .24s var(--ease), transform .24s var(--ease); overflow: hidden; }
#sidebar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; background: radial-gradient(260px 160px at 20% -10%, rgba(0,154,159,.12), transparent 70%); pointer-events: none; }
#sidebar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 200px; background-image: var(--sb-art, none); background-size: 360px; background-position: 50% 100%; background-repeat: no-repeat; opacity: .5; pointer-events: none; -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
#main { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; transition: margin-left .24s var(--ease); }
body.sb-collapsed { --sb-w: 72px; }
body.is-bare #sidebar, body.is-bare #topbar, body.is-bare #foot { display: none; }
body.is-bare #main { margin-left: 0; }
body.is-bare #view { padding: 0; }
.sb-head { position: relative; z-index: 1; height: var(--tb-h); display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 20px; flex: none; }
.wordmark { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.wm-mark { display: inline-flex; flex: none; filter: drop-shadow(0 3px 6px rgba(0,96,99,.28)); }
.wm-text { display: flex; flex-direction: column; line-height: 1.1; }
.wm-text b { font-size: 16px; letter-spacing: -.02em; color: var(--ink); font-weight: 700; }
.wm-text small { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.sb-scroll { position: relative; z-index: 1; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 12px; scrollbar-width: thin; }
.ws-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; border-radius: 12px; text-align: left; box-shadow: var(--shadow-1); transition: border-color var(--dur), box-shadow var(--dur); }
.ws-btn:hover { border-color: var(--teal-300); box-shadow: 0 0 0 3px var(--teal-50); }
.ws-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: none; font-weight: 700; font-size: 11.5px; letter-spacing: .02em; border: 1px solid var(--teal-100); }
.ws-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.ws-text b { font-size: 13.5px; color: var(--ink); font-weight: 600; } .ws-text small { font-size: 11.5px; color: var(--muted); }
.ws-btn .ic { color: var(--muted-2); }
.sb-add { width: 100%; margin: 12px 0 6px; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 600; padding: 18px 12px 6px; white-space: nowrap; }
.nav-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap; position: relative; transition: background var(--dur), color var(--dur); }
.nav-a:hover { background: #f1f6f6; color: var(--ink); }
.nav-a .ic { color: var(--muted-2); transition: color var(--dur), transform .2s var(--ease); }
.nav-a:hover .ic { color: var(--teal-700); transform: translateX(1px); }
.nav-a.active { background: linear-gradient(90deg, var(--teal-50), rgba(238,248,248,.35)); color: var(--teal-800); font-weight: 600; }
.nav-a.active .ic { color: var(--teal-700); }
.nav-a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal-700); }
.nav-count { margin-left: auto; font-size: 11.5px; background: var(--teal-100); color: var(--teal-800); border-radius: 99px; padding: 0 8px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav-count.live { background: var(--teal-700); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.nav-count.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7ff0e0; animation: pulse 1.4s infinite; }
.nav-ext { margin-left: auto; color: var(--muted-2); display: inline-flex; }
.sb-foot { position: relative; z-index: 1; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: rgba(255,255,255,.85); backdrop-filter: blur(6px); flex: none; display: grid; gap: 8px; }
.sb-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.sample-mark { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--warn); background: var(--warn-bg); padding: 3px 10px; border-radius: 99px; font-weight: 500; white-space: nowrap; border: 1px solid var(--warn-line); cursor: help; }
.sample-mark i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.sb-help { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 6px; border-radius: 8px; }
.sb-help:hover { color: var(--teal-700); background: var(--teal-25); }
.user-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: transparent; text-align: left; transition: background var(--dur), border-color var(--dur); }
.user-card:hover { background: #f1f6f6; border-color: var(--line); }
.user-card .ut { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; } .user-card b { font-size: 13.5px; color: var(--ink); font-weight: 600; } .user-card small { font-size: 11.5px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--teal-700), var(--teal-500)); color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .02em; display: inline-grid; place-items: center; flex: none; box-shadow: 0 2px 6px rgba(0,96,99,.25); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; box-shadow: none; } .avatar.soft { background: var(--teal-100); color: var(--teal-800); box-shadow: none; }
.avatar.c1 { background: linear-gradient(135deg, #7b7bd0, #a5a5e8); } .avatar.c2 { background: linear-gradient(135deg, #d4527a, #ea84a3); } .avatar.c3 { background: linear-gradient(135deg, #e5841c, #f2ae60); } .avatar.c4 { background: linear-gradient(135deg, #3d8fb3, #6bc0e0); }
body.sb-collapsed .wm-text, body.sb-collapsed .nav-sec span, body.sb-collapsed .nav-label, body.sb-collapsed .nav-count, body.sb-collapsed .nav-ext, body.sb-collapsed .ws-text, body.sb-collapsed .ws-btn > .ic, body.sb-collapsed .user-card .ut, body.sb-collapsed .user-card > .ic, body.sb-collapsed .sample-mark span, body.sb-collapsed .sb-help span, body.sb-collapsed .sb-add .lbl { display: none; }
body.sb-collapsed .sb-head { flex-direction: column; justify-content: center; padding: 0; gap: 2px; height: 92px; }
body.sb-collapsed .sb-head .sb-collapse { display: none; }
body.sb-collapsed .sb-scroll { padding-left: 11px; padding-right: 11px; }
body.sb-collapsed .nav-a { padding: 0; justify-content: center; } body.sb-collapsed .nav-a.active::before { left: -11px; }
body.sb-collapsed .nav-sec { height: 1px; padding: 0; margin: 12px 8px; background: var(--line); font-size: 0; }
body.sb-collapsed .ws-btn { padding: 6px; justify-content: center; }
body.sb-collapsed .sb-add { padding: 0; }
body.sb-collapsed .sb-meta { justify-content: center; } body.sb-collapsed .sample-mark { padding: 3px 6px; }
body.sb-collapsed .user-card { justify-content: center; padding: 6px 0; }
body.sb-collapsed #sidebar::after { display: none; }
.icon-btn.sb-expand { display: none; }
body.sb-collapsed .icon-btn.sb-expand { display: inline-grid; }

#topbar { position: sticky; top: 0; z-index: 30; height: var(--tb-h); background: rgba(255,255,255,.82); backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; gap: 16px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 14px; min-width: 0; white-space: nowrap; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 3px 6px; border-radius: 6px; } .crumbs a:hover { color: var(--teal-700); background: var(--teal-25); }
.crumbs .sep { color: var(--line-2); display: inline-flex; }
.crumbs .cur { color: var(--ink); font-weight: 600; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; align-items: center; gap: 8px; flex: none; }
.tb-search { display: flex; align-items: center; gap: 10px; width: 330px; height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: 11px; background: #f7f9f9; color: var(--muted-2); font-size: 14px; text-align: left; transition: border-color var(--dur), box-shadow var(--dur), background var(--dur); }
.tb-search:hover { background: #fff; border-color: var(--teal-300); box-shadow: 0 0 0 3px var(--teal-50); }
.tb-search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tb-search kbd { background: #fff; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); display: inline-grid; place-items: center; transition: background var(--dur), color var(--dur), transform .1s; }
.icon-btn:hover { background: #edf3f3; color: var(--ink); } .icon-btn:active { transform: scale(.94); } .icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); border: 2px solid #fff; }
.menu-toggle { display: none; }

#view { flex: 1; padding: 32px 40px 24px; outline: none; min-width: 0; }
#view.route-in { animation: fadeIn .3s var(--ease); }
#foot { padding: 12px 40px 28px; }
.foot-in { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted-2); max-width: 880px; line-height: 1.5; }
.foot-in .ic { margin-top: 2px; }
.foot-in button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.page { max-width: 1240px; margin: 0 auto; display: grid; gap: 24px; }
.page.narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-head h1 { font-size: 28px; letter-spacing: -.025em; font-weight: 700; }
.lede { margin-top: 6px; color: var(--muted); max-width: 640px; font-size: 15px; }
.ph-actions { display: flex; gap: 10px; flex: none; align-items: center; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--teal-600); font-weight: 600; margin-bottom: 6px; }

/* ---------- buttons ---------- */
.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: #fff; color: var(--ink-2); font-weight: 550; font-size: 14px; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-1); transition: background var(--dur), border-color var(--dur), transform .1s, box-shadow var(--dur), color var(--dur); user-select: none; }
.btn:hover { background: #f6f9f9; border-color: var(--teal-300); color: var(--ink); }
.btn:active { transform: scale(.975); }
.btn.primary { background: linear-gradient(180deg, #0a7578, #006063); border-color: var(--teal-800); color: #fff; box-shadow: 0 1px 2px rgba(0,60,62,.3), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: linear-gradient(180deg, #006a6d, #004d50); color: #fff; box-shadow: 0 6px 16px -4px rgba(0,96,99,.45); }
.btn.soft { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-800); box-shadow: none; } .btn.soft:hover { background: var(--teal-100); border-color: var(--teal-200); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); } .btn.ghost:hover { background: #e9f0f0; border-color: transparent; }
.btn.danger { background: #fff; border-color: var(--bad-line); color: var(--bad); } .btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; } .btn.danger.solid:hover { background: #b9301e; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.btn.loading { pointer-events: none; opacity: .85; }
.btn .spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; margin-left: -1px; } .btn-group .btn:first-child { border-radius: 10px 0 0 10px; margin: 0; } .btn-group .btn:last-child { border-radius: 0 10px 10px 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal-700); font-weight: 550; font-size: inherit; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); display: flex; align-items: center; gap: 6px; }
.input, .select, .textarea { width: 100%; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 13px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); transition: border-color var(--dur), box-shadow var(--dur), background var(--dur); }
.textarea { height: auto; min-height: 92px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--teal-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--ring); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(210,63,43,.14); }
.input:disabled { background: #f3f6f6; color: var(--muted-2); }
.select { appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a959c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ic:first-child { position: absolute; left: 13px; color: var(--muted-2); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.input-wrap > .input-end { position: absolute; right: 6px; }
.input-wrap > .input.has-end { padding-right: 44px; }
.check, .radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); user-select: none; }
.check input, .radio input { appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--line-2); border-radius: 5px; background: #fff; display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: all var(--dur); }
.radio input { border-radius: 50%; }
.check input:hover, .radio input:hover { border-color: var(--teal-500); }
.check input:checked { background: var(--teal-700); border-color: var(--teal-700); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.radio input:checked { border-color: var(--teal-700); border-width: 5px; }
.check input:focus-visible, .radio input:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.switch { width: 40px; height: 23px; border-radius: 99px; border: 0; background: var(--line-2); position: relative; padding: 0; flex: none; transition: background .2s; }
.switch i { position: absolute; left: 2px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--teal-700); } .switch[aria-checked="true"] i { transform: translateX(17px); }
.switch:disabled { opacity: .5; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: #eaf0f0; gap: 2px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; transition: all var(--dur); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"], .seg button.on { background: #fff; color: var(--teal-800); box-shadow: 0 1px 3px rgba(0,40,42,.14); }
.seg.icons button { padding: 0 9px; }
.range { appearance: none; width: 100%; height: 22px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--teal-500) var(--p, 50%), var(--line-2) var(--p, 50%)); }
.range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--teal-700); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); } .range::-moz-range-progress { height: 4px; background: var(--teal-500); border-radius: 4px; }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--teal-700); }
.stepper-n { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper-n button { width: 34px; height: 38px; border: 0; background: transparent; color: var(--muted); } .stepper-n button:hover { background: var(--teal-25); color: var(--teal-700); }
.stepper-n output { min-width: 44px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); position: relative; min-width: 0; }
.card.pad { padding: 22px; }
.card.hover { transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; } .card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--teal-200); }
.card.flat { box-shadow: none; }
.card.hero { background: var(--grad-hero); overflow: hidden; border-color: var(--teal-100); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h2, .card-h h3 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-h > .hint { margin: 0; text-align: right; }
.hint { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; font-weight: 400; }
.backdrop { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.backdrop > svg { position: absolute; }
.card > *:not(.backdrop) { position: relative; z-index: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 16px 0; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: var(--ink-2); border: 1px solid transparent; transition: background var(--dur), border-color var(--dur); }
.link-card:hover { background: var(--teal-25); border-color: var(--teal-100); }

/* ---------- badges, chips, pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.neutral { background: #eef1f2; color: var(--muted); border-color: var(--line-2); }
.badge.strong { background: var(--teal-700); color: #fff; } .badge.include { background: var(--teal-100); color: var(--teal-800); border-color: var(--teal-200); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 550; padding: 2px 9px; border-radius: 99px; background: #eef2f2; color: var(--muted); line-height: 1.5; white-space: nowrap; }
.pill.teal { background: var(--teal-50); color: var(--teal-800); border: 1px solid var(--teal-100); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: all var(--dur); }
button.chip:hover, a.chip:hover { border-color: var(--teal-400); color: var(--teal-800); background: var(--teal-25); }
.chip.on { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
button.chip.on:hover { background: var(--teal-800); color: #fff; }
.chip .x { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; border-radius: 50%; border: 0; background: rgba(0,96,99,.1); color: var(--teal-800); padding: 0; } .chip .x:hover { background: rgba(0,96,99,.22); }
.chip.filter { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-900); font-size: 13px; height: 30px; }
.chip .n { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.chip.ghost { border-style: dashed; color: var(--muted); }
.chip.page { height: 26px; padding: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--teal-800); background: var(--teal-50); border-color: var(--teal-100); font-variant-numeric: tabular-nums; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; border: 0; background: none; padding: 12px 14px; font-size: 14.5px; font-weight: 550; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: color var(--dur); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--teal-800); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--teal-700); }
.tab .count { font-size: 12px; background: #edf1f1; color: var(--muted); border-radius: 99px; padding: 0 7px; line-height: 19px; font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .count { background: var(--teal-100); color: var(--teal-800); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: relative; }
.table th:first-child { border-top-left-radius: var(--radius); } .table th:last-child { border-top-right-radius: var(--radius); }
.table th.sortable { cursor: pointer; user-select: none; } .table th.sortable:hover { color: var(--teal-700); }
.table th .sort-ic { margin-left: 4px; opacity: .35; vertical-align: -3px; } .table th.sorted { color: var(--teal-800); } .table th.sorted .sort-ic { opacity: 1; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur); } .table tbody tr.clickable { cursor: pointer; } .table tbody tr:hover { background: var(--teal-25); }
.table .r { text-align: right; } .table .c { text-align: center; }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .cell-main b { color: var(--ink); font-weight: 600; display: block; } .table .cell-main small { color: var(--muted); font-size: 12.5px; display: block; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8,28,30,.42); backdrop-filter: blur(3px); animation: fadeIn .18s var(--ease); display: grid; place-items: center; padding: 24px; }
.overlay.sheet-o { display: block; padding: 0; background: rgba(8,28,30,.3); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 48px); background: #fff; border-radius: 20px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: pop .22s var(--ease); overflow: hidden; }
.modal.sm { width: min(420px, 100%); } .modal.lg { width: min(760px, 100%); } .modal.xl { width: min(1000px, 100%); }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 8px; }
.modal-h h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; } .modal-h .hint { margin-top: 4px; }
.modal-b { padding: 8px 24px 20px; overflow-y: auto; color: var(--ink-2); }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line-3); background: var(--surface-2); }
.modal-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); margin-bottom: 4px; }
.modal-ic.danger { background: var(--bad-bg); color: var(--bad); }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: #fff; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slideIn .28s var(--ease); border-left: 1px solid var(--line); }
.sheet.lg { width: min(720px, 100vw); }
.sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); background: var(--grad-soft); }
.sheet-h h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.sheet-b { flex: 1; overflow-y: auto; padding: 22px 24px 28px; }
.sheet-f { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }
.popover { position: fixed; z-index: 120; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); animation: pop .16s var(--ease); max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; }
.popover.pad { padding: 14px; }
.menu { padding: 6px; min-width: 220px; }
.menu-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); padding: 8px 10px 4px; font-weight: 600; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 9px; padding: 8px 10px; text-align: left; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.menu-item:hover, .menu-item:focus-visible { background: #eff5f5; outline: none; }
.menu-item .ic { color: var(--muted-2); } .menu-item.on { color: var(--teal-800); font-weight: 600; } .menu-item.on .ic.chk { color: var(--teal-700); }
.menu-item .mi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; } .menu-item small { color: var(--muted); font-size: 12px; }
.menu-item.danger, .menu-item.danger .ic { color: var(--bad); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.opt-list { padding: 6px; display: grid; gap: 1px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.opt:hover { background: #eff5f5; } .opt .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .opt .n { color: var(--muted-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.opt.dim { opacity: .45; }
.pop-search { padding: 8px 8px 2px; } .pop-search .input { height: 36px; font-size: 13.5px; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line-3); background: var(--surface-2); position: sticky; bottom: 0; }
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; background: #0d2527; color: #fff; padding: 11px 14px 11px 16px; border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.28); font-size: 14px; animation: fadeUp .28s var(--ease); max-width: min(560px, 92vw); }
.toast .ic { color: var(--teal-300); } .toast.error .ic { color: #ff9a8a; } .toast.warn .ic { color: #ffc27a; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
.toast button { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 7px; padding: 3px 10px; font-weight: 600; font-size: 13px; } .toast button:hover { background: rgba(255,255,255,.22); }
.tooltip { position: fixed; z-index: 400; background: #0d2527; color: #fff; font-size: 12.5px; line-height: 1.4; padding: 6px 10px; border-radius: 8px; pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; max-width: 280px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.tooltip.show { opacity: 1; transform: none; }
.tooltip b { color: #fff; } .tooltip .tt-sub { color: #b9d5d6; }
/* command palette */
.cmdk { width: min(640px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow-3); overflow: hidden; animation: pop .2s var(--ease); align-self: start; margin-top: 12vh; }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); height: 58px; color: var(--muted-2); }
.cmdk-in input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--ink); background: transparent; height: 100%; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px 8px 8px; }
.cmdk-g { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 600; padding: 12px 10px 5px; }
.cmdk-i { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--ink-2); }
.cmdk-i.on { background: var(--teal-50); }
.cmdk-i .ci { width: 32px; height: 32px; border-radius: 9px; background: #f0f5f5; color: var(--teal-700); display: grid; place-items: center; flex: none; }
.cmdk-i.on .ci { background: #fff; box-shadow: var(--shadow-1); }
.cmdk-i .ct { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; } .cmdk-i .ct b { color: var(--ink); font-weight: 600; font-size: 14.5px; } .cmdk-i .ct small { color: var(--muted); font-size: 12.5px; }
.cmdk-i mark { background: rgba(0,154,159,.18); color: inherit; border-radius: 3px; padding: 0 1px; }
.cmdk-i .go { color: var(--muted-2); opacity: 0; } .cmdk-i.on .go { opacity: 1; }
.cmdk-foot { display: flex; gap: 18px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); background: var(--surface-2); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 6px; }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 4px; }

/* ---------- feedback ---------- */
.skel { background: linear-gradient(90deg, #eef2f2 25%, #f8fafa 40%, #eef2f2 55%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
.skel.line { height: 12px; } .skel.block { height: 100px; border-radius: 14px; }
.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 6px; }
.empty .art { width: min(260px, 70%); margin-bottom: 8px; }
.empty h2, .empty h3 { font-size: 19px; font-weight: 700; } .empty p { color: var(--muted); max-width: 440px; margin: 0 auto; }
.empty .actions { display: flex; gap: 10px; margin-top: 14px; justify-content: center; flex-wrap: wrap; }
.empty.card { padding: 56px 24px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.callout .ic { margin-top: 2px; } .callout b { color: inherit; }
.callout.info { background: var(--teal-50); color: var(--teal-900); border: 1px solid var(--teal-100); }
.callout.good { background: var(--ok-bg); color: #145f2b; border: 1px solid var(--ok-line); }
.callout.warn { background: var(--warn-bg); color: #7a4608; border: 1px solid var(--warn-line); }
.callout.bad { background: var(--bad-bg); color: #8f2415; border: 1px solid var(--bad-line); }
.callout .btn { margin-left: auto; align-self: center; }
.stub { min-height: 62vh; display: grid; place-items: center; }

/* ---------- data: kpi, progress, timeline ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kpi { padding: 20px 22px; overflow: hidden; display: block; text-decoration: none; color: inherit; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-label { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; }
.kpi-val { font-size: 36px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 6px; }
.kpi-sub { font-size: 13px; color: var(--muted); } .kpi-spark { width: 110px; height: 40px; flex: none; margin-bottom: -4px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; color: var(--ok); } .delta.down { color: var(--bad); }
.progress { height: 8px; border-radius: 99px; background: #e8eeee; overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--teal-500), var(--teal-400)); transition: width 1s var(--ease); }
.progress.thin { height: 5px; } .progress.amber > i { background: linear-gradient(90deg, var(--amber), #f2ae60); }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring > svg { transform: rotate(-90deg); display: block; } .ring .r-bg { fill: none; stroke: #e8eeee; } .ring .r-fg { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring b { position: absolute; font-size: 11.5px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; position: relative; display: grid; gap: 4px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--teal-200), var(--line)); border-radius: 2px; }
.timeline li { position: relative; display: flex; gap: 16px; padding: 10px 0; }
.timeline .tl-dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--teal-500); display: grid; place-items: center; flex: none; color: var(--teal-700); z-index: 1; margin-top: 1px; }
.timeline .tl-dot.on { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.timeline .tl-dot.muted { border-color: var(--line-2); color: var(--muted-2); }
.timeline .tl-b b { color: var(--ink); font-weight: 600; } .timeline .tl-b p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > a { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line-3); text-decoration: none; color: inherit; border-radius: 10px; transition: background var(--dur); }
.list > li:last-child, .list > a:last-child { border-bottom: 0; }
.list > a:hover { background: var(--teal-25); }
.list .li-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: none; }
.list .li-ico.warn { background: var(--warn-bg); color: var(--warn); } .list .li-ico.bad { background: var(--bad-bg); color: var(--bad); }
.list .li-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; } .list .li-t b { color: var(--ink); font-weight: 600; font-size: 14.5px; } .list .li-t small { color: var(--muted); font-size: 13px; }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span, .legend button { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 0; font-size: inherit; color: inherit; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.legend.col { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.legend.col > * { width: 100%; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; transition: background var(--dur); } .legend.col button:hover { background: #f1f6f6; cursor: pointer; }
.legend .v { margin-left: auto; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-box { position: relative; width: 100%; min-height: 40px; min-width: 0; } .chart-box canvas { max-width: 100%; display: block; }
[data-chart-host] { position: relative; min-width: 0; }
/* donut: hand-built SVG (core/charts.js). The base style is the finished chart; the animation below only plays "from" a shorter dash, so it always ends fully drawn. */
.dn-box { position: relative; flex: none; max-width: 100%; } .ks-donut { display: block; width: 100%; height: 100%; overflow: visible; }
.ks-donut .dn-track { stroke: #eef2f2; } .ks-donut .dn-v { fill: var(--ink, #0b1415); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .ks-donut .dn-l { fill: var(--muted, #5b6670); font-size: 12px; font-weight: 500; }
.ks-donut .dn-v, .ks-donut .dn-l { font-family: inherit; pointer-events: none; }
.ks-donut .dn-arc { stroke-width: var(--sw); outline: none; transition: stroke-width .16s var(--ease, ease), opacity .16s; animation: dnIn .9s var(--ease, ease) backwards; animation-delay: var(--dn-d, 0ms); }
.ks-donut.click .dn-arc { cursor: pointer; } .ks-donut .dn-arc.hot { stroke-width: var(--swh); } .ks-donut.has-hot .dn-arc:not(.hot) { opacity: .4; }
.ks-donut .dn-arc:focus-visible { stroke-width: var(--swh); }
.legend > .hot { background: #f1f6f6; border-radius: 8px; } .legend.col > .hot { background: #f1f6f6; }
@keyframes dnIn { from { stroke-dasharray: 0 var(--dn-c); opacity: .2; } }
.donut-wrap { display: flex; align-items: center; gap: 22px; } .donut-wrap .chart-box, .donut-wrap .dn-box { flex: none; } .donut-wrap .legend { flex: 1; min-width: 0; }
.art { display: block; width: 100%; height: auto; }
.art .s { fill: none; stroke: var(--teal-700); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.art .s2 { fill: none; stroke: var(--teal-400); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.art .s3 { fill: none; stroke: var(--teal-200); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.art .f { fill: var(--teal-50); stroke: var(--teal-700); stroke-width: 1.5; stroke-linejoin: round; }
.art .f2 { fill: var(--teal-100); stroke: var(--teal-700); stroke-width: 1.5; stroke-linejoin: round; }
.art .fw { fill: #fff; stroke: var(--teal-700); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.art .fill-t { fill: var(--teal-100); stroke: none; } .art .fill-t2 { fill: var(--teal-200); stroke: none; } .art .fill-t3 { fill: var(--teal-700); stroke: none; }
.art .acc { fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } .art .acc-f { fill: var(--amber); stroke: none; } .art .acc-s { fill: #fdf1e0; stroke: var(--amber); stroke-width: 1.5; stroke-linejoin: round; }
.art .cy { fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } .art .cy-f { fill: rgba(74,195,224,.18); stroke: var(--cyan); stroke-width: 1.5; stroke-linejoin: round; }
.art .dash { stroke-dasharray: 4 4; }
.art .flo { animation: drift 7s ease-in-out infinite; }

/* ---------- responsive shell ---------- */
@media (max-width: 1280px) { #view { padding: 28px 28px 20px; } #topbar { padding: 0 24px; } #foot { padding: 12px 28px 24px; } .tb-search { width: 270px; } }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-21 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  #sidebar { transform: translateX(-100%); width: 280px; }
  body.sb-open #sidebar { transform: none; box-shadow: var(--shadow-3); }
  #main, body.sb-collapsed #main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  #view { padding: 20px 16px; } #topbar { padding: 0 12px; } .tb-search { width: 40px; padding: 0; justify-content: center; } .tb-search span, .tb-search kbd { display: none; }
  .kpis, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- chart components: ring animation, funnel, frequency lanes ---------- */
@keyframes ringIn { from { stroke-dashoffset: var(--c); } }
.ring .r-fg { animation: ringIn 1.1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(.05); opacity: 0; } }
@keyframes dotIn { from { transform: scale(0); opacity: 0; } }
.funnel { display: grid; gap: 12px; }
.fn-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; gap: 16px; align-items: center; }
.fn-l b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.3; } .fn-l small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.fn-track { height: 36px; display: flex; justify-content: center; border-radius: 10px; background: repeating-linear-gradient(90deg, transparent 0 11px, rgba(0,96,99,.045) 11px 12px); }
.fn-bar { width: var(--w); height: 100%; border-radius: 10px; background: linear-gradient(180deg, rgba(0,154,159,var(--o)), rgba(0,96,99,var(--o))); animation: grow .8s var(--ease) both; animation-delay: calc(var(--i) * 110ms); transform-origin: center; min-width: 12px; }
.fn-row.last .fn-bar { box-shadow: 0 6px 18px -6px rgba(0,96,99,.55); }
.fn-v { text-align: right; line-height: 1.2; } .fn-v span { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .fn-v small { display: block; color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.lanes { display: grid; gap: 6px; }
.lane { display: grid; grid-template-columns: 124px minmax(0, 1fr) 30px; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-3); text-align: left; width: 100%; font: inherit; color: inherit; transition: border-color var(--dur), background var(--dur), transform .15s; }
button.lane:hover { border-color: var(--teal-300); background: var(--teal-25); transform: translateX(2px); }
.ln-l { font-size: 13.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.ln-dots { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 10px; }
.ln-dots i { width: 9px; height: 9px; border-radius: 50%; background: #9fd6d8; animation: dotIn .4s var(--ease) both; animation-delay: calc(var(--k) * 14ms); }
.ln-dots i.c { background: #006063; }
.ln-dots em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.ln-n { text-align: right; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- manual page images ---------- */
.page-view { display: grid; place-items: center; background: #eef2f2; border-radius: 12px; padding: 16px; max-height: 70vh; overflow: auto; }
.pv-img { max-width: 100%; width: auto; max-height: 66vh; box-shadow: var(--shadow-2); border-radius: 4px; background: #fff; }
.page-ph { display: grid; place-items: center; gap: 6px; align-content: center; background: repeating-linear-gradient(45deg, #f4f7f7 0 10px, #eef2f2 10px 20px); color: var(--muted-2); font-size: 12.5px; text-align: center; border: 1px dashed var(--line-2); border-radius: 8px; min-height: 120px; padding: 12px; }

.funnel { container-type: inline-size; }
@container (max-width: 520px) { .fn-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; } .fn-track { grid-column: 1 / -1; grid-row: 2; height: 26px; } .fn-v { text-align: right; } }
