:root {
  --canvas: #f4f4f1;
  --canvas-soft: #f9f9f7;
  --surface: rgba(255, 255, 255, .88);
  --surface-solid: #fff;
  --surface-muted: #f5f5f3;
  --ink: #1d1d1f;
  --ink-soft: #5d5d62;
  --ink-faint: #8e8e93;
  --line: rgba(29, 29, 31, .09);
  --line-strong: rgba(29, 29, 31, .14);
  --blue: #1677ff;
  --blue-deep: #0756c9;
  --blue-soft: #e8f2ff;
  --green: #1f9d64;
  --green-soft: #e8f7ef;
  --orange: #e87514;
  --orange-soft: #fff2e5;
  --red: #db3c30;
  --red-soft: #ffebe8;
  --violet: #7357db;
  --violet-soft: #f0edff;
  --sidebar: #202124;
  --sidebar-soft: #2a2b2f;
  --sidebar-ink: #f4f4f4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 24px rgba(20, 20, 20, .035);
  --shadow-md: 0 18px 50px rgba(20, 20, 20, .09), 0 2px 8px rgba(20, 20, 20, .05);
  --shadow-lg: 0 35px 90px rgba(20, 20, 20, .18), 0 8px 24px rgba(20, 20, 20, .08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-width: 248px;
  --topbar-height: 72px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

html { background: var(--canvas); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% -10%, rgba(115, 87, 219, .07), transparent 29rem),
    radial-gradient(circle at 28% 105%, rgba(22, 119, 255, .06), transparent 34rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

::selection { color: var(--ink); background: rgba(22, 119, 255, .18); }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
  opacity: .65;
  z-index: -1;
}

.ambient-one { width: 420px; height: 420px; right: -180px; top: 12%; background: rgba(91, 141, 239, .06); }
.ambient-two { width: 360px; height: 360px; left: 18%; bottom: -220px; background: rgba(119, 92, 214, .055); }

.brand-symbol {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #171719;
  background: #fff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.03em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 5px 16px rgba(0, 0, 0, .08);
}

/* Authentication */
.auth-stage {
  min-height: 100vh;
  display: none;
  flex-direction: column;
  padding: clamp(24px, 4vw, 56px) clamp(24px, 6vw, 88px) 30px;
  position: relative;
  overflow: hidden;
}

.auth-stage.is-visible { display: flex; animation: stage-in .5s cubic-bezier(.2,.75,.25,1) both; }
.auth-stage::before {
  content: "";
  position: absolute;
  width: 760px;
  height: 760px;
  right: -220px;
  top: -280px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 54%, rgba(22,119,255,.14), rgba(115,87,219,.07) 38%, transparent 69%);
  pointer-events: none;
}

.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 720; letter-spacing: -.02em; position: relative; z-index: 1; }
.auth-brand .brand-symbol { color: #fff; background: var(--ink); }

.auth-layout {
  width: min(1180px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: clamp(50px, 7vw, 100px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.auth-story { padding-bottom: 18px; }
.eyebrow { display: inline-block; color: var(--blue-deep); font-size: 11px; font-weight: 760; letter-spacing: .17em; margin-bottom: 24px; }
.auth-story h1 { margin: 0; font-size: clamp(42px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -.055em; font-weight: 690; max-width: 720px; }
.auth-story p { color: var(--ink-soft); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.75; max-width: 570px; margin: 30px 0 36px; }
.auth-proof { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 13px; font-weight: 560; }
.auth-proof i { width: 3px; height: 3px; border-radius: 50%; background: #b6b6b8; }

.login-card {
  padding: 38px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: 0 32px 90px rgba(27, 35, 58, .12), inset 0 0 0 1px rgba(29,29,31,.025);
  backdrop-filter: blur(28px) saturate(140%);
}

.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.login-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: var(--ink); font-weight: 720; }
.login-heading h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.025em; }
.login-heading p { margin: 0; color: var(--ink-faint); font-size: 12px; }
.field-label { display: block; margin: 20px 2px 8px; color: #4b4b50; font-size: 12px; font-weight: 650; }
.input-shell { height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 15px; border-radius: 14px; background: rgba(245,245,243,.88); border: 1px solid transparent; transition: .18s ease; }
.input-shell:focus-within { background: #fff; border-color: rgba(22,119,255,.5); box-shadow: 0 0 0 4px rgba(22,119,255,.09); }
.input-shell > span { color: #8b8b90; }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.input-shell input::placeholder { color: #aaa9ad; }
.input-action { border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 600; cursor: pointer; padding: 8px 0 8px 10px; }
.form-error { min-height: 19px; margin: 10px 2px 0; color: var(--red); font-size: 12px; line-height: 1.5; }
.primary-button { border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.primary-button:hover { background: #303034; transform: translateY(-1px); box-shadow: 0 9px 24px rgba(0,0,0,.16); }
.primary-button:active { transform: scale(.985); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.login-button { width: 100%; height: 52px; margin-top: 5px; }
.login-button svg { width: 17px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: var(--ink-faint); font-size: 11px; }
.login-footnote svg { width: 15px; height: 15px; }
.auth-footer { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 11px; position: relative; z-index: 1; }

/* App shell */
.app-shell { min-height: 100vh; display: none; }
.app-shell.is-visible { display: flex; animation: stage-in .35s ease both; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); padding: 24px 16px 18px; display: flex; flex-direction: column; color: var(--sidebar-ink); background: var(--sidebar); box-shadow: 1px 0 0 rgba(255,255,255,.03); }
.side-brand { min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 10px; margin-bottom: 28px; }
.side-brand .brand-symbol { width: 36px; height: 36px; border-radius: 11px; box-shadow: none; }
.side-brand-copy { display: flex; flex-direction: column; min-width: 0; }
.side-brand-copy strong { color: #fff; font-size: 16px; line-height: 1.15; letter-spacing: -.01em; }
.side-brand-copy small { color: rgba(255,255,255,.48); font-size: 10px; margin-top: 3px; letter-spacing: .08em; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-group-label { color: rgba(255,255,255,.32); font-size: 9px; font-weight: 680; letter-spacing: .13em; margin: 20px 12px 7px; }
.nav-item { width: 100%; height: 43px; padding: 0 12px; border: 0; border-radius: 11px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.61); background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 520; position: relative; transition: .18s ease; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.is-active { color: #fff; background: rgba(255,255,255,.105); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.nav-item.is-active::before { content: ""; position: absolute; left: -16px; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #8ab9ff; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: rgba(219,60,48,.85); font-size: 9px; font-weight: 700; }
.side-spacer { flex: 1; }
.cake-entry { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 12px; border-radius: 14px; color: rgba(255,255,255,.76); background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035)); border: 1px solid rgba(255,255,255,.06); transition: .2s ease; }
.cake-entry:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); color: #fff; }
.cake-entry-icon { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: rgba(138,185,255,.16); color: #a8caff; }
.cake-entry-icon svg { width: 16px; }
.cake-entry > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.cake-entry strong { font-size: 11px; font-weight: 620; }
.cake-entry small { font-size: 9px; color: rgba(255,255,255,.37); margin-top: 3px; }
.cake-entry > svg { width: 14px; opacity: .45; }
.user-card { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.07); background: transparent; display: flex; align-items: center; gap: 10px; padding: 15px 8px 0; color: #fff; cursor: pointer; text-align: left; }
.user-avatar, .compact-avatar { display: grid; place-items: center; border-radius: 50%; color: #202124; background: linear-gradient(145deg, #fff, #d9e7ff); font-weight: 720; }
.user-avatar { width: 34px; height: 34px; font-size: 11px; }
.user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 620; }
.user-copy small { color: rgba(255,255,255,.38); margin-top: 3px; font-size: 9px; }
.user-card > svg { width: 17px; color: rgba(255,255,255,.35); }
.user-menu { position: absolute; left: 18px; right: 18px; bottom: 70px; border-radius: 13px; padding: 6px; background: #313237; border: 1px solid rgba(255,255,255,.08); box-shadow: var(--shadow-lg); }
.user-menu a, .user-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.75); cursor: pointer; font-size: 11px; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: rgba(255,255,255,.07); color: #fff; }
.user-menu svg { width: 15px; }

.workspace { min-width: 0; width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); }
.topbar { height: var(--topbar-height); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 0 34px; background: rgba(244,244,241,.78); border-bottom: 1px solid rgba(29,29,31,.055); backdrop-filter: blur(22px) saturate(145%); }
.mobile-brand { display: none; }
.search-trigger { width: min(430px, 42vw); height: 38px; border: 1px solid var(--line); border-radius: 12px; padding: 0 11px; display: flex; align-items: center; gap: 9px; color: var(--ink-faint); background: rgba(255,255,255,.66); cursor: pointer; transition: .18s ease; }
.search-trigger:hover { background: #fff; border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.search-trigger svg { width: 16px; }
.search-trigger span:nth-child(2) { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; font-size: 11px; }
kbd { border: 1px solid rgba(29,29,31,.1); border-bottom-color: rgba(29,29,31,.18); border-radius: 5px; padding: 2px 5px; color: var(--ink-faint); background: rgba(255,255,255,.72); box-shadow: 0 1px 0 rgba(0,0,0,.03); font: 9px/1.4 inherit; }
.topbar-actions { position: absolute; right: 34px; display: flex; align-items: center; gap: 12px; }
.live-status { display: flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 10px; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: #a5a5aa; box-shadow: 0 0 0 4px rgba(165,165,170,.09); }
.live-status.is-live i { background: var(--green); box-shadow: 0 0 0 4px rgba(31,157,100,.1); }
.live-status.is-warning i { background: var(--orange); box-shadow: 0 0 0 4px rgba(232,117,20,.1); }
.icon-button { width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.65); cursor: pointer; transition: .18s ease; }
.icon-button:hover { background: #fff; box-shadow: var(--shadow-sm); }
.icon-button svg { width: 17px; }
.notice-button { position: relative; }
.notice-button b { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--canvas); border-radius: 10px; color: #fff; background: var(--red); font-size: 8px; }
.compact-avatar { display: none; width: 35px; height: 35px; border: 0; cursor: pointer; }

.content { width: min(1560px, 100%); min-height: calc(100vh - var(--topbar-height)); margin: 0 auto; padding: 34px clamp(24px, 3.2vw, 52px) 64px; outline: 0; }
.page-enter { animation: page-in .34s cubic-bezier(.2,.75,.25,1) both; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-title-wrap .eyebrow { margin: 0 0 9px; color: var(--ink-faint); font-size: 9px; }
.page-title-wrap h1 { margin: 0; font-size: clamp(27px, 2.5vw, 38px); line-height: 1.12; letter-spacing: -.045em; font-weight: 690; }
.page-title-wrap p { margin: 10px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 9px; }
.filter-select, .secondary-button { height: 38px; border: 1px solid var(--line); border-radius: 11px; color: #414146; background: rgba(255,255,255,.76); font-size: 11px; font-weight: 570; }
.filter-select { min-width: 112px; padding: 0 34px 0 12px; outline: none; }
.secondary-button { padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.secondary-button:hover { background: #fff; border-color: var(--line-strong); }
.secondary-button svg { width: 15px; }
.updated-line { display: flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 10px; margin-top: 8px; }
.updated-line svg { width: 13px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.card-pad { padding: 20px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 0; }
.card-header h2 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.card-header p { margin: 6px 0 0; color: var(--ink-faint); font-size: 10px; line-height: 1.5; }
.card-body { padding: 18px 20px 20px; }
.card-link { border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 620; cursor: pointer; }
.card-link:hover { color: var(--blue-deep); }

.metric-card { min-height: 144px; padding: 19px; position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric-top { display: flex; justify-content: space-between; align-items: center; }
.metric-label { color: var(--ink-soft); font-size: 11px; font-weight: 560; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.metric-icon.is-green { color: var(--green); background: var(--green-soft); }
.metric-icon.is-orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.is-violet { color: var(--violet); background: var(--violet-soft); }
.metric-icon svg { width: 16px; }
.metric-value { margin-top: 17px; font-size: clamp(25px, 2.2vw, 34px); font-weight: 680; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--ink-faint); font-size: 9px; }
.delta { display: inline-flex; align-items: center; gap: 3px; border-radius: 7px; padding: 3px 6px; color: var(--green); background: var(--green-soft); font-weight: 650; }
.delta.is-down { color: var(--red); background: var(--red-soft); }
.delta.is-neutral { color: var(--ink-faint); background: var(--surface-muted); }

.attention-band { margin: 17px 0; padding: 18px 20px; border: 1px solid rgba(219,60,48,.13); border-radius: var(--radius); background: linear-gradient(110deg, rgba(255,255,255,.9), rgba(255,238,234,.72)); display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow-sm); }
.attention-icon { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); }
.attention-icon svg { width: 19px; }
.attention-copy { flex: 1; min-width: 0; }
.attention-copy strong { display: block; font-size: 12px; }
.attention-copy span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-stats { display: flex; gap: 22px; }
.attention-stat { text-align: right; }
.attention-stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.attention-stat small { color: var(--ink-faint); font-size: 8px; }

.chart-wrap { position: relative; height: 250px; margin-top: 4px; }
.chart-svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: rgba(29,29,31,.065); stroke-width: 1; }
.chart-area { fill: url(#areaGradient); stroke: none; }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #fff; stroke: var(--blue); stroke-width: 2; }
.chart-label { fill: var(--ink-faint); font-size: 9px; }
.chart-summary { position: absolute; top: 5px; left: 4px; }
.chart-summary b { display: block; font-size: 22px; letter-spacing: -.035em; }
.chart-summary span { color: var(--ink-faint); font-size: 9px; }
.mini-legend { display: flex; align-items: center; gap: 7px; color: var(--ink-faint); font-size: 9px; }
.mini-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.rank-list { display: flex; flex-direction: column; gap: 15px; }
.rank-row { display: grid; grid-template-columns: 24px minmax(80px, .9fr) minmax(100px, 1.4fr) auto; align-items: center; gap: 9px; }
.rank-index { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-faint); background: var(--surface-muted); font-size: 9px; font-weight: 680; }
.rank-row:first-child .rank-index { color: var(--blue-deep); background: var(--blue-soft); }
.rank-name { min-width: 0; }
.rank-name strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.rank-name small { color: var(--ink-faint); font-size: 8px; }
.bar-track { height: 7px; overflow: hidden; border-radius: 5px; background: #ededeb; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #458df3, #76aefa); }
.rank-value { text-align: right; font-size: 10px; font-weight: 620; font-variant-numeric: tabular-nums; }

.flow-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.flow-step { min-width: 0; padding: 14px 11px; border-radius: 12px; background: var(--surface-muted); position: relative; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; z-index: 2; top: 50%; right: -8px; width: 8px; height: 1px; background: #d4d4d1; }
.flow-step span { display: block; color: var(--ink-faint); font-size: 8px; }
.flow-step b { display: block; margin-top: 7px; font-size: 18px; font-variant-numeric: tabular-nums; }
.flow-step i { position: absolute; inset: auto 8px 7px; height: 2px; border-radius: 2px; background: var(--blue); opacity: .55; }

.exception-list { display: flex; flex-direction: column; }
.exception-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.exception-row:last-child { border-bottom: 0; }
.exception-row:hover .exception-title { color: var(--blue); }
.severity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.severity-dot.critical { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.severity-dot.medium { background: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.exception-main { min-width: 0; }
.exception-title { font-size: 10px; font-weight: 640; transition: color .15s ease; }
.exception-detail { margin-top: 4px; color: var(--ink-faint); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exception-meta { text-align: right; }
.exception-meta strong { display: block; color: var(--ink-soft); font-size: 9px; }
.exception-meta small { color: var(--ink-faint); font-size: 8px; }

.data-table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { padding: 0 12px 10px; color: var(--ink-faint); font-size: 8px; font-weight: 620; text-align: left; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: 10px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: rgba(22,119,255,.026); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.table-primary { font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-secondary { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 10px; color: var(--ink-soft); background: var(--surface-muted); font-size: 8px; font-weight: 620; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .65; }
.status-pill.good { color: var(--green); background: var(--green-soft); }
.status-pill.warn { color: var(--orange); background: var(--orange-soft); }
.status-pill.bad { color: var(--red); background: var(--red-soft); }
.status-pill.info { color: var(--blue); background: var(--blue-soft); }

.donut-layout { display: flex; align-items: center; gap: 26px; min-height: 190px; }
.donut { --value: 0; width: 142px; height: 142px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--value) * 1%), #ececea 0); position: relative; }
.donut::after { content: ""; position: absolute; width: 108px; height: 108px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center b { display: block; font-size: 24px; letter-spacing: -.035em; }
.donut-center small { color: var(--ink-faint); font-size: 8px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 13px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 9px; }
.legend-row i { width: 7px; height: 7px; border-radius: 50%; }
.legend-row span { color: var(--ink-soft); flex: 1; }
.legend-row b { font-variant-numeric: tabular-nums; }

.insight-card { padding: 22px; color: #fff; background: linear-gradient(145deg, #1e2025, #2f3340); border-color: transparent; box-shadow: 0 18px 38px rgba(25,29,39,.16); position: relative; overflow: hidden; }
.insight-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -70px; top: -90px; border-radius: 50%; background: rgba(91,141,239,.18); filter: blur(1px); }
.insight-card .eyebrow { color: #9ec3ff; margin: 0 0 12px; }
.insight-card h2 { max-width: 390px; margin: 0; font-size: 21px; line-height: 1.35; letter-spacing: -.03em; }
.insight-card p { max-width: 430px; margin: 12px 0 22px; color: rgba(255,255,255,.55); font-size: 10px; line-height: 1.7; }
.insight-metrics { display: flex; gap: 28px; position: relative; z-index: 1; }
.insight-metrics b { display: block; font-size: 18px; }
.insight-metrics small { color: rgba(255,255,255,.42); font-size: 8px; }

.notice-strip { padding: 12px 15px; border-radius: 11px; display: flex; align-items: flex-start; gap: 9px; color: #6e4a10; background: #fff7e6; border: 1px solid rgba(232,117,20,.13); font-size: 9px; line-height: 1.6; }
.notice-strip svg { width: 15px; flex: 0 0 auto; color: var(--orange); }
.notice-strip.is-info { color: #28588e; background: var(--blue-soft); border-color: rgba(22,119,255,.12); }
.notice-strip.is-info svg { color: var(--blue); }
.empty-state { min-height: 210px; display: grid; place-items: center; text-align: center; color: var(--ink-faint); padding: 30px; }
.empty-state > div { max-width: 270px; }
.empty-state svg { width: 28px; height: 28px; margin: 0 auto 12px; color: #b2b2b5; }
.empty-state h3 { margin: 0 0 7px; color: var(--ink-soft); font-size: 12px; }
.empty-state p { margin: 0; font-size: 9px; line-height: 1.6; }

.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.health-item { min-height: 108px; padding: 15px; border-radius: 13px; background: var(--surface-muted); }
.health-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.health-item-top span { color: var(--ink-soft); font-size: 9px; }
.health-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.health-indicator.warn { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.health-indicator.bad { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.health-item b { display: block; margin-top: 20px; font-size: 15px; }
.health-item small { display: block; color: var(--ink-faint); margin-top: 5px; font-size: 8px; }
.definition-list { display: flex; flex-direction: column; }
.definition-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.definition-row:last-child { border-bottom: 0; }
.definition-row strong { display: block; font-size: 10px; }
.definition-row p { margin: 5px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.65; }

.skeleton { position: relative; overflow: hidden; background: #eaeae7; color: transparent !important; border-radius: 6px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); animation: shimmer 1.35s infinite; }

/* Search and drawer */
.command-overlay, .drawer-layer { position: fixed; inset: 0; z-index: 100; display: grid; }
.overlay-dismiss { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(19,20,23,.38); backdrop-filter: blur(7px); cursor: default; }
.command-panel { width: min(620px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 80px)); align-self: start; justify-self: center; margin-top: min(13vh, 120px); border: 1px solid rgba(255,255,255,.7); border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.96); box-shadow: var(--shadow-lg); position: relative; animation: dialog-in .22s ease both; }
.command-input { height: 66px; display: flex; align-items: center; gap: 11px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.command-input > svg { color: var(--ink-faint); }
.command-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.command-body { min-height: 280px; max-height: 450px; overflow: auto; padding: 10px; }
.command-empty { min-height: 260px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--ink-faint); }
.command-empty svg { width: 31px; height: 31px; margin-bottom: 12px; color: #b6b6b8; }
.command-empty h3 { margin: 0; color: var(--ink-soft); font-size: 13px; }
.command-empty p { max-width: 310px; margin: 7px 0 0; font-size: 9px; line-height: 1.6; }
.command-result { width: 100%; border: 0; border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 12px; background: transparent; cursor: pointer; text-align: left; }
.command-result:hover, .command-result.is-selected { background: var(--blue-soft); }
.result-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--blue); background: #fff; border: 1px solid var(--line); }
.result-icon svg { width: 16px; }
.result-copy { min-width: 0; flex: 1; }
.result-copy strong, .result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy strong { font-size: 10px; }
.result-copy small { margin-top: 4px; color: var(--ink-faint); font-size: 8px; }
.command-result time { color: var(--ink-faint); font-size: 8px; }
.command-footer { min-height: 43px; padding: 0 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 15px; color: var(--ink-faint); font-size: 8px; }
.command-footer span:last-child { margin-left: auto; }

.drawer-layer { justify-items: end; }
.detail-drawer { width: min(520px, 100vw); height: 100%; overflow: auto; background: #fbfbfa; box-shadow: -20px 0 60px rgba(0,0,0,.14); position: relative; animation: drawer-in .28s cubic-bezier(.2,.75,.25,1) both; }
.drawer-head { position: sticky; top: 0; z-index: 2; padding: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; background: rgba(251,251,250,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.drawer-head .eyebrow { margin: 0 0 7px; }
.drawer-head h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.drawer-head p { margin: 6px 0 0; color: var(--ink-faint); font-size: 9px; }
.drawer-body { padding: 22px; }
.drawer-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.drawer-fact { padding: 13px; border-radius: 11px; background: var(--surface-muted); }
.drawer-fact span { display: block; color: var(--ink-faint); font-size: 8px; }
.drawer-fact b { display: block; margin-top: 6px; font-size: 11px; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: #dcdcd9; }
.timeline-item { position: relative; padding: 0 0 22px; }
.timeline-item::before { content: ""; position: absolute; left: -22px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.timeline-item h4 { margin: 0; font-size: 10px; }
.timeline-item p { margin: 5px 0; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.timeline-item time { color: var(--ink-faint); font-size: 8px; }
.drawer-actions { display: flex; gap: 9px; margin-top: 18px; }
.drawer-actions a, .drawer-actions button { height: 39px; padding: 0 14px; }

.toast-region { position: fixed; z-index: 200; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 380px; padding: 13px 15px; border-radius: 12px; display: flex; align-items: center; gap: 9px; color: #fff; background: rgba(34,35,39,.94); box-shadow: var(--shadow-md); backdrop-filter: blur(12px); font-size: 10px; animation: toast-in .25s ease both; }
.toast svg { width: 16px; color: #9ec3ff; }
.preview-banner { position: fixed; z-index: 90; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 7px 12px; border-radius: 20px; color: #fff; background: rgba(29,29,31,.86); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); font-size: 9px; pointer-events: none; }
.mobile-nav { display: none; }

@keyframes stage-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }

@media (max-width: 1180px) {
  :root { --sidebar-width: 220px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); }
  .auth-layout { gap: 60px; }
  .attention-stats { display: none; }
}

@media (max-width: 900px) {
  .auth-stage { padding: 24px; }
  .auth-layout { width: min(480px, 100%); grid-template-columns: 1fr; gap: 34px; }
  .auth-story { text-align: center; }
  .auth-story h1 { font-size: clamp(37px, 9vw, 54px); }
  .auth-story p { margin: 20px auto 22px; }
  .auth-proof { justify-content: center; }
  .auth-footer { margin-top: 30px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.75,.25,1); box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  .sidebar.is-open { transform: none; }
  .workspace { width: 100%; margin-left: 0; }
  .topbar { justify-content: flex-start; padding: 0 20px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; margin-right: 14px; }
  .mobile-brand .brand-symbol { width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--ink); }
  .search-trigger { width: min(400px, 52vw); }
  .topbar-actions { right: 20px; }
  .live-status { display: none; }
  .compact-avatar { display: grid; }
  .content { padding: 28px 22px 82px; }
  .grid-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.35); backdrop-filter: blur(3px); }
}

@media (max-width: 640px) {
  :root { --topbar-height: 62px; }
  .auth-stage { padding: 20px 17px; }
  .auth-brand { margin-bottom: 30px; }
  .auth-story .eyebrow { margin-bottom: 15px; }
  .auth-story h1 { font-size: 36px; }
  .auth-story p { font-size: 14px; line-height: 1.65; }
  .auth-proof { font-size: 11px; gap: 9px; }
  .login-card { padding: 25px 20px; border-radius: 22px; }
  .auth-footer { justify-content: center; text-align: center; }
  .auth-footer span:last-child { display: none; }
  .topbar { padding: 0 14px; }
  .mobile-brand { margin-right: 0; }
  .mobile-brand .brand-symbol { display: none; }
  .search-trigger { flex: 1; width: auto; margin: 0 10px; }
  .search-trigger kbd { display: none; }
  .topbar-actions { position: static; }
  .topbar-actions .notice-button { display: none; }
  .content { padding: 23px 15px 94px; }
  .page-heading { align-items: flex-start; margin-bottom: 21px; }
  .page-title-wrap h1 { font-size: 27px; }
  .page-title-wrap p { max-width: 280px; }
  .page-actions { flex-direction: column; align-items: stretch; }
  .page-actions .secondary-button { display: none; }
  .filter-select { min-width: 102px; max-width: 132px; }
  .grid { gap: 11px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 128px; padding: 15px; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 26px; margin-top: 14px; }
  .metric-foot > span:last-child { display: none; }
  .attention-band { padding: 15px; margin: 12px 0; }
  .attention-copy span { max-width: 240px; }
  .attention-band .secondary-button { display: none; }
  .card-header { padding: 17px 16px 0; }
  .card-body { padding: 15px 16px 17px; }
  .chart-wrap { height: 220px; }
  .rank-row { grid-template-columns: 22px minmax(75px, 1fr) minmax(70px, 1fr) auto; }
  .flow-row { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(2)::after { display: none; }
  .donut-layout { flex-direction: column; }
  .donut-legend { width: 100%; }
  .health-grid { grid-template-columns: 1fr 1fr; }
  .data-table { min-width: 620px; }
  .command-panel { margin-top: 12px; max-height: calc(100vh - 24px); border-radius: 18px; }
  .command-footer span:last-child { display: none; }
  .drawer-summary { grid-template-columns: 1fr 1fr; }
  .mobile-nav { position: fixed; z-index: 22; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); height: 63px; padding: 6px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(255,255,255,.75); border-radius: 18px; background: rgba(248,248,246,.9); box-shadow: 0 16px 40px rgba(0,0,0,.15); backdrop-filter: blur(20px) saturate(150%); }
  .mobile-nav button { border: 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-faint); background: transparent; font-size: 8px; }
  .mobile-nav button svg { width: 18px; }
  .mobile-nav button.is-active { color: var(--blue); background: var(--blue-soft); }
  .toast-region { left: 15px; right: 15px; bottom: 88px; }
  .toast { min-width: 0; max-width: none; }
  .preview-banner { bottom: 84px; white-space: nowrap; }
}

@media (max-width: 410px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .page-title-wrap p { display: none; }
  .attention-copy span { max-width: 190px; }
  .health-grid { grid-template-columns: 1fr; }
}

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

@media print {
  .sidebar, .topbar, .mobile-nav, .page-actions, .card-link, .attention-band { display: none !important; }
  .workspace { width: 100%; margin: 0; }
  .content { max-width: none; padding: 0; }
  .card { break-inside: avoid; box-shadow: none; background: #fff; }
}
