/* ==========================================================================
   NBSIM Connectivity Cloud — ChinaCCS Crimson Console Stylesheet
   Unified design system with global.nbsim.com API v1 Reference + WCAG AA
   ========================================================================== */

/* Self-hosted Latin WOFF2 fonts (shared from /fonts/, zero third-party requests) */
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/figtree-400-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/gabarito-400-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  --bg: #f8f6f6;
  --surface: #ffffff;
  --surface-subtle: #f2eeee;
  --surface-hover: #ece5e6;
  --border: rgba(26, 18, 20, 0.12);
  --border-strong: rgba(26, 18, 20, 0.24);

  --ink: #1a1214;
  --ink-muted: #47393c;
  --ink-faint: #6e5f62;

  --accent: #c41a2e;
  --accent-hover: #a31324;
  --accent-soft: #fce8eb;
  --accent-text: #b01528;

  --emerald: #15803d;
  --emerald-bg: #dcfce7;
  --amber: #92400e;
  --amber-bg: #fef3c7;
  --rose: #9a3412;
  --rose-bg: #ffedd5;
  --slate-badge: #47393c;
  --slate-badge-bg: #f2eeee;

  --shadow-sm: 0 1px 2px rgba(26, 18, 20, 0.08);
  --shadow-md: 0 12px 32px rgba(26, 18, 20, 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --font-display: "Gabarito", system-ui, sans-serif;
  --font-sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141112;
  --surface: #1e191b;
  --surface-subtle: #261f22;
  --surface-hover: #2f2529;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.24);

  --ink: #ffffff;
  --ink-muted: #e2d8da;
  --ink-faint: #a8999c;

  --accent: #e03146;
  --accent-hover: #c41a2e;
  --accent-soft: rgba(196, 26, 46, 0.22);
  --accent-text: #ff7a8a;

  --emerald: #4ade80;
  --emerald-bg: rgba(34, 197, 94, 0.18);
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.16);
  --rose: #fb923c;
  --rose-bg: rgba(251, 146, 60, 0.18);
  --slate-badge: #e2d8da;
  --slate-badge-bg: rgba(255, 255, 255, 0.1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141112;
    --surface: #1e191b;
    --surface-subtle: #261f22;
    --surface-hover: #2f2529;
    --border: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.24);

    --ink: #ffffff;
    --ink-muted: #e2d8da;
    --ink-faint: #a8999c;

    --accent: #e03146;
    --accent-hover: #c41a2e;
    --accent-soft: rgba(196, 26, 46, 0.22);
    --accent-text: #ff7a8a;

    --emerald: #4ade80;
    --emerald-bg: rgba(34, 197, 94, 0.18);
    --amber: #fbbf24;
    --amber-bg: rgba(245, 158, 11, 0.16);
    --rose: #fb923c;
    --rose-bg: rgba(251, 146, 60, 0.18);
    --slate-badge: #e2d8da;
    --slate-badge-bg: rgba(255, 255, 255, 0.1);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  accent-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, .kpi-value {
  font-family: var(--font-display);
}

