/* BHG Intranet — the Executive Scorecard look (docs/brand/README.md). Font: Arial only (decision 29).
   Colours are copied from the shipping Scorecard template; change them there first. */
:root {
  --side:#173428; --bg:#F2F4F3; --card:#FFFFFF; --ink:#22302A; --dim:#78877F; --edge:#E2E7E4;
  --gold:#C9A54A; --good:#1F9D61; --warn:#E2A72E; --bad:#D14836; --teal:#3D9C93; --blue:#2C6E8F;
  --nav-w:220px;
}
* { box-sizing:border-box; margin:0; padding:0; }
body { font-family:Arial,"Helvetica Neue",Helvetica,sans-serif; background:var(--bg); color:var(--ink);
       display:flex; min-height:100vh; }

/* ---- side menu (as in the Scorecard) ---- */
nav.side { width:var(--nav-w); background:var(--side); color:#fff; padding:24px 0; flex:none;
           display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto;
           transition:margin-left .2s ease; }
nav.side .brand { padding:0 22px 22px; border-bottom:1px solid rgba(255,255,255,.12); margin-bottom:14px; }
nav.side a.brand { display:block; padding:0 22px 18px; border-left:none; text-align:center; }
nav.side a.brand img { display:block; width:170px; max-width:100%; height:auto; margin:0 auto; }
nav.side .brand-sub { font-size:10px; letter-spacing:3px; text-transform:uppercase; color:rgba(255,255,255,.55);
                      margin-top:8px; }
nav.side .group { padding:14px 22px 6px; font-size:10.5px; letter-spacing:1.5px; text-transform:uppercase;
                  color:rgba(255,255,255,.45); }
nav.side a { display:flex; align-items:center; gap:10px; color:rgba(255,255,255,.75); text-decoration:none;
             padding:11px 22px; font-size:13px; border-left:3px solid transparent; }
