/* Pages from the Figma "CaliFood Dashboard" (pages.js). Uses the tokens in index.html. */
.page.off { display: none !important; }
.gbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.gbar .crumb { font-size: 20px; font-weight: 600; margin-right: auto; }
.gbar .county { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.nav-sep { margin: 14px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.small { font-size: 12px; }
.grow { flex: 1; }
.loading { color: var(--dim); padding: 30px 4px; }

/* Filter + date bars */
.fbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; }
.fbar .lbl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); width: 100%; }
.fsel { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 12px; color: var(--muted); }
.fsel select { background: transparent; border: 0; color: var(--text); font-size: 12px; max-width: 180px; }
.fsel select option { background: var(--panel); }
.fsel.locked b { color: var(--text); font-weight: 600; }
.fbar .sep { color: var(--dim); }
.pbar { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pbar .range-label { font-size: 14px; }
.pbar .cal { top: calc(100% + 6px); left: 0; right: auto; }

/* Cards, KPIs */
.kpi2 { padding: 14px 16px; }
.kpi2 .label { color: var(--muted); font-size: 12px; }
.kpi2 .value { font-size: 26px; font-weight: 600; margin: 8px 0 6px; display: flex; align-items: center; gap: 8px; }
.kpi2 .foot { color: var(--dim); font-size: 11px; min-height: 16px; }
.kpi2.yellow .value { color: #f5a524; }
.kpi2.green .value { color: var(--green); }
.kpi2.outlined { border-color: var(--purple); }
.kpis5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.kpis7 { grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 18px; }
.row-2b { grid-template-columns: 3fr 2fr; margin-bottom: 18px; }
.row-ua { grid-template-columns: 1fr 1.6fr 1.4fr; margin-bottom: 18px; }
.row-dist { grid-template-columns: 1fr 2fr; margin-bottom: 18px; }
.big { font-size: 34px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; }
.pill.up { color: var(--green); background: rgba(20, 202, 116, .14); }
.pill.down { color: var(--pink); background: rgba(255, 90, 101, .16); }
.sup { color: var(--dim); cursor: help; white-space: nowrap; }
.foot-note { color: var(--dim); font-size: 12px; margin: 6px 0 22px; }
.banner { background: rgba(253, 181, 42, .1); border: 1px solid rgba(253, 181, 42, .45); color: var(--text); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }

/* "Not available yet" */
.na { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 34px 16px; color: var(--muted); font-size: 13px; min-height: 160px; }
.na b { color: var(--text); font-size: 14px; }
.na span { max-width: 360px; }
.na-badge { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.mini.na-inline { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }

/* Horizontal bars */
.hbar { display: grid; grid-template-columns: minmax(64px, max-content) minmax(40px, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.hbar .track { height: 10px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 6px; }
.hbar b { text-align: right; font-weight: 600; }
.hbar .muted { text-align: right; font-size: 12px; }
.split { display: flex; gap: 4px; height: 12px; margin-bottom: 10px; }
.split i { border-radius: 6px; background: var(--cyan); min-width: 4px; }
.split i:first-child { background: #3b82f6; }
.psplit { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; font-size: 13px; }
.psplit div { display: flex; align-items: center; gap: 8px; }
.psplit i { width: 8px; height: 8px; border-radius: 50%; }
.psplit b { margin-left: auto; }
.ring-wrap { position: relative; }
.chart.ring { height: 200px; }
.ring-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 600; pointer-events: none; }

/* Where: three columns */
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.col-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.col-head h2 { margin: 0; font-size: 15px; }
.col-head small { color: var(--muted); font-size: 12px; }
.col-head .select { font-size: 12px; padding: 6px 8px; max-width: 200px; }
.table-wrap.tall { max-height: 560px; }
.wtable td, .wtable th { padding: 8px 5px; font-size: 12px; }
.wtable th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
.wtable td:first-child { min-width: 90px; }
.dtable td:first-child { min-width: 200px; }
.dtable td, .dtable th { font-size: 12px; padding: 9px 8px; }
.dtable th { white-space: normal; }
.sub-l { display: block; color: var(--dim); font-size: 10px; }
td.verified_arrival { color: #f5a524; }
td.arrival { color: var(--green); }
tfoot td { font-weight: 600; background: var(--panel-2); position: sticky; bottom: 0; }

/* Heatmap */
.heat { display: grid; grid-template-columns: 40px repeat(8, 1fr); gap: 4px; font-size: 11px; }
.heat .hx { color: var(--dim); text-align: center; }
.heat .hy { color: var(--muted); align-self: center; }
.heat .hc { height: 24px; border-radius: 4px; background: #3b82f6; }
.heat .hc.low { background: var(--panel-2); color: var(--dim); display: grid; place-items: center; font-size: 10px; }
.legend { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 11px; color: var(--dim); }
.legend i { width: 14px; height: 8px; border-radius: 2px; background: #3b82f6; }
.legend i:nth-of-type(1) { opacity: .3; } .legend i:nth-of-type(2) { opacity: .5; } .legend i:nth-of-type(3) { opacity: .75; }
.legend .muted { margin-left: 14px; }

/* Misc */
.privacy { display: flex; flex-direction: column; }
.privacy div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.contact p { font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1200px) {
  .kpis7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols3, .row-ua { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .row-2b, .row-dist { grid-template-columns: 1fr; }
  .gbar { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .kpis5, .kpis7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbar { grid-template-columns: 80px 1fr 48px; }
  .hbar .muted, .hbar .pill { display: none; }
}
