/* Presentation only. Keep every value, permission and native table available. */
body{font-family:"Segoe UI",Arial,sans-serif;line-height:1.55;text-size-adjust:100%;-webkit-text-size-adjust:100%}
*,*::before,*::after{box-sizing:border-box}
.app-shell,#main,.login-shell,.login-form,.device-card,.annual-panel,.year-month,.panel-head,.year-selector{min-width:0}
#main{padding:clamp(14px,1.65vw,30px);padding-bottom:100px}
.page-heading,.report-hero{padding:clamp(16px,1.5vw,24px);margin-bottom:16px}
.page-heading h1,.report-hero h1{font-size:clamp(24px,1.8vw,32px);line-height:1.3;letter-spacing:-.6px}
.page-heading p,.report-hero p{max-width:80ch;margin-top:8px}
.eyebrow{font-size:11px;letter-spacing:.13em;line-height:1.5}
.btn{font-size:14px;min-height:44px;line-height:1.45;max-width:100%}
.btn .icon{width:17px;height:17px;flex:none}
.btn.small{font-size:13px;min-height:38px}
.actions,.row-actions{gap:8px}.row-actions{display:flex;flex-wrap:wrap;align-items:center}
.panel,.table-panel,.filters,.report-tabs{border-radius:16px}
.filters{gap:12px;padding:14px 16px;margin-bottom:16px;align-items:flex-end}
.filter-field{flex:1 1 175px;min-width:0;max-width:100%}
.filter-field label,.form-grid label,.detail-grid small{font-size:13px;line-height:1.5;letter-spacing:0;color:#526b73}
input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{min-width:0;max-width:100%;font:inherit;font-size:16px}
/* Desktop month input: reserve room for the full native month/year and calendar.
   The old 144px width was sized for 11px text, but shared forms now use 16px.
   Keep browser zoom and the native keyboard/picker; mobile has its own label. */
@media(min-width:761px){
 #main .month-picker{flex:0 0 auto;gap:8px;padding-inline:12px}
 #main .month-picker input[type=month]{font-size:clamp(14px,.25vw + 12px,16px);width:13.5em;min-width:13.5em;flex:none;height:42px;padding-inline:4px}
 .page-heading .actions>.btn{font-size:clamp(13px,.15vw + 11px,14px)}
 .page-heading{flex-wrap:wrap}
 .page-heading>div:first-child{flex:1 1 240px}
 .page-heading .actions{flex:0 1 auto;flex-wrap:wrap;max-width:100%}
}
.searchable-select-input{font-size:16px}.searchable-select-list button{font-size:14px;line-height:1.5;min-height:40px}
.report-tabs{padding:16px}.report-tab-grid{gap:8px}.report-tab{min-height:46px;font-size:13px;padding:10px}
.report-toolbar{padding:16px}.report-toolbar-groups{gap:16px}.report-action-label{font-size:12px;letter-spacing:.06em}
.table-head{padding:16px 18px;gap:8px 16px}.table-head h3{font-size:16px;line-height:1.5}
.table-head small{font-size:12px;line-height:1.5}.table-head h3>span{margin-left:6px;vertical-align:middle}
.table-wrap table{font-size:14px;line-height:1.5;table-layout:auto}
.table-wrap th{padding:11px 14px;font-size:13px;line-height:1.45;color:#36545d;background:#f1f6f5}
.table-wrap td{padding:11px 14px;line-height:1.55;vertical-align:middle}
.table-wrap th.column-id,.table-wrap td.column-id{min-width:54px;max-width:100px;width:1%;white-space:nowrap;font-variant-numeric:tabular-nums}
.table-wrap td.column-id{font-weight:650;color:#315e59}
.table-wrap .column-person{min-width:190px;max-width:320px}
.table-wrap td.column-date{white-space:nowrap;min-width:112px;font-variant-numeric:tabular-nums}
.table-wrap .column-actions{min-width:124px}.table-wrap .number{display:inline-block;white-space:nowrap;font-variant-numeric:tabular-nums}
.table-wrap td:has(>.number){text-align:right}.table-wrap .person{min-width:0;max-width:270px}
.table-wrap .person strong{font-size:14px;line-height:1.5}.table-wrap .person small{font-size:12px;line-height:1.5;margin-top:2px}
.table-wrap .cell-person{gap:10px;min-width:0}.table-wrap .badge{font-size:12px;padding:4px 8px}
.table-wrap .btn{font-size:13px;min-height:38px;padding:7px 11px}
.pagination{padding:14px 16px;gap:10px;line-height:1.5}
.nav-link{font-size:14px;line-height:1.5;padding:10px 12px}.nav-sub{font-size:13px;padding-left:16px}
.nav-label{font-size:11px;letter-spacing:.1em}.workspace-label strong{font-size:13px}.workspace-label small{font-size:11px}
.topbar{padding-inline:clamp(14px,1.65vw,30px)}.breadcrumb{font-size:14px;line-height:1.5}
.modal-header{gap:14px;align-items:flex-start}.modal-header .icon-btn{flex:none}
.modal-header h2{line-height:1.4}#modal-body{padding:clamp(14px,2vw,28px)}
.form-grid,.detail-grid{gap:18px 22px}.field-help{font-size:12px;line-height:1.6}
.form-actions{gap:10px}.detail-grid strong{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.annual-totals small,.month-numbers small{font-size:13px}.year-note,.annual-heading p{font-size:13px;line-height:1.6}
.month-numbers{grid-template-columns:repeat(2,minmax(0,1fr))}.year-month .actions>.btn{flex:1 1 125px}
.year-selector{flex-wrap:wrap;max-width:100%}.year-selector select{max-width:100%;min-width:0}
.device-card .btn{white-space:normal;overflow-wrap:anywhere}.device-entry{padding:14px}
.login-shell{min-width:0;max-width:100%}.login-form label,.login-form small,.login-form p{overflow-wrap:anywhere}
.login-form input:not([type=checkbox]):not([type=radio]){width:100%;min-width:0}.login-form form .btn{gap:8px}
/* Checkboxes must never inherit a full-width text input's dimensions. */
.check-field{min-width:0;gap:10px;min-height:44px}
.check-field input[type=checkbox],.check-field input[type=radio]{flex:0 0 20px;width:20px;height:20px;min-width:20px;max-width:20px;min-height:20px;max-height:20px;padding:0;margin:0;align-self:center;accent-color:var(--teal)}
.check-field>label{flex:1 1 0;min-width:0;max-width:100%;margin:0;padding-block:10px;line-height:1.5;white-space:normal;word-break:normal;overflow-wrap:break-word;cursor:pointer}
.login-form .check-field{align-items:flex-start;gap:10px}
.login-form .check-field>label{font-size:14px;color:#405e66}
.login-form .check-field input[type=checkbox]{margin-top:11px;align-self:flex-start}
.login-form .trust-help{font-size:12px;line-height:1.6;margin-top:-8px}
.login-page{padding:clamp(12px,2.5vw,40px);min-height:100dvh}
.login-shell{width:min(1080px,100%);padding:0;min-height:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.login-story.custom-template .branch-panel-image{max-height:min(760px,calc(100dvh - 80px))}
.login-form{padding:clamp(24px,3vw,44px)}
.login-form h2{font-size:clamp(24px,2.2vw,32px);line-height:1.3;letter-spacing:-.5px;margin:12px 0}
.login-form>p{font-size:14px;line-height:1.65;margin-bottom:22px}
.login-form form{gap:16px}.login-form form>label{font-size:13px;line-height:1.5}
.login-form input:not([type=checkbox]):not([type=radio]){height:48px;font-size:16px}
.login-form .btn{font-size:14px;min-height:46px;white-space:normal;overflow-wrap:break-word}
.login-form .pwa-install{margin-top:8px}
.login-support{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:18px}
.login-support p{flex:1 1 220px;min-width:0;font-size:13px;line-height:1.6;margin:0}
.login-support .pwa-install{flex:0 1 auto;max-width:100%;margin:0}
/* Desktop zoom reduces height too: fit the ordinary login without clipping
   longer errors/activation forms, which must still be allowed to scroll. */
@media(min-width:761px) and (max-height:800px){
 .login-page{padding:12px}
 .login-shell{width:min(1120px,100%)}
 .login-form{padding:18px 24px}
 .login-form h2{font-size:24px;line-height:1.25;margin:8px 0}
 .login-form .eyebrow{font-size:10px;letter-spacing:.08em;line-height:1.5}
 .login-form>p{font-size:13px;line-height:1.5;margin-bottom:12px}
 .login-form form{gap:10px}
 .login-form input:not([type=checkbox]):not([type=radio]){height:44px}
 .login-form form .btn{margin-top:0;min-height:44px}
 .login-form .trust-help{margin-top:-4px;line-height:1.5}
 .login-support{margin-top:12px;gap:8px}
 .login-support p{flex-basis:240px;font-size:12px}
 .login-support .pwa-install{font-size:12px;min-height:40px;padding:8px 10px}
 .login-story.custom-template .branch-panel-image{max-height:calc(100dvh - 24px)}
}
@media(max-width:760px){
 .filter-field{flex-basis:calc(50% - 12px)}
 .topbar-left,.topbar-right{min-width:0}.topbar-left{flex-wrap:wrap}
 .table-wrap th,.table-wrap td{padding:10px 12px}
 .page-heading,.report-hero,.report-tabs,.report-toolbar,.annual-panel{padding:16px}
 .form-grid,.detail-grid{gap:16px}.btn.small,.table-wrap .btn{min-height:44px}
 .login-shell{grid-template-columns:minmax(0,1fr);max-width:500px}
 .login-story.custom-template{height:clamp(120px,21dvh,180px);padding:8px}
 .login-story.custom-template .branch-panel-image{max-height:100%}
 .login-form{padding:24px}.device-page{align-items:start}
}
@media(max-width:420px){
 #main{padding-inline:10px}.filters{padding:12px;gap:12px}.filter-field{flex-basis:100%}
 .page-heading,.report-hero,.report-tabs,.report-toolbar,.annual-panel{padding:14px}
 .report-tab-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .table-head{padding:14px}.pagination{padding:12px}.pagination .actions{flex-wrap:wrap}
 .year-selector{width:100%}.year-selector>*{min-width:0;max-width:100%}
 .device-card{padding:18px}.login-page{padding:10px}.login-form{padding:20px 16px}
}
@media(max-width:300px){
 #main{padding-inline:8px}.topbar{padding:10px;gap:10px}
 .topbar-left,.topbar-right{flex:1 1 100%;width:100%}.topbar-right{justify-content:flex-end;flex-wrap:wrap}
 .breadcrumb{max-width:100%;white-space:normal}.breadcrumb span{margin-inline:5px}
 .page-heading,.report-hero,.report-tabs,.report-toolbar,.filters,.annual-panel{padding:10px}
 .report-tab-grid,.mini-metrics,.month-numbers,.annual-totals{grid-template-columns:minmax(0,1fr)}
 .year-month{padding:12px}.year-selector{display:grid;grid-template-columns:minmax(0,1fr)}
 .page-heading h1,.report-hero h1,.login-form h2{font-size:23px}
 .btn{min-width:0;overflow-wrap:anywhere;padding-inline:9px}
 .actions:not(.row-actions)>.btn{flex-basis:100%}
 .modal-header,#modal-body{padding:10px}.modal-header{gap:8px}.modal-header h2{font-size:20px}
 .device-page,.login-page{padding:8px}.device-card,.login-form{padding:12px}.login-shell{border-radius:16px}
 .device-fields,.form-grid,.detail-grid{grid-template-columns:minmax(0,1fr)}
 .login-form .check-field{align-items:flex-start}.login-form .check-field label{min-width:0}
 .login-form .eyebrow{font-size:10px;letter-spacing:.06em}
 .login-form .check-field>label{font-size:13px}
 .assistant-panel header,.assistant-controls{flex-wrap:wrap;gap:6px}.assistant-panel header>div{min-width:0;flex-wrap:wrap}
 .assistant-message>span{display:none}.assistant-message>div{max-width:100%}
 .assistant-panel header,.assistant-messages,.assistant-form{padding:10px}
}
/* Narrow table/dialog: keep the primary arrows and full-width drag track on
   one line. Home/End on the slider still reach the first/last columns. */
.table-navigator-small .table-navigator-edge{display:none}
@media print{#main{padding-bottom:0}}
/* Keep the accessible label inside its own permission cell and make the
   checkbox label reachable on touch screens; no permission logic changes. */
.permission-toggle{position:relative;min-width:44px;min-height:44px}
/* Employee Master actions: compact row, readable shared web/native dialog.
   Keep whole labels and existing touch targets, never hide table columns. */
.employee-actions-compact{display:block;margin-top:8px}
#main .employee-actions-compact .employee-actions-trigger{min-height:48px;white-space:normal}
.employee-menu-identity{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--border)}
.employee-menu-identity .person{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.employee-menu-identity p{margin:8px 0 0;color:var(--muted);overflow-wrap:anywhere}
.employee-action-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#modal-body .employee-action-choice{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;max-width:100%;min-height:48px;height:auto;padding:12px;text-align:left;white-space:normal}
.employee-action-choice>.icon{flex:none;width:20px;height:20px}
.employee-action-choice>span:first-of-type{flex:1;min-width:0;overflow-wrap:anywhere}
.employee-action-choice>span:last-child{flex:none}
.employee-action-choice strong,.employee-action-choice small{display:block;line-height:1.45}
.employee-action-choice small{margin-top:4px;font-size:.8125rem;font-weight:400;color:var(--muted)}
#modal-body .employee-departure-choice{grid-column:1/-1;margin-top:6px}
.employee-rule-details{display:grid;gap:14px;min-width:0}
.employee-rule-section{padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface,#fff);min-width:0}
.employee-rule-section h3{margin:0 0 12px;font-size:1rem;line-height:1.45;overflow-wrap:anywhere}
.employee-rule-section .field-help{margin:12px 0 0;line-height:1.6}
.employee-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0}
.employee-rule-grid>div{min-width:0;overflow-wrap:anywhere}
.employee-rule-grid dt{font-size:.8125rem;color:var(--muted);line-height:1.5}
.employee-rule-grid dd{margin:4px 0 0;font-size:.875rem;font-weight:600;line-height:1.5}
.employee-rule-line{display:grid;gap:3px;min-width:10rem;max-width:20rem;white-space:normal;overflow-wrap:anywhere;margin-bottom:7px}
.employee-rule-line:last-child{margin-bottom:0}
.employee-rule-line span{color:var(--muted)}
@media(max-width:600px){.employee-action-menu,.employee-rule-grid{grid-template-columns:minmax(0,1fr)}.employee-rule-section{padding:12px}}