[hidden] {
  display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

:where(a, button, input, select, textarea, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ==========================================================================
   Toast Region
   ========================================================================== */
.toast-region {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 22rem;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  min-block-size: 2.125rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-subtle);
  color: var(--ink);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.25rem;
  min-block-size: 2.25rem;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.link-btn, .theme-toggle-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.4rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
}
.link-btn:hover, .theme-toggle-btn:hover {
  background: var(--accent-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea,
.page-size-select {
  font: inherit;
  font-size: max(0.875rem, 14px);
  min-block-size: 2.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.field textarea {
  min-block-size: 5.5rem;
  resize: vertical;
  width: 100%;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-faint);
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  width: 100%;
  padding-inline-end: 2.75rem;
}

.password-wrap .icon-btn {
  position: absolute;
  inset-inline-end: 0.25rem;
}

.form-error {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--rose-bg);
  color: var(--rose);
  font-size: 0.8125rem;
  font-weight: 500;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   Auth Shell (Split Editorial Layout — ChinaCCS Crimson)
   ========================================================================== */
.auth-shell {
  min-block-size: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-hero {
  background:
    radial-gradient(circle at 14% 16%, rgba(196, 26, 46, 0.28) 0%, transparent 48%),
    linear-gradient(155deg, #141112 0%, #1c1316 55%, #2a1218 100%);
  color: #ffffff;
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-hero-inner {
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.chinaccs-logo-link {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0.25rem 0.45rem 0.25rem 0;
  transition: opacity 0.15s ease;
}

.chinaccs-logo-link:hover {
  opacity: 0.9;
}

.chinaccs-logo-img {
  display: block;
  height: 46px;
  width: auto;
  object-fit: contain;
}

.hero-nbsim-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.48rem;
}

.hero-nbsim-name {
  font-size: 1.18rem;
  color: #ffffff;
}

.hero-byline-text {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.92);
}

.auth-hero-footer {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-parent-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ff9aa6;
  text-decoration: none;
}

.hero-parent-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.hero-copyright {
  margin: 0;
  font-size: 0.78rem;
  color: #b8a6aa;
}

.auth-panel-stack {
  width: 100%;
  max-width: 25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.auth-legal-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: center;
}

.auth-legal-bar a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.auth-legal-bar a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: #c41a2e;
  color: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(196, 26, 46, 0.35);
}

.brand-mark-sm {
  width: 30px;
  height: 30px;
  border-radius: 3px;
  box-shadow: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-name {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.25;
}

.auth-hero .brand-name { color: #ffffff; }
.auth-hero .brand-badge {
  color: #ff99a5;
  background: rgba(196, 26, 46, 0.28);
  border: 1px solid rgba(255, 138, 152, 0.28);
}
.sidebar .brand-name { color: var(--ink); }

.brand-sub {
  display: block;
  font-size: 0.75rem;
  color: #b8a6aa;
  margin-top: 1px;
}
.sidebar .brand-sub { color: var(--ink-faint); }

.auth-card-brand {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.auth-hero .eyebrow {
  color: #ff8a98;
}

.auth-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-lead {
  margin: 0;
  color: #dcd0d3;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-metrics {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.25rem;
}

.hero-metrics dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b8a6aa;
  margin-bottom: 0.25rem;
}

.hero-metrics dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #f8f2f3;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.auth-card-header {
  margin-bottom: 1.5rem;
}

.auth-card-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* Optional slider CAPTCHA UI */
.captcha-box {
  padding: 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.captcha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
}
.captcha-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
}
.captcha-stage img { display: block; width: 100%; height: auto; }
.captcha-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: auto !important;
  height: 100% !important;
}
.captcha-slider { width: 100%; }
.field-hint { margin: 0; font-size: 0.75rem; color: var(--ink-muted); }

/* ==========================================================================
   Console App Shell
   ========================================================================== */
.app-shell {
  min-block-size: 100dvh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  block-size: 100dvh;
}

.sidebar-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  position: relative;
  flex: 1;
  padding: 0.85rem 0.75rem;
}

.sidebar-nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-inline-start: 3px solid var(--accent-text);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  will-change: transform;
}

.sidebar-nav.has-pill .sidebar-nav-pill {
  opacity: 1;
}

.sidebar-nav ul {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.75rem;
  border: none;
  border-inline-start: 3px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.nav-item:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.nav-item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
  border-inline-start-color: var(--accent-text);
}

.sidebar-nav.has-pill .nav-item[aria-current="page"] {
  background: transparent;
  border-inline-start-color: transparent;
}

.sidebar-nav.has-pill .nav-item[aria-current="page"]:hover {
  background: transparent;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}

.user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-org {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem clamp(1rem, 2.5vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-left, .topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.page-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.mobile-only {
  display: none;
}

.main-content {
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 2.5vw, 2rem) 3rem;
  max-width: 1440px;
  width: 100%;
  margin-inline: auto;
}

.view-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ==========================================================================
   Cards, KPIs & Overview
   ========================================================================== */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.text-emerald { color: var(--emerald); }
.text-amber { color: var(--amber); }
.text-live-green { color: #15803d; }

:root[data-theme="dark"] .text-live-green { color: #4ade80; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .text-live-green { color: #4ade80; }
}

.kpi-grid-compact .kpi-card {
  padding: 1rem 1.15rem;
}

.kpi-grid-compact .kpi-value {
  font-size: 1.55rem;
}

.usage-nonzero {
  font-weight: 700;
  color: var(--accent-text);
}

.usage-zero {
  color: var(--ink-faint);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.25rem;
}

.overview-grid > .surface-card:not(.table-card) {
  padding: 1.25rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-head.padded {
  padding: 1.15rem 1.25rem 0;
}

.card-head h2, .card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.bar-track {
  height: 0.55rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.bar-fill.active { background: var(--emerald); }
.bar-fill.testable { background: var(--amber); }
.bar-fill.terminated,
.bar-fill.retired { background: var(--ink-faint); }
.bar-fill.paused,
.bar-fill.suspended { background: var(--amber); }

.overview-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.overview-section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Section Header & Filters
   ========================================================================== */
.section-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-bar h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.filter-bar {
  padding: 1rem 1.15rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.filter-grid > .field:first-child {
  grid-column: span 2;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.integrated-filter-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 1.8fr) repeat(2, minmax(9.5rem, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

.compact-dialog {
  width: min(30rem, calc(100vw - 2rem));
}

.notice-banner {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 0.8125rem;
  font-weight: 500;
}

.dialog-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.5rem;
}

.subsim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.carrier-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.carrier-profile-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.carrier-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.carrier-chip::before {
  content: "";
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.carrier-chip strong {
  color: var(--ink);
}

.carrier-chip.is-active {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2), 0 0 10px rgba(34, 197, 94, 0.25);
}

.carrier-chip.is-active::before {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.32);
}

.carrier-chip.is-active strong {
  color: #14532d;
}

:root[data-theme="dark"] .carrier-chip.is-active {
  background: rgba(22, 163, 74, 0.22);
  border-color: #4ade80;
  color: #bbf7d0;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.28), 0 0 12px rgba(34, 197, 94, 0.3);
}

:root[data-theme="dark"] .carrier-chip.is-active::before {
  background: #22c55e;
  box-shadow: 0 0 8px #4ade80;
}

:root[data-theme="dark"] .carrier-chip.is-active strong {
  color: #ecfdf5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .carrier-chip.is-active {
    background: rgba(22, 163, 74, 0.22);
    border-color: #4ade80;
    color: #bbf7d0;
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.28), 0 0 12px rgba(34, 197, 94, 0.3);
  }
  :root:not([data-theme="light"]) .carrier-chip.is-active::before {
    background: #22c55e;
    box-shadow: 0 0 8px #4ade80;
  }
  :root:not([data-theme="light"]) .carrier-chip.is-active strong {
    color: #ecfdf5;
  }
}

.carrier-active-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.06rem 0.34rem;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
}

.carrier-live-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.carrier-live-meta.is-online {
  color: #15803d;
  font-weight: 600;
}

:root[data-theme="dark"] .carrier-live-meta.is-online {
  color: #4ade80;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .carrier-live-meta.is-online {
    color: #4ade80;
  }
}

.live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.carrier-live-meta.is-online .live-dot {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.28);
}

.subsim-card.is-active-profile {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.22);
}

