/* Info Startup's own look (the owner's decision 3, 2026-11-07; RULES.md 8): the Stream Delivery palette, solid blue buttons, text
   30% larger, built from the control panel's parts (Geist served from /fonts, the same colour tokens). Light by default, dark when
   the device asks for it or <html data-theme="dark">. Every page links this file; nothing is styled inline (CSP: style from 'self'). */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/geist-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/geist-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f6f7f9; --panel: #ffffff; --border: #e2e5ea; --text: #14181f; --muted: #666f7d;
  --accent: #1f6feb; --accent-fg: #ffffff; --accent-bg: #e9f0fd;
  --ok: #17803d; --ok-bg: #e8f6ec; --warn: #a35200; --warn-bg: #fdf0e3; --danger: #b42318; --danger-bg: #fdeceb;
  --radius: 8px;
  /* Text 30% larger than the usual scale (RULES.md 8). */
  --text-xs: 0.975rem; --text-sm: 1.1375rem; --text-base: 1.3rem; --text-lg: 1.4625rem; --text-xl: 1.625rem; --text-2xl: 1.95rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117; --panel: #151b23; --border: #262d38; --text: #e6e9ee; --muted: #8d97a5;
    --accent: #4c8dff; --accent-fg: #08101f; --accent-bg: #141f33;
    --ok: #57d07f; --ok-bg: #12281a; --warn: #e0a458; --warn-bg: #2b2013; --danger: #f0776b; --danger-bg: #2c1614;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117; --panel: #151b23; --border: #262d38; --text: #e6e9ee; --muted: #8d97a5;
  --accent: #4c8dff; --accent-fg: #08101f; --accent-bg: #141f33;
  --ok: #57d07f; --ok-bg: #12281a; --warn: #e0a458; --warn-bg: #2b2013; --danger: #f0776b; --danger-bg: #2c1614;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--text-base)/1.5 'Geist', system-ui, sans-serif; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Parts (the same names as the old panel's): card, btn, input, label, note. */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 6px;
  background: var(--accent); color: var(--accent-fg); padding: 6px 12px; font-family: inherit; font-size: var(--text-sm); font-weight: 500;
  line-height: 1.4; cursor: pointer; }
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.input { display: block; width: 100%; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text);
  padding: 8px 12px; font: inherit; font-size: var(--text-sm); outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.label { display: block; margin-bottom: 4px; font-size: var(--text-xs); font-weight: 500; color: var(--muted); }
.note { margin: 0; border-radius: 6px; padding: 8px 12px; font-size: var(--text-sm); }
.note-bad { background: var(--danger-bg); color: var(--danger); }
.note-ok { background: var(--ok-bg); color: var(--ok); }
.muted { color: var(--muted); }

/* The sign-in page. */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.signin-box { width: 100%; max-width: 400px; }
.signin-head { text-align: center; margin-bottom: 24px; }
.signin-head h1 { margin: 0; font-size: var(--text-2xl); font-weight: 600; }
.signin-head p { margin: 12px 0 0; font-size: var(--text-sm); }
.signin form, .signin .done { padding: 20px; display: grid; gap: 16px; }
.signin .btn-wide { width: 100%; padding: 8px 12px; }
.signin .code { letter-spacing: 0.4em; text-align: center; font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.signin-foot { margin-top: 16px; text-align: center; font-size: var(--text-xs); }
.signin-lang { margin-top: 8px; text-align: center; }
.turnstile { min-height: 65px; display: flex; justify-content: center; }

/* The panel's pages (the Super-Admin's first): a top bar, a page, bars, forms in a grid, tables with sticky light-blue headings. */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--border); }
.grow { flex: 1; }
.page { max-width: 1200px; margin: 0 auto; padding: 16px; }
.page h1 { margin: 0; font-size: var(--text-xl); font-weight: 600; }
.page h2 { margin: 24px 0 8px; font-size: var(--text-lg); font-weight: 600; }
.page h3 { margin: 0; font-size: var(--text-base); font-weight: 600; }
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.search { width: 260px; max-width: 100%; }
.form { padding: 16px; display: grid; gap: 12px; margin-bottom: 12px; }
.form h2 { margin: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; }
.small { font-size: var(--text-xs); margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th { position: sticky; top: 0; background: var(--accent-bg); color: var(--muted); text-align: left; font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 12px; white-space: nowrap; }
td { padding: 8px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
th.c, td.c { text-align: center; }
td.name { font-weight: 500; }
td.actions { white-space: nowrap; text-align: right; }
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--accent-bg); }
.empty { padding: 12px; margin: 0; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: var(--text-xs); font-weight: 500; }
.pill-active { background: var(--ok-bg); color: var(--ok); }
.pill-suspended { background: var(--danger-bg); color: var(--danger); }
.tone-ok { color: var(--ok); } .tone-warn { color: var(--warn); } .tone-bad { color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; }
select.input { appearance: auto; }
@media (max-width: 700px) { .search { width: 100%; } }

/* The panel's frame (public/app/index.html): menu in the top bar, the client switcher. */
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: var(--text-sm); }
.menu a:hover { background: var(--accent-bg); }
.menu a.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.switcher { width: auto; max-width: 260px; }
.client-name { font-weight: 500; color: var(--muted); }
.me { font-size: var(--text-xs); }
.mt { margin-top: 12px; }
@media (max-width: 900px) { .top { flex-wrap: wrap; } .me { display: none; } }
.code-in { text-transform: uppercase; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.row.wrap { flex-wrap: wrap; }
.shot { display: block; max-width: 100%; border-radius: 6px; border: 1px solid var(--border); background: #000; }
/* The Media page: space bar, uploads under way, thumbnails. */
.space { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.space-used { height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.upload { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 12px; margin-top: 8px; }
.upload .space { grid-column: 1 / -1; }
td.thumb { width: 96px; }
td.thumb img, td.thumb video { display: block; width: 80px; height: 45px; object-fit: cover; border-radius: 4px; background: #000; }
.live { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 45px; border-radius: 4px; background: var(--danger); color: #fff; font-weight: 700; font-size: var(--text-xs); letter-spacing: 0.1em; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chips .pill { background: var(--accent-bg); color: var(--accent); }
ul.check { margin: 0; padding-left: 18px; font-size: var(--text-sm); display: grid; gap: 2px; }
/* The playlist editor. */
.form-plain { display: grid; gap: 0; }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
input.num { width: 90px; text-align: center; }
#pl-items select.input, #pl-items input[type=date] { width: auto; }
/* The playlist preview. */
.preview { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.85); display: grid; place-items: center; padding: 16px; gap: 12px; grid-template-rows: 1fr auto; }
.preview-stage { background: #000; width: min(92vw, calc(80vh * 16 / 9)); aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.preview-stage.portrait { width: min(92vw, calc(80vh * 9 / 16)); aspect-ratio: 9 / 16; }
.preview-stage img, .preview-stage video { width: 100%; height: 100%; }
.preview-live { color: #fff; padding: 24px; text-align: center; font-size: var(--text-lg); }
.preview-bar { display: flex; gap: 12px; align-items: center; color: #fff; width: min(92vw, 900px); }
