/* ============================================================
   Uniscribe — design system
   ============================================================ */

:root {
  /* Brand */
  --accent: #5b8cff;
  --accent-2: #9b6dff;
  --accent-grad: linear-gradient(135deg, #5b8cff 0%, #9b6dff 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(91,140,255,0.15) 0%, rgba(155,109,255,0.15) 100%);

  /* Status */
  --success: #4ade80;
  --warn: #fbbf24;
  --error: #f87171;

  /* Geometry */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 120ms;
  --t-med: 200ms;
  --t-slow: 320ms;

  /* Dark theme tokens (default) */
  --bg: #0a0a10;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(91,140,255,0.10), transparent 60%),
             radial-gradient(900px 500px at 110% 0%, rgba(155,109,255,0.08), transparent 60%),
             #0a0a10;
  --panel: #11121a;
  --panel-2: #181924;
  --panel-3: #20212d;
  --hover: #252735;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --text: #f0f1f7;
  --text-soft: #cfd0db;
  --muted: #8a8b97;
  --muted-2: #6b6c78;
  --highlight: rgba(251,191,36,0.35);
  --accent-soft: rgba(91,140,255,0.16);
  --accent-glow: rgba(91,140,255,0.30);
  --success-soft: rgba(74,222,128,0.14);
  --warn-soft: rgba(251,191,36,0.16);
  --error-soft: rgba(248,113,113,0.16);
  --shadow-1: 0 1px 2px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.02) inset;
  --shadow-2: 0 8px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-3: 0 24px 48px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05) inset;
  --shadow-accent: 0 6px 20px rgba(91,140,255,0.32);
  --header-bg: rgba(17,18,26,0.72);
}

/* Light theme (explicit) */
body[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(91,140,255,0.08), transparent 60%),
             radial-gradient(900px 500px at 110% 0%, rgba(155,109,255,0.06), transparent 60%),
             #f7f7fb;
  --panel: #ffffff;
  --panel-2: #f4f4f9;
  --panel-3: #ebebf3;
  --hover: #e4e4ee;
  --border: rgba(20,20,40,0.08);
  --border-strong: rgba(20,20,40,0.14);
  --text: #1a1b22;
  --text-soft: #34353e;
  --muted: #6b6c78;
  --muted-2: #9ca0aa;
  --highlight: #fff3a8;
  --accent: #4f3dd8;
  --accent-2: #7a4cf2;
  --accent-grad: linear-gradient(135deg, #4f3dd8 0%, #7a4cf2 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(79,61,216,0.10) 0%, rgba(122,76,242,0.10) 100%);
  --accent-soft: rgba(79,61,216,0.10);
  --accent-glow: rgba(79,61,216,0.25);
  --success: #16a34a;
  --warn: #b45309;
  --error: #dc2626;
  --success-soft: rgba(22,163,74,0.10);
  --warn-soft: rgba(180,83,9,0.10);
  --error-soft: rgba(220,38,38,0.10);
  --shadow-1: 0 1px 2px rgba(20,20,40,0.04), 0 0 0 1px rgba(20,20,40,0.02) inset;
  --shadow-2: 0 6px 24px rgba(20,20,40,0.07);
  --shadow-3: 0 24px 48px rgba(20,20,40,0.10);
  --shadow-accent: 0 6px 20px rgba(79,61,216,0.20);
  --header-bg: rgba(255,255,255,0.78);
}

