/* GENERATED FILE - DO NOT EDIT.
   Canonical source: assets/design-system.css at the repository root.
   Edit that file, then run: npm run sync:recorder */
/* ==========================================================================
   Top Set Media Tools - Design System
   ==========================================================================
   The token + component layer defined by docs/DESIGN-LANGUAGE.md.
   Tokens use the shadcn CSS-variable format: HSL triplets consumed as
   hsl(var(--token)). Dark values live in :root (dark-only today; a future
   light mode adds a .light override block).

   Migrated pages link THIS file and must not link the legacy styles.css.
   Reference layout: /design (design-system/preview.html).
   ========================================================================== */


/* ==========================================================================
   1. Fonts (self-hosted, assets/fonts/ - no CDN)
   ========================================================================== */

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

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* font-display: block prevents the glyph name (e.g. "cloud_upload") from
   flashing as text before the ligature font loads. */
@font-face {
  font-family: 'Material Symbols Rounded';
  src: url('/assets/fonts/MaterialSymbolsRounded.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: block;
}


/* ==========================================================================
   2. Design Tokens
   ========================================================================== */

:root {
  --background: 240 7% 6%;
  --foreground: 240 6% 90%;
  --card: 240 6% 10%;
  --card-foreground: 240 6% 90%;
  --popover: 240 6% 13%;
  --popover-foreground: 240 6% 90%;

  /* Brand orange is the interactive accent - the one deviation from the
     scoreboard design language. See the orange discipline in the doc. */
  --primary: 10 95% 54%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 10 100% 61%;

  --secondary: 240 5% 16%;
  --secondary-foreground: 240 6% 90%;
  --muted: 240 5% 16%;
  --muted-foreground: 240 4% 46%;

  /* Neutral hover/selected background - NOT orange (legacy --accent was). */
  --accent: 240 5% 18%;
  --accent-foreground: 240 6% 90%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 71% 45%;
  --warning: 38 92% 50%;

  --border: 240 5% 17%;
  --input: 240 5% 20%;
  --ring: 10 95% 54%;

  --radius: 0.375rem;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}


/* ==========================================================================
   3. Reset & Base
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

::selection { background: hsl(var(--primary) / 0.3); }

:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 1px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); }


/* ==========================================================================
   4. Utilities
   ========================================================================== */

.tabular-nums { font-variant-numeric: tabular-nums; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.hidden { display: none !important; }

.text-secondary { color: hsl(var(--muted-foreground)); }

/* Material Symbols - Rounded, filled, weight 600. Ligature-based:
   <span class="icon">cloud_upload</span> */
.icon {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

.icon.outline { font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24; }


/* ==========================================================================
   5. Topbar & Tool Switcher
   ========================================================================== */

.topbar {
  height: 44px;
  flex-shrink: 0;
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.topbar-brand:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.topbar-brand svg,
.topbar-brand img { width: 18px; height: 18px; display: block; }

.topbar-switch-wrap { position: relative; }

.topbar-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.topbar-switch:hover { background: hsl(var(--accent)); }

.topbar-switch .icon {
  font-size: 16px;
  color: hsl(var(--muted-foreground));
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Popover listing all tools grouped by workflow phase. Built by
   UI.initToolSwitcher() from the TOOLS array in components.js. */
.tool-switcher {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 250px;
  max-height: 75vh;
  overflow-y: auto;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 5px;
  z-index: 150;
  display: none;
}

.tool-switcher.open { display: block; }

.tool-switcher-label {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  padding: 8px 8px 3px;
}

.tool-switcher-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 5px;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.tool-switcher-item:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.tool-switcher-item.current {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
  font-weight: 600;
}

.tool-switcher-item .icon { font-size: 18px; }


/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn .icon { font-size: 16px; }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* One per view - the primary action. */
.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

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

/* The default button. */
.btn-outline {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover:not(:disabled) {
  background: hsl(var(--accent));
  border-color: hsl(var(--muted-foreground) / 0.5);
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--muted-foreground));
}

.btn-ghost:hover:not(:disabled) {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.btn-destructive {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover:not(:disabled) { background: hsl(var(--destructive) / 0.85); }

.btn-sm { height: 26px; padding: 0 9px; font-size: 11px; }
.btn-sm .icon { font-size: 14px; }

.btn-full { width: 100%; }

.icon-btn { width: 30px; padding: 0; color: hsl(var(--muted-foreground)); }
.icon-btn.btn-sm { width: 26px; }


/* ==========================================================================
   7. Panel
   ========================================================================== */

.panel {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  padding: 10px 12px;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.panel-body { padding: 12px; }

.panel-hint {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Collapsible panels - behavior in App.initCollapsiblePanels(), unchanged. */
.panel-collapsible .panel-header {
  cursor: pointer;
  user-select: none;
}

.panel-collapsible .panel-header .chevron {
  width: 16px;
  height: 16px;
  font-size: 16px;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
  transition: transform 0.15s ease;
}

.panel-collapsible.collapsed .panel-header .chevron { transform: rotate(-90deg); }

.panel-collapsible.collapsed .panel-header { border-bottom-color: transparent; }

.panel-collapsible .panel-body {
  overflow: hidden;
  transition: max-height 0.2s ease, padding-top 0.2s ease, padding-bottom 0.2s ease;
}

.panel-collapsible.collapsed .panel-body {
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  border-top: none;
}


/* ==========================================================================
   8. Fields & Inputs
   ========================================================================== */

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 5px;
}

.field-hint {
  font-size: 11px;
  color: hsl(var(--muted-foreground) / 0.8);
  margin-top: 4px;
  line-height: 1.5;
}

.field-error {
  font-size: 11px;
  color: hsl(var(--destructive));
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"] {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 13px;
}

textarea {
  width: 100%;
  padding: 8px 10px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

select {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 13px;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: -1px;
}

input::placeholder,
textarea::placeholder { color: hsl(var(--muted-foreground) / 0.7); }

/* Paths, IDs, and other code-like values. */
.input-mono {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
}

input[type="checkbox"],
input[type="radio"] { accent-color: hsl(var(--primary)); }

input[type="range"] { accent-color: hsl(var(--primary)); }


/* ==========================================================================
   9. Switch
   ========================================================================== */

/* <label class="switch"><input type="checkbox"><span class="switch-track"></span> Dry run</label> */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 30px;
  height: 17px;
  flex-shrink: 0;
  border-radius: 999px;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  transition: background 0.15s, border-color 0.15s;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground));
  transition: transform 0.15s ease, background 0.15s;
}

.switch input:checked + .switch-track {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

.switch input:checked + .switch-track::after {
  transform: translateX(13px);
  background: hsl(var(--primary-foreground));
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.switch:hover .switch-track { border-color: hsl(var(--muted-foreground) / 0.5); }


/* ==========================================================================
   10. Segmented Control (.toggle-group - legacy class names kept)
   ========================================================================== */

.toggle-group {
  display: inline-flex;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.toggle-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border: none;
  border-right: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.toggle-btn:last-child { border-right: none; }

.toggle-btn:hover { color: hsl(var(--foreground)); }

.toggle-btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.toggle-btn-sm { font-size: 11px; padding: 3px 8px; }

.toggle-btn-ghost.active {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}


/* ==========================================================================
   11. Badges & Status Dots
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 4px;
  line-height: 1.6;
  white-space: nowrap;
}

.badge .icon { font-size: 13px; }

.badge-neutral { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-green { background: hsl(var(--success) / 0.14); color: hsl(var(--success)); }
.badge-amber { background: hsl(var(--warning) / 0.16); color: hsl(var(--warning)); }
.badge-red { background: hsl(var(--destructive) / 0.14); color: hsl(var(--destructive)); }
.badge-primary { background: hsl(var(--primary) / 0.15); color: hsl(var(--primary)); }

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground));
  flex-shrink: 0;
}

.status-dot-green { background: hsl(var(--success)); }
.status-dot-amber { background: hsl(var(--warning)); }
.status-dot-red { background: hsl(var(--destructive)); }
.status-dot-primary { background: hsl(var(--primary)); }

.status-dot.pulse { animation: pulse-dot 1.6s ease-in-out infinite; }


/* ==========================================================================
   12. Progress
   ========================================================================== */

/* Orange = running, green = done, amber = paused, red = failed. */
.progress {
  width: 100%;
  height: 6px;
  background: hsl(var(--muted));
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: hsl(var(--primary));
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 0;
}

.progress-fill.complete { background: hsl(var(--success)); }
.progress-fill.error { background: hsl(var(--destructive)); }
.progress-fill.paused { background: hsl(var(--warning)); }

.progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}


/* ==========================================================================
   13. Status Message
   ========================================================================== */

.status-message {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 10px;
}

.status-message.success { color: hsl(var(--success)); }
.status-message.error { color: hsl(var(--destructive)); }


/* ==========================================================================
   14. Log Console (rendered by UI.createLogConsole)
   ========================================================================== */

.log-console {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.log-console-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
}

.log-console-header .chevron {
  font-size: 16px;
  color: hsl(var(--muted-foreground));
  transition: transform 0.15s ease;
}

.log-console.collapsed .log-console-header .chevron { transform: rotate(-90deg); }

.log-console-title {
  font-size: 13px;
  font-weight: 600;
}

.log-console-count {
  font-size: 11px;
  font-weight: 500;
  padding: 0 6px;
  border-radius: 4px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

.log-console-spacer { flex: 1; }

.log-console-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-top: 1px solid hsl(var(--border));
}

.log-console-autoscroll {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  user-select: none;
}

.log-console-body {
  height: 240px;
  overflow-y: auto;
  padding: 8px 10px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.log-console.collapsed .log-console-toolbar,
.log-console.collapsed .log-console-body { display: none; }

.log-line {
  display: flex;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-line .log-time {
  color: hsl(var(--muted-foreground) / 0.7);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.log-line-info .log-msg { color: hsl(var(--foreground) / 0.85); }
.log-line-success .log-msg { color: hsl(var(--success)); }
.log-line-warn .log-msg { color: hsl(var(--warning)); }
.log-line-error .log-msg { color: hsl(var(--destructive)); }

.log-console-empty {
  color: hsl(var(--muted-foreground));
  font-style: italic;
}


/* ==========================================================================
   15. Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.visible { display: flex; }

.modal {
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.5);
  padding: 20px;
  width: 420px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-body {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.modal-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-mono);
  font-size: 12px;
}

.modal-input:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: -1px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.modal-error {
  font-size: 12px;
  color: hsl(var(--destructive));
  margin-top: 8px;
  display: none;
}

.modal-error.visible { display: block; }


/* ==========================================================================
   16. Toast (rendered by UI.toast)
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  padding: 9px 12px;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  color: hsl(var(--foreground));
  animation: toast-in 160ms ease-out both;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.hide {
  opacity: 0;
  transform: translateY(4px);
}


/* ==========================================================================
   17. Empty State
   ========================================================================== */

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.empty-state .icon {
  font-size: 34px;
  opacity: 0.35;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  opacity: 0.3;
}

.empty-state-text {
  font-size: 13px;
  line-height: 1.5;
}

.empty-state-hint {
  font-size: 12px;
  color: hsl(var(--muted-foreground) / 0.7);
}


/* ==========================================================================
   18. Table
   ========================================================================== */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  padding: 6px 10px;
  border-bottom: 1px solid hsl(var(--border));
  white-space: nowrap;
}

.data-table td {
  padding: 5px 10px;
  border-bottom: 1px solid hsl(var(--border));
}

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover { background: hsl(var(--accent) / 0.5); }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* ==========================================================================
   19. Directory List (JS in App.createDirList, unchanged)
   ========================================================================== */

.dir-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dir-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dir-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  min-height: 30px;
}

.dir-list-path {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: hsl(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-list-remove {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dir-list-remove:hover {
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive));
  background: hsl(var(--destructive) / 0.12);
}

.dir-list-empty {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  font-style: italic;
  padding: 8px 10px;
  background: hsl(var(--background));
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius);
}

.dir-list-add { align-self: flex-start; }


/* ==========================================================================
   20. Bottom Bar
   ========================================================================== */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border));
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.bottom-bar-left { display: flex; gap: 8px; align-items: center; }
.bottom-bar-right { display: flex; gap: 8px; align-items: center; }


/* ==========================================================================
   21. Background Task Pill (rendered by App.initBackgroundTasks - class
       names are a contract with app.js; restyled flat here)
   ========================================================================== */

.bg-tasks {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

.bg-task {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px 9px 13px;
  min-width: 200px;
  max-width: 320px;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  overflow: hidden;
  transition: border-color 0.2s ease;
  animation: bg-task-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bg-task__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: hsl(var(--muted-foreground));
}

.bg-task--running .bg-task__dot {
  background: hsl(var(--primary));
  box-shadow: 0 0 0 0 hsl(var(--primary) / 0.55);
  animation: bg-task-pulse 1.6s ease-in-out infinite;
}

.bg-task--complete .bg-task__dot { background: hsl(var(--success)); }

.bg-task--complete::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: hsl(var(--success));
}

.bg-task__link {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: hsl(var(--foreground));
  text-decoration: none;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.bg-task__link:hover .bg-task__label { color: hsl(var(--primary-hover)); }

.bg-task__label {
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.bg-task__progress {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  flex-shrink: 0;
}

.bg-task--complete .bg-task__progress { color: hsl(var(--success)); }

.bg-task__dismiss {
  display: none;
  background: transparent;
  border: 0;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 2px;
  transition: color 0.15s ease;
}

.bg-task__dismiss:hover { color: hsl(var(--foreground)); }
.bg-task--complete .bg-task__dismiss { display: inline-flex; align-items: center; }

.bg-task__track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
  overflow: hidden;
}

.bg-task__track-fill {
  height: 100%;
  width: 0%;
  background: hsl(var(--primary));
  transition: width 300ms linear;
}

.bg-task--complete .bg-task__track-fill {
  background: hsl(var(--success));
  width: 100% !important;
}

.bg-task--passive .bg-task__track { display: none; }


/* ==========================================================================
   22. Animations
   ========================================================================== */

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes bg-task-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bg-task-pulse {
  0%, 100% { box-shadow: 0 0 0 0 hsl(var(--primary) / 0.55); opacity: 1; }
  50%      { box-shadow: 0 0 0 5px hsl(var(--primary) / 0); opacity: 0.75; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   23. Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .topbar { padding: 0 12px; }
  .bottom-bar { padding: 10px 12px; }
}
