/* Aganox Screens — board styles on a fixed 1920×1080 stage.
   Sized for reading from across a room: big type, high contrast. */

.screen-root { position: relative; overflow: hidden; width: 100%; height: 100%; }

.stage {
  --bg: #0b1020; --bg2: #121a33; --panel: rgba(255,255,255,.055); --panel-line: rgba(255,255,255,.08);
  --text: #f4f6fb; --muted: rgba(244,246,251,.62); --accent: #5b8cff; --accent2: #33d6a6;
  --good: #33d6a6; --bad: #ff6b6b; --track: rgba(255,255,255,.09);
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0;
  display: grid; grid-template-rows: 112px 1fr; gap: 0; padding: 40px 56px 48px; box-sizing: border-box;
  color: var(--text); background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}
.stage *, .stage *::before, .stage *::after { box-sizing: border-box; }
.stage.no-header { grid-template-rows: 1fr; }
.stage.has-ticker { padding-bottom: 120px; }

/* Themes ------------------------------------------------------------------ */
.theme-midnight { --bg: #0b1020; --accent: #5b8cff; --accent2: #33d6a6; }
.theme-aurora   { --bg: #070b1a; --accent: #7aa2ff; --accent2: #3ee6b5; }
.theme-ember    { --bg: #170d0a; --bg2: #2a140c; --accent: #ff8a3d; --accent2: #ffd166; --panel: rgba(255,200,160,.06); }
.theme-daylight { --bg: #f4f6fa; --bg2: #e8edf6; --panel: #ffffff; --panel-line: rgba(15,23,42,.08); --text: #0f172a;
  --muted: rgba(15,23,42,.58); --accent: #2f6bff; --accent2: #0fa87a; --track: rgba(15,23,42,.08); --good: #0fa87a; --bad: #e5484d; }

/* Animated background (motion) -------------------------------------------- */
.bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(1200px 700px at 85% -10%, var(--bg2), transparent 60%), var(--bg); }
.bg span { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0; }
.theme-aurora .bg span, .theme-ember .bg span { opacity: .55; animation: drift 26s ease-in-out infinite alternate; }
.bg span:nth-child(1) { width: 900px; height: 900px; left: -200px; top: -300px; background: var(--accent); }
.bg span:nth-child(2) { width: 800px; height: 800px; right: -250px; bottom: -350px; background: var(--accent2); animation-delay: -8s !important; animation-duration: 32s !important; }
.bg span:nth-child(3) { width: 600px; height: 600px; left: 45%; top: 30%; background: #a46bff; animation-delay: -16s !important; }
.theme-ember .bg span:nth-child(3) { background: #ff4d6d; }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(180px,120px) scale(1.15); } 100% { transform: translate(-120px,200px) scale(.9); } }

.board-header, .slots, .ticker { position: relative; z-index: 1; }

/* Header ------------------------------------------------------------------ */
.board-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 28px; }
.board-title { font-size: 52px; font-weight: 700; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1400px; }
.board-clock { font-size: 52px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Layouts ----------------------------------------------------------------- */
.slots { display: grid; gap: 32px; min-height: 0; }
.layout-full .slots { grid-template: 1fr / 1fr; }
.layout-split .slots { grid-template: 1fr / 1fr 1fr; }
.layout-main-side .slots { grid-template: 1fr 1fr / 1.75fr 1fr; }
.layout-main-side .slot-0 { grid-row: 1 / 3; }
.layout-grid4 .slots { grid-template: 1fr 1fr / 1fr 1fr; }
.slot { min-width: 0; min-height: 0; position: relative; }

/* Block shell ------------------------------------------------------------- */
.blk { position: relative; height: 100%; border-radius: 28px; padding: 40px 44px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; animation: blk-in .6s ease both; }
.theme-daylight .blk { box-shadow: 0 10px 40px rgba(15,23,42,.06); }
@keyframes blk-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.blk-title { font-size: 34px; font-weight: 600; color: var(--muted); margin-bottom: 24px; letter-spacing: .2px; }
.blk-empty { margin: auto; font-size: 34px; color: var(--muted); text-align: center; max-width: 80%; }
.blk-status { margin-top: auto; padding-top: 16px; font-size: 20px; color: var(--muted); opacity: .8; }
.blk-status.has-error { color: var(--bad); opacity: 1; }
.blk-empty-slot { border-style: dashed; background: transparent; }

/* Countdown --------------------------------------------------------------- */
.blk-countdown { justify-content: center; text-align: center; }
.blk-countdown .blk-title { font-size: 44px; color: var(--text); font-weight: 700; }
.cd-body { display: flex; justify-content: center; gap: 28px; margin: 12px 0 28px; }
.cd-unit { min-width: 200px; padding: 26px 18px 20px; border-radius: 24px; background: var(--track); display: flex; flex-direction: column; align-items: center; }
.cd-num { font-size: 140px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -3px;
  background: linear-gradient(180deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-lbl { margin-top: 10px; font-size: 26px; text-transform: uppercase; letter-spacing: 3px; color: var(--muted); }
.cd-sub { font-size: 28px; color: var(--muted); }
.cd-done { font-size: 110px; font-weight: 800; color: var(--accent2); animation: pop 1s ease both; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
/* Smaller slots get smaller digits */
.layout-split .cd-num, .layout-grid4 .cd-num, .layout-main-side .slot-1 .cd-num, .layout-main-side .slot-2 .cd-num { font-size: 84px; }
.layout-split .cd-unit, .layout-grid4 .cd-unit, .layout-main-side .slot-1 .cd-unit, .layout-main-side .slot-2 .cd-unit { min-width: 120px; padding: 18px 10px 14px; }
.layout-grid4 .cd-num, .layout-main-side .slot-1 .cd-num, .layout-main-side .slot-2 .cd-num { font-size: 64px; }
.layout-grid4 .cd-body, .layout-main-side .slot-1 .cd-body, .layout-main-side .slot-2 .cd-body { gap: 14px; margin: 4px 0 14px; }
.layout-grid4 .cd-lbl, .layout-main-side .slot-1 .cd-lbl, .layout-main-side .slot-2 .cd-lbl { font-size: 18px; letter-spacing: 2px; }
.layout-grid4 .cd-done, .layout-main-side .slot-1 .cd-done, .layout-main-side .slot-2 .cd-done { font-size: 64px; }
.layout-grid4 .blk-countdown .blk-title, .layout-main-side .slot-1 .blk-countdown .blk-title, .layout-main-side .slot-2 .blk-countdown .blk-title { font-size: 34px; margin-bottom: 8px; }
.layout-grid4 .cd-sub, .layout-main-side .slot-1 .cd-sub, .layout-main-side .slot-2 .cd-sub { font-size: 22px; }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 14px; height: 22px; border-radius: 3px; background: hsl(var(--h), 90%, 60%); animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(1200px) rotate(720deg); opacity: .2; } }

/* Calendar ---------------------------------------------------------------- */
.cal-agenda { display: flex; flex-direction: column; gap: 10px; overflow: hidden; min-height: 0; flex: 1; }
.cal-day { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-top: 10px; }
.cal-day:first-child { margin-top: 0; }
.cal-ev { display: flex; align-items: center; gap: 28px; padding: 18px 22px; border-radius: 18px; background: var(--track); }
.cal-ev.is-live { background: color-mix(in srgb, var(--accent) 28%, transparent); outline: 2px solid var(--accent); }
.cal-time { width: 150px; flex: none; white-space: nowrap; font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.cal-what { min-width: 0; flex: 1; }
.cal-name { font-size: 34px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-loc { font-size: 22px; color: var(--muted); margin-top: 2px; }
.cal-badge { font-size: 22px; font-weight: 700; padding: 6px 16px; border-radius: 999px; background: var(--accent); color: #fff; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.layout-grid4 .cal-name, .layout-main-side .slot-1 .cal-name, .layout-main-side .slot-2 .cal-name { font-size: 26px; }
.layout-grid4 .cal-time, .layout-main-side .slot-1 .cal-time, .layout-main-side .slot-2 .cal-time { font-size: 22px; width: 120px; }
.layout-grid4 .cal-ev, .layout-main-side .slot-1 .cal-ev, .layout-main-side .slot-2 .cal-ev { padding: 10px 16px; gap: 16px; }
.layout-grid4 .cal-day, .layout-main-side .slot-1 .cal-day, .layout-main-side .slot-2 .cal-day { font-size: 18px; margin-top: 4px; }

.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; flex: 1; min-height: 0; }
.cal-col { background: var(--track); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.cal-col.is-today { outline: 2px solid var(--accent); }
.cal-col-h { font-size: 26px; font-weight: 700; color: var(--muted); }
.cal-col.is-today .cal-col-h { color: var(--accent); }
.cal-chip { font-size: 22px; line-height: 1.25; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.cal-chip b { display: block; font-size: 18px; color: var(--muted); font-weight: 600; }
.cal-none { color: var(--muted); font-size: 24px; }

.cal-nn { display: grid; grid-template-rows: 1.6fr 1fr; gap: 24px; flex: 1; min-height: 0; }
.cal-nn-now { border-radius: 24px; padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; }
.cal-nn-now.free { background: color-mix(in srgb, var(--good) 22%, transparent); }
.cal-nn-now.busy { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.cal-nn-lbl { font-size: 26px; text-transform: uppercase; letter-spacing: 3px; color: var(--muted); font-weight: 700; }
.cal-nn-title { font-size: 72px; font-weight: 800; margin: 8px 0; line-height: 1.05; }
.cal-nn-time { font-size: 34px; color: var(--muted); }
.cal-nn-next { border-radius: 24px; padding: 28px 40px; background: var(--track); display: flex; flex-direction: column; justify-content: center; }
.cal-nn-ntitle { font-size: 40px; font-weight: 700; margin-top: 6px; }
.cal-nn-ntime { font-size: 28px; color: var(--muted); }

/* Live report ------------------------------------------------------------- */
.kpis { display: grid; gap: 24px; flex: 1; min-height: 0; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; overflow: hidden; }
.kpis.n1 { grid-template-columns: 1fr; }
.kpis.n3 { grid-template-columns: repeat(3, 1fr); }
.layout-full .kpis.n4 { grid-template-columns: repeat(4, 1fr); }
.kpis.n5, .kpis.n6 { grid-template-columns: repeat(3, 1fr); }
.kpi { border-radius: 22px; padding: 28px 32px; background: var(--track); display: flex; flex-direction: column; justify-content: center; min-width: 0; border-left: 8px solid var(--accent); }
.kpi.good { border-left-color: var(--good); }
.kpi.behind { border-left-color: var(--bad); }
.kpi-lbl { font-size: 28px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-num { font-size: 96px; font-weight: 800; letter-spacing: -2px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi-row { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.kpi-target { font-size: 30px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.layout-grid4 .kpi-num, .layout-main-side .slot-1 .kpi-num, .layout-main-side .slot-2 .kpi-num, .layout-split .kpi-num { font-size: 64px; }
.layout-grid4 .kpis, .layout-main-side .slot-1 .kpis, .layout-main-side .slot-2 .kpis { gap: 14px; }
.layout-grid4 .kpi, .layout-main-side .slot-1 .kpi, .layout-main-side .slot-2 .kpi { padding: 10px 22px; border-left-width: 6px; }
.layout-grid4 .kpi-num, .layout-main-side .slot-1 .kpi-num, .layout-main-side .slot-2 .kpi-num { font-size: 50px; letter-spacing: -1px; }
.layout-grid4 .kpi-lbl, .layout-main-side .slot-1 .kpi-lbl, .layout-main-side .slot-2 .kpi-lbl { font-size: 22px; }
.layout-grid4 .kpi-target, .layout-main-side .slot-1 .kpi-target, .layout-main-side .slot-2 .kpi-target { font-size: 22px; }
.layout-grid4 .blk-title, .layout-main-side .slot-1 .blk-title, .layout-main-side .slot-2 .blk-title { font-size: 30px; margin-bottom: 16px; }
.layout-grid4 .blk, .layout-main-side .slot-1 .blk, .layout-main-side .slot-2 .blk { padding: 30px 36px; }
.layout-grid4 .blk-video, .layout-main-side .slot-1 .blk-video, .layout-main-side .slot-2 .blk-video { padding: 0; }

.bars { display: flex; flex-direction: column; gap: 18px; flex: 1; justify-content: center; }
.bar-row { display: grid; grid-template-columns: 260px 1fr 180px; align-items: center; gap: 24px; }
.bars.is-leaderboard .bar-row { grid-template-columns: 70px 240px 1fr 180px; }
.bar-rank { font-size: 40px; text-align: center; font-weight: 800; color: var(--muted); }
.bar-lbl { font-size: 34px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 44px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.bars.is-leaderboard .bar-row:first-child .bar-fill { box-shadow: 0 0 30px color-mix(in srgb, var(--accent2) 60%, transparent); }
.bar-val { font-size: 38px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.layout-grid4 .bar-row, .layout-main-side .slot-1 .bar-row, .layout-main-side .slot-2 .bar-row, .layout-split .bar-row { grid-template-columns: 150px 1fr 110px; gap: 14px; }
.layout-grid4 .bars.is-leaderboard .bar-row, .layout-main-side .slot-1 .bars.is-leaderboard .bar-row, .layout-main-side .slot-2 .bars.is-leaderboard .bar-row, .layout-split .bars.is-leaderboard .bar-row { grid-template-columns: 44px 140px 1fr 110px; }
.layout-grid4 .bar-lbl, .layout-main-side .slot-1 .bar-lbl, .layout-main-side .slot-2 .bar-lbl, .layout-split .bar-lbl, .layout-grid4 .bar-val, .layout-main-side .slot-1 .bar-val, .layout-main-side .slot-2 .bar-val, .layout-split .bar-val { font-size: 26px; }
.layout-grid4 .bar-track, .layout-main-side .slot-1 .bar-track, .layout-main-side .slot-2 .bar-track, .layout-split .bar-track { height: 28px; }
.layout-grid4 .bar-rank, .layout-main-side .slot-1 .bar-rank, .layout-main-side .slot-2 .bar-rank, .layout-split .bar-rank { font-size: 28px; }
.layout-grid4 .bars, .layout-main-side .slot-1 .bars, .layout-main-side .slot-2 .bars { gap: 10px; }

.goal { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.goal-ring { height: 100%; max-height: 640px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--track); stroke-width: 34; }
.ring-fg { fill: none; stroke: var(--accent2); stroke-width: 34; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.goal-center { position: absolute; text-align: center; }
.goal-num { font-size: 110px; font-weight: 800; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.goal-of { font-size: 30px; color: var(--muted); }
.layout-grid4 .goal, .layout-main-side .slot-1 .goal, .layout-main-side .slot-2 .goal { gap: 36px; justify-content: flex-start; }
.layout-grid4 .goal-ring, .layout-main-side .slot-1 .goal-ring, .layout-main-side .slot-2 .goal-ring { max-height: 220px; flex: none; }
.layout-grid4 .goal-center, .layout-main-side .slot-1 .goal-center, .layout-main-side .slot-2 .goal-center { position: static; text-align: left; }
.layout-grid4 .goal-num, .layout-main-side .slot-1 .goal-num, .layout-main-side .slot-2 .goal-num { font-size: 76px; }
.layout-grid4 .goal-of, .layout-main-side .slot-1 .goal-of, .layout-main-side .slot-2 .goal-of { font-size: 26px; }

.rep-table { width: 100%; border-collapse: collapse; font-size: 30px; }
.rep-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 24px; padding: 10px 14px; border-bottom: 2px solid var(--panel-line); }
.rep-table td { padding: 14px; border-bottom: 1px solid var(--panel-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
.rep-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Video ------------------------------------------------------------------- */
.blk-video { padding: 0; background: #000; }
.vid { width: 100%; height: 100%; display: block; border: 0; }
.vid.fit-cover { object-fit: cover; }
.vid.fit-contain { object-fit: contain; }
.blk-video .blk-empty { color: rgba(255,255,255,.6); }
.vid-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 44px 36px; font-size: 44px; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); }

/* Message & clock --------------------------------------------------------- */
.blk-text { justify-content: center; }
.blk-text.align-center { text-align: center; align-items: center; }
.txt-clock { font-size: 200px; font-weight: 800; letter-spacing: -6px; line-height: 1; font-variant-numeric: tabular-nums; }
.txt-date { font-size: 40px; color: var(--muted); margin-top: 12px; }
.txt-head { font-size: 72px; font-weight: 800; line-height: 1.1; margin-top: 36px; letter-spacing: -1px; }
.txt-clock + .txt-date + .txt-head { margin-top: 48px; }
.txt-head:first-child { margin-top: 0; }
.txt-body { font-size: 36px; color: var(--muted); margin-top: 18px; line-height: 1.35; }
.layout-grid4 .txt-clock, .layout-main-side .slot-1 .txt-clock, .layout-main-side .slot-2 .txt-clock, .layout-split .txt-clock { font-size: 120px; letter-spacing: -3px; }
.layout-grid4 .txt-head, .layout-main-side .slot-1 .txt-head, .layout-main-side .slot-2 .txt-head { font-size: 44px; margin-top: 20px; }
.layout-grid4 .txt-date, .layout-main-side .slot-1 .txt-date, .layout-main-side .slot-2 .txt-date { font-size: 28px; }
.layout-grid4 .txt-body, .layout-main-side .slot-1 .txt-body, .layout-main-side .slot-2 .txt-body { font-size: 26px; }

/* Ticker ------------------------------------------------------------------ */
.ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; display: flex; align-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 85%, #000); color: #fff; z-index: 2; }
.ticker-track { display: flex; white-space: nowrap; animation: ticker 40s linear infinite; }
.ticker-track span { font-size: 38px; font-weight: 600; padding-right: 200px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .bg span, .ticker-track, .cal-badge { animation: none !important; }
}
