/* ==========================================================================
   OmniRoute Gateway Usage Dashboard Stylesheet
   Fonts: Bricolage Grotesque (Headings), Geist (UI Sans), Geist Mono (Code/Numbers)
   ========================================================================== */

/* --- Font Definitions --- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/bricolage.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-mono.woff2') format('woff2-variations');
}

/* --- Color Tokens & Theme Variables --- */
:root {
  color-scheme: light;

  /* Surfaces & Backgrounds */
  --bg-plane: #f4f5f8;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f0f2f6;
  --bg-input: #ffffff;

  /* Borders & Dividers */
  --border-subtle: #e5e8ef;
  --border-strong: #d2d7e2;
  --border-focus: #2a78d6;

  /* Ink / Text */
  --ink-primary: #0e1320;
  --ink-secondary: #4a5263;
  --ink-muted: #6b7385;
  --ink-faint: #9ea5b3;

  /* Accent / Brand */
  --accent: #2a78d6;
  --accent-hover: #1c5cab;
  --accent-subtle: rgba(42, 120, 214, 0.08);

  /* Status Tokens */
  --status-good: #0ca30c;
  --status-good-bg: rgba(12, 163, 12, 0.1);
  --status-warning: #fab219;
  --status-warning-bg: rgba(250, 178, 25, 0.12);
  --status-serious: #ec835a;
  --status-serious-bg: rgba(236, 131, 90, 0.12);
  --status-critical: #d03b3b;
  --status-critical-bg: rgba(208, 59, 59, 0.12);
  --status-neutral: #858d9c;
  --status-neutral-bg: rgba(133, 141, 156, 0.1);

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(14, 19, 32, 0.04);
  --shadow-md: 0 4px 12px rgba(14, 19, 32, 0.05), 0 1px 3px rgba(14, 19, 32, 0.02);
  --shadow-lg: 0 12px 32px rgba(14, 19, 32, 0.08), 0 2px 6px rgba(14, 19, 32, 0.04);
  --shadow-glow: 0 0 24px rgba(42, 120, 214, 0.15);
}

/* Dark Theme Overrides */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg-plane: #0a0c11;
    --bg-surface: #12151c;
    --bg-surface-elevated: #181d26;
    --bg-subtle: #1a1f2c;
    --bg-input: #151821;

    --border-subtle: #222836;
    --border-strong: #2f374a;
    --border-focus: #3987e5;

    --ink-primary: #f3f5f9;
    --ink-secondary: #b3b9c5;
    --ink-muted: #858d9c;
    --ink-faint: #575e6d;

    --accent: #3987e5;
    --accent-hover: #5598e7;
    --accent-subtle: rgba(57, 135, 229, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-plane: #0a0c11;
  --bg-surface: #12151c;
  --bg-surface-elevated: #181d26;
  --bg-subtle: #1a1f2c;
  --bg-input: #151821;

  --border-subtle: #222836;
  --border-strong: #2f374a;
  --border-focus: #3987e5;

  --ink-primary: #f3f5f9;
  --ink-secondary: #b3b9c5;
  --ink-muted: #858d9c;
  --ink-faint: #575e6d;

  --accent: #3987e5;
  --accent-hover: #5598e7;
  --accent-subtle: rgba(57, 135, 229, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
}

/* --- Base Reset & Setup --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-plane);
  color: var(--ink-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Typography styles */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

/* SVG icon helper */
.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-lg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Provider Icon Styling */
.provider-logo {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
}

:root[data-theme="dark"] .provider-logo-mono,
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .provider-logo-mono {
    filter: invert(1) brightness(1.2);
  }
}

/* --- App Layout (Compact Sizing) --- */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0.75rem 2.5rem;
}

@media (min-width: 768px) {
  .app-container {
    padding: 1.25rem 1rem 3rem;
  }
}

