/* PAS V1 — Bellecitta design system, palette "Twilight, daylight".
   Company colors stay dominant: royal blue #143694 and navy #0F1729 (navy is the
   text color). Lighter blues, periwinkle, teal and aqua keep the screen open.
   Surfaces fade from lighter at the top to a little deeper at the bottom. */
:root {
  --brand: #143694;
  --brand-hi: #3A6BE0;          /* bright royal, top of fades */
  --brand-mid: #2552C4;
  --brand-lo: #1D46A8;          /* bottom of fades (no navy) */
  --sky: #6FA8E8;
  --periwinkle: #7C8CE6;
  --teal: #3DB5C6;
  --teal-dark: #1F8A9C;
  --aqua: #8FE3EC;
  --ice: #DDEFF6;
  --mist: #F7FBFE;
  --brand-dark: #0F1729;        /* navy */
  --brand-soft: #EAF0FD;
  --brand-line: #C9D6F5;
  --accent: #3C83F6;
  --text: #0F1729;
  --muted: #606876;
  --faint: #8A93A3;
  --border: #E1E6EF;
  --card: #FFFFFF;
  --ok-bg: #E8F6EE;   --ok: #1E6B3A;   --ok-line: #BFE3CB;   --ok-dot: #2E9A5B;
  --warn-bg: #FFF6E6; --warn: #8A5300; --warn-line: #F2D9A6; --warn-dot: #E0A526;
  --bad-bg: #FDECEC;  --bad: #A12B2B;  --bad-line: #F3C4C4;  --bad-dot: #D14343;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 41, .05);
  --shadow-lg: 0 12px 32px rgba(15, 23, 41, .14);
  --fade-royal: radial-gradient(120% 50% at 0% 0%, rgba(130, 210, 230, .35) 0%, rgba(130, 210, 230, 0) 60%),
                linear-gradient(180deg, var(--brand-hi) 0%, var(--brand-mid) 55%, var(--brand-lo) 100%);
  --fade-light: radial-gradient(80% 120% at 100% 0%, rgba(143, 227, 236, .28) 0%, rgba(143, 227, 236, 0) 55%),
                linear-gradient(180deg, #F2FBFC 0%, #DDEFF6 60%, #D3E6F7 100%);
  --fade-card: linear-gradient(180deg, #FFFFFF 0%, #F5F9FE 100%);
  --edge: linear-gradient(180deg, #C7DDEF 0%, #E4ECF3 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { overflow-wrap: break-word;   /* a word longer than its box wraps instead of spilling out (Oct 6) */
       font-family: "DM Sans", "Segoe UI", system-ui, sans-serif; color: var(--text); font-size: 15px;
       line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
       background: linear-gradient(180deg, #F7FBFE 0%, #EFF6FA 55%, #EAF3F8 100%) fixed; }
h1, .serif { font-family: "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: .1px; }
h1 { font-size: 28px; margin: 0; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 500; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px;
     color: var(--brand-dark); }
h2 .i { color: var(--brand); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .25em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num-cell, .r { text-align: right; font-variant-numeric: tabular-nums; }

/* Icons */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
     stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.i.sm { width: 15px; height: 15px; vertical-align: -3px; }
.i.lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- frame */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { color: #DCE7FB; padding: 20px 14px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
        display: flex; flex-direction: column;
        background: var(--fade-royal); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
/* Oct 23 (Richard): the Bellecitta logo at the top of the side menu, "Payroll Automation System" under it. */
.brand:has(> img) { flex-direction: column; align-items: flex-start; gap: 4px; }
.brand > img { width: 176px; height: auto; }
.brand > img + .sub { padding-left: 2px; }
.top-mark { display: none; height: 32px; width: auto; }
.brand .mk { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(180deg, #fff, #E4EBFB);
             color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.brand .name { font-family: "Playfair Display", Georgia, serif; font-size: 20px; color: #fff; line-height: 1.1; }
.brand .sub { font-size: 11.5px; color: #BFD3F7; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sec { font-size: 10.5px; letter-spacing: 1px; color: #A9C4F5; padding: 14px 12px 6px; text-transform: uppercase; }
.side a, .side .btn.link { display: flex; align-items: center; gap: 11px; color: #E3ECFC; text-decoration: none;
          padding: 8px 12px; border-radius: var(--radius); font-size: 14.5px; }
.side a:hover, .side .btn.link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side a.on { background: linear-gradient(90deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .07)); color: #fff;
             font-weight: 500; box-shadow: inset 3px 0 0 var(--aqua); }
.me { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 12px; }
.me .who { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.me .who .n { color: #fff; font-size: 13.5px; line-height: 1.2; }
.me .who .r { color: #BFD3F7; font-size: 11.5px; text-align: left; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(180deg, #fff, #DCE5FA); color: var(--brand);
          display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex: none; }
.me a, .me .btn.link { font-size: 13.5px; padding: 7px 12px; }

.content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
          justify-content: space-between; padding: 10px 34px; background: rgba(255, 255, 255, .86);
          backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.company-pick { display: flex; align-items: center; gap: 8px; color: var(--brand-dark); font-weight: 500; }
.company-pick select { padding: 6px 10px; }
/* Oct 10 (Richard, a 32-inch screen): the page uses the whole width next to the menu (tables show more
   columns); explanation paragraphs keep a comfortable reading width. */
.main { padding: 24px 34px 48px; max-width: none; }
.main > p, .main > .notice, .main > .flash, .main > .errors { max-width: 1100px; }
.bar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: flex-start; margin-bottom: 18px; }   /* Oct 21: buttons right after their text */

/* ---------------------------------------------------------------- banner */
.hero { border-radius: 16px; padding: 22px 26px; color: var(--text); margin-bottom: 20px; background: var(--fade-light);
        border: 1px solid #CBE3EE; box-shadow: 0 6px 20px rgba(31, 138, 156, .08); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
               background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 40%); }
.hero .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
             position: relative; z-index: 1; }
.hero .eyebrow { font-size: 11px; letter-spacing: 1.2px; color: var(--teal-dark); text-transform: uppercase; font-weight: 700; }
.hero h1 { color: var(--brand-dark); margin: 3px 0 4px; }
.hero .meta { color: #3E5470; font-size: 14px; }
.hero .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero .btn { background: rgba(255, 255, 255, .85); }
.hero .btn.primary { background: linear-gradient(180deg, var(--brand-hi), var(--brand-mid) 60%, var(--brand-lo));
                     color: #fff; border-color: var(--brand-lo); font-weight: 700; }
.hero select { background: rgba(255, 255, 255, .95); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 1; }
.chip { font-size: 12.5px; padding: 3px 11px; border-radius: 999px; background: #EAF0FD; color: var(--brand-lo);
        display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.chip.warn::before, .chip.ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.chip.warn { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.chip.ok { background: #E8F6F8; color: #1F6E7E; }
.chip.warn::before { background: var(--warn-dot); }
.chip.ok::before { background: var(--teal); }
a.chip:hover { filter: brightness(.97); }

/* ---------------------------------------------------------------- surfaces */
.card, .table-wrap, fieldset, .stat {
  border: 1px solid transparent; border-radius: var(--radius-lg); box-shadow: var(--shadow), inset 0 1px 0 #fff;
  background: var(--fade-card) padding-box, var(--edge) border-box; }
.card { padding: 18px 22px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.stat .ic { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(180deg, #EEF8FB, #DCEEF5);
            color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stat .lbl { font-size: 11px; letter-spacing: .7px; color: var(--muted); text-transform: uppercase; }
.stat .small { font-size: 11px; letter-spacing: .7px; text-transform: uppercase; }
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--muted); }
.stat .small-n { font-size: 17px; padding: 4px 0 2px; }
/* Status cards: a top accent line carries the meaning. */
.stat.warn { border-top: 3px solid var(--warn-dot); background: linear-gradient(180deg, #FFFDF8, #FFF3DE) padding-box,
             linear-gradient(180deg, var(--warn-dot), var(--warn-line)) border-box; color: var(--warn); }
.stat.warn .ic { background: linear-gradient(180deg, #FFF3DA, #FCE3B3); color: var(--warn); }
.stat.warn .lbl, .stat.warn .sub { color: var(--warn); }
.stat.ok { border-top: 3px solid var(--ok-dot); background: linear-gradient(180deg, #FAFEFB, #EAF7EF) padding-box,
           linear-gradient(180deg, var(--ok-dot), var(--ok-line)) border-box; color: var(--ok); }
.stat.ok .ic { background: linear-gradient(180deg, #E6F6EC, #CDEDD9); color: var(--ok); }
.stat.ok .lbl, .stat.ok .sub { color: var(--ok); }

.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; padding: 8px 15px;
       border-radius: var(--radius); border: 1px solid #D5DBE5; background: linear-gradient(180deg, #fff, #F6F8FB);
       color: var(--text); cursor: pointer; text-decoration: none; line-height: 1.3; transition: filter .12s, border-color .12s; }
.btn:hover { border-color: #BCC5D3; filter: brightness(.99); }
.btn.primary { background: linear-gradient(180deg, var(--brand-hi), var(--brand) 60%, var(--brand-lo));
               border-color: var(--brand-lo); color: #fff; box-shadow: 0 1px 2px rgba(19, 44, 116, .25); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.small { font-size: 13px; padding: 5px 11px; gap: 5px; }
.btn.link { border: none; background: none; width: 100%; text-align: left; cursor: pointer; font: inherit; box-shadow: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 10px 2px 8px; border-radius: 999px;
        background: #EEF1F6; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #A7B0BF; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }      .pill.ok::before { background: var(--ok-dot); }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.warn::before { background: var(--warn-dot); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }    .pill.bad::before { background: var(--bad-dot); }
.flash { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); padding: 11px 15px;
         border-radius: var(--radius); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.errors { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); padding: 11px 15px;
          border-radius: var(--radius); margin-bottom: 16px; }
.errors ul { margin: 0; padding-left: 18px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #EDF0F5; vertical-align: top; }
th { font-size: 11px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); font-weight: 500;
     background: linear-gradient(180deg, #F9FAFD, #F1F4F9); border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr.click:hover td { background: var(--brand-soft); cursor: pointer; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.panel-head a { font-size: 13.5px; text-decoration: none; }
.panel-head.end { justify-content: flex-end; border-top: 1px solid #EDF0F5; }
.push { margin-left: auto; font-weight: 400; }
.inline-label { color: var(--muted); font-size: 14px; }
details.fold { margin-top: 12px; }
details.fold > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 7px;
                         color: var(--brand); font-weight: 500; font-size: 14px; padding: 6px 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 10px; }
details.fold .table-wrap { box-shadow: none; }
tr.found td { background: #FFF6E6; font-weight: 500; }
.spaced-sm { margin-top: 14px; }
.test-tag { background: #EEE8FB; color: #4B3A8A; }
.test-tag::before { background: #7B61C9; }

/* ---------------------------------------------------------------- forms */
form.stack label, .field { display: block; margin-bottom: 14px; }
label span, .field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { font: inherit; font-size: 14px; width: 100%; padding: 9px 12px; border: 1px solid #D5DBE5;
                          border-radius: var(--radius); background: #fff; color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: #BCC5D3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
                                            box-shadow: 0 0 0 3px rgba(60, 131, 246, .18); }
input[type=checkbox], select.auto { width: auto; }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
fieldset { padding: 16px 22px 8px; margin: 0 0 18px; }
legend { padding: 0 8px; font-weight: 500; color: var(--brand-dark); background: #fff; border-radius: 6px; }

/* ---------------------------------------------------------------- tabs, lists */
.tabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; background: rgba(255, 255, 255, .7); padding: 4px;
        border-radius: 12px; width: fit-content; max-width: 100%; border: 1px solid var(--border); }
.tabs a { padding: 7px 15px; text-decoration: none; color: var(--muted); border-radius: 9px; display: inline-flex;
          align-items: center; gap: 7px; font-size: 14px; }
.tabs a:hover { color: var(--brand-dark); }
.tabs a.on { color: #fff; background: linear-gradient(180deg, var(--brand-hi), var(--brand) 60%, var(--brand-lo)); font-weight: 500; }
/* Label | value (Oct 6): the label column narrows (down to 80px) before the value gets narrower than
   its longest word, so a word like MANAGEMENT never spills out of a narrow card. */
dl.kv { display: grid; grid-template-columns: minmax(80px, 170px) minmax(min-content, 1fr); gap: 8px 16px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 14px; }
dl.kv dd { margin: 0; }

/* Horizontal progress tracker */
.tracker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); position: relative; list-style: none;
           padding: 0; margin: 6px 0 0; }
.tracker::before { content: ""; position: absolute; left: 6.25%; right: 6.25%; top: 15px; height: 2px; background: #E1E6EF; }
.tracker li { position: relative; text-align: center; font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.tracker .dotc { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center;
                 justify-content: center; font-size: 13px; background: #fff; border: 2px solid #D5DBE5; position: relative; }
.tracker li.done .dotc { background: linear-gradient(180deg, #34A262, var(--ok)); border-color: var(--ok); color: #fff; }
.tracker li.todo .dotc { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px rgba(20, 54, 148, .12); }
.tracker li.todo { color: var(--text); font-weight: 500; }
.tracker li.later { color: var(--faint); }
.tracker li.later .dotc { color: var(--faint); }
.tracker a { text-decoration: none; color: inherit; }
.tracker a:hover { color: var(--brand); }
.tracker .st { display: block; font-size: 11.5px; font-weight: 400; margin-top: 2px; }
.tracker li.done .st { color: var(--ok); }
.tracker li.todo .st { color: var(--warn); }

details.report { position: relative; }
details.report summary { list-style: none; cursor: pointer; }
details.report summary::-webkit-details-marker { display: none; }
details.report .pop { position: absolute; right: 0; top: 44px; width: 340px; z-index: 5; box-shadow: var(--shadow-lg); }

.narrow { max-width: 560px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar label.inline { display: flex; align-items: center; gap: 6px; margin: 0; }
.toolbar label.inline input { flex: none; min-width: 0; width: auto; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-bottom: 16px; }
.flush { margin-top: 0; }
.table-wrap + .two, .table-wrap + p, p + .two { margin-top: 16px; }
.big { font-size: 26px; margin: 4px 0; font-weight: 500; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
label.check { display: flex; gap: 8px; align-items: center; margin-top: 24px; }
.temp { font-family: Consolas, monospace; font-size: 20px; letter-spacing: 1px; background: var(--brand-soft);
        color: var(--brand-dark); padding: 12px 16px; border-radius: var(--radius); display: inline-block; }
.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.suggest { margin-top: 5px; font-size: 13px; color: var(--brand); display: flex; gap: 6px; align-items: center; }
td.decide { min-width: 250px; }
td.decide .inline, td.decide > a, td.decide details { margin: 0 4px 4px 0; display: inline-block; vertical-align: top; }
details.note-box[open] { display: block; background: #F8FAFD; border: 1px solid var(--border); padding: 10px;
                         border-radius: var(--radius); }
details.note-box summary { list-style: none; cursor: pointer; }
details.note-box summary::-webkit-details-marker { display: none; }
.upload-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.upload-row label { flex: 1; min-width: 220px; margin: 0; }
.checklist { columns: 2 220px; }
.checklist label.check { margin: 0 0 8px; }
.spaced { margin-top: 28px; }
.ids .pill { margin: 0 4px 4px 0; }
tr.rest-row td { color: var(--faint); background: rgba(248, 250, 253, .7); }
.hint { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand-line);
        padding: 11px 14px; border-radius: var(--radius); font-size: 14px; margin: -4px 0 16px; }
.empty { text-align: center; padding: 26px 20px; color: var(--muted); }
.empty .i { width: 30px; height: 30px; color: var(--brand-line); display: block; margin: 0 auto 8px; }

/* ---------------------------------------------------------------- login */
/* The sign-in page (Oct 8, Richard's design): paper background, the site plan top right, the garden
   bottom left, the logo and name centered above a card with a light blue strip. */
.signin { position: relative; min-height: 100vh; overflow: hidden; background: #FBF9F4; display: grid; place-items: center; padding: 32px 16px; }
.signin-plan, .signin-garden { position: absolute; pointer-events: none; background-repeat: no-repeat; }
.signin-plan { top: 0; right: 0; width: min(46vw, 620px); height: min(70vh, 620px);
  background-image: url(/static/art/login-site-plan.webp); background-position: right top; background-size: contain; }
.signin-garden { left: 0; bottom: 0; width: min(36vw, 520px); height: min(62vh, 520px);
  background-image: url(/static/art/login-garden.webp); background-position: left bottom; background-size: contain; }
.signin-main { position: relative; z-index: 1; width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.signin-brand { text-align: center; }
.signin-logo { width: 280px; max-width: 80vw; height: auto; display: block; margin: 0 auto 10px; }
.signin-brand .name { font-family: "Playfair Display", Georgia, serif; font-size: 32px; color: #1E3F86; line-height: 1.1; }
.signin-brand .sub { color: var(--muted); font-size: 13px; letter-spacing: .3px; margin-top: 4px; }
.signin-card { width: 100%; background: #fff; border: 1px solid #D9E3F2; border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 31, 68, .10); }
.signin-card header { background: #E3EEFB; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; color: #1E3F86; }
.signin-card header h1 { font-family: "Playfair Display", Georgia, serif; font-size: 20px; margin: 0; color: #1E3F86; }
.signin-card .body { padding: 16px 20px 20px; }
.signin-card .body p.muted { margin: 0 0 6px; }
.signin-card label > span:first-child { color: #1E3F86; font-weight: 600; }
.signin-card .btn.primary { width: 100%; justify-content: center; padding: 10px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #1E3F86;
  cursor: pointer; padding: 4px; display: inline-flex; }
.login-foot { color: var(--muted); font-size: 13px; text-align: center; margin-top: 16px; }
@media (max-width: 760px), (pointer: coarse) {
  .signin { place-items: start center; padding-top: 36px; }
  .signin-plan { display: none; }
  .signin-garden { width: 62vw; height: 38vh; }
}
.login { max-width: 400px; margin: 12vh auto; padding: 0 16px; }

@media (max-width: 900px), (pointer: coarse) {
  .tracker { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
  .tracker::before { display: none; }
}
@media (max-width: 760px), (pointer: coarse) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { padding: 12px; position: static; height: auto; }
  .side nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-sec { display: none; }
  .me { display: none; }
  .topbar { padding: 10px 16px; position: static; }
  .main { padding: 16px 16px 36px; }
  .hero { padding: 18px; }
  dl.kv { grid-template-columns: 1fr; }
  details.report .pop { width: 290px; }
  h1 { font-size: 24px; }
}

/* ---------------------------------------------------------------- government deductions page */
.w0 { width: 0%; }
.w5 { width: 5%; }
.w10 { width: 10%; }
.w15 { width: 15%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w35 { width: 35%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w55 { width: 55%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.w90 { width: 90%; }
.w95 { width: 95%; }
.w100 { width: 100%; }
.receipt-hero { border-radius: 16px; padding: 20px 24px; color: var(--text); background: var(--fade-light); margin-bottom: 14px;
                border: 1px solid #CBE3EE; box-shadow: 0 6px 20px rgba(31, 138, 156, .08); }
.receipt-hero .ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; color: #3E5470; }
.receipt-hero .salary-input { width: 160px; font-size: 18px; font-weight: 500; padding: 6px 12px; }
.receipt-hero .btn { background: #fff; }
.take-home { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 16px 0 4px; }
.take-home .v { font-family: "Playfair Display", Georgia, serif; font-size: 38px; line-height: 1; font-weight: 700; color: var(--brand); }
.take-home .s { color: #3E5470; font-size: 14px; }
.receipt { background: #fff; color: var(--text); border-radius: 12px; padding: 8px 16px 12px; margin-top: 14px; border: 1px solid #DDEBF2; }
.rrow { display: grid; grid-template-columns: 140px minmax(0, 1fr) 110px 56px; gap: 12px; align-items: center;
        padding: 9px 0; border-bottom: 1px solid #EEF1F6; }
.rrow .trk { height: 8px; background: #EEF2F9; border-radius: 4px; overflow: hidden; }
.rrow .trk div { height: 100%; background: linear-gradient(90deg, var(--brand-hi), var(--brand)); border-radius: 4px; }
.rrow .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rrow .pct { text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rnote { font-size: 13.5px; color: var(--muted); padding-top: 10px; }
.rnote strong { color: var(--text); }
.receipt-empty { color: #3E5470; margin: 12px 0 0; }
.rule-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 18px; font-size: 14px; }
.rchip { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.rules-edit[open] { flex-basis: 100%; }
.rate-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.rate-card { border: 1px solid transparent; border-radius: var(--radius-lg); padding: 16px 18px;
             background: var(--fade-card) padding-box, var(--edge) border-box; box-shadow: var(--shadow), inset 0 1px 0 #fff; }
.rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rc-big { font-family: "Playfair Display", Georgia, serif; font-size: 26px; font-weight: 700; color: var(--brand); margin: 10px 0 2px; }
.share { display: flex; gap: 3px; height: 9px; margin: 14px 0 5px; }
.share span { border-radius: 5px; }
.share .ee { background: var(--brand); flex: none; }
.share .er { background: #B9CCF6; flex: 1; }
.share-l { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.rc-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
details.card-edit[open] { flex-basis: 100%; }
.rc-link { font-size: 13.5px; font-weight: 500; text-decoration: none; padding: 5px 0; }
.stairs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: end; margin: 16px 0 6px; }
.stair { border-radius: 8px 8px 0 0; display: flex; justify-content: center; padding-top: 6px; font-size: 13px; font-weight: 500; }
.stair.h1 { height: 30px; background: #E4F4EA; color: var(--ok); }
.stair.h2 { height: 46px; background: #DDF2F5; color: var(--teal-dark); }
.stair.h3 { height: 62px; background: #CFE3F9; color: var(--brand-lo); }
.stair.h4 { height: 78px; background: #A9C8F2; color: var(--brand-lo); }
.stair.h5 { height: 94px; background: var(--sky); color: #fff; }
.stair.h6 { height: 110px; background: var(--brand-mid); color: #fff; }
.stair.here { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.stairs-l { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; text-align: center;
            font-size: 12px; color: var(--muted); }
@media (max-width: 760px), (pointer: coarse) {
  .rrow { grid-template-columns: 100px minmax(0, 1fr) 90px; }
  .rrow .pct { display: none; }
  .take-home .v { font-size: 28px; }
  .stairs-l { font-size: 10px; }
}

/* ---------------------------------------------------------------- one color per deduction */
.k-sss { --kc: var(--brand-mid); --kt: #D6E3FA; --kx: var(--brand); }
.k-philhealth { --kc: var(--periwinkle); --kt: #E0E4FA; --kx: #4B5CC4; }
.k-pagibig { --kc: var(--teal); --kt: #D3EEF2; --kx: var(--teal-dark); }
.k-tax { --kc: var(--sky); --kt: #DCEAF9; --kx: #2F6FB8; }
.rrow.k-sss .trk div, .rrow.k-philhealth .trk div, .rrow.k-pagibig .trk div, .rrow.k-tax .trk div { background: var(--kc); }
.rate-card.k-sss, .rate-card.k-philhealth, .rate-card.k-pagibig { border-top: 3px solid var(--kc); }
.rate-card .rc-big { color: var(--kx, var(--brand)); }
.rate-card .share .ee { background: var(--kc, var(--brand)); }
.rate-card .share .er { background: var(--kt, #B9CCF6); }
.rchip { background: #fff; }
.rchip:nth-of-type(1) { background: #E8F6F8; color: #1F6E7E; border-color: #CDEAF0; }
.rchip:nth-of-type(2) { background: #EAF0FD; color: var(--brand-lo); border-color: #D3DFF8; }
.rchip:nth-of-type(3) { background: #EEF0FC; color: #4B5CC4; border-color: #DADFF7; }

/* ---------------------------------------------------------------- read-first emphasis */
.hero h1 { font-weight: 600; }
h2 { font-weight: 700; }
.panel-head h3, .rc-head strong { font-weight: 700; }
.tracker li.todo a, .tracker li.todo { font-weight: 700; }
td:first-child a { font-weight: 700; text-decoration: none; }
td:first-child a:hover { text-decoration: underline; }
.pill.warn, .pill.bad { font-weight: 700; }
.big { font-weight: 700; }
.flash, .errors { font-weight: 500; }

/* ---------------------------------------------------------------- help */
/* Berry: a color nothing else in PAS uses, so "?" is easy to spot and never reads as a warning. */
:root { --berry: #C2378A; --berry-dark: #9C2470; --berry-tint: #FBE6F1; --berry-tint-hi: #F6CFE3; }
.help-q { display: inline-flex; align-items: center; justify-content: center; flex: none;
          width: 20px; height: 20px; border-radius: 50%; background: var(--berry); color: #fff;
          font-family: "DM Sans", system-ui, sans-serif; font-size: 13px; font-weight: 700; line-height: 1;
          text-decoration: none; margin-left: 8px; vertical-align: middle; }
a.help-q:hover { background: var(--berry-dark); color: #fff; text-decoration: none; }
a.help-q:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; }
.help-q.soft { width: 16px; height: 16px; font-size: 11px; background: var(--berry-tint); color: var(--berry-dark); margin-left: 6px; }
a.help-q.soft:hover { background: var(--berry-tint-hi); color: var(--berry-dark); }
.hero h1 .help-q { position: relative; top: -2px; }
.help-top { gap: 6px; }
.help-top .help-q { width: 16px; height: 16px; font-size: 11px; margin-left: 0; }

.topic-bar { position: sticky; top: 64px; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px 16px;
             align-items: center; justify-content: space-between; margin: 0 0 14px; padding: 10px 16px;
             background: #fff; border: 1px solid var(--berry-tint-hi); border-left: 4px solid var(--berry);
             border-radius: 12px; box-shadow: 0 6px 18px rgba(15, 23, 41, .08); }
.topic-bar .tb-text { display: flex; align-items: center; gap: 10px; }
.topic-bar .tb-text .help-q { margin-left: 0; }
.topic-bar [hidden] { display: none; }

.guide { line-height: 1.6; }
.guide .hb { scroll-margin-top: 150px; transition: filter .35s ease, opacity .35s ease; }
.guide.focus .hb.out-topic { filter: blur(3px); opacity: .45; pointer-events: none; user-select: none; }

.guide.focus .hb.in-topic { background: #FFFBFD; }
.guide h2 { font-family: "Playfair Display", Georgia, serif; font-size: 24px; margin: 0 0 8px; display: block; }
.guide h3 { font-size: 19px; font-weight: 700; margin: 26px 0 8px; color: var(--brand); }
.guide h4 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; }
.guide .hb { padding: 2px 10px; border-radius: 8px; }
.guide ul, .guide ol { padding-left: 22px; margin: 6px 0 10px; }
.guide li { margin: 3px 0; }
.guide li > p { margin: 4px 0; }
.guide blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid #CBE3EE; background: #F5FAFC; border-radius: 6px; }
.guide blockquote p { margin: 0; }
.guide hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.guide code { background: #F1F5F9; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.guide .table-wrap { margin: 8px 0 12px; }
.guide td, .guide th { vertical-align: top; }
ul.plain { list-style: none; padding: 0; margin: 6px 0 0; }
ul.plain li { margin: 3px 0; }
.guide a.sec-ref { font-weight: 700; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.topic-bar .back { gap: 6px; }
.guide a.returned { background: var(--berry-tint); outline: 2px solid var(--berry); outline-offset: 2px; border-radius: 4px;
                    transition: background .6s ease, outline-color .6s ease; }

/* ---------------------------------------------------------------- forms page, schedules */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #FFE3A3;
             color: #6B4200; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 10px 14px; border-radius: 10px;
          background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); font-size: 14px; }
.notice .i { flex: none; margin-top: 2px; }
tr.total td { border-top: 2px solid var(--border); background: #F7FAFD; }
.inline-days { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* ---------------------------------------------------------------- scanner times, in-app confirmation */
input:disabled { background: #EEF2F6; color: var(--muted); cursor: not-allowed; }
.scan-note { display: block; margin-top: 4px; font-size: 12.5px; color: var(--teal-dark); font-weight: 700; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 41, .45);
                  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; max-width: 440px; width: 100%; padding: 20px 22px;
         box-shadow: 0 18px 50px rgba(15, 23, 41, .28); border-top: 4px solid var(--brand-mid); }
.modal h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.modal p { margin: 0 0 18px; color: #3E5470; line-height: 1.5; }
.modal .actions { justify-content: flex-end; }

/* Employee picker: search, list sorted by last name, and tags for the people picked */
.picker select[data-picker-list] { width: 100%; min-height: 150px; padding: 4px; }
.picker select[data-picker-list] option { padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.picker-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 999px;
       background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 13px; }
.tag-x { border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 6px;
         color: inherit; border-radius: 999px; }
.tag-x:hover { background: rgba(0, 0, 0, .08); }

/* Scanner file view: a grid like Excel (row numbers, column letters), read-only */
.sheet-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--border); border-radius: var(--radius);
              background: var(--card); margin-bottom: 16px; user-select: none; }
table.sheet { border-collapse: collapse; font: 12px/1.3 Calibri, Arial, sans-serif; min-width: 0; margin: 0; }
table.sheet th, table.sheet td { border: 1px solid #D4D4D4; padding: 2px 6px; white-space: nowrap; text-align: left; }
table.sheet tr:first-child th { position: sticky; top: 0; z-index: 1; }
table.sheet th { background: #F3F3F3; color: #555; font-weight: 400; text-align: center; min-width: 32px;
                 text-transform: none; letter-spacing: 0; }
table.sheet tr > th:first-child { position: sticky; left: 0; }
table.sheet th.corner { z-index: 2; }
table.sheet td { background: #FFF; color: #000; min-width: 64px; }

/* Attached form scans: shown on the page, not as a separate file */
.scan-view { text-align: center; }
.scan-view img { max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.sheet-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.sheet-tabs a { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px;
                background: var(--card); color: var(--text); text-decoration: none; }
.sheet-tabs a.on { background: var(--brand-soft); border-color: var(--brand-line); font-weight: 600; }

/* Numbers that show their dates (Summary) */
button.pop { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; cursor: pointer;
             border-bottom: 1px dotted currentColor; }
button.pop.warn { color: var(--warn); font-weight: 600; }
button.pop.pill { border-bottom: 0; padding: 2px 8px; }
button.pop.pill.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.pop-box { position: fixed; z-index: 50; max-width: 320px; padding: 10px 12px; border-radius: var(--radius);
           background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
           font-size: 13px; line-height: 1.5; }
.pop-box strong { display: block; margin-bottom: 4px; }

/* Settings → Payroll → Calculations */
.fx { display: inline-block; padding: 1px 8px; border-radius: 999px; font: inherit; font-size: 13px; line-height: 1.6;
      border: 1px solid transparent; margin: 1px 0; }
button.fx { cursor: pointer; }
.fx-formula { background: var(--brand-soft); border-color: var(--brand-line); color: var(--text); font-weight: 600; }
button.fx-formula:hover, button.fx-formula:focus { border-color: var(--accent); }
.fx-amount { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.fx-input { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.fx-op { color: var(--muted); font-weight: 600; }
.fx-func { color: var(--muted); font-style: italic; }
.fx-line { line-height: 2; }
.calc-map { margin-bottom: 20px; }
.calc-trail { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.calc-crumb { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.calc-crumb.on { color: var(--text); font-weight: 600; cursor: default; }
.calc-formula-line { font-size: 15px; line-height: 2.1; }
form.editing .calc-input { background: var(--warn-bg); border: 2px solid var(--warn-dot); }
.calc-input { width: 100%; }
.calc-formula { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.calc-edit-note { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius);
                  padding: 10px 14px; margin: 8px 0 12px; }
.calc-edit-bar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px; margin-top: 12px;
                 background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
                 box-shadow: var(--shadow-lg); }
.calc-edit-bar[hidden], .calc-edit-note[hidden] { display: none; }

.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Testing exemption banner (self-approval on one admin account) */
.test-banner { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn);
               border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }

/* Panels that open inside the page header (e.g. Delete test employees) open in place, so the
   header grows to fit them instead of cutting them off. */
.hero details.report .pop { position: static; width: auto; max-width: 560px; margin-top: 10px; }

/* Everyone's attendance: one letter per day */
.grid-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
             margin-bottom: 8px; }
table.att-grid { border-collapse: collapse; margin: 0; min-width: 0; font-size: 12px; }
table.att-grid th, table.att-grid td { padding: 3px 2px; text-align: center; border-bottom: 1px solid var(--border);
                                       min-width: 26px; }
table.att-grid th { font-weight: 600; color: var(--muted); line-height: 1.2; text-transform: none; letter-spacing: 0; }
table.att-grid th.sun { color: var(--bad); }
table.att-grid .who { text-align: left; white-space: nowrap; padding: 4px 10px; position: sticky; left: 0;
                      background: var(--card); min-width: 170px; }
table.att-grid button.pop { border: 0; border-radius: 5px; width: 22px; height: 22px; font-weight: 700; font-size: 12px; }
table.att-grid button.pop { border-bottom: 0; }
table.att-grid button.pop.g-ok { background: var(--ok-bg); color: var(--ok); }
table.att-grid button.pop.g-bad { background: var(--bad-bg); color: var(--bad); }
table.att-grid button.pop.g-warn { background: var(--warn-bg); color: var(--warn); }
table.att-grid button.pop.g-leave { background: var(--brand-soft); color: var(--accent); }
table.att-grid button.pop.g-rest { background: #F1F3F7; color: var(--muted); }
table.att-grid button.pop.g-none { background: transparent; color: var(--faint); }
.toolbar.flush-bottom { margin-bottom: 0; }

/* Wide tables: ◀ ▶ buttons outside the table, and the first (name) column stays in place */
.scroll-frame { display: flex; align-items: stretch; gap: 6px; }
.scroll-frame > [data-scroll-arrows] { flex: 1; min-width: 0; }
.scroll-arrow { display: none; flex: none; width: 34px; border: 1px solid var(--border); border-radius: var(--radius);
                background: var(--card); color: var(--accent); font-size: 16px; cursor: pointer; }
.scroll-frame.wide .scroll-arrow { display: block; }
.scroll-arrow:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand-line); }
.scroll-arrow:disabled { opacity: .35; cursor: default; }
table.register tr > :first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
table.register tr.total > :first-child { background: inherit; }


/* Find an employee: the Everyone grid's search box, and the adjustment's list */
.grid-search { min-width: 200px; }
select[size] { padding: 4px; }

/* On/off switch (Settings → Payroll calculations, yes/no amounts) */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.switch[hidden] { display: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; inset: 0; background: #CBD3DF; border-radius: 24px; transition: background .15s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
                          background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Guard roster */
table.roster td, table.roster th { text-align: center; }
table.roster td.who, table.roster th:first-child { text-align: left; }
select.roster-pick { width: auto; min-width: 78px; padding: 5px 8px; font-size: 13px; }
select.roster-pick.r-day { background: #E8F6F3; border-color: #9BD3C7; }
select.roster-pick.r-night { background: #E9ECFA; border-color: #A9B4E8; }
select.roster-pick.r-rest { background: #F3F4F6; color: #6B7280; }
.att-grid .g-night { background: #E9ECFA; color: #2F3E9E; }

/* Every dropdown, text box and button: the same 38px height, padding, font and arrow (Oct 2) */
select:not([size]):not([multiple]), input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.btn:not(.small):not(.link) { height: 38px; box-sizing: border-box; }
select:not([size]):not([multiple]) { appearance: none; -webkit-appearance: none; padding: 0 34px 0 12px; line-height: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B6577' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
.hero select:not([size]) { background-color: rgba(255, 255, 255, .95); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]) { padding-top: 0; padding-bottom: 0; }
.btn:not(.small):not(.link) { padding-top: 0; padding-bottom: 0; }
.btn.small { height: 32px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
option { padding: 6px 12px; font-size: 14px; }
select[size] option { padding: 4px 8px; }
select.roster-pick:not([size]):not([multiple]) { height: 32px; line-height: 30px; padding: 0 26px 0 8px;
  background-position: right 8px center; }

/* Pay period picker: Previous | period | Next as one row; the list lines up in columns */
.period-nav { display: inline-flex; align-items: stretch; flex-wrap: nowrap; }
.period-nav > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.period-nav > .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.period-menu { position: relative; }
.period-menu > summary.period-current { border-radius: 0; border-left: none; border-right: none; gap: 0; height: 38px;
  display: inline-flex; align-items: center; padding: 0 12px; font-variant-numeric: tabular-nums; }
.period-menu .chev { width: 12px; height: 12px; margin-left: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B6577' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / 12px; }
.pm, .pd, .py, .px, .ps { display: inline-block; white-space: nowrap; }
.pm { width: 2.05em; }
.pd { width: 1.45em; text-align: right; margin-right: .28em; }
.py { width: 2.5em; }
.px { width: 1.4em; text-align: center; color: #6b7280; }
.ps { margin-left: 1em; color: #6b7280; font-size: 12.5px; }
.period-list { position: absolute; left: 0; top: 42px; z-index: 30; min-width: 100%; max-height: 360px; overflow-y: auto;
  background: #fff; border: 1px solid #D5DBE5; border-radius: 10px; padding: 6px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); }
.period-list a { display: flex; align-items: center; height: 34px; padding: 0 10px; border-radius: 7px; color: inherit;
  text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.period-list a:hover, .period-list a:focus { background: #EEF3FC; outline: none; }
.period-list a.on { background: #E3EBFA; font-weight: 600; }
.hero:has(details.period-menu[open]) { overflow: visible; z-index: 20; }
.hero .acts .btn:not(.small) { min-height: 38px; }

/* Pay date pill in page headers (Oct 2): soft periwinkle, a color not used for anything else */
.pay-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; padding: 5px 12px; border-radius: 999px;
  background: #ECEEFC; border: 1px solid #CDD2F6; color: #3E49A3; font-size: 13.5px; }
.pay-pill b { font-weight: 600; }
.pay-pill .i { width: 15px; height: 15px; }
.hero .pay-pill + .meta { margin-top: 6px; }

/* Remove… pop-ups (schedules, holidays): a clear white card with a red edge, so it doesn't blend in */
details.note-box.danger[open] { background: #fff; border: 1px solid #F3C4C4; border-left: 4px solid var(--bad-dot);
  box-shadow: 0 8px 24px rgba(15, 23, 41, .12); padding: 12px 14px; }
details.note-box.danger .danger-title { margin: 0 0 6px; font-weight: 600; color: var(--bad); }
.btn.danger { background: var(--bad-dot); border-color: var(--bad-dot); color: #fff; }
.btn.danger:hover { filter: brightness(1.05); }

/* Forms page: the overtime forms notice as three short lines */
.notice .rules { margin: 4px 0 0; padding-left: 18px; }
.notice .rules li { margin: 1px 0; }
details.note-box.danger[open] { min-width: 250px; }

/* Payroll: one bar with the tabs (left) and Compute / Approve / Unlock (right), all 38px; exports underneath */
.pay-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; padding: 5px; margin: 0 0 10px; }
.pay-bar .tabs { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.pay-bar .tabs a { height: 38px; box-sizing: border-box; padding: 0 15px; align-items: center; }
.pay-bar .bar-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-bar form.inline { margin: 0; }
.btn.compute { background: linear-gradient(180deg, #3DB5C6, #1F8A9C 65%, #18788A); border-color: #1F8A9C; color: #fff; }
.btn.approve { background: linear-gradient(180deg, #3BAA6B, #22804A 65%, #1C6E3F); border-color: #22804A; color: #fff; }
.btn.unlock { background: #EEF8F2; border-color: #9FD2B3; color: #1C6E3F; }
.btn.compute:hover, .btn.approve:hover { filter: brightness(1.06); }
.btn.unlock:hover { background: #E2F3E9; }
.unlock-box .pop { width: 320px; }
.actions.exports { margin: 0 0 16px; }

/* Employee import (Oct 3): rows with a problem */
tr.bad-row td { background: var(--bad-bg); }

/* Name search (Oct 5): the line between the last-name matches and the other matches. */
tr.find-divider td { padding: 4px 10px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: transparent; border-top: 1px dashed var(--border); }

/* Calculations (Oct 6): the five steps, the always-visible switches (green On, red Off), and the
   amounts as small cards. */
.calc-when { margin-top: -6px; }
.calc-steps { margin: 6px 0 10px; padding-left: 22px; line-height: 1.6; max-width: 900px; }
.calc-steps li { margin-bottom: 8px; padding-left: 4px; }
.switch-list { display: grid; gap: 10px; max-width: 900px; }
.switch-row { display: flex; gap: 14px; align-items: flex-start; background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; }
.sw { display: inline-flex; align-items: center; gap: 8px; min-width: 74px; height: 30px; padding: 0 12px 0 4px;
  border-radius: 15px; border: 0; font: inherit; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; flex: none; }
.sw.static { cursor: default; }
.sw .sw-knob { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw.on { background: #1E8E4E; flex-direction: row-reverse; padding: 0 4px 0 12px; justify-content: space-between; }   /* knob on the right when on */
.sw.off { background: #C62828; justify-content: space-between; }
.sw:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.calc-groups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.calc-amounts dd strong { font-variant-numeric: tabular-nums; }
.calc-sample { margin-bottom: 16px; }
.calc-sample tr.changed td { background: #FFF7DA; }
.calc-sample tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.calc-sample-hours { margin: 4px 0 8px; padding-left: 18px; columns: 2; font-size: 13.5px; }

/* Who's signed in (Oct 6): a chip in the top bar (name and position), and a welcome line on Home. */
.who-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 360px; min-width: 0; }
.who-chip .avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.who-chip .who-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1100px), (pointer: coarse) { .who-chip .who-text { display: none; } }
.welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.welcome .hello { font-size: 18px; font-weight: 600; margin-right: 6px; }

/* The Export pop-up (Oct 6). */
/* Opens to the right of the Export button (the button sits at the left of the page), never past the screen edge. */
details.report.export-menu .pop { position: absolute; top: 44px; left: 0; right: auto; z-index: 30; margin-top: 0;
  width: 440px; max-width: calc(100vw - 40px); }
.hero:has(details.export-menu[open]) { overflow: visible; z-index: 20; }
/* A darker window in the company's navy and royal blue (Oct 6), so it stands apart from the page. */
details.report.export-menu .pop { background: linear-gradient(180deg, #1B2B5C 0%, var(--brand-dark) 100%);
  border-color: #2A3B6E; color: #EAF0FD; }
.export-menu .pop h3 { color: #FFFFFF; }
.export-menu .pop .muted { color: #B9C6E8; }
.export-menu .pop a, .export-menu .pop .linkish { color: var(--aqua); }
.export-menu .pop strong { color: #FFFFFF; }
.export-menu .pop .btn:not(.primary) { background: transparent; color: #EAF0FD; border-color: #4A5C8E; }
.export-menu .pop .btn.primary { background: linear-gradient(180deg, var(--brand-hi), var(--brand-mid)); border-color: var(--sky); }
.linkish { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-decoration: underline;
  text-underline-offset: .25em; }
.export-pick { margin: 6px 0 0; color: #B9C6E8; }
.export-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.export-list label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.export-list label:not(.off):hover { background: rgba(255, 255, 255, .06); }
.export-list input { margin-top: 4px; accent-color: var(--teal); width: 16px; height: 16px; flex: none; }
.export-list label > span { display: block; }
.export-list small { display: block; font-size: 12.5px; color: #B9C6E8; }
.export-list .off { opacity: .5; cursor: not-allowed; }
.check-ok { border-left: 4px solid #1E8E4E; }
.check-bad { border-left: 4px solid #C62828; }

/* The Year view (Oct 6): month strip, missing months, grey months before hire / after leaving. */
.year-months { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0 0 12px; }
.ym { display: inline-block; min-width: 38px; text-align: center; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.ym-pas, .ym-uploaded { background: var(--ok-bg); color: var(--ok); }
.ym-incomplete { background: var(--warn-bg); color: var(--warn); }
.ym-missing { background: var(--bad-bg); color: var(--bad); }
.ym-future, .ym-before_pas { background: #F1F3F7; color: var(--faint); }
.warn-text { color: var(--warn); font-weight: 600; }
table.year tr.muted td { color: var(--faint); }

/* ================================================================ the "architect" look (Oct 7)
   Paper background, light-blue side menu, royal-blue actions, and Richard's line drawings
   (static/art: house in page headers, skyline at the foot of the page, trees under the menu,
   a small house in the phone's top bar). Layout and classes are unchanged; this only restyles. */
:root {
  --paper: #F5F0E6; --paper-2: #FBF8F2; --paper-line: #E4DCCB; --sketch: #4A6DAA;
  --royal: #1E56C8; --royal-hi: #2F6BE0; --royal-lo: #1846A8;
  --sky-1: #DCE9F8; --sky-2: #EAF1F9; --sky-line: #C9D7EA;
  --mint: #DDF1EE; --mint-ink: #2C8F86;
  --text: #0F1F44; --muted: #6B7385; --border: #E6DFD0;
  --card: #FDFBF7;
  --fade-card: linear-gradient(180deg, #FDFBF7, #FBF8F2);
  --edge: linear-gradient(180deg, #E8E0CF, #E2D9C6);
  --shadow: 0 1px 2px rgba(15, 31, 68, .05);
}
body { background: var(--paper); color: var(--text); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(74, 109, 170, .045) 31px 32px),
              repeating-linear-gradient(90deg, transparent 0 31px, rgba(74, 109, 170, .045) 31px 32px); }

/* side menu: light blue, dark text, a royal-blue pill for the current page, the trees below */
.side { color: var(--text); border-right: 1px solid var(--sky-line);
        /* The tree is a fixed background (Oct 7): the menu scrolls over it; a light wash keeps the text readable.
           With the menu itself scrolling, "scroll" attachment pins the background to the menu's own box. */
        background: linear-gradient(rgba(232, 240, 249, .58), rgba(236, 242, 248, .58)),
                    url(/static/art/sidebar-trees.webp) no-repeat center bottom / 100% auto,
                    linear-gradient(180deg, var(--sky-1), var(--sky-2) 65%, #EEF2F4);
        background-attachment: scroll; }
.brand .mk { background: var(--royal); color: #fff; }
.brand .name { color: var(--text); }
.brand .sub { color: var(--muted); }
.nav-sec { color: #6F84A8; }
.side a, .side .btn.link { color: var(--text); }
.side a .i, .side .btn.link .i { color: #1E3F86; }
.side a:hover, .side .btn.link:hover { background: rgba(30, 86, 200, .08); color: var(--text); }
.side a.on { background: var(--royal); color: #fff; box-shadow: 0 4px 10px rgba(30, 86, 200, .28); font-weight: 600; }
.side a.on .i { color: #fff; }
.me { border-top: 1px solid #B9CBE4; }
.me .who .n { color: var(--text); }
.me .who .r { color: var(--muted); }
.avatar { background: var(--royal); color: #fff; }
.side-art { display: none; }      /* replaced by the menu's fixed background (Oct 7) */

/* top bar and page */
.topbar { background: rgba(245, 240, 230, .88); border-bottom: 1px solid var(--paper-line); }
.content { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; }
.page-sky { position: fixed; z-index: 0; left: 244px; right: 0; bottom: 0; height: 150px; pointer-events: none; opacity: .4;
            background: url(/static/art/footer-skyline.webp) no-repeat center bottom / min(100%, 1600px) auto; }
.main { position: relative; z-index: 1; padding-bottom: 110px; }   /* the page scrolls over the fixed skyline */

/* page headers: paper card with the house on the right */
.hero { background: var(--paper-2); border: 1px solid var(--paper-line); box-shadow: 0 2px 10px rgba(15, 31, 68, .05);
        border-radius: 12px; padding-right: 380px; min-height: 128px; }
.hero::after { background: url(/static/art/header-house.webp) no-repeat right 14px bottom 0 / auto 116px; opacity: .95; }
.hero .eyebrow { color: #5D6F92; letter-spacing: 1.4px; }
.hero h1 { color: var(--text); font-family: "DM Sans", sans-serif; font-weight: 800; letter-spacing: -.3px; }
.hero .meta { color: var(--muted); }
.hero .acts { position: relative; z-index: 2; }

/* buttons and tabs: flat royal blue */
.btn { background: #fff; border-color: #D6CDB9; }
.btn.primary, .hero .btn.primary { background: var(--royal); border-color: var(--royal-lo); color: #fff;
                                    box-shadow: 0 3px 10px rgba(30, 86, 200, .25); }
.btn.primary:hover { background: var(--royal-hi); filter: none; }
.tabs { background: rgba(251, 248, 242, .9); border-color: var(--paper-line); }
.tabs a.on { background: var(--royal); }

/* surfaces */
.card, .table-wrap, fieldset, .stat { box-shadow: var(--shadow); }
th { background: #F6F1E7; color: #6B6455; border-bottom-color: var(--paper-line); }
td { border-bottom-color: #EFE9DC; }
tr.click:hover td { background: #EEF3FA; }
input, select, textarea { border-color: #D6CDB9; }
legend { background: var(--paper-2); }

/* section titles: a thin "dimension line" after the words */
h2 { color: var(--text); font-weight: 700; }
h2::after { content: ""; flex: 1; min-width: 40px; height: 9px; margin-left: 10px; align-self: center;
            background: linear-gradient(#9FB4D6, #9FB4D6) center / 100% 1px no-repeat,
                        linear-gradient(#9FB4D6, #9FB4D6) left / 1px 100% no-repeat,
                        linear-gradient(#9FB4D6, #9FB4D6) right / 1px 100% no-repeat; }
h2 .push { order: 2; margin-left: 10px; }

/* stat cards: round icon badges; sky-blue and mint variants */
.stat .ic { border-radius: 50%; background: rgba(30, 86, 200, .1); color: var(--royal); }
.stat.sky { background: linear-gradient(#E3EEFB, #E3EEFB) padding-box, linear-gradient(#C9DBF2, #C9DBF2) border-box; }
.stat.mint { background: linear-gradient(var(--mint), var(--mint)) padding-box, linear-gradient(#BFE3DE, #BFE3DE) border-box; }
.stat.mint .ic { background: rgba(44, 143, 134, .15); color: var(--mint-ink); }
.stat .n { color: var(--text); font-weight: 800; }

/* Home: the two panels */
.home-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.plist { padding: 0; }
.plist .row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid #EFE9DC;
              text-decoration: none; color: inherit; }
.plist a.row:hover { background: #EEF3FA; }
.plist .row .chev { color: #7C879B; margin-left: 8px; }
.plist .row .push { margin-left: auto; }
.plist .box { width: 20px; height: 20px; border: 1.6px solid #9AA6BC; border-radius: 4px; display: grid; place-items: center; flex: none; }
.plist .box.on { background: var(--royal); border-color: var(--royal); color: #fff; }
.plist .box.later { border-style: dashed; }
.plist .round { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #E3EEFB;
                color: #1E3F86; flex: none; }
.plist .round.o { background: #F7E3C8; color: #9A5B00; }
.plist .round.g { background: var(--mint); color: var(--mint-ink); }
.plist .two-l small { display: block; color: var(--muted); font-size: 12.5px; }
.plist .phead { display: flex; align-items: center; gap: 12px; padding: 14px 18px 10px; font-weight: 800; font-size: 18px; }
.plist .phead::after { content: ""; flex: 1; height: 9px;
  background: linear-gradient(#9FB4D6, #9FB4D6) center / 100% 1px no-repeat, linear-gradient(#9FB4D6, #9FB4D6) left / 1px 100% no-repeat,
              linear-gradient(#9FB4D6, #9FB4D6) right / 1px 100% no-repeat; }
.plist .phead .btn { order: 2; }

/* phone: top bar with the menu button and the small house; the side menu slides in; a tab bar */
.menu-btn, .tabbar { display: none; }
@media (max-width: 760px), (pointer: coarse) {
  .hero { padding-right: 18px; min-height: 0; }
  .hero::after { background-size: auto 70px; opacity: .35; }
  .home-two { grid-template-columns: minmax(0, 1fr); }
  .shell { display: block; }
  .side { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: 260px; height: auto; transform: translateX(-105%);
          transition: transform .2s; box-shadow: 0 10px 30px rgba(15, 31, 68, .2); }
  .side nav { flex-direction: column; }
  .nav-sec, .me { display: block; }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(15, 31, 68, .25); }
  .topbar { position: sticky; top: 0; background: var(--sky-1); border-bottom: 1px solid var(--sky-line); padding: 10px 14px;
            flex-wrap: nowrap; }
  .topbar .right .who-chip, .topbar .right > span:not(.who-chip) { display: none; }
  .menu-btn { display: inline-flex; border: 0; background: none; padding: 4px; color: var(--text); cursor: pointer; }
  .menu-btn .i { width: 24px; height: 24px; }
  .top-mark { display: block; }                                     /* Oct 23: the house next to the menu button */
  .page-sky { left: 0; bottom: 62px; height: 80px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
            height: 62px; background: #EEF3FA; border-top: 1px solid var(--sky-line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px;
              color: #1E3F86; text-decoration: none; }
  .tabbar a.on { color: var(--royal); font-weight: 700; }
  .tabbar a { position: relative; }
  .tabbar .tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
                       border-radius: 999px; background: #FFE3A3; color: #6B4500; font-size: 11px; font-weight: 700;
                       line-height: 18px; text-align: center; }
  .tabbar .tab-badge.exec { background: #111; color: #fff; }
  .tabbar .i { width: 22px; height: 22px; }
  .main { padding-bottom: 150px; }
  /* a compact top bar: icon-only Help and Report, a shorter company picker, room for the house */
  .topbar > div:first-of-type { min-width: 0; }
  .topbar .company-pick { gap: 4px; }
  .topbar .company-pick .i { display: none; }
  .topbar .company-pick select { max-width: 128px; font-size: 13px; padding: 5px 22px 5px 8px; text-overflow: ellipsis; }
  .topbar > div:not(.right) { flex: 1 1 auto; min-width: 0; }      /* Oct 23: room for the house; the list shrinks */
  .topbar .company-pick, .topbar .company-pick form { min-width: 0; }
  .topbar .company-pick select { width: 100%; max-width: 128px; min-width: 0; }
  .topbar .right { gap: 6px; flex-wrap: nowrap; }
  .topbar .help-top, .topbar details.report > summary { font-size: 0; gap: 0; padding: 6px 8px; }
  .topbar .help-top .help-q { font-size: 12px; }
  .topbar details.report > summary .i { width: 16px; height: 16px; }
  /* cards two to a row, like the mockup */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { flex-direction: column; gap: 6px; padding: 12px; }
  .stat .ic { width: 32px; height: 32px; }
  .stat .n { font-size: 22px; }
  .stat .lbl { font-size: 10px; }
  .stat .sub { font-size: 11.5px; }
}
/* Page headers (Oct 7): the buttons always sit under the title, so they never jump between pay periods. */
.hero .row { flex-direction: column; align-items: flex-start; justify-content: flex-start; }

/* "Submit a form" window (Oct 7) */
details.report.submit-menu .pop { position: absolute; top: 46px; right: 0; left: auto; z-index: 30; width: 380px;
                                  max-width: calc(100vw - 32px); margin-top: 0; }
.hero:has(details.submit-menu[open]) { overflow: visible; z-index: 20; }
.form-choices { display: grid; gap: 8px; margin: 10px 0 12px; }
.form-choices a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--paper-line); border-radius: 10px;
                  background: #fff; text-decoration: none; color: var(--text); }
.form-choices a:hover { border-color: var(--royal); background: #EEF3FA; }
.form-choices strong { display: flex; align-items: center; gap: 8px; color: var(--royal); }
.form-choices span { font-size: 12.5px; color: var(--muted); }
@media print { .side-art, .page-sky, .tabbar, .hero::after { display: none; } }

/* Year view, simple layout (Oct 7): five cards, one line per month, open a month for its paydays. */
.year-switch { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.year-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.year-cards .n { font-size: 21px; }
.ylist { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.yrow { display: grid; grid-template-columns: 110px 130px 1fr 1fr 1fr 28px; align-items: center; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--border); font-size: 14px; font-variant-numeric: tabular-nums; }
.yrow.head { border-top: 0; background: var(--paper, #F6F1E7); font-size: 11px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.yrow.empty { color: var(--faint); }
.yrow .r { text-align: right; }
.ymonth > summary { cursor: pointer; list-style: none; }
.ymonth > summary::-webkit-details-marker { display: none; }
.ymonth > summary:hover { background: #F4F7FC; }
.ymonth[open] > summary { background: #EEF3FA; }
.ymonth .chev::after { content: "›"; color: var(--muted); display: inline-block; transition: transform .15s; }
.ymonth[open] .chev::after { transform: rotate(90deg); }
.ydetail { padding: 6px 16px 14px; background: #F8FAFD; border-top: 1px solid #E3E9F2; }
.ybreak { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ybreak th, .ybreak td { padding: 5px 8px; border-bottom: 1px dashed #E1E6EF; }
.ybreak th { font-size: 12px; font-weight: 600; vertical-align: bottom; }
.ybreak th a { display: block; font-weight: 500; }
.ybreak .r { text-align: right; }
.ybreak tr.t td { font-weight: 700; border-bottom: 1px solid #C9D3E3; }
.ybreak tr.muted td { color: var(--muted); border-bottom: 0; }
@media (max-width: 1100px), (pointer: coarse) { .year-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px), (pointer: coarse) {
  .year-cards { grid-template-columns: 1fr 1fr; }
  .yrow { grid-template-columns: 70px 1fr 1fr 22px; font-size: 13px; padding: 10px 12px; }
  .yrow > span:nth-child(2), .yrow .yhide { display: none; }
}

/* Upload scanner file window (Oct 8): what's already uploaded for this cut-off. */
.up-list { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.up-list h3 { font-size: 14px; margin-bottom: 6px; }
.up-site { padding: 6px 0; }
.up-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.up-file { display: flex; gap: 6px; align-items: flex-start; padding: 3px 0 3px 22px; }
.up-ok { color: var(--ok-dot); display: inline-flex; }
.up-warn { color: var(--warn); display: inline-flex; }

/* The Guide Bot (Oct 8): lower right of every page; the chat opens above the button. */
.gbot { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
/* Oct 10 (Richard's drawing): teal pill, 1.5× wider and a little taller, a robot in a white circle. */
.gbot-fab { display: inline-flex; align-items: center; gap: 12px; border: 0; cursor: pointer; background: #1BA5BE; color: #fff;
  border-radius: 999px; padding: 7px 34px 7px 7px; min-width: 150px; font: inherit; font-weight: 800; font-size: 17px; letter-spacing: .2px;
  box-shadow: 0 8px 20px rgba(27, 165, 190, .38); }
.gbot-fab:hover { background: #1795AC; }
/* Oct 23: round while a button is under it (app.js). */
.gbot.small .gbot-fab { width: 50px; height: 50px; min-width: 0; padding: 0; justify-content: center; }
.gbot.small .gbot-fab .lbl { display: none; }
.gbot-fab .dot { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #1BA5BE; display: grid; place-items: center; flex: none; }
.gbot-fab .dot svg { width: 24px; height: 24px; }
.gbot-panel { width: 360px; max-width: calc(100vw - 36px); height: 470px; max-height: calc(100vh - 110px); background: #fff; border: 1px solid #cfdcf1;
  border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 31, 68, .22); display: flex; flex-direction: column; overflow: hidden; }
.gbot-panel[hidden] { display: none; }
.gbot-panel header { background: var(--royal, #1E56C8); color: #fff; padding: 10px 12px 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gbot-panel header a { color: #fff; font-size: 12px; margin-right: 8px; }
.gbot-x { background: none; border: 0; color: #fff; font-size: 15px; cursor: pointer; padding: 2px 4px; }
.gbot-clear { background: none; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; color: #fff; font-size: 12px; cursor: pointer; padding: 1px 7px; margin-right: 6px; }
.gbot-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; background: #F8FAFD; font-size: 13.5px; }
.gb { max-width: 90%; padding: 9px 11px; border-radius: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.gb.bot { background: #fff; border: 1px solid #e1e7f1; align-self: flex-start; border-bottom-left-radius: 4px; }
.gb.me { background: var(--royal, #1E56C8); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.gb ol { margin: 6px 0 4px 18px; padding: 0; }
.gb li { margin: 3px 0; }
.gb .go { display: inline-block; margin: 4px 8px 0 0; background: var(--mint, #DDF1EE); color: #1d6b62; border-radius: 8px; padding: 4px 9px; font-weight: 600; font-size: 12.5px; }
.gb .pick { display: block; width: 100%; text-align: left; margin-top: 5px; border: 1px solid #cfdcf1; border-radius: 8px; padding: 6px 8px;
  background: #fff; color: var(--royal, #1E56C8); font: inherit; font-size: 13px; cursor: pointer; }
.gbot-note { margin: 0; padding: 4px 12px; font-size: 11.5px; color: var(--muted); background: #fff; }
.gbot-form { display: flex; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid #e6ebf3; background: #fff; }
.gbot-form input { flex: 1; min-width: 0; }
@media (max-width: 760px), (pointer: coarse) {
  .gbot { right: 12px; bottom: 70px; }                       /* above the bottom tab bar */
  .gbot-fab { width: 52px; height: 52px; min-width: 0; padding: 0; justify-content: center; }
  .gbot-fab .lbl { display: none; }
  .gbot-fab .dot { width: 40px; height: 40px; }
  .gbot-panel { position: fixed; left: 0; right: 0; bottom: 0; top: 64px; width: auto; max-width: none; height: auto; max-height: none;
    border-radius: 16px 16px 0 0; }
  .gbot.open .gbot-fab { display: none; }
}
@media print { .gbot { display: none; } }

/* Settings tabs (Oct 8): one row; on a phone they scroll sideways. */
@media (max-width: 760px), (pointer: coarse) {
  .settings-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .settings-tabs a { flex: 0 0 auto; white-space: nowrap; }
  .settings-tabs::after { content: ""; flex: 0 0 8px; }      /* room after the last tab when scrolled to the end */
  /* Oct 21 (Richard): My records' (and the Payroll pages') tabs: one row that scrolls sideways. */
  .pay-bar .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pay-bar .tabs a { flex: 0 0 auto; white-space: nowrap; }
  /* My team on a phone: the header buttons in one row that scrolls sideways (their windows open over the page). */
  .team-hero .acts { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; max-width: 100%; }
  .team-hero .acts > * { flex: 0 0 auto; }
  .team-hero details.submit-menu .pop { position: fixed; left: 16px; right: 16px; top: 96px; width: auto; max-height: 70vh;
                                        overflow-y: auto; z-index: 40; }
  /* My team: each person a card (name, counts, links). */
  .team-list, .team-list tbody { display: block; }
  .team-list tr:first-child { display: none; }
  .team-list tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 12px;
                  border: 1px solid var(--line, #d5dbe7); border-radius: 10px; margin-bottom: 8px; background: var(--card, #fff); }
  .team-list td { display: block; border: 0; padding: 0; text-align: left; }
  .team-list td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .team-list td.tl-name, .team-list td.tl-links { grid-column: 1 / -1; }
}

/* Your position and department (Oct 8, Richard: warm orange, black text, so they read as current). */
.me-tag { display: inline-flex; align-items: center; gap: 7px; background: #FCDDBF; border: 1px solid #F2B47F; color: #0F1F44;
  border-radius: 999px; padding: 4px 12px; font-size: 14px; line-height: 1.3; }
.me-tag .i { color: #B5520C; }
.who-chip .who-text { color: var(--text); }

/* The floor plan (Oct 8, Richard's drawing): a fixed background like the skyline, filling the top-right
   quarter of the page area (right of the menu): half that area's width and half its height, so it never
   reaches the bottom-right quarter; the drawing is as large as fits, keeping its shape. */
.page-plan { position: fixed; z-index: 0; top: 14px; right: 14px; width: calc((100vw - 244px) / 2 - 14px); height: calc(50vh - 14px);
  pointer-events: none; opacity: .4; background: url(/static/art/top-right-side.webp) no-repeat right top / contain; }
@media (max-width: 760px), (pointer: coarse) { .page-plan { display: none; } }
@media print { .page-plan { display: none; } }

/* Soft teal buttons (Oct 8, Richard): Manual entry on Attendance, File leave on Forms and My team. */
.btn.soft-teal { background: #DDF1EE; border: 1px solid #9FD6CE; color: #145C54; }
.btn.soft-teal:hover { background: #CDEBE6; border-color: #86CCC2; color: #0F4D46; }

/* Payroll tabs (Oct 8): one header height on all of them, so switching tabs doesn't make the page jump. */
@media (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) { .hero.pay-hero { min-height: 226px; box-sizing: border-box; } }

/* Waiting for a second admin (Oct 9): bank details and Bank/Cash changes. */
.card.pay-wait { border-left: 4px solid #E0A23B; background: #FFF8EC; }
.card.pay-wait h2 { display: flex; align-items: center; gap: 8px; }
.card.pay-wait .actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin: 6px 0; }

/* Signing out when idle (Oct 9): the notice after signing in and the 10-minute warning sit above everything. */
.modal-backdrop.idle-pop { z-index: 60; }
.signin-note { margin-bottom: 10px; font-size: 13.5px; }

/* Backups (Oct 9) */
code.path { font-size: 12.5px; word-break: break-all; background: #F1F4F9; padding: 1px 5px; border-radius: 4px; }

/* Profile Change… windows (Oct 9): the form in the middle of the page, full width of the window. */
.modal.modal-form { max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; }
.modal.modal-form .actions { display: flex; gap: 8px; justify-content: flex-start; margin-top: 4px; }
.modal.modal-form p { margin: 0; }
summary.btn.danger { color: #fff; white-space: nowrap; }

/* Leave credits (Oct 9) */
.credit-box { margin-bottom: 14px; }
.credit-nums { display: flex; gap: 28px; flex-wrap: wrap; margin: 6px 0; }
.credit-nums > div { display: flex; flex-direction: column; }
.credit-nums .big { font-size: 26px; font-weight: 700; color: var(--text); }

/* Oct 10 (Richard): grey notes sitting straight on the page background were hard to read there, so they're
   black. Grey text inside white boxes (cards, tables, windows, notices) stays grey: it reads fine on white. */
.main .muted:not(:is(.card, .table-wrap, fieldset, .stat, .hero, .pop, .notice, .flash, .errors, .gbot, .modal,
  .signin-card, .ymonth, .ydetail, .up-list, .export-menu, .test-banner) .muted) { color: var(--text); }
.roster-notes { color: var(--text); margin: 0 0 12px; }
.roster-notes ul { margin: 4px 0 0; padding-left: 20px; }
.roster-notes li { margin: 2px 0; }
.roster-actions { margin-top: 10px; }

/* Oct 10 (Richard): long wide tables. Each one scrolls inside its own area, at most a screen tall, so the
   column headings stay at its top while scrolling down, and the ◀ ▶ bars (as tall as the area) always
   show their arrows. The first column stays in place where it already did. */
.scroll-frame > [data-scroll-arrows] { max-height: calc(100vh - 150px); overflow: auto; }
[data-scroll-arrows] table tr:first-child > th { position: sticky; top: 0; z-index: 2; }
[data-scroll-arrows] table.register tr:first-child > th:first-child { z-index: 3; }
.scroll-frame { max-height: calc(100vh - 150px); }

/* Oct 10 (Richard): the Export window opens in the middle of the page (it used to hang off the right edge of
   the Export button, which on a wide screen is the far right), over a dimmed page. */
details.report.export-menu[open] > .pop { position: fixed; top: calc(50% + 32px); left: 50%; transform: translate(-50%, -50%);
  z-index: 71; max-height: calc(100vh - 112px); overflow: auto; }   /* clear of the top bar */
.export-back { position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 41, .45); }

/* Oct 10: a payslip in a window on the page (no paper look), with ◀ ▶ for the earlier and later cut-offs. */
.slip-back { z-index: 80; }
.slip-win { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(15, 23, 41, .28); border-top: 4px solid var(--brand-mid); }
.slip-win-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.slip-win-bar .grow { flex: 1; }
.slip-win-body { overflow: auto; padding: 14px 18px 18px; }
.slip-print-note { display: none; }
.slip-card { font-size: 13px; }
.slip-card .slip-notice { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #FFF4D6; color: #6B4E00; font-weight: 600; }
.slip-card .slip-co { font-weight: 700; text-align: center; }
.slip-card .slip-ttl { font-weight: 700; text-align: center; letter-spacing: 4px; margin-bottom: 8px; }
.slip-card .slip-head { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0 0 10px; }
.slip-card .slip-head dt { color: var(--muted); }
.slip-card .slip-head dd { margin: 0; }
.slip-card table.slip-lines { width: 100%; border-collapse: collapse; }
.slip-card .slip-lines th, .slip-card .slip-lines td { padding: 3px 6px; border-bottom: 1px solid #EEF1F5; font-size: 12.5px; }
.slip-card .slip-lines th { background: none; position: static; }
.slip-card .slip-lines .c { font-weight: 600; white-space: nowrap; }
.slip-card .slip-lines .r { text-align: right; white-space: nowrap; }
.slip-card .slip-lines .z { color: #B5BCC8; }
.slip-card .slip-lines tr.tot td { font-weight: 700; border-top: 1px solid #C9D1DD; }
.slip-card .slip-lines tr.net td { border-bottom: 3px double #6B7385; }
.slip-card .slip-foot, .slip-card .slip-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
@media (max-width: 760px), (pointer: coarse) {
  .slip-back { padding: 0; }
  .slip-win { max-width: none; max-height: none; height: 100%; border-radius: 0; }
}
@media print {
  body.slip-open .shell, body.slip-open .tabbar, body.slip-open .gbot, body.slip-open .page-plan,
  body.slip-open .page-sky { display: none !important; }
  body.slip-open .slip-back { position: static; background: none; }
  body.slip-open .slip-win-bar, body.slip-open .slip-win-body { display: none; }
  body.slip-open .slip-print-note { display: block; font: 16px/1.5 Arial, sans-serif; padding: 40px; }
}

/* Oct 10 menu regroup: a page's own tabs under the menu item's tabs (Guards: Roster, Guards list). */
.tabs.sub { margin-top: -8px; background: transparent; border-color: transparent; padding: 0; }
.tabs.sub a { padding: 5px 12px; font-size: .92em; }

/* Oct 11: a small form inside a table row (confirm a loan balance for the PAS start). */
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form input { width: auto; min-width: 9em; }

/* Oct 12: Calculation follows: the payroll team's process / the law. */
.side-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.side-card { border: 1px solid var(--line, #d5dbe7); border-radius: 12px; padding: 12px 14px; background: var(--card, #fff);
             display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-card.on { border-color: #1E8E4E; box-shadow: 0 0 0 2px rgba(30, 142, 78, .18); }

/* Oct 13: Review tab, one flag per person. */
.person-flags { display: flex; flex-direction: column; gap: 8px; }
.person-flag { border: 1px solid var(--line, #d5dbe7); border-radius: 10px; background: var(--card, #fff); padding: 8px 12px; }
.person-flag > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.person-flag[open] > summary { margin-bottom: 8px; }
.flag-mark { color: #C00000; font-weight: 700; }

/* Oct 13 (Richard): roster boxes. Confirmed (saved or fixed week): an icon; read from the scans: dashed. */
.roster-box { position: relative; display: inline-block; }
.roster-box .ri { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; pointer-events: none; }
.roster-box.confirmed select.roster-pick:not([size]):not([multiple]) { padding-left: 28px; }
.roster-box.changed .ri { display: none; }
.roster-box.changed select.roster-pick:not([size]):not([multiple]) { padding-left: 8px; }
.ri-day { color: #B7791F; } .ri-night { color: #3B4A9E; } .ri-rest { color: #6B7280; }
select.roster-pick.r-rest { border-color: #D1D5DB; }
select.roster-pick.r-read { background-color: #fff; border-style: dashed; border-width: 1.5px; color: #6B7280; font-style: italic; }
select.roster-pick.r-read.r-read-day { border-color: #9BD3C7; }
select.roster-pick.r-read.r-read-night { border-color: #A9B4E8; }
select.roster-pick.r-read.r-read-rest { border-color: #D1D5DB; }
.roster-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.roster-legend .lg { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; }
.roster-legend .lg .ri { width: 13px; height: 13px; }
.lg-read { border: 1.5px dashed #9BD3C7; color: #6B7280; font-style: italic; background: #fff; }
.lg-saved { border: 1px solid #9BD3C7; background: #E8F6F3; }

/* Oct 13 (Richard): the roster picker (PAS's own: each choice once, with its icon) and the cut-off view. */
.view-switch { display: inline-flex; }
.view-switch .btn { border-radius: 0; }
.view-switch .btn:first-child { border-radius: 8px 0 0 8px; }
.view-switch .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.view-switch .btn.on { background: #1E3F86; color: #fff; border-color: #1E3F86; }
.rp { position: relative; display: inline-block; }
.rp-box { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 78px; height: 32px; padding: 0 10px;
  border-radius: 8px; border: 1px solid #D9CFB8; background: #fff; font: inherit; font-size: 13px; color: #374151; cursor: pointer; }
.rp-box:disabled { cursor: default; opacity: .85; }
.rp-box .ri { width: 15px; height: 15px; }
.rp-day { background: #E8F6F3; border-color: #9BD3C7; color: #0F3D35; }
.rp-night { background: #E9ECFA; border-color: #A9B4E8; color: #1E2A66; }
.rp-rest { background: #F3F4F6; border-color: #D1D5DB; color: #4B5563; }
.rp-read { border-style: dashed; border-width: 1.5px; color: #6B7280; font-style: italic; }
.rp-read-day { border-color: #9BD3C7; } .rp-read-night { border-color: #A9B4E8; } .rp-read-rest { border-color: #D1D5DB; }
.rp-none { color: #9CA3AF; }
.rp-box.rp-unsaved { outline: 2px dotted #B7791F; outline-offset: 1px; }
table.roster-cut th, table.roster-cut td { padding-left: 2px; padding-right: 2px; }
table.roster-cut .rp-box { min-width: 30px; width: 30px; height: 28px; padding: 0; font-size: 12px; }
table.roster-cut th.mon, table.roster-cut td.mon { border-left: 2px solid #D9CFB8; }
.rp-menu { position: absolute; z-index: 50; background: #fff; border: 1px solid #D9CFB8; border-radius: 10px; padding: 4px;
  min-width: 170px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
.rp-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px;
  background: none; font: inherit; font-size: 13.5px; color: #374151; text-align: left; cursor: pointer; }
.rp-menu button:hover, .rp-menu button:focus-visible { background: #F1EFE8; outline: none; }
.rp-menu button.on { background: #F1EFE8; font-weight: 600; }
.rp-menu .ri { width: 15px; height: 15px; }
.rp-menu .mute { color: #6B7280; font-size: 12px; font-weight: 400; }
.rp-menu hr { border: 0; border-top: 1px solid #EEE7D8; margin: 4px 0; }

/* Oct 13 (Richard): the pay period as the page title: ‹ dates › with the payday beside it. */
.period-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.period-title .period-nav .btn { min-width: 38px; justify-content: center; padding-left: 8px; padding-right: 8px; }
.period-title .period-current { font-family: "Playfair Display", Georgia, serif; font-size: 18px; color: #1E3F86; }
.period-title .pay-pill { margin-top: 0; }
.period-older { margin-top: 6px; font-size: 13px; color: #B45309; }
.period-older a { color: #B45309; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Oct 13: To settle: tick several items of one person. */
.person-flag th.tick, .person-flag td.tick { width: 28px; text-align: center; }
.bulk-settle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-settle input[name=note] { width: 240px; height: 32px; }

/* Oct 13 (Richard): "How it works" windows. */
details.how { display: inline-block; }
details.how > .how-body { display: none; }
.how-btn { gap: 6px; }
.how-modal { max-width: 520px; width: calc(100% - 32px); }
.how-modal .how-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.how-modal .how-head h3 { margin: 0; }
.how-x { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #4B5563; padding: 4px 8px; border-radius: 6px; }
.how-x:hover { background: #F1EFE8; }
.how-modal .how-body { display: block; font-size: 14px; }
.how-modal .how-body ul { padding-left: 18px; margin: 0 0 10px; }
.how-modal .how-body li { margin-bottom: 6px; }
.how-modal .how-more { font-size: 13px; margin: 6px 0 12px; }
.title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.title-row h2 { margin-bottom: 0; }

/* ===== Oct 13 (Richard): one look for all of PAS ===== */
/* One font for everything read: DM Sans. Playfair stays only for the Bellecitta name. */
h1, .serif, .take-home .v, .rc-big, .guide h2, .signin-card header h1 { font-family: "DM Sans", "Segoe UI", system-ui, sans-serif; }
/* Even-width digits everywhere, so columns of numbers and dates line up. */
body { font-variant-numeric: tabular-nums; }
/* Numbers and dates never break across lines; a table too wide scrolls sideways in its box. */
td.r, th.r, td.num, .pay-pill, .period-current, .chip, .nowrap { white-space: nowrap; }
/* The period title (option B): DM Sans medium, the year once. */
.period-title .period-current { font-family: "DM Sans", "Segoe UI", system-ui, sans-serif; font-size: 17px; font-weight: 500;
  color: #1F2937; letter-spacing: 0; }
.period-title .period-current .pc-text { white-space: nowrap; }
/* Table headers: light blue with a navy line, the same on every table. */
th { background: #E3EEFB; color: #1E3F86; border-bottom: 2px solid #1E3F86; font-weight: 700; }
table.att-grid th { background: #E3EEFB; }
/* Long tables: the totals row stays at the bottom of the scroll area too. */
[data-scroll-arrows] table tr.total > td, [data-scroll-arrows] table tr.total > th { position: sticky; bottom: 0; z-index: 2;
  background: #F7F4EC; border-top: 2px solid #1E3F86; }
[data-scroll-arrows] table.register tr.total > :first-child { z-index: 3; }
/* One legend style: a bordered box, never mistaken for the content to check. */
.legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; border: 1px solid #D9CFB8; background: #fff;
  border-radius: 10px; padding: 8px 12px; color: var(--text); margin: 8px 0; }
.legend .lg-t { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #6B7280; }
.legend .lg { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12.5px;
  }
.legend .lg .ri { width: 13px; height: 13px; }
.legend .lg-sep { width: 1px; height: 18px; background: #E5DCC8; margin: 0 4px; }
.roster-legend .lg-read, .roster-legend .lg-saved { display: none; }
/* How it works: one help colour (amber), used by nothing that changes data. */
.how-btn, details.how > summary.btn { background: #FDF3E1; border: 1px solid #F0C98A; color: #7A4B07; }
.how-btn:hover { background: #FBE8C6; }
/* Resizing: header buttons go under the title, tab bars scroll sideways instead of breaking into rows. */
.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.tabs a { white-space: nowrap; flex: none; }
.period-title { min-width: 0; }
@media (max-width: 1200px), (pointer: coarse) {
  .hero .row { flex-direction: column; align-items: stretch; }
  .hero .acts { justify-content: flex-start; }
}
@media (max-width: 1024px), (pointer: coarse) {
  .form-grid, .two { grid-template-columns: minmax(0, 1fr); }
  .bulk-settle input[name=note] { width: 100%; }
}

/* Oct 13 (Richard): PAS's own scrollbars in every scroll area. A scrollbar PAS draws takes its own space,
   so it never covers a column or the totals row (Windows 11's overlay scrollbars float over content). */
.table-wrap, .grid-wrap, [data-scroll-arrows], .sheet-wrap, .modal, .period-list, .rp-menu, .gbot-panel,
.gbot-panel *, .slip-win { scrollbar-gutter: stable; }
.table-wrap::-webkit-scrollbar, .grid-wrap::-webkit-scrollbar, [data-scroll-arrows]::-webkit-scrollbar,
.sheet-wrap::-webkit-scrollbar, .modal::-webkit-scrollbar, .period-list::-webkit-scrollbar, .rp-menu::-webkit-scrollbar,
.gbot-panel ::-webkit-scrollbar, .slip-win::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-track, .grid-wrap::-webkit-scrollbar-track, [data-scroll-arrows]::-webkit-scrollbar-track,
.sheet-wrap::-webkit-scrollbar-track, .modal::-webkit-scrollbar-track, .period-list::-webkit-scrollbar-track,
.rp-menu::-webkit-scrollbar-track, .gbot-panel ::-webkit-scrollbar-track, .slip-win::-webkit-scrollbar-track { background: #EEF1F6; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb, .grid-wrap::-webkit-scrollbar-thumb, [data-scroll-arrows]::-webkit-scrollbar-thumb,
.sheet-wrap::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb, .period-list::-webkit-scrollbar-thumb,
.rp-menu::-webkit-scrollbar-thumb, .gbot-panel ::-webkit-scrollbar-thumb, .slip-win::-webkit-scrollbar-thumb { background: #B8C3DA; border-radius: 8px; border: 2px solid #EEF1F6; }
.table-wrap::-webkit-scrollbar-thumb:hover, .grid-wrap::-webkit-scrollbar-thumb:hover, [data-scroll-arrows]::-webkit-scrollbar-thumb:hover,
.sheet-wrap::-webkit-scrollbar-thumb:hover, .modal::-webkit-scrollbar-thumb:hover, .period-list::-webkit-scrollbar-thumb:hover,
.rp-menu::-webkit-scrollbar-thumb:hover, .gbot-panel ::-webkit-scrollbar-thumb:hover, .slip-win::-webkit-scrollbar-thumb:hover { background: #1E3F86; }
.table-wrap::-webkit-scrollbar-corner, .grid-wrap::-webkit-scrollbar-corner, [data-scroll-arrows]::-webkit-scrollbar-corner { background: #EEF1F6; }
@supports not selector(::-webkit-scrollbar) {
  .table-wrap, .grid-wrap, [data-scroll-arrows], .sheet-wrap, .modal, .period-list, .rp-menu, .gbot-panel *, .slip-win {
    scrollbar-width: thin; scrollbar-color: #B8C3DA #EEF1F6; }
}

/* Oct 13 (Richard): counts, hours and times centred (header too); pesos stay right-aligned (.r). */
.c, th.c, td.c { text-align: center; white-space: nowrap; }
/* Dates never break across lines. */
td.when { white-space: nowrap; }

/* Oct 13 (Richard): How it works sits at the end of a section's title line, and never touches a box above. */
.title-row { flex-wrap: nowrap; }
.title-row h2 { flex: 1; min-width: 0; margin-top: 0; }
.title-row { margin: 28px 0 12px; }
details.how { margin: 10px 0; }
.title-row details.how { margin: 0; flex: none; }
/* Cards that open the place to act. */
a.stat.link-card { text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s; }
a.stat.link-card:hover { box-shadow: 0 0 0 2px #B9C7E8, var(--shadow); transform: translateY(-1px); }
/* A day opened from a link: highlighted. */
tr.hit > td { background: #FDF3E1 !important; }
tr.hit > td:first-child { box-shadow: inset 4px 0 0 #F0C98A; }
a.pill { text-decoration: none; }
/* A section title with buttons on its right: the title's line runs up to the buttons. */
.bar > h2:first-child { flex: 1; min-width: 0; }
/* Oct 13 (Richard): roster day headers readable (the date biggest), and the name column keeps its space in the cut-off view. */
table.roster th:not(:first-child) { font-size: 12px; letter-spacing: .3px; }
table.roster th .dn { display: block; font-size: 15px; font-weight: 600; color: #1E3F86; letter-spacing: 0; text-transform: none; margin-top: 2px; }
table.roster-cut th:first-child, table.roster-cut td.who { padding-left: 14px; padding-right: 14px; }

/* The AWOL mark (Oct 14): beside Mark as separated */
.awol-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }

.row-actions { white-space: nowrap; }
.row-actions .btn, .row-actions form.inline { vertical-align: middle; }

/* ===== Oct 17 (Richard): the Review list and the pay period box ===== */
/* One row per person: the name in its own column, so the tags and the button line up. */
.person-flag > summary { flex-wrap: nowrap; }
/* Oct 21 (Richard): the names as wide as the longest on the page (up to 30 characters, then they wrap), so every
   View Attendance lines up in one column right after them (app.js sets --pf-name-w). */
.person-flag > summary .pf-name { flex: 0 0 var(--pf-name-w, 230px); max-width: 30ch; white-space: normal; }
.person-flag > summary .pf-count { flex: 0 0 7.5em; text-align: center; }
.person-flag > summary .pf-view { flex: 0 0 auto; }
@media (max-width: 700px) {
  .person-flag > summary { flex-wrap: wrap; }
  .person-flag > summary .pf-name { flex-basis: auto; white-space: normal; }
}
/* The answers in one even row. */
td.decide .decide-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
td.decide .decide-row .inline, td.decide .decide-row > a, td.decide .decide-row details { margin: 0; }
td.decide .decide-row .btn { height: 34px; }
/* The pay period box, larger: the team checks it often. */
.period-title .period-menu > summary.period-current { height: 56px; font-size: 22px; padding: 0 18px; }
.period-title .period-nav .btn { min-width: 50px; height: 56px; }
.period-title .period-nav .btn .i { width: 20px; height: 20px; }
.period-title .period-list { top: 60px; }
.period-title .pay-pill { font-size: 17px; padding: 8px 16px; }
.period-title .pay-pill .i { width: 18px; height: 18px; }
/* Oct 23: on a phone the box fits the header (it was cut off at the right). */
@media (max-width: 760px), (pointer: coarse) {
  .period-title .period-nav { max-width: 100%; }
  .period-title .period-menu { min-width: 0; }
  .period-title .period-menu > summary.period-current { height: 46px; font-size: 16px; padding: 0 10px; }
  .period-title .period-menu .chev { margin-left: 6px; }
  .period-title .period-nav .btn { min-width: 40px; height: 46px; }
  .period-title .period-list { top: 50px; }
  .period-title .pay-pill { font-size: 15px; padding: 6px 12px; }
}
/* The View Attendance pop-up. */
.att-modal { max-width: 1000px; width: calc(100% - 32px); max-height: calc(100vh - 48px); overflow-y: auto; }

/* Oct 17: Before / After on approvals; the change in plum (#6B3FA0), bold italic. */
.ba { font-size: 13.5px; margin: 2px 0 6px; }
.ba-k { color: var(--muted); }
.ba-sep { color: var(--faint); margin: 0 4px; }
.ba-chg { color: #6B3FA0; font-weight: 700; }
.ba-note { font-size: 12.5px; color: #8A5300; margin-top: 2px; }

/* Oct 17: requests decided since you last looked */
.decided-box { display: flex; gap: 8px; align-items: flex-start; background: #F3EEFA; border: 1px solid #DCCDEE; border-radius: 10px;
  padding: 8px 12px; margin: 0 0 12px; color: #3E2A66; }
.decided-box ul { margin: 0; }

/* Oct 17: earlier submissions on a Review item */
.earlier { color: var(--muted); margin-top: 2px; }
.earlier strong { color: var(--text); font-weight: 600; }

/* Oct 17: the Deductions file's sheets in the Export window */
.export-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 2px 28px; font-size: 13px; }
.export-sub select { width: auto; height: 30px; font-size: 13px; }

/* Oct 17: pop-up forms from Review; waiting items greyed at the bottom; Show approved */
.person-flag tr.waiting-row td { background: #F1EEE7; color: #8A8F99; }
.approved-list { margin-top: 8px; }
.approved-list > summary { cursor: pointer; color: #1E56C8; text-decoration: underline; font-size: 13px; }
.approved-list > div { margin: 3px 0 0 4px; }
.locked-who { margin: 0; font-size: 15px; }
.locked-day { display: block; padding: 8px 0; }
.form-modal { max-width: 760px; width: calc(100% - 32px); max-height: calc(100vh - 48px); overflow-y: auto; }
.form-modal .popup-error { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }

/* Oct 19 (Richard): the executive approval stage. A payroll rejected by the executive gets a red "!" on a
   black circle (for the executive's rejections only): in the side menu the "!" is larger than its circle,
   with a thin white edge; in the box it sits inside its circle. */
.nav-badge.exec { background: #111; color: #FF3B30; width: 20px; min-width: 20px; padding: 0; overflow: visible;
                  font-size: 34px; line-height: 20px; font-weight: 900; box-shadow: 0 0 0 2px #fff;
                  text-shadow: 0 0 1px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.exec-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #111; color: #FF3B30;
            font-weight: 900; font-size: 30px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.notice.reject-box { background: #FFF4F2; color: #2B1210; border: 1px solid #F1B8B0; border-left: 5px solid #C62828; }
.notice.reject-box.exec { border-left-color: #111; }
.notice.reject-box .reject-note { display: block; margin: 6px 0; padding: 8px 10px; background: #fff;
                                  border: 1px solid #F1D3CE; border-radius: 8px; font-style: italic; }
.notice.reject-box .small { display: block; }
.notice.reject-box .to-fix { margin: 4px 0 8px; }
.notice.reject-box .to-fix ul { margin: 4px 0 0; }
.notice.wait-box { background: #F3F6FB; color: #20324F; border: 1px solid #D5DEEC; border-left: 5px solid var(--brand-mid); }
.picker-chosen .tag.with-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.picker-chosen .tag.with-note .tag-note { flex: 1 1 220px; min-width: 0; padding: 6px 8px; font-size: 14px; }
/* Oct 19: the Export window (a centred pop-up): one file from a drop-down, then that file's own choices. */
.modal .export-sub { margin: 4px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #F8FAFD; }
.modal .export-sub .check { display: flex; gap: 8px; align-items: center; padding: 2px 0; }
.modal .export-sub > .small { color: var(--muted); margin-bottom: 4px; }
tr.left-row td { background: #F8D7D3; }
.legend-red { display: inline-block; width: 12px; height: 12px; background: #F8D7D3; border: 1px solid #D9534F; border-radius: 3px; vertical-align: middle; }
.tabs.sub-tabs { margin: 0 0 14px; }

/* Oct 20: "Add a note" under Review's one-click buttons */
.note-add { flex-basis: 100%; }
.note-add summary { cursor: pointer; list-style: none; color: var(--muted, #666); text-decoration: underline; }
.note-add summary::-webkit-details-marker { display: none; }
.note-add input { width: 100%; max-width: 340px; margin-top: 4px; }

/* Oct 20 (Richard): the admin batch. A tick shown only for one role; the new hire's set-up card. */
label.check[data-role-only][hidden] { display: none; }
.setup-card { border-left: 4px solid var(--warn); margin-bottom: 14px; }
/* Oct 21: what's missing, where it stands, its button (right, one even column); stacked on a phone. */
.setup-grid { display: grid; grid-template-columns: max-content fit-content(32ch) max-content; justify-content: start;
              gap: 8px 16px; align-items: center; margin: 8px 0; }   /* Oct 21: the buttons right after the text, in one column */
.setup-do { text-align: left; }
.setup-do .btn { width: 100%; justify-content: center; text-align: center; }
@media (max-width: 640px) {
  .setup-grid { grid-template-columns: 1fr; gap: 2px; }
  .setup-grid > span:not(.setup-do) { margin-bottom: 4px; }
  .setup-do { text-align: left; margin-bottom: 10px; }
  .setup-do .btn { width: auto; }
}
/* The new hires on Cash reminder: one row per person. */
.cash-new-body { flex: 1; min-width: 0; }
.cash-new-list { width: auto; margin: 6px 0; border-collapse: collapse; }
.cash-new-list td { padding: 3px 18px 3px 0; border: 0; background: none; vertical-align: middle; }
.cash-new-list td.r { padding-right: 0; }

/* Oct 21: a fieldset used only to switch a whole form to view only. */
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: inherit; }

/* Oct 21 (Richard): the user-experience review. */
.profile-tabs { flex-wrap: wrap; overflow-x: visible; }                 /* every tab visible, none cut off */
.idle-note { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 12px;
             padding: 8px 14px; border-radius: 10px; background: #EEF3FC; border: 1px solid #C9D7F2; font-size: 13.5px; }
.t-short { display: none; }
@media (max-width: 760px), (pointer: coarse) {
  .t-long { display: none; }
  .t-short { display: inline; }
  .team-hero .meta { display: none; }
  .team-hero .acts > details:last-of-type { order: -1; }             /* Submit a form first */
}

/* Oct 23 (Richard): memos — typed letters keep their line breaks; the receipt prints without its button. */
.pre-wrap { white-space: pre-wrap; }
@media print { .no-print { display: none; } }
