/* Operator console: event library + control room.
   One immersive stage: a colour field tinted by the active event's own brand
   colour (--event) with frosted panels on top. The LED monitor is the hero.
   Status colours keep fixed meanings: red = on air, white = needs action,
   green = cleared. */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");
.console {
  --event: #d71920;
  --field: #4a2a92;
  --glass: rgba(255, 255, 255, 0.11);
  --glass-2: rgba(255, 255, 255, 0.18);
  --line: rgba(255, 255, 255, 0.16);
  --ink: #ffffff;
  --dim: rgba(255, 255, 255, 0.72);
  --dark: #1c1538;
  --tally: #ff4b3e;
  --go: #6ff0b0;
  margin: 0;
  min-height: 100vh;
  padding: clamp(0px, 2.2vw, 28px);
  background: #262043;
  color: var(--ink);
  font: 400 16px/1.5 "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.console *:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.stage {
  position: relative;
  width: min(1480px, 100%);
  min-height: calc(100vh - 2 * clamp(0px, 2.2vw, 28px));
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 2rem);
  border-radius: clamp(0px, 2.2vw, 28px);
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 8% 12%, color-mix(in srgb, var(--event) 82%, transparent) 0, transparent 70%),
    radial-gradient(50% 50% at 96% 4%, rgba(64, 132, 230, 0.85) 0, transparent 70%),
    radial-gradient(70% 60% at 60% 105%, rgba(190, 96, 255, 0.75) 0, transparent 70%),
    var(--field);
  box-shadow: 0 30px 80px rgba(10, 6, 30, 0.55);
}
.console h1, .console h2, .console h3 { margin: 0; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.console h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem); }
.console h2 { font-size: 1.25rem; }
.console p { margin: 0; }
.console .dim, .console .note, .console .meta { color: var(--dim); font-size: 0.875rem; }

