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

:root {
  color-scheme: light;
  --orange: #EC7000;
  --orange-ink: #A84B00;
  --blue: #003399;
  --navy: #183153;
  --background: #FFF8F0;
  --surface: #FFFFFF;
  --line: #E6DACF;
  --muted: #5F6F82;
  --soft-blue: #EDF3FF;
  --soft-orange: #FFF0DF;
  --shadow: 0 8px 30px #18315308;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--navy); font-family: 'DM Sans', 'Segoe UI', Arial, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
:where(a, button, select, summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a:hover { color: var(--blue); }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif; }
h1 { font-size: 43px; font-weight: 800; line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 12px; }
h1 span { color: var(--orange-ink); }
h2 { font-size: 19px; font-weight: 800; line-height: 1.4; letter-spacing: -.3px; margin-bottom: 16px; }

.panel-header { min-height: 90px; display: flex; align-items: center; justify-content: space-between; padding: 18px 5%; background: var(--surface); border-bottom: 1px solid var(--line); gap: 20px; }
.panel-brand { font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif; font-weight: 800; letter-spacing: -.5px; font-size: 19px; color: var(--navy); }
.panel-brand b { color: var(--orange-ink); }
.panel-header nav { display: flex; align-items: center; gap: 15px; font-size: 13px; color: var(--blue); }
.panel-header nav a { padding: 8px 11px; border-radius: 10px; }
.panel-header nav a:hover { background: var(--soft-orange); color: var(--navy); }
.dashboard { width: min(1250px, 90%); margin: 50px auto; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; margin-bottom: 25px; }
.private-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.7px; color: var(--orange-ink); margin-bottom: 16px; }
.subtle { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.dashboard-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dashboard-controls label { font-size: 12px; font-weight: 600; color: var(--navy); }
.dashboard-controls select { background: var(--surface); color: var(--navy); border: 1px solid #7A8DA6; border-radius: 12px; padding: 11px 13px; font-size: 13px; }
.secondary { padding: 11px 16px; background: var(--surface); border: 1px solid #7A8DA6; color: var(--blue); border-radius: 12px; font-size: 13px; font-weight: 600; }
.secondary:hover:not(:disabled) { background: var(--soft-blue); border-color: var(--blue); }
.status-message { font-size: 12px; color: var(--muted); min-height: 25px; margin-bottom: 15px; }
.status-message.error { color: #B42318; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 25px; }
.metrics article { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.metrics article:first-child { background: var(--soft-orange); border-color: #F2D4B6; }
.metrics article p { font-size: 13px; color: var(--muted); margin-bottom: 15px; }
.metrics strong { font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif; display: block; color: var(--blue); font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.3; }
.metrics small { font-size: 11px; color: var(--muted); display: block; margin-top: 11px; }
.chart-card, .data-card { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 28px; box-shadow: var(--shadow); }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.card-heading h2 { margin-bottom: 4px; }
.card-heading p { font-size: 12px; color: var(--muted); }
.chart-key { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.chart-key i { width: 9px; height: 9px; flex-shrink: 0; background: var(--orange); border-radius: 3px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 220px; border-bottom: 1px solid #AEBCCF; margin: 35px 0 45px; position: relative; background: repeating-linear-gradient(to top, transparent 0, transparent 53px, #1831530B 54px, #1831530B 55px); }
.chart-column { height: 100%; flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.chart-bar { display: block; background: var(--orange); width: 70%; min-width: 1px; border-radius: 5px 5px 0 0; }
.chart-column:hover .chart-bar { background: var(--blue); }
.chart-column small { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; color: var(--muted); }
.empty { font-size: 14px; color: var(--muted); text-align: center; padding: 12px; }
.daily-details { border-top: 1px solid var(--line); padding-top: 18px; }
.daily-details summary { font-size: 13px; font-weight: 600; color: var(--blue); cursor: pointer; }
.daily-details table { margin-top: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 12px 8px; border-bottom: 1px solid #CCD6E2; }
td { padding: 14px 8px; border-bottom: 1px solid #E9EEF4; color: var(--navy); }
th:not(:first-child), td:not(:first-child) { text-align: right; }
.breakdown-row { margin-bottom: 20px; }
.breakdown-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; font-size: 13px; margin-bottom: 8px; }
.breakdown-row span { overflow-wrap: anywhere; }
.breakdown-row strong { font-size: 13px; font-weight: 600; }
.bar-track { background: var(--soft-blue); height: 7px; overflow: hidden; border-radius: 5px; }
.bar-track > span { display: block; background: var(--blue); height: 100%; border-radius: 5px; }
.small-note, .explanation p { font-size: 12px; line-height: 1.85; color: var(--muted); }
.explanation h2 { margin-top: 25px; }
.explanation h2:first-child { margin-top: 0; }
.explanation a { font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.panel-footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 11px; margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }

.access-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(ellipse at top left, #FFE7CD 0, transparent 52%), radial-gradient(ellipse at bottom right, #E8F0FF 0, transparent 50%), var(--background); }
.access-card { background: var(--surface); border: 1px solid var(--line); padding: 46px; border-radius: 28px; width: min(100%, 480px); box-shadow: 0 18px 60px #1831530D; }
.access-card .panel-brand { display: inline-block; margin-bottom: 40px; }
.access-card h1 { font-size: 39px; }
.access-card p { font-size: 14px; color: var(--muted); }
.primary { background: var(--blue); color: #FFFFFF; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 20px; margin: 28px 0 19px; font-size: 14px; font-weight: 700; border: 1px solid var(--blue); border-radius: 14px; box-shadow: 0 4px 12px #00339914; }
.primary:hover { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.quiet { font-size: 12px; color: var(--muted); }
.access-card .private-label { font-size: 10px; }
[hidden] { display: none !important; }

@media (max-width: 850px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 25px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  h1 { font-size: 37px; }
  .panel-header { min-height: 80px; }
  .panel-header nav { gap: 8px; font-size: 12px; }
  .panel-brand { font-size: 17px; }
  .dashboard { margin-top: 38px; }
  .chart-card, .data-card { padding: 23px; }
}

@media (max-width: 460px) {
  .panel-header { padding: 20px; align-items: flex-start; min-height: 90px; flex-direction: column; gap: 12px; }
  .panel-header nav { width: 100%; justify-content: space-between; }
  .panel-header nav a { padding: 7px 0; }
  .metrics { gap: 12px; }
  .metrics article { padding: 18px 14px; border-radius: 17px; }
  .metrics article p { font-size: 12px; min-height: 38px; margin-bottom: 8px; }
  .metrics strong { font-size: 32px; }
  .metrics small { font-size: 10px; }
  .dashboard { width: calc(100% - 36px); }
  .dashboard-controls { gap: 9px; }
  .dashboard-controls label { flex-basis: 100%; }
  .card-heading { flex-direction: column; gap: 5px; }
  .chart { gap: 2px; height: 180px; }
  .chart-column small { font-size: 8px; }
  .chart-card, .data-card { padding: 20px; border-radius: 18px; }
  .access-page { padding: 20px; }
  .access-card { padding: 28px; border-radius: 22px; }
  .access-card h1 { font-size: 32px; }
  .access-card .panel-brand { font-size: 17px; }
  .panel-footer { flex-direction: column; gap: 5px; }
}