nav.side a.active { background:rgba(255,255,255,.08); color:#fff; border-left-color:var(--gold); font-weight:600; }
nav.side a:hover { color:#fff; }
nav.side a.soon { color:rgba(255,255,255,.35); pointer-events:none; }
nav.side a.soon::after { content:"soon"; margin-left:auto; font-size:9.5px; border:1px solid rgba(255,255,255,.25);
                         border-radius:8px; padding:0 6px; }
nav.side .foot { margin-top:auto; padding:16px 22px; font-size:10px; color:rgba(255,255,255,.45); line-height:1.6; }

/* ---- page ---- */
.page { flex:1; min-width:0; padding:0 24px 40px; }
.topbar { display:flex; align-items:center; gap:12px; position:sticky; top:0; background:var(--bg); z-index:5;
          padding:10px 0; border-bottom:1px solid var(--edge); margin-bottom:18px; }
.topbar h1 { font-size:19px; }
.burger { background:none; border:1px solid var(--edge); border-radius:8px; width:36px; height:34px;
          font-size:18px; line-height:1; color:var(--side); cursor:pointer; }
.burger:hover { background:#fff; }
.envtag { margin-left:auto; font-size:11px; font-weight:700; letter-spacing:1px; color:#fff;
          background:var(--warn); border-radius:10px; padding:3px 10px; }
.card { background:var(--card); border:1px solid var(--edge); border-radius:12px; padding:18px; margin-bottom:16px; }
.card .cap { font-size:11.5px; color:var(--dim); margin-bottom:12px; }
h2.sec { font-size:15px; color:var(--dim); text-transform:uppercase; letter-spacing:1.5px; margin:6px 0 12px;
         font-weight:600; }
.ok { color:var(--good); font-weight:600; } .err { color:var(--bad); font-weight:600; }

/* ---- the burger: wide screens fold the menu away; phones slide it in over the page ---- */
body.nav-closed nav.side { margin-left:calc(-1 * var(--nav-w)); }
.scrim { display:none; }
@media (max-width:900px) {
  nav.side { position:fixed; left:0; z-index:20; margin-left:calc(-1 * var(--nav-w)); }
  body.nav-open nav.side { margin-left:0; box-shadow:0 0 24px rgba(0,0,0,.25); }
  body.nav-open .scrim { display:block; position:fixed; inset:0; background:rgba(0,0,0,.3); z-index:15; }
  .page { padding:0 16px 32px; }
}

/* ---- who is signed in, and sign out (menu foot) ---- */
nav.side .foot .who { font-size:12px; color:#fff; margin-bottom:8px; }
nav.side .foot .who span { color:rgba(255,255,255,.55); }
nav.side .foot .signout { background:none; border:1px solid rgba(255,255,255,.3); color:#fff; border-radius:8px;
                          padding:5px 12px; font:inherit; font-size:11px; cursor:pointer; margin-bottom:14px; }
nav.side .foot .signout:hover { border-color:var(--gold); }

/* ---- sign-in pages: one card on the Bastille green ---- */
body.auth { background:var(--side); align-items:center; justify-content:center; padding:24px 16px; }
.auth-card { background:var(--card); border-radius:14px; padding:32px 28px; width:100%; max-width:380px;
             text-align:center; box-shadow:0 10px 40px rgba(0,0,0,.25); }
.auth-logo { width:170px; max-width:70%; height:auto; }
.auth-name { font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--dim); margin:4px 0 14px; }
.auth-env { display:inline-block; margin:0 0 12px; }
.auth-title { font-size:20px; color:var(--side); margin:6px 0 18px; }
.auth-text { font-size:14px; line-height:1.5; margin-bottom:14px; text-align:left; }
.btn-google { width:100%; display:flex; align-items:center; justify-content:center; gap:10px; padding:11px;
              border:1px solid var(--edge); border-radius:8px; background:#fff; font:inherit; font-size:14px;
              font-weight:600; color:var(--ink); cursor:pointer; }
.btn-google:hover { border-color:var(--side); }
.auth-or { position:relative; margin:18px 0; font-size:11.5px; color:var(--dim); }
.auth-or::before { content:""; position:absolute; left:0; right:0; top:50%; border-top:1px solid var(--edge); }
.auth-or span { position:relative; background:var(--card); padding:0 10px; }
.auth-form { text-align:left; }
.auth-form label { display:block; font-size:12px; font-weight:600; color:var(--dim); margin-bottom:12px; }
.auth-form input[type=email], .auth-form input[type=password] { display:block; width:100%; margin-top:4px; padding:10px;
              border:1px solid var(--edge); border-radius:8px; font:inherit; font-size:14px; color:var(--ink); }
.auth-form input:focus { outline:2px solid var(--gold); border-color:transparent; }
.auth-check { display:flex !important; align-items:center; gap:8px; font-weight:400 !important; }
.btn-primary { display:block; width:100%; padding:11px; border:none; border-radius:8px; background:var(--side);
               color:#fff; font:inherit; font-size:14px; font-weight:600; cursor:pointer; text-decoration:none; }
.btn-primary:hover { background:#0f261d; }
.auth-error { background:#fbe9e7; color:var(--bad); border-radius:8px; padding:10px; font-size:13px; margin-bottom:12px; }
.auth-foot { font-size:12px; color:var(--dim); margin-top:14px; }
.auth-foot a { color:var(--side); }

/* ---- lists, forms, notes (Admin pages) ---- */
.bar { display:flex; align-items:center; gap:16px; margin-bottom:14px; flex-wrap:wrap; }
.btn { display:inline-block; background:var(--side); color:#fff; border:none; border-radius:8px; padding:9px 16px;
       font:inherit; font-size:13px; font-weight:600; text-decoration:none; cursor:pointer; }
.btn:hover { background:#0f261d; }
.btn-quiet { background:#fff; color:var(--bad); border:1px solid var(--bad); }
.btn-quiet:hover { background:#fbe9e7; }
.link { color:var(--side); font-size:13px; font-weight:600; text-decoration:none; }
.link:hover { text-decoration:underline; }
.crumbs { margin-bottom:12px; }
.table-card { padding:0; overflow-x:auto; }   /* wide tables scroll sideways instead of being cut off */
table.grid { width:100%; border-collapse:collapse; font-size:13px; }
table.grid th { text-align:left; vertical-align:bottom; font-size:11px; letter-spacing:1px; text-transform:uppercase; color:var(--dim);
                padding:12px 14px; border-bottom:1px solid var(--edge); background:#fafbfa; }
table.grid td { padding:12px 14px; border-bottom:1px solid var(--edge); vertical-align:top; }
table.grid tr:last-child td { border-bottom:none; }
table.grid tr.archived td { color:var(--dim); }
table.grid .sub { font-size:11.5px; color:var(--dim); margin-top:3px; }
table.grid .actions { text-align:right; white-space:nowrap; }
code { font-family:Consolas,monospace; font-size:12px; background:#eef2f0; padding:2px 6px; border-radius:5px; }
.badge { display:inline-block; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.5px;
         background:#eee; color:var(--dim); border-radius:8px; padding:1px 7px; margin-left:6px; }
.badge-dim { background:#fff4e0; color:#9a6b12; }
.badge-opening_soon { background:#e3f1f0; color:#2b7a72; } .badge-closed { background:#eee; color:var(--dim); }
.badge-open { background:#e6f5ee; color:#16724a; }
table.grid td .badge:first-child { margin-left:0; }

/* ---- filter buttons, top right of a table (decision 33) ---- */
.chips { margin-left:auto; display:flex; flex-wrap:wrap; gap:6px; }
.chip { font-size:12px; font-weight:600; color:var(--dim); text-decoration:none; background:#fff;
        border:1px solid var(--edge); border-radius:16px; padding:5px 12px; }
.chip:hover { border-color:var(--side); color:var(--side); }
.chip.active { background:var(--side); border-color:var(--side); color:#fff; }
.chip .n { font-weight:400; opacity:.75; margin-left:3px; }

/* ---- sortable column titles ---- */
table.grid th button.sort { all:unset; cursor:pointer; display:inline-flex; align-items:center; gap:4px; }
table.grid th button.sort:hover, table.grid th button.sort:focus-visible { color:var(--side); }
table.grid th button.sort:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
table.grid th .arrow::after { content:"↕"; opacity:.35; font-size:11px; }
table.grid th[aria-sort=ascending] .arrow::after { content:"▲"; opacity:1; color:var(--side); font-size:9px; }
table.grid th[aria-sort=descending] .arrow::after { content:"▼"; opacity:1; color:var(--side); font-size:9px; }
.empty { padding:22px; color:var(--dim); }
.note { border-radius:8px; padding:10px 14px; margin-bottom:14px; font-size:13px; }
.note-success { background:#e6f5ee; color:#16724a; } .note-info { background:#eef2f0; color:var(--ink); }
.note-error { background:#fbe9e7; color:var(--bad); }
.form-card { max-width:760px; }
.form-card h2.sec { margin-top:18px; } .form-card h2.sec:first-of-type { margin-top:0; }
.fields { display:grid; gap:4px 18px; }
.fields.two { grid-template-columns:1fr 1fr; }
.fields.three { grid-template-columns:1fr 1.4fr 1.4fr; }
.fields.address { grid-template-columns:2fr 1.2fr .5fr .8fr; }
.field { margin-bottom:12px; }
.field label { display:block; font-size:12px; font-weight:600; color:var(--dim); margin-bottom:4px; }
.field.check label { display:flex; align-items:center; gap:8px; color:var(--ink); font-size:13px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width:100%; padding:9px 10px; border:1px solid var(--edge); border-radius:8px; font:inherit; font-size:14px; color:var(--ink); }
.field input:focus, .field select:focus { outline:2px solid var(--gold); border-color:transparent; }
.field .help { font-size:11.5px; color:var(--dim); margin-top:4px; line-height:1.4; }
.field .req { color:var(--bad); }
.field.has-error input { border-color:var(--bad); }
.err-msg { font-size:12px; color:var(--bad); margin-top:4px; font-weight:600; }
.form-error { background:#fbe9e7; color:var(--bad); border-radius:8px; padding:10px; font-size:13px; margin-bottom:12px; }
.form-actions { display:flex; align-items:center; gap:16px; margin-top:10px; }
.danger-card { max-width:760px; border-color:#f3d3cd; } .danger-card p { font-size:13px; margin-bottom:10px; }
@media (max-width:900px) {
  .fields.two, .fields.three, .fields.address { grid-template-columns:1fr; }
  /* On a phone each table row becomes a small card. */
  table.grid thead { display:none; }
  table.grid tr { display:block; border-bottom:1px solid var(--edge); padding:8px 0; }
  table.grid td { display:block; border:none; padding:4px 14px; }
  table.grid td[data-label]::before { content:attr(data-label); display:block; font-size:10px; letter-spacing:1px;
                                      text-transform:uppercase; color:var(--dim); }
  table.grid .actions { text-align:left; }
}

/* ---- Users page ---- */
.chip-rows { margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.chip-rows .chips { margin-left:0; }
.scope-note, .help-line { font-size:12.5px; color:var(--dim); margin:0 0 12px; }
.checks { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:6px 16px;
          border:1px solid var(--edge); border-radius:8px; padding:10px 12px; }
.check-item { display:flex !important; align-items:center; gap:8px; font-weight:400 !important; color:var(--ink) !important;
              font-size:13px !important; margin:0 !important; }
.error-id { font-family:Consolas,monospace; font-size:20px; font-weight:700; letter-spacing:2px; color:var(--side);
            background:#eef2f0; border-radius:8px; padding:10px; margin:0 0 16px; }
@media (max-width:900px) { .chip-rows { margin-left:0; align-items:flex-start; } }

/* ---- Sections & access grid ---- */
table.grid .center { text-align:center; }
table.grid input[type=checkbox] { width:17px; height:17px; accent-color:var(--side); cursor:pointer; }
table.grid tfoot td { background:#fafbfa; border-top:2px solid var(--edge); }

/* ---- Financial Dashboards in the menu (decision 39): click the entry and its nine sections unfold
   beneath it on a slightly lighter green, pushing the entries below down. ---- */
nav.side .acc-head .caret { margin-left:auto; font-size:11px; opacity:.6; transition:transform .2s; }
nav.side .acc.open .acc-head .caret { transform:rotate(180deg); }
nav.side .acc-body { display:grid; grid-template-rows:0fr; transition:grid-template-rows .22s ease; background:#1E4436; }
nav.side .acc.open .acc-body { grid-template-rows:1fr; }
nav.side .acc-body > div { overflow:hidden; }
nav.side .acc.open .acc-body > div { padding:4px 0 6px; }
nav.side a.sub { padding:9px 22px 9px 40px; font-size:12.5px; color:rgba(255,255,255,.7); }
nav.side a.sub.active { background:rgba(255,255,255,.1); }
nav.side a.sub .count { margin-left:auto; background:var(--bad); color:#fff; border-radius:10px; padding:1px 8px;
                        font-size:10.5px; font-weight:700; }
nav.side a.sub .count[hidden] { display:none; }

/* ---- the dashboard page: the Scorecard fills the content area, under the intranet's own top bar ---- */
body.dash .page { display:flex; flex-direction:column; height:100vh; padding-bottom:0; }
body.dash .topbar { margin-bottom:0; }
.dash-frame { flex:1; min-height:0; margin:0 -24px; }
.dash-frame iframe { display:block; width:100%; height:100%; border:0; }
@media (max-width:900px) { .dash-frame { margin:0 -16px; } }

/* ---- Upload FS (decision 40): the live log of an upload ---- */
nav.side a.sub.tool { border-top:1px solid rgba(255,255,255,.08); margin-top:4px; padding-top:11px; }
.progress { height:4px; border-radius:2px; background:var(--edge); overflow:hidden; margin:4px 0 14px; }
.progress span { display:block; height:100%; width:35%; background:var(--gold); border-radius:2px;
                 animation:slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { margin-left:-35%; } 100% { margin-left:100%; } }
ol.steps { list-style:none; font-size:13px; line-height:1.5; }
ol.steps li { display:flex; gap:10px; padding:5px 0; border-bottom:1px solid var(--edge); white-space:pre-wrap;
              font-variant-numeric:tabular-nums; }
ol.steps li:last-child { border-bottom:none; }
ol.steps li time { color:var(--dim); font-size:11.5px; flex:none; padding-top:1px; }
ol.steps li::before { flex:none; width:16px; text-align:center; font-weight:700; }
ol.steps li.info::before { content:"•"; color:var(--dim); }
ol.steps li.ok::before { content:"✓"; color:var(--good); }
ol.steps li.warn::before { content:"!"; color:var(--warn); }
ol.steps li.error::before { content:"✗"; color:var(--bad); }
ol.steps li.warn { background:#fff8e8; } ol.steps li.error { color:var(--bad); }
.import-result { margin-top:14px; font-size:14px; line-height:1.6; }
.import-result .error-num { font-family:Consolas,monospace; font-size:16px; letter-spacing:1px; }

/* ---- Upload FS: the drop zone. Drop files on it or click to choose; each file added is listed. ---- */
.dropzone { border:2px dashed #b9c4be; border-radius:12px; padding:18px; background:#fafbfa; margin-bottom:12px;
            transition:border-color .15s, background .15s; }
.dropzone.ready { cursor:pointer; }
.dropzone.over { border-color:var(--gold); background:#fff8e8; }
.dropzone input[type=file] { display:block; font:inherit; font-size:13px; }
.dropzone.ready input[type=file] { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; }
.dz-text { font-size:14px; color:var(--ink); }
.dz-text .dz-or { color:var(--dim); }
.dz-choose { all:unset; color:var(--side); font-weight:700; text-decoration:underline; cursor:pointer; }
.dz-choose:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.dz-hint { font-size:12px; color:var(--dim); margin-top:6px; }
ul.dz-list { list-style:none; margin-top:10px; font-size:13px; }
ul.dz-list li { display:flex; align-items:center; gap:10px; padding:7px 10px; background:#fff; border:1px solid var(--edge);
                border-radius:8px; margin-bottom:6px; word-break:break-all; }
ul.dz-list li .dz-name { flex:1; }
ul.dz-list li .dz-size { color:var(--dim); font-size:11.5px; white-space:nowrap; }
ul.dz-list li .dz-remove { all:unset; cursor:pointer; color:var(--dim); font-size:15px; line-height:1; padding:0 4px; }
ul.dz-list li .dz-remove:hover { color:var(--bad); }
.btn[disabled] { opacity:.45; cursor:not-allowed; }

/* ---- Tip-Out Sheets (decision 41): Settings tables with inputs in the cells ---- */
table.grid td input[type=text], table.grid td select { width:100%; min-width:70px; padding:6px 8px; border:1px solid var(--edge);
  border-radius:6px; font:inherit; font-size:13px; }
table.grid td input[size="4"], table.grid td input[size="6"], table.grid td input[size="7"] { width:auto; }
table.grid tr.new-row td { background:#fafbfa; }
nav.side a.sub.soon { pointer-events:none; color:rgba(255,255,255,.35); }

/* ---- dense tables (Tip-Out Settings): an Excel-like grid, little padding, sortable, with a filter box ---- */
.table-tools { display:flex; gap:10px; padding:8px 10px; border-bottom:1px solid var(--edge); background:#fafbfa; }
.table-tools input.table-filter, .table-tools select.table-filter { padding:5px 8px; border:1px solid var(--edge); border-radius:6px; font:inherit; font-size:12.5px; width:240px; max-width:100%; background:#fff; }
.table-tools label { font-size:12.5px; color:var(--dim); display:flex; align-items:center; gap:6px; }
.dense table.grid { font-size:12.5px; border-collapse:collapse; }
.dense table.grid th { padding:6px 8px; font-size:10px; border-right:1px solid var(--edge); background:#f3f5f4; }
.dense table.grid td { padding:2px 4px; border-bottom:1px solid var(--edge); border-right:1px solid var(--edge); vertical-align:middle; }
.dense table.grid tr > *:last-child { border-right:none; }
.dense table.grid td input[type=text], .dense table.grid td select { padding:3px 6px; border:1px solid transparent; border-radius:3px; background:transparent; font-size:12.5px; }
.dense table.grid td input[type=text]:hover, .dense table.grid td select:hover { border-color:var(--edge); background:#fff; }
.dense table.grid td input[type=text]:focus, .dense table.grid td select:focus { outline:2px solid var(--gold); border-color:transparent; background:#fff; }
.dense table.grid tfoot td { background:#fafbfa; border-top:2px solid var(--edge); padding:4px; }
.btn-small { padding:5px 10px; font-size:12px; }

/* ---- the bottom bar of a long form: stays in view while the page scrolls ---- */
.actionbar { position:sticky; bottom:0; z-index:4; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
             background:var(--bg); border-top:1px solid var(--edge); padding:12px 24px; margin:6px -24px -40px;
             box-shadow:0 -6px 16px rgba(0,0,0,.05); }
@media (max-width:900px) { .actionbar { margin-left:-16px; margin-right:-16px; padding-left:16px; padding-right:16px; } }

/* ---- the daily tip-out sheet (decision 41, step C) ---- */
.linkbtn { all:unset; cursor:pointer; color:var(--side); font-size:13px; font-weight:600; }
.linkbtn:hover { text-decoration:underline; }
.pair { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:900px) { .pair { grid-template-columns:1fr; } }
.pair .card { margin-bottom:16px; }
.kv { display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-bottom:1px solid var(--edge); font-size:13px; }
.kv.big { font-size:16px; }
.kv:last-child { border-bottom:none; }
td.num, th.num, table.grid th.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }   /* table.grid th sets left; the num title must win */
table.tipout-table td.calc { background:#f6f8f7; color:var(--dim); }
table.tipout-table td.calc.total { color:var(--ink); font-weight:700; }
table.tipout-table tr.section-row td { background:#e9efec; color:var(--side); font-weight:700; font-size:11px; letter-spacing:1px; text-transform:uppercase; padding:5px 8px; }
table.tipout-table tr.totals td { font-weight:700; background:#f3f5f4; }
table.tipout-table td input[type=text] { width:84px; }
table.tipout-table td .check-item { font-size:12px !important; }
.table-tools.pot { justify-content:flex-start; font-size:12.5px; color:var(--dim); border-top:1px solid var(--edge); border-bottom:none; }
table.grid.dense-rows td { padding:3px 6px; border-bottom:1px solid var(--edge); }
table.grid.dense-rows td input[type=text] { padding:4px 6px; border:1px solid var(--edge); border-radius:4px; font:inherit; font-size:13px; width:100%; }
textarea { width:100%; padding:8px 10px; border:1px solid var(--edge); border-radius:8px; font:inherit; font-size:13px; color:var(--ink); }
textarea:focus, .field input:focus { outline:2px solid var(--gold); border-color:transparent; }
.field input[list], .field input[type=text] { width:100%; padding:9px 10px; border:1px solid var(--edge); border-radius:8px; font:inherit; font-size:14px; }

/* the sheet tabs at the bottom, like the workbook's */
.daytabs { display:flex; align-items:flex-end; gap:2px; flex-wrap:wrap; border-bottom:2px solid var(--side); margin:0 0 14px; }
.daytabs .tab { font-size:12px; font-weight:600; color:var(--dim); text-decoration:none; background:#fff; border:1px solid var(--edge);
                border-bottom:none; border-radius:6px 6px 0 0; padding:6px 12px; }
.daytabs .tab:hover { color:var(--side); }
.daytabs .tab.active { background:var(--side); color:#fff; border-color:var(--side); }
.daytabs .tab.settings { margin-left:auto; }
.tab-status { font-size:11.5px; color:var(--dim); margin-left:10px; }
.tab-status.ok { color:var(--good); } .tab-status.err { color:var(--bad); font-weight:700; } .tab-status.saving { color:var(--warn); }

/* ---- the row you are on (Javier, 2026-09-23): click any cell and the whole line turns bone ---- */
:root { --bone: #F7F3EA; }
table.grid tbody tr.current > td, table.grid tfoot tr.current > td { background: var(--bone) !important; }
table.grid tr.current td input[type=text], table.grid tr.current td select { background: #fff; }

/* ---- the managers' guide ---- */
.guide p, .guide li { font-size: 14px; line-height: 1.6; }
.guide ul { padding-left: 22px; margin: 0 0 10px; }
.guide h2.sec { margin-top: 18px; }

/* Employee Sheet (decision 42): tabs on the left, one vertical PAYROLL INFORMATION table per tab;
   ?print=1 shows every tab as its own page (the browser's Save as PDF makes the PDF). */
.esheet { display:grid; grid-template-columns:150px 1fr; gap:16px; align-items:start; }
.vtabs { display:flex; flex-direction:column; gap:3px; position:sticky; top:12px; }
.vtabs .vtab { text-align:left; font:inherit; font-size:12.5px; font-weight:600; color:var(--dim); background:#fff; border:1px solid var(--edge);
  border-radius:8px; padding:7px 10px; cursor:pointer; }
.vtabs .vtab:hover { color:var(--side); }
.vtabs .vtab.active { background:var(--side); color:#fff; border-color:var(--side); }
.vtabs .vtab.off { opacity:.55; font-weight:500; }
.panels .panel { display:none; }
.panels .panel.active, .esheet.all .panels .panel { display:block; }
.esheet.all { grid-template-columns:1fr; }
.esheet.all .panel { margin-bottom:28px; page-break-after:always; break-after:page; }
.esheet.all .panel:last-child { page-break-after:auto; break-after:auto; }
/* Javier, 2026-09-24: the sheet takes 80% of the area; both columns read from the left. */
.ph { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 18px; padding:14px 18px 10px; border:1px solid var(--edge); border-bottom:none;
  border-radius:12px 12px 0 0; background:#fff; width:80%; }
.ph .brandline { font-family:"Playfair Display",Georgia,serif; font-size:22px; font-weight:700; color:var(--side); width:100%; }
.ph .co { font-size:12px; color:var(--dim); }
table.vtable { width:80%; border-collapse:collapse; background:#fff; border:1px solid var(--edge); border-radius:0 0 12px 12px; overflow:hidden; }
table.vtable caption { caption-side:top; text-align:left; background:#fff; border:1px solid var(--edge); border-bottom:none; padding:0; }
table.vtable caption .cap { display:block; background:var(--side); color:#fff; font-weight:700; letter-spacing:1.5px; font-size:14px; padding:10px 18px; }
table.vtable caption .note { display:block; font-size:11.5px; font-style:italic; color:var(--dim); padding:8px 18px 0; }
table.vtable caption .sub { display:block; font-size:12.5px; font-weight:600; color:var(--side); padding:4px 18px 10px; }
table.vtable th, table.vtable td { padding:9px 18px; border-top:1px solid var(--edge); font-size:13px; }
table.vtable th { text-align:left; width:52%; background:var(--bone); color:var(--side); font-weight:600; }
table.vtable td.num { text-align:left; font-variant-numeric:tabular-nums; }
table.vtable tr:last-child th, table.vtable tr:last-child td { border-bottom:2px solid var(--side); }
body.print-view .ph { break-inside:avoid; }
@media print {
  nav.side, .bar, .noprint, .topbar, .burger { display:none !important; }
  body { background:#fff; }
  main, .main, .content { margin:0 !important; padding:0 !important; max-width:none !important; }
  .esheet { display:block; }
  .panels .panel { display:block; page-break-after:always; break-after:page; }
  .panels .panel:last-child { page-break-after:auto; }
  .card, .ph, table.vtable { box-shadow:none; }
}
@media (max-width: 700px) { .esheet { grid-template-columns:1fr; } .vtabs { flex-direction:row; flex-wrap:wrap; position:static; } .ph, table.vtable { width:100%; } }


/* Export selector (Employee Sheet): one button on the right of the bar that opens Excel | PDF. */
.bar details.export { margin-left:auto; position:relative; }
.bar details.export summary { list-style:none; cursor:pointer; user-select:none; }
.bar details.export summary::-webkit-details-marker { display:none; }
.bar details.export summary .caret { font-size:11px; margin-left:4px; }
.bar details.export[open] summary .caret { display:inline-block; transform:rotate(180deg); }
.export-menu { position:absolute; right:0; top:calc(100% + 6px); min-width:250px; background:#fff; border:1px solid var(--edge);
  border-radius:10px; box-shadow:0 8px 24px rgba(23,52,40,.14); padding:6px; z-index:20; }
.export-menu a { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; text-decoration:none; color:var(--ink); }
.export-menu a:hover { background:var(--bone); }
.export-menu .ico { font-size:20px; width:28px; text-align:center; }
.export-menu b { display:block; font-size:13px; color:var(--side); }
.export-menu small { display:block; font-size:11.5px; color:var(--dim); }

/* Cash Reimbursements (decision 43): tabs across the top, one block per manager like the Excel report. */
.vtabs.htabs { flex-direction:row; flex-wrap:wrap; position:static; margin-bottom:14px; }
.vtabs.htabs .vtab .n { font-weight:500; opacity:.75; margin-left:6px; }
.cer-head { background:#fff; border:1px solid var(--edge); border-radius:12px; padding:14px 18px; margin-bottom:12px; }
.cer-head .h1 { font-size:12px; letter-spacing:2px; color:var(--dim); font-weight:700; }
.cer-head .h2 { font-family:"Playfair Display",Georgia,serif; font-size:20px; color:var(--side); font-weight:700; }
.cer-head .h3 { font-size:12.5px; letter-spacing:1.5px; color:var(--side); font-weight:700; margin-top:2px; }
.cer-head .dates { display:flex; gap:22px; flex-wrap:wrap; margin-top:8px; font-size:12.5px; color:var(--dim); }
.cer-head .dates .right { margin-left:auto; }
.cer-block { margin-bottom:14px; }
.cer-mgr { align-items:center; flex-wrap:wrap; gap:8px 16px; font-size:12.5px; }
.cer-mgr .lbl { font-weight:700; color:var(--side); letter-spacing:1px; font-size:11.5px; }
.cer-mgr .who { font-size:14px; color:var(--side); }
.cer-mgr label { display:flex; align-items:center; gap:6px; color:var(--dim); }
.cer-mgr select, .cer-mgr input { font:inherit; font-size:12.5px; padding:4px 8px; border:1px solid var(--edge); border-radius:6px; background:#fff; }
.cer-mgr select.pay-via { font-weight:600; color:var(--side); }
.cer-mgr select.pay-via.off { color:var(--warn); }
.cer-mgr .saved { margin-left:auto; }
.cer-mgr .saved.ok { color:var(--good); }

/* The receipt pop-up (Cash Reimbursements). */
.lightbox { position:fixed; inset:0; background:rgba(23,52,40,.55); display:flex; align-items:center; justify-content:center; z-index:100; padding:20px; }
.lightbox[hidden] { display:none; }
.lb-card { background:#fff; border-radius:12px; max-width:min(960px, 96vw); max-height:94vh; display:flex; flex-direction:column; box-shadow:0 18px 50px rgba(0,0,0,.35); overflow:hidden; }
.lb-bar { display:flex; align-items:center; gap:14px; padding:10px 14px; background:var(--side); color:#fff; font-size:13px; }
.lb-title { font-weight:600; flex:1; }
.lb-open { color:#fff; opacity:.85; font-size:12.5px; }
.lb-close { background:none; border:none; color:#fff; font-size:22px; line-height:1; cursor:pointer; padding:0 4px; }
.lb-body { overflow:auto; background:#111; display:flex; align-items:center; justify-content:center; min-width:320px; min-height:200px; }
.lb-body img { max-width:100%; max-height:calc(94vh - 44px); display:block; }
.lb-body img[hidden] { display:none; }
.lb-wait { color:#ddd; font-size:13px; padding:40px; }
body.lb-on { overflow:hidden; }

/* Payroll Reports (decision 44): the typed columns on the Edit screen; reimbursement-only rows. */
#payroll td.typed { background:#fffdf4; padding:2px 6px; }
#payroll td.typed input.cell { width:86px; text-align:right; font:inherit; font-size:12.5px; padding:4px 6px; border:1px solid var(--edge); border-radius:6px; background:#fff; }
#payroll td.typed input.cell:focus { border-color:var(--side); outline:none; }
#payroll td.typed input.cell.err { border-color:var(--bad); }
#payroll tr.standalone td { color:var(--dim); font-style:italic; }
#payroll .saved.ok { color:var(--good); }

/* "What the build found" on a payroll report: four groups, lists, figures aligned. */
.found { margin-top:14px; padding:0; }
.found > summary { cursor:pointer; list-style:none; padding:14px 18px; margin:0; display:flex; align-items:baseline; gap:12px; }
.found > summary::-webkit-details-marker { display:none; }
.found > summary::before { content:"▸"; color:var(--dim); font-size:12px; }
.found[open] > summary::before { content:"▾"; }
.found > summary .sub { font-weight:400; text-transform:none; letter-spacing:0; }
.found-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:0; border-top:1px solid var(--edge); }
.found-grid section { padding:14px 18px; border-right:1px solid var(--edge); border-bottom:1px solid var(--edge); font-size:12.5px; }
.found-grid h4 { font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--side); margin:0 0 8px; }
.found-grid h5 { font-size:12px; color:var(--dim); font-weight:600; margin:10px 0 4px; }
.found-grid ul { margin:0; padding-left:18px; }
.found-grid li { margin:2px 0; }
.found-grid .num { font-variant-numeric:tabular-nums; font-weight:600; }
.found-grid .arrow { color:var(--dim); padding:0 4px; }
.found-grid ul.chips-list { list-style:none; padding:0; display:flex; flex-wrap:wrap; gap:4px; }
.found-grid ul.chips-list li { background:var(--bone); border:1px solid var(--edge); border-radius:6px; padding:2px 8px; font-family:Consolas,monospace; font-size:11.5px; }
.found-grid dl.kv { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:0; }
.found-grid dl.kv dt { color:var(--dim); }
.found-grid dl.kv dd { margin:0; }
.found-grid details.names { margin-top:8px; }
.found-grid details.names > summary { cursor:pointer; }
.found-grid dl.kv code { font-size:11.5px; }
#payroll table.grid th { white-space:normal; }
#payroll table.grid td:first-child { white-space:nowrap; }
#payroll td.typed input.cell { width:72px; }
