/* AMP design tokens — matches the Concierge dashboard / AMP brand guide */
:root {
  --navy: #041E42;
  --navy-mid: #0a2d5e;
  --gold: #B9975B;
  --gold-light: #CDB5A7;
  --cream: #FAF8F7;
  --taupe: #E4D5D3;
  --light: #f0eae9;
  --gray: #948794;
  --dark: #2a1f28;
  --white: #FFFFFF;
  --red: #C0392B;
  --green: #1A6B3C;
  --font-heading: 'GFS Didot', Didot, Georgia, serif;
  --font-body: 'Nunito Sans', 'Avenir Next', Avenir, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); }

/* ---------- Top nav bar ---------- */
.navbar {
  background: var(--navy);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nav-left { display: flex; align-items: center; gap: 16px; }
.amp-mark { font-family: var(--font-heading); font-size: 16px; color: var(--gold); letter-spacing: 6px; text-decoration: none; }
.nav-divider { color: rgba(255, 255, 255, 0.2); font-size: 20px; }
.amp-full { font-size: 10px; font-weight: 700; color: var(--white); letter-spacing: 2px; text-transform: uppercase; }
.nav-sub { font-size: 9px; font-weight: 600; color: var(--gold-light); letter-spacing: 2px; text-transform: uppercase; }

/* ---------- Page container ---------- */
.container { max-width: 1400px; margin: 0 auto; padding: 40px 32px; }
.eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); }
.page-title { font-family: var(--font-heading); font-size: 36px; font-weight: 400; color: var(--navy); margin: 8px 0; }
.page-desc { font-size: 14px; color: var(--gray); margin: 0 0 6px; max-width: 760px; line-height: 1.5; }
.rule { width: 40px; height: 3px; background: var(--gold); border-radius: 2px; margin: 16px 0 28px; }

/* ---------- KPI cards ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--taupe);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi.headline { border-left: 3px solid var(--gold); }
.kpi .kpi-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); }
.kpi .kpi-value { font-family: var(--font-heading); font-size: 30px; font-weight: 400; color: var(--navy); line-height: 1.1; }
.kpi .kpi-sub { font-size: 12px; color: var(--gray); }

/* ---------- Filter bar ---------- */
.filterbar {
  background: var(--white);
  border: 1px solid var(--taupe);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
}
.field { display: flex; flex-direction: column; }
.field label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 6px; }
.field.status-field { margin-left: auto; }

select, input[type="date"] {
  padding: 8px 12px;
  border: 1.5px solid var(--taupe);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  outline: none;
  min-width: 160px;
}
select:focus, input[type="date"]:focus { border-color: var(--gold); }

/* provider prev/next toggle */
.provider-toggle { display: inline-flex; align-items: stretch; }
.provider-toggle select { border-radius: 0; border-left: none; border-right: none; min-width: 190px; text-align: center; font-weight: 700; }
.provider-toggle .step {
  background: var(--white); color: var(--gold); border: 1.5px solid var(--taupe);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 0 12px; transition: 0.15s;
}
.provider-toggle .step:first-child { border-radius: 8px 0 0 8px; }
.provider-toggle .step:last-child { border-radius: 0 8px 8px 0; }
.provider-toggle .step:hover { background: var(--cream); color: var(--navy); }

/* status badge */
.status { display: flex; align-items: center; gap: 10px; height: 37px; }
.badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.badge-live { background: rgba(26, 107, 60, 0.1); color: var(--green); border-color: rgba(26, 107, 60, 0.35); }
.badge-snapshot { background: rgba(185, 151, 91, 0.12); color: var(--gold); border-color: rgba(185, 151, 91, 0.4); }
.badge-muted { background: var(--light); color: var(--gray); }
.asof { font-size: 12px; color: var(--gray); }

