:root {
  --bg: #f5f7fb;
  --bg-strong: #eef2f7;
  --surface: rgba(255,255,255,0.74);
  --surface-strong: rgba(255,255,255,0.9);
  --surface-ink: #0b1117;
  --ink: #101826;
  --muted: #5d6b7e;
  --line: rgba(16,24,38,0.08);
  --line-strong: rgba(16,24,38,0.14);
  --accent: #0f766e;
  --accent-2: #0891b2;
  --accent-soft: rgba(15,118,110,0.14);
  --accent-soft-2: rgba(8,145,178,0.12);
  --red: #b42318;
  --amber: #b54708;
  --green: #067647;
  --red-soft: rgba(180,35,24,0.12);
  --amber-soft: rgba(181,71,8,0.12);
  --green-soft: rgba(6,118,71,0.12);
  --shadow-xl: 0 32px 72px -36px rgba(13, 18, 31, 0.28);
  --shadow-lg: 0 20px 44px -26px rgba(13, 18, 31, 0.22);
  --shadow-md: 0 14px 28px -20px rgba(13, 18, 31, 0.18);
  --radius-2xl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-sans: 'SF Pro Display', 'SF Pro Text', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%); color: var(--ink); font-family: var(--font-sans); }
body { min-height: 100dvh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:active { transform: translateY(1px) scale(0.99); }
input { width: 100%; border: 1px solid var(--line); border-radius: 14px; min-height: 46px; padding: 0 14px; color: var(--ink); background: rgba(255,255,255,0.9); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
input:focus { outline: none; border-color: rgba(15,118,110,0.32); box-shadow: 0 0 0 5px rgba(15,118,110,0.08); }
strong { font-weight: 620; }

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100dvh;
}

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(72px);
  opacity: .45;
  animation: drift 14s ease-in-out infinite;
}
.ambient-a { width: 340px; height: 340px; top: -90px; left: -70px; background: radial-gradient(circle, rgba(8,145,178,0.18), transparent 68%); }
.ambient-b { width: 360px; height: 360px; right: -100px; top: 24%; background: radial-gradient(circle, rgba(15,118,110,0.16), transparent 68%); animation-delay: -7s; }

.liquid {
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.6));
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.92);
  backdrop-filter: blur(24px) saturate(1.15);
}
.liquid.solid { background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.76)); }

.sidebar-shell,
.main-shell { position: relative; z-index: 1; }
.sidebar-shell {
  padding: 26px 22px 28px 26px;
  border-right: 1px solid rgba(255,255,255,0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.44));
  backdrop-filter: blur(28px);
  overflow-y: auto;
}
.brand-block { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.brand-block h1 { margin: 0; font-size: 24px; letter-spacing: -0.06em; }
.brand-mark {
  width: 50px; height: 50px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(11,17,23,0.96), rgba(15,118,110,0.88));
  color: white; letter-spacing: .16em; font-size: 12px;
  box-shadow: 0 16px 32px -18px rgba(11,17,23,0.48);
}
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.workspace-card { border-radius: var(--radius-xl); padding: 18px 18px 20px; margin-bottom: 20px; }
.workspace-card strong { display: block; margin-top: 6px; font-size: 18px; letter-spacing: -0.03em; }
.workspace-card p { margin: 6px 0 12px; color: var(--muted); }
.workspace-foot { font-size: 13px; color: var(--muted); }
.nav-groups { display: flex; flex-direction: column; gap: 20px; }
.nav-group header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.nav-group h2 { margin: 0; font-size: 14px; letter-spacing: -0.02em; }
.nav-group p { margin: 4px 0 0; max-width: 22ch; color: var(--muted); line-height: 1.45; font-size: 12px; }
.count-pill {
  min-width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255,255,255,0.72); color: var(--muted); font-size: 12px;
}
.nav-links { display: grid; gap: 8px; }
.nav-link {
  text-align: left; border: 1px solid transparent; border-radius: 18px; padding: 14px 14px 14px 16px;
  background: rgba(255,255,255,0.38); color: var(--ink);
  transition: transform .32s cubic-bezier(.16,1,.3,1), border-color .32s cubic-bezier(.16,1,.3,1), box-shadow .32s cubic-bezier(.16,1,.3,1), background-color .32s cubic-bezier(.16,1,.3,1);
}
.nav-link:hover { transform: translateY(-1px); border-color: var(--line); box-shadow: var(--shadow-md); background: rgba(255,255,255,0.76); }
.nav-link.is-active {
  background: linear-gradient(135deg, rgba(11,17,23,0.96), rgba(15,118,110,0.9));
  color: white; box-shadow: var(--shadow-lg);
}
.nav-link strong { display: block; font-size: 14px; }
.nav-link span { display: block; margin-top: 5px; font-size: 12px; line-height: 1.46; opacity: .76; }

