/* SS Trainer mockups: shared look. Change a color here and every screen follows. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #1b1c1f;          /* portal background */
  --panel: #25272b;
  --panel-2: #2e3136;
  --line: #3b3e44;
  --text: #e8eaed;
  --muted: #a0a6ae;
  --accent: #4ea1ff;      /* selection, focus, links */
  --ok: #3ccf6e;
  --warn: #f5b83d;
  --bad: #f0524f;         /* missed lead */
  --solo: #e2d84a;
  --radius: 6px;

  /* DAW window (Studio Pro-style) */
  --w-bg: #15171a;
  --w-bar: #2a2d31;       /* menu + transport bars */
  --w-strip: #393c41;     /* channel strip */
  --w-strip-2: #44484e;   /* bus strips */
  --w-slot: #222428;      /* insert / send / io slots */
  --w-text: #dadde0;
  --w-dim: #a3a9b0;
  --mute: #3d8bfd;
  --arm: #e5484d;
  --mon: #4fb3e8;
  --strip-w: 87px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- portal pages (start, results, admin) ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 8px 16px; background: #141517; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.brand svg { color: var(--accent); }
.topbar .who { color: var(--muted); font-size: 13px; }
.topbar .who b { color: var(--text); font-weight: 600; }
.spacer { flex: 1; }
.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.btn:hover { border-color: #565a62; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b1a2c; font-weight: 600; }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; background: var(--panel-2); color: var(--muted); }
.tag.lead { background: rgba(245,184,61,.18); color: var(--warn); }
.tag.ok { background: rgba(60,207,110,.15); color: var(--ok); }
.tag.bad { background: rgba(240,82,79,.15); color: var(--bad); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.page { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.score-mini { display: flex; gap: 10px; }
.score-mini div { flex: 1; background: var(--panel-2); border-radius: 6px; padding: 8px; text-align: center; }
.score-mini b { display: block; font-size: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 500; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], select { background: #1a1b1e; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; min-height: 40px; width: 100%; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mock-nav { font-size: 12px; color: var(--muted); padding: 6px 16px; background: #101113; display: flex; flex-wrap: wrap; gap: 14px; }
.mock-nav a { color: var(--muted); }
.mock-nav a[aria-current] { color: var(--text); font-weight: 600; }

/* ---------- DAW window (matches Arturo's Studio Pro screenshots) ---------- */
.daw { display: flex; flex-direction: column; height: calc(100vh - 30px); min-height: 700px; background: var(--w-bg); color: var(--w-text); font-size: 12px; }
.titlebar { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; background: #f3f3f3; color: #222; font-size: 12px; }
.appicon { width: 16px; height: 16px; border-radius: 3px; background: linear-gradient(135deg, #2a6df4, #0b1f4a); }
.winbtn { color: #444; letter-spacing: .1em; }
.menubar { display: flex; flex-wrap: wrap; gap: 0; padding: 0 4px; background: #f3f3f3; color: #111; position: relative; z-index: 5; font-size: 13px; }
.menubar details { position: relative; }
.menubar summary, .menubar > span { list-style: none; padding: 4px 8px; cursor: pointer; }
.menubar summary::-webkit-details-marker { display: none; }
.menubar details[open] summary, .menubar summary:hover { background: #cce4f7; }
.menubar .drop { position: absolute; top: 100%; left: 0; min-width: 220px; background: #f9f9f9; color: #111; border: 1px solid #ccc; padding: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.menubar .drop button { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 6px 10px; background: none; border: 0; text-align: left; cursor: pointer; color: #111; }
.menubar .drop button:hover { background: #cce4f7; }
.menubar .drop kbd { opacity: .6; font: inherit; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 10px; background: #2b2f36; border-bottom: 1px solid #15171a; }
.tb-box { background: #23272d; border-radius: 3px; padding: 3px 10px; line-height: 1.2; text-align: center; }
.tb-box small { display: block; color: var(--w-dim); font-size: 11px; }

.daw-body { flex: 1; display: grid; grid-template-columns: 170px 1fr 260px; min-height: 0; }
.chanlist { background: #23272d; border-right: 1px solid #15171a; overflow: auto; font-size: 11px; }
.chanlist.focus { outline: 2px solid var(--warn); outline-offset: -2px; }
.cl-h { background: #2b2f36; color: var(--w-dim); text-align: center; padding: 3px; }
.cl-row { display: flex; align-items: center; gap: 5px; padding: 2px 6px; white-space: nowrap; }
.cl-row > span:first-child { width: 16px; text-align: right; color: var(--w-dim); }
.cl-row i { width: 4px; height: 14px; flex: none; }
.cl-row .muted { margin-left: auto; font-size: 10px; }
.cl-row.arm-group { background: #2f343b; font-weight: 600; }
.led.rec { background: var(--arm); box-shadow: 0 0 5px var(--arm); }
.console { display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; background: #15171a; align-items: stretch; }
.browser { background: #2b2f36; border-left: 1px solid #15171a; padding: 12px; display: flex; flex-direction: column; gap: 16px; font-size: 13px; overflow: auto; }
.browser h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--w-dim); margin: 0 0 8px; }

/* channel strip */
.strip { flex: 0 0 var(--strip-w); display: flex; flex-direction: column; background: #2a2e35; border-right: 1px solid #16181b; position: relative; min-height: 0; }
.strip.dim { opacity: .22; }
.strip.main { flex-basis: 92px; border-left: 3px solid #15171a; }
.st-top { display: flex; align-items: center; gap: 2px; padding: 5px 3px 4px; height: 28px; border-top: 3px solid var(--c); background: #2a2e35; }
.knob { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(#4a4f57, #24272c); box-shadow: 0 0 0 1px #111; flex: none; }
.gain { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; font-size: 9px; text-align: center; background: #1f2227; border-radius: 2px; padding: 1px 0; }
.phase { flex: none; font-size: 9px; color: var(--w-dim); background: #1f2227; border-radius: 2px; padding: 0 3px; }
.sec { background: #23272d; padding: 2px 0; flex: none; }
.sec.sends { flex: 1; min-height: 60px; border-top: 1px solid #16181b; }
.sec-h { display: flex; align-items: center; gap: 3px; padding: 3px 4px; color: var(--w-text); font-size: 11px; }
.sec-h span { margin-left: auto; color: var(--w-dim); }
.sec-h.mixfx { background: #3a3f47; justify-content: center; }
.pw { width: 10px; height: 10px; color: #4aa3ff; flex: none; }
.ins { display: flex; align-items: center; gap: 3px; margin: 1px 3px; padding: 2px 3px; background: #343941; border-radius: 2px; font-size: 10px; white-space: nowrap; overflow: hidden; color: #e6ebf0; height: 18px; }
button.ins { border: 0; width: calc(100% - 6px); cursor: pointer; text-align: left; }
button.ins:hover { background: #3f4650; }
.sendlvl { height: 3px; margin: 1px 4px 4px; background: #1a1c20; }
.sendlvl i { display: block; height: 100%; width: 70%; background: #3aa0ff; }
.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #666; flex: none; }
.led.live { background: var(--ok); box-shadow: 0 0 6px var(--ok); }

.lower { display: flex; flex-direction: column; gap: 3px; padding: 4px 4px 2px; background: #2a2e35; border-top: 3px solid var(--c); flex: none; }
.strip.main .lower { border-top-color: #3a3f47; }
.box { background: #1f2227; border: 1px solid #3a3f47; border-radius: 2px; text-align: center; font-size: 11px; padding: 1px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 18px; }
.box.link { color: #4aa3ff; }
.box.busmeter { padding: 3px 4px; }
.box.busmeter i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #6b7380 0 1px, transparent 1px 3px); }
.dim-txt { color: var(--w-dim); }
.panbar { height: 12px; background: #1f2227; position: relative; border-radius: 1px; }
.panbar i { position: absolute; top: 2px; bottom: 2px; background: #3ec6e0; }
.panbar.C i { left: calc(50% - 1px); width: 2px; }
.panbar.L i { left: 2px; right: 50%; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.panbar.R i { left: 50%; right: 2px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.pantext { text-align: center; font-size: 11px; height: 15px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 4px; padding: 0 6px; }
.btns button { height: 18px; border: 1px solid #4a4f57; border-radius: 2px; background: #2f343b; font-size: 11px; cursor: pointer; color: var(--w-text); display: grid; place-items: center; padding: 0; }
.btns .m.on { background: #e8b730; color: #111; }
.btns .s.on { background: #22c55e; color: #111; }
.btns .arm { border: 0; background: none; }
.btns .arm i { width: 9px; height: 9px; border-radius: 50%; background: #c9ced5; }
.btns .arm.on i { background: var(--arm); box-shadow: 0 0 6px var(--arm); }
.btns .mon { border: 0; background: none; }
.btns .mon b { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #c9ced5; background: linear-gradient(90deg, #c9ced5 50%, transparent 50%); }
.stereo { grid-column: 1 / -1; text-align: center; color: #4aa3ff; font-size: 11px; height: 18px; }
.dbval { text-align: center; font-size: 11px; }
.fader-area { position: relative; height: 165px; margin: 2px 0; }
.scale { position: absolute; left: 2px; top: 6px; bottom: 6px; width: 14px; }
.scale span { position: absolute; left: 0; font-size: 7px; color: var(--w-dim); transform: translateY(50%); }
.fader-area .meter { position: absolute; left: 17px; top: 6px; bottom: 6px; width: 5px; background: #0d0e10; overflow: hidden; }
.fader-area .meter i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, #2fbf5a 70%, #d8d13c 88%, #e5484d); }
.track-line { position: absolute; left: calc(50% + 6px); top: 6px; bottom: 6px; width: 3px; margin-left: -1px; background: #111; }
.cap { position: absolute; left: calc(50% + 6px); width: 24px; height: 30px; margin-left: -12px; transform: translateY(50%); border-radius: 2px;
  background: linear-gradient(#e9ebee, #b9bdc4 45%, #7d828a 50%, #b9bdc4 55%, #dfe2e6); box-shadow: 0 2px 3px rgba(0,0,0,.6); pointer-events: none; }
.cap.bus { background: linear-gradient(#9fe9ff, #2ab4e0 45%, #11789a 50%, #2ab4e0 55%, #8fe2fb); }
.fader-area input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ns-resize; writing-mode: vertical-lr; direction: rtl; }
.fader-area:focus-within .cap { outline: 2px solid var(--accent); outline-offset: 1px; }
.auto { text-align: center; font-size: 10px; color: var(--w-dim); background: #1f2227; border-radius: 2px; margin: 0 8px; }
.numrow { display: flex; justify-content: space-between; padding: 2px 6px; font-size: 11px; }
.label { height: 18px; line-height: 18px; text-align: center; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.strip.cue-miss { box-shadow: inset 0 0 0 2px var(--bad); }
.cue-flag { position: absolute; top: 2px; left: 3px; right: 3px; text-align: center; font-size: 10px; font-weight: 700; padding: 2px 0; border-radius: 2px; background: var(--bad); color: #fff; z-index: 1; }

/* transport (bottom bar) */
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 5px 12px; background: #2b2f36; border-top: 1px solid #15171a; }
.tp-group { display: flex; align-items: center; gap: 14px; line-height: 1.15; }
.tp-group b, .tp-time b { display: block; font-weight: 500; font-size: 13px; }
.tp-group small, .tp-time small { color: var(--w-dim); font-size: 11px; }
.tp-ico { color: var(--w-dim); font-size: 16px; }
.tp-time { text-align: center; line-height: 1.1; padding: 0 8px; }
.tp-time b { font-size: 18px; font-weight: 600; }
.tp-btn { width: 34px; height: 30px; border: 0; border-radius: 3px; background: none; color: #dfe3e8; display: grid; place-items: center; cursor: pointer; font-size: 16px; }
.tp-btn.stop i { width: 16px; height: 16px; background: #2f7cf6; border-radius: 2px; }
.tp-btn.rec { color: #e9ecef; }

/* side panel lists */
.setlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.setlist li { padding: 6px 10px; border-radius: 3px; background: var(--w-slot); }
.feed { display: grid; gap: 6px; }
.feed div { display: flex; gap: 8px; align-items: baseline; }
.feed .t { color: var(--w-dim); min-width: 42px; }

/* dialogs: Audio Setup, Song Setup, plugin window */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 20; padding: 16px; }
.dlg { background: #2f3236; border: 1px solid #111; border-radius: 6px; width: min(620px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6); color: var(--w-text); font-size: 13px; }
.dlg-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 12px; background: #232528; font-weight: 600; }
.dlg-title button { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--w-dim); width: 36px; height: 36px; }
.dlg-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid #1d1f22; }
.dlg-tabs span { padding: 6px 12px; border-radius: 4px 4px 0 0; color: var(--w-dim); }
.dlg-tabs span.on { background: #3a3d42; color: var(--w-text); }
.dlg-body { padding: 14px 16px; display: grid; gap: 12px; }
.dlg-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.dlg-row label { margin: 0; color: var(--w-dim); }
.dlg select { background: #1d1f22; border: 1px solid #4a4e55; border-radius: 3px; padding: 6px 8px; min-height: 34px; width: 100%; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid #1d1f22; }
.dlg td, .dlg th { padding: 5px 8px; font-size: 12px; border-color: #3a3d42; }
.hint { background: rgba(78,161,255,.1); border-left: 3px solid var(--accent); padding: 8px 10px; font-size: 12px; }
.plug-face { display: grid; gap: 12px; justify-items: center; padding: 20px 16px; text-align: center; background: linear-gradient(#34383d, #2a2d31); }
.plug-status { font-size: 13px; font-weight: 700; letter-spacing: .1em; padding: 4px 12px; border-radius: 20px; background: #1d1f22; color: var(--w-dim); }
.plug-status.live { background: var(--ok); color: #0d2414; }
.plug-big { width: 120px; height: 120px; border-radius: 50%; border: 3px solid #4a4e55; background: #1d1f22; font-weight: 700; cursor: pointer; font-size: 14px; }
.plug-big.live { border-color: var(--ok); box-shadow: 0 0 24px rgba(60,207,110,.35); color: var(--ok); }
.plug-link { background: #1d1f22; border-radius: 3px; padding: 6px 10px; font-family: ui-monospace, monospace; }

/* template tour */
.tour h3 { font-size: 17px; margin: 2px 0 6px; }
.tour p { margin: 0 0 10px; line-height: 1.5; }
.why { background: #24262a; border-left: 3px solid var(--warn); padding: 8px 10px; margin-bottom: 10px; line-height: 1.5; }
.legend { display: grid; gap: 4px; margin-bottom: 10px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 2px; flex: none; }
.rule { background: rgba(240,82,79,.12); border-left: 3px solid var(--bad); padding: 8px 10px; margin-bottom: 10px; line-height: 1.5; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: #3a3d42; }
.steps i.on { background: var(--warn); }

/* listen panel (two-church mode, ListenTo-style) */
.listen { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: #141517; border-bottom: 1px solid var(--line); }
.lchip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); min-width: 260px; cursor: pointer; text-align: left; }
.lchip.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.lchip .spk { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); }
.lchip.on .spk { background: var(--ok); color: #0d2414; }
.lchip .alert { margin-left: auto; }
.lchip small { display: block; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .daw-body { grid-template-columns: 1fr; }
  .chanlist { display: none; }
  .browser { border-left: 0; border-top: 1px solid #17181a; }
  .fader-wrap { min-height: 160px; }
  .dlg-row { grid-template-columns: 1fr; }
  .lchip { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* App additions (not in the mockups) */
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--bad); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.btns button:disabled { cursor: default; opacity: .7; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.score-mini { flex-wrap: wrap; }
.score-mini div { min-width: 110px; }
.ins.send { font: inherit; font-size: 10px; color: #e6ebf0; }
.ins.send:not(.on) { opacity: .45; text-decoration: line-through; }
.ins.send:focus-visible { outline: 2px solid var(--accent); }
.setlist-text { white-space: pre-wrap; font: inherit; margin: 0; padding: 8px 10px; border-radius: 3px; background: var(--w-slot); }
.setlist-pdf { width: 100%; height: 360px; border: 0; border-radius: 3px; background: #fff; }
.tp-btn:disabled { opacity: .5; cursor: default; }
.table-wrap { overflow-x: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.form-grid label, .builder textarea { display: grid; gap: 4px; }
.form-grid .wide { grid-column: 1 / -1; }
.builder input:not([type=radio]):not([type=file]), .builder textarea, .builder select { min-height: 36px; padding: 6px 8px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font: inherit; width: 100%; box-sizing: border-box; }
.builder section + section { margin-top: 20px; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 8px; padding: 22px; text-align: center; cursor: pointer; margin: 10px 0; }
.drop.over, .drop:focus-within { border-color: var(--accent); }
.drop .link { color: var(--accent); text-decoration: underline; }
.row-radios { border: 0; padding: 0; display: flex; gap: 16px; margin: 0 0 8px; }
