/* StreamSuites Admin — approved Studio-first typography with muted operator polish. */

@font-face {
  font-family: "Tektur";
  src: url("/assets/fonts/Tektur-VariableFont_wdth,wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/Geist-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/Geist-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/Geist-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/Geist-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/Geist-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/Geist-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-Thin.ttf") format("truetype");
  font-style: normal;
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-ExtraLight.ttf") format("truetype");
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Blinker";
  src: url("/assets/fonts/body/Blinker-Black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/mono/IBMPlexMono-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/mono/IBMPlexMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/mono/IBMPlexMono-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/mono/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/mono/IBMPlexMono-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ss-font-display: "Tektur", "Geist Sans", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --ss-font-heading-ui: "Geist Sans", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --ss-font-ui: "Blinker", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --ss-font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, Menlo, Monaco, monospace;
  --ss-weight-body: 400;
  --ss-weight-ui-medium: 500;
  --ss-weight-ui-semibold: 600;
  --ss-weight-ui-bold: 700;
  --ss-weight-display-medium: 500;
  --ss-weight-display-semibold: 600;
  --ss-weight-display-bold: 700;
  --ss-weight-mono-regular: 400;
  --ss-weight-mono-medium: 500;
  --ss-weight-mono-semibold: 600;
  --system-mono-font: var(--ss-font-mono);
}

html {
  font-synthesis: none;
}

body,
button,
input,
select,
textarea,
#app,
.ss-panel,
.ss-modal,
.ss-dialog {
  font-family: var(--ss-font-ui);
}

body {
  font-weight: var(--ss-weight-body);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--ss-font-heading-ui);
  font-weight: var(--ss-weight-ui-semibold);
  letter-spacing: -0.01em;
}

.app-title,
.ss-title,
.ss-overview-hero-copy > h2,
.admin-gate-title,
.auth-title,
.ss-404-title {
  font-family: var(--ss-font-display);
  font-weight: var(--ss-weight-display-semibold);
  font-variation-settings: "wdth" 96;
  letter-spacing: -0.015em;
}

.app-title {
  font-size: 1rem;
}

.ss-topbar-title,
.ss-panel-header h2,
.ss-panel-header h3,
.ss-overview-section-heading h3 {
  font-family: var(--ss-font-heading-ui);
  font-weight: var(--ss-weight-ui-semibold);
  letter-spacing: -0.005em;
}

code,
pre,
kbd,
samp,
.mono,
.footer-version,
.version-value,
.status-indicator,
.ss-chip,
.ss-status-label,
.ss-status-details,
.ss-permissions-row-key,
.ss-overview-meta-list,
.ss-overview-summary-value,
.ss-overview-metric-value,
[data-version],
[data-build] {
  font-family: var(--ss-font-mono);
  font-variant-numeric: tabular-nums;
}

.dashboard-badge,
.nav-group-label,
.ss-chip,
.status-indicator,
.ss-status-label,
.table-toolbar label,
.ss-table-toolbar label {
  font-family: var(--ss-font-mono);
  font-weight: var(--ss-weight-mono-medium);
  letter-spacing: 0.065em;
}

#app-nav li,
#app-nav a,
.ss-btn,
.ss-link-btn,
button,
input,
select,
textarea,
label,
legend {
  font-family: var(--ss-font-ui);
}

#app-nav li,
#app-nav a,
.ss-btn,
.ss-link-btn,
button {
  font-weight: var(--ss-weight-ui-semibold);
  letter-spacing: 0.035em;
}

.dashboard-badge,
.nav-group-label,
.ss-chip,
.status-indicator,
.ss-status-label {
  text-transform: uppercase;
}

:is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-shell-strong, #a4cbff);
  outline-offset: 3px;
}