:root[data-theme="dark"] .subsim-card.is-active-profile {
  border-color: #4ade80;
  background: rgba(22, 163, 74, 0.14);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .subsim-card.is-active-profile {
    border-color: #4ade80;
    background: rgba(22, 163, 74, 0.14);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25);
  }
}

.status-online-green {
  color: #15803d;
  background: #dcfce7;
}

:root[data-theme="dark"] .status-online-green {
  color: #86efac;
  background: rgba(22, 163, 74, 0.24);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .status-online-green {
    color: #86efac;
    background: rgba(22, 163, 74, 0.24);
  }
}

.subsim-section-title {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.subsim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.subsim-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.subsim-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.subsim-card-head h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 650;
}

.subsim-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem 0.9rem;
  margin: 0;
}

.subsim-meta dt {
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.subsim-meta dd {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  word-break: break-all;
}

.usage-filter-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1.6fr) repeat(2, minmax(9.5rem, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 900px) {
  .usage-filter-row {
    grid-template-columns: 1fr;
  }
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.segmented {
  position: relative;
  display: inline-flex;
  padding: 0.2rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.seg-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  will-change: transform;
}

.segmented.has-pill .seg-pill {
  opacity: 1;
}

.seg-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.segmented.has-pill .seg-btn.active {
  background: transparent;
  box-shadow: none;
}

/* ==========================================================================
   Responsive Semantic Data Table (Single <table> + Sticky + @container)
   ========================================================================== */
.table-card {
  overflow: hidden;
}

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(620px, 68dvh);
  container-type: inline-size;
}

.table-wrapper.compact {
  max-block-size: 420px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.845rem;
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
}

.data-table th {
  text-align: start;
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 3.5rem;
}

.data-table tbody th,
.data-table tbody td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
  background: var(--surface-subtle);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.responsive-sim-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  font-weight: 500;
  border-inline-end: 1px solid var(--border);
}

.responsive-sim-table thead th:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 4;
  border-inline-end: 1px solid var(--border);
}

.responsive-sim-table thead th:last-child {
  position: sticky;
  inset-inline-end: 0;
  z-index: 4;
  border-inline-start: 1px solid var(--border);
}

.responsive-sim-table tbody td:last-child {
  position: sticky;
  inset-inline-end: 0;
  z-index: 1;
  border-inline-start: 1px solid var(--border);
}

.num {
  text-align: end !important;
  font-variant-numeric: tabular-nums;
}

.actions-col {
  text-align: end !important;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.cell-primary {
  font-weight: 500;
  color: var(--ink);
}

.cell-secondary {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.copy-id-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.35rem;
  margin-inline-start: -0.35rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}
.copy-id-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
}

