:root {
  --navy-950: #0c2f6b;
  --navy-900: #113a80;
  --navy-800: #1650a8;
  --navy-700: #1c60c4;
  --navy-600: #236de3;

  --orange-500: #f5a623;
  --orange-400: #f7b84a;
  --orange-600: #e08e0a;
  --orange-glow: rgba(245, 166, 35, 0.35);

  --white: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --ink-muted: rgba(255, 255, 255, 0.52);
  --ink-faint: rgba(255, 255, 255, 0.28);

  --surface-glass: rgba(17, 58, 128, 0.6);
  --surface-glass-strong: rgba(12, 47, 107, 0.85);
  --surface-card: rgba(17, 58, 128, 0.55);
  --surface-card-hover: rgba(35, 109, 227, 0.35);
  --border-soft: rgba(255, 255, 255, 0.14);
  --border-orange: rgba(245, 166, 35, 0.45);

  --status-scheduled: #7b8bb5;
  --status-live: #ff5a5f;
  --status-finished: #35c98f;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.45);

  --font-display: 'Be Vietnam Pro', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Be Vietnam Pro', 'Inter', system-ui, -apple-system, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Background layer: banner image + blur veil, fixed behind all content */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('../assets/banner.png');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.05);
}

.app-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(17, 58, 128, 0.7) 0%, rgba(15, 51, 115, 0.82) 60%, rgba(12, 47, 107, 0.9) 100%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.text-accent {
  color: var(--orange-500);
  font-weight: 800;
}

/* Shared shell: header with logo + nav */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--surface-glass-strong);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.app-header__logo {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.app-header__titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex: 1;
  min-width: 0;
}

.app-header__eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.app-header__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.app-nav a {
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.app-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.app-nav a.is-active {
  background: var(--orange-500);
  color: var(--navy-950);
  box-shadow: 0 4px 16px var(--orange-glow);
}

.app-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
}

.app-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.app-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.app-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.app-main {
  flex: 1;
  padding: var(--space-6);
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.app-footer {
  padding: var(--space-5) var(--space-6);
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
}

/* Reusable card */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.card-pad {
  padding: var(--space-6);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-family: var(--font-display);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(180deg, var(--orange-400), var(--orange-600));
  color: var(--navy-950);
  box-shadow: 0 6px 20px var(--orange-glow);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px var(--orange-glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1px solid var(--border-soft);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill-btn {
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.pill-btn:hover {
  border-color: currentColor;
}

.pill-btn:active {
  transform: scale(0.96);
}

.status-popover {
  position: absolute;
  z-index: 300;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
}

.status-popover__option {
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.status-popover__option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.status-popover__option.is-current {
  color: var(--orange-500);
}

.pill-scheduled {
  color: var(--status-scheduled);
  background: rgba(123, 139, 181, 0.16);
}

.pill-in_progress {
  color: var(--status-live);
  background: rgba(255, 90, 95, 0.16);
  animation: pulse-live 1.6s ease-in-out infinite;
}

.pill-finished {
  color: var(--status-finished);
  background: rgba(53, 201, 143, 0.16);
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Section heading */
.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-title .text-accent {
  font-size: inherit;
}

/* Utility */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.grid {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.loading-state,
.empty-state {
  text-align: center;
  color: var(--ink-muted);
  padding: var(--space-8) var(--space-4);
  font-size: 14px;
}

@media (max-width: 720px) {
  .app-header {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
  }
  .app-main {
    padding: var(--space-4);
  }
  .app-header__title {
    font-size: 15px;
  }
  .app-nav-toggle {
    display: flex;
  }
  .app-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    margin-top: var(--space-3);
    gap: var(--space-1);
  }
  .app-nav.is-open {
    display: flex;
  }
  .app-nav a {
    width: 100%;
    text-align: center;
    padding: var(--space-3) var(--space-4);
  }
}
