/* Composition: layout primitives. Utilities: flow, cluster, muted, sr-only.
   Blocks: header, schedule, activity, account. Exceptions: data / state classes. */
:root{color-scheme:light;--navy:#153555;--blue:#4d7fb4;--ink:#20394f;--muted:#596e80;--line:#dbe4ed;--paper:#fff;--canvas:#eef3f8;--soft:#f6f9fc;--radius:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;color:var(--ink);background:var(--canvas)}
*{box-sizing:border-box}body{margin:0;border-top:5px solid var(--navy);padding:32px clamp(16px,3vw,48px)}h1,h2,h3,p{margin:0}h1{font-size:clamp(1.65rem,3vw,2.35rem);font-weight:650;letter-spacing:-.035em;line-height:1.2}h2{font-size:1.3rem;font-weight:650;letter-spacing:-.02em}h3{font-size:1.15rem}p{line-height:1.6}a{color:#235b93;text-underline-offset:4px}a:hover{color:var(--navy)}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}input,select{width:100%;min-height:46px;max-width:100%;border:1px solid #aebfce;border-radius:6px;padding:10px 12px;background:white;color:var(--ink)}input::placeholder{color:#65798a}select{appearance:none;padding-right:38px;background-image:linear-gradient(45deg,transparent 50%,var(--navy) 50%),linear-gradient(135deg,var(--navy) 50%,transparent 50%);background-position:calc(100% - 19px) 20px,calc(100% - 14px) 20px;background-size:5px 5px;background-repeat:no-repeat}label{display:grid;gap:7px;font-size:.875rem;font-weight:600}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.table-wrap:focus-visible{outline:3px solid #669bd1;outline-offset:3px}.flow>*+*{margin-top:14px}.cluster{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.muted,.field-help{color:var(--muted)}.field-help{font-size:.875rem;line-height:1.5}.eyebrow{font-size:.8rem;letter-spacing:.12em;font-weight:700;text-transform:uppercase;color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip-link{position:absolute;top:-80px;background:white;padding:12px;z-index:10}.skip-link:focus{top:12px}.site-header,main,.site-footer{max-width:1600px;margin-inline:auto}.site-header{justify-content:space-between;gap:24px;margin-bottom:28px}.site-header .eyebrow{margin-bottom:8px}.site-header img{width:260px;height:auto;max-width:45%}.site-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;font-size:.8rem;color:var(--muted);padding:24px 0;line-height:1.6}.site-footer span{max-width:70ch}.account-nav{justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.account-nav a{font-size:.875rem}.account-nav a[aria-current]{font-weight:700;color:var(--navy)}form{margin:0}.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 18px;border:1px solid var(--navy);border-radius:6px;color:white;background:var(--navy);font-size:.875rem;font-weight:600;text-decoration:none;line-height:1.5}.button:hover{background:#254f78;color:white}.button--quiet{background:transparent;color:var(--navy);border-color:#aebfce}.button--quiet:hover{background:#e3edf6;color:var(--navy)}.button--danger{background:#962f34;border-color:#962f34}.danger-link{color:#932f35}.page-intro{padding:28px 0 22px}.page-intro h2{margin:8px 0;font-size:1.7rem}.overview-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(250px,1fr);gap:20px;margin-bottom:24px}.next-activity{padding:24px 28px;border-radius:var(--radius);background:#e1ecf7;border:1px solid #c5d8eb;border-left:4px solid #5083b6}.next-activity h2{font-size:1.6rem;line-height:1.35;max-width:44ch}.next-activity .muted{font-size:.875rem}.schedule-context{border:1px solid var(--line);border-radius:var(--radius);padding:24px;background:var(--paper)}.activity-total{font-size:1rem}.activity-total strong{font-size:2.5rem;line-height:1;font-weight:650;letter-spacing:-.04em;margin-right:6px}.schedule-context .muted{font-size:.875rem}.badge{display:inline-flex;align-items:center;padding:4px 9px;border-radius:4px;background:#e8eef5;color:#304c66;font-size:.875rem;font-weight:600;line-height:1.5}.badge--complete{background:#e0eee7;color:#24543e}.badge--warning{background:#fbe8c9;color:#794d13}.schedule-panel,.form-card,.accounts-panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:0 3px 12px #15355504}.filters{padding:22px 24px;align-items:end;border-bottom:1px solid var(--line)}.filters label:first-child{flex:1 1 300px}.filters label{flex:0 1 260px}.reset-link{padding:12px 0;font-size:.875rem;font-weight:600}.results-heading{padding:18px 24px;justify-content:space-between;background:var(--soft);border-bottom:1px solid var(--line)}.results-heading h2{font-size:1rem}.results-heading p{font-size:.875rem;color:var(--muted)}.table-wrap{overflow:auto;max-height:75vh}table{border-collapse:separate;border-spacing:0;width:100%;font-size:.875rem;text-align:left}th,td{padding:16px;border-bottom:1px solid #e3eaf1;vertical-align:top}th{position:sticky;top:0;background:#eaf0f6;color:var(--navy);font-weight:650;white-space:nowrap;z-index:1}td{min-width:105px;line-height:1.5}td strong,td small{display:block}td strong{font-weight:550}td small{font-size:.875rem;color:var(--muted);margin-top:5px}td .badge{display:table;margin-bottom:6px}td[data-label="Order / item"],td[data-label="Order details"]{min-width:260px;max-width:420px}td[data-label="Planned quantity"],td[data-label="Planned hours"]{font-variant-numeric:tabular-nums}tbody tr:hover{background:#f5f9fd}.is-overdue{background:#fff8eb}.schedule-footnote{padding:16px 24px;color:var(--muted);font-size:.8rem;border-top:1px solid var(--line)}.empty-state{padding:48px 24px;text-align:center}.empty-state p{max-width:55ch;margin-inline:auto;color:var(--muted)}.empty-state .button{margin-top:18px}.admin-grid{display:grid;grid-template-columns:minmax(290px,420px) minmax(0,1fr);gap:24px;align-items:start}.form-card{padding:24px}.stacked-form{display:grid;gap:18px}.stacked-form .field-help{margin-top:-10px}.account-list{list-style:none;padding:0;margin:0}.account-list li{padding:22px 24px;border-bottom:1px solid var(--line)}.account-list li:last-child{border-bottom:0}.account-identity{justify-content:space-between;overflow-wrap:anywhere}.account-list .muted{font-size:.875rem}.account-list a{font-size:.875rem}.auth-card{max-width:480px;padding:32px;background:white;border:1px solid var(--line);border-radius:var(--radius);margin:40px auto}.auth-card .stacked-form{margin-top:24px}.auth-card .button{width:100%}.notice{padding:16px 20px;border:1px solid #c2dacd;background:#e8f3ed;border-radius:8px;margin-bottom:20px}
@media(max-width:900px){.overview-grid,.admin-grid{grid-template-columns:1fr}.schedule-context{display:none}.site-header img{width:220px}.filters label{flex:1 1 240px}}
@media(max-width:640px){body{padding:20px 14px}.site-header{align-items:flex-start;flex-direction:column;gap:16px}.site-header img{max-width:100%;width:220px}.account-nav{align-items:flex-start}.account-nav>.cluster{gap:14px}.account-nav .button{min-height:40px;padding:7px 12px}.page-intro{padding:24px 0 18px}.next-activity{padding:20px}.next-activity h2{font-size:1.35rem}.filters{padding:18px;gap:14px}.filters label,.filters .button{flex:1 1 100%;width:100%}.results-heading{padding:16px 18px;gap:8px}.table-wrap{max-height:none;overflow:visible}.schedule-table,.schedule-table tbody,.schedule-table tr,.schedule-table td{display:block}.schedule-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.schedule-table tr{padding:14px 18px;border-bottom:1px solid var(--line)}.schedule-table td{border:0;min-width:0!important;max-width:none!important;padding:7px 0;display:grid;grid-template-columns:105px minmax(0,1fr);gap:12px;overflow-wrap:anywhere}.schedule-table td::before{content:attr(data-label);font-size:.8rem;color:var(--muted);font-weight:500}.schedule-table td small,.schedule-table td .badge+ .badge{grid-column:2}.schedule-table td strong{font-weight:600}.schedule-footnote{padding:16px 18px}.form-card,.account-list li{padding:20px}.auth-card{padding:24px;margin:28px auto}.site-footer{padding-top:20px}.site-footer span{max-width:100%}}
@media(prefers-reduced-motion:no-preference){.button{transition:background-color .15s ease}}

.admin-status{border-left:1px solid #aebfce;padding-left:16px;color:var(--muted);font-size:.875rem;font-weight:400;white-space:nowrap;cursor:default}
.freshness{padding:14px 18px;margin-top:20px;border:1px solid #cad9e6;border-radius:8px;background:#e8f0f8;font-size:.875rem}.freshness p{margin-top:4px;color:var(--muted)}.freshness--stale,.freshness--unknown{background:#fff4e2;border-color:#e5c995}.freshness--stale strong,.freshness--unknown strong{color:#794d13}

.schedule-date-time{display:block}
@media(max-width:640px){.schedule-table td .schedule-date-time{grid-column:2;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}.schedule-table td .schedule-date-time small{margin-top:0}}

@media(max-width:640px){
 .site-header{align-items:center;text-align:center;gap:14px;margin-bottom:22px}
 .site-header>img{order:-1;width:200px;max-width:70%}
 .site-header>div{width:100%}
 .account-nav{gap:8px;padding:12px 0}
 .account-nav>.cluster{width:100%;gap:8px;justify-content:center}
 .account-nav>.cluster:first-child>a{flex:1;display:flex;align-items:center;justify-content:center;min-height:40px;padding:8px 10px;text-decoration:none;border:1px solid var(--line);border-radius:6px;background:var(--paper);text-align:center}
 .account-nav>.cluster:first-child>a[aria-current="page"]{background:var(--navy);border-color:var(--navy);color:var(--paper)}
 .account-nav .admin-status{flex-basis:100%;border:0;padding:2px 0 4px;text-align:center;font-size:.8rem}
 .account-nav>.cluster:last-child>a,.account-nav>.cluster:last-child>form{flex:1;text-align:center}
 .account-nav>.cluster:last-child>a{padding:8px 0;min-height:40px}
 .account-nav>.cluster:last-child>form .button{width:100%}
}

.account-menu>summary{display:none}
.account-menu>summary:focus-visible{outline:3px solid #669bd1;outline-offset:3px}
@media(max-width:640px){
 /* Avoid small inherited label text triggering focus zoom; preserve pinch zoom. */
 input,select,textarea{font-size:max(1rem,16px)}
 .account-menu{margin:0 0 8px}
 .account-menu>summary{display:flex;align-items:center;gap:12px;min-height:46px;padding:10px 14px;list-style:none;cursor:pointer;border:1px solid #b8c9d9;border-radius:8px;background:var(--paper);font-size:1rem;font-weight:600}
 .account-menu>summary::-webkit-details-marker{display:none}
 .menu-page{margin-left:auto;color:var(--muted);font-size:.875rem;font-weight:400}
 .account-menu>summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin:0 3px 4px}
 .account-menu[open]>summary::after{transform:rotate(225deg);margin-bottom:-4px}
 .account-menu .account-nav{margin-top:8px;padding:12px;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 14px #15355508;gap:10px}
 .account-menu .account-nav>.cluster:first-child{flex-direction:column;align-items:stretch;gap:6px}
 .account-menu .account-nav>.cluster:first-child>a{flex:none;justify-content:flex-start;text-align:left;border-color:transparent}
 .account-menu .account-nav{flex-direction:column;align-items:stretch}
 .account-menu .account-nav>.cluster:first-child,.account-menu .account-nav>.cluster:last-child{display:contents}
 .account-menu .account-nav::before{content:"";order:1;border-top:1px solid var(--line)}
 .account-menu .account-nav .admin-status{display:none}
 .account-menu .account-nav>.cluster:last-child>a{order:3;flex:none;text-align:left;padding:10px}
 .account-menu .account-nav>.cluster:last-child>form{order:4;flex:none;text-align:left}
 .account-menu .account-nav>.cluster:last-child>form .button{width:100%;text-align:left}
}
@media(min-width:641px){.account-menu:not([open])>summary{display:list-item;cursor:pointer;padding:12px 0}}
.stock-table td[data-label="Product"]{min-width:240px;max-width:400px}
.stock-table td[data-label="In stock"],.stock-table td[data-label="Allocated"]{font-variant-numeric:tabular-nums}
.stock-table td[data-label="Expiry comments"]{min-width:220px;max-width:360px;white-space:pre-wrap;overflow-wrap:anywhere}
