/* ==========================================================================
   style.css — core layout & component styles
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Any element using the native `hidden` attribute must actually hide,
   even if a later component rule (e.g. `.loader-overlay { display:flex }`,
   `.modal-backdrop { display:flex }`) sets its own display value. Without
   this, [hidden] loses the cascade to those rules and the element stays
   visible on load. */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg-deep-navy);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: var(--fw-semibold); color: var(--text-primary); }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
textarea, input { font-family: inherit; color: inherit; }
::selection { background: var(--accent-blue-soft); color: var(--text-primary); }

/* ---------- Focus visibility (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 999;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* ---------- Ambient background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-deep-navy);
}
.bg-gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-bg-1), var(--gradient-bg-2), var(--gradient-bg-3);
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-glass) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-glass) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 100%);
  opacity: 0.35;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.blob--blue { width: 420px; height: 420px; top: -120px; left: -80px; background: var(--accent-blue); animation: float-blob-a 22s ease-in-out infinite; }
.blob--purple { width: 380px; height: 380px; top: 200px; right: -100px; background: var(--accent-purple); animation: float-blob-b 26s ease-in-out infinite; }
.blob--cyan { width: 320px; height: 320px; bottom: -140px; left: 30%; background: var(--accent-cyan); animation: float-blob-c 30s ease-in-out infinite; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border-bottom: 1px solid var(--border-glass);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: 0 var(--space-6);
}
.brand { display: flex; align-items: center; gap: var(--space-2); }
.brand-logo { display: block; }
.brand-name { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-md); letter-spacing: -0.01em; }
.brand-accent { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; align-items: center; gap: var(--space-5); margin-left: var(--space-4); }
.nav-link {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.is-active { color: var(--text-primary); }
.nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }

.theme-switch { display: flex; align-items: center; gap: var(--space-2); padding: 4px; border-radius: var(--radius-full); background: var(--bg-glass); border: 1px solid var(--border-glass); }
.theme-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-glass-strong);
  background: var(--gradient-primary);
  padding: 0;
  display: flex; align-items: center; justify-content: center; color: var(--text-primary);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.theme-dot[data-theme-choice='dark'] { background: linear-gradient(135deg, #12151f, #1a2032); }
.theme-dot[data-theme-choice='darker'] { background: linear-gradient(135deg, #05070c, #0b0e17); }
.theme-dot[data-theme-choice='blue'] { background: linear-gradient(135deg, #3d64e0, #22d3ee); }
.theme-dot[data-theme-choice='purple'] { background: linear-gradient(135deg, #9b5cff, #e879f9); }
.theme-dot--system { background: var(--bg-surface-raised); }
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.is-active { box-shadow: 0 0 0 2px var(--bg-charcoal), 0 0 0 4px var(--accent-cyan); }
.theme-switch--lg .theme-dot { width: 26px; height: 26px; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: var(--space-2); }
.nav-toggle span { width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform var(--dur-fast), opacity var(--dur-fast); }
.mobile-nav { display: none; flex-direction: column; padding: var(--space-3) var(--space-6) var(--space-5); gap: var(--space-1); border-top: 1px solid var(--border-glass); }
.mobile-nav .nav-link { padding: var(--space-3) 0; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding: var(--space-8) var(--space-6) var(--space-6); }
.hero-inner { max-width: var(--max-width); margin: 0 auto; text-align: center; animation: fade-slide-up var(--dur-slow) var(--ease-out) both; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: 0.03em;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin: 0 0 var(--space-5);
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 3px var(--color-success-soft); animation: pulse-dot 2s ease-in-out infinite; }
.hero-title { font-size: var(--fs-3xl); line-height: 1.12; letter-spacing: -0.02em; max-width: 780px; margin: 0 auto var(--space-5); }
.text-gradient { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: var(--fs-md); color: var(--text-secondary); max-width: 620px; margin: 0 auto var(--space-6); }
.hero-subtitle code { background: var(--bg-glass); border: 1px solid var(--border-glass); padding: 1px 7px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.9em; color: var(--accent-cyan); }

.hero-stats { display: inline-flex; align-items: center; gap: var(--space-6); padding: var(--space-4) var(--space-7); background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); backdrop-filter: blur(var(--blur-glass)); }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-value { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.hero-stat-label { font-size: var(--fs-xs); color: var(--text-tertiary); }
.hero-stat-divider { width: 1px; height: 28px; background: var(--border-glass); }

/* ==========================================================================
   DASHBOARD / GLASS CARDS
   ========================================================================== */
.dashboard { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6) var(--space-8); display: flex; flex-direction: column; gap: var(--space-5); }

.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-md);
}