/* System (follows OS preference) */
@media (prefers-color-scheme: light) {
  body[data-theme="system"] {
    --bg: #f7f7fb;
    --bg-grad: radial-gradient(1200px 600px at 10% -10%, rgba(91,140,255,0.08), transparent 60%),
               radial-gradient(900px 500px at 110% 0%, rgba(155,109,255,0.06), transparent 60%),
               #f7f7fb;
    --panel: #ffffff;
    --panel-2: #f4f4f9;
    --panel-3: #ebebf3;
    --hover: #e4e4ee;
    --border: rgba(20,20,40,0.08);
    --border-strong: rgba(20,20,40,0.14);
    --text: #1a1b22;
    --text-soft: #34353e;
    --muted: #6b6c78;
    --muted-2: #9ca0aa;
    --highlight: #fff3a8;
    --accent: #4f3dd8;
    --accent-2: #7a4cf2;
    --accent-grad: linear-gradient(135deg, #4f3dd8 0%, #7a4cf2 100%);
    --accent-grad-soft: linear-gradient(135deg, rgba(79,61,216,0.10) 0%, rgba(122,76,242,0.10) 100%);
    --accent-soft: rgba(79,61,216,0.10);
    --accent-glow: rgba(79,61,216,0.25);
    --success: #16a34a;
    --warn: #b45309;
    --error: #dc2626;
    --success-soft: rgba(22,163,74,0.10);
    --warn-soft: rgba(180,83,9,0.10);
    --error-soft: rgba(220,38,38,0.10);
    --shadow-1: 0 1px 2px rgba(20,20,40,0.04), 0 0 0 1px rgba(20,20,40,0.02) inset;
    --shadow-2: 0 6px 24px rgba(20,20,40,0.07);
    --shadow-3: 0 24px 48px rgba(20,20,40,0.10);
    --shadow-accent: 0 6px 20px rgba(79,61,216,0.20);
    --header-bg: rgba(255,255,255,0.78);
  }
}

/* ============================================================
   Base
   ============================================================ */

* { box-sizing: border-box; }
*::selection { background: var(--accent-soft); color: var(--text); }

html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

/* Scrollbars (subtle, themed) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; border: 2px solid transparent; }

h1, h2, h3 { letter-spacing: -0.018em; }

/* ============================================================
   Header
   ============================================================ */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky; top: 0; z-index: 30;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.logo {
  width: 34px; height: 34px;
  background: var(--accent-grad);
  color: #fff;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-accent), 0 1px 0 rgba(255,255,255,0.18) inset;
  letter-spacing: -0.04em;
}

h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

/* Search */
.search-wrap { position: relative; flex: 1; max-width: 480px; }

#global-search {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  padding: 8px 16px 8px 38px;
  font-size: 13px;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8b97' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 14px;
}
#global-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background-color: var(--panel);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  max-height: 60vh;
  overflow: auto;
  z-index: 25;
  animation: fade-in var(--t-med) var(--ease-out);
}
.search-result {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--panel-2); }
.search-result mark { background: var(--highlight); color: inherit; padding: 0 3px; border-radius: 3px; font-weight: 500; }

/* Header buttons */
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
.icon-btn:hover {
  background: var(--panel-3);
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}
.icon-btn:active { transform: translateY(0); }

/* Status pill */
.status-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.status-pill.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.status-pill.bad { color: var(--error); background: var(--error-soft); border-color: transparent; }

/* ============================================================
   Top nav
   ============================================================ */

