/* Focus Group Transcriber — UI styling */
:root {
  --bg: #0a0d14;
  --bg-2: #10141d;
  --panel: #151a24;
  --panel-2: #1b2230;
  --border: #273043;
  --border-soft: #1e2533;
  --text: #eef2f9;
  --muted: #93a0b6;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --green: #22c55e;
  --green-soft: #15803d;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 12px 44px rgba(0,0,0,.5);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
  --radius: 16px;
  --ring: 0 0 0 3px rgba(99,102,241,.28);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  color-scheme: dark;   /* keep native controls dark on any OS appearance */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(99,102,241,.16), transparent 60%),
    radial-gradient(1000px 600px at 92% -6%, rgba(139,92,246,.14), transparent 55%),
    radial-gradient(800px 700px at 50% 120%, rgba(34,211,238,.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
}
::selection { background: rgba(99,102,241,.35); }
/* slim, themed scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #2b3547; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #384559; background-clip: padding-box; }

.app { max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--grad);
  display: grid; place-items: center; font-weight: 800; letter-spacing: .5px; font-size: 17px;
  box-shadow: 0 8px 24px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand h1 {
  margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.2px;
  background: linear-gradient(90deg, #fff, #c7cdff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sub { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.keystatus {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border);
}
.keystatus.ok { color: #7ee2a8; background: rgba(46,160,67,.12); border-color: var(--green-soft); }
.keystatus.bad { color: #ffb4ae; background: rgba(229,83,75,.12); border-color: #6b2b27; }

/* Layout */
main { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  position: relative;
}
.panel h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--muted); margin: 4px 0 14px; font-weight: 650;
  display: flex; align-items: center; gap: 8px;
}
.panel h2::before {
  content: ""; width: 3px; height: 13px; border-radius: 3px; background: var(--grad);
}
.controls h2:not(:first-child) { margin-top: 22px; }

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--border); border-radius: 14px;
  background: var(--panel-2); padding: 30px 16px; text-align: center;
  cursor: pointer; transition: .2s ease;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent); background: rgba(99,102,241,.10);
  transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,.18);
}
.dropzone.drag { border-style: solid; }
.dz-icon {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 12px;
  background: rgba(99,102,241,.16); color: var(--accent-2);
  display: grid; place-items: center; font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.25);
}
.dropzone:hover .dz-icon { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.dropzone p { margin: 4px 0; }
.muted { color: var(--muted); font-size: 12px; }
.link { background: none; border: none; color: var(--accent-2); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

.selected { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.selected li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 7px 10px; border-radius: 8px; font-size: 12.5px;
}
.selected li .rm { color: var(--muted); cursor: pointer; border: none; background: none; font-size: 14px; }
.selected li .rm:hover { color: var(--red); }

/* local-path input (for large files) */
.orpath { margin-top: 14px; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; color: var(--muted); font-size: 11px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Fields */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select {
  width: 100%; padding: 9px 10px; border-radius: 9px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); font: inherit;
}
select:focus { outline: none; border-color: var(--accent); }
textarea {
  width: 100%; padding: 9px 10px; border-radius: 9px; resize: vertical;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); font: inherit; line-height: 1.5;
}
textarea:focus { outline: none; border-color: var(--accent); }
input[type=text] {
  width: 100%; padding: 9px 10px; border-radius: 9px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); font: inherit;
}
input[type=text]:focus { outline: none; border-color: var(--accent); }