.status-active { color: var(--emerald); background: var(--emerald-bg); }
.status-testable { color: var(--amber); background: var(--amber-bg); }
.status-suspended { color: var(--rose); background: var(--rose-bg); }
.status-neutral { color: var(--slate-badge); background: var(--slate-badge-bg); }

.row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.row-actions .btn {
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
}

.empty-cell {
  text-align: center;
  padding: 2.5rem 1rem !important;
  color: var(--ink-faint);
}

.note-clamp {
  display: block;
  max-inline-size: 9.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Container-query stacked card layout for narrow viewports/containers */
@container (width < 720px) {
  .responsive-sim-table,
  .responsive-sim-table thead,
  .responsive-sim-table tbody,
  .responsive-sim-table tr,
  .responsive-sim-table th,
  .responsive-sim-table td {
    display: block;
  }

  .responsive-sim-table thead {
    display: none;
  }

  .responsive-sim-table tbody {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .responsive-sim-table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .responsive-sim-table tbody th {
    position: sticky;
    inset-block-start: 0;
    inset-inline-start: auto;
    background: var(--surface-subtle);
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
  }

  .responsive-sim-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0.85rem;
    text-align: end;
    position: static;
    border-inline-start: none;
  }

  .responsive-sim-table tbody td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: start;
  }
}

.pagination-bar {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.pagination-info { margin: 0; }

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-size-select {
  min-block-size: 2.125rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.8125rem;
}

/* ==========================================================================
   Native <dialog> Telemetry Inspector
   ========================================================================== */
.detail-dialog {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  transform-origin: center center;
}

.detail-dialog.is-animating {
  will-change: transform, opacity;
}

.detail-dialog[open] {
  display: flex;
  flex-direction: column;
}

.detail-dialog:modal {
  overscroll-behavior: contain;
}

.detail-dialog::backdrop {
  background: rgba(20, 14, 16, 0.62);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
  transition: opacity 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}

.detail-dialog.is-closing::backdrop {
  opacity: 0;
}

.dialog-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.05rem;
  word-break: break-all;
}

.dialog-body {
  padding: 1.25rem 1.5rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem 1.25rem;
}

.detail-grid dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin-bottom: 0.15rem;
}

.detail-grid dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  word-break: break-word;
}

.dialog-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.nav-label-grow {
  flex: 1;
  min-width: 0;
}

.nav-count-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Support Tickets / Work Orders
   ========================================================================== */
.ticket-filter-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 1.8fr) repeat(3, minmax(8.5rem, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

.ticket-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ticket-detail-dialog {
  width: min(48rem, calc(100vw - 2rem));
}

.ticket-desc-box {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.ticket-box-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.ticket-desc-text {
  margin: 0;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.ticket-review-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
}

.ticket-review-copy strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}

.ticket-review-copy p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.ticket-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-footer-actions {
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--accent-text);
  border: 1px solid rgba(196, 26, 46, 0.35);
}

.btn-danger-ghost:hover {
  background: rgba(196, 26, 46, 0.1);
}

.ticket-thread-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ticket-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-block-size: 16rem;
  overflow-y: auto;
  padding-inline-end: 0.25rem;
}

.ticket-comment {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.ticket-comment.is-system {
  background: var(--surface-subtle);
  border-style: dashed;
}

.ticket-comment.is-support {
  border-inline-start: 3px solid var(--accent);
  background: var(--accent-soft);
}

.ticket-role-badge {
  display: inline-block;
  margin-inline-start: 0.4rem;
  padding: 0.05rem 0.42rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--accent);
  color: #ffffff;
}

.ticket-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.76rem;
}

.ticket-comment-author {
  font-weight: 650;
  color: var(--ink);
}

.ticket-comment-time {
  color: var(--ink-faint);
}

.ticket-comment-body {
  margin: 0;
  font-size: 0.845rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-muted);
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
  white-space: nowrap;
}

.priority-urgent { background: #c41a2e; color: #ffffff; }
.priority-high { background: var(--amber-bg); color: var(--amber); }
.priority-normal { background: var(--surface-subtle); color: var(--ink-muted); border: 1px solid var(--border); }
.priority-low { background: var(--slate-badge-bg); color: var(--ink-faint); }

@media (max-width: 1120px) {
  .ticket-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ticket-form-grid,
  .ticket-status-bar {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1120px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-card-brand {
    display: flex;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 40;
    width: 256px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex;
  }
}

/* ==========================================================================
   Reduced Motion Accessibility Override
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .nav-item,
  .btn,
  .carrier-chip {
    transition-duration: 0.15s !important;
  }
  .sidebar-nav-pill,
  .seg-pill,
  .detail-dialog.is-animating {
    will-change: auto;
  }
  .detail-dialog::backdrop {
    transition-duration: 0.15s !important;
  }
}