.ss-panel,
.ss-card,
.ss-modal,
.ss-dialog,
.admin-gate-card {
  border-color: var(--border-subtle);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ss-panel-header,
.ss-modal-header,
.ss-dialog-header {
  border-bottom-color: var(--border-subtle);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

thead th {
  color: var(--text-secondary);
  font-family: var(--ss-font-mono);
  font-size: 0.68rem;
  font-weight: var(--ss-weight-mono-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr {
  transition: background-color 120ms ease;
}

tbody tr:hover {
  background: rgba(var(--accent-shell-rgb, 90, 156, 255), 0.045);
}

:is(input, select, textarea) {
  border-color: var(--border-subtle);
  background-color: rgba(8, 11, 16, 0.78);
  color: var(--text-primary);
  font-weight: var(--ss-weight-body);
  letter-spacing: 0;
}

:is(input, select, textarea):focus {
  border-color: rgba(var(--accent-shell-rgb, 90, 156, 255), 0.62);
  box-shadow: 0 0 0 2px rgba(var(--accent-shell-rgb, 90, 156, 255), 0.14);
}

.ss-alert-danger,
.ss-btn-danger,
.ss-btn-destructive,
[data-danger="true"] {
  box-shadow: inset 0 0 0 1px rgba(217, 83, 79, 0.1);
}

.ss-empty-state,
.ss-loading-state,
.ss-error-state {
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.018);
}

/* ----------------------------------------------------------------------
   Unified operator surface
   This final layer intentionally reconciles legacy component palettes while
   leaving route, component, and data contracts unchanged.
   ---------------------------------------------------------------------- */

html,
body {
  min-height: 100%;
  background:
    radial-gradient(circle at 72% -18%, rgba(80, 116, 153, 0.085), transparent 34rem),
    linear-gradient(180deg, #06080b 0%, #080b0f 48%, #06080b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(183, 205, 227, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 205, 227, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}

#app-header,
#app-nav,
#app-sidebar,
.sidebar,
.app-sidebar {
  background-color: rgba(7, 10, 14, 0.94);
  border-color: var(--border-subtle);
  box-shadow: none;
}

#app-header {
  border-bottom-width: 1px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#app-nav li,
#app-nav a,
.nav-item {
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

#app-nav li:hover,
#app-nav a:hover,
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(182, 204, 228, 0.045);
  text-decoration: none;
}

#app-nav li.active,
#app-nav .nav-overflow-menu li.active,
.nav-item.active {
  color: #dce7f2;
  background: rgba(105, 141, 180, 0.12);
  border-color: rgba(143, 174, 207, 0.16);
  box-shadow: inset 2px 0 0 #789bc0;
}

#app-nav li.active::before {
  background: #789bc0;
  box-shadow: none;
}

.ss-panel,
.ss-card,
.ss-modal,
.ss-dialog,
.admin-gate-card,
.glass-card {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.022), transparent 42%),
    rgba(12, 16, 21, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.30), inset 0 1px rgba(255, 255, 255, 0.025);
}

.ss-panel-header,
.ss-modal-header,
.ss-dialog-header {
  background: rgba(255, 255, 255, 0.012);
  border-bottom: 1px solid var(--border-subtle);
}

.ss-panel + .ss-panel {
  margin-top: 16px;
}

.ss-btn,
.ss-link-btn,
button {
  border-radius: 6px;
  box-shadow: none;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.ss-btn:hover,
.ss-link-btn:hover,
button:hover {
  box-shadow: none;
}

.ss-btn-primary,
.admin-auth-card .ss-btn-primary {
  color: #eef5fb;
  border-color: rgba(144, 176, 210, 0.36);
  background: #456886;
  box-shadow: none;
}

.ss-btn-primary:hover,
.admin-auth-card .ss-btn-primary:hover {
  border-color: rgba(170, 198, 227, 0.5);
  background: #527695;
}

.ss-btn-secondary,
.ss-btn-ghost,
.ss-link-btn {
  color: #c8d1dc;
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.025);
}

.ss-btn-secondary:hover,
.ss-btn-ghost:hover,
.ss-link-btn:hover {
  color: #eef3f8;
  border-color: var(--border-strong);
  background: rgba(184, 205, 227, 0.065);
}

.ss-btn-danger,
.ss-btn-destructive {
  border-color: rgba(211, 100, 100, 0.35);
  background: rgba(137, 50, 50, 0.34);
}

:is(input, select, textarea),
.ss-input,
.ss-select,
.ss-textarea {
  min-height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #090d11;
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

:is(input, select, textarea):hover,
.ss-input:hover,
.ss-select:hover,
.ss-textarea:hover {
  border-color: rgba(190, 207, 226, 0.16);
}

:is(input, select, textarea):focus,
.ss-input:focus,
.ss-select:focus,
.ss-textarea:focus {
  border-color: rgba(var(--accent-shell-rgb), 0.62);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--accent-shell-rgb), 0.11);
}

.ss-checkbox,
input[type="checkbox"] {
  accent-color: #698caf;
}

.ss-switch-slider,
.ss-toggle-track,
[role="switch"] {
  border-color: rgba(190, 207, 226, 0.15);
  background: #20262e;
  box-shadow: none;
}

input:checked + .ss-switch-slider,
[role="switch"][aria-checked="true"] {
  border-color: rgba(139, 172, 207, 0.36);
  background: #496b89;
  box-shadow: none;
}

.ss-table,
table {
  background: transparent;
}

.ss-table thead,
table thead {
  background: rgba(255, 255, 255, 0.022);
}

.ss-table th,
.ss-table td,
table th,
table td {
  border-color: rgba(190, 207, 226, 0.075);
}

.ss-table tbody tr:nth-child(even),
table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.009);
}

