/* =========================================================================
   Page-specific patterns.
   ========================================================================= */

/* ---------- Dashboard ---------- */
.hello { text-align: center; margin: .75rem 0 1.75rem; }
.hello h1 { font-size: var(--t-lg); font-weight: 550; letter-spacing: -.015em; margin: 0; }
.hello p { margin: .2rem 0 0; color: var(--ink-3); }
.next-leave { display: flex; align-items: center; gap: 1.1rem; padding: 1.15rem 1.25rem; border-radius: var(--r-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), var(--surface) 65%); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); }
.next-leave .big { font-size: 2.1rem; font-weight: 750; letter-spacing: -.04em; line-height: 1; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.next-leave .big small { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); letter-spacing: 0; display: block; margin-top: .25rem; }
.next-leave .what { font-weight: 650; }
.next-leave .when { font-size: var(--t-sm); color: var(--ink-3); }
.bal-card { padding: 1.05rem 1.15rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem 1rem; align-items: center; }
.bal-card .ring { grid-row: span 3; }
.bal-name { font-size: var(--t-sm); font-weight: 650; }
.bal-num { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.bal-num small { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.bal-meta { font-size: var(--t-xs); color: var(--ink-3); }
.queue-item { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.15rem; border-bottom: 1px solid var(--line); }
.queue-item:last-child { border-bottom: 0; }
.queue-item .qi-main { flex: 1; min-width: 0; }
.queue-item .t { font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .m { font-size: var(--t-xs); color: var(--ink-3); }
.age-flag { color: var(--warn); font-weight: 650; }
.feed-item { display: flex; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.feed-item:first-child { border-top: 0; padding-top: 0; }
.feed-item .w { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; margin-left: auto; padding-left: .5rem; }

/* availability heat strip (next 14 days) */
.heat { display: grid; grid-template-columns: repeat(var(--days, 14), minmax(0, 1fr)); gap: .3rem; }
.heat-day { text-align: center; font-size: .66rem; color: var(--ink-3); }
.heat-day .cell { height: 2.4rem; border-radius: 7px; background: var(--sunken); display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); margin-bottom: .3rem; border: 1px solid transparent; }
.heat-day .cell.l1 { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.heat-day .cell.l2 { background: color-mix(in srgb, var(--brand) 38%, var(--surface)); color: var(--ink); }
.heat-day .cell.l3 { background: color-mix(in srgb, var(--warn) 45%, var(--surface)); color: var(--ink); }
.heat-day .cell.off { background: repeating-linear-gradient(-45deg, var(--sunken), var(--sunken) 4px, transparent 4px, transparent 8px); color: var(--ink-3); }
.heat-day .cell.today { border-color: var(--brand); }
.heat-day b { display: block; color: var(--ink-2); font-weight: 650; font-size: .7rem; }
@media (max-width: 575.98px) { .heat { --days: 7; } .heat-day:nth-child(n+8) { display: none; } }

/* ---------- Calendar ---------- */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: .6rem .75rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--raised); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 7.25rem; padding: .45rem .5rem .55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal-week .cal-cell:nth-child(7n) { border-right: 0; }
.cal-week:last-child .cal-cell { border-bottom: 0; }
.cal-cell.out { background: var(--raised); }
.cal-cell.weekend { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)); }
.cal-num { font-size: var(--t-xs); font-weight: 650; color: var(--ink-3); width: 1.55rem; height: 1.55rem; border-radius: 50%; display: grid; place-items: center; }
.cal-cell.today .cal-num { background: var(--brand); color: #fff; }
[data-bs-theme="dark"] .cal-cell.today .cal-num { color: #0b1a33; }
.cal-ev { display: flex; align-items: center; gap: .35rem; padding: .15rem .4rem; border-radius: 5px; font-size: .72rem; font-weight: 600; line-height: 1.3; min-width: 0; text-decoration: none !important; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.ok { background: var(--ok-soft); color: var(--ok); }
.cal-ev.warn { background: var(--warn-soft); color: var(--warn); background-image: repeating-linear-gradient(-45deg, transparent, transparent 4px, color-mix(in srgb, var(--warn) 10%, transparent) 4px, color-mix(in srgb, var(--warn) 10%, transparent) 8px); }
.cal-ev.hol { background: var(--info-soft); color: var(--info); }
.desk .kpi-start { text-align: left; }
.desk .kpi-start .kpi-foot { justify-content: flex-start; }
.desk-group { margin-bottom: 1.25rem; }
.desk-group-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-size: var(--t-sm); font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.desk-group-title .bi { color: var(--ink-3); }
.desk-group-title span { margin-left: .25rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
@media (max-width: 1199.98px) { .desk .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .desk .kpis-5 > :first-child { grid-column: 1 / -1; } }
.desk-head { flex-wrap: wrap; gap: .5rem .6rem; align-items: center; }
.desk-chip { font-weight: 600; white-space: nowrap; }
.desk, .desk .panel, .desk .panel-body { min-width: 0; }
.whoout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; overflow-x: auto; max-width: 100%; }
.desk .panel-head { flex-wrap: wrap; gap: .4rem .75rem; }
.wo-row { display: grid; grid-template-columns: minmax(8rem, 11rem) repeat(7, minmax(2.6rem, 1fr)); gap: .35rem; align-items: center; min-width: 30rem; }
.wo-day { display: grid; justify-items: center; gap: .1rem; padding: .35rem 0; border-radius: 9px; background: var(--sunken); font-size: .68rem; color: var(--ink-3); text-transform: uppercase; }
.wo-day b { font-weight: 700; } .wo-day > span { font-size: var(--t-sm); font-weight: 700; color: var(--ink); text-transform: none; }
.wo-day.is-today { background: var(--ink); color: color-mix(in srgb, var(--surface) 75%, transparent); } .wo-day.is-today > span { color: var(--surface); }
.wo-name { min-width: 0; font-size: var(--t-sm); line-height: 1.25; }
.wo-cell { position: relative; height: 1.65rem; border-radius: 7px; background: var(--sunken); }
.wo-cell.off { background: repeating-linear-gradient(-45deg, var(--sunken), var(--sunken) 4px, transparent 4px, transparent 8px); }
.wo-cell.k-approved { background: var(--ok); }
.wo-cell.k-pending { background: var(--warn-soft); box-shadow: inset 0 0 0 1.5px var(--warn); }
.wo-cell.k-planned { background: color-mix(in srgb, var(--brand) 10%, transparent); outline: 1.5px dashed color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: -1.5px; }
.attn { display: flex; align-items: center; gap: .85rem; }
.attn-count { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; font-weight: 700; }
.attn-count.tone-warn { background: var(--warn-soft); color: var(--warn); } .attn-count.tone-bad { background: var(--bad-soft); color: var(--bad); } .attn-count.tone-info { background: var(--info-soft); color: var(--info); }
.rest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .9rem 1.5rem; }
.report-preview { min-height: 3.2rem; }
.outcome-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 4.5rem; align-items: center; gap: .75rem; }
.outcome-row .st { justify-self: start; }
progress.outcome-approved::-webkit-progress-value { background: var(--ok); } progress.outcome-approved::-moz-progress-bar { background: var(--ok); }
progress.outcome-rejected::-webkit-progress-value { background: var(--bad); } progress.outcome-rejected::-moz-progress-bar { background: var(--bad); }
progress.outcome-pending_approval::-webkit-progress-value { background: var(--warn); } progress.outcome-pending_approval::-moz-progress-bar { background: var(--warn); }
progress.outcome-cancelled::-webkit-progress-value { background: var(--mute); } progress.outcome-cancelled::-moz-progress-bar { background: var(--mute); }
.insights { display: grid; gap: .55rem; padding-left: 1.1rem; }
.insights li::marker { color: var(--brand); }
.report-preview .spark { width: 100%; height: 2.6rem; }
.report-donut { width: 3.6rem; flex: none; }
.report-donut .donut { width: 3.6rem; height: 3.6rem; }
.hbar-sm { font-size: var(--t-xs); grid-template-columns: 7rem minmax(0, 1fr) 2.5rem; }
.tline { min-width: 52rem; }
.tline-row { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); }
.tline-row:last-child { border-bottom: 0; }
.tline-name { padding: .55rem 1rem; min-width: 0; }
.tline-head { background: var(--raised); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tline-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.tline-months span { padding: .6rem 0 .6rem .35rem; border-left: 1px solid var(--line); }
.tline-track { display: block; width: 100%; height: 2.6rem; }
.tline-grid { stroke: var(--line); stroke-width: .012; vector-effect: non-scaling-stroke; }
.tline-now { stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.tline-bar.tl-approved { fill: var(--ok); }
.tline-bar.tl-pending { fill: var(--warn); }
.tline-bar.tl-planned { fill: color-mix(in srgb, var(--brand) 18%, transparent); stroke: var(--brand); stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.mini-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; text-align: center; }
.mini-cal .mc-head { font-size: .68rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; padding-bottom: .2rem; }
.mini-cal .mc-day { position: relative; font-size: var(--t-xs); font-weight: 600; line-height: 2rem; border-radius: 8px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mini-cal .mc-day.out { visibility: hidden; }
.mini-cal .mc-day.weekend { color: var(--ink-3); font-weight: 500; }
.mini-cal .mc-day.today { background: var(--brand); color: #fff; }
[data-bs-theme="dark"] .mini-cal .mc-day.today { color: #0b1a33; }
.mini-cal .mc-day.hol::after { content: ""; position: absolute; left: 50%; bottom: .2rem; width: .3rem; height: .3rem; margin-left: -.15rem; border-radius: 50%; background: var(--info); }
.mini-cal .mc-day.mk-ok { background: var(--ok-soft); color: var(--ok); }
.mini-cal .mc-day.mk-warn { background: var(--warn-soft); color: var(--warn); }
.mini-cal .mc-day.mk-plan { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 55%, transparent); color: var(--brand); }
.mini-cal .mc-day.today.mk-ok, .mini-cal .mc-day.today.mk-warn, .mini-cal .mc-day.today.mk-plan { background: var(--brand); color: #fff; }
.cal-ev.plan { background: transparent; color: var(--brand); border: 1px dashed color-mix(in srgb, var(--brand) 55%, transparent); }
.cal-more { font-size: .7rem; color: var(--ink-3); font-weight: 600; padding-left: .35rem; }
.agenda .day { display: flex; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.agenda .day:last-child { border-bottom: 0; }
.date-tile { width: 3.1rem; flex: none; text-align: center; border-radius: var(--r); background: var(--sunken); padding: .35rem 0; line-height: 1.1; }
.date-tile b { display: block; font-size: var(--t-lg); font-weight: 700; color: var(--ink); }
.date-tile span { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.date-tile.brand { background: var(--brand-soft); } .date-tile.brand b, .date-tile.brand span { color: var(--brand-ink); }
.agenda .evs { display: grid; gap: .3rem; flex: 1; min-width: 0; align-content: center; }

/* ---------- Request form ---------- */
.req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 2rem; align-items: start; }
.req-summary { position: sticky; top: calc(var(--top-h) + 1rem); }
.sum-big { font-size: 2.5rem; font-weight: 750; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.sum-big small { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.sum-rows { display: grid; gap: .55rem; font-size: var(--t-sm); margin-top: 1rem; }
.sum-rows div { display: flex; justify-content: space-between; gap: 1rem; }
.sum-rows dt { color: var(--ink-3); font-weight: 500; } .sum-rows dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.sum-note { display: flex; gap: .5rem; font-size: var(--t-xs); padding: .6rem .7rem; border-radius: var(--r-sm); margin-top: .75rem; }
.sum-note.ok { background: var(--ok-soft); color: var(--ok); } .sum-note.bad { background: var(--bad-soft); color: var(--bad); } .sum-note.info { background: var(--info-soft); color: var(--info); }
.dropzone { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: var(--raised); cursor: pointer; transition: border-color var(--dur), background-color var(--dur); }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .t { font-weight: 600; font-size: var(--t-sm); } .dropzone .d { font-size: var(--t-xs); color: var(--ink-3); }
@media (max-width: 991.98px) { .req-layout { grid-template-columns: minmax(0, 1fr); } .req-summary { position: static; } }

/* ---------- Request / plan detail ---------- */
.detail-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; padding: 1.25rem; }
.detail-hero .range { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.02em; }
.detail-hero .range .bi { color: var(--ink-3); font-size: .9em; margin: 0 .35rem; }
.stat-inline { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat-inline .l { font-size: var(--t-xs); color: var(--ink-3); font-weight: 550; } .stat-inline .v { font-size: var(--t-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.decision-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .9rem 1.15rem; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); border-radius: var(--r-lg); margin-bottom: 1.25rem; }
.decision-bar .txt { flex: 1; min-width: 12rem; font-size: var(--t-sm); color: var(--ink); }
.decision-bar .txt strong { display: block; }

/* ---------- Permission matrix ---------- */
.perm-group { border-top: 1px solid var(--line); }
.perm-group:first-child { border-top: 0; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.15rem; background: var(--raised); }
.perm-group-head h2, .perm-group-head h3 { font-size: var(--t-sm); font-weight: 700; margin: 0; text-transform: capitalize; display: flex; align-items: center; gap: .5rem; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1.15rem; border-top: 1px solid var(--line); }
.perm-row .t { font-size: var(--t-sm); font-weight: 550; } .perm-row .d { font-size: var(--t-xs); color: var(--ink-3); }
.perm-row .form-switch { margin: 0; } .perm-row .form-switch .form-check-input { float: none; margin: 0; }
.perm-row.is-hidden, .perm-group.is-hidden { display: none; }

/* ---------- Audit ---------- */
.audit-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .85rem; padding: .8rem 1.15rem; border-bottom: 1px solid var(--line); align-items: start; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .what { font-size: var(--t-sm); line-height: 1.45; }
.audit-row .what strong { font-weight: 650; }
.audit-row .meta { font-size: var(--t-xs); color: var(--ink-3); margin-top: .15rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.audit-row .when { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; text-align: right; }
.audit-row details { margin-top: .45rem; }
.audit-row summary { font-size: var(--t-xs); color: var(--brand); font-weight: 600; cursor: pointer; width: fit-content; }
.diff { width: 100%; margin-top: .45rem; font-size: var(--t-xs); border: 1px solid var(--line); border-radius: var(--r-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.diff th, .diff td { padding: .35rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.diff tr:last-child td { border-bottom: 0; }
.diff th { background: var(--raised); color: var(--ink-3); font-weight: 650; text-align: left; }
.diff .old { color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 40%, transparent); } .diff .new { color: var(--ok); }
.day-sep { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: .7rem 1.15rem .4rem; background: var(--raised); border-bottom: 1px solid var(--line); }

/* ---------- Health ---------- */
.health { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; }
.health-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.health-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); } .health-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); } .health-dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }

/* Auth: see the "Sign-in" block at the end of this file. */

/* utility */
.mw-240 { max-width: 240px; } .mw-480 { max-width: 480px; } .mw-560 { max-width: 560px; } .mw-640 { max-width: 640px; } .mw-720 { max-width: 720px; } .mw-760 { max-width: 760px; } .mw-860 { max-width: 860px; }
.flex-none { flex: none; }
.gap-section { margin-top: 1.25rem; }
[data-preview] [data-show] { display: none; }
[data-preview][data-state="idle"] [data-show="idle"], [data-preview][data-state="loading"] [data-show="loading"], [data-preview][data-state="ready"] [data-show="ready"] { display: block; }
[data-attachment].is-required .dropzone { border-color: color-mix(in srgb, var(--bad) 45%, var(--line-strong)); }
[data-attachment].is-required [data-attachment-required-not] { display: none; }

/* Sign-in: "or" divider before single sign-on */
.auth-or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 var(--s-4); color: var(--ink-3); font-size: var(--t-sm); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-box .auth-or + .btn-lg { margin-top: 0; }

/* Settings → Branding previews */
.brand-preview { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--sunken); max-width: 35rem; }
.brand-preview-label { font-size: var(--t-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.fav-tab { display: inline-flex; align-items: center; gap: .5rem; max-width: 16rem; padding: .4rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px 8px 0 0; font-size: var(--t-sm); }
.fav-tab img { width: 16px; height: 16px; object-fit: contain; }
.fav-default { width: 16px; height: 16px; border-radius: 4px; background: var(--brand); flex: none; }

/* Public leave verification (QR on the leave form) */
.verify { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); border: 1px solid var(--line); margin: var(--s-4) 0; }
.verify > i { font-size: 1.6rem; line-height: 1; }
.verify strong { display: block; font-size: var(--t-md); }
.verify p { margin: .25rem 0 0; color: var(--ink-2); }
.verify-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); } .verify-ok > i { color: var(--ok); }
.verify-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); } .verify-warn > i { color: var(--warn); }
.verify-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); } .verify-bad > i { color: var(--bad); }
.verify-facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; }
.verify-facts dt { color: var(--ink-3); font-weight: 550; }
.verify-facts dd { margin: 0; font-weight: 600; }
.select-day { max-width: 6rem; }