.nav-tabs {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  gap: 2px;
  position: sticky; top: 58px; z-index: 20;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-tab {
  background: none; border: none;
  color: var(--muted);
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav-tab:hover { color: var(--text); }

/* ============================================================
   Layout
   ============================================================ */

main {
  max-width: 1120px;
  margin: 28px auto;
  padding: 0 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view.hidden { display: none; }
.view { animation: fade-in var(--t-med) var(--ease-out); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}

/* ============================================================
   Tabs (composer + detail)
   ============================================================ */

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.tab {
  background: none; border: none;
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  letter-spacing: -0.005em;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab:hover { color: var(--text); }
.pane.hidden { display: none; }

/* ============================================================
   Forms
   ============================================================ */

.field {
  display: flex; flex-direction: column;
  gap: 6px; margin-bottom: 14px;
}
.field span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input[type="text"], input[type="url"], input[type="search"], input[type="password"], input[type="number"],
select, textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
textarea { resize: vertical; min-height: 80px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--panel);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8b97' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.options {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.checkbox {
  grid-column: 1 / -1;
  display: flex; align-items: center;
  gap: 10px; cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-soft);
}
.checkbox input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.checkbox input[type="checkbox"]:checked {
  background: var(--accent-grad);
  border-color: transparent;
}
.checkbox input[type="checkbox"]:checked::after {
  content: ""; position: absolute;
  inset: 3px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5 8.5 6.5 11.5 12.5 4.5'/></svg>") no-repeat center / contain;
}
.checkbox input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }

.actions { margin-top: 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   Buttons
   ============================================================ */

button.primary {
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-accent), 0 1px 0 rgba(255,255,255,0.18) inset;
  transition: all var(--t-fast) var(--ease);
}
button.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.22) inset;
  filter: brightness(1.06);
}
button.primary:active:not(:disabled) { transform: translateY(0); filter: brightness(0.98); }
button.primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

button.ghost, .ghost-link {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t-fast) var(--ease);
}
button.ghost:hover, .ghost-link:hover {
  background: var(--panel-3);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
button.ghost:active, .ghost-link:active { transform: translateY(0); }
button.ghost:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
button.ghost.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

button.danger { color: var(--error); border-color: transparent; background: var(--error-soft); }
button.danger:hover { background: var(--error-soft); filter: brightness(1.1); }

.msg { font-size: 13px; color: var(--muted); }
.msg.error { color: var(--error); }
.msg.success { color: var(--success); }
.muted { color: var(--muted); font-size: 13px; }

/* ============================================================
   Dropzone
   ============================================================ */

.dropzone {
  display: block;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--panel-2);
  position: relative;
  overflow: hidden;
  transition: all var(--t-med) var(--ease);
}
.dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-grad-soft);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.dropzone:hover::before, .dropzone.drag::before { opacity: 1; }

.dz-inner { position: relative; z-index: 1; }

.dz-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: #fff;
  font-size: 22px; font-weight: 700;
  box-shadow: var(--shadow-accent);
  transition: transform var(--t-med) var(--ease-bounce);
}
.dropzone:hover .dz-icon { transform: translateY(-3px) scale(1.05); }
.dz-title { font-weight: 600; font-size: 15px; color: var(--text); }
.dz-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

.dz-progress {
  margin: 16px auto 0;
  max-width: 320px;
  height: 6px;
  background: var(--panel-3);
  border-radius: 999px;
  overflow: hidden;
}
.dz-progress.hidden { display: none; }
.dz-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-grad);
  border-radius: 999px;
  transition: width var(--t-med) var(--ease);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================================
   History
   ============================================================ */

.history-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 16px;
  flex-wrap: wrap; gap: 12px;
}
h2 { margin: 0; font-size: 16px; font-weight: 600; }
h3 { margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.modal-body h2, .detail h3:first-of-type { font-size: 17px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: -0.02em; margin-top: 0; }
.modal-body h3, .detail h3 { color: var(--muted); }

.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
.chip.active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active:hover { color: var(--accent); }

.history { display: flex; flex-direction: column; gap: 8px; }
.history-empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 24px;
  font-size: 14px;
}

