/* Inter - one professional font for the whole app (CA, 2026-09-29). Served from our
   own server (static/fonts, SIL Open Font License), no internet needed. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/static/fonts/inter-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 900; font-display: swap; src: url('/static/fonts/inter-latin-900-normal.woff2') format('woff2'); }

/* One-app layout (/app/..., 2026-09-29): the Fuel Dashboard's left panel + white top
   bar around the report pages. Same class names and colours as fuel_dashboard.html's
   own sidebar/topbar, so every page looks like one app. The report sheets themselves
   keep the CA's report design (style.css). Loaded only on /app pages. */
body.shell, body.shell-dash {
  --app-font: 'Inter', 'Segoe UI', Arial, sans-serif;
}
body.shell {
  --sb-navy: #0b1c35; --sb-accent: #29b6f6; --sb-blue: #1565c0;
  --sb-border: #dde3ec; --sb-text2: #546e7a; --sb-text3: #90a4ae;
  --sidebar: 184px;  /* as wide as its text needs (CA note #4, 2026-10-01; was 230px) */
  display: flex; min-height: 100vh;
}
.sb { width: var(--sidebar); background: var(--sb-navy); color: #fff; position: fixed; top: 0; left: 0;
      height: 100vh; display: flex; flex-direction: column; z-index: 200; overflow-y: auto;
      font-family: var(--app-font); }
