/* ============================================================
   AMP Intelligence Design System
   ============================================================ */

/* ---------- 1. CSS Variables / Color Palette ---------- */
:root {
  --navy:        #041E42;
  --navy-mid:    #0a2d5e;
  --gold:        #B9975B;
  --gold-light:  #CDB5A7;
  --blush:       #CDB5A7;
  --gold-muted:  #9a7d4a;
  --cream:       #FAF8F7;
  --taupe:       #E4D5D3;
  --light:       #f0eae9;
  --gray:        #948794;
  --mauve:       #948794;
  --dark:        #2a1f28;
  --white:       #FFFFFF;
  --red:         #C0392B;
  --green:       #1A6B3C;
  --rose:        #E4D5D3;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

@import url('https://fonts.googleapis.com/css2?family=GFS+Didot&family=Nunito+Sans:wght@400;600;700&display=swap');

body {
  font-family: 'Nunito Sans', 'Avenir Next', Avenir, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--dark);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 3. Typography ---------- */
h1 {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--navy);
}

h3, .section-title {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--navy);
}

.section-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.subtitle {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  color: var(--mauve);
}

.footnote {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11.5px;
  color: var(--gray);
}

/* ---------- 4. Nav Bar (sticky top) ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo-letters {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 6px;
  font-weight: 400;
}

.navbar-logo-sub {
  font-family: 'Nunito Sans', sans-serif;
  color: var(--white);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.navbar-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.navbar-tab {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border: none;
  background: none;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
  opacity: 0.75;
}

.navbar-tab:hover {
  opacity: 1;
}

.navbar-tab.active {
  opacity: 1;
  border-bottom-color: var(--gold);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.month-picker-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.month-picker-wrap label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.month-picker-wrap input[type="month"] {
  background: var(--navy-mid);
  border: 1px solid rgba(185,151,91,0.3);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 5px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px;
  cursor: pointer;
}

.month-picker-wrap input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.8);
}

/* ---------- 5. Page Header ---------- */
.page-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.page-header .section-label {
  margin-bottom: 4px;
}

.page-header h1 {
  margin-bottom: 4px;
}

.gold-underline {
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: 8px;
}

/* ---------- 6. Layout ---------- */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

/* ---------- 7. Section Cards ---------- */
.card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--taupe);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(42,31,40,0.06);
}

.card + .card {
  margin-top: 20px;
}

.card-title {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 16px;
}

/* ---------- 8. KPI Cards ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--taupe);
  padding: 20px;
  box-shadow: 0 1px 4px rgba(42,31,40,0.06);
  border-left: 4px solid var(--gold);
}

.kpi-card .kpi-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}

.kpi-card .kpi-value {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--gold);
}

.kpi-card .kpi-sub {
  font-size: 11.5px;
  color: var(--gray);
  margin-top: 4px;
}

.kpi-sub.positive { color: var(--green); }
.kpi-sub.negative { color: var(--red); }

/* ---------- 9. Tables ---------- */
.table-container {
  border: 1px solid var(--taupe);
  border-radius: 10px;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

.data-table thead th {
  background: var(--navy);
  color: var(--blush);
  padding: 10px 14px;
  text-align: right;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.data-table thead th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 20;
  background: var(--navy);
  min-width: 220px;
}

.data-table tbody td {
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid var(--light);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 12px;
}

.data-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--navy);
  position: sticky;
  left: 0;
  z-index: 5;
  background: inherit;
  border-right: 1px solid var(--taupe);
}

.data-table tbody tr:nth-child(odd) {
  background: var(--white);
}

.data-table tbody tr:nth-child(even) {
  background: var(--cream);
}

.data-table tbody tr:nth-child(odd) td:first-child { background: var(--white); }
.data-table tbody tr:nth-child(even) td:first-child { background: var(--cream); }

.data-table tbody tr:hover td {
  background: var(--light);
}
.data-table tbody tr:hover td:first-child {
  background: var(--light);
}

.data-table tbody tr.total-row td {
  font-weight: 700;
  background: var(--navy) !important;
  color: var(--gold-light);
  border-top: none;
}

.data-table tbody tr.total-row td:first-child {
  background: var(--navy) !important;
  color: var(--gold);
}

.positive-val { color: var(--green); }
.negative-val { color: var(--red); }

/* Target row */
.data-table tbody tr.target-row td {
  font-style: italic;
  color: var(--gray);
  font-size: 11px;
  background: var(--light) !important;
  border-bottom: none;
}

.data-table tbody tr.target-row td:first-child {
  background: var(--light) !important;
  color: var(--gray);
  font-weight: 400;
  font-style: italic;
}

/* Variance row */
.data-table tbody tr.variance-row td {
  font-size: 10px;
  font-weight: 600;
  border-bottom: 2px solid var(--taupe);
  background: var(--white) !important;
}

.data-table tbody tr.variance-row td:first-child {
  background: var(--white) !important;
  color: var(--gray);
  font-weight: 500;
  font-size: 10px;
}

/* Total Target row */
.data-table tbody tr.total-target-row td {
  font-weight: 600;
  font-style: italic;
  background: var(--navy-mid) !important;
  color: var(--gold-light);
  font-size: 11px;
}

.data-table tbody tr.total-target-row td:first-child {
  background: var(--navy-mid) !important;
  color: var(--gold-light);
}

/* Total Variance row */
.data-table tbody tr.total-variance-row td {
  font-weight: 700;
  background: var(--cream) !important;
  font-size: 11px;
  border-top: none;
}

.data-table tbody tr.total-variance-row td:first-child {
  background: var(--cream) !important;
  color: var(--navy);
}

/* ---------- 10. Chart Cards ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.chart-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--taupe);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(42,31,40,0.06);
}

.chart-card h3 {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 4px;
}

.chart-subtitle {
  font-size: 11.5px;
  color: var(--gray);
  margin-bottom: 16px;
}

.chart-wrapper {
  position: relative;
  height: 420px;
}

/* Sized to a 16:9 PowerPoint slide ratio (screenshot the card and drop it in) */
.chart-wrapper--slide {
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 640px;
}

/* ---------- 11. Location List (Overview) ---------- */
.location-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: 6px;
  border: 1px solid var(--taupe);
}

.location-item .loc-name {
  font-weight: 600;
  color: var(--navy);
  font-size: 12px;
}

.location-item .loc-detail {
  font-size: 10px;
  color: var(--gray);
}

.location-item .loc-value {
  font-family: 'GFS Didot', Didot, Georgia, serif;
  font-size: 16px;
  color: var(--gold);
}

/* ---------- 12. Tag/Pill Badges ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(185, 151, 91, 0.22);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--dark);
}

/* ---------- 13. CTA Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 5px;
  padding: 7px 13px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }

/* ---------- 14. Two-column layout ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

/* ---------- 15. Footer ---------- */
.footer {
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--gray);
  border-top: 1px solid var(--taupe);
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 1024px) {
  .grid-2, .grid-1-2 {
    grid-template-columns: 1fr;
  }
  .navbar {
    height: auto;
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 6px;
  }
  .navbar-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  h1 { font-size: 28px; }
  .main-content { padding: 16px; }
}