.job {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.job:hover {
  border-color: var(--border-strong);
  background: var(--panel-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.job.starred {
  background: linear-gradient(90deg, rgba(251,191,36,0.06), var(--panel-2) 30%);
  border-left: 2px solid var(--warn);
}

.job-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--panel-3);
  border-radius: var(--r-sm);
  font-size: 14px;
  border: 1px solid var(--border);
}
.job-meta { min-width: 0; }
.job-label { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.job-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.star-btn {
  background: none; border: none;
  cursor: pointer; padding: 6px;
  color: var(--muted-2); font-size: 16px;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
.star-btn.on { color: var(--warn); transform: scale(1.05); }
.star-btn:hover { color: var(--warn); transform: scale(1.1); }

/* ============================================================
   Badges
   ============================================================ */

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
  border: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge.queued, .badge.preprocessing, .badge.processing {
  background: var(--warn-soft); color: var(--warn); border-color: transparent;
}
.badge.queued::before, .badge.preprocessing::before, .badge.processing::before {
  animation: pulse-dot 1.5s ease-in-out infinite;
}
.badge.completed { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.failed { background: var(--error-soft); color: var(--error); border-color: transparent; }

@keyframes pulse-dot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.spinner {
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.delete-job {
  background: none; border: none;
  color: var(--muted-2); cursor: pointer;
  font-size: 16px; line-height: 1;
  padding: 6px 8px;
  border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
.delete-job:hover { color: var(--error); background: var(--error-soft); }

/* ============================================================
   Modals
   ============================================================ */

.modal {
  position: fixed; inset: 0;
  background: rgba(5,5,15,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 50; padding: 16px;
  animation: fade-in var(--t-med) var(--ease-out);
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow-3);
  position: relative;
  animation: modal-pop var(--t-slow) var(--ease-out);
}
.modal-card.large { max-width: 1100px; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted);
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  font-size: 18px; cursor: pointer;
  line-height: 1; z-index: 1;
  display: grid; place-items: center;
  transition: all var(--t-fast) var(--ease);
}
.modal-close:hover { color: var(--text); background: var(--panel-3); transform: rotate(90deg); }

.modal-body { padding: 28px; }
.detail { padding: 28px; }
.detail h3 { margin: 0 0 6px; word-break: break-word; font-size: 18px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: -0.02em; }
.detail .sub { color: var(--muted); margin-bottom: 14px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.detail-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.detail-toolbar .ghost, .detail-toolbar .ghost-link { padding: 6px 12px; font-size: 12px; }

/* ============================================================
   Player
   ============================================================ */

.player-area {
  margin: 16px 0;
  background: #000;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.player-area .yt-shell {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.player-area .yt-shell iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.player-area audio,
.player-area video {
  width: 100%;
  display: block;
  background: #000;
}

.player-controls {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.player-controls button {
  background: var(--panel-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-xs);
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
.player-controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.player-controls button.active {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-accent);
}
.player-controls .time {
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  min-width: 90px;
  margin-left: auto;
}
.player-controls select {
  padding: 5px 28px 5px 10px;
  font-size: 12px;
}

/* ============================================================
   Detail tabs
   ============================================================ */

.detail-tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  flex-wrap: wrap;
  overflow-x: auto;
}
.detail-tab {
  background: none; border: none;
  color: var(--muted);
  padding: 10px 14px; cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.detail-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.detail-tab:hover { color: var(--text); }

/* ============================================================
   Transcript / Segments
   ============================================================ */

.transcript-text {
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-soft);
}

.segments {
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 4px 0;
}
.segment {
  display: grid;
  grid-template-columns: 64px auto 1fr;
  gap: 14px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  align-items: baseline;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background var(--t-fast) var(--ease), border-left-color var(--t-fast) var(--ease);
}
.segment:hover { background: var(--panel-2); }
.segment.active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.segment-time {
  color: var(--muted);
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  white-space: nowrap;
  font-weight: 500;
  padding-top: 2px;
}
.segment.active .segment-time { color: var(--accent); }
.segment-speaker {
  font-weight: 600;
  color: var(--accent);
  font-size: 11px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  align-self: start;
}
.segment-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-soft);
}
.segment.active .segment-text { color: var(--text); }
.segment-text[contenteditable="true"] {
  background: var(--panel);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
  padding: 2px 6px;
  color: var(--text);
}
.segment-text.edited {
  color: var(--text);
  position: relative;
}
.segment-text.edited::after {
  content: "✎";
  color: var(--success);
  font-size: 11px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ============================================================
   Chapters / bookmarks / speakers
   ============================================================ */

.chapter {
  display: grid; grid-template-columns: 80px 1fr; gap: 14px;
  padding: 12px; cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
}
.chapter:hover { background: var(--panel-2); border-color: var(--border); transform: translateX(2px); }
.chapter-time {
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
}
.chapter-title { font-weight: 600; font-size: 14px; }
.chapter-summary { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }

.bookmarks { display: flex; flex-direction: column; gap: 6px; }
.bookmark { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel-2); border-radius: var(--r-sm); border: 1px solid var(--border); }
.bookmark-time {
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 8px;
  background: var(--accent-soft);
  border-radius: var(--r-xs);
}
.bookmark-time:hover { background: var(--accent); color: #fff; }
.bookmark-label { flex: 1; font-size: 13px; }

.speakers-grid {
  display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px;
  align-items: center;
}
.speakers-grid input { padding: 8px 12px; }

/* ============================================================
   AI / Chat
   ============================================================ */

.chat {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 50vh; overflow: auto;
  padding: 12px;
  background: var(--panel-2);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.chat-msg {
  padding: 10px 14px;
  border-radius: var(--r-md);
  max-width: 85%;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.55;
  animation: chat-in var(--t-med) var(--ease-out);
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--accent-grad);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-accent);
}
.chat-msg.assistant {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-soft);
}
.chat-msg a.ts {
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: var(--r-xs);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92em;
}
.chat-msg a.ts:hover { background: var(--accent); color: #fff; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; }

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

/* ============================================================
   Toasts
   ============================================================ */

.toasts {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 100; pointer-events: none;
  max-width: 380px;
}
.toast {
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-3);
  animation: toast-in var(--t-slow) var(--ease-bounce);
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warn { border-left-color: var(--warn); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Settings / lists
   ============================================================ */

.list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.list-row {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  transition: border-color var(--t-fast) var(--ease);
}
.list-row:hover { border-color: var(--border-strong); }
.list-row .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.list-row .meta { color: var(--muted); font-size: 12px; }

.row-input { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row-input input, .row-input select { flex: 1; min-width: 200px; }

.codebox {
  display: block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--accent);
}

.kbd-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.kbd-table td { padding: 6px 10px; font-size: 13px; }
.kbd-table td:first-child { width: 1%; white-space: nowrap; }
kbd {
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  display: inline-block;
}

/* Segmented control */
.seg-group {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  padding: 3px;
  gap: 2px;
}
.seg {
  background: transparent; border: none;
  color: var(--muted);
  padding: 6px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
.seg:hover { color: var(--text); }
.seg.active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

/* ============================================================
   Stats
   ============================================================ */

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-fast) var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.stat-card::after {
  content: ""; position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--accent-grad);
  border-radius: 50%;
  opacity: 0.06;
  filter: blur(20px);
}
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

.bar-chart {
  display: flex; flex-direction: column;
  gap: 8px; margin-bottom: 24px;
}
.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 50px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.bar-row span:first-child { color: var(--text-soft); font-weight: 500; }
.bar-row span:last-child { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; text-align: right; }
.bar-track {
  background: var(--panel-2);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar-fill {
  background: var(--accent-grad);
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width var(--t-slow) var(--ease-out);
}

/* ============================================================
   Tour
   ============================================================ */

.tour {
  position: fixed; inset: 0;
  background: rgba(5,5,15,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: grid; place-items: center;
  padding: 24px;
  animation: fade-in var(--t-med) var(--ease-out);
}
.tour.hidden { display: none; }
.tour-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow-3);
  animation: modal-pop var(--t-slow) var(--ease-out);
}
.tour-card h2 { margin: 0 0 14px; font-size: 20px; font-weight: 600; }
.tour-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: background var(--t-fast) var(--ease); }
.tour-dot.active { background: var(--accent); width: 20px; border-radius: 999px; }

.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

/* ============================================================
   Watches
   ============================================================ */

.watches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}
.watches-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}
.watch-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--t-fast) var(--ease);
  position: relative;
}
.watch-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.watch-card.disabled { opacity: 0.55; }
.watch-card.disabled .watch-status { color: var(--muted); }

