@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;1,600&display=swap");

:root {
  --navy: #082544;
  --navy-2: #0d355f;
  --gold: #c89a3c;
  --sand: #e8ddc8;
  --paper: #f5f2eb;
  --white: #fff;
  --ink: #20252b;
  --muted: #6c7278;
  --line: #d9d5cc;
  --danger: #b84c42;
  --success: #29715d;
  --shadow: 0 18px 48px rgba(8, 37, 68, .11);
  --sans: "IBM Plex Sans Thai", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.55; }
button, select, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mobile-header { display: none; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 286px;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 22px;
  overflow-y: auto;
  background: var(--navy);
  color: var(--white);
}
.brand { display: block; padding: 8px 10px 24px; border-bottom: 1px solid rgba(255,255,255,.16); }
.brand img { width: 175px; filter: brightness(0) invert(1); }
.season-mark { padding: 22px 10px; }
.season-mark span { display: block; color: var(--gold); font-size: .7rem; font-weight: 700; letter-spacing: .18em; }
.season-mark strong { font-family: "Playfair Display", serif; font-size: 1.45rem; font-style: italic; font-weight: 600; }
.sidebar nav { display: grid; gap: 3px; }
.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 11px 10px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.66);
  text-align: left;
  transition: .2s ease;
}
.nav-item span { color: rgba(255,255,255,.32); font-size: .68rem; }
.nav-item:hover, .nav-item.active { border-left-color: var(--gold); background: rgba(255,255,255,.07); color: var(--white); }
.nav-item.active span { color: var(--gold); }
.back-link { margin-top: auto; padding: 22px 10px 4px; color: var(--gold); font-size: .82rem; }
.workspace { min-height: 100vh; margin-left: 286px; padding: 34px clamp(24px, 4vw, 64px) 70px; }
.workspace-header { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--navy); font-family: "Playfair Display", serif; font-size: clamp(2.25rem, 4vw, 4.5rem); font-style: italic; line-height: 1; }
h2 { color: var(--navy); font-size: clamp(1.45rem, 2.4vw, 2.3rem); line-height: 1.2; }
h3 { color: var(--navy); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.version { color: var(--muted); font-size: .76rem; }
.button, .filters button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}
.button.secondary { background: transparent; color: var(--navy); }
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 22px 0;
}
.filters label { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.filters select {
  width: 100%;
  min-height: 43px;
  display: block;
  margin-top: 5px;
  padding: 8px 30px 8px 11px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.filters button { border-color: var(--line); background: transparent; color: var(--muted); }
.hero-panel {
  position: relative;
  min-height: 280px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 30px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(200,154,60,.35), transparent 28%),
    linear-gradient(130deg, #061d35, #0b3157);
  color: var(--white);
}
.hero-panel::after { content: ""; position: absolute; right: -65px; bottom: -110px; width: 310px; height: 310px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.hero-panel h2 { max-width: 760px; margin-bottom: 22px; color: var(--white); font-family: "Playfair Display", serif; font-size: clamp(2.35rem, 4.5vw, 5rem); font-style: italic; line-height: 1.04; }
.campaign-headline span { display: block; }
.campaign-headline .campaign-emphasis { margin: .08em 0; color: var(--gold); }
.hero-panel p { max-width: 680px; margin-bottom: 0; color: rgba(255,255,255,.72); }
.season-progress { position: relative; z-index: 2; padding: 22px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); backdrop-filter: blur(8px); }
.season-progress strong { display: block; color: var(--gold); font-size: 2.4rem; }
.progress-track { height: 6px; margin-top: 12px; background: rgba(255,255,255,.16); }
.progress-track i { display: block; width: 0; height: 100%; background: var(--gold); }
.section { margin-top: 18px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); background: var(--white); box-shadow: 0 10px 28px rgba(8,37,68,.04); }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 22px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { margin-bottom: 0; color: var(--muted); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi-card { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; padding: 19px; border: 1px solid var(--line); background: var(--white); }
.kpi-card span { color: var(--muted); font-size: .73rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kpi-card strong { color: var(--navy); font-size: clamp(1.55rem, 2.6vw, 2.6rem); }
.kpi-card small { color: var(--muted); }
.kpi-card.alert { border-top: 3px solid var(--danger); }
.kpi-card.gold { border-top: 3px solid var(--gold); }
.kpi-card.good { border-top: 3px solid var(--success); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { padding: 22px; border: 1px solid var(--line); background: var(--white); }
.card h3 { margin-bottom: 7px; }
.card p { color: var(--muted); }
.pill { display: inline-flex; padding: 5px 9px; border-radius: 99px; background: var(--sand); color: var(--navy); font-size: .7rem; font-weight: 700; }
.pill.live, .pill.approved, .pill.completed { background: #d9ece5; color: #1f654f; }
.pill.overdue, .pill.on-hold { background: #f4dcd8; color: #913d35; }
.pill.in-production, .pill.scheduled { background: #e6e0f4; color: #5e4688; }
.status-line { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.location-card { position: relative; overflow: hidden; }
.location-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--accent, var(--gold)); }
.location-card .type { color: var(--accent, var(--gold)); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.location-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.location-card .child { margin-top: 15px; padding: 13px; background: var(--paper); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .84rem; }
th, td { min-width: 120px; padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; background: var(--navy); color: var(--white); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.timeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.month-card { min-height: 235px; padding: 17px; border-top: 4px solid var(--gold); background: var(--white); box-shadow: var(--shadow); }
.month-card time { color: var(--gold); font-size: .72rem; font-weight: 700; }
.month-card h3 { margin: 7px 0 12px; font-size: 1.05rem; }
.month-card ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: .78rem; }
.budget-bar { margin: 15px 0; }
.budget-bar header { display: flex; justify-content: space-between; gap: 15px; }
.budget-bar header span:last-child { color: var(--gold); font-weight: 700; }
.budget-bar div { height: 9px; margin-top: 6px; overflow: hidden; background: var(--sand); }
.budget-bar i { display: block; height: 100%; background: var(--navy); }
.objective { display: grid; grid-template-columns: 1.6fr .7fr 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.objective:last-child { border-bottom: 0; }
.objective strong { color: var(--navy); }
.objective span { color: var(--gold); font-weight: 700; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow span { padding: 9px 12px; border: 1px solid var(--line); background: var(--paper); }
.flow b { color: var(--gold); }
.empty { padding: 50px 20px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 99; padding: 12px 17px; background: var(--navy); color: var(--white); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(4, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .mobile-header { position: sticky; top: 0; z-index: 40; height: 70px; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--navy); }
  .mobile-brand img { width: 135px; filter: brightness(0) invert(1); }
  .menu-toggle { padding: 8px 12px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: white; }
  .sidebar { width: min(310px, 88vw); transform: translateX(-105%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .workspace { margin-left: 0; padding: 26px 18px 70px; }
  .workspace-header, .hero-panel { grid-template-columns: 1fr; }
  .workspace-header { align-items: start; }
  .kpi-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 570px) {
  .workspace-header { display: block; }
  .header-actions { margin-top: 18px; }
  .version { display: none; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters button { grid-column: 1 / -1; }
  .hero-panel { min-height: 420px; align-items: stretch; }
  .kpi-grid, .grid-3, .timeline { grid-template-columns: 1fr; }
  .kpi-card { min-height: 125px; }
  .objective { grid-template-columns: 1fr; gap: 5px; }
}
@media print {
  .sidebar, .mobile-header, .filters, .header-actions { display: none !important; }
  .workspace { margin: 0; padding: 0; }
  body { background: white; }
}
