/* ==========================================================================
   ToolsDeck — High-Precision Developer Console Design System
   Inspired by Linear, Raycast & DevDocs
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Surface Layers (Dark Default) */
  --bg-canvas: #09090b;
  --bg-surface: #121215;
  --bg-surface-elevated: #18181b;
  --bg-surface-hover: #202024;
  --bg-surface-active: #27272a;
  --bg-overlay: rgba(9, 9, 11, 0.75);

  /* Hairline Borders */
  --border-subtle: #1c1c20;
  --border-default: #27272a;
  --border-hover: #3f3f46;
  --border-focus: #71717a;

  /* Typography Colors */
  --text-high: #fafafa;
  --text-medium: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #52525b;

  /* High-Precision Accent Tokens (Never neon or blurry) */
  --accent-primary: #ffffff;
  --accent-primary-fg: #09090b;
  --accent-blue: #3b82f6;
  --accent-blue-subtle: rgba(59, 130, 246, 0.12);
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);
  --accent-rose: #f43f5e;
  --accent-rose-subtle: rgba(244, 63, 94, 0.12);

  /* Geometry & Physics */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  /* Elevation Shadows (Crisp, subtle) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.65);
  --shadow-modal: 0 24px 64px -12px rgba(0, 0, 0, 0.85);

  /* Font Stack */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Legacy token mapping for backward-compatibility */
  --bg-primary: var(--bg-canvas);
  --bg-secondary: var(--bg-surface);
  --bg-card: var(--bg-surface);
  --bg-card-hover: var(--bg-surface-hover);
  --border-color: var(--border-default);
  --text-primary: var(--text-high);
  --text-secondary: var(--text-medium);
  --accent: var(--accent-blue);
  --accent-hover: #2563eb;
  --accent-light: var(--accent-blue-subtle);
  --success: var(--accent-emerald);
  --warning: var(--accent-amber);
  --danger: var(--accent-rose);
  --font-main: var(--font-sans);
}

[data-theme="light"] {
  --bg-canvas: #f6f8fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f3f5;
  --bg-surface-hover: #e9ecef;
  --bg-surface-active: #dee2e6;
  --bg-overlay: rgba(246, 248, 250, 0.85);

  --border-subtle: #ebedf0;
  --border-default: #d0d7de;
  --border-hover: #afb8c1;
  --border-focus: #57606a;

  --text-high: #1f2328;
  --text-medium: #57606a;
  --text-muted: #6e7781;
  --text-faint: #8c959f;

  --accent-primary: #1f2328;
  --accent-primary-fg: #ffffff;
  --accent-blue: #0969da;
  --accent-blue-subtle: rgba(9, 105, 218, 0.08);
  --accent-emerald: #1a7f37;
  --accent-emerald-subtle: rgba(26, 127, 55, 0.08);

  --shadow-sm: 0 1px 3px rgba(31, 35, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(31, 35, 40, 0.08);
  --shadow-lg: 0 12px 28px rgba(31, 35, 40, 0.1);
  --shadow-modal: 0 24px 48px rgba(31, 35, 40, 0.14);

  --bg-primary: var(--bg-canvas);
  --bg-secondary: var(--bg-surface);
  --bg-card: var(--bg-surface);
  --bg-card-hover: var(--bg-surface-hover);
  --border-color: var(--border-default);
  --text-primary: var(--text-high);
  --text-secondary: var(--text-medium);
}

/* ==========================================================================
   CSS Reset & Base Rules (Cross-Browser Safari & WebKit Normalized)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-high);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color-scheme: dark light;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-high);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
  padding: 0;
}

input, select, textarea {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* ==========================================================================
   Top Navigation Console Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-default);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text-high);
}

.brand-icon-box {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-high);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Command Palette Trigger in Navbar */
.cmd-trigger-btn {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 240px;
  height: 34px;
  box-sizing: border-box;
}

.cmd-trigger-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  color: var(--text-medium);
}

.cmd-kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link-btn {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-medium);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  transition: color 0.15s;
}

.nav-link-btn:hover {
  color: var(--text-high);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-high);
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

/* ==========================================================================
   Breadcrumb Bar (Tool Headers)
   ========================================================================== */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-medium);
  transition: color 0.15s;
}

.breadcrumbs a:hover {
  color: var(--text-high);
}

.breadcrumbs .sep {
  color: var(--text-faint);
}

.breadcrumbs .current {
  color: var(--text-high);
  font-weight: 500;
}

/* ==========================================================================
   Hub View — High-Density Console Header
   ========================================================================== */
.console-hub-header {
  padding: 2.5rem 0 2rem;
  max-width: 820px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-medium);
  margin-bottom: 1rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.console-hub-header h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-high);
}

.console-hub-header p {
  color: var(--text-medium);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 680px;
}

/* Filter Controls Bar */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.search-field-wrapper {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-icon-svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.console-search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  font-size: 0.88rem;
  color: var(--text-high);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.console-search-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface-elevated);
}

.category-chip-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-medium);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-high);
  border-color: var(--border-hover);
}

.chip-btn.active {
  background: var(--accent-primary);
  color: var(--accent-primary-fg);
  border-color: var(--accent-primary);
  font-weight: 600;
}

/* ==========================================================================
   Tool Grid — Linear / Raycast Bento Spec
   ========================================================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tool-icon-frame {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-high);
}

.tool-badge-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-high);
  margin-bottom: 0.4rem;
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-medium);
  line-height: 1.55;
  margin-bottom: 1.2rem;
  flex: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.open-link-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  color: var(--text-high);
  transition: transform 0.15s;
}

.tool-card:hover .open-link-label svg {
  transform: translateX(2px);
}

/* ==========================================================================
   Split-Pane Workbench Architecture (Tool Workspace)
   ========================================================================== */
