:root {
  --bg: #f4efe6;
  --paper: rgba(255, 252, 247, 0.88);
  --paper-strong: #fffaf2;
  --ink: #1f1b16;
  --muted: #645a50;
  --line: rgba(73, 53, 34, 0.16);
  --accent: #b14d24;
  --accent-strong: #8c3212;
  --teal: #0f6660;
  --danger: #a62e2e;
  --shadow: 0 24px 60px rgba(62, 37, 13, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(177, 77, 36, 0.2), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 102, 96, 0.18), transparent 30%),
    linear-gradient(135deg, #f7f1e7 0%, #ebe2d1 42%, #efe6d8 100%);
}

body.admin-body {
  padding: 28px;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.admin-shell {
  max-width: 1440px;
  margin: 0 auto;
}

.hero-card,
.panel,
.tv-overlay-card {
  background: var(--paper);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 32px;
  margin-bottom: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--accent);
}

.hero-card h1,
.panel h2,
.tv-overlay-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.96;
  font-weight: 600;
}

.hero-copy,
.tv-overlay-card p,
.schedule-meta,
.schedule-empty,
.status-banner {
  color: var(--muted);
}

.hero-copy {
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
}

.panel {
  padding: 28px;
}

.panel-heading {
  margin-bottom: 24px;
}

.panel-heading h2 {
  font-size: clamp(1.6rem, 2vw, 2.5rem);
}

.schedule-form {
  display: grid;
  gap: 18px;
}

.schedule-form label {
  display: grid;
  gap: 8px;
}

.schedule-form span {
  font-size: 0.95rem;
  color: var(--muted);
}

.schedule-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(73, 53, 34, 0.14);
  background: var(--paper-strong);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.replace-note,
.status-banner {
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(15, 102, 96, 0.08);
  border: 1px solid rgba(15, 102, 96, 0.16);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff8f3;
}

.ghost-button {
  border: 1px solid rgba(73, 53, 34, 0.16);
  background: rgba(255, 250, 242, 0.72);
}

.danger-button {
  border: 1px solid rgba(166, 46, 46, 0.22);
  background: rgba(166, 46, 46, 0.08);
  color: var(--danger);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.schedule-list {
  display: grid;
  gap: 16px;
}

.schedule-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 246, 0.78);
}

.schedule-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.schedule-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.schedule-chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: white;
  white-space: nowrap;
}

.schedule-chip.active {
  background: var(--teal);
}

.schedule-chip.upcoming {
  background: var(--accent);
}

.schedule-chip.expired {
  background: #7c6e60;
}

.schedule-meta {
  display: grid;
  gap: 8px;
  margin: 14px 0 20px;
  line-height: 1.45;
}

.schedule-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-empty {
  padding: 32px;
  border-radius: 22px;
  border: 1px dashed rgba(73, 53, 34, 0.22);
  text-align: center;
  background: rgba(255, 251, 246, 0.58);
}

.tv-body {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(15, 102, 96, 0.18), transparent 26%),
    linear-gradient(135deg, #161411 0%, #231b14 54%, #101513 100%);
}

.tv-app {
  position: relative;
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.tv-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.tv-frame {
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #000;
}

.tv-pdf-stage {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.tv-pdf-canvas {
  display: block;
  background: #000;
}

.tv-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(9, 10, 10, 0.48);
}

.tv-overlay[hidden] {
  display: none !important;
}

.tv-overlay-card {
  max-width: 720px;
  padding: 32px;
  text-align: center;
}

.tv-overlay-card p {
  margin-top: 18px;
  font-size: 1.1rem;
  line-height: 1.6;
}

@media (max-width: 980px) {
  body.admin-body {
    padding: 18px;
  }

  .hero-card,
  .admin-grid,
  .field-row,
  .schedule-card-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-card {
    padding: 24px;
  }

  .admin-grid {
    gap: 18px;
  }

  .panel {
    padding: 22px;
  }
}