.main-shell { padding: 22px 28px 36px; }
.topbar-shell {
  display: flex; gap: 16px; justify-content: space-between; align-items: center;
  max-width: 1540px; margin: 0 auto 20px; position: sticky; top: 8px; z-index: 4;
}
.search-shell {
  min-height: 72px; flex: 1; border-radius: 24px; padding: 0 18px;
  display: flex; align-items: center; gap: 14px; overflow: hidden;
}
.search-shell span { color: var(--muted); font-size: 14px; }
.search-dot { width: 42px; height: 42px; border-radius: 16px; background: linear-gradient(135deg, rgba(15,118,110,0.16), rgba(8,145,178,0.12)); border: 1px solid rgba(15,118,110,0.12); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.chip-button {
  height: 42px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,0.84); border: 1px solid var(--line);
  color: var(--ink); transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s cubic-bezier(.16,1,.3,1), border-color .28s ease;
}
.chip-button:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.user-chip { display: flex; align-items: center; gap: 10px; border-radius: 999px; padding: 8px 12px 8px 8px; }
.user-chip div { display: flex; flex-direction: column; }
.user-chip span { color: var(--muted); font-size: 12px; }
.avatar-chip {
  width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(11,17,23,0.96), rgba(15,118,110,0.9)); color: white; font-size: 12px; letter-spacing: .12em;
}

.page-shell { max-width: 1540px; margin: 0 auto; display: grid; gap: 18px; }
.hero-shell { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 18px; }
.hero-copy, .hero-stage { border-radius: var(--radius-2xl); padding: 30px 30px 32px; min-height: 280px; }
.hero-copy { position: relative; overflow: hidden; box-shadow: var(--shadow-xl); }
.hero-copy::after { content: ''; position: absolute; inset: auto -8% -18% auto; width: 180px; height: 180px; border-radius: 999px; background: radial-gradient(circle, rgba(15,118,110,0.18), transparent 72%); pointer-events: none; }
.hero-copy h2 { margin: 10px 0 0; font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: .94; letter-spacing: -0.08em; max-width: 12ch; }
.hero-copy p { margin: 16px 0 0; font-size: 17px; line-height: 1.72; color: var(--muted); max-width: 60ch; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.soft-pill {
  border: 1px solid rgba(15,118,110,0.14); background: rgba(15,118,110,0.08); color: #0b534e;
  height: 34px; border-radius: 999px; padding: 0 12px; display: inline-flex; align-items: center; font-size: 12px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-stage { position: relative; overflow: hidden; }
.hero-stage strong { display: block; margin-top: 8px; font-size: 22px; letter-spacing: -0.04em; }
.hero-stage p { color: var(--muted); line-height: 1.64; max-width: 30ch; }
.hero-constellation { position: absolute; inset: 92px 24px 24px; overflow: hidden; border-radius: 24px; background: linear-gradient(180deg, rgba(8,145,178,0.06), rgba(15,118,110,0.02)); border: 1px solid rgba(255,255,255,0.58); }
.hero-constellation span {
  position: absolute; display: block; border-radius: 999px; background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(15,118,110,0.24));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 12px 24px -18px rgba(11,17,23,0.18);
  animation: floaty 7s ease-in-out infinite;
}
.hero-constellation span:nth-child(1) { width: 118px; height: 118px; left: 18px; top: 18px; }
.hero-constellation span:nth-child(2) { width: 144px; height: 144px; right: 12px; top: 34px; animation-delay: -1.4s; }
.hero-constellation span:nth-child(3) { width: 94px; height: 94px; left: 34%; bottom: 22px; animation-delay: -3.2s; }
.hero-constellation span:nth-child(4) { width: 56px; height: 56px; right: 32%; bottom: 42px; animation-delay: -4.7s; }
.hero-log { position: absolute; left: 24px; right: 24px; bottom: 20px; display: grid; gap: 8px; }
.hero-log div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,0.62); border: 1px solid rgba(255,255,255,0.68); }
.hero-log strong { font-size: 13px; margin: 0; }
.hero-log span { font-size: 12px; color: var(--muted); }