.toolbar { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); gap: var(--space-4); flex-wrap: wrap; animation: fade-slide-up var(--dur-slow) var(--ease-out) both; animation-delay: 60ms; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: var(--space-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative; overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--fs-xs); }
.btn--icon-only { padding: var(--space-2); }

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-blue);
}
.btn--primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn--primary:hover { background: var(--gradient-primary-hover); box-shadow: 0 0 40px rgba(79,124,255,0.5); transform: translateY(-1px); }
.btn--primary:hover::before { transform: translateX(120%); transition: transform 700ms var(--ease-out); }

.btn--secondary { background: var(--bg-glass-strong); border-color: var(--border-glass-strong); color: var(--text-primary); }
.btn--secondary:hover { background: var(--bg-surface-raised); border-color: var(--accent-cyan); transform: translateY(-1px); }

.btn--ghost { background: transparent; border-color: var(--border-glass); color: var(--text-secondary); }
.btn--ghost:hover { color: var(--text-primary); border-color: var(--border-glass-strong); background: var(--bg-glass); }

.btn--danger { background: var(--color-error-soft); border-color: var(--color-error); color: var(--color-error); }
.btn--danger:hover { background: var(--color-error); color: #fff; }

.btn-kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.15); opacity: 0.75; }

/* ---------- Toggle switch ---------- */
.toggle { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { width: 40px; height: 22px; border-radius: var(--radius-full); background: var(--bg-glass-strong); border: 1px solid var(--border-glass-strong); position: relative; transition: background var(--dur-base) var(--ease-out); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-secondary); transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.toggle input:checked + .toggle-track { background: var(--gradient-primary); border-color: transparent; }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.toggle-label { font-size: var(--fs-sm); color: var(--text-secondary); }

/* ==========================================================================
   EDITOR GRID
   ========================================================================== */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); animation: fade-slide-up var(--dur-slow) var(--ease-out) both; animation-delay: 120ms; }
.panel { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.panel--tight { gap: var(--space-3); }
.panel-header { display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-size: var(--fs-md); }
.panel-title--sm { font-size: var(--fs-base); font-weight: var(--fw-semibold); }
.panel-badge { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-tertiary); background: var(--bg-glass-strong); padding: 3px 10px; border-radius: var(--radius-full); border: 1px solid var(--border-glass); }
.panel-badge--warning { color: var(--color-warning); border-color: var(--color-warning); background: var(--color-warning-soft); }

.dropzone { position: relative; flex: 1; min-height: 280px; border-radius: var(--radius-md); overflow: hidden; }
.editor-textarea {
  width: 100%; height: 100%; min-height: 280px; resize: vertical;
  background: var(--bg-charcoal);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.7;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.editor-textarea:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-blue-soft); }
.editor-textarea[readonly] { background: var(--bg-surface); cursor: text; }
.editor-output-wrap { flex: 1; display: flex; }
.editor-output-wrap .editor-textarea { min-height: 200px; }

.dropzone-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  background: rgba(79, 124, 255, 0.12);
  border: 2px dashed var(--accent-blue);
  border-radius: var(--radius-md);
  color: var(--accent-cyan);
  font-weight: var(--fw-medium);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.dropzone.is-dragover .dropzone-overlay { opacity: 1; }

.panel-footer { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.panel-footer--actions { justify-content: flex-start; }
.panel-hint { font-size: var(--fs-xs); color: var(--text-tertiary); }
.upload-btn { cursor: pointer; }

.search-replace-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.input-mini { display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 140px; background: var(--bg-charcoal); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 0 var(--space-3); color: var(--text-tertiary); }
.input-mini input { background: transparent; border: none; padding: var(--space-2) 0; width: 100%; font-size: var(--fs-sm); color: var(--text-primary); }
.input-mini input:focus { outline: none; }
.input-mini:focus-within { border-color: var(--accent-cyan); color: var(--accent-cyan); }

mark.search-hit { background: var(--accent-cyan-soft); color: var(--accent-cyan); border-radius: 3px; }

/* ---------- Export dropdown ---------- */
.export-dropdown { position: relative; margin-left: auto; }
.export-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: var(--space-2);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}
.export-menu.is-open { display: flex; animation: pop-in var(--dur-fast) var(--ease-out) both; }
.export-menu button { text-align: left; background: none; border: none; color: var(--text-secondary); font-size: var(--fs-sm); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.export-menu button:hover { background: var(--bg-glass-strong); color: var(--text-primary); }

/* ==========================================================================
   OPTIONS
   ========================================================================== */
.options-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-5); animation: fade-slide-up var(--dur-slow) var(--ease-out) both; animation-delay: 160ms; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.checkbox { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-secondary); cursor: pointer; }
.checkbox input { appearance: none; width: 16px; height: 16px; border: 1px solid var(--border-glass-strong); border-radius: 5px; background: var(--bg-charcoal); position: relative; flex-shrink: 0; transition: background var(--dur-fast), border-color var(--dur-fast); }
.checkbox input:checked { background: var(--gradient-primary); border-color: transparent; }
.checkbox input:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox input:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.pill-group { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.pill-group:last-child { margin-bottom: 0; }
.pill { font-size: var(--fs-xs); font-weight: var(--fw-medium); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); background: var(--bg-glass-strong); border: 1px solid var(--border-glass); color: var(--text-secondary); transition: all var(--dur-fast) var(--ease-out); }
.pill:hover { color: var(--text-primary); }
.pill.is-active { background: var(--gradient-primary); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow-blue); }