/* --- Header & Top Navbar --- */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #1c5cab);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.brand-text h1 {
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand-text .key-label {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--ink-primary);
  text-decoration: none;
}

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

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

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--ink-secondary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.btn-ghost {
  color: var(--ink-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

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

/* Spinning Animation for Refresh */
.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Tabs Bar --- */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.125rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ink-primary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-counter {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
}

.tab-btn.active .tab-counter {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* --- Cards & Panels --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

/* --- Grid Layouts --- */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.kpi-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--ink-muted);
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  font-family: var(--font-body);
  color: var(--ink-primary);
  margin-bottom: 0.25rem;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- Progress Meter & Bars --- */
.meter-container {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.meter-fill.good,
.meter-fill.healthy { background-color: var(--status-good); }

.meter-fill.warning,
.meter-fill.serious,
.meter-fill.critical,
.meter-fill.reached { background-color: var(--status-critical); }

.meter-fill.neutral,
.meter-fill.not-used { background-color: var(--accent); }

/* --- 2-Card Limits Layout (USD & Tokens) --- */
.limits-two-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .limits-two-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.limits-group-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* --- Token Distribution Stacked Bar --- */
.stacked-bar {
  display: flex;
  width: 100%;
  height: 18px;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
  gap: 2px; /* 2px surface gap per dataviz spec */
  margin: 0.75rem 0 1rem;
}

.stacked-segment {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

.token-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem;
}

.token-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.78125rem;
}

.token-legend-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.token-legend-right {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* --- Models View --- */
.models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.model-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.875rem;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.model-card:hover {
  border-color: var(--border-strong);
}

.model-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.model-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.model-title-wrapper h3 {
  font-size: 0.9375rem;
  line-height: 1.25;
}

.model-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: all;
  margin: 0.25rem 0 0.45rem;
  transition: all 0.15s ease;
}

.model-id-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
  background: var(--bg-surface-elevated);
}

.model-desc {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
  margin: 0.35rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.model-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.badge-cap {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
}

/* High Utilization Quotas (3 per row) */
.high-util-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .high-util-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .high-util-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Provider Grouping */
.provider-group-section {
  margin-bottom: 1.5rem;
}

.provider-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
}

.provider-group-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.provider-group-count {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

/* --- Accounts Grid & List --- */
.accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 2.25rem;
  font-size: 0.8125rem;
  font-family: var(--font-body);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--ink-primary);
  outline: none;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

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

@media (min-width: 640px) {
  .accounts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .accounts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.account-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.875rem;
  border-radius: 10px;
  position: relative;
}

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.account-provider-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.provider-icon-badge {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.account-title h4 {
  font-size: 0.875rem;
  line-height: 1.2;
}

.account-title .account-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.account-badges {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-plan {
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-stale {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.badge-unavailable {
  background: var(--status-neutral-bg);
  color: var(--status-neutral);
}

/* Quotas List in Account Card */
.quotas-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.quota-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.quota-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.quota-name {
  color: var(--ink-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.quota-metric {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.quota-metric.good,
.quota-metric.healthy { color: var(--status-good); }

.quota-metric.warning,
.quota-metric.serious,
.quota-metric.critical,
.quota-metric.reached { color: var(--status-critical); }

.quota-metric.neutral,
.quota-metric.not-used { color: var(--accent); }

/* Card Collapse / Expand Action */
.btn-toggle-quotas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--bg-subtle);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-toggle-quotas:hover {
  background: var(--accent-subtle);
}

/* --- Limits View: Aggregated Card with Multiple Progress Lines --- */
.limits-group-card {
  margin-bottom: 1rem;
}

.limits-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.limit-line {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.limit-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.limit-line-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.limit-line-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.limit-line-value {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
}

.limit-line-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

/* --- Raw JSON View --- */
.raw-container {
  position: relative;
}

.raw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.code-block {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-secondary);
  max-height: 600px;
}

/* --- Login Modal Screen --- */
.login-backdrop {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, var(--accent-subtle), transparent 60%), var(--bg-plane);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #1c5cab);
  color: #ffffff;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-glow);
}

.login-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.login-header p {
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--ink-muted);
  pointer-events: none;
}

.input-text {
  width: 100%;
  padding: 0.6rem 0.875rem 0.6rem 2.25rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--ink-primary);
  outline: none;
  transition: all 0.15s ease;
}

.input-text:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.input-btn-toggle {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 0.25rem;
}

.input-btn-toggle:hover {
  color: var(--ink-primary);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}

.alert-error {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--status-critical-bg);
  border: 1px solid var(--status-critical);
  border-radius: 8px;
  color: var(--status-critical);
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
}

/* Empty State / Notice */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--ink-muted);
}

.empty-state .icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }
}
