/* MyTVSigns admin styles. Hand-written; no build step. */
:root {
  --bg: #f5f7fb; --card: #fff; --soft: #eaf0ff; --text: #1d2433; --muted: #556074; --line: #e2e6ef; --field: #fff;
  --brand: #2861f0; --brand-hover: #1f4fd1; --brand-text: #1f4fd1; --on-brand: #fff; --hero-a: #10204a; --hero-b: #2457d6; --on-hero: #fff;
  --danger: #d93a3a; --ok: #1f9d55; --warn: #8a5a00; --danger-soft: #fff1f1; --brand-dark: var(--brand-hover);
  --radius: 12px; --shadow: 0 1px 3px rgba(20, 30, 60, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand-text); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.topbar { position: relative; overflow: visible; background: linear-gradient(120deg, var(--hero-a), var(--hero-b)); color: var(--on-hero); }
.topbar-inner { position: relative; z-index: 1; }
.topbar a, .topbar summary { color: var(--on-hero); }
.topbar .card, .topbar .card a { color: var(--text); }
.theme-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.topbar > .theme-layer { overflow: hidden; }
.topbar-inner { max-width: var(--page-max); margin: 0 auto; padding: .6rem var(--page-pad); display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.logo span { color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.nav a { padding: .4rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav a.active, .nav a:hover { background: rgba(255,255,255,.16); color: var(--on-hero); }
.topbar-right { display: flex; align-items: center; gap: .5rem; }

.container { max-width: var(--page-max); margin: 0 auto; padding: 1.5rem var(--page-pad) 3rem; }
/* Pages use the whole window up to a comfortable limit; wide screens get side-by-side columns. */
:root { --page-max: 1600px; --page-pad: clamp(1rem, 3vw, 3rem); }
.page-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
.card-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 0 1.5rem; align-items: start; }
@media (min-width: 1150px) {
  .page-split { grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); }
  .page-split-wide { grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); }
}
.narrow { max-width: 460px; margin: 3rem auto; padding: 0 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.spread { justify-content: space-between; }

label { display: block; font-weight: 600; margin: .75rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--field); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--soft); border-color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: normal; margin: .4rem 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; border-radius: 8px; border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-light { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-light:hover { background: var(--soft); color: var(--text); }
.btn-danger { background: #c92a2a; color: #fff; }
.btn-danger:hover { background: #a61e1e; color: #fff; }
.btn-small { padding: .3rem .65rem; min-height: 34px; font-size: .9rem; }
.btn-block { width: 100%; margin-top: 1rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #e8f6ee; color: #145c34; border: 1px solid #bfe5cd; }
.errors { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #fdecec; color: #8a1f1f; border: 1px solid #f3c2c2; }
.errors ul { margin: 0; padding-left: 1.2rem; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--soft); color: var(--brand-text); }
.badge-grey { background: var(--soft); color: var(--muted); }
.badge-warn { background: #fdf3e1; color: #7a4a00; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
details summary { cursor: pointer; color: var(--brand); }
.danger-zone { border-color: #f3c2c2; }

@media (max-width: 640px) {
  .container { padding: 1rem .75rem 2rem; }
  .card { padding: 1rem; }
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.stack td { display: block; border: 0; padding: .2rem 0; }
}

/* Playlist, editor, media */
.slide-row { display: flex; gap: 1rem; align-items: center; }
.slide-thumb { width: 160px; aspect-ratio: 16 / 9; background: #111; border-radius: 8px; position: relative; overflow: hidden; flex: none; }
.slide-info { flex: 1; min-width: 0; }
.slide-off { opacity: .55; }
.tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.template-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.template-card { text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; cursor: pointer; font: inherit; color: var(--text); }
.template-card:hover, .template-card:focus { border-color: var(--brand); }
.editor { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 1.25rem; align-items: start; }
.editor-preview { position: sticky; top: 1rem; }
.preview-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.media-field { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.media-field img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; background: #eee; }
.repeater { display: flex; flex-direction: column; gap: .5rem; }
.repeater-row { display: flex; gap: .5rem; padding: .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.repeater-fields { flex: 1; display: flex; flex-wrap: wrap; gap: .4rem; }
.repeater-fields > input { flex: 1 1 140px; }
.repeater-tools { display: flex; flex-direction: column; gap: .25rem; }
.stack-fields { display: flex; flex-direction: column; gap: .4rem; width: 100%; }
.narrow-input { max-width: 110px; }
.place-results { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; margin-top: .4rem; }
.modal { position: fixed; inset: 0; background: rgba(15, 20, 35, .55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal-box { background: var(--card); color: var(--text); border-radius: var(--radius); padding: 1.25rem; width: min(900px, 100%); max-height: 90vh; overflow: auto; }
.picker-grid, .media-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 1rem; }
.picker-tile { border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); padding: .4rem; cursor: pointer; text-align: left; font: inherit; }
.picker-tile:hover { border-color: var(--brand); }
.picker-tile img, .media-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: #eee; display: block; }
.picker-tile span, .media-card .name { display: block; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .3rem; }
.media-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; }
.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter > div { height: 100%; background: var(--brand); }
@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; order: -1; }
  .slide-thumb { width: 110px; }
}

/* Canvas editor */
.cv-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; align-items: start; }
.cv-stage { position: relative; user-select: none; }
.cv-overlay { position: absolute; inset: 0; z-index: 5; }
.cv-frame { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.cv-el { position: absolute; outline: 3px dashed rgba(47, 107, 255, .35); cursor: move; touch-action: none; }
.cv-el:hover { outline-color: rgba(47, 107, 255, .8); }
.cv-selected { outline: 5px solid #2f6bff; }
.cv-handle { position: absolute; width: 34px; height: 34px; background: #fff; border: 5px solid #2f6bff; border-radius: 8px; touch-action: none; }
.cv-nw { left: -17px; top: -17px; cursor: nwse-resize; } .cv-se { right: -17px; bottom: -17px; cursor: nwse-resize; }
.cv-ne { right: -17px; top: -17px; cursor: nesw-resize; } .cv-sw { left: -17px; bottom: -17px; cursor: nesw-resize; }
.cv-n { left: calc(50% - 17px); top: -17px; cursor: ns-resize; } .cv-s { left: calc(50% - 17px); bottom: -17px; cursor: ns-resize; }
.cv-e { right: -17px; top: calc(50% - 17px); cursor: ew-resize; } .cv-w { left: -17px; top: calc(50% - 17px); cursor: ew-resize; }
.cv-panel { max-height: 80vh; overflow: auto; }
.cv-field label { margin-top: .6rem; }
.cv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: .75rem 0; }
.cv-grid input { padding: .4rem; }
.cv-mobile-note { display: none; }
@media (max-width: 900px) {
  .cv-layout { grid-template-columns: 1fr; }
  .cv-mobile-note { display: block; }
}

/* Public pages */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--hero-a), var(--hero-b)); color: var(--on-hero); text-align: center; padding: 4.5rem 0 4rem; }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; max-width: 820px; margin: 0 auto 1rem; }
.hero .lead { font-size: 1.2rem; color: var(--on-hero); opacity: .92; max-width: 680px; margin: 0 auto 1.75rem; }
.hero .btn-light { background: rgba(0,0,0,.15); color: var(--on-hero); border-color: rgba(255,255,255,.6); }
.features, .steps { margin-top: 1.5rem; }
.section-title { text-align: center; margin: 2.5rem 0 0; font-size: 1.6rem; }
.step { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); align-items: center; justify-content: center; font-weight: 700; }
.cta { text-align: center; margin-top: 2.5rem; }
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; background: var(--card); }
.help li { margin-bottom: .5rem; }
.help h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin: .5rem 0 .4rem; }

/* Themes */
.alert-card { border-color: #f3c2c2; background: var(--danger-soft); }
.motion-toggle { background: rgba(255,255,255,.14); color: var(--on-hero); border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  min-width: 36px; height: 36px; cursor: pointer; font: inherit; font-size: .8rem; }
.motion-toggle:hover { background: rgba(255,255,255,.25); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.theme-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.theme-swatch { display: flex; gap: .5rem; align-items: center; padding: .5rem; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.theme-swatch:has(input:checked) { border-color: var(--brand); }
.theme-swatch .chip { width: 34px; height: 22px; border-radius: 6px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.logo { color: var(--on-hero); }
.logo span { color: #ffd43b; }
.guest-band { margin-bottom: -1.5rem; }
.guest-band .topbar-inner { padding: 1.2rem 1rem; gap: 1rem; }
.topbar .nav a { color: var(--on-hero); }
.topbar .nav a.active, .topbar .nav a:hover { background: rgba(255,255,255,.18); color: var(--on-hero); }

/* ---------- Friendly controls ---------- */
.ui-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.color-field { display: inline-flex; }
.color-button { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .35rem .8rem .35rem .4rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--field); color: var(--text); font: inherit; cursor: pointer; }
.color-button:hover { border-color: var(--brand); }
.color-chip { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.color-name { font-weight: 600; font-size: .92rem; }
.color-popover { position: absolute; z-index: 300; width: 292px; padding: .8rem; background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 20, 35, .25); animation: pop .12s ease-out; }
@keyframes pop { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
.swatch-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: .4rem; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); cursor: pointer; padding: 0; transition: transform .1s; }
.swatch:hover, .swatch:focus-visible { transform: scale(1.12); }
.swatch-on { outline: 3px solid var(--brand); outline-offset: 2px; }
.slider { display: flex; align-items: center; gap: .75rem; }
.slider input[type=range] { flex: 1; accent-color: var(--brand); height: 28px; }
.slider-value { min-width: 4.5rem; text-align: right; font-weight: 600; font-size: .9rem; color: var(--muted); }
.choices { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--field); }
.choice { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .8rem; min-height: 40px; border: 0; border-right: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.choice:last-child { border-right: 0; }
.choice[aria-checked="true"] { background: var(--brand); color: var(--on-brand); }
.choice:hover:not([aria-checked="true"]) { background: var(--soft); }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; margin: .4rem 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--brand); outline-offset: 2px; }
.field-hint { font-size: .82rem; color: var(--muted); margin: .25rem 0 0; }
.field { margin-bottom: .9rem; }
.field > label { margin-top: 0; }
.field-group { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; }
.field-group h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.color-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .25rem 1rem; margin-top: .75rem; }
.schemes { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.scheme { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; background: none; border: 0; padding: .2rem; cursor: pointer;
  color: var(--text); font: inherit; font-size: .78rem; }
.scheme-chip { position: relative; width: 58px; height: 38px; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .1s; }
.scheme-chip span { position: absolute; right: 6px; bottom: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); }
.scheme:hover .scheme-chip, .scheme:focus-visible .scheme-chip { transform: translateY(-2px); }
.contrast-warning { color: #a61e1e; font-weight: 600; }
/* Canvas editor, friendlier */
#canvas-tools { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; padding: .75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.add-group { display: flex; flex-direction: column; gap: .3rem; }
.add-group-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.add-buttons { display: flex; gap: .35rem; flex-wrap: wrap; }
.add-tile { display: flex; flex-direction: column; align-items: center; gap: .2rem; width: 74px; padding: .45rem .25rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--field); color: var(--text); font: inherit; font-size: .74rem; cursor: pointer; transition: transform .1s, border-color .1s; }
.add-tile:hover, .add-tile:focus-visible { border-color: var(--brand); color: var(--brand-text); transform: translateY(-2px); }
.cv-panel h2 { display: flex; align-items: center; gap: .4rem; font-size: 1.1rem; margin: 0; }
.cv-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.tool-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-bottom: .9rem; }
.tool-button { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem .2rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: var(--text); font: inherit; font-size: .74rem; cursor: pointer; }
.tool-button:hover { border-color: var(--brand); color: var(--brand-text); }
.tool-danger:hover { border-color: #c92a2a; color: #c92a2a; }
.cv-field { margin-bottom: .8rem; }
.cv-field > label { margin: 0 0 .3rem; font-size: .9rem; }
.cv-exact { margin-top: .5rem; }
.cv-tip { margin-top: 1rem; padding: .75rem; border-radius: 10px; background: var(--soft); font-size: .88rem; }
.cv-tip ul { margin: .35rem 0 0; padding-left: 1.1rem; }
/* Template gallery */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin-bottom: .25rem; }
.gallery-heading { font-size: 1.05rem; margin: 1.6rem 0 .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.template-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.template-card { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .6rem .9rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
.template-card:hover, .template-card:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 20, 35, .14); }
.template-card strong { padding: 0 .25rem; }
.template-card .small { padding: 0 .25rem; }
.template-preview { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #111; margin-bottom: .3rem; }
.blank-preview { display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--brand-text); border: 2px dashed var(--line); }
/* Slide settings */
.duration-picker { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.chip-button { min-height: 40px; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.chip-button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.duration-custom { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--muted); }
.duration-custom input { width: 90px; }
.schedule-box { margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.schedule-box summary { cursor: pointer; color: var(--text); }
.schedule-box label { margin-top: 1rem; }
.day-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.day-pill { margin: 0; font-weight: 500; }
.day-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day-pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; padding: 0 .6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--field); cursor: pointer; }
.day-pill input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.day-pill input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.quick-row { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin-top: .4rem; }
.save-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.25rem -1.25rem -1.25rem; padding: .9rem 1.25rem;
  background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); z-index: 5; }