.ss-table tbody tr:hover,
table tbody tr:hover {
  background: rgba(var(--accent-shell-rgb), 0.052);
}

.ss-chip,
.pill,
.ss-badge,
.status-indicator {
  border-color: rgba(190, 207, 226, 0.13);
  background: rgba(255, 255, 255, 0.028);
  box-shadow: none;
}

.ss-modal-backdrop,
.admin-auth-overlay,
.admin-auth-blocked {
  background: rgba(2, 4, 7, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Auth uses one restrained, neutral provider treatment. */
.admin-auth-page {
  min-height: 100vh;
}

.admin-auth-page-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.admin-auth-card,
.admin-auth-blocked-card {
  width: min(100%, 480px);
  padding: clamp(24px, 4vw, 34px);
  border-color: rgba(181, 201, 221, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
    #0b0f14;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.035);
}

.admin-auth-title {
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  color: #f0f3f6;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
}

.admin-auth-title-logo {
  width: 34px;
  height: 34px;
  filter: saturate(0.76) contrast(1.04);
}

.admin-auth-providers {
  gap: 9px;
  margin-top: 20px;
}

.admin-auth-providers .admin-auth-provider-button {
  min-height: 42px;
  justify-content: flex-start;
  gap: 11px;
  padding-inline: 14px;
  color: #d8dee5;
  border: 1px solid rgba(190, 207, 226, 0.12);
  background: #11161c;
}

.admin-auth-providers .admin-auth-provider-button:hover {
  color: #f1f4f7;
  border-color: rgba(190, 207, 226, 0.23);
  background: #171d24;
  transform: translateY(-1px);
}

.admin-auth-provider-icon {
  opacity: 0.88;
  filter: saturate(0.72);
}

.admin-auth-divider {
  color: var(--text-muted);
}

.admin-auth-divider::before,
.admin-auth-divider::after {
  background: var(--border-subtle);
}

.admin-auth-turnstile {
  border: 1px solid rgba(190, 207, 226, 0.10);
  border-radius: 8px;
  background: #090c10;
  box-shadow: none;
}

.admin-auth-surface-links {
  border-color: rgba(190, 207, 226, 0.10);
  background: rgba(255, 255, 255, 0.014);
}

/* API usage telemetry chart */
.api-usage-chart-panel {
  overflow: hidden;
  padding: 16px;
  border-color: rgba(163, 190, 219, 0.11);
  background:
    radial-gradient(circle at 92% 0%, rgba(91, 139, 184, 0.08), transparent 34%),
    #080c11;
}

.api-usage-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.api-usage-chart-current {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  align-items: baseline;
  color: var(--text-secondary);
  font: 500 0.65rem/1.2 var(--ss-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.api-usage-chart-current strong {
  color: #d9e7f4;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.api-usage-chart-canvas {
  height: 280px;
}

.api-usage-chart-tooltip {
  border-color: rgba(177, 204, 230, 0.18);
  border-radius: 7px;
  background: rgba(7, 11, 16, 0.97);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 720px) {
  .ss-panel,
  .ss-card,
  .ss-modal,
  .ss-dialog {
    border-radius: 8px;
  }

  .ss-panel-header,
  .ss-panel-body {
    padding-inline: 14px;
  }

  .admin-auth-page-main {
    align-items: start;
    padding: 16px 12px;
  }

  .admin-auth-card,
  .admin-auth-blocked-card {
    padding: 22px 18px;
  }

  .admin-auth-email-row,
  .ss-panel-header-actions,
  .api-usage-chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-auth-email-row > *,
  .ss-panel-header-actions > * {
    width: 100%;
  }

  .api-usage-chart-canvas {
    height: 230px;
  }
}

@media (max-width: 980px) {
  #app-header {
    flex: 0 0 auto;
  }

  .app-title,
  .ss-title,
  .ss-overview-hero-copy > h2 {
    font-variation-settings: "wdth" 92;
  }

  .ss-table-wrap,
  .table-wrap,
  .ss-table-scroll {
    overscroll-behavior-inline: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
