:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #253b55;
  background: #f3f6fa;
  font-synthesis: none;
  --brand-blue: #0064aa;
  --navy: #13325e;
  --brand-hover: #004e87;
  --brand-soft: #e8f2fa;
  --muted: #61748b;
  --line: #dde5ef;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
#app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.site-footer { min-height: 40px; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 6px 16px; background: transparent; color: var(--muted); font-size: 10px; }
.site-footer img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.footer-content { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-name { color: var(--muted); font-weight: 500; }
.site-footer a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--brand-blue); text-decoration: underline; }
.site-footer small { font-size: 9px; }
.footer-content > small::before { content: "·"; margin-right: 8px; }
.auth-card .site-footer { min-height: 0; margin-top: 24px; padding: 16px 0 0; justify-content: flex-start; align-items: flex-start; }
.auth-card .footer-content { display: grid; gap: 6px; }
.auth-card .footer-content > small::before { content: none; }
.auth-card .footer-contact { flex-direction: column; align-items: flex-start; gap: 5px; }
.auth-card .footer-separator { display: none; }
.auth-card .site-footer small { display: block; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, a:focus-visible { outline: 3px solid #0064aa; outline-offset: 3px; }
button { border: 1px solid var(--line); background: white; color: #253b55; padding: 10px 15px; border-radius: 9px; font-weight: 600; }
button:hover { background: var(--brand-soft); }
.primary { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }
.primary:hover { background: var(--brand-hover); }
.danger { color: #b4433f; border-color: #ebceca; }
.link { padding: 0; border: 0; color: var(--brand-blue); background: none; text-align: left; }
.link:hover { background: none; text-decoration: underline; }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: 100%; min-height: 0; background: radial-gradient(ellipse at top left, #bbd8ef 0, transparent 45%), #f3f6fa; }
.sidebar { background: linear-gradient(155deg, rgb(29 77 123 / 88%), rgb(13 38 72 / 94%)); color: #f5f9ff; padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; border-right: 1px solid rgb(255 255 255 / 30%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 8px 0 30px rgb(19 50 94 / 10%); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); }
.sidebar .brand { padding: 0 6px 18px; }
.sidebar > .brand, .sidebar > .nav-label, .sidebar > .nav, .sidebar-bottom { flex-shrink: 0; }
.sidebar button:focus-visible { outline-color: #b8e5ff; outline-offset: 2px; }
.sidebar-toggle { display: grid; place-items: center; align-self: flex-end; flex-shrink: 0; width: 28px; height: 28px; padding: 3px; margin-bottom: 6px; color: white; border-color: rgb(255 255 255 / 25%); background: rgb(255 255 255 / 8%); }
.sidebar-toggle:hover { background: rgb(255 255 255 / 18%); }
.sidebar-collapsed .sidebar-toggle { align-self: center; }
.sidebar-collapsed .sidebar-toggle .picto { transform: rotate(180deg); }
.sidebar-collapsed .sidebar .brand > div:last-child,
.sidebar-collapsed .sidebar .nav-label,
.sidebar-collapsed .sidebar .nav-text,
.sidebar-collapsed .sidebar-user { display: none; }
.sidebar-collapsed .sidebar .brand { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar .brand-mark { width: 44px; height: 44px; }
.sidebar-collapsed .nav button { justify-content: center; position: relative; padding-inline: 8px; }
.sidebar-collapsed .nav-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 3px; font-size: 9px; }
.sidebar-bottom button { display: flex; justify-content: center; align-items: center; gap: 8px; }
@media (min-width: 761px) and (min-height: 641px) {
  .sidebar { z-index: 1; }
  .sidebar-toggle { position: absolute; top: 28px; right: -14px; margin: 0; z-index: 1; background: #365f86; box-shadow: 0 3px 10px rgb(13 38 72 / 22%); }
  .sidebar-toggle:hover { background: #46749e; }
  .shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar-collapsed .sidebar { padding-inline: 10px; }
  .sidebar-collapsed .sidebar-bottom { padding-inline: 0; }
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 36px; }
.brand-mark { background: white; border-radius: 12px; width: 54px; height: 54px; padding: 5px; display: grid; place-items: center; flex-shrink: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.header-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-logo { width: 44px; height: 44px; object-fit: contain; padding: 4px; background: white; border-radius: 8px; flex-shrink: 0; }
.panel-head .header-logo { width: 28px; height: 28px; padding: 2px; }
.brand strong { display: block; letter-spacing: 2px; font-size: 16px; }
.brand small { color: #b7cce4; letter-spacing: 2px; font-size: 10px; }
.nav-label { font-size: 10px; text-transform: uppercase; color: #c5d9ec; padding: 6px 10px 10px; letter-spacing: 1.6px; }
.nav { display: grid; gap: 4px; }
.nav button { text-align: left; background: transparent; color: #e0ecf8; border: 1px solid transparent; padding: 9px 10px; font-size: 12px; line-height: 18px; font-weight: 500; display: flex; align-items: center; gap: 9px; }
.nav button:hover { background: rgb(255 255 255 / 10%); border-color: rgb(255 255 255 / 16%); }
.nav button.active { background: linear-gradient(120deg, rgb(0 125 202 / 75%), rgb(69 151 211 / 35%)); border-color: rgb(182 226 255 / 42%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 4px 12px rgb(0 25 58 / 15%); color: white; }
.nav-icon { width: 21px; font-size: 19px; }
.nav-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: auto; padding: 0 6px; border-radius: 999px; background: #bd3438; color: white; font-size: 10px; font-weight: 700; line-height: 1; }
.picto { width: 21px; height: 21px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.pill .picto { width: 14px; height: 14px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); }
.password-toggle:hover { color: var(--brand-blue); background: var(--brand-soft); }
.auth-pictos { display: grid; gap: 16px; margin-top: 28px; }
.auth-pictos span { display: flex; align-items: center; gap: 13px; font-size: 13px; color: #d5e6f8; }
.auth-pictos .picto { width: 36px; height: 36px; padding: 7px; background: #0064aa; border-radius: 9px; }
.sidebar-bottom { margin-top: auto; font-size: 12px; color: #c5d9ec; border-top: 1px solid rgb(255 255 255 / 20%); padding: 14px 6px 0; overflow-wrap: anywhere; }
.sidebar-bottom strong { color: #f5f9ff; display: block; margin-bottom: 5px; }
.sidebar-bottom button { margin-top: 10px; padding: 8px 10px; font-size: 12px; color: #f5f9ff; border-color: rgb(255 255 255 / 30%); background: rgb(255 255 255 / 7%); width: 100%; }
.sidebar-bottom button:hover { background: rgb(255 255 255 / 15%); }
.sidebar button { transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.sidebar .nav button:is(:hover, :focus-visible),
.sidebar-bottom button:is(:hover, :focus-visible),
.sidebar-toggle:is(:hover, :focus-visible) { color: #fff; background: linear-gradient(125deg, rgb(137 202 255 / 28%), rgb(255 255 255 / 10%)); border-color: rgb(194 229 255 / 55%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%), 0 5px 14px rgb(0 20 48 / 22%); transform: translateY(-1px); }
.sidebar .nav button.active:is(:hover, :focus-visible) { background: linear-gradient(120deg, rgb(0 142 225 / 90%), rgb(86 168 230 / 55%)); border-color: rgb(210 239 255 / 75%); }
.sidebar-toggle:is(:hover, :focus-visible) { background: linear-gradient(135deg, #5785ac, #365f86); }
.sidebar button:active { transform: translateY(0); box-shadow: inset 0 2px 5px rgb(0 20 48 / 20%); }
.content { padding: 0 38px; min-width: 0; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
#page-content { flex: 1; min-height: 0; overflow-y: auto; }
.content .site-footer { flex-shrink: 0; margin-top: auto; min-height: 0; padding: 6px 0; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 30px 0 24px; }
h1 { font-size: 29px; letter-spacing: -.8px; margin: 0 0 9px; color: var(--navy); font-weight: 650; }
h2 { font-size: 18px; margin: 0 0 16px; }
h3 { font-size: 14px; margin: 0 0 14px; }
p { line-height: 1.6; }
.page-head p { margin: 0; font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.people-heading-actions { display: flex; flex-direction: column; gap: 8px; }
.new-entrant-button { background: #bd3438; border-color: #bd3438; color: white; box-shadow: 0 3px 10px rgb(189 52 56 / 22%); }
.new-entrant-button:hover { background: #a9272d; border-color: #a9272d; }
.service-field { display: flex; align-items: flex-end; gap: 8px; min-width: 0; padding: 10px; background: var(--brand-soft); border: 1px solid #9fc5e2; border-left: 4px solid var(--brand-blue); border-radius: 9px; }
.service-field label { flex: 1; min-width: 0; }
.service-field input { background: white; border-color: #9fc5e2; }
.service-field button { background: var(--brand-blue); border-color: var(--brand-blue); color: white; font-weight: 600; }
.service-field button:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
#service-dialog { width: min(600px, calc(100% - 30px)); }
#service-results { display: grid; gap: 8px; max-height: 40vh; overflow-y: auto; }
#service-results button { text-align: left; }
.service-group { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fbfe; }
.service-group h3 { margin: 0 0 8px; color: var(--navy); font-size: 12px; }
.service-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.service-group button { padding: 8px 11px; font-size: 11px; }
.entrant-nfc { display: grid; gap: 12px; padding: 18px; background: #fff0f0; color: #843d3d; border: 1px solid #e7b4b4; border-left: 5px solid #bc6060; border-radius: 10px; }
.entrant-nfc h3 { margin: 0; color: #843d3d; font-size: 16px; }
.entrant-nfc button { justify-self: stretch; background: #ae4e4e; border-color: #ae4e4e; }
.entrant-nfc button:hover { background: #913e3e; border-color: #913e3e; }
.entrant-nfc button[data-action="confirm-entrant-nfc"] { background: #287850; border-color: #287850; }
.entrant-nfc button[data-action="confirm-entrant-nfc"]:hover:not(:disabled) { background: #1e6040; border-color: #1e6040; }
.entrant-nfc button[data-action="confirm-entrant-nfc"]:disabled { background: #8ba99b; border-color: #8ba99b; }
.entrant-nfc button[data-action="cancel-entrant-nfc"] { background: #687786; border-color: #687786; }
.entrant-nfc button[data-action="cancel-entrant-nfc"]:hover:not(:disabled) { background: #505d6a; border-color: #505d6a; }
.entrant-nfc button[data-action="cancel-entrant-nfc"]:disabled { background: #a8b0b8; border-color: #a8b0b8; }
.entrant-nfc input { background: white; border-color: #e7b4b4; }
.entrant-nfc input:focus { outline-color: #bc6060; }
.entrant-nfc .muted { color: #843d3d; }
.entrant-nfc p { margin: 0; }
.nfc-person-management { display: grid; gap: 10px; margin-top: 8px; padding: 16px; border: 1px solid #c9d8e7; border-left: 4px solid var(--brand-blue); border-radius: 10px; background: linear-gradient(145deg, #f7fbff, #eaf3fb); color: var(--navy); }
.nfc-person-management h4 { margin: 0; font-size: 14px; }
.nfc-person-management > .muted { color: var(--muted); }
.nfc-person-results { display: grid; gap: 6px; max-height: 210px; overflow-y: auto; }
.nfc-person-results > .muted { margin: 0; }
.nfc-person-results button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; text-align: left; background: white; }
.nfc-person-results button[aria-selected="true"] { background: var(--brand-soft); border-color: #9fc5e2; }
.nfc-person-results button span { font-weight: 600; }
.nfc-person-results button small { color: var(--muted); font-size: 10px; }
.nfc-person-selected:empty { display: none; }
#nfc-management-dialog[open] { display: flex; flex-direction: column; width: min(700px, calc(100% - 30px)); max-height: 88vh; }
#nfc-management-dialog > .modal-head,
#nfc-management-dialog > .modal-foot { flex-shrink: 0; }
#nfc-management-dialog > .modal-body { min-height: 0; overflow-y: auto; }
#nfc-management-dialog .nfc-person-management { margin-top: 0; }
.nfc-person-card { display: grid; gap: 12px; padding: 14px; border: 1px solid #cbdceb; border-radius: 9px; background: white; }
.nfc-person-card > div:first-child { display: grid; gap: 4px; }
.nfc-person-card > div:first-child strong { color: var(--navy); }
.nfc-person-card > div:first-child span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.nfc-person-card button.primary { justify-self: start; }
.nfc-person-card button.danger { justify-self: start; }
.nfc-emergency-warning { margin: 0; padding: 12px; border: 1px solid #e6b0ae; border-radius: 8px; background: #fff0ef; color: #843d3d; font-size: 12px; line-height: 1.5; }
.entrant-card-controls { display: grid; gap: 10px; }
.entrant-card-controls .draft-card-preview-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 18px; background: linear-gradient(110deg, #795548, #9b6857); border-color: #795548; color: white; font-weight: 700; box-shadow: 0 5px 14px #79554835; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.entrant-card-controls .draft-card-preview-button:hover { background: linear-gradient(110deg, #68483d, #87594b); border-color: #68483d; box-shadow: 0 8px 18px #79554845; transform: translateY(-1px); }
.entrant-card-controls .draft-card-preview-button:focus-visible { outline: 3px solid #a77a68; outline-offset: 3px; }
.draft-card-preview-button .picto { width: 21px; height: 21px; }
.preview-chevron { font-size: 20px; line-height: 1; margin-left: auto; }
.draft-card-preview { padding: 20px; border: 1px solid #decac1; border-radius: 12px; background: linear-gradient(145deg, #fffaf7, #f4ebe6); box-shadow: inset 0 1px 3px #79554812; }
.draft-card-preview[hidden] { display: none; }
.draft-card-preview .card-preview { padding: 8px 0 14px; }
.draft-card-preview-caption { margin: 0; text-align: center; color: #68483d; font-size: 12px; font-weight: 700; }
.draft-card-preview .card-print-help,
.draft-card-preview > .muted { margin: 8px 0 0; text-align: center; }
.draft-card-fit-error[hidden] { display: none; }
.entrant-photo-field { padding: 6px 12px; gap: 3px; background: #f3edfc; color: #56308a; border: 1px solid #c9afe8; border-left: 5px solid #7950ad; border-radius: 9px; }
.entrant-photo-field input { background: white; border-color: #c9afe8; color: #56308a; }
.entrant-photo-field input::file-selector-button { padding: 3px 12px; margin-right: 10px; background: #70439f; color: white; border: 0; border-radius: 6px; cursor: pointer; font-weight: 600; }
.entrant-photo-field input::file-selector-button:hover { background: #59327f; }
.entrant-photo-field input:focus { outline-color: #7950ad; }
.employee-photo { width: 62px; height: 78px; object-fit: cover; border-radius: 10px; }
.card-controls { display: grid; gap: 18px; }
.card-controls form { display: grid; gap: 10px; }
.card-controls button { justify-self: start; }
.card-preview { display: flex; justify-content: center; padding: 24px 0; }
.employee-card { width: 85.6mm; height: 54mm; flex-shrink: 0; background: white; border: .3mm solid var(--navy); border-radius: 3mm; overflow: hidden; display: flex; flex-direction: column; color: var(--navy); font-size: 2.1mm; box-shadow: 0 8px 24px #13325e22; }
.employee-card-head { display: flex; align-items: center; gap: 2mm; padding: 2mm 3mm; background: var(--navy); color: white; }
.employee-card-head img { width: 9mm; height: 9mm; object-fit: contain; background: white; border-radius: 1mm; }
.employee-card-head strong { display: block; font-size: 3.4mm; }
.employee-card-head span { display: block; font-size: 1.8mm; }
.employee-card-body { display: flex; gap: 3mm; padding: 2mm 3mm; flex: 1; min-height: 0; }
.card-photo { width: 20mm; height: 27mm; object-fit: cover; border-radius: 1mm; flex-shrink: 0; }
.card-photo-empty { display: grid; place-content: center; text-align: center; background: var(--brand-soft); }
.card-identity { min-width: 0; overflow-wrap: anywhere; }
.card-identity h3 { font-size: calc(3mm * var(--card-font-scale, 1)); line-height: 1.15; margin: 0 0 1mm; }
.card-identity p { font-size: calc(2.1mm * var(--card-font-scale, 1)); margin: .5mm 0; line-height: 1.15; }
.card-identity > strong { font-size: calc(2.2mm * var(--card-font-scale, 1)); color: var(--brand-blue); }
.employee-card-foot { display: flex; justify-content: space-between; padding: 1.5mm 3mm; background: var(--brand-soft); font-size: 2mm; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 8px 14px; position: relative; }
.stat small { display: block; color: var(--muted); font-size: 11px; line-height: 15px; }
.stat strong { font-size: 22px; line-height: 26px; color: var(--navy); display: block; margin: 1px 0; }
.stat span { display: block; font-size: 10px; line-height: 14px; color: var(--muted); }
.stat-icon { position: absolute; top: 9px; right: 12px; border-radius: 9px; padding: 6px; background: var(--brand-soft); color: var(--brand-blue); }
.stat:has(.stat-icon) small, .stat:has(.stat-icon) strong { padding-right: 38px; }
.doors-content .page-head { margin: 20px 0 16px; }
.doors-content .stats { margin-bottom: 16px; }
.doors-content .panel { margin-bottom: 14px; }
.doors-content .panel-head { padding: 8px 20px; }
.doors-content .access-head input { padding-top: 7px; padding-bottom: 7px; }
.doors-content th { padding-top: 8px; padding-bottom: 8px; }
.doors-content td { padding-top: 7px; padding-bottom: 7px; }
.doors-content .table-foot { padding-top: 8px; padding-bottom: 8px; }
.doors-content .pagination button { padding-top: 6px; padding-bottom: 6px; }
.doors-content .padded { padding: 14px 20px; }
.doors-content .directory-head { margin-bottom: 10px; }
.doors-content .zone-card { padding: 6px 10px; gap: 2px; }
.doors-content .note { margin: 10px 0; padding: 10px 16px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 20px; }
.panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.panel-head h2 { margin: 0; font-size: 15px; }
.access-head { flex-wrap: wrap; }
.access-head input { width: min(440px, 100%); }
.counter { font-size: 11px; padding: 4px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-hover); }
.filters { padding: 17px 22px; display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.filters input { flex: 1; min-width: 130px; }
.filters select { width: auto; min-width: 150px; }
input, select, textarea { padding: 11px 12px; border: 1px solid var(--line); background: #fcfdff; color: #253b55; border-radius: 8px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-blue); outline-offset: 1px; }
select { border-color: #cbd9e8; border-radius: 10px; background: linear-gradient(180deg, #fff, #f4f8fd); box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgb(19 50 94 / 6%); cursor: pointer; }
select:hover:not(:disabled) { border-color: #8aafcf; }
select:disabled { cursor: not-allowed; opacity: .65; }
@supports (appearance: base-select) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]) { align-items: center; gap: 12px; }
  select::picker-icon { color: var(--brand-blue); }
  select::picker(select) { padding: 6px; margin-block: 6px; border: 1px solid #ccddec; border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgb(19 50 94 / 18%); max-height: min(360px, 60dvh); overflow-y: auto; }
  select option { min-height: 36px; padding: 9px 12px; gap: 10px; border-radius: 7px; color: #253b55; font-size: 13px; overflow-wrap: anywhere; }
  select option:hover, select option:focus-visible { background: #edf5fc; color: #004e87; }
  select option:checked { background: #e4f1fb; color: #004e87; font-weight: 600; }
  select option::checkmark { color: var(--brand-blue); }
  select option:disabled { color: #748397; }
}
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand-blue); }
.table-wrap { overflow-x: auto; }
.audit-detail-text { white-space: pre-wrap; overflow-wrap: anywhere; }
#audit-search { width: 620px; max-width: 100%; }
#notification-search { display: block; width: min(620px, 100%); margin: 0 auto 20px; padding: 14px 16px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 13px 20px; background: #f6f9fd; color: #61748b; font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 20px; border-top: 1px solid #edf1f7; }
tbody tr:hover { background: #f2f7fc; }
.person-cell { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-blue); border-radius: 10px; font-size: 11px; font-weight: 650; flex-shrink: 0; }
.avatar.large { width: 62px; height: 62px; font-size: 22px; border-radius: 17px; }
.person-cell strong { display: block; color: var(--navy); font-size: 12px; }
.person-cell small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.nfc-uid { color: var(--navy); font-family: Consolas, "Courier New", monospace; font-size: 11px; overflow-wrap: anywhere; }
.authorized-zones { min-width: 150px; }
.authorized-zones summary { width: fit-content; color: var(--brand-blue); cursor: pointer; font-weight: 600; }
.authorized-zones summary:hover { color: var(--brand-hover); text-decoration: underline; }
.authorized-zones ul { display: grid; gap: 5px; margin: 8px 0 0; padding-left: 18px; color: var(--navy); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 6px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.pill.green { background: #e7f5eb; color: #287850; }
.pill.amber { background: #fff3dc; color: #98712b; }
.pill.red { background: #fceceb; color: #b0524a; }
.pill.gray { background: #edf0ed; color: #77827b; }
.pill.blue { background: var(--brand-soft); color: var(--brand-hover); }
.level { display: inline-grid; place-items: center; width: 29px; height: 27px; color: var(--brand-blue); background: var(--brand-soft); border: 1px solid #cbdff0; border-radius: 6px; font-size: 12px; font-weight: 600; }
.table-foot { padding: 15px 22px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pagination button { font-size: 11px; padding: 8px 12px; }
.pagination button:disabled { cursor: default; }
.note { background: #edf5fc; border: 1px solid #d5e5f3; padding: 14px 18px; border-radius: 10px; font-size: 12px; color: #365b7d; line-height: 1.6; margin: 16px 0; }
.note.warning { background: #fff8e9; border-color: #f0e3bf; color: #8b702f; }
.timeclock-kiosk { display: grid; gap: 12px; }
.timeclock-kiosk h2, .timeclock-kiosk h3 { margin: 0; }
.timeclock-person { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid #cbdceb; border-radius: 9px; background: #f7fbff; }
.timeclock-person > div { display: grid; gap: 4px; }
.timeclock-person strong { color: var(--navy); }
.timeclock-person span:not(.pill) { color: var(--muted); font-size: 11px; }
.timeclock-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.timeclock-summary > div { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.timeclock-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.timeclock-summary strong { color: var(--navy); font-size: 16px; }
.timeclock-summary small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.timeclock-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.timeclock-events { display: grid; gap: 6px; margin: 0; padding-left: 22px; }
.timeclock-events li { padding-left: 4px; font-size: 12px; }
.timeclock-events time { margin-right: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 12px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
dialog { width: min(850px, calc(100% - 30px)); border: 1px solid var(--line); border-radius: 17px; padding: 0; color: #253b55; max-height: 92vh; box-shadow: 0 20px 80px #13325e33; }
dialog::backdrop { background: #13325e80; backdrop-filter: blur(3px); }
.modal-head { padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-head small { color: var(--muted); display: block; margin-top: 7px; }
.modal-head.has-header-content { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.modal-head.has-header-content .entrant-departments { justify-self: center; }
.modal-head.has-header-content > .close { justify-self: end; }
.modal-body { padding: 24px; }
.entrant-departments { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.entrant-departments button { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-blue); border-color: #9fc5e2; }
.entrant-departments button:hover { background: var(--brand-soft); }
.entrant-departments button[aria-pressed="true"] { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-foot .note { margin: 0 auto 0 0; }
.close { padding: 7px 11px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.full { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: 16px; }
legend { font-size: 12px; font-weight: 600; padding: 0 6px; }
.zone-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 230px; overflow-y: auto; }
.zone-directory { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.directory-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.directory-head h2 { margin: 0; }
.directory-head input { width: min(440px, 100%); }
.zone-card[hidden] { display: none; }
.zone-card { display: grid; align-content: start; gap: 3px; padding: 9px 12px; background: #edf5fc; border: 1px solid #d5e5f3; border-radius: 8px; color: #365b7d; font-size: 11px; }
.zone-card span { font-size: 10px; }
.schedule-grid { display: grid; gap: 10px; }
.schedule-row { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 12px; padding: 10px; background: #f6f9fd; border-radius: 8px; }
.schedule-row input:disabled { opacity: .5; cursor: not-allowed; }
.work-schedule { grid-column: 1 / -1; }
.work-schedule-grid { display: grid; gap: 8px; }
.work-schedule-row { display: grid; grid-template-columns: minmax(90px, 1fr) repeat(4, minmax(95px, 1fr)); align-items: end; gap: 8px; padding: 10px; background: #f6f9fd; border-radius: 8px; }
.work-schedule-row label { display: grid; gap: 5px; font-size: 10px; }
.work-schedule-row .checkbox-label { align-self: center; }
.work-schedule-row input:disabled { opacity: .5; cursor: not-allowed; }
.person-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.person-info > .person-zones { grid-column: 1 / -1; min-width: 0; }
.person-editor .person-zone-options { grid-template-columns: 1fr; gap: 8px; max-height: 150px; overflow-y: auto; }
.person-editor .zone-building { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.person-editor .zone-building > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; color: var(--navy); cursor: pointer; font-size: 12px; list-style-position: inside; }
.person-editor .zone-building > summary::marker { color: var(--brand-blue); }
.person-editor .zone-building > summary span { color: var(--muted); font-size: 10px; }
.person-editor .zone-building[open] > summary { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.person-editor .zone-building-options { display: grid; gap: 8px; padding: 10px 14px; }
.person-editor .zone-picker-dialog[open] { display: flex; flex-direction: column; width: min(760px, calc(100% - 30px)); max-height: 85vh; }
.person-editor .zone-picker-dialog .modal-head { flex-shrink: 0; }
.person-editor .zone-picker-dialog .modal-body { min-height: 0; overflow-y: auto; }
.person-editor .zone-picker-dialog .person-zone-options { max-height: none; overflow: visible; }
.person-editor .zone-picker-dialog .modal-foot { flex-shrink: 0; }
.person-editor .access-template-dialog[open] { display: flex; flex-direction: column; width: min(760px, calc(100% - 30px)); max-height: 85vh; }
.person-editor .access-template-dialog .modal-head,
.person-editor .access-template-dialog .modal-foot { flex-shrink: 0; }
.person-editor .access-template-dialog .modal-body { min-height: 0; overflow-y: auto; }
.person-editor .person-zones > button.access-template-trigger { margin-left: 8px; background: #7544a0; border-color: #7544a0; color: white; }
.person-editor .person-zones > button.access-template-trigger:hover { background: #5e3484; border-color: #5e3484; }
.access-template-note { max-width: 760px; margin: 8px 0; font-size: 11px; }
.access-template-disclaimer { padding: 12px; border: 1px solid #f0d9a9; border-radius: 8px; background: #fff9ec; color: #72531b; font-size: 12px; line-height: 1.5; }
.access-template-list { display: grid; gap: 12px; margin-top: 12px; }
.access-template-card { display: grid; gap: 10px; padding: 15px; border: 1px solid #d7e2ed; border-radius: 10px; background: #fbfdff; }
.access-template-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--navy); }
.access-template-card-head span { color: var(--muted); font-size: 11px; }
.access-template-card p { margin: 0; color: #365b7d; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.access-template-card button { justify-self: start; white-space: normal; }
.zone-selection-summary { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.person-editor .schedule-grid { gap: 5px; }
.person-editor .person-schedule { width: min(100%, 760px); }
.person-editor .person-schedule-column { display: grid; align-content: start; gap: 12px; width: min(100%, 760px); }
.person-editor .person-schedule-column .person-schedule { width: 100%; }
.person-editor .person-schedule-column .work-schedule { grid-column: 1 / -1; width: 100%; }
.person-editor .schedule-row { padding: 2px 8px; gap: 8px; }
.person-editor .schedule-row label { gap: 2px; font-size: 10px; }
.person-editor .schedule-row input[type="time"] { min-height: 32px; padding: 5px 8px; }
.person-editor .work-schedule-row { grid-template-columns: minmax(95px, .8fr) repeat(4, minmax(90px, 1fr)); padding: 6px; gap: 6px; }
.person-editor .work-schedule-row label { font-size: 10px; }
.person-editor .work-schedule-row input[type="time"] { min-height: 32px; padding: 5px 8px; }
.person-editor .entrant-nfc,
.person-editor .entrant-card-controls { width: min(100%, 760px); }
.person-editor form[data-entrant-section="rh"] .entrant-nfc,
.person-editor form[data-entrant-section="rh"] .entrant-card-controls,
.person-editor form[data-entrant-section="general"] .person-info,
.person-editor form[data-entrant-section="general"] .person-schedule,
.person-editor form[data-entrant-section="general"] .work-schedule { display: none; }
.person-editor form[data-entrant-section="general"] .person-layout { grid-template-columns: minmax(0, 1fr); }
.person-editor form[data-entrant-section="general"] .person-schedule-column { grid-column: 1; width: 100%; grid-template-columns: minmax(0, 1fr); }
.person-editor form[data-entrant-section="general"] .entrant-nfc,
.person-editor form[data-entrant-section="general"] .entrant-card-controls { justify-self: center; }
.entrant-wizard { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 0 auto 24px; padding: 10px; border: 1px solid #cbdff0; border-radius: 14px; background: linear-gradient(135deg, #fff, #eaf4fc); }
.entrant-wizard button { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-color: transparent; background: transparent; color: #71839a; }
.entrant-wizard button span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #c5d2df; border-radius: 50%; background: white; font-size: 11px; }
.entrant-wizard button[aria-current="step"] { background: #e5f2fc; color: var(--brand-hover); border-color: #a9cce7; }
.entrant-wizard button[aria-current="step"] span { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }
.entrant-wizard button:disabled { opacity: .55; cursor: not-allowed; }
.entrant-wizard-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; gap: 17px; min-width: 0; }
.entrant-review-panel { align-content: start; padding: 22px; border: 1px solid #cbdff0; border-radius: 12px; background: linear-gradient(135deg, white, #f0f8fe); }
.entrant-review-panel h3 { grid-column: 1 / -1; margin: 0; color: var(--navy); }
.entrant-review-panel > p, .entrant-review-panel > button, .entrant-review-panel > [data-entrant-review] { grid-column: 1 / -1; }
.entrant-review-panel > [data-entrant-review] dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.entrant-review-panel > [data-entrant-review] dl > div { padding: 12px; border: 1px solid #dce8f2; border-radius: 9px; background: white; }
.entrant-review-panel dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.entrant-review-panel dd { margin: 0; color: var(--navy); font-size: 12px; overflow-wrap: anywhere; }
.entrant-review-panel > button { justify-self: start; display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-hover); border-color: #a9cce7; }
.entrant-wizard-controls { display: flex; gap: 8px; margin-left: auto; }
.entrant-wizard-controls[hidden], .entrant-wizard-controls button[hidden] { display: none; }
.entrant-wizard-controls .primary { background: var(--brand-blue); border-color: var(--brand-blue); color: white; }
.person-editor form[data-entrant-section="general"] .entrant-wizard,
.person-editor form[data-entrant-section="general"] .entrant-wizard-controls { display: none; }
.person-editor form[data-entrant-section="rh"][data-wizard-step="1"] [data-wizard-panel]:not([data-wizard-panel="1"]),
.person-editor form[data-entrant-section="rh"][data-wizard-step="2"] [data-wizard-panel]:not([data-wizard-panel="2"]),
.person-editor form[data-entrant-section="rh"][data-wizard-step="3"] [data-wizard-panel]:not([data-wizard-panel="3"]) { display: none; }
.person-editor form[data-entrant-section="rh"][data-wizard-step="1"] .person-layout,
.person-editor form[data-entrant-section="rh"][data-wizard-step="3"] .person-layout { grid-template-columns: minmax(0, 1fr); }
.person-editor form[data-entrant-section="rh"][data-wizard-step="1"] .person-schedule-column,
.person-editor form[data-entrant-section="rh"][data-wizard-step="3"] .person-schedule-column { display: none; }
.person-editor form[data-entrant-section="rh"][data-wizard-step="3"] .person-info { grid-column: 1 / -1; }
.zone-search-label { margin-bottom: 18px; }
.zone-options .checkbox-label[hidden] { display: none; }
dialog.person-editor { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; overflow: hidden; }
.person-editor > form { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.person-editor .modal-head { background: linear-gradient(115deg, rgb(19 50 94 / 92%), rgb(0 100 170 / 84%)); color: white; flex-shrink: 0; padding: 12px 24px; border-bottom-color: rgb(255 255 255 / 24%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 8px 24px rgb(19 50 94 / 18%); backdrop-filter: blur(18px) saturate(155%); -webkit-backdrop-filter: blur(18px) saturate(155%); }
.person-editor .modal-head h2 { font-size: 17px; }
.person-editor .modal-head .close { background: transparent; color: white; border-color: #6082a9; }
.person-editor .modal-head.has-header-content { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.person-editor .entrant-departments { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px; border: 1px solid rgb(255 255 255 / 55%); border-radius: 16px; background: linear-gradient(135deg, rgb(255 255 255 / 36%), rgb(125 204 255 / 24%)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 50%), 0 5px 18px rgb(7 29 58 / 28%); backdrop-filter: blur(16px) saturate(175%); -webkit-backdrop-filter: blur(16px) saturate(175%); }
.person-editor .entrant-departments button { background: linear-gradient(135deg, rgb(255 255 255 / 22%), rgb(255 255 255 / 10%)); color: white; border-color: rgb(255 255 255 / 34%); text-shadow: 0 1px 3px rgb(7 29 58 / 38%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 32%); transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.person-editor .entrant-departments button:hover { background: linear-gradient(135deg, rgb(255 255 255 / 38%), rgb(125 204 255 / 28%)); color: white; transform: translateY(-1px); }
.person-editor .entrant-departments button[aria-pressed="true"] { background: linear-gradient(135deg, #fff 0%, #dff4ff 100%); color: #00518c; border-color: white; text-shadow: none; box-shadow: 0 3px 12px rgb(0 31 69 / 32%), inset 0 1px 0 white; }
.person-editor .entrant-departments button[aria-pressed="true"]:hover { background: linear-gradient(135deg, #fff 0%, #c9ecff 100%); color: #003f70; }
.person-editor .modal-body { flex: 1; min-height: 0; overflow-y: auto; background: #f3f6fa; }
.person-editor fieldset, .person-editor .person-info { background: white; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.person-editor .person-zones { background: linear-gradient(135deg, #edf7ff 0%, #f7fbff 58%, #e9f4fc 100%); border: 1px solid #b7d5ea; border-left: 5px solid var(--brand-blue); box-shadow: 0 5px 16px #13325e12; }
.person-editor .person-zones legend { color: var(--navy); font-size: 13px; font-weight: 700; }
.person-editor .person-zones > .muted { color: #526d87; }
.person-editor .person-zones > button[data-action="open-zone-picker"] { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 11px 16px; background: var(--brand-blue); border-color: var(--brand-blue); color: white; box-shadow: 0 3px 8px #0064aa30; }
.person-editor .person-zones > button[data-action="open-zone-picker"]:hover { background: var(--brand-hover); border-color: var(--brand-hover); transform: translateY(-1px); }
.person-editor .person-zones .zone-selection-summary { margin-top: 12px; padding: 10px 12px; border: 1px solid #c8deee; border-radius: 8px; background: #ffffffc9; color: #365b7d; }
.person-editor .person-info { align-content: start; }
.person-editor .modal-foot { background: none; border-top: none; flex-shrink: 0; padding: 10px 24px; }
.person-editor .note { background: none; border: none; padding: 0; margin: 0 auto 0 0; }
@media (min-width: 1400px) {
  .person-editor .modal-body { padding: 32px; }
  .person-editor .modal-head, .person-editor .modal-foot { padding-left: 32px; padding-right: 32px; }
  .person-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .person-editor .person-schedule-column { grid-column: 2; width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .person-editor .person-schedule-column .person-schedule { grid-column: 1; grid-row: 1; min-width: 0; }
  .person-editor .person-schedule-column .entrant-nfc { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; }
  .person-editor .person-schedule-column .entrant-card-controls { grid-column: 2; grid-row: 2; width: 100%; min-width: 0; }
  .person-editor form[data-entrant-section="general"] .person-schedule-column { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  .person-editor form[data-entrant-section="general"] .person-schedule-column .entrant-nfc,
  .person-editor form[data-entrant-section="general"] .person-schedule-column .entrant-card-controls { grid-column: 1; grid-row: auto; }
}
.checkbox-label { display: flex; align-items: center; gap: 9px; font-weight: 400; line-height: 1.5; }
.error { color: #aa3838; background: #fff1ee; padding: 12px; border-radius: 8px; font-size: 13px; }
.error:empty { display: none; }
.profile-top { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.profile-top h2 { margin: 0 0 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; margin: 20px 0; }
.detail-grid dt { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.detail-grid dd { font-size: 13px; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
@media screen {
  #detail-dialog { width: min(1400px, calc(100% - 64px)); max-width: none; max-height: calc(100dvh - 32px); overflow: hidden; }
  #detail-dialog[open] { display: flex; flex-direction: column; }
  #detail-dialog > .modal-head, #detail-dialog > .modal-foot { flex-shrink: 0; }
  #detail-dialog > .modal-head { padding: 12px 20px; }
  #detail-dialog > .modal-foot { padding: 10px 20px; }
  #detail-dialog > .modal-foot button { min-height: 40px; padding: 10px 16px; border-radius: 11px; font-size: 12px; font-weight: 600; letter-spacing: .1px; background: linear-gradient(180deg, #fff, #f2f6fc); border-color: #cbd9ea; box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgb(19 50 94 / 8%); transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
  #detail-dialog > .modal-foot button:hover:not(:disabled) { border-color: #8baacb; box-shadow: inset 0 1px 0 #fff, 0 4px 10px rgb(19 50 94 / 14%); }
  #detail-dialog > .modal-foot button[data-action="edit-person"],
  #detail-dialog > .modal-foot button.primary { color: white; border-color: #005c9e; background: linear-gradient(135deg, #087dbf, #00518e); box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 3px 8px rgb(0 100 170 / 20%); }
  #detail-dialog > .modal-foot button[data-action="edit-person"]:hover:not(:disabled),
  #detail-dialog > .modal-foot button.primary:hover:not(:disabled) { background: linear-gradient(135deg, #006eaf, #004477); border-color: #004477; box-shadow: 0 4px 12px rgb(0 100 170 / 28%); }
  #detail-dialog > .modal-foot button.danger { color: #a53535; border-color: #edc9c9; background: linear-gradient(180deg, #fffafa, #fff0f0); }
  #detail-dialog > .modal-foot button.danger:hover:not(:disabled) { background: linear-gradient(180deg, #fff1f1, #ffe4e4); border-color: #d98c8c; }
  #detail-dialog > .modal-foot button.danger[data-action="badge"] { color: white; border-color: #171717; background: linear-gradient(135deg, #303030, #111); box-shadow: inset 0 1px 0 rgb(255 255 255 / 15%), 0 3px 8px rgb(0 0 0 / 18%); }
  #detail-dialog > .modal-foot button.danger[data-action="badge"]:hover:not(:disabled) { background: linear-gradient(135deg, #202020, #000); border-color: #000; box-shadow: 0 4px 12px rgb(0 0 0 / 25%); }
  #detail-dialog > .modal-foot button:active:not(:disabled) { box-shadow: inset 0 2px 4px rgb(19 50 94 / 16%); }
  #detail-dialog > .modal-body { min-height: 0; overflow-y: auto; padding: 12px 20px; }
  #detail-dialog .profile-top { margin-bottom: 8px; }
  #detail-dialog .profile-top h2 { margin-bottom: 4px; }
  #detail-dialog .profile-top > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  #detail-dialog .badge-card, #detail-dialog .approval-grid { margin: 10px 0; }
  #detail-dialog .badge-card { padding: 10px 14px; }
  #detail-dialog .badge-card strong { margin: 4px 0; font-size: 17px; }
  #detail-dialog .detail-badge-row { margin: 8px 0 12px; gap: 10px; }
  #detail-dialog .detail-photo-card { padding: 0 10px; }
  #detail-dialog .employee-photo { height: 170px; max-width: 170px; }
  #detail-dialog .detail-schedules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
  #detail-dialog .note { margin: 0; padding: 8px 12px; font-size: 11px; }
  #detail-dialog .approval { padding: 10px 12px; }
  #detail-dialog h3 { margin-bottom: 8px; font-size: 12px; }
  #detail-dialog .approval p { margin: 4px 0; line-height: 1.4; }
  #detail-dialog .approval h3 { margin-bottom: 4px; }
  #detail-dialog .modal-body > p.muted { font-size: 11px; margin: 8px 0; }
  #detail-dialog .detail-grid dt { font-size: 10px; margin-bottom: 3px; }
  #detail-dialog .detail-grid dd { font-size: 12px; }
  #detail-dialog .detail-badge-row .badge-card { width: 100%; margin: 0; }
  #detail-dialog .detail-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }
  #detail-dialog .detail-badge-row .detail-grid { grid-column: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
  #detail-dialog .detail-grid > div { min-width: 0; padding: 8px 10px; background: #f6f9fd; border: 1px solid var(--line); border-radius: 10px; }
  #detail-dialog .profile-top > div, #detail-dialog .badge-card > div { min-width: 0; overflow-wrap: anywhere; }
}
.approval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.approval { border: 1px solid var(--line); padding: 16px; border-radius: 10px; }
.approval p { font-size: 12px; margin: 8px 0; color: var(--muted); }
.badge-card { padding: 19px; border-radius: 12px; background: linear-gradient(120deg, var(--navy), var(--brand-blue)); color: #f1f7ff; display: flex; justify-content: space-between; align-items: center; margin: 20px 0; gap: 16px; }
.badge-card strong { display: block; font-size: 19px; margin: 10px 0 5px; }
.badge-card small { font-size: 11px; color: #d5e6f8; }
.badge-card-identity { flex: 1; }
.detail-badge-row { display: grid; grid-template-columns: minmax(0, 850px) minmax(220px, 1fr); gap: 20px; align-items: stretch; margin: 16px 0; }
.detail-photo-card { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 12px 16px; border: none; border-radius: 12px; background: transparent; }
.detail-photo-card .employee-photo { width: 100%; max-width: 240px; height: 260px; object-fit: contain; border-radius: 10px; background: white; box-shadow: 0 3px 12px #13325e22; }
.detail-photo-card span { font-size: 12px; }
@media screen and (max-width: 1100px) {
  .detail-badge-row { grid-template-columns: minmax(0, 1fr) 280px; }
  .detail-photo-card { gap: 10px; padding: 12px; }
  #detail-dialog .detail-badge-row .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.badge-number { font-family: Consolas, monospace; font-size: 13px; letter-spacing: 1px; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.history li small { color: var(--muted); display: block; margin-top: 5px; }
.history li p { font-size: 11px; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 180px; overflow: auto; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.padded { padding: 23px; }
.stack { display: grid; gap: 16px; }
.result { border-radius: 10px; padding: 20px; margin-top: 20px; }
.result.allowed { background: #e5f5e9; color: #246f49; }
.result.denied { background: #fff0ed; color: #aa4941; }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-intro { background: linear-gradient(145deg, var(--navy) 30%, #004e87 100%); color: #f1f7ff; padding: 12%; display: flex; flex-direction: column; justify-content: center; }
.auth-intro h1 { color: white; font-size: 48px; line-height: 1.15; margin-top: 40px; }
.auth-intro p { color: #c8d9ec; max-width: 420px; }
.auth-intro .brand-mark { width: 90px; height: 90px; padding: 8px; border-radius: 18px; }
.auth-form { display: grid; place-items: center; padding: 35px; background: linear-gradient(rgba(5,10,25,.6), rgba(5,10,25,.6)), url('/auth-background.php') center/cover no-repeat; }
.auth-card { width: min(380px, 100%); background: rgba(255,255,255,.82); border-radius: 18px; padding: 32px; box-shadow: 0 20px 50px rgba(19,50,94,.18); backdrop-filter: blur(6px); }
.auth-card h2 { font-size: 26px; }
.auth-card form { display: grid; gap: 18px; margin-top: 25px; }
.auth-card .primary { margin-top: 8px; }
.auth-card .forgot-password { justify-self: end; margin-top: -10px; font-size: 13px; }
#toast { position: fixed; bottom: 25px; right: 25px; background: var(--navy); color: white; border-radius: 10px; padding: 15px 22px; z-index: 10; box-shadow: 0 6px 24px #13325e30; max-width: 420px; }
#toast:empty { display: none; }
#toast.nfc-prompt { top: 50%; left: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%); background: #e00000; padding: 24px 32px; width: max-content; max-width: calc(100% - 48px); text-align: center; font-size: 18px; font-weight: 600; box-shadow: 0 8px 32px #e0000040; }
#toast.nfc-error { top: 50%; left: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%); background: #000; padding: 24px 32px; width: min(560px, calc(100% - 48px)); max-width: none; text-align: center; font-size: 18px; line-height: 1.5; box-shadow: 0 8px 32px #0004; }
#toast.nfc-success { top: 50%; left: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%); margin: 0; border: 0; background: #00e676; color: #07351d; padding: 24px 32px; width: max-content; max-width: calc(100% - 48px); text-align: center; font-size: 18px; font-weight: 600; box-shadow: 0 8px 32px #00e67640; }
.home-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 2px solid #0b5b87; border-radius: 20px; background: linear-gradient(120deg, #102b50, #006fa5); color: white; animation: home-hero-arrive 1050ms cubic-bezier(.16,.8,.24,1) both; }
.home-hero::before { content: ''; grid-column: 2; grid-row: 1; align-self: stretch; min-height: 280px; background: white url('/home-background.php') center / contain no-repeat; animation: home-image-reveal 1600ms cubic-bezier(.16,.8,.24,1) both; }
.home-hero::after { content: ''; position: absolute; z-index: 0; top: -50%; bottom: -50%; left: -55%; width: 36%; pointer-events: none; transform: skewX(-22deg); background: linear-gradient(90deg, transparent, #ffffff26, transparent); animation: home-shine 1350ms 180ms ease-out both; }
.home-hero-content { grid-column: 1; grid-row: 1; min-width: 0; padding: 32px; position: relative; z-index: 1; overflow-wrap: anywhere; }
.home-hero-content > * { animation: home-content-arrive 650ms cubic-bezier(.18,.72,.22,1) both; }
.home-hero-content > *:nth-child(2) { animation-delay: 120ms; }
.home-hero-content > *:nth-child(3) { animation-delay: 240ms; }
.home-hero-content > *:nth-child(4) { animation-delay: 360ms; }
.home-eyebrow { color: #b9e8ff; font-size: 12px; font-weight: 600; letter-spacing: 2px; }
.home-hero h1 { color: white; font-size: 36px; margin: 18px 0; overflow-wrap: anywhere; }
.home-hero p { color: #dbeefa; line-height: 1.7; margin-bottom: 26px; }
.home-hero .actions button { display: flex; align-items: center; gap: 10px; }
.home-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0 32px; }
.home-summary > div { display: grid; gap: 5px; background: white; padding: 14px 20px; border: 1px solid var(--line); border-radius: 14px; animation: home-card-arrive 850ms cubic-bezier(.16,.8,.24,1) both; }
.home-summary > div:nth-child(1) { animation-delay: 260ms; }
.home-summary > div:nth-child(2) { animation-delay: 420ms; }
.home-summary > div:nth-child(3) { animation-delay: 580ms; }
.home-summary strong { font-size: 26px; color: var(--navy); }
.home-summary span { font-size: 12px; color: var(--muted); }
.attention-panel { margin: 0 0 32px; padding: 26px; border: 1px solid #cbd9e7; border-radius: 18px; background: linear-gradient(145deg, #f9fcff, #edf5fb); box-shadow: 0 12px 28px #15375b0d; }
.attention-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.attention-heading h2 { margin: 7px 0 5px; color: var(--navy); font-size: 25px; }
.attention-heading p { margin: 0; }
.attention-heading > button { display: flex; align-items: center; gap: 8px; }
.attention-heading > button .picto { width: 17px; height: 17px; }
.attention-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; align-items: stretch; margin-bottom: 24px; }
.attention-layout > .attention-panel { min-width: 0; margin: 0; padding: 20px; }
.attention-layout .attention-heading h2 { font-size: 20px; margin-top: 0; }
.attention-layout .attention-heading p { font-size: 11px; }
.attention-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.attention-layout .home-commands { min-width: 0; padding: 20px; border: 1px solid #ddd2ef; border-radius: 18px; background: #f3edfc; box-shadow: 0 12px 28px #15375b0d; }
.attention-layout .home-commands h2 { margin-bottom: 6px; }
.attention-layout .home-commands > p { margin: 0 0 12px; font-size: 11px; }
.attention-group { min-width: 0; padding: 16px; border: 1px solid #dbe5ee; border-top: 4px solid #2876a7; border-radius: 12px; background: white; }
.attention-entries { border-top-color: #bb7a17; }
.attention-expiries { border-top-color: #bd3438; }
.attention-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.attention-group h3 { margin: 0 0 5px; color: var(--navy); font-size: 14px; }
.attention-group-head p { margin: 0; color: var(--muted); font-size: 11px; }
.attention-count { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: #e8f2f9; color: #195d86; font-size: 13px; font-weight: 700; }
.attention-entries .attention-count { background: #fff3db; color: #88590d; }
.attention-expiries .attention-count { background: #ffeded; color: #a1262b; }
.attention-group ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.attention-person { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-color: #edf1f5; background: #fbfdff; text-align: left; white-space: normal; }
.attention-person:hover { border-color: #a8c6dd; background: #f1f8fd; }
.attention-person > span:first-child { display: grid; min-width: 0; gap: 4px; }
.attention-person strong { overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attention-person small { color: var(--muted); font-size: 10px; }
.attention-person > span:last-child { color: var(--brand-blue); font-size: 18px; }
.attention-more { margin-top: 10px; font-size: 11px; }
.attention-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border: 1px dashed #b9d4c4; border-radius: 12px; background: #f4fbf6; text-align: center; }
.attention-check { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #d9f2e2; color: #247548; font-size: 21px; font-weight: 700; }
.attention-empty strong { color: #225d3b; }
.attention-empty p { margin: 0; color: var(--muted); font-size: 12px; }
.home-command-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.home-command { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: start; align-items: center; gap: 5px 10px; padding: 12px 14px; text-align: left; border-radius: 11px; white-space: normal; animation: home-card-arrive 850ms cubic-bezier(.16,.8,.24,1) both; transition: transform 240ms ease, box-shadow 240ms ease; }
.home-command:nth-child(1) { animation-delay: 700ms; }
.home-command:nth-child(2) { animation-delay: 850ms; }
.home-command:nth-child(3) { animation-delay: 1000ms; }
.home-command:nth-child(4) { animation-delay: 1150ms; }
.home-command:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 16px 34px #13325e24; }
.home-command .picto { width: 24px; height: 24px; color: var(--brand-blue); }
.home-command strong { font-size: 14px; overflow-wrap: anywhere; }
.home-command span { grid-column: 2; font-size: 11px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
@keyframes home-hero-arrive { from { opacity: 0; transform: translateY(42px) scale(.955); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes home-content-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes home-card-arrive { from { opacity: 0; transform: translateY(38px) scale(.93); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes home-image-reveal { from { opacity: 0; transform: translateX(70px) scale(1.04); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes home-shine { from { left: -55%; } to { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .sidebar button { transition: none; transform: none !important; }
  #detail-dialog > .modal-foot button { transition: none; }
  .home-hero, .home-hero::before, .home-hero::after, .home-hero-content > *, .home-summary > div, .home-command { animation: none; }
  .home-command { transition: none; }
}
.opening-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px 24px; background: radial-gradient(ellipse at 50% 0, #eaf4fc, transparent 65%), #fff; text-align: center; }
.opening-heading { animation: opening-reveal 800ms ease both; }
.opening-eyebrow { color: var(--brand-blue); font-size: 11px; letter-spacing: 2.5px; font-weight: 700; }
.opening-heading h1 { margin: 12px 0 8px; font-size: clamp(26px, 4vw, 40px); color: var(--navy); letter-spacing: -.8px; }
.opening-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.opening-art { display: block; width: min(900px, 100%); max-height: 58vh; margin: 24px 0; background: white; border-radius: 24px; }
.opening-routes path { stroke-dasharray: 1; animation: opening-route 4200ms cubic-bezier(.4, 0, .2, 1) both; }
.opening-routes path:nth-child(2) { animation-delay: 350ms; }
.opening-routes path:nth-child(3) { animation-delay: 800ms; }
.opening-routes path:nth-child(4) { animation-delay: 1100ms; }
.opening-piece { transform-box: fill-box; transform-origin: center; animation: opening-reveal 1500ms cubic-bezier(.16, 1, .3, 1) both; }
.opening-logo { animation-delay: 300ms; }
.opening-citalis, .opening-bus { animation-delay: 1000ms; }
.opening-velo, .opening-cable { animation-delay: 1600ms; }
.opening-parking, .opening-meter { animation-delay: 2200ms; }
.opening-cityker, .opening-ocean, .opening-bike { animation-delay: 2800ms; }
@keyframes opening-route { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes opening-reveal { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .opening-heading, .opening-piece, .opening-routes path { animation: none; }
}
.loading { padding: 50px; }
@media (max-width: 1100px) {
  .attention-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .content { padding: 0 20px; }
  .stats { gap: 10px; }
  td, th { padding-left: 12px; padding-right: 12px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-hero::before { grid-column: 1; grid-row: 2; min-height: 220px; }
}
@media (min-width: 761px) and (max-height: 800px) {
  .sidebar { padding: 12px 14px; }
  .sidebar .brand { padding-bottom: 10px; }
  .nav { gap: 3px; }
  .nav button { padding-top: 4px; padding-bottom: 4px; }
  .sidebar-bottom { padding-top: 10px; }
}
@media (min-width: 761px) and (max-height: 640px) {
  .shell { display: block; height: auto; }
  .sidebar { position: static; height: auto; }
  .nav { display: flex; flex-wrap: wrap; }
  .sidebar-bottom { margin-top: 12px; }
  .sidebar-bottom button { width: auto; margin: 0 0 0 12px; }
  .sidebar-bottom strong { display: inline; margin-right: 8px; }
  .content, #page-content { height: auto; overflow: visible; }
}
@media (min-width: 761px) {
  .person-editor form[data-entrant-section="rh"] .person-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
  .person-editor form[data-entrant-section="rh"] .person-info { grid-column: 1; }
  .person-editor form[data-entrant-section="rh"] .person-schedule-column { grid-column: 2; width: 100%; grid-template-columns: minmax(0, 1fr); }
  .person-editor form[data-entrant-section="rh"] .person-schedule-column .person-schedule { grid-column: 1; grid-row: auto; }
}
@media (max-width: 760px) {
  .site-footer { align-items: flex-start; padding: 16px; gap: 12px; }
  .footer-content { display: grid; gap: 6px; }
  .footer-content > small::before { content: none; }
  .footer-contact { flex-direction: column; align-items: flex-start; gap: 5px; }
  .footer-separator { display: none; }
  html, body { height: auto; }
  .shell { display: block; height: auto; overflow: visible; }
  .sidebar { position: static; height: auto; padding: 15px; overflow: visible; }
  .content { height: auto; overflow: visible; }
  #page-content { overflow: visible; }
  .brand, .sidebar .brand { padding-bottom: 10px; }
  .nav { display: flex; flex-wrap: wrap; }
  .nav button { padding: 8px; font-size: 11px; }
  .nav-label { display: none; }
  .sidebar-bottom { margin-top: 12px; }
  .sidebar-bottom button { width: auto; margin: 8px 0 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .filters { flex-wrap: wrap; }
  .filters select { flex: 1; }
  .form-grid, .zone-options, .split, .approval-grid { grid-template-columns: 1fr; }
  .schedule-row { grid-template-columns: 1fr 1fr; }
  .schedule-row > .checkbox-label { grid-column: 1 / -1; }
  .work-schedule-row { grid-template-columns: 1fr 1fr; }
  .work-schedule-row > .checkbox-label { grid-column: 1 / -1; }
  .timeclock-summary { grid-template-columns: 1fr; }
  .timeclock-person { align-items: flex-start; flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-intro { padding: 30px; }
  .auth-intro h1 { font-size: 30px; margin-top: 10px; }
  .auth-intro .brand { padding-bottom: 10px; }
  .auth-intro .brand-mark { width: 54px; height: 54px; padding: 5px; border-radius: 12px; }
  h1 { font-size: 25px; }
}
@media print {
  #service-dialog { display: none !important; }
  #card-dialog { display: none !important; }
  body > #app, .site-footer, #toast, #editor-dialog, .close, .modal-foot, .approval button { display: none !important; }
  #detail-dialog[open] { display: block; position: static; width: 100%; max-height: none; border: 0; box-shadow: none; overflow: visible; }
  dialog::backdrop { background: none; }
  .badge-card { background: white; color: black; border: 1px solid black; }
  .badge-card small { color: #444; }
  .history { display: none; }
  body.printing-card #detail-dialog { display: none !important; }
  body.printing-card #card-dialog[open] { display: block !important; position: static; width: 85.6mm; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  body.printing-card #card-dialog > .modal-head, body.printing-card .card-controls, body.printing-card #card-dialog p.muted { display: none !important; }
  body.printing-card #card-dialog > .modal-body, body.printing-card .card-preview { padding: 0; }
  body.printing-card .employee-card { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; break-inside: avoid; }
}
