:root { color-scheme: light; font-family: system-ui, sans-serif; color: #1f2933; background: #f4f6f8; }
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; }
.topbar { min-height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: #164e63; color: white; }
.topbar a { color: white; font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { font-size: .92rem; font-weight: 600; }
main { width: 100%; max-width: none; margin: 0; padding: 14px 18px; }
h1 { margin-top: 8px; }
.card { background: white; border: 1px solid #d8dee4; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.form-grid div { display: grid; gap: 4px; }
input, select, textarea, button { font: inherit; }
input, select, textarea { max-width: 100%; padding: 7px; border: 1px solid #aeb8c2; border-radius: 4px; }
button { padding: 9px 16px; border: 0; border-radius: 4px; background: #0e7490; color: white; cursor: pointer; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border: 1px solid #d8dee4; padding: 7px; text-align: left; }
thead th { background: #e7eef2; position: sticky; top: 0; z-index: 1; }
.table-scroll { max-height: calc(100vh - 260px); overflow: auto; border: 1px solid #d8dee4; }
.timesheet { min-width: 1550px; }
.timesheet input[type="number"] { width: 72px; }
.timesheet input[type="time"] { width: 105px; }
.timesheet select { width: 130px; }
.timesheet tr.weekend td, .timesheet tr.weekend th { background: #fff8e1; }
.heading-row { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.totals { display: flex; gap: 14px; padding-bottom: 16px; }
.totals span { background: white; border: 1px solid #d8dee4; border-radius: 6px; padding: 8px 10px; }
.save { margin-top: 14px; }
.message { padding: 10px 14px; margin-bottom: 16px; background: #dbeafe; border-radius: 4px; }
.error { display: block; color: #b91c1c; }
.errorlist { color: #b91c1c; margin: 3px 0 0; padding-left: 18px; font-size: .85rem; }
.muted { color: #52606d; }
.new-timesheet-form { display: grid; gap: 12px; }
.primary-fields { grid-template-columns: minmax(320px, 2fr) 100px 100px minmax(200px, 1fr) auto; }
.creation-settings { border-top: 1px solid #e5e9ed; padding-top: 10px; }
.creation-settings > summary { color: #0e7490; cursor: pointer; font-weight: 600; }
.creation-settings .form-grid { margin-top: 12px; grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.contract-field select { width: 100%; }
.contract-picker > input[type="search"] { width: 100%; }
.contract-picker.enhanced .contract-native-wrap { display: none; }
.excel-import-settings { margin-top: 10px; }
.excel-import-settings > .muted { margin: 8px 0 12px; }
.creation-settings .import-fields { grid-template-columns: minmax(320px, 2fr) minmax(250px, 1.4fr) minmax(210px, 1fr) auto; }
.import-fields > * { min-width: 0; }
.file-field input[type="file"] { width: 100%; min-width: 0; padding: 5px; background: #f8fafc; }
.import-fields .check-field { align-self: end; line-height: 1.2; }
.import-fields .check-field input { flex: 0 0 auto; }
.import-fields button { white-space: nowrap; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr 1fr; } .heading-row { display: block; } .totals { flex-wrap: wrap; } }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.status-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 12px; }
.status-actions form { margin: 0; }
.status { padding: 7px 11px; border-radius: 999px; font-weight: 700; background: #e5e7eb; }
.status-submitted { color: #166534; background: #dcfce7; }
.status-returned { color: #92400e; background: #fef3c7; }
button.secondary { color: #164e63; background: #e6f2f5; }
button.success { background: #15803d; }
button.danger { color: #b91c1c; background: #fee2e2; }
button.small { padding: 6px 9px; font-size: .86rem; }
.summary-strip { display: grid; grid-template-columns: repeat(7, minmax(115px, 1fr)); gap: 8px; margin-bottom: 16px; }
.summary-strip span { display: grid; gap: 2px; background: white; border: 1px solid #d8dee4; border-radius: 7px; padding: 9px 11px; }
.summary-strip small { color: #52606d; }
.summary-strip strong { font-size: 1.04rem; }
.settings-card { padding: 0; overflow: hidden; }
.settings-card > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.settings-form { padding: 0 18px 18px; grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.calendar-list { display: grid; gap: 10px; }
.day-card { background: white; border: 1px solid #cbd5df; border-left: 5px solid #0e7490; border-radius: 8px; overflow: hidden; }
.day-card.weekend { border-left-color: #ca8a04; }
.day-card.holiday { border-left-color: #dc2626; }
.day-header { display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(420px, auto); align-items: center; gap: 12px; padding: 10px 12px; background: #eef4f6; }
.day-card.weekend .day-header { background: #fffbeb; }
.day-card.holiday .day-header { background: #fff1f2; }
.day-date { display: grid; }
.day-state { color: #52606d; font-size: .85rem; }
.day-total { white-space: nowrap; }
.day-buttons { display: flex; justify-content: end; gap: 5px; flex-wrap: wrap; }
.entries { display: grid; }
.empty-day { color: #68737d; margin: 0; padding: 9px 13px; font-style: italic; }
.entry-row { padding: 9px 12px; border-top: 1px solid #e5e9ed; }
.entry-row.deleted { display: none; }
.entry-main { display: grid; grid-template-columns: minmax(135px, 1.3fr) 105px 105px 92px 82px 100px 92px 36px; gap: 8px; align-items: end; }
.field { display: grid; gap: 3px; min-width: 0; }
.field > span, .calculated > span { color: #52606d; font-size: .74rem; font-weight: 600; }
.entry-main input, .entry-main select { width: 100%; padding: 6px; }
.calculated strong { display: flex; align-items: center; min-height: 35px; font-size: 1.05rem; }
.leave-field { visibility: hidden; }
.entry-row.absence .time-field { opacity: .35; pointer-events: none; }
.entry-row.absence .leave-field { visibility: visible; }
.icon-button { width: 34px; height: 34px; padding: 0; font-size: 1.45rem; color: #b91c1c; background: #fee2e2; }
.entry-more { margin-top: 6px; }
.entry-more summary { color: #0e7490; cursor: pointer; font-size: .84rem; }
.entry-extra { display: grid; grid-template-columns: 90px 90px 150px 120px minmax(240px, 1fr); gap: 10px; align-items: end; padding-top: 8px; }
.check-field { display: flex; gap: 7px; align-items: center; min-height: 34px; }
.description input { width: 100%; }
.row-errors { color: #b91c1c; font-size: .84rem; margin-top: 6px; }
.row-errors ul { margin: 2px 0; }
.sticky-save { position: sticky; bottom: 0; display: flex; justify-content: end; padding: 12px 0 2px; background: linear-gradient(transparent, #f4f6f8 25%); z-index: 5; }
.sticky-save .save { padding: 12px 22px; font-weight: 700; box-shadow: 0 3px 12px rgb(0 0 0 / .2); }

.keyboard-help { margin: 10px 0; padding: 9px 12px; color: #334e5a; background: #e6f2f5; border-radius: 6px; font-size: .9rem; }
.sheet-scroll { width: 100%; overflow: visible; border: 1px solid #aeb8c2; background: white; }
.entry-sheet { width: 100%; min-width: 0; table-layout: fixed; }
.entry-sheet th { top: 0; z-index: 3; overflow: hidden; white-space: nowrap; text-align: center; font-size: .72rem; }
.entry-sheet th small { font-weight: 400; }
.entry-sheet td { overflow: hidden; padding: 1px; height: 29px; font-size: .78rem; }
.entry-sheet input, .entry-sheet select { width: 100%; min-width: 0; height: 26px; padding: 2px; border-color: transparent; border-radius: 0; background: transparent; font-size: .78rem; }
.entry-sheet input:focus, .entry-sheet select:focus { outline: 2px solid #0e7490; outline-offset: -1px; background: white; }
.entry-sheet th:nth-child(1), .entry-sheet td:nth-child(1) { width: 6%; background: #f8fafc; }
.entry-sheet th:nth-child(2), .entry-sheet th:nth-child(3), .entry-sheet td:nth-child(2), .entry-sheet td:nth-child(3) { width: 4.2%; }
.entry-sheet th:nth-child(4), .entry-sheet td:nth-child(4) { width: 4.5%; }
.entry-sheet th:nth-child(n+5):nth-child(-n+10), .entry-sheet td:nth-child(n+5):nth-child(-n+10) { width: 4%; }
.entry-sheet th:nth-child(11), .entry-sheet th:nth-child(12), .entry-sheet td:nth-child(11), .entry-sheet td:nth-child(12) { width: 3%; }
.entry-sheet th:nth-child(13), .entry-sheet th:nth-child(14), .entry-sheet td:nth-child(13), .entry-sheet td:nth-child(14) { width: 4%; }
.entry-sheet th:nth-child(15), .entry-sheet td:nth-child(15) { width: 12%; }
.entry-sheet th:nth-child(16), .entry-sheet td:nth-child(16) { width: 5%; }
.entry-sheet th:nth-child(17), .entry-sheet td:nth-child(17) { width: 12%; }
.entry-sheet th:nth-child(18), .entry-sheet td:nth-child(18) { width: 4%; }
.date-cell { line-height: 1.05; }
.date-cell strong, .date-cell small { display: block; }
.date-cell small { color: #68737d; font-size: .7rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calculated-cell { text-align: right; padding-right: 6px !important; color: #334e5a; font-variant-numeric: tabular-nums; }
.check-cell { text-align: center; }
.check-cell input { width: 18px; }
.sheet-row:not(.active-row) { color: #68737d; }
.sheet-row.weekend td { background-color: #fffbeb; }
.sheet-row.holiday td { background-color: #fff1f2; }
.sheet-row.deleted { opacity: .38; text-decoration: line-through; }
.sheet-row.deleted input, .sheet-row.deleted select { pointer-events: none; }
.grid-button { width: 27px; height: 27px; padding: 0; margin-right: 2px; border-radius: 2px; }
.remove-entry { color: #b91c1c; background: #fee2e2; }
.absence .time-cell { opacity: .35; }
.signature-panel { display: grid; grid-template-columns: auto minmax(230px, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; }
.signature-panel small, .mobile-card small { display: block; color: #52606d; }
.signature-icon { font-size: 2rem; }
.muted-icon { filter: grayscale(1); opacity: .65; }
.mobile-sign-form { display: flex; gap: 8px; }
.mobile-sign-form input { width: 160px; }
.button-link { display: inline-block; padding: 9px 16px; border-radius: 4px; color: white; background: #0e7490; text-decoration: none; text-align: center; }
.button-link.secondary { color: #164e63; background: #e6f2f5; }
.button-link.success { background: #15803d; }
.signed-info { padding: 10px 14px; color: #166534; background: #dcfce7; border-radius: 6px; }
.employee-card { max-width: 900px; }
.employee-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.employee-form .field { display: grid; gap: 4px; }
.form-actions { display: flex; gap: 10px; align-items: center; grid-column: 1 / -1; }
.mobile-card { max-width: 620px; margin: 30px auto; text-align: center; }
.mobile-card .field { display: grid; gap: 5px; text-align: left; margin: 18px 0; }
.mobile-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.mobile-summary span { display: grid; padding: 12px 6px; background: #eef4f6; border-radius: 6px; }
.mobile-sign-button { width: 100%; padding: 15px; font-weight: 700; font-size: 1.08rem; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input { min-width: 280px; }
.section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 14px; }
.section-heading h2 { margin: 0 0 6px; }
.filter-chip { display: inline-block; padding: 4px 9px; color: #164e63; background: #e6f2f5; border-radius: 999px; font-size: .88rem; font-weight: 700; }
.period-filter-form { display: flex; align-items: end; justify-content: end; gap: 8px; flex-wrap: wrap; }
.period-filter-form label { display: grid; gap: 3px; color: #52606d; font-size: .8rem; font-weight: 600; }
.period-filter-form select { min-width: 115px; }
.period-filter-form .button-link { padding: 8px 12px; }
.terminal-page { max-width: 1050px; margin: 0 auto; }
.terminal-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.terminal-heading h1 { margin-bottom: 8px; }
.terminal-clock { font-size: 1.65rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #164e63; padding-bottom: 10px; }
.terminal-card > label { display: block; margin-bottom: 8px; font-size: 1.05rem; font-weight: 700; }
.terminal-card input[type="search"] { width: 100%; padding: 14px 16px; font-size: 1.2rem; }
.terminal-action-card { border-left: 8px solid #64748b; }
.terminal-action-card.state-present { border-left-color: #dc2626; }
.terminal-action-card.state-away { border-left-color: #16a34a; }
.terminal-person { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.terminal-person strong { font-size: 1.45rem; }
.terminal-person p { margin: 0; color: #52606d; }
.presence-dot { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%; background: #64748b; }
.state-present .presence-dot { background: #16a34a; box-shadow: 0 0 0 5px #dcfce7; }
.terminal-action-form { display: grid; gap: 14px; }
.terminal-departure-fields { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr); gap: 12px; }
.terminal-departure-fields > div { display: grid; gap: 5px; }
.terminal-choice-grid { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(460px, 1.5fr); gap: 16px; }
.terminal-choice { display: grid; align-content: start; gap: 9px; padding: 18px; border: 2px solid #d8dee4; border-radius: 10px; background: #f8fafc; }
.terminal-choice > strong { font-size: 1.35rem; }
.terminal-choice > small { color: #52606d; }
.arrival-choice { border-color: #86efac; background: #f0fdf4; }
.departure-choice { border-color: #fca5a5; background: #fff7f7; }
.choice-icon { font-size: 2.2rem; line-height: 1; font-weight: 900; }
.arrival-choice .choice-icon { color: #15803d; }
.departure-choice .choice-icon { color: #b91c1c; }
.terminal-note-field { display: grid; gap: 4px; margin-top: 3px; font-size: .86rem; font-weight: 600; }
.departure-reason-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 8px; }
.terminal-action-buttons { display: grid; gap: 8px; }
.arrival-action-buttons { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.terminal-action-button { min-height: 72px; display: grid; place-items: center; gap: 3px; padding: 9px; font-weight: 700; color: #fff; text-decoration: none; border-radius: 8px; }
.responsive-table { overflow-x: auto; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.terminal-action-button > span { font-size: 1.45rem; line-height: 1; }
.terminal-action-button > small { font-size: .72rem; font-weight: 500; }
.terminal-action-button.color-green { background: #15803d; }
.terminal-action-button.color-red { background: #b91c1c; }
.terminal-action-button.color-orange { background: #c2410c; }
.terminal-action-button.color-blue { background: #0369a1; }
.terminal-action-button.color-purple { background: #7e22ce; }
.terminal-action-button.color-gray { background: #475569; }
.reason-button { min-height: 62px; padding: 10px 8px; background: #b91c1c; font-weight: 700; }
.reason-button small { font-weight: 500; }
.reason-button.end-shift { background: #7f1d1d; }
.terminal-choice button:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .38; }
.clock-button { width: 100%; padding: 20px; font-size: 1.35rem; font-weight: 800; }
.arrival-button { background: #15803d; }
.departure-button { background: #b91c1c; }
.terminal-note { color: #68737d; text-align: center; font-size: .85rem; }
.attendance-filter-form { display: grid; grid-template-columns: minmax(300px, 2fr) 110px 150px auto auto; gap: 10px; align-items: end; }
.attendance-filter-form label, .attendance-filter-form .employee-search { display: grid; gap: 4px; }
.attendance-timesheet-body { padding: 0 18px 18px; }
.attendance-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.attendance-actions > div { display: flex; gap: 8px; align-items: center; }
.attendance-actions form { margin: 0; }
.heading-actions { display: flex; gap: 8px; align-items: center; }
.terminal-settings-form { overflow-x: auto; }
.terminal-settings-form table { min-width: 900px; }
.terminal-settings-form input[type="text"] { width: 100%; }
.terminal-settings-form input[name$="-icon"] { width: 62px; text-align: center; font-size: 1.2rem; }
.terminal-settings-form input[name$="-sort_order"] { width: 80px; }
.technical-code { display: block; margin-top: 3px; color: #68737d; font-family: ui-monospace, monospace; }
.registry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.activity-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.activity-form > div { display: grid; gap: 3px; }
.activity-form > div:has(textarea), .activity-form button { grid-column: 1 / -1; }
.auth-card { max-width: 460px; margin: 6vh auto; text-align: center; }
.auth-form { display: grid; gap: 12px; text-align: left; }
.auth-form p, .auth-form label { display: grid; gap: 5px; margin: 0; }
.auth-form input, .auth-form select { width: 100%; }
.evidence-login-options { display: grid; gap: 22px; }
.evidence-login-options > section + section { border-top: 1px solid #cbd5e1; padding-top: 18px; }
.evidence-login-options .signature-qr { width: min(240px, 80vw); height: auto; }
.welcome-grid { max-width: 940px; margin: 6vh auto; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(280px, .8fr); gap: 20px; align-items: stretch; }
.welcome-grid .auth-card { width: 100%; max-width: none; margin: 0; }
.terminal-phone-login { max-width: 520px; margin: 6vh auto; }
.terminal-phone-login .auth-card { max-width: none; margin: 0; }
.tablet-launch-card, .tablet-launch-compact { color: #164e63; background: #e6f2f5; border: 2px solid #7db6c2; border-radius: 12px; text-decoration: none; }
.tablet-launch-card { min-height: 260px; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 28px; text-align: center; }
.tablet-launch-card:hover, .tablet-launch-card:focus-visible, .tablet-launch-compact:hover, .tablet-launch-compact:focus-visible { border-color: #0e7490; background: #d6edf1; outline: 3px solid rgb(14 116 144 / .2); }
.tablet-icon { width: 82px; height: 82px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linejoin: round; }
.tablet-launch-card strong { display: block; font-size: 1.4rem; }
.tablet-launch-card small, .tablet-launch-compact small { display: block; margin-top: 4px; color: #3e6570; }
.dashboard-title-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.tablet-launch-compact { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.tablet-launch-compact .tablet-icon { width: 38px; height: 38px; stroke-width: 5; }
.tablet-launch-compact strong { display: block; }
.terminal-pin-form { display: grid; gap: 7px; margin-top: 18px; padding: 16px; background: #fff7ed; border: 2px solid #fb923c; border-radius: 10px; }
.terminal-pin-form > label { font-weight: 800; }
.terminal-pin-form > div { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px; }
.terminal-pin-form input { padding: 13px; font-size: 1.2rem; letter-spacing: .12em; }
.terminal-locked-note { margin: 0; padding: 18px; color: #7c2d12; background: #ffedd5; border-radius: 8px; text-align: center; font-weight: 700; }
.inline-form { display: inline; margin-left: 8px; }
.link-button { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; font: inherit; }
.terminal-qr { display: grid; grid-template-columns: 190px 1fr; gap: 22px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid #d8dee4; }
.terminal-qr img, .signature-qr { width: 190px; max-width: 100%; background: white; }
.terminal-qr h2 { margin: 0 0 8px; }
.signature-qr { display: block; margin: 16px auto; }
.call-verify-button { display: block; margin: 22px 0; padding: 20px; font-size: 1.35rem; font-weight: 800; }
.call-verified { padding: 16px; border-radius: 10px; color: #14532d; background: #dcfce7; font-weight: 800; }

@media (max-width: 1100px) {
  .primary-fields { grid-template-columns: minmax(280px, 2fr) 90px 90px minmax(190px, 1fr); }
  .primary-fields button { grid-column: 4; }
  .creation-settings .form-grid { grid-template-columns: repeat(3, 1fr); }
  .creation-settings .import-fields { grid-template-columns: minmax(260px, 1.5fr) minmax(230px, 1fr); }
  .import-fields button { justify-self: start; }
  .summary-strip { grid-template-columns: repeat(4, 1fr); }
  .day-header { grid-template-columns: 1fr auto; }
  .day-buttons { grid-column: 1 / -1; justify-content: start; }
  .entry-main { grid-template-columns: minmax(130px, 1.3fr) 95px 95px 85px 75px 90px 85px 36px; }
  .settings-form { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  main { padding: 14px; }
  .welcome-grid { margin: 18px auto; grid-template-columns: 1fr; }
  .tablet-launch-card { min-height: 150px; grid-template-columns: auto 1fr; text-align: left; place-content: center; justify-items: start; }
  .tablet-launch-card .tablet-icon { width: 58px; height: 58px; }
  .dashboard-title-row { align-items: stretch; flex-direction: column; }
  .tablet-launch-compact { align-self: stretch; }
  .terminal-pin-form > div { grid-template-columns: 1fr; }
  .status-actions { align-items: flex-start; flex-wrap: wrap; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .entry-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-main .kind { grid-column: 1 / -1; }
  .icon-button { grid-column: 2; justify-self: end; }
  .entry-extra { grid-template-columns: repeat(2, 1fr); }
  .entry-extra .description { grid-column: 1 / -1; }
  .settings-form { grid-template-columns: 1fr 1fr; }
  .primary-fields, .creation-settings .form-grid { grid-template-columns: 1fr 1fr; }
  .creation-settings .import-fields { grid-template-columns: 1fr; }
  .primary-fields .contract-field, .primary-fields button { grid-column: 1 / -1; }
  .signature-panel { grid-template-columns: auto 1fr; }
  .signature-panel form, .signature-panel .button-link { grid-column: 1 / -1; }
  .mobile-sign-form { display: grid; }
  .mobile-sign-form input { width: 100%; }
  .employee-form { grid-template-columns: 1fr; }
  .mobile-summary { grid-template-columns: 1fr; }
  .topbar nav { display: none; }
  .registry-grid, .activity-form { grid-template-columns: 1fr; }
  .search-form { flex-wrap: wrap; }
  .section-heading { display: block; }
  .period-filter-form { justify-content: start; margin-top: 12px; }
  .terminal-heading, .terminal-person, .attendance-actions { display: block; }
  .terminal-clock { display: block; padding: 0 0 14px; }
  .terminal-departure-fields, .attendance-filter-form, .terminal-choice-grid { grid-template-columns: 1fr; }
  .departure-reason-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
  .heading-actions { flex-wrap: wrap; margin: 12px 0; }
  .attendance-actions > div { flex-wrap: wrap; margin-top: 10px; }
  .terminal-qr { grid-template-columns: 120px 1fr; }
}