.seg { display: flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; padding: 8px 6px; border: none; border-radius: 7px;
  background: none; color: var(--muted); font: inherit; cursor: pointer; transition: .15s;
}
.seg button:hover:not(.active) { color: var(--text); }
.seg button.active { background: var(--grad); color: #fff; box-shadow: 0 3px 12px rgba(99,102,241,.45); }

.hint { font-size: 11.5px; color: var(--muted); margin: 7px 2px 0; line-height: 1.5; }
.hint.center { text-align: center; }

.estimate {
  display: flex; justify-content: space-between; align-items: center;
  margin: 16px 0 6px; padding: 11px 14px; border-radius: 10px;
  background: rgba(210,153,34,.08); border: 1px solid #5c4a1e; font-size: 13px;
}
.estimate .cost { font-weight: 700; color: #f0c050; }

.primary {
  width: 100%; margin-top: 16px; padding: 14px; border: none; border-radius: 13px;
  background: var(--grad); color: #fff; background-size: 160% 160%;
  font-size: 15px; font-weight: 650; letter-spacing: .2px; cursor: pointer; transition: .2s ease;
  box-shadow: 0 8px 22px rgba(99,102,241,.42), inset 0 1px 0 rgba(255,255,255,.2);
}
.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(99,102,241,.55), inset 0 1px 0 rgba(255,255,255,.2); background-position: 100% 0; }
.primary:active:not(:disabled) { transform: translateY(0); }
.primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; filter: grayscale(.3); }

/* Queue */
.queue-head { display: flex; align-items: center; gap: 10px; }
.badge {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 10px; font-size: 12px; color: var(--muted);
}
.jobs { display: grid; gap: 12px; min-height: 260px; }
.empty { text-align: center; padding: 70px 10px; color: var(--muted); }
.empty p { margin: 4px 0; }

.job {
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: 14px; padding: 15px 17px;
  transition: border-color .2s ease, transform .2s ease;
}
.job:hover { border-color: #34405a; transform: translateY(-1px); }
.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-name { font-weight: 600; word-break: break-word; }
.job-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.pill {
  font-size: 11px; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--border);
}
.pill.queued { color: var(--muted); }
.pill.running { color: #cfe0ff; background: rgba(79,134,247,.14); border-color: #2f4a86; }
.pill.done { color: #8ee6ab; background: rgba(46,160,67,.14); border-color: var(--green-soft); }
.pill.failed { color: #ffb4ae; background: rgba(229,83,75,.14); border-color: #6b2b27; }
.pill.cancelled { color: var(--amber); }

.stage { font-size: 12px; color: var(--muted); margin: 10px 0 8px; }

/* progress bar */
.bar { height: 8px; border-radius: 6px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--border-soft); }
.bar > i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .5s ease; box-shadow: 0 0 12px rgba(99,102,241,.6); }

/* chunk grid */
.chunks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 11px; }
.chunk {
  width: 16px; height: 16px; border-radius: 5px; background: var(--panel);
  border: 1px solid var(--border); transition: .25s ease;
}
.chunk.pending { background: var(--panel); }
.chunk.uploading, .chunk.transcribing, .chunk.retrying {
  background: var(--accent); border-color: var(--accent);
  animation: pulse 1.1s ease-in-out infinite; box-shadow: 0 0 10px rgba(99,102,241,.6);
}
.chunk.retrying { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px rgba(245,158,11,.6); }
.chunk.done { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(34,197,94,.4); }
.chunk.issue { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px rgba(245,158,11,.5); }
.chunk.failed { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px rgba(239,68,68,.5); }
@keyframes pulse { 0%,100% { opacity: .4; transform: scale(.92); } 50% { opacity: 1; transform: scale(1); } }