.sb-logo { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-logo .brand { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.sb-logo .sub { font-size: 9.5px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .8px; margin-top: 2px; }
.nav-sec { padding: 12px 14px 3px; font-size: 9px; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: 1px; }
.nav-i { display: flex; align-items: center; gap: 9px; padding: 9px 16px; cursor: pointer; color: rgba(255,255,255,.6);
         border-left: 3px solid transparent; font-size: 12px; font-weight: 500; text-decoration: none; }
.nav-i:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-i.active { background: rgba(41,182,246,.1); color: var(--sb-accent); border-left-color: var(--sb-accent); }
.nav-i.off { opacity: .35; cursor: not-allowed; }
.nav-i.off:hover { background: none; color: rgba(255,255,255,.6); }
.nav-i .ic { font-size: 14px; width: 18px; text-align: center; }
.sb-sync { margin-top: auto; padding: 10px 14px 12px; border-top: 1px solid rgba(255,255,255,.06); font-size: 10px;
           color: rgba(255,255,255,.4); line-height: 1.6; }
.sb-sync b { color: rgba(255,255,255,.65); font-weight: 600; }

.shell-main { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tb { background: #fff; border-bottom: 1px solid var(--sb-border); padding: 0 24px; min-height: 56px; display: flex;
      align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 100;
      box-shadow: 0 1px 3px rgba(0,0,0,.05); font-family: var(--app-font); font-size: 12.5px; }
.tb-title { font-size: 13px; font-weight: 700; flex: 1; color: #1a2332; white-space: nowrap; }
.tb-title span { color: var(--sb-blue); font-size: 11px; font-weight: 500; }
.tb form { display: contents; }
.fl { display: flex; align-items: center; gap: 6px; }
.fl-lb { font-size: 10px; font-weight: 700; color: var(--sb-text2); text-transform: uppercase; letter-spacing: .5px; }
select.fs { border: 1.5px solid var(--sb-border); border-radius: 7px; padding: 5px 10px; font-size: 11.5px; color: #1a2332;
            background: #fff; cursor: pointer; outline: none; font-family: inherit; min-width: 110px; }
select.fs:focus { border-color: var(--sb-blue); }
select.fs:disabled { cursor: default; color: var(--sb-text3); background: #f8fafc; }
.tb .btn { border: 1.5px solid var(--sb-border); background: #fff; padding: 5px 11px; border-radius: 6px; font-size: 11px;
           font-weight: 600; cursor: pointer; color: var(--sb-text2); text-decoration: none; font-family: inherit; }
.tb .btn:hover { border-color: var(--sb-blue); color: var(--sb-blue); }

/* "Comparative" slider next to the report name (BS / P&L / CF only) */
.cmp-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none;
              font-size: 11px; font-weight: 700; color: var(--sb-text2); text-transform: uppercase; letter-spacing: .5px; }
.cmp-switch input { display: none; }
.cmp-track { width: 34px; height: 18px; border-radius: 9px; background: #cfd8e3; position: relative; transition: background .15s; }
.cmp-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
                    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.cmp-switch input:checked + .cmp-track { background: var(--sb-blue); }
.cmp-switch input:checked + .cmp-track::after { left: 18px; }
.cmp-switch.hidden { display: none; }

/* Old chrome not used inside the app (kept on the old pages) */
body.shell .tally-topbar, body.shell #mainTabStrip, body.shell .toplevel-toggle,
body.shell #panel-comparative > .history-strip { display: none !important; }
body.shell .shell-note { max-width: 1080px; margin: 24px auto; padding: 18px 22px; background: #fff;
                         border: 1px solid var(--grey-border); color: var(--grey-text); }

@media print {
  body.shell .sb, body.shell .tb { display: none; }
  body.shell .shell-main { margin-left: 0; }
}

/* ===== CA round 2026-09-29: one theme (the Fuel Dashboard's) for every report ===== */
body.shell, body.shell-dash, body.shell select, body.shell input, body.shell button,
body.shell-dash select, body.shell-dash input, body.shell-dash button { font-family: var(--app-font); }
body.shell { background: #eef2f7; color: #1a2332; font-size: 12.5px; }
body.shell .tab-panel, body.shell .history-sub-panel, body.shell .comparative-sub-panel { padding: 20px 24px; }
body.shell .report-sheet { max-width: 1100px; border: 1px solid #dde3ec; border-radius: 10px; padding: 18px 22px;
                           box-shadow: 0 1px 3px rgba(0,0,0,.04); }
/* Header row kept (CA): Company | Report | Month | Page - restyled only */
body.shell .report-header { border-bottom: 1px solid #dde3ec; padding-bottom: 12px; margin-bottom: 12px; }
body.shell .report-header-company { font-size: 15px; font-weight: 800; color: #0b1c35; }
body.shell .report-header-title { font-size: 11.5px; font-weight: 700; color: #1565c0; letter-spacing: .6px; }
body.shell .report-header-cell { font-size: 11.5px; color: #546e7a; }
body.shell .report-header-company, body.shell .report-header-title { color: inherit; }
body.shell .report-header-company { color: #0b1c35; }
body.shell .report-header-title { color: #1565c0; }
/* Tables */
body.shell .tb-table { font-size: 12.5px; }
body.shell .tb-table thead th { background: #f8fafc; color: #546e7a; font-size: 10.5px; text-transform: uppercase;
                                letter-spacing: .4px; font-weight: 700; border-bottom: 1px solid #dde3ec; padding: 9px 12px; }
body.shell .tb-table tbody td { padding: 6px 12px; border-bottom: 1px solid #f1f5f9; }
body.shell .tb-table tbody tr:nth-child(even) { background: #fbfcfe; }
body.shell .tb-table .group-row td { background: #f8fafc; color: #1a2332; border-bottom: 1px solid #eef2f7; }
body.shell .tb-table .group-row td[colspan] { background: #f0f4fa; color: #546e7a; font-size: 10.5px; font-weight: 800;
                                             letter-spacing: .6px; }
body.shell .pnl-group-header:hover td { background: #eef5fc; }
body.shell .tb-table tfoot .total-row td { background: #e8eef7; border-top: 2px solid #dde3ec; border-bottom: 2px solid #c9d4e3; font-weight: 800; }
body.shell .tb-table .pnl-key-row td, body.shell .tb-table tfoot .pnl-key-row td,
body.shell .tb-table .pnl-key-row.pnl-group-header:hover td { background: #eaf4fd; color: #0b1c35; font-weight: 700; }
body.shell .tb-table .pnl-core-row td, body.shell .tb-table tfoot .pnl-core-row td,
body.shell .tb-table .pnl-core-row.pnl-group-header:hover td { background: #d6e6f7; color: #0b1c35; font-weight: 800;
                                                                border-top: 1px solid #1565c0; border-bottom: 1px solid #1565c0; }
body.shell .amt-neg, body.shell-dash .neg-br { color: #ef5350; }
/* Buttons and the Manual Entries form */
body.shell .export-btn { background: #1565c0; border-radius: 6px; font-size: 11.5px; }
body.shell .export-btn:hover { background: #0d4f9e; }
body.shell .manual-entry-form-wrap { background: #f8fafc; border-color: #dde3ec; border-radius: 10px; }
body.shell .manual-entry-field input, body.shell .manual-entry-field select { border: 1.5px solid #dde3ec; border-radius: 7px; }
/* Explanatory lines removed (CA); warnings stay */
body.shell .report-period:not(.report-warn), body.shell .history-intro, body.shell .shell-hide,
body.shell-dash .note, body.shell-dash .shell-hide { display: none !important; }
body.shell .report-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px;
                          padding: 7px 12px; font-size: 11.5px; text-align: left; }
body.shell .no-data { font-size: 13px; }
/* "Data as of" in the top bar */
.tb-asof { font-size: 10.5px; color: var(--sb-text3, #90a4ae); white-space: nowrap; }
.tb-asof.warn { color: #b45309; font-weight: 600; }
/* Fuel Dashboard: the 5 main cards centre aligned (CA) */
body.shell-dash .kg-5 .kc { text-align: center; }
body.shell-dash .kg-5 .km { justify-content: center; }

/* Logged in as + Log out, bottom of the left panel (2026-10-01) */
.sb-sync { margin: 10px 12px 0; padding: 6px 10px; border-radius: 6px; background: rgba(229,57,53,.18);
  border: 1px solid rgba(229,57,53,.5); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1.35; }
.sb-sync[hidden] { display: none; }
.sb-sync-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5252;
  margin-right: 6px; vertical-align: 1px; animation: sbSyncPulse 1.2s ease-in-out infinite; }
@keyframes sbSyncPulse { 50% { opacity: .25; } }
.sb-user { margin-top: auto; padding: 10px 14px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sb-user-lb { font-size: 9px; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: 1px; }
.sb-user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sb-user-row b { font-size: 12px; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout { font-size: 11px; font-weight: 600; color: var(--sb-accent); text-decoration: none; border: 1px solid rgba(41,182,246,.4);
             border-radius: 6px; padding: 3px 9px; white-space: nowrap; }
.sb-logout:hover { background: rgba(41,182,246,.12); }