.metric-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card {
  position: relative; overflow: hidden; min-height: 128px;
  border-radius: var(--radius-xl); padding: 20px 20px 22px;
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s cubic-bezier(.16,1,.3,1);
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.metric-card::after { content: ''; position: absolute; inset: auto -18% -22% auto; width: 130px; height: 130px; border-radius: 999px; background: radial-gradient(circle, rgba(15,118,110,0.14), transparent 70%); }
.metric-label { color: var(--muted); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.metric-value { margin-top: 12px; font-size: 2rem; line-height: 1; letter-spacing: -0.06em; }
.metric-detail { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.content-grid { display: grid; gap: 16px; }
.content-grid.cols-1 { grid-template-columns: 1fr; }
.content-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel {
  border-radius: var(--radius-xl); padding: 20px 20px 22px; min-width: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.78));
  border: 1px solid rgba(255,255,255,0.94); box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.9);
}
.panel.span-2 { grid-column: span 2; }
.panel.span-3 { grid-column: 1 / -1; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.panel-head h2 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.04em; }
.panel-meta { color: var(--muted); font-size: 12px; }
.panel-body { display: grid; gap: 14px; }

.button {
  min-height: 42px; border-radius: 999px; padding: 0 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.9); color: var(--ink);
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s cubic-bezier(.16,1,.3,1), border-color .28s ease, background-color .28s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.button.primary {
  background: linear-gradient(135deg, rgba(11,17,23,0.96), rgba(15,118,110,0.9));
  border-color: rgba(11,17,23,0.22); color: white; box-shadow: 0 18px 34px -22px rgba(11,17,23,0.4);
}

.badge {
  display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; border: 1px solid transparent; white-space: nowrap;
}
.badge.is-red { background: var(--red-soft); color: var(--red); border-color: rgba(180,35,24,0.18); }
.badge.is-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(181,71,8,0.18); }
.badge.is-green { background: var(--green-soft); color: var(--green); border-color: rgba(6,118,71,0.18); }
.badge.is-neutral { background: rgba(16,24,38,0.06); color: var(--muted); border-color: rgba(16,24,38,0.08); }

