/* ============================
   DESIGN SYSTEM — Customer Portal
   ============================ */

/* --- Tokens --- */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #0e0e10;
  --ink-2: #46464b;
  --ink-3: #84848b;
  --line: #ebe9e2;
  --line-2: #f0eee7;
  --accent: #2d4a3e;
  --accent-soft: #e8efe9;
  --warm: #c2784a;
  --warn-soft: #fbf0e6;
  --crit: #b13a3a;
  --crit-soft: #f7e6e6;
  --info: #3a6fb1;
  --info-soft: #e6eef7;
  --shadow-card: 0 1px 0 rgba(0,0,0,0.02), 0 12px 32px -16px rgba(0,0,0,0.08);
  --radius-card: 18px;
  --radius-btn: 10px;
  --radius-inner: 14px;
  --radius-pill: 999px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* --- Shell --- */
.shell { width: 1440px; margin: 0 auto; display: flex; min-height: 100vh; }
.login-shell { width: 1440px; margin: 0 auto; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }

/* --- Sidebar --- */
.sidebar {
  width: 248px;
  padding: 24px 16px;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 24px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
  color: #f6f5f1; font-family: 'Instrument Serif', serif; font-size: 22px; line-height: 1;
}
.brand-text { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-text small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; margin-top: 1px; }