/* top row: mark, icon navigation, actions */
.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: clamp(1rem, 2.5vw, 2rem); }
.mark { display: inline-flex; align-items: center; gap: 0.625rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.125rem; justify-self: start; }
.mark svg { width: 34px; height: 34px; }
.dock { display: flex; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.dock a, .dock button { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: #fff; cursor: pointer; backdrop-filter: blur(14px); }
.dock a:hover, .dock button:hover { background: var(--glass-2); }
.dock [aria-current="page"] { background: #fff; color: var(--dark); border-color: #fff; }
.dock svg { width: 22px; height: 22px; }
.bar-actions { justify-self: end; display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 0.5rem; }

/* buttons */
.console .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0 1.25rem; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: #fff; font: 500 0.9375rem/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; backdrop-filter: blur(14px); }
.console .btn:hover { background: var(--glass-2); }
.console .btn.primary, .console .btn:not(.secondary):not(.danger):not(.ok):not(.ghost) { background: #fff; border-color: #fff; color: var(--dark); font-weight: 600; }
.console .btn.primary:hover { background: #f1ecff; }
.console .btn.ok { background: var(--go); border-color: var(--go); color: #06301b; font-weight: 600; }
.console .btn.danger { background: rgba(255, 75, 62, 0.16); border-color: rgba(255, 120, 110, 0.5); color: #ffd3cf; }
.console .btn.danger:hover { background: rgba(255, 75, 62, 0.3); }
.console .btn.mini, .console .btn.small { min-height: 36px; padding: 0 0.875rem; font-size: 0.8125rem; border-radius: 11px; }
.console .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.console .btn[aria-pressed="true"] { background: #fff; color: var(--dark); border-color: #fff; }
.icon-btn, .console .icon-trash { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--dim); cursor: pointer; }
.icon-btn:hover, .console .icon-trash:hover { color: #fff; background: rgba(255, 75, 62, 0.35); }
.icon-btn svg, .console .icon-trash svg { width: 20px; height: 20px; }
.console .icon-trash { width: 34px; height: 34px; border-radius: 10px; }
.console .button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* frosted panel + tiles */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(22px); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.625rem; }
.tile { padding: 0.875rem 0.75rem; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); text-align: center; backdrop-filter: blur(14px); min-width: 0; }
.tile span { display: block; font-size: 0.8125rem; color: var(--dim); }
.tile b { display: block; font-size: 1.625rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.tile.hot { background: var(--tally); border-color: transparent; }
.tile.hot span { color: #fff; }
.tile.lit { background: #fff; border-color: #fff; color: var(--dark); }
.tile.lit span { color: #5d5680; }
.tile.wide b { font-size: 1.125rem; }

/* event library */
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head p { color: var(--dim); max-width: 36rem; margin-top: 0.5rem; }
.rundown { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.cue { display: grid; border-radius: 22px; overflow: hidden; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(22px); }
.cue.is-air { background: #fff; color: var(--dark); border-color: #fff; }
.cue-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: rgba(0, 0, 0, 0.3); }
.cue-body { padding: 1.125rem 1.25rem 1.25rem; display: grid; gap: 0.875rem; }
.cue h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.cue-state { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--dim); }
.cue.is-air .cue-state, .cue.is-air .cue-facts dt { color: #5d5680; }
.lamp { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); flex: none; }
.lamp.air { background: var(--tally); box-shadow: 0 0 0 4px rgba(255, 75, 62, 0.25); }
.cue-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin: 0; }
.cue-facts div { padding: 0.625rem 0.75rem; border-radius: 12px; background: rgba(255, 255, 255, 0.1); }
.cue.is-air .cue-facts div { background: #f0ecfb; }
.cue-facts dt { font-size: 0.75rem; color: var(--dim); }
.cue-facts dd { margin: 0; font-weight: 600; }
.cue-actions { display: flex; gap: 0.5rem; align-items: center; }
.cue-actions .btn { flex: 1; }

.cue.is-air .icon-btn { color: #5d5680; }
.empty { padding: 2.5rem; max-width: 34rem; }
.empty h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.empty p { color: var(--dim); margin-bottom: 1.25rem; }
#eventsError, #loginError { color: #ffd3cf; min-height: 1.5rem; }
.gate { max-width: 23rem; margin: 10vh auto; padding: 2rem; display: grid; gap: 1rem; }
.gate h1 { font-size: 2.25rem; }

/* event form + live proof */
.compose-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.sheet { display: grid; gap: 1.25rem; }
.sheet fieldset { border: 1px solid var(--line); border-radius: 22px; background: var(--glass); backdrop-filter: blur(22px); padding: 1.25rem; margin: 0; display: grid; gap: 1rem; min-width: 0; }
.sheet legend { float: left; width: 100%; padding: 0; font-size: 1.125rem; font-weight: 600; }
.sheet legend + * { clear: both; }
.sheet .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sheet label { display: grid; gap: 0.375rem; font-size: 0.875rem; color: var(--dim); }
.sheet input:not([type="color"]):not([type="file"]), .sheet select, .gate input { width: 100%; min-height: 46px; padding: 0 0.875rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(20, 12, 50, 0.35); color: #fff; font: 400 1rem/1.2 inherit; font-family: inherit; }
.sheet input::placeholder { color: rgba(255, 255, 255, 0.45); }
.sheet select option { color: #111; }
.sheet input[type="file"] { width: 100%; padding: 0.75rem; border: 1px dashed rgba(255, 255, 255, 0.4); border-radius: 12px; background: rgba(20, 12, 50, 0.25); color: var(--dim); font: 400 0.875rem inherit; font-family: inherit; }
.sheet input[type="file"]::file-selector-button { margin-right: 0.75rem; min-height: 34px; padding: 0 0.875rem; border-radius: 10px; border: 0; background: #fff; color: var(--dark); font: 600 0.8125rem inherit; font-family: inherit; cursor: pointer; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.swatches input[type="color"] { width: 100%; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: none; cursor: pointer; }
.swatches input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
.swatches input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
[data-palette-note] { color: #fff; font-size: 0.875rem; }
[data-palette-note]:empty { display: none; }
.sheet-submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.proof { position: sticky; top: 1rem; display: grid; gap: 1.25rem; padding: 1.25rem; }
.proof h3 { font-size: 0.9375rem; font-weight: 500; color: var(--dim); margin-bottom: 0.5rem; }
.proof-led { position: relative; aspect-ratio: 16/9; background: rgba(12, 8, 30, 0.6) center/cover no-repeat; border-radius: 12px; container-type: inline-size; overflow: hidden; }
.proof-led::before { content: "Pilih main reference untuk melihat tampilan LED"; position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center; color: var(--dim); font-size: 0.8125rem; }
.proof-led.has-art::before { content: none; }
.proof-qr { position: absolute; left: 80.4%; top: 5.2%; width: 16.4%; background: #fff; border: 0.25cqw solid var(--p, #d71920); border-radius: 1.2cqw; padding: 1cqw; text-align: center; color: var(--s, #17120a); font: 900 1.3cqw/1 system-ui; }
.proof-qr b { display: block; aspect-ratio: 1; margin-top: 0.6cqw; background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 0/22% 22%; }
.proof-qr span { color: var(--p, #d71920); }
.proof-row { display: flex; gap: 1.25rem; align-items: start; }
.proof-row .dim { flex: 1; }
.proof-phone { flex: none; width: 180px; aspect-ratio: 9/17; border: 5px solid #140d2e; border-radius: 26px; padding: 18px 14px; background: var(--b, #ffd500); display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.proof-phone img { max-width: 70px; max-height: 34px; object-fit: contain; object-position: left; }
.proof-phone strong { font: 900 19px/0.95 system-ui; color: var(--p, #d71920); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.proof-phone p { font: 400 10px/1.35 system-ui; color: var(--t, #332811); }
.proof-phone em { margin-top: auto; padding: 9px; border-radius: 9px; background: var(--p, #d71920); color: #fff; font: 800 10px/1 system-ui; text-align: center; font-style: normal; }

/* control room */
.program { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(300px, 1fr); gap: clamp(1.25rem, 2.5vw, 2.25rem); align-items: center; margin-bottom: 1.5rem; }
.monitor { border-radius: 22px; overflow: hidden; background: #0d0920; box-shadow: 0 24px 60px rgba(14, 6, 40, 0.55); border: 1px solid var(--line); }
.console .live-preview-frame { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 0; background: #000; }
.monitor-strip { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; min-height: 60px; flex-wrap: wrap; background: rgba(255, 255, 255, 0.06); }
.monitor-strip strong { font-size: 1.0625rem; font-weight: 600; }
.strip-tools { margin-left: auto; display: flex; gap: 0.5rem; }
.brief { display: grid; gap: 1.125rem; align-content: center; }
.brief h1 { overflow-wrap: anywhere; text-wrap: balance; }
.brief-date { color: var(--dim); margin-top: 0.5rem; }
.upnext { padding: 1.125rem 1.25rem; display: grid; gap: 0.625rem; }
.upnext-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.console .air-queue { display: grid; gap: 0.5rem; margin: 0; }
.console .air-queue > b { display: none; }
.console .air-item { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.1); }
.console .pill { display: inline-block; padding: 0.25rem 0.625rem; border-radius: 8px; background: rgba(255, 255, 255, 0.16); color: #fff; font: 500 0.8125rem/1.3 inherit; font-family: inherit; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.console .pill.is-live, .console .eyebrow.is-live { background: var(--tally); color: #fff; border-radius: 8px; padding: 0.25rem 0.625rem; font-weight: 600; }
.console .pill.s-review, .console .pill.s-waiting_to_air, .console .pill.s-queued, .console .pill.s-processing { background: #fff; color: var(--dark); font-weight: 600; }
.console .pill.s-approved, .console .pill.s-aired { background: rgba(111, 240, 176, 0.18); color: var(--go); }
.console .pill.s-rejected, .console .pill.s-failed { background: rgba(255, 75, 62, 0.2); color: #ffd3cf; }
.console .eyebrow { color: var(--dim); font: 500 0.875rem inherit; font-family: inherit; letter-spacing: 0; text-transform: none; display: inline-block; margin-bottom: 0.5rem; }

.editor { margin-bottom: 1.5rem; }
.editor > summary { cursor: pointer; padding: 1.125rem 1.25rem; font-size: 1.125rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.editor > summary::-webkit-details-marker { display: none; }
.editor > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
.editor[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.editor > summary span { color: var(--dim); font-size: 0.9375rem; font-weight: 400; }
.editor-body { padding: 0 1.25rem 1.5rem; }
.editor .proof { background: rgba(20, 12, 50, 0.25); }

.desk { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.desk-list, .desk-detail { padding: 1.25rem; }
.desk-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.875rem; flex-wrap: wrap; }
.console .queue { display: grid; gap: 0.5rem; max-height: 70vh; overflow: auto; }
.console .queue-item { border: 1px solid transparent; border-radius: 14px; padding: 0.75rem 0.875rem; background: rgba(255, 255, 255, 0.09); cursor: pointer; }
.console .queue-item:hover { background: rgba(255, 255, 255, 0.16); }
.console .queue-item.active { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.55); }
.console .detail-empty { min-height: 320px; display: grid; place-items: center; color: var(--dim); text-align: center; }
.console .identity-audit { display: grid; grid-template-columns: minmax(160px, 0.4fr) minmax(0, 1.6fr); gap: 1rem; margin: 1rem 0; }
.console .audit-card { padding: 0; border: 0; border-radius: 0; background: none; min-width: 0; max-width: none; }
.console .audit-label { margin: 0 0 0.375rem; color: var(--dim); font: 500 0.875rem inherit; font-family: inherit; letter-spacing: 0; }
.console .audit-image { border-radius: 14px; background: rgba(12, 8, 30, 0.6); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; border-radius: 14px; }
.zoom::after { content: "Perbesar"; position: absolute; right: 10px; bottom: 10px; padding: 0.3rem 0.625rem; border-radius: 8px; background: rgba(20, 12, 50, 0.8); color: #fff; font-size: 0.75rem; }
.console .audit-note { color: var(--dim); font-size: 0.8125rem; margin-top: 0.375rem; }
.console .identity-warning, .console .delivery-warning { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 0.875rem; }
.console .delivery-success { color: var(--go); font-weight: 600; margin-bottom: 0.75rem; }

/* dialogs */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; color: #fff; }
.lightbox::backdrop { background: rgba(14, 8, 36, 0.9); backdrop-filter: blur(6px); }
.lightbox figure { margin: 0; background: #140d2e; padding: 12px; border-radius: 22px; border: 1px solid var(--line); }
.lightbox img { display: block; max-width: calc(96vw - 24px); max-height: calc(96vh - 96px); object-fit: contain; border-radius: 12px; }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 0.75rem; font-weight: 600; font-size: 1.0625rem; }
.qr-sheet { position: fixed; inset: 0; z-index: 40; background: rgba(14, 8, 36, 0.94); display: grid; place-items: center; text-align: center; cursor: pointer; }
.qr-sheet img { width: min(70vw, 70vh, 560px); height: auto; background: #fff; padding: 14px; border-radius: 22px; }
.qr-sheet h2 { margin-top: 1rem; font-size: 1.75rem; }
.console .event-loading { position: fixed; inset: 0; z-index: 100; background: rgba(28, 18, 66, 0.92); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 1.5rem; text-align: center; }
.console .event-loading.hidden { display: none; }
.console .event-loading h2 { font-size: 1.75rem; margin: 1.25rem 0 0.5rem; }
.console .event-loading p { color: var(--dim); max-width: 26rem; }
.console .event-spinner { width: 46px; height: 46px; margin: auto; border: 4px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .console .event-spinner { animation-duration: 3s; } .editor > summary::after { transition: none; } }

@media (max-width: 1080px) {
  .program, .desk, .compose-grid { grid-template-columns: 1fr; }
  .proof { position: static; }
}
@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar-actions { grid-column: 1 / -1; justify-self: start; justify-content: start; }
  .sheet .pair { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .console .identity-audit { grid-template-columns: 1fr; }
  .proof-row { flex-direction: column; }
  .mark span { display: none; }
}

.console .cue.is-air .cue-actions .btn.primary.primary { background: var(--dark); border-color: var(--dark); color: #fff; }

/* Mode switches (Auto review, Putar ulang): red while on, plain while off. */
.console .btn.toggle[aria-pressed="true"],
.console .btn.toggle[aria-pressed="true"]:hover {
  background: var(--tally);
  border-color: var(--tally);
  color: #fff;
  font-weight: 600;
}
.console .btn.toggle[aria-pressed="true"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Participant list tools: search and filter keep long events manageable. */
.list-tools { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-bottom: 0.75rem; }
.list-tools input, .list-tools select, #outputScreen { min-height: 40px; padding: 0 0.75rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(20, 12, 50, 0.35); color: #fff; font: 400 0.875rem inherit; font-family: inherit; }
.list-tools input::placeholder { color: rgba(255, 255, 255, 0.5); }
.list-tools select option, #outputScreen option { color: #111; }
.console .queue { max-height: 62vh; }
.more-btn { width: 100%; margin-top: 0.625rem; }
.list-count { color: var(--dim); font-size: 0.8125rem; margin: 0.5rem 0 0; text-align: center; }
.queue-more { color: var(--dim); font-size: 0.875rem; padding: 0.25rem 0.875rem; }
.console .pill.no-air { background: rgba(255, 255, 255, 0.08); color: var(--dim); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