/* Balance card breakdown: carried + earned − used */
.bal-break { margin: var(--s-3) 0 0; padding-top: var(--s-2); border-top: 1px solid var(--line); display: grid; gap: .15rem; font-size: var(--t-sm); }
.bal-break div { display: flex; justify-content: space-between; gap: var(--s-2); }
.bal-break dt { color: var(--ink-3); font-weight: 500; }
.bal-break dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bal-policy { margin-top: var(--s-2); font-size: var(--t-xs, .75rem); color: var(--ink-3); }
.auth-mobile-logo .logo-mark { background: var(--auth-green); color: #fff; box-shadow: none; }

/* Account → My signature: pad and previews stay white in dark mode, like the paper they print on */
.sig-side { display: grid; gap: 1.25rem; min-width: 0; }
.sig-paper { display: flex; align-items: center; justify-content: center; min-height: 7rem; padding: var(--s-3); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r); }
.sig-paper[hidden] { display: none; }
.sig-paper img { max-width: 100%; max-height: 6rem; }
.sig-pad { position: relative; height: 15rem; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.sig-pad:focus-within, .sig-pad:hover { border-color: var(--brand); }
.sig-pad canvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-pad-line { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 3.25rem; border-bottom: 1.5px solid #c4cac3; pointer-events: none; }
.sig-pad-here { position: absolute; left: 1.5rem; bottom: 3.75rem; color: #6a726c; font-size: var(--t-sm); pointer-events: none; transition: opacity .15s; }
.sig-pad.has-ink .sig-pad-here { opacity: 0; }
[data-sig-upload] .dropzone { display: flex; padding: 1.75rem 1.25rem; margin: 0; }
.sig-empty { display: flex; gap: .85rem; align-items: flex-start; }
.sig-empty b { display: block; font-size: var(--t-sm); font-weight: 650; }
.sig-empty p { margin: .2rem 0 0; font-size: var(--t-xs); color: var(--ink-3); }
.sig-notes { display: grid; gap: .8rem; margin: 0; list-style: none; font-size: var(--t-sm); color: var(--ink-2); }
.sig-notes li { display: flex; gap: .65rem; align-items: flex-start; }
.sig-notes .bi { color: var(--ink-3); margin-top: .1rem; }
@media (max-width: 575.98px) { .panel-head:has([data-sig-tabs]) { flex-direction: column; align-items: stretch; } [data-sig-tabs] { display: grid; grid-template-columns: 1fr 1fr; } [data-sig-tabs][hidden] { display: none; } [data-sig-tabs] button { justify-content: center; } .sig-pad { height: 12rem; } .panel-foot:has([data-sig-save]) { flex-direction: column; align-items: stretch; } }

/* Settings → SMS: only the chosen provider's fields */
.sms-form:not(:has(#pv-gateway:checked)) .sms-for-gateway, .sms-form:not(:has(#pv-http:checked)) .sms-for-http { display: none; }

/* Dashboard to-dos: each its own tinted card, coloured by urgency, with a dismiss button. */
.action-list { display: grid; gap: .6rem; }
.action-item { border: 0; border-radius: var(--r-md, 12px); background: var(--panel); border-left: 4px solid var(--line); padding-left: 1rem; }
.action-item.tone-bad  { background: var(--bad-soft);  border-left-color: var(--bad); }
.action-item.tone-warn { background: var(--warn-soft); border-left-color: var(--warn); }
.action-item.tone-info { background: var(--info-soft); border-left-color: var(--info); }
.action-item .ico-chip { background: var(--surface); }
.action-item .btn-outline-secondary { background: var(--surface); }
.action-item[hidden] { display: none; }

/* Account → My photo */
.photo-current { display: flex; align-items: center; gap: 1rem; }
.photo-preview { display: flex; align-items: center; gap: .85rem; font-size: var(--t-sm); color: var(--ink-3); }
.photo-preview[hidden] { display: none; }
.photo-preview img { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line); }

/* Request form: numbered steps that tick off, empty-balance warning, live to-do list in the summary */
.step-dot { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-right: .55rem; border-radius: 50%; font-size: .75rem; font-weight: 700; background: var(--sunken); color: var(--ink-2); vertical-align: -.1em; transition: background-color var(--dur), color var(--dur); }
form:has(input[name="leave_type_id"]:checked) .step-dot[data-step="type"],
form:has(#start_date:valid):has(#end_date:valid) .step-dot[data-step="dates"] { background: var(--ok); color: #fff; font-size: 0; }
form:has(input[name="leave_type_id"]:checked) .step-dot[data-step="type"]::before,
form:has(#start_date:valid):has(#end_date:valid) .step-dot[data-step="dates"]::before { font-family: "bootstrap-icons"; content: "\F633"; font-size: .9rem; }

.rcard.is-empty label { border-style: dashed; }
.rcard .none-left { color: var(--bad); font-weight: 600; }
.none-left-note { display: none; }
form:has(input[data-none-left]:checked) .none-left-note { display: block; }

.sum-todo { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: var(--t-sm); }
.sum-todo li { display: flex; align-items: center; gap: .5rem; color: var(--ink-2); }
.sum-todo li i::before { content: "\F28A"; color: var(--ink-3); }  /* empty circle */
form:has(input[name="leave_type_id"]:checked) [data-todo="type"],
form:has(#start_date:valid) [data-todo="start"],
form:has(#end_date:valid) [data-todo="end"] { color: var(--ink-3); text-decoration: line-through; }
form:has(input[name="leave_type_id"]:checked) [data-todo="type"] i::before,
form:has(#start_date:valid) [data-todo="start"] i::before,
form:has(#end_date:valid) [data-todo="end"] i::before { content: "\F26A"; color: var(--ok); }  /* check-circle-fill */


/* Leave plan: days planned against the year's annual leave */
.plan-target-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.plan-target-num { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.plan-target-num small { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.plan-target.is-done { box-shadow: inset 4px 0 0 var(--ok); }

/* Approved request: the official form, ready to view or download */
.approved-form { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding: .9rem 1.1rem; margin-bottom: 1.25rem; border-radius: var(--r-md, 12px); background: var(--ok-soft); box-shadow: inset 4px 0 0 var(--ok); }
.approved-form .txt { flex: 1 1 16rem; min-width: 0; display: grid; gap: .1rem; font-size: var(--t-sm); }
.approved-form .txt span { color: var(--ink-2); }
.approved-form .btn-outline-secondary { background: var(--surface); }

/* Dashboard: request cards — white, bordered, squared-off corners */

.req-cards { display: grid; gap: .6rem; }
.req-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--r-sm); transition: border-color var(--dur), box-shadow var(--dur); }
.req-card:hover { box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.req-card.status-approved { border-left-color: var(--ok); }
.req-card.status-pending_approval { border-left-color: var(--warn); }
.req-card.status-rejected { border-left-color: var(--bad); }
.req-card-main { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; }
.req-card-main .qi-main { flex: 1; min-width: 0; }
.req-card-main .t { font-weight: 650; font-size: var(--t-sm); }
.req-card-main .m { font-size: var(--t-xs); color: var(--ink-3); }
.req-card .date-tile { border-radius: var(--r-sm); }
.req-card-pdf { display: flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-top: 1px solid var(--line); font-size: var(--t-xs); font-weight: 600; }

/* Blackout form: pick people only when "Certain people" is chosen */
.blackout-who legend { font-size: inherit; }
.blackout-people { max-height: 14rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .75rem; background: var(--surface); }
.blackout-who:has(#applies-all:checked) .blackout-people { display: none; }

/* Settings → SMS: custom API request preview and placeholder list */
.sms-preview { margin: 0; padding: .75rem; max-height: 22rem; overflow: auto; font-family: var(--mono); font-size: var(--t-xs); line-height: 1.5; white-space: pre-wrap; word-break: break-all; color: var(--ink-2); background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); }
.sms-ph li { margin-bottom: .2rem; }


/* ---------- Sign-in ----------
   Light form column on the left, an evergreen holiday calendar on the right; on phones the calendar becomes a short
   header above the form. */
.auth-page { --auth-deep: #1D3E36; --auth-green: #2F6B5C; --auth-gold: #E2B850; --auth-bg: #F4F6F5; --auth-line: #E1E8E5; --auth-field-line: #C9D4D0; --auth-muted: #56655F; --auth-ink: #0F1A17; --auth-soft: #C9D8D2; --auth-dim: #A9BDB5; }
.auth-page { --brand: #2F6B5C; --brand-hover: #1D3E36; --brand-soft: #DCEBE5; --brand-ink: #1D3E36; } /* sign-in pages stay evergreen; the app itself is blue */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--auth-bg); color: var(--auth-ink); }
.auth-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-brand-chip { display: inline-flex; align-items: center; padding: 10px 16px; background: #fff; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.auth-brand .logo-img, html[data-sidebar] .auth-brand .logo-img.is-wide { display: block; height: 4.5rem; width: auto; max-width: 14rem; padding: 0; background: none; object-fit: contain; border-radius: 0; }
.auth-brand-tag { font-size: .8125rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--auth-gold); }
.auth-lang { display: flex; gap: 2px; padding: 4px; background: #fff; border: 1px solid var(--auth-line); border-radius: 999px; }
.auth-lang a, .auth-lang span { display: grid; place-items: center; height: 2.25rem; padding: 0 1rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: #3F4F49; text-decoration: none; }
.auth-lang a:hover { background: var(--auth-bg); color: var(--auth-ink); }
.auth-lang [aria-current] { background: var(--auth-deep); color: #fff; }
.auth-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100vh; }

.auth-main { min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 1.5rem 2.5rem 2.5rem; }
.auth-main-top { align-self: stretch; display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.auth-box { width: 100%; max-width: 29rem; margin-block: auto; }
.auth-card { padding: 2.5rem 2.25rem; background: #fff; border: 1px solid var(--auth-line); border-radius: 24px; box-shadow: 0 1px 2px rgba(15, 26, 23, .04), 0 24px 48px -24px rgba(29, 62, 54, .25); }
.auth-box > .auth-alt { margin-inline: .25rem; }
.auth-box h1 { margin: 0 0 .75rem; font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; color: var(--auth-ink); }
.auth-box .lead-sub { margin: 0 0 1.75rem; font-size: 1.0625rem; line-height: 1.55; color: var(--auth-muted); }
.auth-box .field + .field, .auth-box .field + fieldset.field { margin-top: 1.125rem; }
.auth-box label, .auth-box .form-label, .auth-box legend { font-size: .875rem; font-weight: 600; color: var(--auth-ink); margin-bottom: .5rem; }
.auth-box a:not(.btn) { color: var(--auth-green); font-weight: 600; text-decoration: none; }
.auth-box a:not(.btn):hover { color: var(--auth-deep); text-decoration: underline; }
.auth-card .form-control { min-height: 3.5rem; font-size: 1rem; background: #fff; border: 1px solid var(--auth-field-line); border-radius: 14px; box-shadow: none; }
.auth-card .form-control:hover { border-color: #9fb1aa; }
.auth-card .form-control:focus { border-color: var(--auth-green); box-shadow: 0 0 0 4px #DCEBE5; }
.auth-input { position: relative; }
.auth-input > .bi { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.15rem; color: var(--auth-muted); pointer-events: none; z-index: 1; }
.auth-input > .form-control { padding-left: 2.85rem; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 2.75rem; }
.pw-toggle { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 2.1rem; height: 2.1rem; border: 0; background: transparent; color: var(--ink-3); border-radius: var(--r-sm); display: grid; place-items: center; z-index: 1; }
.pw-toggle:hover { color: var(--ink); background: var(--sunken); }
.pw-toggle.pw-toggle-text { width: auto; height: calc(100% - .5rem); padding: 0 .9rem; right: .25rem; font-size: .875rem; font-weight: 600; color: var(--auth-green); border-radius: 10px; }
.pw-wrap .pw-toggle-text ~ .form-control, .pw-wrap .form-control:has(~ .pw-toggle-text) { padding-right: 5rem; }
.otp-input { letter-spacing: .5em; font-size: var(--t-lg) !important; text-align: center; font-variant-numeric: tabular-nums; }

.auth-switch { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; margin: 1rem 0 0 !important; padding-left: 0; }
.auth-switch .form-check-input { width: 2.75rem; height: 1.625rem; margin: 0; flex: none; float: none; cursor: pointer; background-color: var(--auth-field-line); border: 0; --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); }
.auth-switch .form-check-input:checked { background-color: var(--auth-green); }
.auth-switch .form-check-input:focus { box-shadow: 0 0 0 4px #DCEBE5; }
.auth-switch .form-check-label { margin: 0; font-size: .9375rem; font-weight: 400; cursor: pointer; }
.auth-box .form-check:not(.auth-switch) { margin-top: 1rem !important; }
.auth-box .form-check-input:checked { background-color: var(--auth-green); border-color: var(--auth-green); }

.auth-box .btn-primary { color: #fff; background: var(--auth-deep); border-color: var(--auth-deep); }
.auth-box .btn-primary:hover, .auth-box .btn-primary:focus-visible { color: #fff; background: #142d27; border-color: #142d27; }
.auth-box .btn-lg { width: 100%; min-height: 3.625rem; margin-top: 1.5rem; border-radius: 14px; font-size: 1.0625rem; font-weight: 600; }
.auth-go { display: flex; align-items: center; justify-content: space-between; padding: 0 .5rem 0 1.5rem; }
.auth-go-arrow { width: 2.75rem; height: 2.75rem; border-radius: 10px; display: grid; place-items: center; background: var(--auth-gold); color: var(--auth-deep); font-size: 1.15rem; transition: transform .15s; }
.auth-go:hover .auth-go-arrow { transform: translateX(3px); }
.auth-alt { margin: 1.5rem 0 0; font-size: .9375rem; color: var(--auth-muted); }
.auth-alt strong { color: var(--auth-green); font-weight: 600; }
.auth-or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 var(--s-4); color: var(--auth-muted); font-size: var(--t-sm); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--auth-line); }
.auth-box .auth-or + .btn-lg { margin-top: 0; }

.auth-art { order: -1; min-width: 0; min-height: 100vh; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem; padding: 2rem 3rem 2rem; background: var(--auth-deep); color: #fff; }
.auth-art > :not(.auth-arcs) { position: relative; z-index: 1; }
.auth-arcs { position: absolute; right: -16rem; top: -12rem; width: 38.75rem; height: 38.75rem; fill: none; stroke-width: 30; pointer-events: none; }
.auth-eyebrow { display: block; margin: 0; font-size: .8125rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--auth-gold); }
.auth-next { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-end; }
.auth-next-date { display: flex; flex-direction: column; gap: .25rem; }
.auth-next-row { display: flex; align-items: flex-end; gap: 1rem; }
.auth-next-day { font-size: clamp(5rem, 9vw, 9.25rem); line-height: .85; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.auth-next-meta { display: flex; flex-direction: column; gap: .25rem; padding-bottom: .5rem; }
.auth-next-month { font-size: 1.625rem; font-weight: 700; text-transform: capitalize; }
.auth-next-name { font-size: 1rem; color: var(--auth-soft); }
.auth-next-name::first-letter { text-transform: uppercase; }
.auth-next-count { margin-left: auto; display: flex; flex-direction: column; align-items: center; padding: .875rem 1.25rem; border-radius: 18px; background: var(--auth-gold); color: var(--auth-deep); }
.auth-next-count strong { font-size: 2.5rem; line-height: 1; font-weight: 800; }
.auth-next-count span { font-size: .8125rem; font-weight: 700; }
.auth-month { padding: 1.25rem; border-radius: 20px; background: #24493F; border: 1px solid #33604F; }
.auth-month-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.auth-month-title { font-size: .9375rem; font-weight: 700; text-transform: capitalize; }
.auth-month-key { display: flex; align-items: center; gap: .375rem; font-size: .75rem; color: var(--auth-soft); }
.auth-key-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--auth-gold); }
.auth-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.auth-wd { padding-bottom: .25rem; font-size: .75rem; font-weight: 600; color: var(--auth-dim); text-transform: capitalize; }
.auth-d { height: 2.25rem; border-radius: 10px; display: grid; place-items: center; font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.auth-d.is-weekend { color: var(--auth-dim); }
.auth-d.is-today { box-shadow: inset 0 0 0 1.5px var(--auth-soft); }
.auth-d.is-holiday { background: var(--auth-gold); color: var(--auth-deep); font-weight: 800; }
.auth-soon { display: flex; flex-direction: column; gap: .625rem; }
.auth-soon-title { font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--auth-soft); }
.auth-soon ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .625rem; }
.auth-soon li { display: flex; flex-direction: column; gap: 2px; padding: .75rem .875rem; border: 1px solid #33604F; border-radius: 14px; }
.auth-soon li strong { font-size: 1.125rem; font-weight: 700; }
.auth-soon li span { font-size: .8125rem; color: var(--auth-soft); }
.auth-quote { margin-block: auto; max-width: 34rem; }
.auth-quote h2 { margin: 1rem 0; color: #fff; font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.auth-lead { margin: 0; color: var(--auth-soft); font-size: var(--t-md); line-height: 1.55; }
.auth-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .75rem; border-top: 1px solid #33604F; }
.auth-foot p { margin: 0; }
.auth-copy { font-size: .8125rem; color: var(--auth-dim); }

@media (max-width: 1199.98px) { .auth-soon ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
    .auth-body { display: flex; flex-direction: column; min-height: 100vh; }
    .auth-art { min-height: 0; padding: 1.25rem 1.25rem 1.5rem; gap: 1.1rem; border-radius: 0 0 28px 28px; justify-content: flex-start; }
    .auth-brand-chip { padding: 6px 9px; border-radius: 12px; }
    .auth-brand .logo-img, html[data-sidebar] .auth-brand .logo-img.is-wide { height: 2.75rem; }
    .auth-arcs { right: -12rem; top: -10rem; width: 24rem; height: 24rem; stroke-width: 22; }
    .auth-next { gap: 1rem; flex-wrap: nowrap; }
    .auth-next-day { font-size: 5.25rem; }
    .auth-next-month { font-size: 1.125rem; }
    .auth-next-name { font-size: .8125rem; }
    .auth-next-count { padding: .5rem .75rem; border-radius: 12px; }
    .auth-next-count strong { font-size: 1.375rem; }
    .auth-next-count span { font-size: .6875rem; }
    .auth-month, .auth-soon, .auth-foot, .auth-quote .auth-lead { display: none; }
    .auth-quote h2 { font-size: 1.5rem; margin: .5rem 0 0; }
    .auth-main { flex: 1; padding: 1rem 1rem 2rem; }
    .auth-main-top { margin-bottom: 1rem; }
    .auth-card { padding: 1.75rem 1.25rem; border-radius: 20px; }
    .auth-box h1 { font-size: 1.875rem; }
}
@media (max-width: 575.98px) { .auth-next-meta { min-width: 0; } }

