/* HF-UI-FULLWIDTH: shared full-width layout (formatting only). Loaded last in base.html so it wins.
   Phone view (under 1024 px) keeps today's padding; pick-page, driver-page, sheets and login stay as they are. */
:root {
  --hf-bg: #EEF1F6; --hf-navy: #0E2545; --hf-blue: #1E5AA8;
  --hf-green: #166534; --hf-green-b: #16A34A; --hf-amber: #B45309; --hf-amber-b: #D97706;
  --hf-red: #B91C1C; --hf-red-b: #DC2626; --hf-purple: #6D28D9;
  --hf-grey: #5B6B82; --hf-gap: 16px;
}

/* 1. content fills the width beside the menu, 28 px gutter on desktop */
@media (min-width: 1024px) { .content { padding-left: 28px; padding-right: 28px; } }
.content > .p51-page, .p300-sc .p51-page, .p51-page { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }
.ov-chart, .ov2 .ov2-pf-bridge { max-width: none; }
.p300-sc .sc-head h1, .p300-sc .sc-sub { max-width: none; }
.content table, .content svg, .content img { max-width: 100%; }

/* 2. 12-column grid */
.hf-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--hf-gap); min-width: 0; }
.hf-grid > * { min-width: 0; grid-column: span 12; }
.hf-s3 { grid-column: span 3; } .hf-s4 { grid-column: span 4; } .hf-s5 { grid-column: span 5; }
.hf-s6 { grid-column: span 6; } .hf-s7 { grid-column: span 7; } .hf-s8 { grid-column: span 8; } .hf-s12 { grid-column: span 12; }
@media (min-width: 900px) and (max-width: 1399.98px) {
  .hf-grid > .hf-s3, .hf-grid > .hf-s4, .hf-grid > .hf-s5 { grid-column: span 6; }
  .hf-grid > .hf-s7, .hf-grid > .hf-s8 { grid-column: span 12; }
}
@media (max-width: 899.98px) { .hf-grid > * { grid-column: span 12 !important; } }

/* 3. page header */
.hf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.hf-head .hf-crumb { font-size: 12px; color: var(--hf-grey); margin: 0 0 4px; }
.hf-head h1 { font-size: 26px; line-height: 1.15; color: var(--hf-navy); margin: 0; }
.hf-head .hf-asof { font-size: 12px; color: var(--hf-grey); text-align: right; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hf-head .hf-asof b { color: var(--hf-green); }

/* message line */
.hf-msg { background: #fff; border-radius: 12px; border-left: 5px solid var(--hf-blue); padding: 12px 16px; margin: 0 0 16px; font-size: 14px; color: #1E293B; box-shadow: 0 1px 3px rgba(11,37,69,.08); }
.hf-msg > b:first-child, .hf-msg strong:first-child { color: var(--hf-navy); }
.hf-msg.good { border-left-color: var(--hf-green-b); } .hf-msg.watch { border-left-color: var(--hf-amber-b); }
.hf-msg.act { border-left-color: var(--hf-red-b); } .hf-msg.info { border-left-color: var(--hf-blue); }

/* summary tiles */
.hf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--hf-gap); margin: 0 0 16px; min-width: 0; }
.hf-tile { background: #fff; border-radius: 14px; border-top: 4px solid var(--hf-blue); padding: 12px 16px 14px; box-shadow: 0 1px 3px rgba(11,37,69,.08); min-width: 0; }
.hf-tile .hf-k { font-size: 12px; color: var(--hf-grey); font-weight: 600; margin: 0 0 4px; }
.hf-tile .hf-v { font-size: 26px; font-weight: 700; color: var(--hf-navy); line-height: 1.15; }
.hf-tile .hf-d { font-size: 12px; color: var(--hf-grey); margin-top: 4px; }
.hf-tile.good { border-top-color: var(--hf-green-b); } .hf-tile.watch { border-top-color: var(--hf-amber-b); }
.hf-tile.act { border-top-color: var(--hf-red-b); } .hf-tile.info { border-top-color: var(--hf-blue); }
.hf-tile.good .hf-d { color: var(--hf-green); } .hf-tile.watch .hf-d { color: var(--hf-amber); } .hf-tile.act .hf-d { color: var(--hf-red); }

/* card */
.hf-card { background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(11,37,69,.10); min-width: 0; }
.hf-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hf-card-t { font-size: 16px; font-weight: 700; color: var(--hf-navy); margin: 0; }
.hf-card-s { font-size: 12px; color: var(--hf-grey); margin: 2px 0 0; }
.hf-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.hf-card table, .hf-card img, .hf-card svg, .hf-card canvas { width: 100%; height: auto; }
.hf-card table { height: auto; }
.hf-card .tablewrap { overflow-x: auto; }
.hf-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #E8EEF7; color: var(--hf-navy); }
.hf-chip.good { background: #DCFCE7; color: var(--hf-green); } .hf-chip.watch { background: #FEF3C7; color: var(--hf-amber); }
.hf-chip.act { background: #FEE2E2; color: var(--hf-red); } .hf-chip.info { background: #DBEAFE; color: var(--hf-blue); }
.hf-chip.owner { background: #EDE9FE; color: var(--hf-purple); }

/* numbered section heading */
.hf-sec { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; font-size: 20px; font-weight: 700; color: var(--hf-navy); }
.hf-sec .hf-n { flex: none; width: 28px; height: 28px; border-radius: 6px; background: var(--hf-navy); color: #fff; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* navy summary band (Overview only) */
.hf-band { background: var(--hf-navy); color: #fff; border-radius: 16px; padding: 20px 24px; margin: 0 0 16px; min-width: 0; }
.hf-band h2, .hf-band .hf-card-t { color: #fff; }
.hf-band p { color: #C7D6F5; margin: 0 0 12px; font-size: 16px; }
.hf-band .hf-tile { background: rgba(255,255,255,.08); box-shadow: none; }
.hf-band .hf-tile .hf-v { color: #fff; } .hf-band .hf-tile .hf-k, .hf-band .hf-tile .hf-d { color: #C7D6F5; }
