:root {
  --bg: #080e1a;
  --bg-accent: #0c1526;
  --bg-elevated: #101d30;
  --bg-hover: #152742;
  --bg-muted: #152742;
  --bg-content: #0c1526;
  --card: #0e1a2e;
  --card-foreground: #e8f0fa;
  --popover: #101d30;
  --popover-foreground: #e8f0fa;
  --panel: #080e1a;
  --panel-strong: #0e1a2e;
  --panel-hover: #152742;
  --chrome: rgba(8, 14, 26, 0.95);
  --chrome-strong: rgba(8, 14, 26, 0.98);
  --text: #dce8f5;
  --text-strong: #f0f6ff;
  --chat-text: #dce8f5;
  --muted: #6d8aaa;
  --muted-strong: #90aec8;
  --muted-foreground: #6d8aaa;
  --border: #1a3050;
  --border-strong: #244468;
  --border-hover: #2e5a88;
  --input: #1a3050;
  --ring: #1a73e8;
  --accent: #1a73e8;
  --accent-hover: #3d8ef0;
  --accent-muted: #1a73e8;
  --accent-subtle: rgba(26, 115, 232, 0.12);
  --accent-foreground: #ffffff;
  --accent-glow: rgba(26, 115, 232, 0.18);
  --primary: #1a73e8;
  --primary-foreground: #ffffff;
  --secondary: #0e1a2e;
  --secondary-foreground: #e8f0fa;
  --accent-2: #00acc1;
  --accent-2-muted: rgba(0, 172, 193, 0.75);
  --accent-2-subtle: rgba(0, 172, 193, 0.12);
  --ok: #00c853;
  --ok-muted: rgba(0, 200, 83, 0.75);
  --ok-subtle: rgba(0, 200, 83, 0.12);
  --destructive: #e53935;
  --destructive-foreground: #ffffff;
  --warn: #ffa000;
  --warn-muted: rgba(255, 160, 0, 0.75);
  --warn-subtle: rgba(255, 160, 0, 0.10);
  --danger: #e53935;
  --danger-muted: rgba(229, 57, 53, 0.75);
  --danger-subtle: rgba(229, 57, 53, 0.10);
  --info: #4fc3f7;
  --focus: rgba(26, 115, 232, 0.20);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring);
  --focus-glow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 12px var(--accent-glow);
  --grid-line: rgba(255, 255, 255, 0.03);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter", var(--font-body);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(26, 115, 232, 0.04);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(26, 115, 232, 0.05);
  --shadow-xl: 0 28px 52px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(26, 115, 232, 0.06);
  --shadow-glow: 0 0 18px var(--accent-glow);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f8fbff;
  --bg-accent: #edf4fc;
  --bg-elevated: #ffffff;
  --bg-hover: #e4eef9;
  --bg-muted: #edf4fc;
  --bg-content: #f2f7fd;
  --card: #ffffff;
  --card-foreground: #0d1b2a;
  --popover: #ffffff;
  --popover-foreground: #0d1b2a;
  --panel: #edf4fc;
  --panel-strong: #dde9f6;
  --panel-hover: #d2e2f2;
  --chrome: rgba(248, 251, 255, 0.93);
  --chrome-strong: rgba(248, 251, 255, 0.98);
  --text: #0d1b2a;
  --text-strong: #040e1a;
  --chat-text: #0d1b2a;
  --muted: #5a7a96;
  --muted-strong: #3d6080;
  --muted-foreground: #5a7a96;
  --border: #d4e2f0;
  --border-strong: #b8cee2;
  --border-hover: #8eb0d0;
  --input: #ccdaea;
  --ring: #1565c0;
  --accent: #1565c0;
  --accent-hover: #1a73e8;
  --accent-muted: #1565c0;
  --accent-subtle: rgba(21, 101, 192, 0.07);
  --accent-foreground: #ffffff;
  --accent-glow: rgba(21, 101, 192, 0.10);
  --primary: #1565c0;
  --primary-foreground: #ffffff;
  --secondary: #e4eef9;
  --secondary-foreground: #0d1b2a;
  --accent-2: #00838f;
  --accent-2-muted: rgba(0, 131, 143, 0.75);
  --accent-2-subtle: rgba(0, 131, 143, 0.08);
  --ok: #00897b;
  --ok-muted: rgba(0, 137, 123, 0.75);
  --ok-subtle: rgba(0, 137, 123, 0.08);
  --destructive: #c62828;
  --destructive-foreground: #ffffff;
  --warn: #ef6c00;
  --warn-muted: rgba(239, 108, 0, 0.75);
  --warn-subtle: rgba(239, 108, 0, 0.07);
  --danger: #c62828;
  --danger-muted: rgba(198, 40, 40, 0.75);
  --danger-subtle: rgba(198, 40, 40, 0.07);
  --info: #1565c0;
  --focus: rgba(21, 101, 192, 0.10);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring);
  --focus-glow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 12px var(--accent-glow);
  --grid-line: rgba(13, 27, 42, 0.04);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter", var(--font-body);
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(13, 27, 42, 0.05), 0 0 0 1px rgba(21, 101, 192, 0.03);
  --shadow-lg: 0 14px 34px rgba(13, 27, 42, 0.06), 0 0 0 1px rgba(21, 101, 192, 0.03);
  --shadow-xl: 0 24px 50px rgba(13, 27, 42, 0.08), 0 0 0 1px rgba(21, 101, 192, 0.04);
  --shadow-glow: 0 0 18px var(--accent-glow);
  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--chrome);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.topbar-status .pill,
.nav-item,
.callout,
.card,
.stat,
.field input,
.field select,
.btn {
  border-color: var(--border);
}

.topbar-status .pill,
.card,
.stat,
.callout,
.btn,
.field input,
.field select {
  box-shadow: var(--shadow-sm);
}

.brand {
  gap: 12px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.brand-sub {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.topbar-status .statusDot.ok,
.statusDot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 6px var(--ok-subtle);
}

.theme-toggle__indicator {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px var(--accent-glow);
}

.nav-item.active,
.btn.active,
.btn:hover,
.nav-label:hover,
.nav-collapse-toggle:hover {
  border-color: var(--accent-2-muted);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent-subtle), var(--accent-2-subtle));
}