.workspace {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.ws-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #2d4a3e, #5d8a73); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}
.ws-info { flex: 1; min-width: 0; }
.ws-info strong { font-size: 12.5px; font-weight: 600; display: block; }
.ws-info small { font-size: 10.5px; color: var(--ink-3); }
.ws-chev { color: var(--ink-3); }

.nav-label {
  font-size: 10.5px; color: var(--ink-3); padding: 12px 10px 6px;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px;
  font-size: 13px; color: var(--ink-2); font-weight: 500; cursor: pointer; margin-bottom: 1px;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(0,0,0,0.03); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px var(--line); }
.nav-item svg { width: 15px; height: 15px; opacity: 0.8; flex-shrink: 0; }
.nav-item .pill {
  margin-left: auto; background: var(--crit-soft); color: var(--crit);
  font-size: 10px; padding: 1px 7px; border-radius: var(--radius-pill); font-weight: 600;
}

.upgrade {
  margin-top: auto;
  background: linear-gradient(135deg, #0e0e10, #2a2a30);
  border-radius: 14px; padding: 16px; color: white;
}
.upgrade h4 { font-family: 'Instrument Serif', serif; font-size: 19px; font-weight: 400; margin-bottom: 4px; letter-spacing: -0.01em; }
.upgrade h4 em { font-style: italic; }
.upgrade p { font-size: 11.5px; opacity: 0.7; margin-bottom: 12px; line-height: 1.45; }
.upgrade button {
  background: #f6f5f1; color: #0e0e10; border: none; padding: 7px 12px;
  border-radius: 7px; font-size: 12px; font-weight: 500;
  transition: opacity 0.15s;
}
.upgrade button:hover { opacity: 0.85; }

/* --- Main --- */
.main { margin-left: 248px; flex: 1; }

/* --- Topbar --- */
.topbar {
  padding: 18px 36px; display: flex; align-items: center; gap: 16px;
  background: var(--bg); position: sticky; top: 0; z-index: 10;
}
.search { flex: 1; max-width: 460px; position: relative; }
.search input {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px 9px 38px; font-size: 13px; color: var(--ink);
  outline: none; transition: border-color 0.15s;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 13px; top: 10px; width: 15px; height: 15px; color: var(--ink-3); }
.search .k {
  position: absolute; right: 10px; top: 7px; font-size: 10.5px; color: var(--ink-3);
  background: var(--bg); border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px;
  font-family: 'Geist Mono', monospace;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ibtn {
  width: 36px; height: 36px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; transition: background 0.15s, border-color 0.15s;
}
.ibtn:hover { background: var(--bg); border-color: #d8d5cc; }
.ibtn svg { width: 16px; height: 16px; color: var(--ink-2); }
.ibtn .ndot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  background: var(--crit); border-radius: 50%; border: 2px solid var(--surface);
}

/* User pill */
.user, .user-pill-trigger {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.dd-wrap.user, #user-pill-wrap {
  background: var(--surface); border: 1px solid var(--line);
  padding: 4px 12px 4px 4px; border-radius: var(--radius-pill);
  position: relative;
}
.user-av {
  width: 28px; height: 28px; border-radius: 50%; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.user-pill-trigger strong, .user strong { font-size: 12.5px; font-weight: 500; display: block; }
.user-pill-trigger small, .user small { display: block; font-size: 10.5px; color: var(--ink-3); }

/* --- Content --- */
.content { padding: 8px 36px 40px; }
.crumbs { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; font-family: 'Geist Mono', monospace; }
.crumbs span { color: var(--ink); }

/* --- Hero --- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.hero h1 {
  font-family: 'Instrument Serif', serif; font-size: 44px; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 8px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { color: var(--ink-2); font-size: 14px; max-width: 540px; }
.hero-compact h1 { font-size: 32px; margin-bottom: 6px; }
.hero-compact { margin-bottom: 20px; }
.hero-actions { display: flex; gap: 8px; flex-shrink: 0; }

.live {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-size: 11.5px; color: var(--ink-2); margin-top: 12px;
  font-family: 'Geist Mono', monospace;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #2d8a5e;
  box-shadow: 0 0 0 3px rgba(45,138,94,0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45,138,94,0.18); }
  50% { box-shadow: 0 0 0 6px rgba(45,138,94,0.08); }
}

/* --- Buttons --- */
.btn {
  padding: 9px 16px; border-radius: var(--radius-btn); font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn svg { width: 14px; height: 14px; }
.btn-sec { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-sec:hover { background: var(--bg); border-color: #d8d5cc; }
.btn-pri { background: var(--ink); color: white; }
.btn-pri:hover { opacity: 0.85; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* --- Metrics row --- */
.metrics-row {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 4px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px; box-shadow: var(--shadow-card);
}
.metric { padding: 22px 24px; border-right: 1px solid var(--line-2); }
.metric:last-child { border-right: none; }
.m-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.m-label { font-size: 12px; color: var(--ink-3); font-weight: 500; letter-spacing: 0.02em; }
.m-chip {
  font-size: 10.5px; padding: 2px 8px; border-radius: var(--radius-pill);
  font-weight: 500; font-family: 'Geist Mono', monospace;
}
.chip-up { background: var(--accent-soft); color: var(--accent); }
.chip-down { background: var(--crit-soft); color: var(--crit); }
.chip-warm { background: var(--warn-soft); color: var(--warm); }
.m-value {
  font-family: 'Instrument Serif', serif; font-size: 42px; font-weight: 400;
  letter-spacing: -0.025em; line-height: 1; color: var(--ink);
}
.m-value sub { font-family: 'Geist', sans-serif; font-size: 14px; color: var(--ink-3); font-weight: 400; }
.m-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }
.spark { height: 24px; margin-top: 10px; }
.spark svg, .sparkline-svg { width: 100%; height: 100%; }

/* --- Grid layouts --- */
.grid-2 { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; margin-bottom: 20px; }

/* --- Panel --- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.p-head { padding: 20px 24px 16px; display: flex; align-items: flex-start; justify-content: space-between; }
.p-title { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.p-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.p-body { padding: 0 24px 24px; }

/* --- Segment control --- */
.seg {
  display: flex; gap: 2px; background: var(--bg); padding: 3px;
  border-radius: 9px; border: 1px solid var(--line);
}
.seg .seg-btn, .seg div {
  font-size: 11.5px; padding: 5px 10px; border-radius: 6px;
  color: var(--ink-2); cursor: pointer; font-weight: 500;
  font-family: 'Geist Mono', monospace; transition: all 0.15s; white-space: nowrap;
}
.seg .seg-btn.on, .seg div.on {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.seg .seg-btn:hover:not(.on) { color: var(--ink); }

/* --- Chart --- */
.chart-wrap { height: 240px; position: relative; }
.chart-wrap svg { width: 100%; height: 100%; }
.legend { display: flex; gap: 18px; padding: 0 24px 20px; font-size: 12px; color: var(--ink-2); }
.legend i {
  width: 9px; height: 9px; border-radius: 3px;
  display: inline-block; margin-right: 7px; vertical-align: middle;
}

/* --- Alert rows --- */
.alert {
  display: flex; gap: 14px; padding: 14px 24px;
  border-top: 1px solid var(--line-2); align-items: flex-start; cursor: pointer;
  transition: background 0.15s;
}
.alert:hover { background: var(--bg); }
.sev { width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.sev.s-c { background: var(--crit); }
.sev.s-w { background: var(--warm); }
.sev.s-i { background: var(--accent); }
.a-body { flex: 1; min-width: 0; }
.a-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-family: 'Geist Mono', monospace;
}
.tag-c { color: var(--crit); }
.tag-w { color: var(--warm); }
.tag-i { color: var(--accent); }
.a-title { font-size: 13.5px; font-weight: 500; color: var(--ink); margin: 3px 0; }
.a-meta { font-size: 11.5px; color: var(--ink-3); }
.a-recommend { font-size: 12px; color: var(--ink-2); margin-top: 6px; padding: 8px 12px; background: var(--bg); border-radius: 8px; line-height: 1.5; }
.a-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.a-time { font-size: 11px; color: var(--ink-3); font-family: 'Geist Mono', monospace; white-space: nowrap; }
.a-agent-link {
  font-size: 11.5px; color: var(--accent); font-weight: 500; margin-top: 4px;
  cursor: pointer; display: inline-block;
}
.a-agent-link:hover { text-decoration: underline; }
.ack-badge {
  font-size: 10px; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent); font-weight: 500;
  font-family: 'Geist Mono', monospace;
}
.urgency-hint {
  font-size: 10px; color: var(--crit); margin-top: 4px; font-weight: 500;
  font-family: 'Geist Mono', monospace;
}
.view-all {
  padding: 14px 24px; text-align: center; font-size: 12.5px;
  color: var(--accent); font-weight: 500; border-top: 1px solid var(--line-2);
  cursor: pointer; transition: background 0.15s;
}
.view-all:hover { background: var(--bg); }

/* --- Agent cards --- */
.agents-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 4px;
}
.agents-head {
  padding: 18px 22px 14px; display: flex; justify-content: space-between; align-items: center;
}
.agent-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; }
.a-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-inner);
  padding: 18px; cursor: pointer; transition: all 0.15s;
}
.a-card:hover { background: var(--surface); border-color: #d8d5cc; box-shadow: 0 4px 12px -4px rgba(0,0,0,0.06); }
.ac-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ac-id { display: flex; align-items: center; gap: 11px; }
.ac-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif; font-size: 18px; color: var(--accent);
}
.ac-name strong { font-size: 14px; font-weight: 600; display: block; letter-spacing: -0.005em; }
.ac-name small { font-size: 11px; color: var(--ink-3); font-family: 'Geist Mono', monospace; }
.status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; padding: 3px 9px;
  border-radius: var(--radius-pill); font-family: 'Geist Mono', monospace;
}
.s-ok { background: var(--accent-soft); color: var(--accent); }
.s-warn { background: var(--warn-soft); color: var(--warm); }
.s-crit { background: var(--crit-soft); color: var(--crit); }
.sdot { width: 5px; height: 5px; border-radius: 50%; }
.ac-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.ac-stat-label {
  font-size: 10.5px; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 4px;
}
.ac-stat-val { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.ac-stat-val span { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 2px; }
.ac-spark { height: 32px; }
.ac-spark svg { width: 100%; height: 100%; }

/* --- Footer --- */
.foot {
  padding: 24px 0; font-size: 11.5px; color: var(--ink-3);
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line); margin-top: 20px;
}
.foot a { color: var(--ink-2); text-decoration: none; margin-left: 18px; transition: color 0.15s; }
.foot a:hover { color: var(--ink); }

/* --- Login --- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; }
.login-container {
  text-align: center; max-width: 420px; width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 48px 40px;
  box-shadow: var(--shadow-card);
}
.login-container .brand { justify-content: center; padding-bottom: 32px; }
.login-title {
  font-family: 'Instrument Serif', serif; font-size: 28px; font-weight: 400;
  margin-bottom: 8px; letter-spacing: -0.01em;
}
.login-sub { color: var(--ink-3); font-size: 14px; margin-bottom: 28px; }
.login-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.login-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  text-align: left; transition: all 0.15s;
}
.login-card:hover { background: var(--bg); border-color: #d8d5cc; }
.login-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.login-avatar {
  width: 40px; height: 40px; border-radius: 50%; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.login-info strong { font-size: 14px; font-weight: 600; display: block; }
.login-info small { font-size: 12px; color: var(--ink-3); }
.login-form { margin-top: 0; }
.login-field { text-align: left; margin-bottom: 14px; }
.login-field label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.login-field input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; color: var(--ink); background: var(--bg); outline: none;
}
.login-submit { width: 100%; padding: 12px; font-size: 14px; margin-top: 4px; }

/* --- Dropdown --- */
.dd-wrap { position: relative; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; min-width: 180px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.12); z-index: 100;
}
.dd-menu-right { left: auto; right: 0; }
.dd-wrap.dd-open .dd-menu { display: block; }
.dd-item {
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  color: var(--ink-2); cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background 0.1s;
}
.dd-item:hover { background: var(--bg); color: var(--ink); }

/* --- Filter toolbar --- */
.filter-toolbar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--surface);
  font-size: 13px; color: var(--ink-2); font-weight: 500; cursor: pointer;
  transition: border-color 0.15s;
}
.filter-btn:hover { border-color: #d8d5cc; }
.filter-btn svg { width: 14px; height: 14px; }
.filter-active-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: var(--accent-soft); color: var(--accent);
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 500;
}
.clear-filter { background: none; border: none; color: var(--accent); cursor: pointer; display: flex; }

