:root{font-family:system-ui,-apple-system,sans-serif;color:#243c37;background:#f5f5ed;font-size:16px;--green:#275c52;--line:#dae2dc}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%;width:100%;max-width:100%;overflow-x:hidden}body{margin:0;width:100%;max-width:100%;overflow-x:hidden}header{background:var(--green);color:white;padding:26px max(20px,calc((100vw - 980px)/2));display:flex;justify-content:space-between;align-items:center}header small{letter-spacing:.15em;font-size:.7rem;color:#d6e4cf}h1{font-size:clamp(1.4rem,5vw,2rem);margin:6px 0}h1 span{color:#edcf79}h2{font-size:1.25rem;margin:0 0 12px}h3{font-size:1.05rem}main{max-width:980px;margin:auto;padding:18px 18px 70px}button,.file{border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--green);padding:12px 16px;font:inherit;font-weight:650;cursor:pointer;min-height:44px}button:disabled{opacity:.5;cursor:wait}button:hover{background:#edf3e8}.primary,nav .active{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#1e493f}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #e6b94e;outline-offset:3px}.card{background:white;border:1px solid var(--line);border-radius:20px;padding:22px;margin:18px 0}.toolbar,.monthbar{display:flex;align-items:center;justify-content:space-between;gap:14px}.monthbar{margin:22px 0}.monthbar h2{margin:0;text-transform:capitalize}nav{display:flex;gap:8px}nav button{flex:1}.muted{color:#60756d;font-size:.9rem;line-height:1.5}.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.8rem;margin-bottom:18px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.weekday{text-align:center;font-size:.8rem;color:#60756d;padding:8px}.date{--day-bg:#fff;display:flex;flex-direction:column;align-items:start;gap:5px;min-height:94px;padding:10px;font-weight:500;background:var(--day-bg)}.date b{font-size:1rem}.date small{font-size:.7rem}.date.planned{--day-bg:#edf4ec}.date.done{--day-bg:#d5eadf}.date.cancelled{--day-bg:#f7d6d6;color:#7a3f3f}.date.unavailable{--day-bg:#fce7dd;color:#884c36}.date.partial-not-needed-morning,.date.partial-not-needed-afternoon{background:var(--day-bg)}.date.today{box-shadow:inset 0 0 0 2px var(--green)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.stat{background:white;border:1px solid var(--line);border-radius:16px;padding:20px}.stat strong{display:block;font-size:1.6rem;margin-top:10px}.row{display:flex;gap:12px;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line)}.row small{display:block;color:#60756d;margin-top:5px}label{display:block;font-size:.9rem;font-weight:650;margin:15px 0}input,textarea,select{width:100%;padding:12px;border:1px solid #bfcfc4;border-radius:10px;font:inherit;color:#243c37;background:white;margin-top:6px}textarea{resize:vertical}form>button{margin:8px 8px 4px 0}hr{border:0;border-top:1px solid var(--line);margin:24px 0}dialog{border:0;border-radius:22px;padding:24px;max-width:600px;width:calc(100% - 24px);max-height:92dvh}dialog::backdrop{background:#1b393970}.turn{border:1px solid var(--line);padding:16px;border-radius:14px;margin:12px 0}.times{display:grid;grid-template-columns:1fr 1fr;gap:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#213f36;color:white;border-radius:14px;padding:15px 22px;z-index:5;max-width:90vw}#status{font-size:.85rem;color:#60756d}.file{display:block;text-align:center}.file input{margin-top:12px}[hidden]{display:none!important}#import-preview{line-height:1.7}.bad{color:#943e2a}@media(max-width:540px){.calendar{gap:4px}.date{min-height:78px;padding:7px 4px;border-radius:9px}.date small{font-size:.62rem}.stats{grid-template-columns:1fr}.stat{display:flex;justify-content:space-between;align-items:center}.stat strong{margin:0}.card{padding:18px}.legend{gap:10px}header{padding:20px}main{padding:14px 12px 60px}dialog{padding:18px}}

.info-row{display:flex;flex-wrap:wrap;gap:8px 16px;padding:12px 0;border-bottom:1px solid var(--line);line-height:1.5}.info-row strong{min-width:90px}.info-row span{flex:1;min-width:110px}.info-day{padding:12px 0;border-bottom:1px solid var(--line);line-height:1.45}.info-day>strong{display:block;margin-bottom:4px}.info-slot{display:flex;gap:10px}.info-slot span{min-width:64px;opacity:.7}.info-slot b{font-weight:600}.info-day p{margin:4px 0 0;opacity:.85}nav{flex-wrap:wrap}nav button{min-width:90px}
#ana-alerts{background:#fff1e6;border-color:#ddb58e}#day-summary{white-space:pre-wrap}

.calendar-turn{display:flex;flex-direction:column;gap:2px;line-height:1.4;width:100%;font-weight:600}.calendar-turn.turn-unavailable{background:#f7d6d6;color:#7a3f3f;margin-left:-4px;margin-right:-4px;padding:5px 4px;border-radius:8px;width:calc(100% + 8px)}.calendar-hours{margin-top:auto;font-weight:700;color:var(--green)}.date{gap:7px;min-height:124px}#upcoming .row{align-items:center;line-height:1.6}@media(max-width:540px){.date{min-height:124px}.calendar-turn span{overflow-wrap:normal}.calendar-hours{font-size:.7rem}}

#calendar-closures h3{margin-top:0}#closure-list{margin-top:1rem}.calendar-reason{overflow-wrap:anywhere;color:#675b4a}

.calendar-turn.turn-not-needed{background:#f7d6d6;color:#7a3f3f;margin-left:-4px;margin-right:-4px;padding:5px 4px;border-radius:8px;width:calc(100% + 8px)}

.header-actions{display:flex;gap:8px;align-items:center}.header-actions button[hidden]{display:none}#theme-toggle{min-width:44px;padding:12px}
:root[data-theme=dark]{color-scheme:dark;color:#e3ece6;background:#101a17;--green:#4d9a88;--line:#2c4039}
[data-theme=dark] header{background:#1b3a33}[data-theme=dark] header small{color:#a9c3b5}[data-theme=dark] h1 span{color:#edcf79}
[data-theme=dark] button,[data-theme=dark] .file,[data-theme=dark] .card,[data-theme=dark] .stat,[data-theme=dark] dialog,[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select{background:#182822;color:#e3ece6}
[data-theme=dark] button,[data-theme=dark] .file{color:#9fd3c2}[data-theme=dark] button:hover{background:#21382f}
[data-theme=dark] .primary,[data-theme=dark] nav .active{background:#2f7566;color:#fff;border-color:#2f7566}[data-theme=dark] .primary:hover{background:#3a8878}
[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select{border-color:#3b5148}
[data-theme=dark] .muted,[data-theme=dark] .weekday,[data-theme=dark] .row small,[data-theme=dark] #status{color:#97aea4}
[data-theme=dark] .date{--day-bg:#182822}[data-theme=dark] .date.planned{--day-bg:#1f352c}[data-theme=dark] .date.done{--day-bg:#25483a}
[data-theme=dark] .date.cancelled{--day-bg:#4a2a2a;color:#f0b8b8}[data-theme=dark] .date.unavailable{--day-bg:#4a3426;color:#f0c4ab}
[data-theme=dark] .calendar-turn.turn-unavailable,[data-theme=dark] .calendar-turn.turn-not-needed{background:#4a2a2a;color:#f0b8b8}
[data-theme=dark] .calendar-hours{color:#9fd3c2}[data-theme=dark] .calendar-reason{color:#c9bba5}
[data-theme=dark] #ana-alerts{background:#3a2b1e;border-color:#6b4f35}[data-theme=dark] .bad{color:#f0a08c}
[data-theme=dark] dialog::backdrop{background:#000a}[data-theme=dark] #toast{background:#2a4a40}

.day-error{background:#fff0ec;border:1px solid #c56b58;border-radius:10px;color:#8d2f23;font-weight:600;line-height:1.45;padding:12px 14px;margin:12px 0}
[data-theme=dark] .day-error{background:#482920;color:#ffdfd6;border-color:#cd8273}
.toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
@media(max-width:540px){#app>.toolbar{flex-wrap:wrap}.toolbar-actions{margin-left:auto}.toolbar-actions button{padding:10px 12px}}

.notification-count{display:inline-block;background:#b64236;color:#fff;border-radius:99px;font-size:.75rem;min-width:22px;padding:2px 6px;text-align:center}
#notification-panel h3{margin:0}
.notification-row{padding:12px 0;border-top:1px solid var(--line)}
.notification-row.unread{border-left:3px solid #b64236;padding-left:12px}
.notification-row:first-child{margin-top:12px}
.notification-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:.85rem}
.notification-meta time{color:#60756d}
.notification-row p{margin:8px 0 4px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
[data-theme=dark] .notification-meta time{color:#a5bdb3}

/* Compact, native mobile-friendly section dropdown (replaces the five nav buttons). */
.section-nav{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:12px 0 4px;flex-wrap:nowrap}
.section-nav label{margin:0;flex:none;color:#60756d;font-size:.9rem}
.section-nav select{width:min(100%,280px);max-width:calc(100% - 75px);margin:0;font-weight:700;border-radius:12px;min-height:46px;padding:10px 14px;cursor:pointer;border:1px solid var(--line)}
[data-theme=dark] .section-nav label{color:#97aea4}
@media(max-width:540px){.section-nav{justify-content:space-between;margin:8px 0 2px}.section-nav select{flex:1;max-width:none}}

/* Compact header menu; its solid top safe area matches the header on iPhone. */
:root{--header-background:#275c52;--page-background:#f5f5ed}
:root[data-theme=dark]{--header-background:#1b3a33;--page-background:#101a17}
html{background:var(--header-background)}
body{background:var(--page-background);min-height:100dvh}
header,[data-theme=dark] header{position:relative;z-index:10;background:var(--header-background)}
header h1{margin:0}
.header-actions{margin-left:auto}
.toolbar-only-actions{justify-content:flex-end}
.app-menu{position:relative}
.app-menu summary{display:flex;align-items:center;justify-content:center;gap:8px;list-style:none;cursor:pointer;min-height:44px;padding:9px 14px;border:1px solid #ffffff65;border-radius:12px;color:#fff;font-weight:650;user-select:none}
.app-menu summary::-webkit-details-marker{display:none}
.app-menu summary:focus-visible{outline:3px solid #e6b94e;outline-offset:3px}
.app-menu[open] summary{background:#ffffff20}
.app-menu-panel{position:absolute;right:0;top:calc(100% + 9px);width:min(290px,calc(100vw - 24px));padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff;color:#243c37;box-shadow:0 12px 35px #14271f38;z-index:20}
.menu-sections{display:grid;gap:3px}
.menu-sections button{display:block;width:100%;min-height:42px;padding:10px 12px;text-align:left;border-color:transparent;background:transparent;border-radius:9px}
.menu-sections button.active{background:#e5f0e8;color:#1d5144}
.menu-theme{margin:10px 0 0;padding:12px 2px 0;border-top:1px solid var(--line);font-size:.85rem}
.menu-theme select{margin-top:7px;min-height:44px;font-weight:600}
#logout{display:block;width:100%;margin-top:9px;padding:12px;text-align:left;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;color:inherit}
[data-theme=dark] .app-menu-panel{background:#182822;color:#e3ece6}
[data-theme=dark] .menu-sections button.active{background:#25483a;color:#b7e5d5}
[data-theme=dark] #logout{background:transparent;color:#e3ece6}
@media(max-width:540px){header{gap:10px;padding-top:calc(20px + env(safe-area-inset-top,0px));padding-left:16px;padding-right:16px}header h1{font-size:clamp(1.15rem,5vw,1.5rem)}.app-menu summary{padding:9px 12px}}