.watch-head {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.watch-head .yt-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #ff3b30, #c8002a);
  border-radius: var(--r-xs);
  display: grid; place-items: center;
  color: #fff; font-size: 12px;
  flex-shrink: 0;
}
.watch-url {
  font-weight: 500;
  font-size: 13px;
  word-break: break-all;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}
.watch-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--panel-3);
  border-radius: var(--r-xs);
}
.watch-meta b { color: var(--text-soft); font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.watch-status {
  font-size: 11px;
  color: var(--success);
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.watch-status::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
  animation: pulse-dot 2s ease-in-out infinite;
}
.watch-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
}
.watch-actions button { font-size: 12px; padding: 5px 10px; }

/* ============================================================
   Auth pages
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-3);
}
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-brand h1 {
  margin: 12px 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.auth-brand p { margin: 0; }
.logo-lg {
  width: 56px; height: 56px;
  font-size: 24px;
  margin: 0 auto;
  border-radius: 14px;
}
.auth-section {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.auth-section.hidden { display: none; }
.auth-section:first-of-type { border-top: none; padding-top: 0; }
.auth-section h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; text-transform: none; letter-spacing: -0.01em; color: var(--text); }
.auth-section p { margin: 0 0 14px; font-size: 13px; }
.auth-section form { display: flex; flex-direction: column; gap: 4px; }
.auth-section .actions { margin-top: 10px; }
.auth-section button.primary { width: 100%; }
.auth-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-link:hover { text-decoration: underline; }
.auth-section code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* User pill in header */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
}
.user-pill .user-email {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill .admin-tag {
  font-size: 10px;
  font-weight: 600;
  background: var(--accent-grad);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.user-pill .logout-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--border);
  color: var(--muted);
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 12px;
  transition: all var(--t-fast) var(--ease);
}
.user-pill .logout-btn:hover { background: var(--error-soft); color: var(--error); border-color: transparent; }