/* --- Monitoring agent list --- */
.mon-agent-list { display: flex; flex-direction: column; gap: 8px; }
.mon-agent-item { border-radius: var(--radius-inner); overflow: hidden; }
.mon-agent-item .a-card { border-radius: var(--radius-inner); }
.mon-agent-item.expanded .a-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: none; }

.agent-detail {
  background: var(--surface); border: 1px solid var(--line); border-top: none;
  border-bottom-left-radius: var(--radius-inner); border-bottom-right-radius: var(--radius-inner);
  padding: 20px 24px; animation: slideDown 0.2s ease;
}
.detail-grid { display: flex; gap: 24px; margin-bottom: 14px; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.detail-stat { padding: 10px 14px; background: var(--bg); border-radius: 10px; }
.detail-stat-label { display: block; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-stat-val { display: block; font-size: 16px; font-weight: 600; margin-top: 4px; }
.detail-spark { width: 200px; display: flex; align-items: center; }
.detail-desc { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 14px; }
.detail-actions { display: flex; align-items: center; justify-content: space-between; }
.detail-close-btn {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-3); transition: all 0.15s;
}
.detail-close-btn:hover { background: var(--bg); color: var(--ink); }

/* --- Alerts list (full page) --- */
.alerts-list { display: flex; flex-direction: column; }
.alerts-list .alert { border: 1px solid var(--line); border-radius: var(--radius-inner); margin-bottom: 8px; padding: 18px 24px; }
.alerts-list .alert:hover { border-color: #d8d5cc; }
.ack-btn { white-space: nowrap; }

/* --- Comparison rows (analytics) --- */
.comp-list { padding: 4px 24px 20px; }
.comp-row {
  display: grid; grid-template-columns: 180px 1fr 80px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line-2); gap: 16px;
}
.comp-row:last-child { border-bottom: none; }
.comp-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.comp-bar-wrap { position: relative; height: 8px; background: var(--bg); border-radius: 4px; overflow: visible; display: flex; align-items: center; }
.comp-bar { height: 8px; border-radius: 4px; transition: width 0.3s; }
.comp-bar-label {
  position: absolute; right: -44px; font-size: 11px; font-weight: 500;
  font-family: 'Geist Mono', monospace; color: var(--ink-2);
}
.comp-latency { font-size: 12px; color: var(--ink-3); text-align: right; font-family: 'Geist Mono', monospace; }

.analytics-seg-row { margin-bottom: 20px; display: flex; }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-icon { color: var(--ink-3); margin-bottom: 16px; }
.empty-icon svg { width: 40px; height: 40px; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--ink-3); }
.empty-inline { text-align: center; padding: 24px; color: var(--ink-3); font-size: 13px; }