.empty-state { text-align: center; padding: 1.5rem 1rem; border: 2px dashed var(--line); border-radius: 12px; }
.nav a { display: inline-flex; align-items: center; gap: .35rem; }
/* Dashboard */
.getting-started h2 { margin: 0; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.steps-list li { display: flex; align-items: center; gap: .9rem; padding: .7rem; border-radius: 12px; background: var(--soft); }
.step-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--card); color: var(--brand-text); flex: none; }
.step-done .step-icon { background: #2f9e44; color: #fff; }
.step-done .step-body strong { text-decoration: line-through; opacity: .7; }
.step-body { flex: 1; display: flex; flex-direction: column; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.quick-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 110px; padding: 1rem;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  font-weight: 600; transition: transform .15s, box-shadow .15s; }
.quick-action .ui-icon { color: var(--brand-text); }
.quick-action:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 20, 35, .14); }
.quick-danger .ui-icon { color: #c92a2a; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.sign-card { display: flex; flex-direction: column; gap: .3rem; padding: .6rem .6rem .9rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.sign-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 20, 35, .14); }
.sign-card strong, .sign-card .small { padding: 0 .25rem; }
.preview-empty { display: flex !important; align-items: center; justify-content: center; color: #aaa; font-size: .9rem; }
h2 { display: flex; align-items: center; gap: .4rem; }
.drop-zone { text-align: center; border: 2px dashed var(--line); background: var(--card); transition: border-color .15s, background .15s; }
.drop-zone .ui-icon { color: var(--brand-text); }
.drop-hover { border-color: var(--brand); background: var(--soft); }
.new-sign label { margin-top: 0; }
.btn .ui-icon { margin-right: .1rem; }
/* Overall polish */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1 { font-size: 1.8rem; letter-spacing: -.02em; }
.card { box-shadow: 0 1px 2px rgba(15, 20, 35, .04), 0 4px 14px rgba(15, 20, 35, .05); }
.btn { transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 1px 2px rgba(15, 20, 35, .12); }
.btn:active { transform: translateY(1px); }
.btn-light { box-shadow: none; }
.slide-row { transition: box-shadow .15s; }
.slide-row:hover { box-shadow: 0 8px 22px rgba(15, 20, 35, .1); }
.slide-thumb { box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.editor .card { padding: 1.25rem 1.25rem 1.25rem; }
.preview-box { box-shadow: 0 14px 34px rgba(15, 20, 35, .22); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Background music */
.music-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .5rem 0 1rem; }
.music-mode { margin: 0; }
.music-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.music-mode span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem; text-align: center; border: 2px solid var(--line);
  border-radius: 12px; background: var(--field); cursor: pointer; font-weight: 600; }
.music-mode input:checked + span { border-color: var(--brand); background: var(--soft); color: var(--brand-text); }
.music-mode input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.loop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.loop-option { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .6rem .7rem; border: 2px solid var(--line); border-radius: 12px; background: var(--field); cursor: pointer; font-weight: normal; }
.loop-option:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.loop-option input { accent-color: var(--brand); }
.loop-body { flex: 1; display: flex; flex-direction: column; }
.play-button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); cursor: pointer; font-size: .85rem; flex: none; }
.music-panel[hidden] { display: none; }
@media (max-width: 640px) { .music-modes { grid-template-columns: 1fr; } }
/* TVs page */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.tv-card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.tv-frame { position: relative; padding: 10px 10px 16px; background: linear-gradient(180deg, #1b1f27, #0c0e12); }
.tv-frame::after { content: ''; position: absolute; left: 42%; right: 42%; bottom: 5px; height: 5px; border-radius: 3px; background: #2c323d; }
.tv-screen { margin: 0; border-radius: 4px; box-shadow: none; }
.tv-offline .tv-screen { filter: grayscale(1) brightness(.45); }
.tv-overlay { position: absolute; inset: 10px 10px 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: .9rem; text-shadow: 0 1px 4px #000; }
.tv-info { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .25rem; }
.tv-change { margin-top: .5rem; }
.tv-alert { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: .25rem .5rem; color: #fff; font-weight: 700; font-size: .78rem; text-align: center; }
.tv-alert-full { bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.tv-grid-compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
a.tv-card { transition: transform .15s, box-shadow .15s; }
a.tv-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 20, 35, .14); }
/* Slides library and picker */
.slide-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.slide-pick, .slide-card { position: relative; display: flex; flex-direction: column; gap: .3rem; margin: 0; padding: .6rem .6rem .8rem; border-radius: var(--radius);
  background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); font-weight: normal; }
.slide-pick { cursor: pointer; transition: border-color .15s, transform .15s; }
.slide-pick:hover { transform: translateY(-2px); }
.slide-pick:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.slide-pick input { position: absolute; top: 1rem; left: 1rem; z-index: 2; width: 22px; height: 22px; accent-color: var(--brand); }
.slide-pick-on { opacity: .6; cursor: default; }
.slide-card-link { display: flex; flex-direction: column; gap: .3rem; color: var(--text); text-decoration: none; }
.slide-card .tools { margin-top: .3rem; }
.shared-note { color: var(--brand-text); font-weight: 600; }
/* Date and time picker */
.datetime-field { display: flex; flex-direction: column; gap: .5rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.datetime-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.datetime-label { width: 2.6rem; font-weight: 600; font-size: .85rem; color: var(--muted); }
.datetime-row input[type=date] { width: auto; min-width: 165px; }
.time-selects { display: inline-flex; align-items: center; gap: .25rem; }
.time-selects select { width: auto; padding: .5rem .4rem; }
.datetime-field select:disabled { opacity: .5; }
.tv-address { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .5rem; }
.tv-address-box { font-size: .85rem; }
