:root {
  --ink: #182334;
  --ink-soft: #405069;
  --muted: #718097;
  --muted-2: #98a4b5;
  --line: #e3e8ef;
  --line-strong: #d3dae5;
  --paper: #f4f7fb;
  --card: #fff;
  --nav: #111b2b;
  --nav-text: #afbbca;
  --accent: #2d6cdf;
  --accent-dark: #1e56bf;
  --teal: #119b78;
  --warn: #b66a13;
  --warn-bg: #fff6e8;
  --danger: #c73d55;
  --danger-bg: #fff0f2;
  --info-bg: #edf4ff;
  --shadow: 0 10px 28px rgba(26, 45, 72, .06);
  --radius: 14px;
  --radius-sm: 9px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; transform: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #6f9df5; outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: #8491a4; font-size: 10px; font-weight: 800; letter-spacing: .16em; line-height: 1.2; }
.separator { margin: 0 3px; color: #b6bfcc; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b8c2d0; box-shadow: 0 0 0 3px #b8c2d018; }
.status-dot.online { background: var(--teal); box-shadow: 0 0 0 3px #119b781d; }
.status-dot.waiting { background: #c79043; box-shadow: 0 0 0 3px #c790431d; }

/* Authentication */
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 75% 12%, #dce9ff 0, transparent 29%), radial-gradient(circle at 16% 86%, #e9f6f2 0, transparent 26%), var(--paper); }
.auth-card { width: min(440px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 28px 90px rgba(27, 48, 80, .12); }
.auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; color: #8090a6; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.brand-mark { display: grid; width: 45px; height: 45px; place-items: center; margin-bottom: 27px; border-radius: 13px; background: linear-gradient(145deg, #3d7cf0, #255cc8); color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -.1em; box-shadow: 0 8px 18px #2d6cdf35; }
.brand-mark.small { width: 31px; height: 31px; margin: 0; border-radius: 9px; font-size: 11px; }
.auth-card h1 { margin: 0 0 12px; font-size: 32px; letter-spacing: -.055em; line-height: 1.05; }
.auth-card > p.muted { max-width: 34ch; line-height: 1.55; }
.auth-card form { display: grid; gap: 16px; margin-top: 30px; }
.auth-card label, .form-label { display: grid; gap: 7px; color: #4d5a6c; font-size: 12px; font-weight: 750; }
.auth-card input, .form-control, .select-control { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.auth-card input:focus, .form-control:focus, .select-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #2d6cdf1a; }
.otp-field { font-weight: 600 !important; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
.auth-foot { display: flex; align-items: center; gap: 8px; margin: 26px 0 0; color: var(--muted); font-size: 11px; }
.lock-mark { color: var(--teal); font-size: 12px; }

/* Controls */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--ink-soft); font-size: 12px; font-weight: 800; line-height: 1; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 10px #2d6cdf22; }
.button.primary:hover { background: var(--accent-dark); }
.button.ghost { border-color: var(--line); background: #fff; }
.button.ghost:hover { border-color: #bdc9da; background: #f9fbfd; }
.button.danger { background: var(--danger); color: #fff; }
.button.full { width: 100%; padding: 13px; }
.button.icon-button { padding: 9px 11px; }
.button-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 10px; background: #ffffff2b; font-size: 10px; }
.link-button { padding: 5px 0; border: 0; background: transparent; color: var(--accent); font-weight: 800; }
.link-button:hover { color: var(--accent-dark); transform: none; }
.small-button { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.small-button:hover { border-color: #aabbd2; background: #f8fafc; }
.small-button.danger-text { border-color: #f0c5cd; background: #fff8f9; color: var(--danger); }
.copy-button { padding: 3px 5px; border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 800; }
.copy-button:hover { text-decoration: underline; }
.spinner { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { min-height: 16px; margin: 0; color: var(--danger); font-size: 11px; line-height: 1.45; }
.form-state { min-height: 17px; color: var(--teal); font-size: 11px; font-weight: 800; }

/* Shell and navigation */
.sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; display: flex; width: 254px; flex-direction: column; background: var(--nav); color: var(--nav-text); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 80px; padding: 0 24px; border-bottom: 1px solid #ffffff0d; color: #f0f4fa; font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.brand-version { margin-left: auto; color: #73839a; font-size: 9px; letter-spacing: .12em; }
.sidebar-scroll { overflow-y: auto; padding: 20px 14px 16px; }
.nav-group { margin-bottom: 24px; }
.sidebar-label { padding: 0 12px 8px; color: #677891; font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; margin: 2px 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--nav-text); text-align: left; font-size: 12px; font-weight: 700; }
.nav-item:hover { background: #ffffff0a; color: #f4f7fb; }
.nav-item.active { border-color: #ffffff12; background: #263b5a; color: #fff; box-shadow: inset 3px 0 var(--accent); }
.nav-icon { display: inline-grid; width: 18px; place-items: center; color: #8495ad; font-size: 16px; line-height: 1; }
.nav-item.active .nav-icon { color: #84b1ff; }
.nav-count { display: grid; min-width: 18px; height: 18px; place-items: center; margin-left: auto; border-radius: 9px; background: #c79043; color: #fff; font-size: 9px; }
.sidebar-bottom { display: flex; align-items: center; gap: 11px; margin: 0 14px 18px; padding: 12px; border: 1px solid #ffffff12; border-radius: 11px; background: #ffffff08; font-size: 10px; }
.sidebar-bottom strong, .sidebar-bottom span { display: block; }
.sidebar-bottom strong { margin-bottom: 3px; color: #e8eef7; font-size: 11px; }
.sidebar-bottom div span { color: #8292a7; }
.main { min-width: 0; min-height: 100vh; margin-left: 254px; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; min-height: 82px; padding: 0 42px; border-bottom: 1px solid #e6ebf1; background: #f8fafcF2; backdrop-filter: blur(12px); }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); font-size: 21px; }
.topbar-heading { min-width: 0; }
.breadcrumb { display: flex; gap: 7px; margin-bottom: 5px; color: #91a0b4; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.topbar h2 { margin: 0; color: var(--ink); font-size: 20px; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.refresh-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.content { max-width: 1540px; margin: 0 auto; padding: 34px 42px 70px; }

/* Page structure */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.page-header h1 { margin: 0; font-size: 29px; letter-spacing: -.055em; line-height: 1.05; }
.page-description { max-width: 60ch; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.summary-grid, .metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.summary-grid { margin-bottom: 30px; }
.summary-card { min-height: 121px; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.summary-card.good { border-top: 3px solid var(--teal); }
.summary-card.warn { border-top: 3px solid #d08b32; }
.summary-card.bad { border-top: 3px solid var(--danger); }
.summary-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.summary-icon { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 7px; background: #edf2f8; color: #73839a; font-size: 9px; font-weight: 900; }
.summary-card.good .summary-icon { background: #e7f7f1; color: var(--teal); }
.summary-card.warn .summary-icon { background: var(--warn-bg); color: var(--warn); }
.summary-card.bad .summary-icon { background: var(--danger-bg); color: var(--danger); }
.summary-card > strong { display: block; margin: 14px 0 5px; font-size: 22px; letter-spacing: -.045em; }
.summary-card > span:last-child { display: block; color: var(--muted); font-size: 11px; }
.dashboard-section { margin-bottom: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.section-note { color: var(--muted-2); font-size: 11px; }
.metric-card { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.metric-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.metric-context { color: #b0bac7; font-size: 8px; }
.metric-value { display: block; margin: 11px 0 12px; font-size: 25px; letter-spacing: -.055em; }
.metric-note { display: block; margin-top: 9px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.meter { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 5px; background: #e9eef4; appearance: none; }
.meter::-webkit-progress-bar { border-radius: inherit; background: #e9eef4; }
.meter::-webkit-progress-value { border-radius: inherit; background: var(--accent); }
.meter.warn::-webkit-progress-value { background: #d08b32; }
.meter.bad::-webkit-progress-value { background: var(--danger); }
.meter::-moz-progress-bar { border-radius: inherit; background: var(--accent); }
.meter.warn::-moz-progress-bar { background: #d08b32; }
.meter.bad::-moz-progress-bar { background: var(--danger); }
.dashboard-columns, .monitor-grid, .bandwidth-grid, .server-grid, .security-grid, .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-header h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.panel-value { color: var(--accent); font-size: 22px; letter-spacing: -.04em; }

/* Sources and destinations */
.source-list, .destination-list { display: grid; gap: 10px; }
.source-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.source-card, .destination-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.source-card.is-online { border-color: #bde8db; }
.destination-card.live, .destination-card.connecting, .destination-card.reconnecting { border-color: #c9dcfa; }
.destination-card.unconfigured { border-color: #efd8af; background: #fffdfa; }
.card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.entity-title { display: flex; align-items: center; min-width: 0; gap: 10px; }
.entity-title > div { min-width: 0; }
.entity-title h3 { margin: 0; overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.entity-avatar, .platform-mark { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 10px; background: #eaf1ff; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.platform-mark { border-radius: 50%; background: #edf0f5; color: #506078; }
.entity-subtitle { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; flex: none; gap: 6px; padding: 5px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.status-pill i { font-style: normal; font-size: 8px; }
.status-pill.good { border-color: #bfe7d9; background: #eaf9f4; color: #087a5c; }
.status-pill.warn { border-color: #f0d3a8; background: var(--warn-bg); color: #9b5a0c; }
.status-pill.bad { border-color: #efc3cc; background: var(--danger-bg); color: #ad2f46; }
.status-pill.muted { border-color: #e4d7bd; background: #fbf5e9; color: #97733e; }
.status-pill.quiet { border-color: #dfe5ed; background: #f3f6f9; color: #68788e; }
.state-message { display: flex; align-items: center; gap: 8px; min-height: 32px; margin: 13px 0; border-top: 1px solid #eef1f5; border-bottom: 1px solid #eef1f5; color: var(--muted); font-size: 11px; }
.telemetry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.stat { min-width: 0; }
.stat > span { display: block; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.stat > strong { display: block; margin-top: 4px; overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #eef1f5; }
.card-footer > .muted { font-size: 10px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.destination-telemetry { grid-template-columns: repeat(4, 1fr); }
.error-note { display: grid; gap: 4px; margin-top: 12px; border-left: 3px solid var(--danger); padding: 8px 10px; background: #fff7f8; color: var(--danger); font-size: 10px; line-height: 1.4; }
.error-note strong { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.callout { display: flex; gap: 10px; margin-top: 17px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.callout > strong, .callout > span { display: block; }
.callout > strong { margin-bottom: 2px; font-size: 11px; }
.callout.info { border-color: #cbdcf8; background: var(--info-bg); }
.callout.warn { border-color: #f0d8b1; background: var(--warn-bg); color: #85500e; }
.callout.success { border-color: #c4e9dc; background: #edf9f5; color: #176a55; }
.callout-icon { display: grid; width: 19px; height: 19px; flex: none; place-items: center; border-radius: 50%; background: #d9e8ff; color: var(--accent); font-size: 10px; font-weight: 900; }
.ingest-fields { display: grid; gap: 0; margin-top: 17px; border: 1px solid var(--line); border-radius: 9px; }
.field-row { display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 10px; }
.field-row:last-child { border-bottom: 0; }
.field-row > span { color: var(--muted); font-weight: 750; }
.field-row code { min-width: 0; overflow: hidden; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

/* Filters and forms */
.inline-summary { display: flex; flex-wrap: wrap; gap: 17px; margin: -7px 0 18px; color: var(--muted); font-size: 11px; }
.inline-summary strong { color: var(--ink); font-size: 14px; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.filter-label { color: var(--muted); font-size: 11px; font-weight: 800; }
.select-control { width: auto; min-width: 155px; padding: 8px 10px; font-size: 11px; }
.filter-result { margin-left: auto; color: var(--muted); font-size: 11px; }
.search-field { display: flex; min-width: 220px; flex: 1; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--muted); }
.search-field input { width: 100%; padding: 9px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.segmented { display: flex; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.segment { padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.segment.selected { background: #eaf1ff; color: var(--accent); }
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.check { display: flex; align-items: flex-start; gap: 10px; }
.check input { width: 17px; height: 17px; margin: 1px 0; accent-color: var(--accent); }
.check strong, .check small { display: block; }
.check small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.secret-field { display: flex; }
.secret-field .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.reveal-button { padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #f7f9fc; color: var(--accent); font-size: 10px; font-weight: 800; }
.side-panel { align-self: start; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }
.side-panel-title { margin-bottom: 12px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.side-panel > p { margin: 11px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.side-panel .stat { padding: 10px 0; border-top: 1px solid var(--line); }

/* Routing, profiles, logs, alerts */
.route-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: -6px 0 18px; color: var(--muted); font-size: 11px; }
.route-legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #c3ccd8; }
.legend-dot.source { background: var(--accent); }
.legend-dot.live { background: var(--teal); }
.route-board { display: grid; gap: 15px; }
.route-lane { display: grid; grid-template-columns: minmax(190px, .8fr) 70px minmax(260px, 1.4fr); align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.route-node { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.source-node { border-color: #cbdcf8; background: #f8fbff; }
.route-node-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-node h3 { margin: 10px 0 4px; font-size: 14px; }
.route-node p { margin: 0; color: var(--muted); font-size: 10px; }
.route-connector { display: flex; align-items: center; gap: 6px; color: #a5b3c5; }
.route-connector span { height: 1px; flex: 1; background: #cdd7e4; }
.route-connector b { font-size: 18px; font-weight: 500; }
.route-destinations { display: grid; gap: 8px; }
.route-lane-title { display: flex; justify-content: space-between; margin-bottom: 1px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.route-lane-title strong { color: var(--accent); font-size: 12px; }
.destination-node { display: grid; gap: 6px; }
.route-error { overflow: hidden; color: var(--danger); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.profile-card { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.profile-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.profile-card h2 { margin: 0; font-size: 21px; letter-spacing: -.045em; }
.profile-intro { min-height: 34px; margin: 11px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.comparison { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.comparison-head, .comparison-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 9px 10px; }
.comparison-head { background: #f7f9fc; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.comparison-row { border-top: 1px solid var(--line); font-size: 10px; }
.comparison-row span { color: var(--muted); }
.comparison-row strong { color: var(--ink-soft); }
.comparison-row em { overflow: hidden; color: var(--teal); font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.comparison-row em.is-waiting { color: var(--muted-2); font-weight: 600; }
.service-list { display: grid; gap: 4px; }
.service-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eef1f5; }
.service-row:last-child { border-bottom: 0; }
.service-indicator { width: 8px; height: 8px; border-radius: 50%; background: #c2cad4; }
.service-indicator.good { background: var(--teal); }
.service-indicator.warn { background: #d08b32; }
.service-indicator.quiet { background: #a8b4c4; }
.service-row > div { min-width: 0; flex: 1; }
.service-row strong, .service-row span { display: block; }
.service-row strong { font-size: 11px; }
.service-row > div span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.large-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.large-stats .stat { padding: 13px 0; border-bottom: 1px solid #eef1f5; }
.allowance-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 10px; }
.scenario-list { display: grid; gap: 0; }
.scenario-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #eef1f5; color: var(--muted); font-size: 11px; }
.scenario-row strong { color: var(--ink-soft); }
.log-panel, .alert-panel { overflow: hidden; padding: 0; }
.log-list { display: grid; }
.log-row { display: grid; grid-template-columns: 135px 64px 80px minmax(0, 1fr) max-content auto; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid #eef1f5; font-size: 10px; }
.log-row:last-child { border-bottom: 0; }
.log-time, .log-component, .log-target { color: var(--muted); }
.log-severity { font-size: 9px; font-weight: 850; text-transform: uppercase; }
.log-severity.good { color: var(--teal); }
.log-severity.warn { color: var(--warn); }
.log-severity.bad { color: var(--danger); }
.log-message { min-width: 0; overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.alert-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #eef1f5; }
.alert-row:last-child { border-bottom: 0; }
.alert-row.acknowledged { opacity: .62; }
.alert-severity { min-width: 64px; padding: 5px 6px; border-radius: 6px; text-align: center; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.alert-severity.good { background: #eaf9f4; color: #087a5c; }
.alert-severity.warn { background: var(--warn-bg); color: var(--warn); }
.alert-severity.bad { background: var(--danger-bg); color: var(--danger); }
.alert-copy { min-width: 0; flex: 1; }
.alert-title { display: flex; align-items: center; gap: 9px; }
.alert-title strong { font-size: 12px; }
.alert-copy p { margin: 5px 0; color: var(--muted); font-size: 11px; }
.alert-copy time { color: var(--muted-2); font-size: 10px; }
.ack-label { color: var(--teal); font-size: 9px; font-weight: 850; text-transform: uppercase; }

/* Server, security, settings, about */
.server-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 22px; border: 1px solid #cbdcf8; border-radius: var(--radius); background: linear-gradient(110deg, #f7fbff, #fff); }
.server-hero h2 { margin: 0; font-size: 25px; letter-spacing: -.05em; }
.server-hero p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.security-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 17px; }
.security-list .stat { padding: 11px 0; border-bottom: 1px solid #eef1f5; }
.account-line { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.account-line strong, .account-line span { display: block; }
.account-line strong { font-size: 12px; }
.account-line div span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.stack-form, .settings-form { display: grid; gap: 17px; }
.input-with-suffix { display: flex; align-items: center; }
.input-with-suffix .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-with-suffix > span { display: grid; width: 36px; height: 39px; place-items: center; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #f7f9fc; color: var(--muted); font-size: 11px; }
.policy-row { display: flex; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.policy-row:last-child { border-bottom: 0; }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.about-hero { display: flex; grid-column: 1 / -1; align-items: center; gap: 17px; padding: 25px; border: 1px solid #cbdcf8; border-radius: var(--radius); background: linear-gradient(120deg, #f6faff, #fff); box-shadow: var(--shadow); }
.about-mark { width: 53px; height: 53px; margin: 0; }
.about-hero h2 { margin: 0; font-size: 22px; letter-spacing: -.045em; }
.about-hero p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.about-hero > .status-pill { margin-left: auto; }
.reference-list { display: grid; gap: 0; }
.reference-list > div { display: grid; gap: 5px; padding: 13px 0; border-bottom: 1px solid #eef1f5; }
.reference-list > div:last-child { border-bottom: 0; }
.reference-list strong { font-size: 11px; }
.reference-list span { color: var(--muted); font-size: 11px; line-height: 1.45; }

/* States and dialogs */
.empty-state { display: grid; place-items: center; padding: 30px 16px; text-align: center; }
.empty-icon { display: grid; width: 33px; height: 33px; place-items: center; margin-bottom: 11px; border-radius: 11px; background: #edf2f8; color: #8392a5; font-size: 18px; font-weight: 400; }
.danger-icon { background: var(--danger-bg); color: var(--danger); }
.empty-state h3 { margin: 0; font-size: 13px; }
.empty-state p { max-width: 32ch; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.loading-stack { display: grid; gap: 18px; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius); background: #e9eef4; }
.skeleton::after { position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, #f8fafc99, transparent); content: ""; animation: shimmer 1.3s infinite; }
.skeleton-header { width: 48%; height: 78px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skeleton-card { height: 120px; }
.skeleton-wide { height: 300px; }
.dialog { width: min(490px, calc(100% - 30px)); padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 25px 80px #18233429; }
.dialog::backdrop { background: #13203966; backdrop-filter: blur(3px); }
.dialog form { display: grid; gap: 14px; }
.dialog-kicker { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.dialog h3 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.dialog p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.secret-output { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #bcd2f2; border-radius: 9px; background: #f5f9ff; }
.secret-output code { min-width: 0; flex: 1; overflow: auto; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; width: min(360px, calc(100% - 32px)); gap: 9px; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-soft); box-shadow: 0 12px 30px #1823341a; font-size: 11px; }
.toast.good { border-color: #bde6d9; }
.toast.bad { border-color: #edc1ca; }
.toast-mark { display: grid; width: 20px; height: 20px; flex: none; place-items: center; border-radius: 7px; background: #edf2f8; color: var(--accent); font-size: 9px; font-weight: 900; }
.toast.good .toast-mark { background: #e7f7f1; color: var(--teal); }
.toast.bad .toast-mark { background: var(--danger-bg); color: var(--danger); }
.toast button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; }
.nav-scrim { display: none; }

@media (max-width: 1180px) {
  .content { padding-right: 28px; padding-left: 28px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .sidebar { width: 235px; }
  .main { margin-left: 235px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .log-row { grid-template-columns: 125px 60px 75px minmax(0, 1fr) auto; }
  .log-target { display: none; }
}
@media (max-width: 900px) {
  .sidebar { width: 245px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 14px 0 35px #09132155; }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .nav-scrim { display: block; }
  .main { margin-left: 0; }
  .menu-button { display: block; margin-right: 14px; }
  .topbar { min-height: 76px; padding: 0 22px; }
  .edit-layout, .monitor-grid, .bandwidth-grid, .server-grid, .security-grid, .settings-grid { grid-template-columns: 1fr; }
  .source-page-grid, .profile-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-hero { grid-column: auto; }
  .route-lane { grid-template-columns: 1fr; }
  .route-connector { height: 27px; justify-content: center; transform: rotate(90deg); }
  .route-connector span { max-width: 34px; }
}
@media (max-width: 620px) {
  .auth-shell { padding: 16px; }
  .auth-card { padding: 29px 23px; }
  .auth-card h1 { font-size: 28px; }
  .topbar { padding: 0 16px; }
  .topbar h2 { font-size: 18px; }
  .breadcrumb { font-size: 8px; }
  .top-actions { gap: 5px; }
  .refresh-time, .refresh-label { display: none; }
  .top-actions .icon-button { padding: 9px 10px; }
  .content { padding: 24px 16px 52px; }
  .page-header { display: block; margin-bottom: 23px; }
  .page-header h1 { font-size: 26px; }
  .page-actions { justify-content: flex-start; margin-top: 17px; }
  .summary-grid, .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-grid { margin-bottom: 22px; }
  .summary-card { min-height: 112px; padding: 14px; }
  .summary-card > strong { margin-top: 11px; font-size: 19px; }
  .summary-card > span:last-child { font-size: 10px; }
  .metric-card { padding: 14px; }
  .metric-value { font-size: 21px; }
  .metric-note { font-size: 10px; }
  .panel { padding: 16px; }
  .section-heading { display: block; }
  .section-note { display: block; margin-top: 6px; }
  .source-card, .destination-card { padding: 14px; }
  .telemetry-grid, .destination-telemetry { grid-template-columns: repeat(2, 1fr); gap: 10px 7px; }
  .card-footer { align-items: flex-start; flex-direction: column; }
  .card-footer .inline-actions { width: 100%; }
  .card-footer .inline-actions .small-button { flex: 1; }
  .field-row { grid-template-columns: 1fr auto; }
  .field-row code { grid-column: 1 / -1; grid-row: 2; }
  .field-row .copy-button { grid-column: 2; grid-row: 1; }
  .filter-bar { align-items: stretch; }
  .filter-result { width: 100%; margin: 1px 0; }
  .select-control { min-width: 0; flex: 1; }
  .search-field { width: 100%; flex: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .large-stats, .security-list { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 1fr auto; gap: 6px 8px; }
  .log-time { grid-column: 1; }
  .log-severity { grid-column: 2; grid-row: 1; }
  .log-component { grid-column: 1; }
  .log-message { grid-column: 1 / -1; overflow: visible; white-space: normal; }
  .log-row .copy-button { grid-column: 2; grid-row: 2; }
  .alert-row { gap: 9px; padding: 14px; }
  .alert-severity { min-width: 55px; }
  .alert-row > .small-button { align-self: center; padding: 7px 6px; }
  .server-hero { display: block; }
  .server-hero > .status-pill { display: inline-flex; margin-top: 15px; }
  .about-hero { align-items: flex-start; flex-wrap: wrap; }
  .about-hero > .status-pill { margin-left: 70px; }
  .dialog { padding: 21px; }
  .toast-region { right: 16px; bottom: 16px; }
  .skeleton-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 390px) {
  .summary-grid, .metric-grid { grid-template-columns: 1fr; }
  .page-actions .button { width: 100%; }
  .page-actions .button:not(.primary):not(.danger) { width: auto; }
  .inline-actions { flex-wrap: wrap; }
  .inline-actions .small-button { flex: 1; }
  .auth-card { padding: 25px 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