.content-warning {
  margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px;
  background: rgba(245,158,11,.12); border: 1px solid var(--amber); color: var(--amber);
}
.job-actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.btn {
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 12.5px;
  cursor: pointer; transition: .16s ease; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--accent); background: rgba(99,102,241,.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { color: var(--muted); }
.btn.danger:hover { border-color: var(--red); color: #ffb4ae; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; padding: 24px; }
.modal-card { width: min(820px, 100%); max-height: 84vh; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 15px; }
.icon-btn { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.icon-btn:hover { color: var(--text); }
.transcript { margin: 0; padding: 18px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: "Cascadia Code", ui-monospace, monospace; font-size: 12.5px; line-height: 1.7; }

.errbox {
  margin: 8px 0; padding: 9px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5;
  background: rgba(229,83,75,.12); border: 1px solid #6b2b27; color: #ffc4bf;
}

.qcbox {
  margin: 8px 0; padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5;
  border: 1px solid var(--border);
}
.qcbox.ok { background: rgba(46,160,67,.12); border-color: var(--green-soft); color: #8ee6ab; }
.qcbox.warn { background: rgba(210,153,34,.12); border-color: #5c4a1e; color: #f0c050; }

/* Dashboard */
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.card-value { font-size: 26px; font-weight: 700; margin: 6px 0 2px; color: #fff; }
.card-sub { font-size: 11.5px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.chart { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 48px 1fr 64px; align-items: center; gap: 10px; font-size: 12px; }
.bar-day { color: var(--muted); }
.bar-track { height: 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.bar-track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8b6bff); }
.bar-val { text-align: right; color: #f0c050; font-weight: 600; }
.mrow { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mrow strong { color: #f0c050; }
.table-wrap { overflow-x: auto; }
.ctable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ctable th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.ctable td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ctable .r, .ctable th.r { text-align: right; }
.ctable .fname { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctable strong { color: #f0c050; }
.bad { color: var(--red); }
.esttag { font-size: 10px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: middle; }
.cost-pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: rgba(240,192,80,.12); border: 1px solid #5c4a1e; color: #f0c050; }

@media (max-width: 880px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

.keybar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(99,102,241,.10); border: 1px solid var(--accent);
}
.keybar-label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.keybar input { flex: 1; }

.hidden { display: none !important; }

@media (max-width: 880px) {
  main { grid-template-columns: 1fr; }
}

.guide-upload { margin-bottom: 10px; }
.guide-upload .btn { width: 100%; justify-content: center; }

/* ── Live transcript preview (Lite) ───────────────────────────────────── */
.live { margin: 10px 0 4px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel-2, rgba(0,0,0,.15)); overflow: hidden; }
.live-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--border); font-size: 12px; }
.live-head strong { font-size: 12px; }
.live-tabs { margin-left: auto; display: flex; gap: 4px; }
.ltab { font-size: 11px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--muted); }
.ltab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-dot.on { background: #22c55e; animation: livepulse 1.2s infinite; }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-body { max-height: 260px; overflow-y: auto; margin: 0; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* Broken-chunk markers — red wherever the transcript is shown */
.broken-line { color: #dc2626; font-weight: 700; }

/* ── Phase 2: Format Preset & Translation UI ──────────────────────── */

#formatPreset {
  width: 100%;
}

#presetHint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

#customSettingsGroup {
  margin-top: 12px;
  padding: 12px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

#customSettingsGroup label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

.slider-value {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

#translationSection {
  margin-top: 12px;
  padding: 12px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

#translationSection label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  margin: 0;
}

#translateCheckbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

#translationSection .hint {
  margin-top: 8px;
  margin-bottom: 0;
}

/* Grid layout for custom chunk settings */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Job metadata enhancement for bilingual indicator */
.job-meta {
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

/* Download button styling */
.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.job-actions .btn {
  font-size: 12px;
  padding: 6px 10px;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  #customSettingsGroup {
    background: rgba(99, 102, 241, 0.08);
  }
  
  #translationSection {
    background: rgba(34, 211, 238, 0.08);
  }
}

/* Roots Scribe is a DARK-FIRST design. The old "optional" light-mode block
   flipped the palette to white whenever the OS was in Light appearance, which
   clashed badly with the hardcoded-dark bento tiles (half-white / half-dark).
   Removed 2026-09-23 so the tool is consistently dark on any OS appearance. */

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  
  .job-actions {
    flex-direction: column;
  }
  
  .job-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ── Live status: phases, overall %, connection ─────────────────────────────
   One colour language everywhere:
     green  = done      blue = active      amber = warn/retry
     red    = error     grey = skipped/idle                                  */
:root {
  --st-done: #34d17d;
  --st-active: #7c6cff;
  --st-warn: #f0a83c;
  --st-error: #e05563;
  --st-idle: #3a3f52;
}

.phases { margin: 8px 0 4px; }
.phases > summary {
  cursor: pointer; list-style: none; display: flex;
  align-items: center; justify-content: space-between;
  font-size: 12px; color: #9aa0b5; padding: 4px 0;
}
.phases > summary::-webkit-details-marker { display: none; }
.phases > summary::before { content: "▸ "; margin-right: 4px; }
.phases[open] > summary::before { content: "▾ "; }
.phase-summary-label { letter-spacing: .04em; text-transform: uppercase; }
.overall { color: #cdd2e3; font-size: 12px; }
.overall b { color: #fff; font-size: 13px; }

.phase-list { display: flex; flex-direction: column; gap: 3px; padding: 4px 0 2px; }
.phase-row { display: grid; grid-template-columns: 118px 1fr 58px; align-items: center; gap: 8px; }
.phase-name { font-size: 11.5px; color: #9aa0b5; }
.phase-bar {
  position: relative; height: 6px; border-radius: 3px;
  background: var(--st-idle); overflow: hidden;
}
.phase-bar > i {
  position: absolute; inset: 0 auto 0 0; display: block;
  border-radius: 3px; transition: width .35s ease;
  background: var(--st-active);
}
.phase-bar > i.st-done { background: var(--st-done); }
.phase-bar > i.st-warn { background: var(--st-warn); }
.phase-bar > i.st-error { background: var(--st-error); }
.phase-bar > i.st-skipped { background: var(--st-idle); }
.phase-bar > i.st-idle { background: var(--st-idle); }
/* an active phase breathes, so a stalled one is visually obvious */
.phase-bar > i.st-active { animation: phasePulse 1.6s ease-in-out infinite; }
@keyframes phasePulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.phase-pct { font-size: 11px; color: #9aa0b5; text-align: right; }
.phase-pct.warn { color: var(--st-warn); }
.phase-pct.error { color: var(--st-error); }
.phase-pct.done { color: var(--st-done); }
.phase-pct.skipped { color: #6b7288; font-style: italic; }
.phase-note { font-size: 11px; color: #8c93a8; padding: 0 0 2px 126px; }
.phase-note.warn, .phase-note.err { color: var(--st-warn); }
.phase-note.error { color: var(--st-error); }

.overall-pill {
  background: #2a2f45; color: #cdd2e3; border-radius: 999px;
  padding: 2px 9px; font-size: 12px; font-weight: 600;
}
.bar > i.st-done { background: var(--st-done); }

.upload-bar { margin: 8px 0; }

.chunk-legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: #7d8399; margin: 6px 0 3px;
}
.chunk-legend .lg {
  width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-left: 6px;
}
.chunk-legend .lg.ok { background: var(--st-done); }
.chunk-legend .lg.issue { background: var(--st-warn); }
.chunk-legend .lg.failed { background: var(--st-error); }
.chunk-legend .lg.transcribing { background: var(--st-active); }

/* Connection indicator in the header */
.netpill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px;
  background: #22263a; color: #cdd2e3; border: 1px solid #2f3550;
}
.netdot { width: 8px; height: 8px; border-radius: 50%; background: #6b7288; }
.netpill.ok .netdot { background: var(--st-done); }
.netpill.degraded .netdot { background: var(--st-warn); animation: phasePulse 1.2s infinite; }
.netpill.down .netdot { background: var(--st-error); animation: phasePulse .8s infinite; }
.netpill.down { border-color: var(--st-error); color: #ffd9dd; }
.netpill.degraded { border-color: var(--st-warn); }

/* Batch staging (multi-client uploads) */
.batch-row { display:flex; align-items:center; justify-content:space-between;
  background:#1a1f30; border:1px solid #2a3048; border-radius:8px;
  padding:8px 12px; margin:6px 0; font-size:12.5px; color:#d7dbe8; }
.batch-row .rm { background:none; border:0; color:#e0556b; cursor:pointer; font-size:14px; }
#clientInput { width:100%; padding:9px 11px; border-radius:8px; border:1px solid #2f3550;
  background:#101425; color:#eef1f8; font-size:14px; }
#clientInput:focus { outline:none; border-color:#6c5cff; }

/* ══════════════════════════════════════════════════════════════════════
   Bento layout — Master (adopted 2026-09-22). Presentational only.
   All existing component styles above are reused inside the tiles.
   ══════════════════════════════════════════════════════════════════════ */
main.bento{
  display:grid; grid-template-columns:repeat(12,1fr);
  grid-auto-rows:min-content; gap:16px; align-items:start;
}
main.bento .tile{
  background:linear-gradient(180deg,var(--panel),var(--bg-2));
  border:1px solid var(--border); border-radius:var(--radius);
  padding:18px 18px 20px; position:relative; overflow:hidden;
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
main.bento .tile:hover{ transform:translateY(-3px); border-color:#33405a; box-shadow:var(--shadow); }
main.bento .tile::after{
  content:""; position:absolute; inset:0 0 auto 0; height:2px;
  background:linear-gradient(90deg,transparent,rgba(99,102,241,.5),transparent);
  opacity:0; transition:.2s;
}
main.bento .tile:hover::after{ opacity:1; }

/* tile headings — numbered badge instead of the old uppercase bar */
main.bento .tile > h2,
main.bento .tile .queue-head h2{
  font-size:13px; text-transform:none; letter-spacing:.3px; color:var(--text);
  margin:0 0 14px; display:flex; align-items:center; gap:9px; font-weight:650;
}
main.bento .tile > h2::before,
main.bento .tile .queue-head h2::before{ display:none; }
main.bento .tile h2 .n{
  width:22px; height:22px; border-radius:7px; background:var(--grad);
  display:grid; place-items:center; font-size:11px; font-weight:800; flex:none; color:#fff;
}
main.bento .controls h2:not(:first-child){ margin-top:0; }

/* column / row spans */
main.bento .c3{grid-column:span 3;}
main.bento .c4{grid-column:span 4;}
main.bento .c6{grid-column:span 6;}
main.bento .c8{grid-column:span 8;}
main.bento .c12{grid-column:span 12;}
main.bento .rows2{grid-row:span 2;}

/* stat tiles */
main.bento .stat{ display:flex; flex-direction:column; justify-content:center; gap:2px; min-height:92px; }
main.bento .stat .lbl{ font-size:10.5px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); }
main.bento .stat .val{
  font-size:30px; font-weight:800; line-height:1.1;
  background:linear-gradient(180deg,#fff,#c8d1e6);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
main.bento .stat.accent .val{
  background:var(--grad);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
main.bento .stat .foot{ font-size:11px; color:var(--muted); }

/* settings tile: responsive multi-column field grid */
main.bento .settings-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; }
main.bento .settings-grid .field{ margin-bottom:0; }
main.bento .settings-note{ grid-column:1/-1; }

/* queue tile: internal scroll so a long queue never blows up the grid */
main.bento .queue .jobs{ max-height:560px; min-height:180px; overflow-y:auto; padding-right:4px; }
main.bento .queue .empty{ padding:48px 10px; }

/* Hide cost on the MAIN page only — estimate + per-file cost still compute
   and are still logged to Billing + the Spend dashboard. */
#estCost{ display:none !important; }
.job .cost-pill{ display:none !important; }

/* Client field auto-filled from the selected project (single source for billing) */
input[type=text].locked{ background:rgba(99,102,241,.07); border-color:#33405a; cursor:not-allowed; }
.client-note{ font-size:11px; color:var(--accent-3); margin:6px 2px 0; line-height:1.45; }

/* responsive */
@media (max-width:1080px){
  main.bento .c3{ grid-column:span 6; }
  main.bento .c4{ grid-column:span 6; }
  main.bento .c8, main.bento .c12{ grid-column:span 12; }
  main.bento .rows2{ grid-row:span 1; }
}
@media (max-width:640px){
  main.bento .c3, main.bento .c4, main.bento .c6, main.bento .c8{ grid-column:span 12; }
}

/* ── Pastel accents for the bento tiles (main page only) ──────────────────
   Soft coloured cards on the dark base — lively + colourful without touching
   the billing / dashboard / review pages that share this stylesheet. */
main.bento .tile.tint-violet{ background:linear-gradient(180deg,rgba(139,92,246,.07),#10131c 42%); border-color:rgba(139,92,246,.38); }
main.bento .tile.tint-sky{    background:linear-gradient(180deg,rgba(56,189,248,.06),#10131c 42%); border-color:rgba(56,189,248,.34); }
main.bento .tile.tint-mint{   background:linear-gradient(180deg,rgba(45,212,191,.06),#10131c 42%); border-color:rgba(45,212,191,.34); }
main.bento .tile.tint-peach{  background:linear-gradient(180deg,rgba(251,146,120,.06),#10131c 42%); border-color:rgba(251,146,120,.34); }
main.bento .tile.tint-rose{   background:linear-gradient(180deg,rgba(244,114,182,.06),#10131c 42%); border-color:rgba(244,114,182,.32); }

/* coloured number badge + accent bar per tint */
main.bento .tile.tint-violet h2 .n{ background:linear-gradient(135deg,#a78bfa,#8b5cf6); }
main.bento .tile.tint-sky    h2 .n{ background:linear-gradient(135deg,#7dd3fc,#38bdf8); }
main.bento .tile.tint-mint   h2 .n{ background:linear-gradient(135deg,#5eead4,#2dd4bf); }
main.bento .tile.tint-peach  h2 .n{ background:linear-gradient(135deg,#fdba74,#fb9278); }
main.bento .tile.tint-rose   h2 .n{ background:linear-gradient(135deg,#f9a8d4,#f472b6); }
main.bento .tile.tint-violet::after{ background:linear-gradient(90deg,transparent,rgba(167,139,250,.7),transparent); }
main.bento .tile.tint-sky::after{    background:linear-gradient(90deg,transparent,rgba(125,211,252,.7),transparent); }
main.bento .tile.tint-mint::after{   background:linear-gradient(90deg,transparent,rgba(94,234,212,.7),transparent); }
main.bento .tile.tint-peach::after{  background:linear-gradient(90deg,transparent,rgba(253,186,116,.7),transparent); }
main.bento .tile.tint-rose::after{   background:linear-gradient(90deg,transparent,rgba(249,168,212,.7),transparent); }

/* pastel stat values (solid pastel instead of white gradient) */
main.bento .stat.tint-violet .val{ background:none;-webkit-text-fill-color:#c4b5fd; color:#c4b5fd; }
main.bento .stat.tint-sky    .val{ background:none;-webkit-text-fill-color:#7dd3fc; color:#7dd3fc; }
main.bento .stat.tint-mint   .val{ background:none;-webkit-text-fill-color:#5eead4; color:#5eead4; }
main.bento .stat.tint-peach  .val{ background:none;-webkit-text-fill-color:#fdba74; color:#fdba74; }

/* ── Needs-attention tile + ETA pill (pulled from v2, main page) ────────── */
main.bento .tile.attn-tile{
  background:linear-gradient(180deg,rgba(245,158,11,.09),#10131c 42%);
  border-color:rgba(245,158,11,.42);
}
main.bento .tile.attn-tile h2 .n{ background:linear-gradient(135deg,#fbbf24,#f59e0b); }
main.bento .tile.attn-tile::after{ background:linear-gradient(90deg,transparent,rgba(251,191,36,.7),transparent); }
.attn-list{ display:grid; gap:8px; }
.attn-row{
  display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;
  background:rgba(245,158,11,.07); border:1px solid rgba(245,158,11,.22);
  border-radius:10px; padding:9px 12px;
}
.attn-name{ font-size:12.5px; font-weight:600; word-break:break-word; }
.attn-proj{ color:var(--muted); font-weight:400; }
.attn-reason{ font-size:11.5px; color:#f0c050; white-space:nowrap; }
.eta-pill{
  font-size:11px; padding:3px 9px; border-radius:999px; white-space:nowrap;
  background:rgba(56,189,248,.13); border:1px solid rgba(56,189,248,.35); color:#7dd3fc;
}
