/* Shared portal layout: workspace and Django administration. */
:root{--portal-bg:#f4f6f4;--portal-surface:#fff;--portal-text:#23372f;--portal-muted:#63736b;--portal-border:#d7dfd9;--portal-accent:#285b45;--portal-gap:16px;--portal-radius:7px;--portal-control:44px}
body{background:var(--portal-bg);color:var(--portal-text);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}
.portal-header,.portal-header *{box-sizing:border-box}
.portal-header{flex-shrink:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px;background:#244c40;color:#fff;padding:8px 24px;min-height:64px}
.portal-header a{color:#fff;text-decoration:none}
.portal-brand{font-size:21px;font-weight:700;letter-spacing:-.5px;white-space:nowrap}
.portal-environment{display:inline-block;font-size:10px;letter-spacing:1px;margin-left:8px;border:1px solid #95b4a4;border-radius:4px;padding:3px 6px;vertical-align:middle}
.portal-nav{display:flex;align-items:center;justify-content:center;gap:18px;min-width:0;overflow:auto;scrollbar-width:thin}
.portal-nav a{display:flex;align-items:center;flex:none;min-height:44px;border-bottom:2px solid transparent;font-size:13px;font-weight:550;white-space:nowrap}
.portal-nav a[aria-current="page"]{border-color:#d3e8da;font-weight:700}
.portal-account{display:flex;align-items:center;gap:12px;min-width:0;font-size:12px}
.portal-account>span{max-width:100px;overflow-wrap:anywhere}.portal-account form{margin:0;padding:0}
.portal-account a{min-height:44px;display:flex;align-items:center}
.portal-account button{font:inherit;font-weight:600;min-height:36px;border:1px solid #8caa9b;border-radius:6px;padding:5px 10px;color:#fff;background:transparent;cursor:pointer}
.portal-account button:hover{background:#335f50}
.portal-header a:focus-visible,.portal-header button:focus-visible{outline:3px solid #e7bb65;outline-offset:2px}
main#main,.worksheet-compact main#main{padding:20px 24px 40px;max-width:2000px;margin:0 auto;width:100%;min-width:0}
.page-heading,.compact-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin:0 0 16px}
.page-heading>div{min-width:0}.page-heading .eyebrow{display:none}
h1,.compact-heading h1{font-size:24px;font-weight:650;line-height:1.3;letter-spacing:-.5px;margin:0}
.page-heading p.muted{margin:4px 0 0;font-size:13px;max-width:850px}
.page-heading>.button{margin:0}
h2{font-size:18px;line-height:1.4}
.branch-tabs,.worksheet-compact .branch-tabs{margin:0 0 16px;gap:4px;min-width:0}
.branch-tabs a,.worksheet-compact .branch-tabs a{padding:10px 16px;min-height:44px;font-size:14px}
.sheet-context,.worksheet-compact .sheet-context{display:flex;align-items:center;flex-direction:row;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin:0 0 16px;padding:12px 16px;border:1px solid var(--portal-border);border-radius:var(--portal-radius);background:var(--portal-surface)}
.sheet-context h2,.worksheet-compact .sheet-context h2{font-size:18px;overflow-wrap:anywhere}
.sheet-context>div:first-child,.worksheet-compact .sheet-context>div:first-child{flex:1;min-width:160px;max-width:none;margin-right:auto}
.sheet-context .muted,.worksheet-compact .sheet-context .muted{font-size:12px;margin:3px 0 0}
.date-picker{margin:0;min-width:0;max-width:100%}
.date-picker label,.worksheet-compact .date-picker label{position:static;width:auto;height:auto;padding:0;margin:0 0 4px;overflow:visible;clip:auto;white-space:normal;font-size:12px;color:var(--portal-muted)}
.date-picker>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.date-picker input,.worksheet-compact .date-picker input{width:155px;min-width:0;min-height:44px}
.worksheet-actions,.worksheet-actions .employee-create-link{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.worksheet-actions button,.worksheet-actions .button{min-height:44px;font-size:13px}
button,.button,input,select,textarea{border-radius:6px}
button,.button,input:not([type=checkbox]):not([type=hidden]),select{min-height:44px}
select,textarea{font:inherit;border:1px solid #b9c8bf;padding:9px 12px;background:#fff;color:var(--portal-text);max-width:100%}
.table-toolbar,.worksheet-compact .table-toolbar{padding:10px 16px;min-height:44px;gap:10px}
.data-table,.audit-table{font-size:14px;font-variant-numeric:tabular-nums}
.data-table th,.data-table td{padding:10px 12px}.data-table .input-cell{padding:5px}
.table-scroll{min-width:0;max-width:100%;overscroll-behavior-x:contain}
.archive-table{border-top:0;max-height:none}.archive-table tbody th{min-width:160px}.archive-table td{min-width:160px}
.monthly-plan-note{background:#fffaf0;padding:10px 16px;margin:0 0 16px;font-size:13px;border-color:#e7dab1}
.calculation-help,.import-instructions{max-width:none;padding:12px 16px;background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:var(--portal-radius);margin:16px 0 0;font-size:13px;color:var(--portal-muted)}
.calculation-help summary,.import-instructions summary{cursor:pointer;color:var(--portal-accent);min-height:24px}
.import-instructions{margin:0 0 16px}.import-instructions p{margin:12px 0 0}
.employee-create-panel,.import-panel{max-width:950px;padding:20px;border-radius:var(--portal-radius)}
.employee-create-panel>p:first-child{font-size:13px;color:var(--portal-muted)}
.employee-create-field{margin-top:16px}.employee-date-fields{gap:16px}
.employee-create-actions,.import-confirm,.sheet-actions{border-top:1px solid var(--portal-border);padding-top:16px;margin-top:16px}
.finance-dialog{border-radius:var(--portal-radius)}
.audit-event{padding:16px;margin:0 0 16px;border-color:var(--portal-border);border-radius:var(--portal-radius)}
.audit-event>p{font-size:13px;color:var(--portal-muted);margin:6px 0 12px}
.audit-event .table-scroll{border:0;border-radius:0}.audit-table th,.audit-table td{border-color:var(--portal-border)}
.audit-table thead th{background:#e9efeb;font-size:12px}.audit-table tbody th{font-weight:550}
.empty{max-width:none;padding:24px;border-radius:var(--portal-radius)}
.pagination,.history-pages{display:flex;align-items:center;gap:16px;margin:16px 0;flex-wrap:wrap}
.messages p{margin-bottom:16px}.login-panel .eyebrow{display:none}
/* Administration uses the same header, canvas, controls and table surfaces. */
#container{min-width:0}#main{min-width:0}.main.shifted{margin-left:0}
#content{box-sizing:border-box;width:100%;max-width:2000px;padding:20px 24px 40px;margin:0 auto;min-width:0}
#content h1{font-size:24px;line-height:1.3;margin:0 0 16px;color:var(--portal-text)}
#content h2{font-size:18px}.colMS{margin-right:0}#content-main{min-width:0}
div.breadcrumbs{background:transparent;color:var(--portal-muted);padding:12px 24px 0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
div.breadcrumbs a{color:var(--portal-accent)}
.module{background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:var(--portal-radius);margin-bottom:16px}
.module h2,.module caption,.inline-group h2{background:#e9efeb;color:var(--portal-text);padding:10px 16px;font-size:14px!important;font-weight:650}
.module h2 a,.module caption a{color:var(--portal-accent)!important}
#changelist table thead th{background:#e9efeb;color:var(--portal-text)}
#changelist table th,#changelist table td{padding:10px 12px;font-size:14px;vertical-align:middle}
#changelist .results{overflow:auto;max-width:100%}#changelist #toolbar{padding:12px 16px;border-bottom:1px solid var(--portal-border);background:#fff}
#changelist-filter{border-left:1px solid var(--portal-border);background:#f7f9f7}#changelist-filter h2{border-radius:0}
.object-tools{margin-top:0;display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.object-tools li{height:auto;float:none;padding:0;margin:0}.object-tools a:link,.object-tools a:visited{display:inline-flex;align-items:center;background:var(--portal-accent);border:1px solid var(--portal-accent);border-radius:6px;min-height:44px;padding:0 16px;font-size:13px;font-weight:600;text-transform:none;box-sizing:border-box}
.object-tools a:hover{background:#1b4131}
.change-form .object-tools{float:none;justify-content:flex-end;margin-top:0}
.form-row{padding:16px}.aligned label{font-size:13px;color:var(--portal-text)}
.submit-row{padding:16px;background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:var(--portal-radius);display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.submit-row input,.submit-row a.deletelink{margin:0;min-height:44px;box-sizing:border-box;border-radius:6px}.submit-row a.deletelink{display:inline-flex;align-items:center;height:auto;padding:10px 16px}
.submit-row p.deletelink-box{margin-left:auto}
.dashboard #content{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:0 24px}
.dashboard #content>h1{grid-column:1/-1}.dashboard #content-main{float:none;width:100%}.dashboard #content-related{width:auto;margin:0;position:static}
.dashboard .module table{width:100%}.dashboard .module th{width:auto}
#content a:focus-visible,#content input:focus-visible,#content select:focus-visible,#content summary:focus-visible{outline:3px solid #bd7d19;outline-offset:3px}
@media(max-width:1200px){.portal-header{grid-template-columns:1fr auto;gap:0 16px}.portal-nav{grid-column:1/-1;grid-row:2;justify-content:flex-start}.portal-account{justify-self:end}.worksheet-actions{width:100%}}
@media(max-width:900px){.dashboard #content{grid-template-columns:1fr}.dashboard #content-related{margin-top:16px}.sheet-context,.worksheet-compact .sheet-context{align-items:flex-start}.sheet-context>.date-picker{margin-left:auto}}
@media(max-width:700px){.portal-header{padding:8px 14px}.portal-brand{font-size:20px}.portal-environment{margin-left:4px}.portal-account{gap:8px}.portal-account>span{max-width:65px}.portal-account>a{display:none}.portal-nav{gap:18px}.portal-nav a{font-size:13px}
main#main,.worksheet-compact main#main,#content{padding:16px 14px 32px}div.breadcrumbs{padding:10px 14px 0}
h1,.compact-heading h1,#content h1{font-size:22px}.page-heading,.compact-heading{gap:8px;margin-bottom:16px}.page-heading>.button{width:100%}
.branch-tabs a,.worksheet-compact .branch-tabs a{padding:10px 12px}.sheet-context,.worksheet-compact .sheet-context{padding:12px;gap:12px}.sheet-context>div:first-child,.worksheet-compact .sheet-context>div:first-child{width:100%;flex-basis:100%}
.date-picker,.worksheet-compact .date-picker{width:100%;margin:0}.date-picker>div{gap:6px}.date-picker input,.worksheet-compact .date-picker input{flex:1;width:145px}.worksheet-actions{gap:8px}.worksheet-actions button,.worksheet-actions .button{font-size:13px;padding:9px 12px}.worksheet-actions .employee-create-link{gap:8px}
.table-toolbar{flex-wrap:wrap}.table-toolbar>span{font-size:12px}.table-scroll{max-height:65vh}.summary-scroll,.archive-table{max-height:none}
.import-panel,.employee-create-panel{padding:16px}.employee-date-fields{grid-template-columns:1fr;gap:0}.audit-heading{flex-direction:column;gap:4px}.audit-event{padding:12px}.audit-table{min-width:460px}
#changelist{min-width:0}.object-tools{float:none;margin:0 0 12px}.submit-row{align-items:stretch}.submit-row input,.submit-row a.deletelink{width:100%;white-space:normal}.submit-row p.deletelink-box{margin:0;width:100%}
.aligned .form-row>div{max-width:100%}.related-widget-wrapper{max-width:100%;flex-wrap:wrap}.aligned input[type=text],.aligned input[type=email],.aligned input[type=password],.aligned textarea{max-width:100%;box-sizing:border-box}
.calculation-help,.import-instructions{padding:12px}.history-pages{justify-content:space-between}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#content .module h2,#content .inline-group h2{background:#e9efeb;color:var(--portal-text);font-size:14px;padding:10px 16px}
.sheet-date-label{display:flex;flex-direction:column;gap:2px;min-width:120px;font-variant-numeric:tabular-nums}.sheet-date-label>strong{font-size:16px}.sheet-context .sheet-date-label{flex:none!important;min-width:120px!important;margin:0!important}.portal-nav{gap:14px}.portal-nav a{font-size:13px}
@media(max-width:1350px){.portal-header{grid-template-columns:1fr auto;gap:0 16px}.portal-nav{grid-column:1/-1;grid-row:2;justify-content:flex-start}.portal-account{justify-self:end}}

.orthodontics-panel{margin:20px 0 0;max-width:1100px}.orthodontics-scroll{border-top:1px solid var(--portal-border);border-radius:7px;max-height:none}.orthodontics-table thead th{background:#fff0d8}.orthodontics-table .calculated{background:#ffe3af}.orthodontics-table .errorlist{color:var(--error);font-size:12px;white-space:normal;padding-left:18px}.worksheet-compact .orthodontics-table td{min-width:125px}
@media(max-width:700px){.orthodontics-panel{order:2}.worksheet-compact .refusals-panel{order:3}.worksheet-compact .sheet-actions{order:4}}

.roster-tabs{display:flex;gap:4px;border-bottom:1px solid var(--portal-border);margin-top:16px;overflow-x:auto}.roster-tabs [role=tab]{flex:1;white-space:nowrap;min-height:44px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;padding:10px 12px;font-size:14px;color:var(--portal-muted)}.roster-tabs [aria-selected=true]{border-bottom-color:var(--portal-accent);color:var(--portal-accent);font-weight:700;background:#edf4ef}.roster-tabs span{margin-left:8px;border-radius:4px;padding:0 6px;background:#e7eee9;font-size:12px}.participants-dialog #roster-options .participants-list{margin-top:12px;min-height:60px}.participants-dialog [data-roster-no-results]{font-size:13px;padding:8px 0;margin:0 0 12px}
@media(max-width:500px){.roster-tabs [role=tab]{padding:10px 8px;font-size:13px}.roster-tabs span{margin-left:5px}}
@media(max-width:500px){.roster-tabs [role=tab]{white-space:normal;min-width:0;flex:1 1 0;line-height:1.3}.roster-tabs span{flex:none}}
