:root {
  color-scheme: dark;
  --bg: #0a0c0e;
  --surface: #12161a;
  --surface-2: #191f24;
  --line: #2b333a;
  --text: #f5f7f8;
  --muted: #9da8b1;
  --amber: #f2ae32;
  --amber-ink: #1c1304;
  --green: #49d58a;
  --red: #ff6d64;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 86% 0%, rgba(242, 174, 50, .14), transparent 28rem),
    linear-gradient(180deg, #0e1114 0, var(--bg) 30rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar, main { width: min(1480px, calc(100% - 40px)); margin-inline: auto; }
.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 26px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 6px; color: var(--amber); font-size: .82rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 4.8rem); line-height: .94; letter-spacing: -.055em; }
.clock-card {
  min-width: 190px;
  padding: 14px 18px;
  border: 1px solid #4d3d20;
  background: rgba(242, 174, 50, .08);
  text-align: right;
}
.clock-card span, .clock-card small { display: block; color: var(--muted); }
.clock-card strong { display: block; color: var(--amber); font-size: 2rem; line-height: 1.1; }

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
  align-items: stretch;
  padding: 24px 0 30px;
}
.summary > div { margin: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); }
.summary strong { display: block; font-size: 1.55rem; }
.summary span { color: var(--muted); font-size: .9rem; }
.queue { display: grid; gap: 18px; padding-bottom: 52px; }
.status-section { margin-top: 22px; }
.section-heading { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-heading p { margin: 0; color: var(--muted); }
.published-list { display: grid; gap: 12px; }
.published-card { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); }
.published-card h3 { margin: 0; font-size: 1.3rem; }
.published-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.published-platforms span, .published-platforms a { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.published-platforms .published { color: var(--green); border-color: rgba(73,213,138,.5); background: rgba(73,213,138,.08); }
.public-note {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  margin-top: 24px; padding: 14px 18px; border: 1px solid #4d3d20;
  background: rgba(242, 174, 50, .08); color: var(--muted);
}
.public-note strong { color: var(--amber); }
.video-card {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.preview-shell { position: relative; min-height: 440px; background: #050607; }
.public-preview {
  display: grid; place-items: center;
  background: radial-gradient(circle at 70% 15%, rgba(242,174,50,.24), transparent 42%),
    linear-gradient(145deg, #161b20, #07090a 70%);
}
textarea[readonly], input:disabled { opacity: 1; color: var(--text); cursor: default; }
.preview-shell video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; background: #050607; }
.position {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--amber); color: var(--amber-ink); font-weight: 900;
}
.card-content { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.video-id { margin: 0 0 4px; color: var(--amber); font-size: .8rem; font-weight: 800; letter-spacing: .1em; }
h2 { margin: 0; font-size: clamp(1.4rem, 2.5vw, 2.25rem); letter-spacing: -.035em; }
.status-pill { padding: 7px 11px; border: 1px solid var(--line); color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.status-pill.approved { color: var(--green); border-color: rgba(73, 213, 138, .5); background: rgba(73, 213, 138, .08); }
.status-pill.rejected { color: var(--red); border-color: rgba(255, 109, 100, .55); background: rgba(255, 109, 100, .08); }
.status-pill.missing { color: var(--red); border-color: rgba(255, 109, 100, .5); }
.platforms { display: flex; flex-wrap: wrap; gap: 7px; }
.platforms span, .platforms a { padding: 6px 9px; border-radius: 999px; background: var(--surface-2); color: #c6ced4; font-size: .82rem; text-decoration: none; }
.platforms .scheduled { color: var(--green); border: 1px solid rgba(73, 213, 138, .4); background: rgba(73, 213, 138, .08); }
.platforms a.scheduled:hover { background: rgba(73, 213, 138, .16); }
.platforms .unconfirmed { color: var(--muted); border: 1px solid var(--line); }
.schedule-note { margin: -6px 0 0; color: var(--muted); font-size: .9rem; }
label > span { display: block; margin-bottom: 7px; color: #c8d0d6; font-size: .9rem; font-weight: 700; }
textarea, input {
  width: 100%; border: 1px solid #3a454e; border-radius: 0;
  background: #0d1114; color: var(--text); padding: 11px 12px; outline: none;
}
textarea { min-height: 128px; resize: vertical; }
textarea:focus, input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242, 174, 50, .12); }
.schedule-row { display: grid; grid-template-columns: 1fr 150px; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.actions button { min-height: 45px; border: 1px solid var(--line); padding: 10px 15px; font-weight: 800; }
.save-button { background: var(--surface-2); color: var(--text); }
.approve-button { background: var(--amber); color: var(--amber-ink); border-color: var(--amber) !important; }
.approve-button.is-approved { background: transparent; color: var(--green); border-color: rgba(73, 213, 138, .55) !important; }
.reject-button { background: transparent; color: var(--red); border-color: rgba(255, 109, 100, .55) !important; }
.reject-button.is-rejected { background: rgba(255, 109, 100, .1); color: #ffaaa5; }
.actions button:disabled { opacity: .45; cursor: not-allowed; }
.save-state { min-height: 1.4em; margin: -8px 0 0; color: var(--muted); font-size: .86rem; }

@media (max-width: 820px) {
  .topbar { align-items: start; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .published-card { grid-template-columns: 1fr; }
  .video-card { grid-template-columns: 1fr; }
  .preview-shell { min-height: min(128vw, 560px); }
}

@media (max-width: 560px) {
  .topbar, main { width: min(100% - 24px, 1480px); }
  .topbar { padding-top: 24px; flex-direction: column; }
  .clock-card { width: 100%; text-align: left; }
  .summary { grid-template-columns: 1fr; }
  .card-content { padding: 18px; }
  .card-heading { flex-direction: column; }
  .schedule-row { grid-template-columns: 1fr 1fr; }
  .actions button { width: 100%; }
}