/* ==========================================================================
   STATISTICS
   ========================================================================== */
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-4); }
.section-heading h2 { font-size: var(--fs-lg); }
.section-sub { font-size: var(--fs-xs); color: var(--text-tertiary); font-family: var(--font-mono); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
.stat-tile {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-2);
  position: relative; overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.stat-tile:hover { transform: translateY(-3px); border-color: var(--border-glass-strong); }
.stat-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--tile-accent, var(--gradient-primary)); }
.stat-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--tile-accent-soft, var(--accent-blue-soft)); color: var(--tile-accent-color, var(--accent-blue)); }
.stat-value { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--fs-xs); color: var(--text-tertiary); }

/* ==========================================================================
   WARNINGS
   ========================================================================== */
.warnings-list { display: flex; flex-direction: column; gap: var(--space-2); max-height: 220px; overflow-y: auto; }
.warnings-list li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-sm); color: var(--text-secondary); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--color-warning-soft); }
.warnings-list .line-no { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--color-warning); flex-shrink: 0; }

/* ==========================================================================
   HISTORY
   ========================================================================== */
.history-list { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.empty-state { padding: var(--space-6); text-align: center; color: var(--text-tertiary); font-size: var(--fs-sm); }
.history-item { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); transition: background var(--dur-fast) var(--ease-out); }
.history-item:hover { background: var(--bg-glass-strong); }
.history-item-info { flex: 1; min-width: 0; }
.history-item-preview { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-meta { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 2px; }
.history-item-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }

/* ==========================================================================
   SETTINGS
   ========================================================================== */
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) 0; border-bottom: 1px solid var(--border-glass); gap: var(--space-5); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: var(--fs-base); font-weight: var(--fw-medium); }
.settings-hint { font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 2px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border-glass); padding: var(--space-6); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.footer-brand { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-secondary); }
.footer-meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--text-tertiary); flex-wrap: wrap; }
.footer-dot { opacity: 0.5; }
.footer-link { color: var(--text-secondary); transition: color var(--dur-fast); }
.footer-link:hover { color: var(--accent-cyan); }

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); z-index: 300; max-width: 340px; }
.toast {
  display: flex; align-items: flex-start; gap: var(--space-3);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-glass-strong);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--dur-base) var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out var(--dur-base) var(--ease-out) both; }
.toast--success { border-left-color: var(--color-success); }
.toast--error { border-left-color: var(--color-error); }
.toast--warning { border-left-color: var(--color-warning); }
.toast--info { border-left-color: var(--color-info); }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast--success .toast-icon { color: var(--color-success); }
.toast--error .toast-icon { color: var(--color-error); }
.toast--warning .toast-icon { color: var(--color-warning); }
.toast--info .toast-icon { color: var(--color-info); }
.toast-body { flex: 1; }
.toast-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin-bottom: 2px; }
.toast-message { font-size: var(--fs-xs); color: var(--text-secondary); }
.toast-close { background: none; border: none; color: var(--text-tertiary); padding: 2px; }
.toast-close:hover { color: var(--text-primary); }

/* ==========================================================================
   LOADER
   ========================================================================== */
.loader-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4);
  background: rgba(6, 9, 16, 0.6);
  backdrop-filter: blur(6px);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}
.loader-spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--border-glass); border-top-color: var(--accent-cyan); animation: spin 800ms linear infinite; }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-backdrop { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; background: rgba(6, 9, 16, 0.65); backdrop-filter: blur(6px); }
.modal { width: min(400px, 90vw); padding: var(--space-5); animation: pop-in var(--dur-base) var(--ease-out) both; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.shortcuts-list { display: flex; flex-direction: column; gap: var(--space-3); }
.shortcuts-list li { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-secondary); }
.kbd-group { display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); }
kbd { background: var(--bg-glass-strong); border: 1px solid var(--border-glass-strong); border-radius: 4px; padding: 2px 6px; font-size: var(--fs-xs); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