/* Admin Users panel */
.invite-link-box {
  display: flex; gap: 8px; align-items: center;
  margin: 10px 0;
  padding: 10px 12px;
  background: var(--panel-3);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
}
.invite-link-box code {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
  word-break: break-all;
}

.user-row .role-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-grad);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.user-row .role-tag.member {
  background: var(--panel-3);
  color: var(--muted);
}
.user-row .ai-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.user-row .ai-tag.off {
  background: var(--panel-3);
  color: var(--muted-2);
  text-decoration: line-through;
}

/* Templates editor */
.template-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.template-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.template-head h4 { margin: 0; font-size: 14px; font-weight: 600; }
.template-vars {
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 8px;
  background: var(--bg);
  border-radius: var(--r-xs);
  margin: 8px 0;
  word-break: break-all;
}
.template-vars code {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
  cursor: pointer;
  display: inline-block;
}
.template-vars code:hover { background: var(--accent); color: #fff; }
.template-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.template-actions button { font-size: 12px; padding: 5px 10px; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  header { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .header-tools { width: 100%; }
  .options { grid-template-columns: 1fr; }
  .nav-tabs { padding: 0 14px; top: 110px; }
  main { padding: 0 14px 80px; }
  .modal-card { max-height: 96vh; border-radius: var(--r-lg); }
  .modal-body, .detail { padding: 20px; }
  .segment { grid-template-columns: 56px 1fr; gap: 10px; padding: 8px; }
  .segment-speaker { grid-column: 1 / -1; justify-self: start; margin-bottom: 4px; }
  .stats-cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .bar-row { grid-template-columns: 80px 1fr 40px; }
  .toasts { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  .job { grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px; }
  .job .star-btn, .job .delete-job { display: none; }
}

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