.stack, .timeline, .progress-list { display: grid; gap: 10px; }
.action-card, .list-row, .timeline-item {
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 14px 14px 14px 16px;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.82);
}
.action-copy, .timeline-copy, .list-copy { display: grid; gap: 4px; min-width: 0; }
.action-copy p, .timeline-copy p, .list-copy span { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.action-trailing, .list-right { display: flex; gap: 10px; align-items: center; }
.timeline-item { align-items: stretch; }
.timeline-dot { width: 10px; border-radius: 999px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 4px rgba(15,118,110,0.08); }
.timeline-copy span { color: var(--muted); font-size: 12px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.data-table th, .data-table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.data-table th { background: rgba(16,24,38,0.035); color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.data-table tbody tr:hover { background: rgba(15,118,110,0.03); }
.data-table tr:last-child td { border-bottom: none; }

.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-block { display: grid; gap: 7px; }
.field-block.full, .form-actions.full { grid-column: 1 / -1; }
.field-block span { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; }

.card-grid { display: grid; gap: 12px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stat-cell {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(16,24,38,0.06);
  background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,0.82));
}
.stat-cell span,
.split-detail span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.stat-cell strong,
.split-detail strong {
  font-size: 15px;
  letter-spacing: -0.03em;
}
.stat-cell em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}
.pill-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.soft-pill-ghost {
  background: rgba(16,24,38,0.04);
  color: var(--muted);
  border-color: rgba(16,24,38,0.06);
}
.split-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.split-detail article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(16,24,38,0.05);
}
.split-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.mini-card, .quick-card {
  border-radius: 20px; border: 1px solid var(--line); padding: 16px; background: rgba(255,255,255,0.84);
  display: grid; gap: 8px; text-align: left; color: var(--ink);
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s cubic-bezier(.16,1,.3,1), border-color .28s ease;
}
.mini-card:hover, .quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(15,118,110,0.14); }
.mini-card p, .quick-card span, .mini-meta { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.mini-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.info-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.info-pairs div { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: rgba(16,24,38,0.03); border: 1px solid rgba(16,24,38,0.05); }
.info-pairs span { color: var(--muted); font-size: 12px; }
.info-pairs strong { font-size: 15px; }

.progress-row { display: grid; gap: 8px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.progress-meta span { color: var(--muted); }
.progress-track { height: 10px; border-radius: 999px; background: rgba(16,24,38,0.08); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.sparkline-shell { display: grid; gap: 10px; }
.sparkline { width: 100%; height: 88px; overflow: visible; }
.sparkline polyline { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sparkline circle { fill: white; stroke: var(--accent); stroke-width: 2; }
.sparkline-labels { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }

.kanban-board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.lane { min-width: 240px; display: grid; gap: 12px; padding: 14px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,0.72); }
.lane header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.lane-stack { display: grid; gap: 10px; }
.deal-card {
  display: grid; gap: 12px; border-radius: 18px; padding: 14px; background: rgba(255,255,255,0.88);
  border: 1px solid rgba(16,24,38,0.06);
}
.deal-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.deal-trailing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.message-stack { display: grid; gap: 10px; }
.message-bubble {
  max-width: min(720px, 92%); padding: 14px 16px; border-radius: 22px; display: grid; gap: 8px;
  background: rgba(16,24,38,0.04); border: 1px solid rgba(16,24,38,0.05);
}
.message-bubble.outbound { margin-left: auto; background: linear-gradient(135deg, rgba(11,17,23,0.95), rgba(15,118,110,0.88)); color: white; }
.message-bubble p { margin: 0; line-height: 1.6; }
.message-bubble span { color: inherit; opacity: .72; font-size: 12px; }

.quick-card { min-height: 140px; align-content: space-between; }
.empty-state { display: grid; place-items: center; min-height: 190px; text-align: center; gap: 10px; color: var(--muted); border: 1px dashed rgba(16,24,38,0.1); border-radius: 22px; background: rgba(255,255,255,0.5); padding: 18px; }
.empty-orb { width: 56px; height: 56px; border-radius: 999px; background: radial-gradient(circle, rgba(15,118,110,0.18), rgba(15,118,110,0.04)); }
.empty-state h3 { margin: 0; color: var(--ink); font-size: 18px; letter-spacing: -0.03em; }
.empty-state p { margin: 0; max-width: 36ch; line-height: 1.6; }

@keyframes drift {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(18px, -12px, 0); }
}
@keyframes floaty {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(0,-8px,0) scale(1.04); }
}

@media (max-width: 1320px) {
  .app-shell { grid-template-columns: 320px minmax(0, 1fr); }
  .metric-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel.span-3 { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar-shell { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.76); max-height: 42vh; }
  .hero-shell, .content-grid.cols-3 { grid-template-columns: 1fr; }
  .stat-band, .split-detail, .form-grid { grid-template-columns: 1fr; }
  .panel.span-2, .panel.span-3 { grid-column: auto; }
  .topbar-shell { position: static; flex-direction: column; align-items: stretch; }
}

@media (max-width: 720px) {
  .main-shell { padding: 16px; }
  .sidebar-shell { padding: 18px 16px 20px; }
  .metric-rail { grid-template-columns: 1fr; }
  .card-grid.cols-2, .card-grid.cols-3, .info-pairs, .form-grid { grid-template-columns: 1fr; }
  .hero-copy, .hero-stage, .panel, .metric-card { padding: 18px; border-radius: 22px; }
  .hero-copy h2 { font-size: 2.5rem; }
}

.ambient-c {
  width: 420px;
  height: 420px;
  left: 42%;
  bottom: -140px;
  background: radial-gradient(circle, rgba(15,118,110,0.14), transparent 66%);
  animation-delay: -4s;
}

.spotlight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at var(--spotlight-x, 70%) var(--spotlight-y, 20%), rgba(255,255,255,0.48), transparent 18%),
    radial-gradient(circle at calc(var(--spotlight-x, 70%) + 12%) calc(var(--spotlight-y, 20%) + 18%), rgba(8,145,178,0.08), transparent 22%);
  opacity: .88;
  transition: background-position .16s linear;
}