/* --- Toast --- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: 12px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.18); max-width: 360px;
  opacity: 0; transform: translateY(8px); transition: all 0.25s ease;
}
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-exit { opacity: 0; transform: translateY(-8px); }
.toast-success { background: var(--accent); color: white; }
.toast-error { background: var(--crit); color: white; }
.toast-info { background: var(--ink); color: white; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: inherit; opacity: 0.7; font-size: 18px; cursor: pointer; line-height: 1; }
.toast-close:hover { opacity: 1; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.modal-overlay.modal-visible { opacity: 1; }
.modal-overlay.modal-exit { opacity: 0; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-card);
  padding: 0; min-width: 400px; max-width: 560px; box-shadow: 0 16px 48px -12px rgba(0,0,0,0.2);
  transform: scale(0.96); transition: transform 0.2s;
}
.modal-visible .modal-box { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close-btn { background: none; border: none; font-size: 22px; color: var(--ink-3); cursor: pointer; line-height: 1; }
.modal-body { padding: 0 24px 24px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 500px; }
}
.animate-in { animation: fadeUp 0.35s ease both; }
.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.05s; }
.animate-in:nth-child(3) { animation-delay: 0.1s; }
.animate-in:nth-child(4) { animation-delay: 0.15s; }
.animate-in:nth-child(5) { animation-delay: 0.2s; }
.animate-in:nth-child(6) { animation-delay: 0.25s; }
.animate-in:nth-child(7) { animation-delay: 0.3s; }
.animate-in:nth-child(8) { animation-delay: 0.35s; }
.animate-in:nth-child(9) { animation-delay: 0.4s; }
.animate-in:nth-child(10) { animation-delay: 0.45s; }
.animate-in:nth-child(11) { animation-delay: 0.5s; }
.animate-in:nth-child(12) { animation-delay: 0.55s; }

.shimmer { opacity: 0.6; transition: opacity 0.3s; }

.metrics-row { animation: fadeUp 0.4s ease both; }
.panel { animation: fadeUp 0.4s ease both; animation-delay: 0.1s; }
.agents-panel { animation: fadeUp 0.4s ease both; animation-delay: 0.15s; }
