/* gc12.css — GC12: the other clearly different screens as their mock-ups draw them (devices, location ranges, punch review,
   present-now board, month close, Smart ERP set-up and journal, insurance sheet, employee log, promotion, phone app,
   sign-in, KPI dictionary, the window / toast patterns in real use and the twelve rule-drawn lists). Tokens from hrms.css. */

/* ── a window's footer: Cancel and the main action at the start, the record's other actions on the far side ── */
.md-ft .md-ft-sp { flex: 1 1 auto; }
.md-ft .md-ft-end { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.btn.err-t { color: var(--rd, #b91c1c); border-color: rgba(185, 28, 28, .35); }
.btn.err-t:hover { background: rgba(185, 28, 28, .06); }

/* ── the drawn "Open" link at a row's end ── */
a.lt-open { font-weight: 600; text-decoration: none; color: var(--ac, #0f766e); white-space: nowrap; }
a.lt-open:hover { text-decoration: underline; }

/* ── tiles with a coloured top edge (zk-devices, board, punch-review, insurance, month-open) ── */
.gc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 4px 0 14px; }
.gc-tile { background: var(--s1, #fff); border: 1px solid var(--bo, #e5e7eb); border-top: 3px solid var(--ac, #0f766e); border-radius: 12px; padding: 12px 14px 10px; min-height: 86px; }
.gc-tile .k { color: var(--tm, #5b6b6b); font-size: 13px; }
.gc-tile .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.gc-tile .s { color: var(--tm, #5b6b6b); font-size: 12px; margin-top: 2px; }
.gc-tile.t-blue { border-top-color: #155e75; } .gc-tile.t-teal { border-top-color: #0f766e; } .gc-tile.t-green { border-top-color: #15803d; }
.gc-tile.t-orange { border-top-color: #c2410c; } .gc-tile.t-purple { border-top-color: #7e22ce; } .gc-tile.t-red { border-top-color: #b91c1c; }
.gc-tile a.v { color: inherit; text-decoration: none; display: block; }

/* ── a soft note line under a list (the drawn green/teal notes) ── */
.gc-note { background: rgba(13, 148, 136, .07); border: 1px solid rgba(13, 148, 136, .25); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-top: 12px; }
.gc-note.warn { background: rgba(194, 65, 12, .06); border-color: rgba(194, 65, 12, .3); }
.gc-note.err { background: rgba(185, 28, 28, .06); border-color: rgba(185, 28, 28, .3); color: #991b1b; }
.gc-note.ok { background: rgba(21, 128, 61, .07); border-color: rgba(21, 128, 61, .3); color: #166534; }

/* ── approvals: the row's decisions live in its window and under the list; on a phone the card keeps its own buttons ── */
.ap-phone .ap-acts { display: none; }
.ap-phone th.ap-sel, .ap-phone td.ap-sel { width: 34px; }
.ap-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.ap-dl dt { color: var(--tm, #5b6b6b); }
.ap-dl dd { margin: 0; }
@media (max-width: 640px) {
    .app-shell .ap-phone .ap-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
    .app-shell .ap-phone .ap-open, .app-shell .ap-phone .ap-sel { display: none; }
}

/* ── the employee app's directory (auto-me-directory) and change-my-data (auto-me-changerequests) ── */
.dir-card { padding: 10px; }
.dir-table th, .dir-table td { white-space: nowrap; }
.dir-table td.dir-name { white-space: normal; min-width: 90px; }
.dir-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.dir-actions input[type=search] { flex: 1 1 180px; min-height: 44px; }
.dir-actions .btn { min-height: 44px; }

/* ── a record's read-only fields in two columns (the disciplinary case, the promotion's "current") ── */
.disc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 18px; }
.ro { background: var(--s2, #f4f7f6); border: 1px solid var(--bo, #e5e7eb); border-radius: 10px; padding: 9px 12px; min-height: 40px; font-size: 14px; }
.data-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; }

/* ── devices (zk-devices): the type chips, the heartbeat lines ── */
.dev-kind.dev-zkteco { background: #e0f2fe; color: #075985; }
.dev-kind.dev-qrdisplay, .dev-kind.dev-wallscreen { background: #ccfbf1; color: #115e59; }
.dev-kind.dev-kiosk { background: #f3e8ff; color: #6b21a8; }
.dev-log { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 220px; overflow: auto; }
.dev-log li { padding: 4px 0; border-bottom: 1px dashed var(--bo, #e5e7eb); }
.dev-log li.bad { color: var(--rd, #b91c1c); }

/* ── punch review (punch-review): one compact line per punch ── */
.pr-list { padding: 4px 14px; }
.pr-line { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--bo, #e5e7eb); }
.pr-line:last-child { border-bottom: 0; }
.pr-line.pr-done { opacity: .7; }
.pr-pics { display: flex; gap: 8px; }
.pr-pics img, .pr-ini { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; }
.pr-ini { display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; background: #7c9a96; }
.pr-ini.live { background: #5f807b; }
.pr-ini.none { background: repeating-linear-gradient(45deg, #9fb3b0, #9fb3b0 6px, #8aa3a0 6px, #8aa3a0 12px); }
.pr-flags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.pr-act { display: flex; gap: 8px; }
@media (max-width: 760px) { .pr-line { grid-template-columns: auto 1fr; } .pr-flags, .pr-act { grid-column: 1 / -1; justify-content: flex-start; } }

/* ── the present-now board (board): two bar panels side by side ── */
.bd-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .bd-panels { grid-template-columns: 1fr; } }
.bd-bars { list-style: none; margin: 0; padding: 0; }
.bd-bars li { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.bd-bar { height: 9px; border-radius: 6px; background: var(--s3, #e9eeed); overflow: hidden; }
.bd-bar > i { display: block; height: 100%; border-radius: 6px; background: #15803d; }
.bd-bar.t-orange > i { background: #c2410c; } .bd-bar.t-teal > i { background: #0f766e; } .bd-bar.t-purple > i { background: #7e22ce; } .bd-bar.t-red > i { background: #b91c1c; }
.bd-bars .n { text-align: end; font-variant-numeric: tabular-nums; color: var(--tm, #5b6b6b); }

/* ── set up a screen from the phone (screen-pair-phone): "or" and the two full-width ways ── */
.setup-or { text-align: center; color: var(--tm, #5b6b6b); margin: 10px 0; }
.btn.wide { display: flex; width: 100%; justify-content: center; min-height: 44px; margin-top: 10px; font-weight: 600; }

/* ── close the month (month-open): the step beside the Progress panel; step 2's list of what blocks the month ── */
.mc-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
@media (max-width: 900px) { .mc-grid { grid-template-columns: 1fr; } }
.mc-list { list-style: none; margin: 10px 0 0; padding: 0; border: 1px solid var(--bo, #e5e7eb); border-radius: 12px; }
.mc-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--bo, #e5e7eb); }
.mc-list li:last-child { border-bottom: 0; }
.mc-tiles { grid-template-columns: 1fr 1fr; }

/* ── Smart ERP set-up (erp-setup): the connection beside the item mapping ── */
.erp-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
@media (max-width: 960px) { .erp-grid { grid-template-columns: 1fr; } }
input.ro-in { background: var(--s2, #f4f7f6); }

/* ── the insurance sheet (insurance): the employee by branch of insurance beside the rules in force ── */
.si-tabs { margin: 6px 0 10px; }
.si-under { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 14px; margin-top: 12px; align-items: start; }
@media (max-width: 960px) { .si-under { grid-template-columns: 1fr; } }
tr.si-on td { background: rgba(13, 148, 136, .06); }

/* ── the employee file: the promotion window (gap-promotion) and the phone app window (app-activate) ── */
.promo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .promo-cols { grid-template-columns: 1fr; } }
.promo-col { border: 1px solid var(--bo, #e5e7eb); border-radius: 12px; padding: 10px 14px; }
.promo-col h3 { margin: 0 0 6px; font-size: 15px; }
.md-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; margin-top: 10px; }
@media (max-width: 640px) { .md-grid3 { grid-template-columns: 1fr; } }
.promo-switch { margin-top: 26px; }
.lt-item .lt-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; width: 100%; }
.pa-link { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.pa-qr svg { width: 128px; height: 128px; display: block; }
.pa-link-text { width: 100%; margin-top: 6px; font-family: ui-monospace, monospace; font-size: 13px; }
.pa-card { display: none; }
@media print {
    body.print-card * { visibility: hidden; }
    body.print-card .pa-card, body.print-card .pa-card * { visibility: visible; }
    body.print-card .pa-card { display: block; position: fixed; top: 0; left: 0; width: 85mm; padding: 6mm; border: 1px solid #000; text-align: center; }
}
.promo-letter { max-width: 760px; line-height: 1.9; }

/* ── the bottom row of a list's other actions (the rule-drawn screens) ── */
.gc-others { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.gc-others form { display: inline; }

/* ── sign-in (mock 'signin'): one centred card for everyone ── */
.main-auth > #page-body:has(> .login-card[data-login-card]) { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; }
.login-card[data-login-card] { width: 400px; border: 1px solid var(--bo2); box-shadow: 0 6px 32px rgba(0,0,0,.09); padding: 26px 26px 18px; }
.li-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.li-tile { width: 54px; height: 54px; border-radius: 12px; background: var(--ad); color: var(--ac); border: 1px solid var(--bo2); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; object-fit: contain; flex: none; }
.li-co { font-weight: 800; font-size: 15px; color: var(--t); }
.li-sys { font-size: 12px; color: var(--t3); }
.login-card .li-h { font-size: 20px; font-weight: 800; margin: 0 0 12px; }
.login-card .field input { width: 100%; padding: 11px 13px; border: 1px solid var(--bo2); border-radius: 10px; font-size: 14px; background: var(--s); color: var(--t); }
.login-card .field label { font-size: 12px; margin: 12px 0 6px; }
.li-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.li-rem { display: inline-flex; align-items: center; gap: 6px; }
.li-row .check-row { margin: 0; align-items: center; font-size: 13px; }
.li-row .check-row input { width: 18px; height: 18px; margin: 0; }
.li-forgot { color: var(--ac); font-weight: 700; font-size: 13px; }
.li-go { padding: 12px; font-size: 15px; font-weight: 700; border-radius: 10px; }
.li-note { margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--bo2); border-radius: 10px; background: var(--ad); color: var(--t2); font-size: 12.5px; line-height: 1.7; }
.li-lang { margin: 12px 0 0; font-size: 12px; color: var(--t3); text-align: end; display: flex; gap: 6px; justify-content: flex-end; }
.li-lang a.on { color: var(--t); font-weight: 700; }
.li-demo { margin-top: 12px; }
.li-demo summary { cursor: pointer; }
.kd-dict tr:target > * { background: var(--ad); }   /* GC12 · G5: the line a tile opened */

/* ── a window on the phone is a bottom sheet (mock 'win-sheet'): a grab handle, a plain title, one big main button ──
   S and M windows (not a Confirm, whose band keeps its colour); the handle and the backdrop close the sheet, so Cancel and ✕ step aside */
.win-handle { display: none; }
@media (max-width: 640px) {
  .win.win-s:not(.win-confirm), .win.win-m:not(.win-confirm) { border-radius: 22px 22px 0 0; }
  .win.win-s:not(.win-confirm) > .win-handle, .win.win-m:not(.win-confirm) > .win-handle {
    display: block; width: 100%; height: 22px; border: 0; padding: 0; background: transparent; cursor: pointer; position: relative; }
  .win.win-s:not(.win-confirm) > .win-handle::before, .win.win-m:not(.win-confirm) > .win-handle::before {
    content: ""; position: absolute; top: 9px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--bo2, #cfd8d8); }
  .win.win-s:not(.win-confirm) .win-hd, .win.win-m:not(.win-confirm) .win-hd { background: transparent; color: var(--t); padding-top: 2px; }
  .win.win-s:not(.win-confirm) .win-title, .win.win-m:not(.win-confirm) .win-title { font-size: 17px; }
  .win.win-s:not(.win-confirm) .win-x, .win.win-m:not(.win-confirm) .win-x { visibility: hidden; }
  .win.win-s:not(.win-confirm) .win-hd .help-q, .win.win-m:not(.win-confirm) .win-hd .help-q { background: var(--s3); color: var(--t); border-color: var(--bo2); }
  .win.win-s:not(.win-confirm) .md-ft, .win.win-m:not(.win-confirm) .md-ft { background: transparent; border-top: 0; }
  .win.win-s:not(.win-confirm) .md-ft > .btn[data-modal-close], .win.win-m:not(.win-confirm) .md-ft > .btn[data-modal-close] { display: none; }
  .win.win-s:not(.win-confirm) .md-ft > .btn:last-child, .win.win-m:not(.win-confirm) .md-ft > .btn:last-child {
    flex: 1; min-height: 58px; font-size: 18px; font-weight: 800; border-radius: 16px; }
}
.li-rem .help-q { width: 20px; height: 20px; min-width: 20px; border-radius: 50%; font-size: 11px; padding: 0; line-height: 1; }
/* the sign-in page loads site.css, not the app's hrms.css: its required star and its button size are set here */
.login-card .field:has(input[required]) > label::after { content: " *"; color: var(--rd, #dc2626); font-weight: 700; }
.login-card .btn.li-go { font-size: 16px; font-weight: 800; min-height: 46px; }
/* in the phone app the sheet rises above the tab bar, which stays in view (mock 'win-sheet') */
@media (max-width: 640px) {
  body.app-shell .win-bg { padding-bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom, 0px)); }
  body.app-shell .win.win-s:not(.win-confirm), body.app-shell .win.win-m:not(.win-confirm) { max-height: calc(92vh - var(--tabbar-h, 64px)); }
}
/* the promotion letter's on/off switch (mock 'gap-promotion') */
.promo-switch { display: inline-flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
.promo-switch input[role=switch] { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--bo2, #cfd8d8); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.promo-switch input[role=switch]::before { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.promo-switch input[role=switch]:checked { background: var(--ac, #0F766E); }
.promo-switch input[role=switch]:checked::before { inset-inline-start: 21px; }
.promo-switch input[role=switch]:focus-visible { outline: 2px solid var(--ac, #0F766E); outline-offset: 2px; }
.login-card .li-rem .help-tip .help-q { width: 20px; height: 20px; min-width: 20px; min-height: 20px; border-radius: 50%; font-size: 11px; padding: 0; line-height: 1; }

/* ── OV1: the HR Manager's override lists in the approvals inbox (waiting for a manager · rejected by a manager) ── */
.ov-panel { margin-block: 0 16px; }
.ov-panel .ov-h { font-size: 16px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.ov-panel .ov-lead { margin: 0 0 10px; font-size: 13px; }
.ov-table .ov-acts { white-space: nowrap; }
.ov-table .ov-acts .inline-form + .inline-form { margin-inline-start: 6px; }
.ov-wait { white-space: normal; }
.ov-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .ov-table thead { display: none; }
    .ov-table, .ov-table tbody, .ov-table tr, .ov-table td { display: block; width: 100%; }
    .ov-table tr { border: 1px solid var(--bo, #e5e7eb); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
    .ov-table td { border: 0; padding: 3px 0; }
    .ov-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--tm, #5b6b6b); }
    .ov-table .ov-acts { white-space: normal; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
    .ov-table .ov-acts .inline-form + .inline-form { margin-inline-start: 0; }
    .ov-table .ov-acts .btn { min-height: 44px; min-width: 96px; }
}

/* ── MD3 (owner 17/11: master data "the same as AlphaStone") — the hub: cards by area (AlphaStone's amd-grid / amd-card) ── */
.mdh-area { margin-bottom: 22px; }
.mdh-area-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--t2); margin: 0 0 10px; }
.mdh-area-ico { width: 16px; height: 16px; color: var(--ac); flex: 0 0 auto; }
.mdh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mdh-card { display: flex; flex-direction: column; background: var(--s); border: 1px solid var(--bo); border-radius: 13px; padding: 14px; transition: border-color .18s, box-shadow .18s; }
.mdh-card:hover, .mdh-card:focus-within { border-color: var(--ac); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.mdh-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mdh-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ad); color: var(--ac); flex: 0 0 auto; }
.mdh-ico svg { width: 16px; height: 16px; }
.mdh-card-label { font-size: 12.5px; font-weight: 700; color: var(--t); flex: 1 1 auto; min-width: 0; }
.mdh-count { flex: 0 0 auto; }
.mdh-card-desc { font-size: 11px; color: var(--t3); line-height: 1.5; margin: 0 0 12px; flex: 1 1 auto; }
.mdh-manage { display: block; width: 100%; text-align: center; text-decoration: none; }

/* ── MD3 — a list: back button and breadcrumb, then the table beside the sticky side form (AlphaStone's EntityList) ── */
.mdl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.mdl-back { text-decoration: none; }
.mdl-crumb { font-size: 12px; color: var(--t3); }
.mdl-crumb a { color: var(--t3); text-decoration: none; }
.mdl-crumb a:hover { color: var(--ac); }
.mdl-crumb span { color: var(--t); font-weight: 600; }
.mdl-head-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mdl-inline { display: inline; margin: 0; }
.mdl-title { margin: 0 0 12px; }
.mdl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.mdl-grid.mdl-grid-read { grid-template-columns: minmax(0, 1fr); }
.mdl-main { min-width: 0; }
.mdl-filter { margin-bottom: 10px; }
.mdl-filter .mdl-search { width: 240px; max-width: 100%; }
.mdl-panel { padding: 0; }
.mdl-panel table { margin: 0; }
.mdl-panel .pager { padding: 8px 14px; }
.mdl-th-num { width: 70px; text-align: center; }
.mdl-th-status { width: 96px; text-align: center; }
.mdl-th-actions { width: 130px; text-align: center; }
.mdl-acts { justify-content: center; align-items: center; flex-wrap: nowrap; }
.mdl-entry { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ac); cursor: pointer; text-align: start; }
.mdl-entry:hover { text-decoration: underline; }
.mdl-other { display: block; font-size: 11px; color: var(--t3); }
.mdl-code { display: block; font-family: var(--mono, monospace); font-size: 10.5px; color: var(--t3); }
.mdl-empty { text-align: center; padding: 24px; color: var(--t3); }
.mdl-form-card { position: sticky; top: 76px; }
.mdl-form-title { font-size: 13px; font-weight: 700; margin: 0 0 12px; }
.mdl-form-card .fgp { margin-bottom: 10px; }
.mdl-form-card .fgp input.fin[readonly] { background: var(--s3); color: var(--t3); cursor: not-allowed; }
.mdl-panel th.mdl-th-num, .mdl-panel th.mdl-th-status, .mdl-panel th.mdl-th-actions,
.mdl-panel td.mdl-th-num, .mdl-panel td.mdl-th-status, .mdl-panel td.mdl-th-actions { text-align: center; }
.mdl-status-field { margin-top: 4px; }
.mdl-form-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--bo); margin-top: 12px; }
.mdl-form-actions .btn { flex: 1 1 0; text-align: center; }
@media (max-width: 960px) {
    .mdl-grid { grid-template-columns: minmax(0, 1fr); }
    .mdl-form-card { position: static; }
    .mdl-head-actions { margin-inline-start: 0; width: 100%; }
}
@media (max-width: 600px) {   /* a phone: the order is in the form; the status and the actions take their own width */
    .mdl-panel .mdl-th-num { display: none; }
    .mdl-th-status, .mdl-th-actions { width: auto; }
    .mdl-acts { flex-direction: column; gap: 6px; }
    .mdl-acts .act-btn { min-height: 32px; min-width: 64px; }
}
