/* Staff register and ID cards (app/Modules/Staff). Screen parts use the Liquid Glass tokens;
   the card itself is paper, so it uses fixed print colours: deep green #14513F, green #1F7A4D,
   gold #C99A2E, ink #14231D. Card sizes are real millimetres (CR80: 85.6 × 54 mm). */

/* ---------- Colours for departments (bar segments and legend swatches) ---------- */
.stf-c0 { fill: #2E7A4C; background: #2E7A4C; }
.stf-c1 { fill: #C99A2E; background: #C99A2E; }
.stf-c2 { fill: #3F6FB5; background: #3F6FB5; }
.stf-c3 { fill: #B8573A; background: #B8573A; }
.stf-c4 { fill: #7A5BB0; background: #7A5BB0; }
.stf-c5 { fill: #2B8C8C; background: #2B8C8C; }
.stf-c6 { fill: #8FB34A; background: #8FB34A; }
.stf-c7 { fill: #B04A7A; background: #B04A7A; }
.stf-c8 { fill: #6B7A3A; background: #6B7A3A; }
.stf-c9 { fill: #5A6670; background: #5A6670; }

/* ---------- Register: the picture at the top ---------- */
.stf-glance { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr); gap: 16px; }
.stf-headcount { grid-column: 1 / -1; }
@media (min-width: 1180px) {
  .stf-glance { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, .8fr); }
  .stf-headcount { grid-column: 1 / -1; }
}
.stf-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stf-total-value { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.stf-total-sub { color: var(--muted); font-weight: 600; }
.stf-stack { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: var(--sunk-2); }
.stf-stack-svg { display: block; width: 100%; height: 36px; }
.stf-stack-svg rect { stroke: var(--glass-strong); stroke-width: 2; vector-effect: non-scaling-stroke; }
.stf-legend, .stf-active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stf-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--sunk); color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.stf-chip:hover { color: var(--ink); background: var(--sunk-2); }
.stf-chip b { font-weight: 700; }
.stf-chip.is-on { background: var(--mint); color: var(--mint-ink); box-shadow: none; }
.stf-sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.stf-x { width: 14px; height: 14px; }

.stf-shift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stf-shift { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius); background: var(--sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.stf-shift::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--stf-shift, #2E7A4C); }
.stf-shift:hover { color: var(--ink); background: var(--sunk-2); }
.stf-shift.is-on { box-shadow: inset 0 0 0 2px var(--stf-shift, var(--accent)); }
.stf-shift-a { --stf-shift: #E0A526; }
.stf-shift-b { --stf-shift: #3F6FB5; }
.stf-shift-c { --stf-shift: #4B3F8F; }
.stf-shift-general { --stf-shift: #2E7A4C; }
.stf-shift-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.stf-shift-name { font-weight: 600; font-size: 14px; }
.stf-shift-time { font-size: 12px; color: var(--muted); }
.stf-shift-count { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.stf-dots { width: 100%; max-width: 132px; height: auto; display: block; }
.stf-dots circle { fill: var(--stf-shift, #2E7A4C); opacity: .85; }
.stf-dots-more { font-size: 12px; color: var(--muted); }

.stf-type-list { display: flex; flex-direction: column; gap: 6px; }
.stf-type-row { display: grid; grid-template-columns: minmax(84px, 7.5em) 1fr 2.5em; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; color: var(--ink); font-size: 14px; }
.stf-type-row:hover { color: var(--ink); background: var(--sunk); }
.stf-type-row.is-on { background: var(--mint); color: var(--mint-ink); }
.stf-type-row b { text-align: right; }
.stf-bar { display: block; width: 100%; height: 10px; }
.stf-bar-lg { height: 12px; }
.stf-bar-track { fill: var(--sunk-2); }
.stf-bar-fill { fill: #3E8F5E; }
.stf-type-temporary { fill: #C99A2E; }
.stf-type-contract { fill: #3F6FB5; }
.stf-type-daily { fill: #B8573A; }
.stf-type-seasonal { fill: #7A5BB0; }

.stf-photos { color: var(--ink); align-items: flex-start; }
.stf-photos:hover { color: var(--ink); box-shadow: var(--shadow-hover), var(--hairline); }
.stf-photos.is-on { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.stf-ring-wrap { position: relative; width: 112px; height: 112px; align-self: center; }
.stf-ring { width: 112px; height: 112px; display: block; transform: rotate(0deg); }
.stf-ring-track { stroke: var(--sunk-2); }
.stf-ring-fill { stroke: #3E8F5E; }
.stf-ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.stf-photos-sub { align-self: center; }

/* ---------- Register: search, status and the list ---------- */
.stf-filter { gap: 12px; }
.stf-filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stf-scan { position: relative; flex: 1 1 320px; display: block; }
.stf-scan > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.stf-scan input { padding-left: 46px; font-size: 17px; }
.stf-seg-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.stf-seg-link:hover { color: var(--ink); }
.stf-status { margin-left: auto; }
.stf-list { display: flex; flex-direction: column; gap: 10px; }
.stf-listbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stf-bulk { display: flex; align-items: center; gap: 10px; }
.stf-col-check { width: 44px; padding-right: 0 !important; }
.stf-check { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; cursor: pointer; }
.stf-check input { width: 19px; height: 19px; accent-color: var(--accent); }
.stf-person { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.stf-person:hover { color: var(--accent); }
.stf-person-name { font-weight: 600; }
.stf-avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #FFFFFF; background: #3E8F5E; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.stf-avatar-0 { background: linear-gradient(150deg, #3E8F5E, #1F5E3B); }
.stf-avatar-1 { background: linear-gradient(150deg, #D6A73E, #A57A1A); }
.stf-avatar-2 { background: linear-gradient(150deg, #5584C8, #2E5C9E); }
.stf-avatar-3 { background: linear-gradient(150deg, #C9704F, #94442A); }
.stf-avatar-4 { background: linear-gradient(150deg, #8D6FC2, #5F4795); }
.stf-avatar-5 { background: linear-gradient(150deg, #3BA0A0, #1F6F6F); }
.stf-code { font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.stf-row-left td { opacity: .62; }
.stf-shift-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--sunk-2); color: var(--ink-2); }
.stf-shift-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--stf-shift, #2E7A4C); }
.stf-shift-pill-a { --stf-shift: #E0A526; }
.stf-shift-pill-b { --stf-shift: #3F6FB5; }
.stf-shift-pill-c { --stf-shift: #4B3F8F; }
.stf-shift-pill-general { --stf-shift: #2E7A4C; }
.stf-code-tag { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-ink); font-weight: 600; letter-spacing: .03em; }

/* ---------- Form ---------- */
.stf-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.stf-fieldset legend { padding: 0; margin-bottom: 8px; }
.stf-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.stf-choice { position: relative; display: inline-flex; cursor: pointer; }
.stf-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stf-choice > span { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 16px; border-radius: 14px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 600; font-size: 15px; transition: background .15s, box-shadow .15s; }
.stf-choice > span small { font-weight: 500; font-size: 12px; color: var(--muted); }
.stf-choice input:checked + span { background: var(--mint); color: var(--mint-ink); box-shadow: inset 0 0 0 2px #3E8F5E; }
.stf-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.stf-choice-blood > span { min-width: 54px; align-items: center; font-family: var(--mono); }
.stf-choice-blood input:checked + span { background: #F7D9D6; color: #8C1D16; box-shadow: inset 0 0 0 2px #B3261E; }
.stf-choice-tile > span { min-width: 120px; border-left: 4px solid var(--stf-shift, #2E7A4C); }
.stf-private { box-shadow: var(--shadow), var(--hairline), inset 0 0 0 1px var(--warn-bg); }
.stf-private h2 { display: inline-flex; align-items: center; gap: 8px; }
.stf-private h2 .icon { color: var(--warn); }

/* ---------- Profile ---------- */
.stf-head-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.stf-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.stf-hero-photo img, .stf-hero-initials { width: 132px; height: 158px; border-radius: 20px; object-fit: cover; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line); }
.stf-hero-initials { font-size: 44px; font-weight: 700; color: #FFFFFF; }
.stf-hero-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stf-hero-alt { font-size: 18px; color: var(--muted); font-weight: 500; }
.stf-hero-role { font-size: 18px; }
.stf-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stf-blood { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px 3px 8px; border-radius: 999px; background: #F7D9D6; color: #8C1D16; font-weight: 700; font-family: var(--mono); font-size: 14px; }
.stf-blood-drop { width: 16px; height: 16px; fill: #B3261E; stroke: #B3261E; }
.stf-tenure { display: flex; flex-direction: column; gap: 2px; max-width: 620px; }
.stf-tenure-text { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.stf-tenure-svg { width: 100%; height: auto; display: block; }
.stf-tenure-track { fill: var(--sunk-2); }
.stf-tenure-fill { fill: #3E8F5E; }
.stf-tenure-fill.is-left { fill: #B8573A; }
.stf-tenure-tick { stroke: var(--line-strong); stroke-width: 1.5; }
.stf-tenure-label { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.stf-hero-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 16px; background: #FFFFFF; color: #1D1D1F; box-shadow: inset 0 0 0 1px var(--line); }
.stf-hero-qr canvas { width: 104px; height: 104px; image-rendering: pixelated; }
@media (max-width: 760px) {
  .stf-hero { grid-template-columns: 1fr; justify-items: start; }
  .stf-hero-qr { justify-self: start; }
}
.stf-tabs { align-self: flex-start; flex-wrap: wrap; }
.stf-tab-count { display: inline-flex; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sunk-2); font-size: 12px; align-items: center; justify-content: center; }
.stf-sub { display: flex; align-items: center; gap: 6px; font-size: 15px; margin-top: 6px; color: var(--warn); }
.stf-sub-icon { width: 16px; height: 16px; vertical-align: -3px; }
.stf-complete-value { font-size: 26px; font-weight: 700; }
.stf-complete-fill { fill: #3E8F5E; }
.stf-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stf-checklist li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.stf-checklist .icon { width: 16px; height: 16px; }
.stf-checklist .is-done { background: var(--ok-bg); color: var(--ok); }
.stf-checklist .is-missing { background: var(--sunk-2); color: var(--muted); }
.stf-photo-pick { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.stf-photo-preview { width: 96px; height: 116px; border-radius: 14px; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: var(--sunk-2); color: var(--muted); }
.stf-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.stf-photo-preview .icon { width: 40px; height: 40px; opacity: .5; }
.stf-photo-pick .field { flex: 1 1 240px; }
.stf-copies { font-size: 24px; font-weight: 700; }

/* Timeline of changes */
.stf-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; display: flex; flex-direction: column; }
.stf-event { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 18px; }
.stf-event::before { content: ''; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line-strong); }
.stf-event:last-child::before { display: none; }
.stf-event-dot { width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; background: var(--stf-ev, #3F6FB5); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stf-ev, #3F6FB5) 20%, transparent); }
.stf-event-created { --stf-ev: #2E7A4C; }
.stf-event-revision { --stf-ev: #3F6FB5; }
.stf-event-left { --stf-ev: #B3261E; }
.stf-event-rejoined { --stf-ev: #2E7A4C; }
.stf-event-photo { --stf-ev: #C99A2E; }
.stf-event-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stf-event-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.stf-event-date { font-size: 14px; color: var(--muted); font-weight: 600; }
.stf-event-reason { font-style: italic; color: var(--ink-2); }
.stf-changes { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--sunk); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.stf-changes li { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.stf-change-label { font-weight: 600; min-width: 9em; color: var(--ink-2); }
.stf-change-before { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.stf-change-arrow { color: var(--muted); }
.stf-change-after { color: var(--ok); font-weight: 600; }

/* Print guide */
.stf-guide-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stf-guide-list li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.stf-guide-list .icon { color: var(--accent); width: 20px; height: 20px; }

/* ---------- Public card check ---------- */
.stf-verify { gap: 14px; }
.stf-verify-state { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; font-size: 18px; }
.stf-verify-state .icon { width: 28px; height: 28px; flex: none; }
.stf-verify-state.is-ok { background: var(--ok-bg); color: var(--ok); }
.stf-verify-state.is-bad { background: var(--bad-bg); color: var(--bad); }
.stf-verify-person { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.stf-verify-photo { width: 120px; height: 144px; border-radius: 16px; object-fit: cover; flex: none; display: flex; align-items: center; justify-content: center; background: var(--sunk-2); color: var(--muted); }
.stf-verify-photo .icon { width: 48px; height: 48px; }
.stf-verify-person > div { flex: 1 1 160px; min-width: 0; }
.stf-verify-name { font-size: 26px; overflow-wrap: anywhere; }
.stf-verify .stf-code-tag { margin-top: 6px; }

/* ---------- The card (paper) ---------- */
.idc-sheet { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: flex-start; padding: 28px; border-radius: var(--radius-lg); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.idc-face { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.idc-face figcaption { font-weight: 600; font-size: 14px; color: var(--muted); }
.idc-frame { --s: 1.45; position: relative; width: calc(var(--w) * var(--s)); height: calc(var(--h) * var(--s)); }
.idc-frame-portrait { --w: 54mm; --h: 85.6mm; }
.idc-frame-landscape { --w: 85.6mm; --h: 54mm; --s: 1.3; }
.idc-sheet-preview .idc-frame { --s: 1.2; }
.idc-sheet-preview .idc-frame-landscape { --s: 1.1; }
.idc-frame > .idc { transform: scale(var(--s)); transform-origin: top left; }

.idc { --g: #14513F; --g2: #1F7A4D; --gold: #C99A2E; --ink: #14231D; --mute: #5A6B63; --hair: #D9E3DD;
  position: relative; overflow: hidden; isolation: isolate; box-sizing: border-box; background: #FFFFFF; color: var(--ink);
  border: .2mm solid #C9D4CE; border-radius: 3.18mm; line-height: 1.2;
  font-family: 'Kalpurush', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  box-shadow: 0 10px 28px rgba(10, 40, 30, .18), 0 2px 6px rgba(10, 40, 30, .08);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html[lang=en] .idc { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, 'Kalpurush', sans-serif; }
.idc * { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.idc p, .idc dl, .idc dd { margin: 0; }
.idc-portrait { width: 54mm; height: 85.6mm; }
.idc-landscape { width: 85.6mm; height: 54mm; }
.idc [data-fit] { display: block; overflow: hidden; overflow-wrap: anywhere; }
.idc .idc-overflow { outline: .5mm solid #D32F2F; outline-offset: -.5mm; background: rgba(211, 47, 47, .12); }
.idc-mono, .idc-code, .idc-strip-code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }

/* Faint paddy sheaf in the background of both faces */
.idc::after { content: ''; position: absolute; z-index: -1; right: -6mm; bottom: 8mm; width: 30mm; height: 38mm; opacity: .07; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314513F' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M12 23V9'/%3E%3Cpath d='M12 9c0-3 1.5-5 4-6-.3 3-1.6 5-4 6z'/%3E%3Cpath d='M12 13c0-2.6-1.4-4.4-4-5.2.2 2.7 1.6 4.4 4 5.2z'/%3E%3Cpath d='M12 16c0-2.4 1.3-4 3.8-4.8-.2 2.5-1.5 4-3.8 4.8z'/%3E%3Cpath d='M12 19c0-2.2-1.2-3.6-3.5-4.3.2 2.2 1.4 3.6 3.5 4.3z'/%3E%3C/svg%3E"); }

/* Front: green band with logo, mill name and card title */
.idc-band { display: flex; align-items: flex-start; gap: 2mm; padding: 2.6mm 3mm 0; color: #FFFFFF;
  background: linear-gradient(120deg, var(--g) 0%, var(--g) 50%, var(--g2) 100%); border-bottom: .8mm solid var(--gold); }
.idc-portrait .idc-band { height: 17mm; }
.idc-landscape .idc-band { height: 12.5mm; padding-top: 2mm; }
.idc-logo { width: 9mm; height: 9mm; flex: none; border-radius: 1.8mm; background: #FFFFFF; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: .6mm; }
.idc-landscape .idc-logo { width: 8mm; height: 8mm; }
.idc-logo img { width: 100%; height: 100%; object-fit: contain; }
.idc-logo-icon { width: 6.5mm; height: 6.5mm; color: var(--g); }
.idc-brand { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5mm; }
.idc-mill { font-size: 7.4pt; line-height: 1.15; font-weight: 700; height: 6.6mm; color: #FFFFFF; }
.idc-landscape .idc-mill { height: 5.2mm; font-size: 7.6pt; }
.idc-title { font-size: 5.6pt; line-height: 1.2; height: 2.6mm; color: #F2D27A; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
html[lang=bn] .idc-title { letter-spacing: 0; font-size: 6pt; height: 2.9mm; }

.idc-body { display: flex; }
.idc-portrait .idc-body { flex-direction: column; align-items: center; gap: 1.6mm; margin-top: -4.6mm; padding: 0 3mm; }
.idc-landscape .idc-body { flex-direction: row; align-items: flex-start; gap: 3mm; padding: 2.2mm 3mm 0; }
.idc-photo { flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #E8F0EA; border: .7mm solid #FFFFFF; border-radius: 1.8mm; box-shadow: 0 0 0 .25mm var(--gold), 0 1mm 2mm rgba(10, 40, 30, .2); }
.idc-portrait .idc-photo { width: 24mm; height: 29mm; }
.idc-landscape .idc-photo { width: 20mm; height: 24.5mm; }
.idc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.idc-initials { font-size: 16pt; font-weight: 700; color: var(--g2); }
.idc-person { min-width: 0; width: 100%; display: flex; flex-direction: column; gap: .4mm; }
.idc-portrait .idc-person { text-align: center; }
.idc-name { font-size: 11pt; line-height: 1.15; height: 5.6mm; font-weight: 800; color: var(--g); white-space: nowrap; }
.idc-landscape .idc-name { font-size: 10pt; height: 5mm; }
.idc-name-2 { font-size: 7pt; line-height: 1.2; height: 3.4mm; color: var(--ink); font-weight: 600; white-space: nowrap; }
.idc-desig { font-size: 7.4pt; line-height: 1.2; height: 3.6mm; font-weight: 700; color: var(--ink); white-space: nowrap; margin-top: .6mm; }
.idc-dept { font-size: 6.4pt; line-height: 1.2; height: 3.1mm; color: var(--mute); white-space: nowrap; }

.idc-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 2mm; padding: 1mm 3mm 0;
  background: linear-gradient(#F4F8F5, #E8F0EA); border-top: .25mm solid var(--hair); border-bottom: 1.2mm solid var(--g); }
.idc-portrait .idc-foot { height: 11.5mm; }
.idc-landscape .idc-foot { height: 9.5mm; }
.idc-code-box { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.idc-code-label { font-size: 5.2pt; color: var(--mute); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
html[lang=bn] .idc-code-label { letter-spacing: 0; text-transform: none; font-size: 5.8pt; }
.idc-code { font-size: 10.5pt; line-height: 1.1; height: 4.8mm; font-weight: 800; color: var(--g); letter-spacing: .03em; white-space: nowrap; }
.idc-short { flex: none; font: 700 6pt/1 -apple-system, 'Segoe UI', Arial, sans-serif; color: #FFFFFF; background: var(--g2); padding: 1.2mm 1.6mm; border-radius: 1mm; letter-spacing: .04em; }

/* LEFT stamp */
.idc-stamp { position: absolute; z-index: 3; right: 3mm; top: 21mm; padding: .8mm 2.4mm; border: .5mm solid #A52828; border-radius: 1mm; background: rgba(255, 255, 255, .9); color: #A52828; font-size: 10pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-14deg); }
.idc-landscape .idc-stamp { top: 15mm; right: 6mm; }
.idc-landscape.idc-back .idc-stamp { right: auto; left: 26mm; top: 26mm; }
.idc-portrait.idc-back .idc-stamp { top: 12mm; }

/* Back */
.idc-strip { display: flex; align-items: center; justify-content: space-between; gap: 2mm; padding: 0 3mm; color: #FFFFFF; background: linear-gradient(120deg, var(--g), var(--g2)); border-bottom: .6mm solid var(--gold); }
.idc-portrait .idc-strip { height: 8.5mm; }
.idc-landscape .idc-strip { height: 7mm; }
.idc-strip-mill { flex: 1; min-width: 0; font-size: 6.2pt; font-weight: 700; height: 3.2mm; line-height: 1.2; white-space: nowrap; }
.idc-strip-code { flex: none; font-size: 7pt; font-weight: 700; letter-spacing: .03em; }
.idc-back-body { display: grid; gap: 1.6mm; padding: 2mm 3mm 2.4mm; }
.idc-portrait .idc-back-body { grid-template-columns: 1fr; grid-template-areas: 'facts' 'qr' 'return' 'address' 'sign'; justify-items: stretch; height: calc(85.6mm - 8.5mm); align-content: space-between; }
.idc-landscape .idc-back-body { grid-template-columns: 1fr 21mm; grid-template-areas: 'facts qr' 'return qr' 'address address' 'sign sign'; height: calc(54mm - 7mm); align-content: space-between; column-gap: 2.5mm; }
.idc-facts { grid-area: facts; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2mm 2mm; }
.idc-fact { min-width: 0; padding: .8mm 1.4mm; border-radius: 1mm; background: #F1F6F2; }
.idc-fact dt { font-size: 4.8pt; color: var(--mute); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
html[lang=bn] .idc-fact dt { text-transform: none; letter-spacing: 0; font-size: 5.4pt; }
.idc-fact dd { font-size: 7pt; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.idc-fact-blood { background: #FBE3E1; }
.idc-fact-blood dd { color: #A52828; font-size: 9pt; line-height: 1.1; }
.idc-qr { grid-area: qr; display: flex; flex-direction: column; align-items: center; gap: .4mm; }
.idc-qr canvas { width: 20mm; height: 20mm; image-rendering: pixelated; }
.idc-landscape .idc-qr canvas { width: 19mm; height: 19mm; }
.idc-qr span { font-size: 4.8pt; color: var(--mute); font-weight: 700; }
.idc-return { grid-area: return; font-size: 5.6pt; line-height: 1.25; height: 5mm; color: var(--ink); font-style: italic; }
.idc-address { grid-area: address; font-size: 5.2pt; line-height: 1.25; height: 4.6mm; color: var(--mute); }
.idc-landscape .idc-return { height: 4.6mm; }
.idc-landscape .idc-address { height: 3.4mm; }
.idc-sign { grid-area: sign; display: flex; align-items: flex-end; justify-content: space-between; gap: 2mm; }
.idc-copy { font-size: 4.8pt; color: var(--mute); white-space: nowrap; }
.idc-sign-line { width: 24mm; padding-top: 4.5mm; border-bottom: 0; font-size: 5.2pt; line-height: 1.2; height: 7.2mm; text-align: center; color: var(--mute); background: linear-gradient(var(--ink), var(--ink)) no-repeat center 4mm / 100% .2mm; }
.idc-landscape .idc-sign-line { height: 6.4mm; padding-top: 3.8mm; background-position: center 3.4mm; }

/* ---------- Bulk sheets (A4) ---------- */
.stf-sheets { display: flex; flex-direction: column; align-items: center; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.stf-sheet-caption { align-self: center; font-weight: 600; color: var(--muted); font-size: 14px; margin-top: 10px; }
.stf-a4 { width: 210mm; height: 297mm; flex: none; display: grid; justify-content: center; align-content: center; background: #FFFFFF; box-shadow: var(--shadow); border-radius: 4px; }
.stf-a4-landscape { grid-template-columns: repeat(2, 85.6mm); grid-auto-rows: 54mm; gap: 2mm 4mm; }
.stf-a4-portrait { grid-template-columns: repeat(3, 54mm); grid-auto-rows: 85.6mm; gap: 4mm 4mm; }
.stf-slot { position: relative; }
.stf-a4 .idc { box-shadow: none; }

/* ---------- Printing (only pages that carry .staff-print) ---------- */
@page staffcard { size: A4 portrait; margin: 12mm; }
@page staffsheet { size: A4 portrait; margin: 0; }
@media print {
  body:has(.staff-print) .demo-banner,
  body:has(.staff-print) .content > .notice { display: none !important; }
  body:has(.staff-print) { background: #FFFFFF !important; }
  body:has(.staff-print) .app-main, body:has(.staff-print) .content { margin: 0 !important; padding: 0 !important; gap: 0 !important; }
  .idc-sheet-single { page: staffcard; display: flex; justify-content: flex-start; gap: 8mm; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .idc-sheet-single .idc-face { gap: 0; }
  .idc-sheet-single .idc-frame { --s: 1; }
  .idc-sheet-single .idc { box-shadow: none; }
  .stf-sheets { display: block; padding: 0; overflow: visible; }
  .stf-a4 { page: staffsheet; box-shadow: none; border-radius: 0; break-after: page; break-inside: avoid; }
  .stf-a4:last-child { break-after: auto; }
  .idc .idc-overflow { outline: none; background: none; }
  /* A blurred shadow is printed (and saved to PDF) as a solid grey block behind the photo: keep only the gold ring. */
  .idc .idc-photo { box-shadow: 0 0 0 .25mm var(--gold); }
}

/* .notice and .field-error set display, which would beat the hidden attribute */
[data-card-warning][hidden], [data-staff-photo-error][hidden] { display: none !important; }

/* Early "photo too big" warning from staff.js (kept apart from the core's .field-error lines) */
.stf-photo-error { font-size: 14px; color: var(--bad); font-weight: 600; }
.stf-photo-error::before { content: "⚠ "; }

/* ---------- Visual first (owner, 15 Nov 2026): headcount tiles, shift day, time at the mill ---------- */
.stf-kpis { margin-bottom: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stf-kpis .kpi { min-height: 0; padding: 16px; }
.stf-shiftday { margin-bottom: 16px; }
.stf-trends { margin-top: 16px; }
.stf-profile-visuals { margin: 16px 0; }
.stf-hero-barcode { display: block; width: 132px; height: auto; }

/* Code 128 on the card front, in the footer beside the staff ID (quiet zones are inside the SVG). */
.idc-barcode { flex: none; display: block; height: 8mm; width: 27mm; background: #FFFFFF; border-radius: .6mm; }
.idc-landscape .idc-barcode { height: 7mm; width: 34mm; }
@media (max-width: 560px) {
  .stf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stf-kpis .kpi { min-height: 0; padding: 14px; }
}
.stf-months { margin: 0; }
.stf-month-grid { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.stf-month { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: var(--sunk); }
.stf-month.is-quiet { opacity: .55; }
.stf-month-dots { width: 30px; height: 46px; }
.stf-dot-in { fill: var(--ok); }
.stf-dot-out { fill: var(--bad); }
.stf-month-nums { display: flex; flex-direction: column; align-items: center; min-height: 2.4em; font-size: 12px; line-height: 1.2; }
.stf-in { color: var(--ok); }
.stf-out { color: var(--bad); }
.stf-month-name { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* Phone: one picture per row, so the employment bars and their counts are not squeezed out. */
@media (max-width: 640px) {
  .stf-glance { grid-template-columns: minmax(0, 1fr); }
  .stf-shift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) { .stf-month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media print { .stf-month { background: #FFFFFF; box-shadow: inset 0 0 0 1px #CCCCCC; } }