.search-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.soft-key {
  min-width: 56px;
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(16,24,38,0.06);
  color: var(--muted);
  border: 1px solid rgba(16,24,38,0.08);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-shell > * {
  animation: riseIn .48s cubic-bezier(.16,1,.3,1) both;
}
.page-shell > *:nth-child(2) { animation-delay: .04s; }
.page-shell > *:nth-child(3) { animation-delay: .08s; }
.page-shell > *:nth-child(4) { animation-delay: .12s; }

.panel,
.metric-card,
.mini-card,
.quick-card,
.nav-link,
.action-card,
.list-row,
.timeline-item,
.stat-cell,
.hero-stage,
.hero-copy {
  will-change: transform;
}

.sidebar-shell::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 0;
}

.nav-link::after,
.metric-card::before,
.panel::before,
.mini-card::before,
.quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.metric-card,
.panel,
.mini-card,
.quick-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.panel::before,
.mini-card::before,
.quick-card::before {
  background: linear-gradient(120deg, rgba(255,255,255,0.0) 20%, rgba(255,255,255,0.26) 50%, rgba(255,255,255,0.0) 80%);
  transform: translateX(-120%);
  transition: transform .9s cubic-bezier(.16,1,.3,1);
}

.metric-card:hover::before,
.panel:hover::before,
.mini-card:hover::before,
.quick-card:hover::before {
  transform: translateX(120%);
}

.hero-shell,
.metric-rail,
.content-grid,
.card-grid,
.table-wrap,
.stat-band,
.split-detail,
.info-pairs {
  transform: translateZ(0);
}

.topbar-shell,
.search-shell,
.user-chip,
.workspace-card,
.nav-link,
.chip-button,
.button,
.panel,
.metric-card,
.mini-card,
.quick-card {
  transition:
    transform .32s cubic-bezier(.16,1,.3,1),
    box-shadow .32s cubic-bezier(.16,1,.3,1),
    border-color .32s ease,
    background-color .32s ease,
    opacity .32s ease;
}

.search-shell:hover,
.user-chip:hover,
.workspace-card:hover,
.panel:hover,
.metric-card:hover {
  box-shadow: var(--shadow-xl);
}

.hero-copy {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.76)),
    radial-gradient(circle at 15% 15%, rgba(8,145,178,0.10), transparent 24%),
    radial-gradient(circle at 85% 75%, rgba(15,118,110,0.10), transparent 24%);
}

.hero-stage {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.66)),
    linear-gradient(135deg, rgba(8,145,178,0.08), rgba(15,118,110,0.04));
}

.table-wrap {
  background: rgba(255,255,255,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.data-table td:first-child,
.data-table th:first-child {
  padding-left: 16px;
}

.data-table td:last-child,
.data-table th:last-child {
  padding-right: 16px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -14px, 0) scale(1.04); }
}

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

@media (max-width: 1380px) {
  .app-shell { grid-template-columns: 320px minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar-shell { position: static; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.72); }
  .topbar-shell { position: static; }
  .hero-shell { grid-template-columns: 1fr; }
  .metric-rail,
  .content-grid.cols-3,
  .card-grid.cols-3,
  .stat-band,
  .split-detail,
  .info-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel.span-2,
  .panel.span-3 { grid-column: auto; }
}

@media (max-width: 780px) {
  .main-shell { padding: 16px; }
  .sidebar-shell { padding: 18px 16px 18px; }
  .topbar-shell,
  .hero-shell,
  .metric-rail,
  .content-grid.cols-3,
  .card-grid.cols-2,
  .card-grid.cols-3,
  .stat-band,
  .split-detail,
  .info-pairs,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .search-shell { min-height: 64px; padding: 0 14px; }
  .search-meta { display: none; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .hero-copy h2 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
}

.login-mode {
  display: block;
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.login-card {
  width: min(560px, 100%);
  padding: 32px;
  display: grid;
  gap: 16px;
  border-radius: 28px;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.login-card p,
.login-hint,
.login-error {
  color: var(--muted-foreground, rgba(20, 24, 28, 0.72));
}

.login-error {
  color: #8b1e2d;
  font-weight: 600;
}
.launch-badge { border-color: rgba(20, 184, 166, .45); background: rgba(20, 184, 166, .12); color: #064e3b; }
.button[disabled], .is-disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; } }
.nav-link:focus-visible, .button:focus-visible, .chip-button:focus-visible, input:focus-visible { outline: 3px solid rgba(20, 184, 166, .55); outline-offset: 3px; }