.workbench-header {
  margin-bottom: 1.5rem;
}

.workbench-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: var(--text-high);
}

.workbench-header p {
  color: var(--text-medium);
  font-size: 0.95rem;
}

.workbench {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.workbench.single-column {
  grid-template-columns: 1fr;
}

.workbench.asymmetric {
  grid-template-columns: 1.15fr 0.85fr;
}

.pane {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-default);
  gap: 0.75rem;
}

.pane-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-high);
  letter-spacing: 0.01em;
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pane-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pane-footer {
  padding: 0.65rem 1rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Form Controls, Inputs & Sliders
   ========================================================================== */
.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 0.4rem;
}

.input-field, .select-field {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  font-size: 0.88rem;
  color: var(--text-high);
  outline: none;
  transition: border-color 0.15s;
}

.input-field:focus, .select-field:focus {
  border-color: var(--border-focus);
}

.textarea-field {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-high);
  line-height: 1.6;
  outline: none;
  resize: vertical;
  min-height: 280px;
  flex: 1;
  transition: border-color 0.15s;
}

.textarea-field:focus {
  border-color: var(--border-focus);
}

.textarea-field[readonly] {
  background: var(--bg-surface-elevated);
  color: var(--text-medium);
}

.slider-group {
  margin-bottom: 1.1rem;
}

.slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.slider-val {
  font-family: var(--font-mono);
  color: var(--text-high);
}

.range-input {
  width: 100%;
  accent-color: var(--text-high);
  cursor: pointer;
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-primary-fg);
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-default);
  color: var(--text-high);
}

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

.btn-sm {
  padding: 0.32rem 0.65rem;
  font-size: 0.78rem;
}

.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  color: var(--text-high);
  border-color: var(--border-hover);
}

/* Dropzone (Image & File) */
.dropzone {
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--border-focus);
  background: var(--bg-surface-hover);
}

.dropzone-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: var(--text-high);
}

.dropzone p {
  font-size: 0.92rem;
  color: var(--text-high);
  margin-bottom: 0.3rem;
}

.dropzone span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   High-CPM Monetization / Ad Frame (DevDocs & CanIUse Spec)
   ========================================================================== */
.ad-rail-frame {
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.ad-rail-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.ad-rail-tag .ad-badge {
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.ad-leaderboard-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-align: center;
}

.ad-rectangle-inner {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-align: center;
}

/* Backward-compatible ad slot classes */
.ad-slot {
  margin: 1.5rem 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.ad-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
  display: block;
}

/* ==========================================================================
   Global Command Palette Modal (⌘K)
   ========================================================================== */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  animation: fadeIn 0.12s ease-out;
}

.cmd-palette-backdrop.active {
  display: flex;
}

.cmd-palette-modal {
  width: 100%;
  max-width: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-default);
}

.cmd-input-wrapper svg {
  color: var(--text-muted);
}

.cmd-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-high);
}

.cmd-search-input::placeholder {
  color: var(--text-faint);
}

.cmd-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
  list-style: none;
}

.cmd-group-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem 0.25rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.1s;
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--bg-surface-elevated);
  color: var(--text-high);
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cmd-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.cmd-item-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
}

.cmd-footer {
  padding: 0.65rem 1.15rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cmd-footer-keys {
  display: flex;
  gap: 0.85rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Sonner-Style Minimal Dark Toasts
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  color: var(--text-high);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  animation: toastSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 240px;
}

.toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast.success .toast-dot { background: var(--accent-emerald); }
.toast.error .toast-dot { background: var(--accent-rose); }
.toast.info .toast-dot { background: var(--accent-blue); }

@keyframes toastSlideUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Technical Documentation / SEO Collapsible Spec
   ========================================================================== */
.docs-section {
  border-top: 1px solid var(--border-default);
  padding-top: 2.5rem;
  margin-top: 3.5rem;
  color: var(--text-medium);
}

.docs-section h2 {
  color: var(--text-high);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.docs-section h3 {
  color: var(--text-high);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.docs-section p {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.docs-section ul {
  padding-left: 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.docs-section li {
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.console-footer {
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface);
  padding: 1.5rem;
  margin-top: auto;
}

.console-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.console-footer-links {
  display: flex;
  gap: 1.25rem;
}

.console-footer-links a:hover {
  color: var(--text-high);
}

/* ==========================================================================
   Backward-Compatibility Aliases (Protects Cached Sessions & Mixed Markup)
   ========================================================================== */
.search-wrapper {
  position: relative;
  max-width: 380px;
}
.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  font-size: 0.88rem;
  color: var(--text-high);
  outline: none;
}
.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.category-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-medium);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-high);
  border-color: var(--border-hover);
}
.tab-btn.active {
  background: var(--accent-primary);
  color: var(--accent-primary-fg);
  border-color: var(--accent-primary);
  font-weight: 600;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-medium);
  font-size: 0.82rem;
  cursor: pointer;
}
.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.tool-arrow {
  color: var(--text-high);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 860px) {
  .workbench {
    grid-template-columns: 1fr !important;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .cmd-trigger-btn {
    min-width: auto;
  }
  .cmd-trigger-btn span {
    display: none;
  }
  .console-hub-header h1 {
    font-size: 1.75rem;
  }
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-field-wrapper {
    max-width: 100%;
  }
}
