/* GC9 — the two Today homes (mk-today-bm, mk-today-hr), the HR alerts list (mk-hr-alerts) and the attendance registers and
   rosters as drawn (mk-att-day, mk-att-month, mk-gap-unconfirmed, mk-corrections, mk-swaps, mk-shift-tpl, mk-roster,
   mk-gap-roster-log). Colours from the shared tokens; no inline styles (CSP). */

/* ── tiles: the drawn row of four, a coloured top edge each ── */
.tdy-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lt-card.tone-ac { border-top-color: var(--ac, #0f766e); }
.lt-card.tone-pu { border-top-color: var(--pu, #7c3aed); }
.lt-card.tone-bl { border-top-color: #0369a1; }
.lt-card.tone-gn { border-top-color: var(--gn, #15803d); }
.lt-cards.g9-fixed .lt-card.tone-gn { border-top-color: var(--gn, #15803d); }
.lt-cards.g9-fixed .lt-card.tone-am { border-top-color: var(--am, #d97706); }
.lt-cards.g9-fixed .lt-card.tone-rd { border-top-color: var(--rd, #dc2626); }
.lt-cards.g9-fixed .lt-card.tone-ac { border-top-color: var(--ac, #0f766e); }
.lt-cards.g9-fixed .lt-card.tone-pu { border-top-color: var(--pu, #7c3aed); }
.lt-cards.g9-fixed .lt-card.tone-bl { border-top-color: #0369a1; }
.lt-cards.g9-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lt-cards.g9-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tdy-tiles.tdy-hr { display: grid; gap: 12px; margin: 4px 0 14px; }
.tdy-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg-card, #fff); border: 1px solid var(--bd, #e2e8f0); }
.tdy-card .tdy-t { font-size: 14px; font-weight: 700; color: var(--t, #0f172a); }
.tdy-card .tdy-v { font-size: 26px; line-height: 1.15; }
.tdy-card .tdy-s { font-size: 12px; color: var(--mu, #64748b); }
.tdy-card .tdy-btn { align-self: flex-start; margin-top: auto; min-height: 36px; }

/* ── panels: the photo sample and the team's requests side by side ── */
.tdy-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tdy-panel { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.tdy-h { font-size: 15px; font-weight: 700; margin: 0; }
.tdy-list { border: 1px solid var(--bd, #e2e8f0); border-radius: 10px; overflow: hidden; }
.tdy-photo-row, .tdy-req-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.tdy-photo-row + .tdy-photo-row, .tdy-req-row + .tdy-req-row { border-top: 1px solid var(--bd, #e2e8f0); }
.tdy-photos { display: flex; gap: 8px; flex: 0 0 auto; }
.tdy-photos img, .tdy-ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #94a3b8; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; }
.tdy-who { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.tdy-who b { font-size: 14px; }
.tdy-who .muted { font-size: 12px; }
.tdy-act { min-height: 36px; min-width: 76px; }
.tdy-also { margin-top: 14px; }
.tdy-also a { color: inherit; }
.tdy-also .tdy-clear { margin-inline-start: 10px; }
.tdy-now { margin-top: 14px; }
.tdy-now-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tdy-now-row .btn { min-height: 40px; }
@media (max-width: 900px) { .tdy-tiles, .lt-cards.g9-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tdy-panels { grid-template-columns: 1fr; } }
@media (max-width: 640px), (pointer: coarse) { .tdy-act, .tdy-now-row .btn { min-height: 44px; } }

/* ── filter chips (one per kind / branch / problem): pills, the chosen one tinted ── */
.g9-chips { gap: 8px; }
.g9-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: inherit; text-decoration: none;
  border: 1px solid var(--bd, #cbd5e1); background: var(--bg-card, #fff); }
.g9-chip:hover, .g9-chip:focus-visible { border-color: var(--ac, #0f766e); }
.g9-chip.on { border-color: var(--ac, #0f766e); color: var(--ac2, #0b5d57); background: color-mix(in srgb, var(--ac, #0f766e) 10%, transparent); font-weight: 600; }   /* T1: the chosen chip's words on its teal tint, 6:1 (the brand teal read 4.3:1) */
.g9-link { background: none; border: 0; padding: 0; min-height: 36px; color: var(--ac, #0f766e); font: inherit; cursor: pointer; }
.g9-link:hover, .g9-link:focus-visible { text-decoration: underline; }
.g9-hide-head th { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.g9-alerts td { vertical-align: middle; }
.g9-alerts .g9-kind { width: 1%; white-space: nowrap; }
.g9-line { font-size: 14px; }
@media (max-width: 640px), (pointer: coarse) { .g9-chip, .g9-link { min-height: 44px; } }

/* ── the registers: the note under a list, a fold, the day picker ── */
.g9-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 13px; border: 1px solid color-mix(in srgb, var(--ac, #0f766e) 30%, transparent);
  background: color-mix(in srgb, var(--ac, #0f766e) 6%, transparent); }
.g9-note.warn { border-color: color-mix(in srgb, var(--am, #d97706) 40%, transparent); background: color-mix(in srgb, var(--am, #d97706) 8%, transparent); }
.g9-fold { margin-top: 12px; }
.g9-fold > summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.g9-date input[type=date] { min-height: 36px; }
.g9-day td, .g9-day th { white-space: nowrap; }

/* ── the monthly register (mk-att-month): a letter a day; names stay put while the days scroll on a phone; one landscape page in print ── */
.g9-grid-scroll { overflow-x: auto; }
.g9-grid { border-collapse: separate; border-spacing: 0; width: 100%; }
.g9-grid th, .g9-grid td { padding: 6px 2px; text-align: center; font-size: 12px; border-bottom: 1px solid var(--bd, #e2e8f0); }
.g9-grid thead th { color: var(--mu, #64748b); font-weight: 600; }
.g9-grid .g9-grid-name { text-align: start; white-space: nowrap; padding-inline: 10px; font-size: 14px; font-weight: 600; position: sticky; inset-inline-start: 0;
  background: var(--bg-card, #fff); z-index: 1; }
.mg { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 1; }
.mg-p { background: #dcfce7; color: #15803d; }
.mg-l { background: #ffedd5; color: #c2410c; }
.mg-a { background: #fee2e2; color: #b91c1c; }
.mg-v { background: #ede9fe; color: #6d28d9; }
.mg-r { background: #e2e8f0; color: #475569; }
.mg-u { background: #dbeafe; color: #1d4ed8; }
/* FX2: a day worked during leave, on a holiday or on a rest day — its kind with the presence (WO+P): wider, with a ring */
.mg.mg-k { width: auto; min-width: 22px; padding: 0 3px; font-size: 10px; letter-spacing: -.2px; box-shadow: inset 0 0 0 1px currentColor; white-space: nowrap; }
.g9-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--mu, #64748b); margin: 10px 0 0; }
.g9-legend > span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .g9-grid th, .g9-grid td { padding: 6px 1px; } .mg { width: 20px; } }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .sb, .topbar, .lt-head, .lt-bar, .pager, [data-help-tip] { display: none !important; }
  .g9-grid-scroll { overflow: visible; }
  .g9-grid th, .g9-grid td { padding: 3px 1px; font-size: 10px; }
  .g9-grid .g9-grid-name { position: static; font-size: 10px; }
  .mg { width: 16px; height: 15px; font-size: 9px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── the roster (mk-roster): a short letter a shift, rest and leave as chips; the bar of three buttons ── */
.g9-roster td, .g9-roster th { text-align: center; white-space: nowrap; }
.g9-roster td:first-child, .g9-roster th:first-child, .g9-roster td:nth-child(2), .g9-roster th:nth-child(2) { text-align: start; }
.g9-letter { font-weight: 600; }
.g9-cell-pick { min-width: 72px; min-height: 32px; }
.g9-week-bar { margin-top: 10px; }
.g9-week-nav { display: inline-flex; gap: 12px; align-items: center; font-size: 13px; }
.g9-name { font-weight: 600; }
.g9-approve { min-width: 76px; }
.g9-more { display: inline-block; vertical-align: middle; }
.g9-more > summary { min-width: 36px; justify-content: center; }
.g9-pop .lt-pop { min-width: 280px; }
.g9-pop-form { display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.g9-link-a { color: var(--ac, #0f766e); }
.g9-note > span + span::before { content: ""; }
.g9-branch-pick { width: auto; min-width: 120px; max-width: 200px; min-height: 36px; }
[data-cor-list] td { white-space: normal; }
[data-cor-list] td:nth-child(6) { min-width: 140px; }
[data-cor-list] td.nowrap, [data-cor-list] td.num { white-space: nowrap; }
/* FX1: the list fits 1366 px — what the request asks stacks under its type chip, the reason and the status wrap, the headers too */
[data-cor-list] td.cor-ask { white-space: normal; }
[data-cor-list] td.cor-ask .rq-kind { flex-direction: column; align-items: flex-start; gap: 4px; }
[data-cor-list] td:nth-child(6) { min-width: 110px; }
[data-cor-list] th { white-space: normal; }
[data-cor-list] td[data-cor-status] { min-width: 110px; max-width: 135px; }
[data-cor-list] td[data-cor-status] .chip { white-space: normal; max-width: 100%; }
[data-cor-list] td.cor-ask { max-width: 170px; }
[data-cor-list] td.cor-ask .tc, [data-cor-list] td.cor-ask .tc-t { white-space: normal; max-width: 100%; }
.g9-week-nav select, select.g9-branch-pick { width: auto !important; min-width: 120px; max-width: 200px; }
/* mk-hr-alerts draws no header row: it stays for screen readers and the export, folded to nothing on screen */
#page-body .g9-alerts thead th { font-size: 0 !important; line-height: 0 !important; padding: 0 !important; border: 0 !important; height: 0; }
#page-body .g9-alerts thead th * { display: none !important; }
