[x-cloak] { display: none !important; }

header.site { padding-block: 1rem; border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 1.5rem; }
header.site a { text-decoration: none; font-weight: 600; }

.flash, .errors, .warn { padding: .75rem 1rem; border-radius: var(--pico-border-radius); margin-bottom: 1rem; }
.flash { background: #e6f4ea; color: #1e4620; }
.errors { background: #fdecea; color: #611a15; }
.errors ul { margin: 0; }
.warn { background: #fff4e5; color: #663c00; }
/* Brief status message at the bottom of the viewport (cashier/cashout) */
.toast { position: fixed; left: 0; right: 0; bottom: 1.5rem; margin-inline: auto; width: max-content; z-index: 1000; max-width: min(90vw, 28rem);
         padding: .75rem 1.25rem; border-radius: var(--pico-border-radius); background: #1e4620; color: #fff; box-shadow: 0 .25rem 1rem rgba(0,0,0,.3); }
.muted { color: var(--pico-muted-color); }

/* Compact controls inside tables and repeating rows */
table input:not([type=checkbox]), table select, table button { margin-bottom: 0; }
table button, .inline button, button.small { padding: .25rem .6rem; font-size: .875rem; width: auto; }
form.inline { display: inline; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: .75rem; }
.row > label { flex: 1 1 9rem; margin: 0; }
.row > button { width: auto; margin-bottom: var(--pico-spacing); }
.days { display: flex; flex-wrap: wrap; gap: .25rem .9rem; flex: 2 1 18rem; margin-bottom: var(--pico-spacing); }
.days label { margin: 0; white-space: nowrap; }

.grid-wrap { overflow-x: auto; }
table.availability th, table.availability td { text-align: center; white-space: nowrap; }
table.availability th:first-child, table.availability td:first-child { text-align: left; }
table.availability tr.day th { text-align: left; background: var(--pico-card-sectioning-background-color); }
table.availability input[type=checkbox] { margin: 0; }
nav.tabs { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }

/* Admin scheduling grid: scrolls both ways; three header rows and the first four columns stay put. */
.sched-wrap { width: 100vw; margin-left: calc(50% - 50vw); padding-inline: 1rem; box-sizing: border-box; }
.sched-scroll { overflow: auto; max-height: 75vh; border: 1px solid var(--pico-muted-border-color); }
table.sched { --row-h: 2.25rem; --w1: 14rem; --w2: 4rem; --w3: 4.5rem; --w4: 4.5rem; --h2: 3.5rem;
              border-collapse: separate; border-spacing: 0; width: max-content; margin: 0; color: #111; font-size: .875rem; }
table.sched th, table.sched td { box-sizing: border-box; height: var(--row-h); padding: 0 .5rem; text-align: center; white-space: nowrap;
                                 border-right: 1px solid #d0d0d0; border-bottom: 1px solid #d0d0d0; background: #fff; color: #111; }
table.sched thead th { position: sticky; background: #dfe6ee; font-weight: 600; z-index: 3; }
table.sched thead tr:nth-child(1) th { top: 0; }
table.sched thead tr:nth-child(2) th { top: var(--row-h); }
table.sched thead tr:nth-child(3) th { top: calc(var(--row-h) + var(--h2)); }
table.sched thead tr:nth-child(2) th { height: var(--h2); white-space: pre-line; line-height: 1.2; }
table.sched thead th.c3, table.sched thead th.c4 { white-space: normal; line-height: 1.2; }
table.sched .c1, table.sched .c2, table.sched .c3, table.sched .c4 { position: sticky; z-index: 2; }
table.sched thead .c1, table.sched thead .c2, table.sched thead .c3, table.sched thead .c4 { z-index: 4; }
table.sched .c1 { left: 0; width: var(--w1); min-width: var(--w1); max-width: var(--w1); text-align: left; overflow: hidden; text-overflow: ellipsis; }
table.sched .c2 { left: var(--w1); width: var(--w2); min-width: var(--w2); }
table.sched .c3 { left: calc(var(--w1) + var(--w2)); width: var(--w3); min-width: var(--w3); }
table.sched .c4 { left: calc(var(--w1) + var(--w2) + var(--w3)); width: var(--w4); min-width: var(--w4); border-right: 2px solid #888; }
table.sched tr.parent td { background: #ececec; border-bottom: 2px solid #888; }
table.sched .day-end { border-right: 2px solid #888; }
table.sched td.avail { background: #d6f2d6; }
table.sched tr.parent td.avail { background: #b3dfb3; }
table.sched td input[type=checkbox] { margin: 0; vertical-align: middle; }
table.sched td.c1.met { background: #8fd18f; }
table.sched td.c1.over { background: #f4a0a0; }
table.sched td.over { color: #a40000; font-weight: 600; }
table.sched td.short { color: #a40000; font-weight: 600; }
table.sched td.done { color: #1e6b1e; font-weight: 600; }
.overlap-dialog article { max-width: 28rem; }

/* Web version of the schedule report */
.report .rpt-day { margin-bottom: 2rem; }
.report table.rpt-shifts { width: 100%; table-layout: auto; }
.report table.rpt-shifts td { vertical-align: top; border: 0; }
.report ul.rpt-names { margin: 0; padding-left: 1.2rem; }
.rpt-none { color: var(--pico-muted-color); }

/* Calendar-style cashier/cashout reports */
.report table.rpt-cal { table-layout: fixed; width: 100%; }
.report table.rpt-cal th, .report table.rpt-cal td { border: 1px solid var(--pico-muted-border-color); vertical-align: top; padding: .4rem .5rem; font-size: .8rem; }
.report .rpt-cal-date { font-weight: 700; margin-bottom: .25rem; }
.report .rpt-cal-off { background: var(--pico-card-sectioning-background-color); }

.rpt-draft { color: #c00; font-weight: 700; letter-spacing: .05em; margin-left: .5rem; }

/* Attendance app */
table.attendance th.status, table.attendance td.status { width: 12rem; text-align: left; }
table.attendance td.buttons { white-space: nowrap; }
table.attendance td.buttons button { margin: 0 .15rem 0 0; }
.st-present { color: #1e8e3e; }
.st-absent { color: #d93025; }
.st-sub { color: #1a73e8; }
.shift-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.shift-nav [role=button], .shift-nav button { margin: 0; }
.shift-go { display: flex; gap: .75rem; align-items: end; }
.shift-go label { flex: 1; margin: 0; }
.shift-go button { width: auto; margin: 0; }

.report .qr-big svg { width: min(100%, 28rem); height: auto; }
.report .qr-big { margin-top: 1rem; }