/* ---------- Section header ---------- */
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-family: var(--font-heading); font-size: 22px; font-weight: 400; color: var(--navy); margin: 0; }
.section-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray); background: var(--light); border: 1px solid var(--taupe); border-radius: 4px; padding: 2px 8px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--taupe); border-radius: 12px; background: var(--white); }
table.grid { border-collapse: collapse; width: 100%; font-family: var(--font-body); }
table.grid thead th {
  position: relative;
  text-align: right;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  border-bottom: 2px solid var(--taupe);
  white-space: nowrap;
}
table.grid thead th.col-date { text-align: left; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

tbody tr.row td { text-align: right; padding: 10px 14px; font-size: 14px; color: var(--navy); border-bottom: 1px solid var(--light); font-variant-numeric: tabular-nums; }
tbody tr.row td.date { text-align: left; font-weight: 600; display: flex; align-items: baseline; gap: 10px; }
td.date .d-main { color: var(--navy); }
td.date .d-wd { color: var(--gray); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
tbody tr.row:hover td { background: rgba(185, 151, 91, 0.07); }
.pph { font-weight: 600; }
.pph-strong { color: var(--gold); font-weight: 700; }
.dash { color: var(--gray); }

tr.grand td { background: var(--cream); padding: 12px 14px; font-weight: 700; border-bottom: none; text-align: right; font-variant-numeric: tabular-nums; }
tr.grand .grand-label { text-align: left; color: var(--navy); text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
tr.grand .pph-strong { color: var(--gold); }

.empty { padding: 28px 20px; text-align: center; color: var(--gray); font-size: 13px; }
.hidden { display: none; }

/* ---------- Header hover tooltips ---------- */
.has-tip { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.has-tip .info {
  font-style: normal; font-size: 0.6rem; font-weight: 700; line-height: 1;
  width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--gold-light); color: var(--gold);
}
.has-tip:hover .info, .has-tip:focus-within .info { border-color: var(--gold); color: var(--navy); }
.has-tip .tip {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 20;
  width: 250px; padding: 10px 12px;
  background: var(--white); border: 1px solid var(--gold); border-radius: 10px;
  box-shadow: 0 10px 24px rgba(4, 30, 66, 0.16);
  color: var(--dark); font-size: 12px; font-weight: 400;
  text-transform: none; letter-spacing: normal; text-align: left; line-height: 1.5; white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: 0.14s ease; pointer-events: none;
}
.has-tip .tip::before { content: ""; position: absolute; bottom: 100%; right: 16px; border: 6px solid transparent; border-bottom-color: var(--gold); }
.has-tip:hover .tip, .has-tip:focus-within .tip { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Adjusted-hours cell breakdown tooltip ---------- */
.adj-cell { cursor: help; }
.adj-cell:hover { background: rgba(185, 151, 91, 0.07); text-decoration: underline dotted var(--gold-light); text-underline-offset: 3px; }

.cell-tip {
  position: fixed; z-index: 50; width: 270px; padding: 12px 14px;
  background: var(--white); border: 1px solid var(--gold); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(4, 30, 66, 0.22);
  font-family: var(--font-body); color: var(--dark); font-size: 12px; line-height: 1.5;
  text-align: left; font-variant-numeric: tabular-nums;
}
.cell-tip.hidden { display: none; }
.cell-tip .tt-head { font-weight: 700; color: var(--navy); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.cell-tip .tt-center { font-weight: 700; color: var(--gold); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; margin: 8px 0 4px; }
.cell-tip .tt-line { display: flex; justify-content: space-between; gap: 16px; padding: 1px 0; }
.cell-tip .tt-ded { color: var(--red); }
.cell-tip .tt-eq { font-weight: 700; color: var(--navy); border-top: 1px solid var(--taupe); margin-top: 4px; padding-top: 4px; }
.cell-tip .tt-total { font-weight: 800; color: var(--navy); border-top: 2px solid var(--gold); margin-top: 6px; padding-top: 5px; }
.cell-tip .tt-note { color: var(--gray); font-style: italic; font-size: 11px; padding: 1px 0; }
.cell-tip .tt-empty { color: var(--gray); }

/* ---------- Footer ---------- */
.footnote { margin-top: 16px; color: var(--gray); font-size: 11px; line-height: 1.6; max-width: 1000px; }
.footnote strong { color: var(--navy); }
.back-bar {
  margin-top: 16px; padding: 16px 20px; background: var(--white); border: 1px solid var(--taupe);
  border-radius: 12px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--gray);
}
.back-bar a { font-weight: 600; text-decoration: none; }
.back-meta { font-size: 11px; }
