:root{font-family:Inter,"Noto Sans TC","Microsoft JhengHei",sans-serif;color:#292a30;background:#faf5ec;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit}.shell{min-height:100vh;display:grid;grid-template-columns:246px 1fr}.side{background:#30343b;color:#eaebec;padding:26px 16px;display:flex;flex-direction:column;gap:26px}.brand{display:flex;align-items:center;gap:12px;padding:4px 10px}.brand img{width:37px;height:37px}.brand strong{font-size:18px;letter-spacing:.04em}.brand small{display:block;color:#b1b4b7;font-size:12px;margin-top:2px}.nav{display:grid;gap:5px}.nav button{border:0;background:none;color:#cdcfd1;text-align:left;border-radius:10px;padding:12px 14px;font-size:14px}.nav button.active,.nav button:hover{background:#69452f;color:white}.nav button span{display:inline-block;width:25px}.side-foot{margin-top:auto;padding:12px 10px;font-size:13px;color:#c2c4c7}.side-foot button{display:block;color:#eaebec;background:none;border:0;padding:10px 0}.main{padding:28px clamp(20px,3.2vw,54px) 48px;min-width:0}.top{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:26px}.eyebrow{color:#a27639;font-size:12px;letter-spacing:.14em;font-weight:700;text-transform:uppercase}.top h1{font-size:30px;margin:7px 0 4px;letter-spacing:-.04em}.muted{color:#797d81;font-size:13px}.top-actions{display:flex;gap:8px;align-items:center}.button{border:1px solid #ced0d2;border-radius:10px;background:white;padding:10px 15px;color:#243343;font-weight:650;font-size:13px}.button.primary{background:#30343b;border-color:#30343b;color:white}.button.warn{background:#ad6d34;border-color:#ad6d34;color:white}.button.ghost{background:transparent}.button.small{padding:7px 10px;font-size:12px}.grid{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(285px,.8fr);gap:18px}.card{background:#fff;border:1px solid #e5e6e7;border-radius:18px;box-shadow:0 4px 20px #3a3c3e0a;overflow:hidden}.card-pad{padding:22px}.card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.card h2{font-size:18px;letter-spacing:-.02em;margin:0}.card h3{font-size:15px;margin:0 0 14px}.pill{border-radius:100px;font-size:11px;padding:5px 10px;background:#ebecec;color:#354c63;font-weight:700}.pill.draft{background:#f7ead9;color:#9c6f3c}.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.stat{border-radius:14px;background:#eeeff0;padding:15px 17px}.stat span{font-size:11px;color:#6d7074}.stat strong{display:block;font-size:25px;margin-top:3px}.calendar-controls{display:flex;align-items:center;gap:12px}.calendar-controls strong{font-size:17px;white-space:nowrap}.calendar-controls button{border:1px solid #e3e4e5;background:white;width:29px;height:29px;border-radius:8px;color:#54585b}.week,.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.week{border-block:1px solid #ecedee;color:#909498;font-size:12px;text-align:center;padding:12px 0}.week .red{color:#ba655d}.day{min-height:95px;border:0;border-right:1px solid #ecedee;border-bottom:1px solid #ecedee;background:white;text-align:left;padding:9px;display:flex;flex-direction:column;gap:6px;transition:background .15s}.day:nth-child(7n){border-right:0}.day:hover,.day.selected{background:#f2f2f3}.day.other{background:#fafaf8;color:#c1c3c6}.day-num{font-size:12px;font-weight:700}.day.weekend .day-num{color:#ba655d}.day .chip{display:block;width:100%;border-radius:5px;padding:4px 5px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#eff0f0;color:#525557}.chip.rest,.chip.annual{background:#f9ece3;color:#a66a43}.chip.work{background:#e9eaeb;color:#515456}.chip.early,.chip.late{background:#eaf0fa;color:#506f9e}.chip.conflict{background:#fbe2df;color:#b33f3a}.list{display:grid;gap:11px}.list-item{display:flex;align-items:flex-start;gap:11px;border-bottom:1px solid #edeeee;padding-bottom:11px;font-size:13px;line-height:1.5}.list-item:last-child{border-bottom:0;padding-bottom:0}.dot{width:8px;height:8px;border-radius:50%;background:#c8a06a;flex:none;margin-top:5px}.note{color:#8f9397;font-size:12px;line-height:1.6}.field{display:grid;gap:7px;margin-bottom:14px;font-size:12px;font-weight:700;color:#64686c}.field input,.field select{width:100%;padding:11px 12px;border:1px solid #dcddde;border-radius:9px;background:white;color:#292a30;outline:none}.field input:focus,.field select:focus{border-color:#696d71;box-shadow:0 0 0 3px #dfe0e2}.inline-fields{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.panel-list{display:grid;gap:7px}.person{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;border:1px solid #e8e9ea;border-radius:10px;font-size:13px}.person small{color:#8f9296}.person button{border:0;background:#f0f0f1;color:#31465a;border-radius:7px;padding:6px 8px;font-size:12px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:17px}.toolbar select{padding:9px;border:1px solid #dcddde;background:white;border-radius:9px}.empty{text-align:center;padding:36px 18px;color:#8b8f93;font-size:13px}.modal-back{position:fixed;inset:0;background:#1e1f20b3;display:grid;place-items:center;padding:16px;z-index:10}.modal{background:white;border-radius:18px;width:min(100%,460px);padding:25px;box-shadow:0 15px 50px #0003;max-height:calc(100vh - 40px);overflow:auto}.modal h2{margin:0 0 6px;font-size:21px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.modal p{font-size:13px;color:#6c7074;line-height:1.6}.login{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 80% 20%,#e6e6e7,transparent 35%),#faf5ec}.login-card{width:min(100%,420px);background:white;border-radius:22px;padding:35px;box-shadow:0 12px 50px #27374818}.login-card .logo{width:62px;height:62px}.login-card h1{margin:18px 0 7px;font-size:27px}.login-card .muted{line-height:1.6;margin-bottom:25px}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#2f3133;color:white;border-radius:10px;padding:12px 17px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:30;max-width:calc(100vw - 32px);font-size:13px}#toast.show{opacity:1}#toast.error{background:#a33c35}.mobile-home{display:none}@media(max-width:900px){.shell{grid-template-columns:1fr}.side{display:none}.main{padding:22px 15px 92px}.top h1{font-size:25px}.grid{grid-template-columns:1fr}.stat-row{gap:7px}.stat{padding:12px}.stat strong{font-size:20px}.day{min-height:76px;padding:6px 4px}.day .chip{font-size:9px;padding:3px}.card-pad{padding:17px}.mobile-home{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:5;background:white;border-top:1px solid #e3e4e5;padding:7px 12px calc(7px + env(safe-area-inset-bottom));gap:5px;justify-content:space-around}.mobile-home button{flex:1;border:0;background:none;color:#6b6e72;font-size:11px;padding:8px 4px}.mobile-home button.active{color:#2c3f53;font-weight:700}.mobile-home span{display:block;font-size:20px;margin-bottom:2px}}@media(max-width:480px){.top{align-items:center}.top-actions .button:not(.primary){display:none}.calendar-controls strong{font-size:14px}.card-head{align-items:flex-start}.day{min-height:68px}.day-num{font-size:11px}.day .chip{max-height:17px}.inline-fields{grid-template-columns:1fr}}
.chip.rest,.chip.annual{background:#eee8fb;color:#624c9a}
.chip.holiday{background:#fbe8e7;color:#a54545}
.day.cap-full{box-shadow:inset 0 0 0 2px #cf8f30}
.day.cap-full .day-num::after{content:' 額滿';font-size:9px;color:#9b5d16}
.cap-alert{border:1px solid #df9852;background:#fff0dc;color:#814611;border-radius:10px;padding:12px 14px;margin:12px 0;font-size:13px;font-weight:700;line-height:1.5}
.settings-section{border-top:1px solid #e5e6e7;margin-top:22px;padding-top:20px}
.day .chip{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.2}
.chip.birthday{background:#fff0bf;color:#805719}
.segmented{display:flex;gap:6px;background:#eff0f0;border-radius:10px;padding:5px;margin:0 0 17px}
.segmented button{flex:1;border:0;border-radius:7px;background:transparent;color:#65696d;padding:9px;font-weight:700}
.segmented button.active{background:#fff;color:#243444;box-shadow:0 1px 5px #26282918}
.status-switch{display:flex;gap:7px;background:#eff0f0;border-radius:10px;padding:5px}
.status-switch label{flex:1;cursor:pointer}
.status-switch input{position:absolute;opacity:0;width:1px;height:1px}
.status-switch span{display:block;text-align:center;padding:10px;border-radius:7px;color:#65696d}
.status-switch input:checked+span{background:#fff;color:#243444;font-weight:700;box-shadow:0 1px 5px #26282918}
.field input[type=checkbox]{width:auto;margin-right:6px}
.person-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.weekday-details{border:1px solid #e5e6e7;border-radius:10px;padding:12px 14px;margin-bottom:18px}
.weekday-details summary{cursor:pointer;font-size:13px;font-weight:700;color:#69452f}
.weekday-details .inline-fields{margin-top:15px}
.matrix-card{margin-bottom:18px;overflow:visible}
.matrix-wrap{overflow:auto;max-width:100%;max-height:68vh;border:1px solid #e0e1e2;border-radius:12px}
.schedule-matrix{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px}
.schedule-matrix th,.schedule-matrix td{border-right:1px solid #e3e3e4;border-bottom:1px solid #e3e3e4;padding:0;vertical-align:middle}
.schedule-matrix thead th{position:sticky;top:0;z-index:3;background:#f8f8f8}
.schedule-matrix .matrix-name{position:sticky;left:0;z-index:2;min-width:150px;max-width:150px;background:#fff;padding:9px 10px;text-align:left;color:#363839;font-weight:700}
.schedule-matrix thead .matrix-name{z-index:4;background:#eeeeef}
.matrix-name small{display:block;color:#8c9094;font-weight:400}.drag-handle{color:#9fa2a5;cursor:grab}
.matrix-day{min-width:100px;width:100px}.matrix-day button{border:0;background:none;width:100%;min-height:64px;padding:5px;text-align:center;color:#424447;cursor:pointer}
.matrix-day strong,.matrix-day span,.matrix-day small,.matrix-day em{display:block}.matrix-day strong{font-size:16px}.matrix-day small{font-size:10px;color:#bb654e}.matrix-day em{font-size:10px;color:#606467;font-style:normal;overflow:hidden;text-overflow:ellipsis;max-width:94px;white-space:nowrap}
.matrix-day.holiday{background:#fff4ef}.matrix-day.holiday strong{color:#c75348}.matrix-day.selected{box-shadow:inset 0 -3px #4a6989}
.matrix-day.over,.matrix-day.under,.matrix-day.mixed{box-shadow:inset 0 -3px #d99144;background:#fff0df}.matrix-day.over b,.matrix-day.under b,.matrix-day.mixed b{display:block;color:#a7512f;font-size:10px}
.matrix-cell{min-width:100px;width:100px;height:62px;background:#fff}.matrix-cell button{border:0;background:transparent;cursor:pointer;width:100%;height:100%;min-height:61px;padding:5px 6px;display:flex;flex-direction:column;justify-content:center;gap:2px;color:#414345;text-align:center;overflow:hidden}
.matrix-cell strong{font-size:12px}.matrix-cell span{font-size:10px;white-space:nowrap}.matrix-cell small{font-size:10px;color:#805eb4}.matrix-cell .blank{opacity:.22;font-size:18px}
.matrix-cell.has-wish{background:#eee6fa}.matrix-cell.wish-rest{background:#e6d8f6}.matrix-cell.rest,.matrix-cell.comp,.matrix-cell.annual,.matrix-cell.sick,.matrix-cell.personal,.matrix-cell.bereavement,.matrix-cell.marriage{background:#dceffa}.matrix-cell.conflict{background:#ffe4c9;box-shadow:inset 0 0 0 2px #e4974d}.matrix-cell.selected{box-shadow:inset 0 0 0 2px #435f7c}
.matrix-cell.wish-rest.run-prev,.chip.run-prev{border-left-color:transparent;border-top-left-radius:0;border-bottom-left-radius:0}.matrix-cell.wish-rest.run-next,.chip.run-next{border-right-color:transparent;border-top-right-radius:0;border-bottom-right-radius:0}.matrix-cell.wish-rest.run-prev{box-shadow:inset 3px 0 #c9a9eb}.matrix-cell.wish-rest.run-next{box-shadow:inset -3px 0 #c9a9eb}
.matrix-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:11px;color:#6d7175;font-size:12px}.schedule-bottom,.setup-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.setup-card{margin-bottom:18px}.setup-card .toolbar{margin-top:18px}.settings-patterns{margin-top:18px}.pattern-form{margin:16px 0 22px}.matrix-person.dragging{opacity:.45}.matrix-person.drag-before>*{box-shadow:inset 0 3px #435f7c}.matrix-person.drag-after>*{box-shadow:inset 0 -3px #435f7c}
.setup-columns,.schedule-bottom{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-columns>div,.schedule-bottom>*,.pattern-form,.field{min-width:0;max-width:100%}.inline-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.field select,.field input{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:850px){.schedule-bottom,.setup-columns{grid-template-columns:1fr}.schedule-matrix .matrix-name{min-width:100px;max-width:100px}.matrix-day,.matrix-cell{min-width:82px;width:82px}}
.segmented [data-people-tab="active"]{flex:3}.segmented [data-people-tab="departed"]{flex:1}
.tool-palette{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 18px}.tool-button{border:1px solid #d2d3d5;background:#f6f6f6;color:#2e4256;border-radius:9px;padding:9px 12px;font-size:12px;font-weight:700}.tool-button.active{background:#304459;color:#fff;border-color:#304459;box-shadow:0 0 0 2px #c7c9cb}.adjust-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:-3px 0 15px}.adjust-buttons button{border:1px solid #d6d8d9;border-radius:8px;background:#f5f5f6;color:#32475c;padding:8px 3px;font-size:12px}.quota-over{color:#c43c37!important;font-weight:800}.config-toggle{margin-bottom:16px}.wish-weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:11px;color:#74787d;padding:10px 0;border-top:1px solid #e8e9ea}.wish-week{position:relative;border-top:1px solid #e8e9ea}.wish-dates{display:grid;grid-template-columns:repeat(7,1fr);height:100%}.wish-date{border:0;border-right:1px solid #ecedee;background:white;text-align:left;vertical-align:top;padding:7px 5px;color:#2e3032;cursor:pointer}.wish-date:last-child{border-right:0}.wish-date.weekend strong{color:#ba5d56}.wish-date.selected{background:#f3f3f3}.wish-date strong{display:block;font-size:12px}.wish-date small{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b3594b;font-size:9px}.wish-date.empty-date{background:#fafbfb}.wish-bars{position:absolute;inset:0;pointer-events:none}.wish-bar{position:absolute;display:block;height:20px;border-radius:5px;background:#3d5771;color:#fff;padding:3px 6px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:14px}.wish-bar.annual{background:#8a63af}.wish-bar.early,.wish-bar.late{background:#397c9d}.matrix-cell.wish-rest.run-prev,.matrix-cell.wish-rest.run-next{box-shadow:none;border-radius:0}
.shift-time-control{position:relative;display:flex;align-items:center;justify-content:center;height:43px;border:1px solid #dcddde;border-radius:9px;background:white;color:#292a30;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}.shift-time-control:focus-within{border-color:#696d71;box-shadow:0 0 0 3px #dfe0e2}.shift-time-part{border:0;background:none;color:inherit;padding:7px 11px;border-radius:6px;font:inherit}.shift-time-part:hover,.shift-time-part[aria-expanded=true]{background:#ececed}.shift-time-colon{font-size:18px}.shift-time-menu{position:absolute;top:calc(100% + 4px);left:50%;transform:translateX(-50%);z-index:20;display:grid;width:82px;max-height:170px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #d2d3d5;border-radius:9px;background:#fff;box-shadow:0 8px 22px #292a3022;user-select:none;cursor:grab}.shift-time-menu.open-up{top:auto;bottom:calc(100% + 4px)}.shift-time-menu[hidden]{display:none}.shift-time-menu:active{cursor:grabbing}.shift-time-menu button{height:34px;min-height:34px;border:0;background:#fff;color:#404245;font-size:14px;font-variant-numeric:tabular-nums}.shift-time-menu button:hover,.shift-time-menu button.selected{background:#ebecec;color:#2e4155;font-weight:800}
.wish-date.shop-closed,.wish-date.shop-closed:hover{background:#eaebeb}.wish-date .shop-closed-label{display:inline-block;background:#354c63;color:#fff;border-radius:4px;padding:1px 5px;font-weight:800}.schedule-matrix .matrix-day.shop-closed{background:#344b62;box-shadow:inset 3px 0 #313335,inset -3px 0 #313335;border-bottom-color:#344b62}.matrix-day.shop-closed strong,.matrix-day.shop-closed span,.matrix-day.shop-closed b,.matrix-day.shop-closed small,.matrix-day.shop-closed em{color:#fff}.schedule-matrix .matrix-cell.shop-closed{background:#e8e9ea;box-shadow:inset 3px 0 #8c9093,inset -3px 0 #8c9093;border-bottom-color:#e8e9ea}.schedule-matrix .matrix-cell.shop-closed strong{color:#304458}.schedule-matrix .matrix-cell.shop-closed.shop-work{background:#fff0d5;border-bottom-color:#fff0d5}.schedule-matrix .matrix-cell.shop-closed.shop-work strong{color:#8a5a24}
@media(max-width:600px){.adjust-buttons{grid-template-columns:repeat(2,1fr)}.wish-bar{font-size:9px;padding:3px 4px}.wish-weekdays{font-size:10px}.card-head{flex-wrap:wrap}.card-head>div:first-child{flex-basis:100%}.calendar-controls{width:100%;justify-content:flex-end}}
@media(max-width:480px){.inline-fields{grid-template-columns:minmax(0,1fr)}}
.top-actions{flex-wrap:wrap;justify-content:flex-end}.schedule-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:12px}.schedule-month,.quota-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.schedule-month button{border:1px solid #dcddde;background:#fff;border-radius:8px;width:30px;height:30px}.schedule-month strong{white-space:nowrap}.schedule-month h2{margin:0 0 0 6px}.quota-summary{font-size:13px;color:#565a5d}.quota-summary span{white-space:nowrap}.quota-editor{border:1px solid #e3e3e4;border-radius:12px;background:#f8f8f9;padding:16px;margin:12px 0 18px}.quota-editor[hidden]{display:none}.quota-editor h3{margin:0 0 8px}.quota-choice{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:13px;margin:10px 0}.quota-choice input[type=number]{width:58px;padding:6px;border:1px solid #d9dadb;border-radius:7px}.schedule-tools{margin-top:18px}.tool-section+.tool-section{border-top:1px solid #eaebeb;padding-top:18px;margin-top:18px}.tool-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.tool-heading h3{margin:0}.tool-section>h3{margin:0 0 10px}.custom-shift-fields{max-width:630px;background:#f8f8f9;border-radius:12px;padding:16px;margin:12px 0}.annual-tool{max-width:210px}.editor-list{max-height:290px;overflow:auto;margin-top:16px}
@media(max-width:600px){.top{flex-wrap:wrap}.top-actions{width:100%;justify-content:flex-start}.top-actions .button{padding:8px 10px;font-size:11px}.schedule-heading{align-items:flex-start}.quota-summary{gap:8px}}
@media(max-width:480px){.top-actions .button:not(.primary){display:inline-flex}}
.settings-single{grid-template-columns:minmax(0,1fr)}
.wish-date-head{display:flex;align-items:center;gap:3px;height:25px;min-width:0}.wish-date-head strong{flex:none;font-size:12px;line-height:18px}.wish-date-meta{display:flex;align-items:center;gap:2px;min-width:0;overflow:hidden}.wish-date-meta small{display:inline-block;max-width:100%;font-size:9px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wish-bar.sick,.wish-bar.personal,.wish-bar.bereavement,.wish-bar.marriage{background:#a86f42}.wish-history{border-top:1px solid #eaebeb;margin-top:18px;padding-top:18px}.wish-history .person{font-size:11px}
.wish-dates{position:absolute;inset:0;height:auto}.wish-date{display:flex;align-items:flex-start;min-width:0}.wish-bar.shift-wish{background:#397c9d}.wish-section-heading,.field-label-actions{display:flex;align-items:center;justify-content:flex-start;gap:10px}.wish-section-heading h3{margin:0}.field-label-actions .button{padding:3px 7px}.wish-totals{color:#505255;line-height:1.9}.category-name-form input{min-width:0;width:100%;border:1px solid #dcddde;border-radius:6px;padding:7px}.category-name-form .person-actions{flex-shrink:0}
.schedule-top{justify-content:flex-start;align-items:center}.schedule-top .top-actions{flex:1;justify-content:flex-start;margin-left:18px}.schedule-top .top-actions [data-action=publish]{margin-left:auto}.tool-heading{justify-content:flex-start}.tool-heading .button{margin-left:8px}.schedule-heading{justify-content:flex-start}.quota-summary{margin-left:18px}.quota-summary span{font-size:16px;font-weight:800;color:#4c3529;background:#edeeef;border-radius:8px;padding:7px 10px}
@media(max-width:700px){.schedule-top{flex-wrap:wrap}.schedule-top .top-actions{flex-basis:100%;margin-left:0}.schedule-top .top-actions [data-action=publish]{margin-left:0}.quota-summary{margin-left:0}.quota-summary span{font-size:14px}}
.pattern-add-feedback{min-height:18px;margin:8px 0;color:#2f4358;font-size:12px;font-weight:700}.pattern-just-added{border-color:var(--accent);animation:pattern-added 2s ease-out}@keyframes pattern-added{0%{background:color-mix(in srgb,var(--accent) 20%,var(--surface));box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 45%,transparent);transform:translateY(-7px)}35%{background:color-mix(in srgb,var(--accent) 10%,var(--surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent);transform:translateY(0)}100%{background:var(--surface);box-shadow:0 0 0 0 transparent;transform:translateY(0)}}
.pattern-delete-pending{background:#fbf6f0;border-color:#ead8c1}.pattern-delete-pending .person-actions{max-width:190px}.pattern-delete-prompt{width:100%;text-align:right;color:#825c37;font-size:11px;font-weight:700}.person .delete-confirm{background:#a45f46;color:#fff}
.clear-schedule-button{margin-left:auto;white-space:nowrap}.button.danger-outline{border-color:#c6534d;background:#fff5f3;color:#ad302b}.button.danger-outline:hover{background:#fce7e3}.button.danger{border-color:#af3831;background:#af3831;color:#fff}.clear-schedule-warning{border:1px solid #efc4bd;border-radius:12px;background:#fff5f3;padding:14px 16px;color:#8f302b}.clear-schedule-warning strong{font-size:14px}.modal .clear-schedule-warning p{color:#754a46;margin:10px 0 0}
.schedule-heading-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-wrap:wrap}.schedule-heading-actions .clear-schedule-button{margin-left:0}.wish-limit-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 18px}.wish-limit-group{border:1px solid #e3e3e4;border-radius:12px;padding:14px;background:#f8f8f9}.wish-limit-group h4{margin:0 0 10px}.wish-limit-group .inline-fields{margin:0}
.wish-limit-field input[hidden]{display:none}
@media(max-width:700px){.wish-limit-groups{grid-template-columns:1fr}.schedule-heading-actions{margin-left:0;width:100%}.schedule-heading-actions .button{flex:1}}
@media(max-width:700px){.clear-schedule-button{margin-left:0}.schedule-heading-actions .clear-schedule-button{width:auto;justify-content:center}}
@media(max-width:480px){.schedule-top .top-actions .button:not(.primary){display:inline-flex}}
@media(prefers-reduced-motion:reduce){.pattern-just-added{animation:none;background:var(--surface);box-shadow:inset 0 0 0 2px var(--accent)}}

html[data-theme=dark]{color-scheme:dark;color:#f0f1f5;background:#1a1819}
html[data-theme=dark] .login{background:radial-gradient(circle at 80% 20%,#262728,transparent 35%),#1a1819;color:#f0f1f5}
html[data-theme=dark] .login-card{background:#292528;color:#f0f1f5;border:1px solid #42474f;box-shadow:0 12px 45px #0005}
html[data-theme=dark] .login-card .eyebrow{color:#d0a66e}
html[data-theme=dark] .main{background:#1a1819}
html[data-theme=dark] .side{background:#1c1f23}
html[data-theme=dark] .card,html[data-theme=dark] .modal{background:#292528;border-color:#42474f;box-shadow:none}
html[data-theme=dark] .muted,html[data-theme=dark] .note,html[data-theme=dark] .person small,html[data-theme=dark] .matrix-name small,html[data-theme=dark] .matrix-legend,html[data-theme=dark] .field{color:#c1b6bc}
html[data-theme=dark] .button,html[data-theme=dark] .person button,html[data-theme=dark] .calendar-controls button,html[data-theme=dark] .schedule-month button,html[data-theme=dark] .tool-button,html[data-theme=dark] .adjust-buttons button{background:#343940;color:#f0f1f5;border-color:#53565a}
html[data-theme=dark] .button.primary,html[data-theme=dark] .tool-button.active{background:#e5a078;border-color:#e5a078;color:#fff}
html[data-theme=dark] .button.danger-outline{background:#472d2c;color:#ffbdb6;border-color:#b35c57}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea,html[data-theme=dark] .shift-time-control,html[data-theme=dark] .shift-time-menu,html[data-theme=dark] .shift-time-menu button{background:#1c1f23;color:#f0f1f5;border-color:#58616c}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#8a8e91}
html[data-theme=dark] .person,html[data-theme=dark] .weekday-details,html[data-theme=dark] .settings-section,html[data-theme=dark] .list-item,html[data-theme=dark] .tool-section+.tool-section,html[data-theme=dark] .wish-history{border-color:#45484b}
html[data-theme=dark] .stat,html[data-theme=dark] .segmented,html[data-theme=dark] .status-switch,html[data-theme=dark] .custom-shift-fields,html[data-theme=dark] .quota-editor{background:#2c3035;border-color:#494c4f}
html[data-theme=dark] .stat span,html[data-theme=dark] .week,html[data-theme=dark] .wish-weekdays{color:#c1b6bc}
html[data-theme=dark] .segmented button,html[data-theme=dark] .status-switch span{color:#bec0c2}
html[data-theme=dark] .segmented button.active,html[data-theme=dark] .status-switch input:checked+span{background:#494c4f;color:#fff}
html[data-theme=dark] .day,html[data-theme=dark] .wish-date,html[data-theme=dark] .schedule-matrix .matrix-name,html[data-theme=dark] .matrix-cell{background:#292528;color:#f0f1f5;border-color:#42474f}
html[data-theme=dark] .day:hover,html[data-theme=dark] .day.selected,html[data-theme=dark] .wish-date.selected{background:#36383a}
html[data-theme=dark] .day.other,html[data-theme=dark] .wish-date.empty-date{background:#1c1f23}
html[data-theme=dark] .schedule-matrix thead th,html[data-theme=dark] .schedule-matrix thead .matrix-name{background:#343940;color:#f0f1f5;border-color:#515457}
html[data-theme=dark] .schedule-matrix .matrix-day.holiday{background:#41312d}
html[data-theme=dark] .matrix-day button,html[data-theme=dark] .matrix-cell button{color:#e9eaeb}
html[data-theme=dark] .matrix-cell.has-wish,html[data-theme=dark] .matrix-cell.wish-rest{background:#3b3050}
html[data-theme=dark] .matrix-cell.rest,html[data-theme=dark] .matrix-cell.comp,html[data-theme=dark] .matrix-cell.annual,html[data-theme=dark] .matrix-cell.sick,html[data-theme=dark] .matrix-cell.personal,html[data-theme=dark] .matrix-cell.bereavement,html[data-theme=dark] .matrix-cell.marriage{background:#24475b}
html[data-theme=dark] .matrix-cell.conflict,html[data-theme=dark] .matrix-day.over,html[data-theme=dark] .matrix-day.under,html[data-theme=dark] .matrix-day.mixed{background:#553d29}
html[data-theme=dark] .schedule-matrix .matrix-cell.shop-closed{background:#253546;border-color:#253546}
html[data-theme=dark] .schedule-matrix .matrix-cell.shop-closed.shop-work{background:#513d27;border-color:#513d27}
html[data-theme=dark] .modal p{color:#bcbec1}
html[data-theme=dark] .quota-summary span{background:#273748;color:#d2d3d5}
html[data-theme=dark] .wish-limit-group{background:#2c3035;border-color:#494c4f;color:#f0f1f5}
html[data-theme=dark] .wish-limit-group h4{color:#e2e3e4}
html[data-theme=dark] .cap-alert{background:#523b24;color:#ffdaa7;border-color:#a77742}
html[data-theme=dark] .mobile-home{background:#292528;border-color:#474a4d}

.update-banner{position:fixed;z-index:1200;left:50%;top:12px;transform:translateX(-50%);width:min(720px,calc(100vw - 24px));display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #aaadb0;border-radius:12px;background:#eeeeef;color:#292a2b;box-shadow:0 12px 36px #1c1f2340;font-size:14px;font-weight:650}
.update-banner[data-required=true]{background:#fff0da;border-color:#d8aa62;color:#634215}
.update-banner .button{flex:none}
html[data-theme=dark] .update-banner{background:#2d2f31;border-color:#707579;color:#ecedee}
html[data-theme=dark] .update-banner[data-required=true]{background:#4a3620;border-color:#b88542;color:#ffe4b5}
@media(max-width:520px){.update-banner{align-items:stretch;flex-direction:column}.update-banner .button{width:100%}}
html[data-theme=dark] .mobile-home button{color:#c5c7c9}
html[data-theme=dark] .mobile-home button.active{color:#e5a078}
.top{position:relative;padding-right:138px;min-height:40px}
.top-actions:empty{display:none}
.theme-toggle{position:absolute;top:0;right:0;white-space:nowrap}
.account-settings{max-width:600px;margin-top:18px}
.employee-archive-action{border-top:1px solid #e6e6e7;margin-top:18px;padding-top:18px}
.archive-slider{width:100%;margin:16px 0;accent-color:#ad5149;touch-action:none}
html[data-theme=dark] .employee-archive-action{border-color:#474a4d}
.login-card.platform-card{width:min(100%,680px)}
.company-management{margin-top:18px;max-width:850px}
.company-management .person{align-items:center;gap:12px}
.company-delete-button{color:#a63833!important}
html[data-theme=dark] .company-delete-button{color:#ffb5ad!important}
[data-annual-fields][hidden]{display:none}
@media(max-width:700px){.top{padding-right:128px}.theme-toggle{font-size:11px;padding:8px 10px}}
.attendance-review{margin-bottom:18px}
.attendance-review-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.attendance-alert{background:#fff0dc;color:#92561d}
.attendance-issue{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border:1px solid #ead9c3;border-left:5px solid #bd7b3f;border-radius:12px;background:#fffcf7}
.attendance-issue-main{min-width:0}.attendance-issue-main strong{font-size:14px}
.attendance-flags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.attendance-flags span{font-size:11px;font-weight:700;color:#94571e;background:#fff0dc;border-radius:6px;padding:4px 7px}
.attendance-issue .person-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.attendance-issue button{border:1px solid #ddc7a8;background:#fff7e9;color:#684523;border-radius:8px;padding:7px 10px;font-size:12px;font-weight:700}
html[data-theme=dark] .attendance-issue{background:#322c25;border-color:#675039;border-left-color:#d5a26a}
html[data-theme=dark] .attendance-alert,html[data-theme=dark] .attendance-flags span{background:#4b3924;color:#ffdaa7}
html[data-theme=dark] .attendance-issue button{background:#4a392a;border-color:#81603e;color:#ffe0b7}
@media(max-width:700px){.attendance-issue{align-items:flex-start;flex-direction:column}.attendance-issue .person-actions{justify-content:flex-start}}
#jobTitleForm{margin-top:16px}#jobTitleForm input[name=name]{min-width:210px;flex:1;padding:10px 12px;border:1px solid #dcddde;border-radius:9px;background:#fff;color:#292a30}#jobTitleForm+.panel-list{margin-bottom:18px}#jobTitleForm+.panel-list .person-actions{display:flex;gap:5px;flex-wrap:wrap}
.job-title-create{display:block}.job-title-create .toolbar{display:flex}.job-title-create .field{margin-top:14px}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:8px}.permission-choice{display:flex;align-items:center;gap:9px;border:1px solid #dcddde;border-radius:9px;padding:10px 12px;background:#f8f8f9;cursor:pointer}.permission-choice input{width:17px;height:17px;min-width:17px;margin:0;accent-color:#435f7c}.job-title-row{position:relative;gap:12px;cursor:grab}.job-title-row:active{cursor:grabbing}.job-title-detail{flex:1;min-width:0}.title-drag-handle{font-size:20px;color:#777c80;letter-spacing:-5px;padding:0 12px 0 2px;user-select:none}.job-title-row.dragging{opacity:.45}.job-title-row.drag-before::before,.job-title-row.drag-after::after{content:"";position:absolute;left:0;right:0;height:3px;background:#435f7c;border-radius:3px}.job-title-row.drag-before::before{top:0}.job-title-row.drag-after::after{bottom:0}html[data-theme=dark] .permission-choice{background:#2c3035;border-color:#494c4f;color:#f0f1f5}html[data-theme=dark] .title-drag-handle{color:#c1b6bc}@media(max-width:700px){.permission-grid{grid-template-columns:1fr}}
html[data-theme=dark] #jobTitleForm input[name=name]{background:#1c1f23;color:#f0f1f5;border-color:#58616c}
.notification-badge{display:inline-grid!important;place-items:center;min-width:19px;height:19px;margin-left:8px;padding:0 5px;border-radius:20px;background:#b64b3d;color:#fff;font-size:11px;font-weight:800}.reminder-status{display:inline-block;margin:0 8px;padding:2px 7px;border-radius:20px;font-size:11px;font-weight:700}.reminder-status.pending{background:#fff0d8;color:#87551c}.reminder-status.resolved{background:#eaebeb;color:#3a526b}html[data-theme=dark] .reminder-status.pending{background:#4d3921;color:#ffdaa7}html[data-theme=dark] .reminder-status.resolved{background:#343638;color:#cbcdcf}
html[data-theme=dark] #jobTitleForm input{background:#1c1f23;color:#f0f1f5;border-color:#58616c}
#jobTitleForm select{padding:10px 12px;border:1px solid #dcddde;border-radius:9px;background:#fff;color:#292a30}
html[data-theme=dark] #jobTitleForm select{background:#1c1f23;color:#f0f1f5;border-color:#58616c}

/* Keep each schedule day separate; color the label instead of the entire cell. */
.schedule-source-colors,.matrix-legend{--schedule-cell-bg:#fff;--wish-label-bg:#efe2e9;--wish-label-text:#704858;--wish-label-border:#b28b9f;--employee-leave-bg:rgba(139,90,24,.17);--employee-leave-text:#69420f;--employee-leave-border:rgba(139,90,24,.55);--leave-label-bg:rgba(49,101,122,.17);--leave-label-text:#26546a;--leave-label-border:rgba(49,101,122,.55)}
html[data-theme=dark] .schedule-source-colors,html[data-theme=dark] .matrix-legend{--schedule-cell-bg:#292528;--wish-label-bg:#594076;--wish-label-text:#f2e7ff;--wish-label-border:#a784cf;--leave-label-bg:#205775;--leave-label-text:#ddf4ff;--leave-label-border:#69b3d4}
html[data-theme=dark] .schedule-source-colors,html[data-theme=dark] .matrix-legend{--employee-leave-bg:rgba(216,168,77,.28);--employee-leave-text:#f4dca7;--employee-leave-border:rgba(216,168,77,.72);--leave-label-bg:rgba(72,140,166,.25);--leave-label-text:#c6e6f0;--leave-label-border:rgba(112,173,196,.65)}
.schedule-matrix.schedule-source-colors .matrix-cell:not(.conflict):not(.shop-closed){background:var(--schedule-cell-bg)}
.schedule-source-colors .schedule-leave-label,.schedule-source-colors .schedule-wish-label{align-self:center;display:inline-block;max-width:100%;min-width:32px;padding:5px 10px;border:1px solid;border-radius:6px;line-height:1.4;box-sizing:border-box}
.schedule-source-colors .employee-leave,.matrix-legend .employee-leave{background:var(--employee-leave-bg);color:var(--employee-leave-text);border-color:var(--employee-leave-border)}
.schedule-source-colors .schedule-wish-label{background:var(--wish-label-bg);color:var(--wish-label-text);border-color:var(--wish-label-border)}
.schedule-source-colors .scheduler-leave,.matrix-legend .scheduler-leave{background:var(--leave-label-bg);color:var(--leave-label-text);border-color:var(--leave-label-border)}
.schedule-source-colors small.schedule-wish-label{padding:2px 7px;font-size:10px}
.matrix-legend>span{display:inline-flex;align-items:center;gap:6px}
.matrix-legend .legend-swatch{width:13px;height:13px;border:1px solid;border-radius:3px;display:inline-block;flex-shrink:0}

/* Employee homepage: published personal schedule and attendance first. */
.home-mode-switch{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}
.employee-home .card-head{flex-wrap:nowrap}.employee-home .card-head>div{min-width:0}.employee-home .card-head>button{flex-shrink:0}
.employee-home .employee-shortcuts{grid-column:auto;align-self:start}.employee-home .today-history{margin:0 0 16px;width:auto;min-height:44px}
.employee-home{--home-soft:#f0f0f1;--home-border:#dcdedf;--home-muted:#5c5f62;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:18px;max-width:1080px}
.today-work-card{border-top:4px solid #595d60}.today-date{font-size:13px;color:var(--home-muted);font-weight:700;margin-bottom:7px}.today-company{margin:7px 0 0}.today-shift{background:var(--home-soft);border:1px solid var(--home-border);border-radius:14px;padding:20px;margin-bottom:20px}.today-shift .pill{display:inline-block}.today-shift-time{display:flex;align-items:center;gap:14px;font-size:clamp(27px,3vw,42px);font-weight:750;letter-spacing:-.03em;font-variant-numeric:tabular-nums;margin-top:15px;white-space:nowrap}.today-shift-time>span{font-size:22px;color:var(--home-muted)}.today-shift .note{color:var(--home-muted);margin:10px 0 0}.today-no-shift{font-size:14px;line-height:1.7;margin-top:12px;color:var(--home-muted)}.today-punch-status{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}.today-punch-status>div{display:grid;gap:8px;padding:0 3px}.today-punch-status>div+div{border-left:1px solid var(--home-border);padding-left:18px}.today-punch-status span{font-size:12px;color:var(--home-muted)}.today-punch-status strong{font-size:16px;font-variant-numeric:tabular-nums}.today-punch-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.today-punch-actions .button{min-height:58px;font-size:17px;border-radius:13px}.punch-feedback{min-height:20px;color:var(--home-muted)}.today-location-help{border-top:1px solid var(--home-border);padding-top:14px;font-size:12px;color:var(--home-muted);line-height:1.7}.today-location-help summary{cursor:pointer}.today-record-card{align-self:start}.today-history{margin-top:18px;width:100%;min-height:44px}.employee-shortcuts{grid-column:1/-1}.employee-shortcuts .toolbar{margin:16px 0 0}.employee-shortcuts .button{min-height:44px}
html[data-theme=dark] .employee-home{--home-soft:#2b2f34;--home-border:#4d5053;--home-muted:#bbbdbf}html[data-theme=dark] .today-work-card{border-top-color:#8ca6c1}html[data-theme=dark] .today-shift{color:#f0f1f5}html[data-theme=dark] .employee-home .pill{background:#444648;color:#e6e7e8}html[data-theme=dark] .employee-home .pill.draft{background:#4d3e2b;color:#ffe0b0}
@media(max-width:900px){.employee-home{grid-template-columns:1fr}.today-shift-time{font-size:36px}.home-mode-switch{margin-bottom:14px}.employee-shortcuts{grid-column:auto}.today-punch-actions .button{min-height:60px}.employee-home .card-head{align-items:center}}
@media(max-width:380px){.today-shift{padding:15px}.today-shift-time{font-size:30px;gap:10px}.today-punch-status strong{font-size:14px}}
.schedule-update-dot{display:inline-block!important;width:8px!important;min-width:8px;height:8px;margin:0 0 0 7px!important;border-radius:50%;background:#dc4548;vertical-align:middle;box-shadow:0 0 0 2px #dc454814}.mobile-home .schedule-update-dot{position:absolute;top:8px;left:calc(50% + 12px);margin:0!important}.mobile-home button{position:relative}.schedule-update-strip{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:15px;font-size:12px;color:#8c413d}.personal-clock-history>.button{margin-bottom:18px}.employee-interface .top{padding-right:206px}.employee-account{position:absolute;right:132px;top:0;z-index:6;font-size:12px}.employee-account summary{list-style:none;cursor:pointer;padding:10px 13px;border:1px solid #ced0d2;background:#fff;color:#243343;border-radius:10px;font-weight:650}.employee-account summary::-webkit-details-marker{display:none}.employee-account summary:focus-visible{outline:3px solid #85898d;outline-offset:3px}.employee-account-menu{position:absolute;right:0;top:calc(100% + 8px);width:min(260px,calc(100vw - 30px));padding:18px;background:#fff;color:#292a30;border:1px solid #dcddde;border-radius:13px;box-shadow:0 10px 30px #20212226}.employee-account-menu>.note{margin:8px 0 15px}.employee-account-menu .button{width:100%;min-height:44px}.employee-interface .mobile-home{gap:20px}.employee-interface .side .nav{gap:10px}
html[data-theme=dark] .schedule-update-dot{background:#ff7074}html[data-theme=dark] .schedule-update-strip{color:#f6b1a9}html[data-theme=dark] .employee-account summary,html[data-theme=dark] .employee-account-menu{background:#292a30;color:#ebeced;border-color:#58616c}
@media(max-width:700px){.employee-interface .top{padding-right:188px}.employee-account{right:116px}.employee-account summary{padding:8px 10px;font-size:11px}.employee-account-menu{right:-116px}.employee-interface .main{padding-bottom:calc(96px + env(safe-area-inset-bottom))}}
/* Shared geometry for employee leave and personal schedule calendars. */
.wish-week-content{position:relative;height:100%}
.personal-calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid #e8e9ea;min-height:0}
.personal-calendar-date{min-width:0;border:0;border-right:1px solid #ecedee;background:#fff;color:#2e3032;text-align:left;padding:5px;display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.personal-calendar-date:last-child{border-right:0}.personal-calendar-date.empty-date{background:#fafbfb}.personal-calendar-date.weekend strong{color:#ba5d56}.personal-calendar-date .wish-date-head{width:100%;flex-shrink:0}
.personal-shift-name{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#5c5f62}
.personal-shift-times{display:grid;font-size:14px;line-height:1.4;font-weight:750;font-variant-numeric:tabular-nums;color:#273748}
.personal-leave{font-size:18px;font-weight:700;color:#8060a0;margin-top:5px}.personal-unassigned{font-size:10px;color:#888c91}.personal-calendar-date.is-today{box-shadow:inset 0 0 0 2px #496887}
.schedule-view-switch{display:flex;gap:8px;margin-bottom:12px}.schedule-view-switch .button{min-height:40px}.personal-schedule-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(285px,.8fr);gap:18px}
.personal-schedule-layout .calendar-card,.employee-interface .wish-layout .calendar-card{height:620px;display:flex;flex-direction:column}
.personal-schedule-layout .wish-month,.employee-interface .wish-layout .wish-month{flex:1;min-height:0;display:grid;grid-auto-rows:minmax(0,1fr)}
.employee-interface .wish-layout .wish-week{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.employee-interface .wish-date-head{position:sticky;top:0;background:inherit;z-index:1}
.employee-home{grid-template-columns:minmax(0,1fr);max-width:760px}.today-location-help[open]{max-height:140px;overflow:auto}
html[data-theme=dark] .personal-calendar-date{background:#292a30;color:#ebeced;border-color:#454749}html[data-theme=dark] .personal-calendar-date.empty-date{background:#202223}html[data-theme=dark] .personal-calendar-week{border-color:#454749}html[data-theme=dark] .personal-shift-name{color:#adc0d3}html[data-theme=dark] .personal-shift-times{color:#f0f1f5}html[data-theme=dark] .personal-leave{color:#c6a8ee}html[data-theme=dark] .personal-unassigned{color:#a8abae}
@media(max-width:900px){
.personal-schedule-layout{grid-template-columns:minmax(0,1fr)}
.employee-interface[data-page=home] .main,.employee-interface[data-page=wishes] .main,.employee-interface[data-page=schedule] .main{padding:12px 12px calc(76px + env(safe-area-inset-bottom))}
.employee-interface .top{min-height:52px;margin-bottom:10px}.employee-interface .top h1{font-size:22px;margin:4px 0}.employee-interface .top .muted{display:none}.employee-interface .eyebrow{font-size:10px;letter-spacing:.04em}.employee-interface .top-actions{display:none}
.employee-interface .today-work-card{padding:16px}.employee-interface .today-work-card .card-head{margin-bottom:12px}.employee-interface .today-work-card h2{font-size:17px}.employee-interface .today-date{margin-bottom:4px}.employee-interface .today-shift{padding:15px;margin-bottom:14px}.employee-interface .today-shift-time{font-size:32px;margin-top:10px}.employee-interface .today-punch-status{margin-bottom:14px;gap:8px}.employee-interface .today-punch-actions .button{min-height:52px;font-size:16px}.employee-interface .punch-feedback{font-size:11px;margin:10px 0}.employee-interface .today-history{margin:0 0 10px}.employee-interface .today-location-help{padding-top:10px}.employee-interface .today-location-help[open]{max-height:105px}
.employee-interface .planning-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.employee-interface .planning-layout .calendar-card{height:calc(100dvh - 292px - env(safe-area-inset-bottom));min-height:270px;padding:10px;border-radius:14px}
.employee-interface .calendar-card .card-head{flex-wrap:nowrap;align-items:center;gap:5px;min-height:36px;margin-bottom:4px;flex-shrink:0}.employee-interface .calendar-card .card-head>div:first-child{flex-basis:auto}.employee-interface .calendar-card h2{font-size:15px;white-space:nowrap}.employee-interface .calendar-card .card-head .note{display:none}.employee-interface .calendar-card .calendar-controls{width:auto;gap:5px;justify-content:flex-end}.employee-interface .calendar-controls strong{font-size:13px}.employee-interface .wish-weekdays{padding:6px 0;flex-shrink:0}.employee-interface .wish-date{padding:3px}.employee-interface .wish-date-head,.employee-interface .personal-calendar-date .wish-date-head{height:22px}.employee-interface .wish-date-head strong{font-size:12px}
.employee-interface .wish-controls,.employee-interface .personal-schedule-controls{padding:10px 12px;min-height:128px;border-radius:14px}.employee-interface .wish-controls{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px 9px}.employee-interface .wish-controls h3{font-size:11px;margin:0;white-space:nowrap}.employee-interface .wish-controls .wish-section-heading{grid-column:1}.employee-interface .wish-controls .tool-palette{margin:0;gap:5px;overflow-x:auto;flex-wrap:nowrap}.employee-interface .wish-controls .tool-button{padding:8px 11px;min-height:36px;white-space:nowrap}.employee-interface .wish-controls>.tool-palette:last-of-type{grid-column:1/-1;justify-content:flex-end}.employee-interface .wish-controls .wish-totals{grid-column:1/-1;font-size:11px;margin:0;line-height:1.5}.employee-interface .personal-schedule-controls .note{margin:6px 0;font-size:11px;line-height:1.5}.employee-interface .personal-schedule-controls .schedule-view-switch{margin:0 0 6px}
.employee-interface .personal-shift-times{font-size:12px;line-height:1.3}.employee-interface .personal-calendar-date{padding:3px;gap:1px}.employee-interface .personal-shift-name{font-size:9px}.employee-interface .personal-leave{font-size:16px;margin-top:3px}
}
@media(max-width:380px),(max-height:700px){.employee-interface .today-work-card{padding:12px}.employee-interface .today-shift{padding:12px;margin-bottom:10px}.employee-interface .today-punch-status{margin-bottom:10px}.employee-interface .today-company{margin-top:3px}.employee-interface .today-work-card .card-head{margin-bottom:10px}.employee-interface .today-work-card h2{font-size:15px}.employee-interface .today-shift-time{font-size:28px}.employee-interface .today-location-help{font-size:11px}}
@media(max-width:900px){.employee-interface .wish-controls>.tool-palette:last-of-type{grid-column:auto;justify-content:flex-start}.employee-interface .wish-controls{min-height:118px}.employee-interface .personal-schedule-controls{min-height:118px}.employee-interface .personal-calendar-date .wish-date-head{height:19px}}
@media(max-width:900px) and (max-height:750px){.employee-interface .personal-shift-name{display:none}.employee-interface .personal-shift-times{font-size:11px;line-height:1.2}.employee-interface .personal-calendar-date{padding:2px}}
.personal-schedule-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.personal-schedule-summary .button{font-size:10px;padding:4px 7px}.personal-schedule-summary .note{flex:1}
/* Personal schedule occupies the space released by the lower controls. */
.personal-schedule-layout{grid-template-columns:minmax(0,1fr)}
.personal-schedule-layout .calendar-card{height:calc(100dvh - 170px);min-height:420px}
.calendar-mode-title{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;padding:5px 0;cursor:pointer}.calendar-mode-title span{font-size:14px;color:#717579}.calendar-mode-title:focus-visible{outline:2px solid #496887;outline-offset:4px;border-radius:4px}.personal-calendar-meta{display:flex;gap:8px;align-items:center;justify-content:flex-end;min-height:26px;flex-shrink:0}.personal-calendar-meta .button{padding:4px 7px;font-size:10px}
html[data-theme=dark] .calendar-mode-title span{color:#b9bbbd}
@media(max-width:900px){.employee-interface .personal-schedule-layout .calendar-card{height:calc(100dvh - 160px - env(safe-area-inset-bottom));min-height:270px}}
/* Top row now contains controls only, without duplicate page headings. */
.top{min-height:40px;margin-bottom:14px;align-items:center}.schedule-top .top-actions{margin-left:0}
@media(max-width:900px){.employee-interface .top{min-height:40px;margin-bottom:10px}.employee-interface .planning-layout .calendar-card{height:calc(100dvh - 280px - env(safe-area-inset-bottom))}.employee-interface .personal-schedule-layout .calendar-card{height:calc(100dvh - 148px - env(safe-area-inset-bottom))}}

/* Navigation unified around personal punch; account and theme live in Settings. */
.appearance-settings{margin-bottom:16px}.appearance-settings .button{min-height:44px}
.nav [data-view="home"],.mobile-home [data-view="home"]{position:relative}
@media(max-width:900px){.mobile-home,.employee-interface .mobile-home{gap:3px}.mobile-home button{min-width:0;font-size:11px}.mobile-home button>span:first-child{font-size:18px}.employee-interface .planning-layout .calendar-card{height:calc(100dvh - 230px - env(safe-area-inset-bottom))}.employee-interface .personal-schedule-layout .calendar-card{height:calc(100dvh - 98px - env(safe-area-inset-bottom))}}

[data-action="auto-fill"],[data-action="edit-patterns"]:not(.staffing-settings-button),[data-action="cancel-auto"]{display:none!important}

.employee-more-button{display:none}.employee-action-menu{display:grid;gap:12px;margin-top:20px}.employee-action-menu button{min-height:48px;border:1px solid #ced0d2;border-radius:10px;background:#f0f0f1;color:#31465a;font-size:15px;font-weight:600}.employee-action-menu button:focus-visible{outline:3px solid #85898d;outline-offset:3px}html[data-theme=dark] .employee-action-menu button{background:#292a30;color:#ebeced;border-color:#58616c}
@media(max-width:900px){.employee-desktop-actions{display:none}.person .employee-more-button{display:block;flex-shrink:0;min-width:52px;min-height:44px}.person:has(.employee-more-button)>div:first-child{min-width:0;overflow-wrap:anywhere}}

.auth-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.auth-links button{border:0;background:none;color:#344a60;padding:8px 0;min-height:40px;text-decoration:underline;cursor:pointer}.auth-back{margin-top:18px}.local-mail-note{padding:12px;border-radius:10px;background:#fff4d8;color:#75551b;font-size:12px;line-height:1.6;margin-top:16px}.email-account-status{padding:14px;border-radius:10px;background:#f0f0f1;overflow-wrap:anywhere;margin-bottom:16px}.email-binding{margin-bottom:20px}.email-binding summary{cursor:pointer;padding:10px 0;font-weight:650}.email-binding form{margin-top:12px}.auth-mail-link{display:inline-block;text-decoration:none;min-height:44px;text-align:center}html[data-theme=dark] .local-mail-note{background:#443922;color:#f5dda2}html[data-theme=dark] .email-account-status{background:#292a30;color:#ebeced}html[data-theme=dark] .auth-links button{color:#a5bace}

/* The calendar takes the available width; the editor stays compact on desktop. */
html{scrollbar-gutter:stable}
@media(min-width:901px){.grid.wish-layout{grid-template-columns:minmax(0,1fr) 290px;align-items:start}.wish-layout .calendar-card{width:100%;min-width:0;min-height:620px}.wish-layout .wish-controls{width:100%}}
@media(min-width:901px){.wish-layout .calendar-card{display:flex;flex-direction:column;min-height:calc(100dvh - 64px)}.wish-layout .wish-month{flex:1;display:grid;grid-auto-rows:minmax(0,1fr)}.wish-layout .wish-week{min-height:0}}
.unified-schedule-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:44px;flex-shrink:0;margin-bottom:14px}
[data-page=schedule] .matrix-card,[data-page=schedule] .personal-schedule-layout .calendar-card{padding:22px}
.unified-schedule-heading .schedule-month{gap:8px;flex-wrap:nowrap}.unified-schedule-heading .schedule-month strong{font-size:17px}
.unified-schedule-heading .quota-summary{margin-left:0;gap:8px;flex-wrap:nowrap}.unified-schedule-heading .quota-summary span{font-size:15px}
.schedule-mode-toggle{display:inline-flex;flex-shrink:0;gap:3px;padding:3px;border:1px solid #d0d2d4;border-radius:11px;background:#f2f2f3}
.schedule-mode-toggle button{display:grid;place-items:center;width:36px;height:36px;padding:7px;border:0;border-radius:8px;background:transparent;color:#5d6063}
.schedule-mode-toggle button[aria-pressed=true]{background:#2d4154;color:#fff;box-shadow:0 2px 6px #292b2d20}
.schedule-mode-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.schedule-mode-toggle button:focus-visible{outline:3px solid #85898d;outline-offset:2px}
.wish-date-meta .holiday-badge,.matrix-day .holiday-badge,.chip.holiday{border:1px solid #cc5a55;border-radius:5px;background:#fff0ee;color:#a9322d;font-size:12px;font-weight:750;line-height:1.4;padding:1px 4px;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}
.wish-date-head{height:auto;min-height:30px;align-items:flex-start}.wish-date-head strong{line-height:24px}.wish-date-meta{align-items:flex-start;overflow:visible;min-width:0}.wish-date-meta .holiday-badge{display:block;max-width:100%}
html[data-theme=dark] .schedule-mode-toggle{background:#242526;border-color:#58616c}html[data-theme=dark] .schedule-mode-toggle button{color:#c5c6c8}html[data-theme=dark] .schedule-mode-toggle button[aria-pressed=true]{background:#425e7b;color:#fff}
html[data-theme=dark] .wish-date-meta .holiday-badge,html[data-theme=dark] .matrix-day .holiday-badge,html[data-theme=dark] .chip.holiday{background:#482a2b;color:#ffc4bd;border-color:#dc827b}
@media(max-width:900px){
 [data-page=schedule] .matrix-card,[data-page=schedule] .personal-schedule-layout .calendar-card,.employee-interface[data-page=schedule] .matrix-card,.employee-interface[data-page=schedule] .personal-schedule-layout .calendar-card{padding:10px;border-radius:14px}
 .unified-schedule-heading{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center}
 .unified-schedule-heading .schedule-month{justify-content:flex-end}.unified-schedule-heading .schedule-month strong{font-size:16px}
 .unified-schedule-heading .quota-summary{grid-column:1/-1;display:flex;justify-content:flex-start;gap:5px;min-height:36px;flex-wrap:nowrap}
 .unified-schedule-heading .quota-summary span{font-size:12px;padding:6px;white-space:nowrap}.unified-schedule-heading .quota-summary .button{font-size:11px;padding:6px;white-space:nowrap;margin-left:auto}
 .unified-schedule-heading .schedule-heading-actions{grid-column:1/-1;width:100%;margin:0;display:flex;flex-wrap:nowrap}
 .unified-schedule-heading .schedule-heading-actions .button{flex:1;font-size:11px;padding:8px 5px}
 .employee-interface .calendar-card .wish-date-head,.employee-interface .personal-calendar-date .wish-date-head{height:auto;min-height:25px}
 .wish-date-meta .holiday-badge{font-size:10px;padding:1px;line-height:1.25}
 .wish-date,.personal-calendar-date{padding-left:3px;padding-right:3px}
 .wish-date-head,.employee-interface .calendar-card .wish-date-head,.employee-interface .personal-calendar-date .wish-date-head{height:43px;min-height:43px;flex-direction:column;gap:0;align-items:flex-start}
 .wish-date-head strong{height:22px;line-height:22px}.wish-date-meta{width:100%;gap:1px}.wish-date-meta .holiday-badge{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .employee-interface .personal-schedule-layout .calendar-card{height:calc(100dvh - 98px - env(safe-area-inset-bottom))}
}

/* Collapsible desktop navigation retains icon access and the current editor. */
.side{position:relative}.side-toggle{position:absolute;right:8px;top:5px;display:grid;place-items:center;width:30px;height:30px;border:1px solid #767a7f;border-radius:8px;background:#69452f;color:#fff;font-size:24px;line-height:1}
.nav button .nav-label{width:auto}.wish-bar-name:before{content:' / '}
@media(min-width:901px){.shell.side-collapsed{grid-template-columns:72px minmax(0,1fr)}.side-collapsed .side{padding:40px 8px 20px;align-items:center}.side-collapsed .brand{padding:4px 0}.side-collapsed .brand>div,.side-collapsed .nav-label,.side-collapsed .side-foot{display:none}.side-collapsed .nav{width:100%}.side-collapsed .nav button{display:grid;place-items:center;padding:12px 4px}.side-collapsed .nav button>span:first-child{width:auto;font-size:21px}.side-collapsed .side-toggle{right:21px}}
@media(max-width:900px){
 .side-toggle{display:none}
 .wish-layout .calendar-card{display:flex;flex-direction:column;height:calc(100dvh - 100px);min-height:440px;padding:10px}
 .wish-layout .calendar-card>.card-head{flex:none;min-height:36px;margin-bottom:6px;justify-content:flex-start}
 .wish-layout .calendar-card>.card-head .calendar-controls{width:auto;justify-content:flex-start}
 .wish-layout .wish-weekdays{flex:none}
 .wish-layout .wish-month{flex:1;min-height:0;display:grid;grid-auto-rows:minmax(0,1fr)}
 .wish-layout .wish-week{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .wish-layout .wish-week-content{height:auto;min-height:100%!important}
 .wish-layout .wish-bars{position:relative;inset:auto;padding:52px 0 5px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(42px,auto);gap:4px 0;min-height:100%}
 .wish-layout .wish-bar{position:relative;left:auto!important;top:auto!important;width:auto!important;height:auto;min-height:42px;margin:0 2px;padding:3px 2px;align-self:stretch;white-space:normal;overflow:visible;text-overflow:clip;font-size:10px;line-height:1.3;text-align:center;overflow-wrap:anywhere}
 .wish-layout .wish-bar-kind,.wish-layout .wish-bar-name{display:block}
 .wish-layout .wish-bar-name:before{content:none}
 .wish-layout .wish-dates{grid-template-columns:repeat(7,minmax(0,1fr))}
 .employee-interface .wish-layout .calendar-card{height:calc(100dvh - 230px - env(safe-area-inset-bottom));min-height:270px}
}
/* A seam handle follows the viewport and highlights the panel boundary. */
@media(min-width:901px){.side-toggle,.side-collapsed .side-toggle{position:fixed;left:235px;right:auto;top:50dvh;transform:translateY(-50%);width:22px;height:80px;border-radius:10px;z-index:8;background:#69452f;color:#eaebec;transition:background .16s,box-shadow .16s,width .16s}.side-collapsed .side-toggle{left:61px}.side-toggle:hover,.side-toggle:focus-visible{background:#486786;box-shadow:0 0 0 4px #7494b44d;outline:none}.side:has(.side-toggle:hover){box-shadow:inset -3px 0 #7494b4}}
button.whole-mode-toggle{display:inline-flex;align-items:center;justify-content:center;gap:3px;width:84px;height:44px;padding:3px;cursor:pointer;color:#5d6063;flex:none}
.whole-mode-toggle>span{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;pointer-events:none}.whole-mode-toggle>span.selected{background:#2d4154;color:#fff}.whole-mode-toggle:hover{box-shadow:0 0 0 3px #81858940}
html[data-theme=dark] button.whole-mode-toggle{color:#c5c6c8}html[data-theme=dark] .whole-mode-toggle>span.selected{background:#425e7b;color:#fff}
.wish-layout .calendar-card{padding:22px}.wish-heading .schedule-month{display:flex;align-items:center}.wish-color-legend{display:flex;flex-wrap:wrap;gap:8px 14px;margin:0 0 10px;font-size:12px;flex:none}.wish-color-legend>span{display:inline-flex;align-items:center;gap:5px}.wish-color-legend i{display:inline-block;width:13px;height:13px;border-radius:4px;background:var(--wish-color);border:1px solid #ffffff60}
.wish-bar.color-wish{background:var(--wish-color);color:#fff}.color-wish .wish-bar-name:before{content:none}.wish-shift-tools .wish-section-heading{margin-bottom:10px}.wish-leave-tools[hidden],.wish-shift-tools[hidden]{display:none!important}
.matrix-legend .conflict-swatch{background:#c47b36;border-color:#e6a95f}
@media(max-width:900px){
 .wish-layout .calendar-card,.employee-interface .wish-layout .calendar-card{padding:10px}
 .wish-heading{min-height:44px;margin-bottom:14px}
 .wish-color-legend{gap:6px 10px;font-size:11px}
 .employee-interface .wish-controls{display:block}.employee-interface .wish-controls .tool-palette{margin:5px 0}.employee-interface .wish-controls .wish-section-heading{margin-top:4px}
 .wish-layout .wish-bar.color-wish{min-height:28px;display:grid;place-items:center;font-size:11px}
 .wish-layout .wish-bars{grid-auto-rows:minmax(28px,auto)}
}
/* Desktop names also wrap fully in narrow windows, without overlapping lanes. */
@media(min-width:901px){
 .wish-layout .wish-week{overflow-y:auto;scrollbar-width:thin}
 .wish-layout .wish-week-content{height:auto;min-height:100%!important}
 .wish-layout .wish-bars{position:relative;inset:auto;padding:52px 0 5px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(24px,auto);gap:4px 0}
 .wish-layout .wish-bar.color-wish{position:relative;left:auto!important;top:auto!important;width:auto!important;height:auto;min-height:24px;margin:0 3px;padding:4px;display:grid;place-items:center;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;text-align:center}
}
/* A quiet seam, with a small grip revealed by hover and keyboard focus. */
@media(min-width:901px){
 .side-toggle,.side-collapsed .side-toggle{width:16px;height:64px;left:238px;border:0;border-radius:0;background:transparent;box-shadow:none;color:transparent;font-size:16px}
 .side-collapsed .side-toggle{left:64px}
 .side-toggle:before{content:'';position:absolute;left:7px;top:19px;width:2px;height:26px;border-radius:2px;background:#9fa2a54d;transition:background .16s,height .16s}
 .side-toggle:hover,.side-toggle:focus-visible{background:#868a8e14;color:#b4b6b9;box-shadow:none;outline:none}
 .side-toggle:hover:before,.side-toggle:focus-visible:before{background:#85a1be;height:42px;top:11px}
 .side:has(.side-toggle:hover){box-shadow:inset -1px 0 #868a8e55}
}
.wish-heading{column-gap:12px}.wish-heading .wish-color-legend{margin:0;align-self:center;flex:1;min-width:0}
.schedule-matrix tbody .matrix-name{font-size:17px;line-height:1.4}.schedule-matrix tbody .matrix-name small{font-size:12px;line-height:1.5;margin-top:3px}
.matrix-legend .legend-swatch.conflict-swatch{display:inline-block;width:13px;height:13px;min-width:13px;background:#c47b36;border:1px solid #e6a95f;border-radius:3px}
@media(max-width:900px){.wish-heading .wish-color-legend{grid-column:1/-1;margin-top:0}.schedule-matrix tbody .matrix-name{font-size:16px}}
/* Rounded seam tab: a small extension of the sidebar surface. */
@media(min-width:901px){
 .side-toggle,.side-collapsed .side-toggle{left:241px;width:17px;height:54px;border:1px solid #9fa2a535;border-left:0;border-radius:0 13px 13px 0;background:#30343b;color:#b6b8bb;box-shadow:2px 0 4px #1a1a1b12;font-size:18px}
 .side-collapsed .side-toggle{left:67px}
 .side-toggle:before{display:none}
 .side-toggle:hover,.side-toggle:focus-visible{background:#69452f;color:#fff;box-shadow:3px 0 7px #1a1a1b25}
 html[data-theme=dark] .side-toggle{background:#212324;border-color:#7c80843b}
 html[data-theme=dark] .side-toggle:hover,html[data-theme=dark] .side-toggle:focus-visible{background:#28394b}
}
/* Compact names leave room for four lanes in a typical mobile week. */
@media(max-width:900px){
 .wish-layout .wish-date-head{height:29px;min-height:29px;gap:0}
 .wish-layout .wish-date-head strong{height:16px;line-height:16px}
 .wish-layout .wish-date-meta .holiday-badge{font-size:9px;line-height:11px;padding:0 1px}
 .wish-layout .wish-bars{padding:30px 0 2px;grid-auto-rows:minmax(15px,auto);gap:2px 0}
 .wish-layout .wish-bar.color-wish{min-height:15px;padding:1px 2px;line-height:13px;font-size:11px;margin:0 2px;border-radius:3px}
}
@media(max-width:900px){
 .wish-layout .wish-date{padding-top:2px}
 .wish-layout .wish-bars{padding-top:34px}
 .wish-layout .wish-month{grid-auto-rows:minmax(104px,1fr);overflow-y:auto;scrollbar-width:thin}
}
/* Calendar date backgrounds must stay behind the continuous name bars. */
.wish-layout .wish-dates{z-index:0}.wish-layout .wish-bars{z-index:1}.wish-layout .wish-date-head,.employee-interface .wish-date-head{position:static!important;background:transparent!important;z-index:auto!important}.wish-bar-name{background:transparent}
.mobile-leave-menu{display:none}
.matrix-legend{flex-wrap:nowrap;gap:12px;font-size:11px}.matrix-legend>span{white-space:nowrap}
@media(max-width:900px){
 .matrix-legend{gap:6px;font-size:9px;justify-content:space-between}.matrix-legend>span{gap:3px}.matrix-legend .legend-swatch,.matrix-legend .legend-swatch.conflict-swatch{width:9px;height:9px;min-width:9px}
 .schedule-matrix{table-layout:fixed}
 .schedule-matrix .matrix-name{width:64px;min-width:64px;max-width:64px;padding:3px}
 .schedule-matrix tbody .matrix-name{font-size:11px;line-height:1.2;overflow-wrap:anywhere}.schedule-matrix tbody .matrix-name small{font-size:8px;line-height:1.15;margin-top:2px}.matrix-name .drag-handle{font-size:9px}
 .schedule-matrix .matrix-day,.schedule-matrix .matrix-cell{width:var(--matrix-day-width,38px);min-width:var(--matrix-day-width,38px);max-width:var(--matrix-day-width,38px)}
 .schedule-matrix .matrix-day button{min-height:62px;padding:2px 0}.matrix-day strong{font-size:12px}.matrix-day span,.matrix-day small,.matrix-day b{font-size:8px!important}.matrix-day .holiday-badge{font-size:8px;padding:0;overflow-wrap:anywhere}
 .schedule-matrix .matrix-cell{height:var(--matrix-row-height,42px)}.schedule-matrix .matrix-cell button{min-height:0;height:var(--matrix-row-height,42px);padding:1px;gap:1px}.matrix-cell strong{font-size:9px}.matrix-cell span,.matrix-cell small{font-size:8px;white-space:normal;overflow-wrap:anywhere}.schedule-source-colors .schedule-leave-label,.schedule-source-colors .schedule-wish-label{padding:2px!important;font-size:9px!important}
 .wish-layout{display:flex!important;flex-direction:column;gap:6px!important;height:calc(100dvh - 104px - env(safe-area-inset-bottom))}
 .wish-layout .calendar-card,.employee-interface .wish-layout .calendar-card{flex:1;min-height:0!important;height:auto!important;width:100%;padding:8px}
 .wish-layout .wish-month{grid-auto-rows:minmax(0,1fr);overflow-y:auto}
 .wish-layout .wish-heading{gap:5px;margin-bottom:5px}.wish-layout .wish-weekdays{padding:5px 0;font-size:9px}
 .wish-layout .wish-color-legend{font-size:10px;gap:4px 8px}
 .wish-layout .wish-controls,.employee-interface .wish-layout .wish-controls{flex:none;min-height:0;padding:8px;display:flex;flex-wrap:wrap;align-items:center;gap:5px;width:100%}
 .wish-controls .wish-history,.wish-controls h3,.wish-controls .wish-person-field>label,.wish-controls .wish-manager-tools{display:none!important}
 .wish-controls .wish-person-field{width:clamp(80px,22vw,88px);margin:0;flex:none}.wish-controls .wish-person-field select{padding:7px 5px;font-size:16px;font-weight:650;width:100%;height:40px;min-height:40px}
 .wish-controls .wish-leave-tools{flex:1;min-width:0}.wish-leave-tools>.tool-palette,.employee-interface .wish-leave-tools>.tool-palette{margin:0;display:flex;gap:5px;justify-content:flex-start}
 .wish-leave-tools .tool-button{flex:1;min-height:36px;padding:7px 9px;font-size:13px}
 .wish-controls .mobile-leave-menu{display:block;flex:1;min-width:68px;max-width:90px;height:36px;background:#f2f2f3;color:#293a4b;border:1px solid #d0d2d4;border-radius:8px;padding:4px;font-size:11px}
 .wish-controls .wish-totals{flex-basis:100%;font-size:10px!important;line-height:1.4!important;margin:0!important}
 .wish-controls .wish-shift-tools{flex:1;min-width:0}.wish-controls .wish-shift-tools .tool-palette{margin:0;flex-wrap:wrap}.wish-controls .wish-section-heading{justify-content:flex-end}.wish-controls .wish-section-heading:has(button){margin-bottom:3px}
 .wish-controls .wish-leave-tools>.field{margin:3px 0 0;display:flex;gap:3px;font-size:10px}.wish-controls .wish-leave-tools>.field select{padding:3px;font-size:10px;width:96px}
 html[data-theme=dark] .wish-controls .mobile-leave-menu{background:#2c2e2f;color:#ebeced;border-color:#58616c}
}
@media(min-width:901px){.schedule-matrix .matrix-day,.schedule-matrix .matrix-cell{width:var(--matrix-day-width,100px);min-width:var(--matrix-day-width,100px);max-width:var(--matrix-day-width,100px)}}

/* Keep desktop density independent of the mobile seven-day view. */
.matrix-width-control{display:flex;align-items:center;gap:9px;width:max-content;max-width:100%;font-size:12px;color:inherit;margin:0 0 12px}
.matrix-width-control span{opacity:.72;font-size:11px}.matrix-width-control input{width:140px;accent-color:#425e7b;cursor:ew-resize}
.wish-edit-button{display:inline-flex;align-items:center;justify-content:center;padding:5px!important;background:transparent!important;border-color:transparent!important;box-shadow:none;color:inherit;opacity:.72}
.wish-edit-button:hover{opacity:1;background:#84888c26!important}
@media(min-width:901px){
 .schedule-matrix{table-layout:fixed}
 .schedule-matrix .matrix-name{width:150px}
 .schedule-matrix .matrix-cell{height:62px}
 .schedule-matrix .matrix-cell button{height:61px;min-height:61px;padding:4px 2px}
 .schedule-matrix .matrix-day button{width:100%;min-width:0;padding-left:1px;padding-right:1px;overflow:hidden}
 .schedule-matrix .matrix-day em{max-width:100%}
 .schedule-matrix .matrix-cell strong,.schedule-matrix .matrix-cell span{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .matrix-wrap{max-height:none}
}
@media(max-width:900px){
 .matrix-width-control{display:none}
 .schedule-matrix tbody .matrix-name{font-size:13px;line-height:1.25}
 .matrix-legend{font-size:10.5px;gap:9px;justify-content:flex-start;letter-spacing:-.15px}
 .matrix-legend>span{display:inline-flex;align-items:center;gap:3px}
 .wish-layout .wish-controls,.employee-interface .wish-layout .wish-controls{height:100px;min-height:100px;max-height:100px;align-content:center;overflow-y:auto}
 .wish-layout .wish-heading .wish-color-legend{height:18px;min-height:18px;flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 .wish-layout .wish-heading:has(.wish-color-legend){grid-template-rows:auto 18px}
 .wish-controls .wish-shift-tools{display:flex;align-items:center;gap:6px}
 .wish-controls .wish-section-heading,.employee-interface .wish-controls .wish-section-heading{order:2;margin:0!important;flex:none}
 .wish-controls .wish-shift-tools>.tool-palette{flex:1;margin:0}
 .wish-controls .wish-edit-button{width:28px;height:30px;min-height:0}
}

/* Reserve the scrollbar track so full-month zoom never lifts the content below. */
@media(min-width:901px){.matrix-wrap{overflow-x:scroll}}
@media(max-width:900px){
 .wish-layout .wish-date-head,.employee-interface .wish-layout .wish-date-head{flex-direction:row;align-items:flex-start;height:20px;min-height:20px;gap:1px;width:100%}
 .wish-layout .wish-date-head strong{font-size:12px;height:16px;line-height:16px}
 .wish-layout .wish-date-meta{width:auto;flex:1;gap:1px;min-width:0}
 .wish-layout .wish-date-meta .holiday-badge{font-size:8px;line-height:13px;padding:0;white-space:nowrap;letter-spacing:-.3px;border-radius:3px;overflow:visible;text-overflow:clip}
 .wish-layout .wish-bars{padding-top:25px}
 .wish-layout .wish-controls,.employee-interface .wish-layout .wish-controls{height:76px;min-height:76px;max-height:76px;padding:6px 8px;gap:4px;align-content:center}
 .wish-controls .wish-totals{line-height:1.35!important}
}

@media(min-width:901px){
 .schedule-matrix .matrix-day button{height:88px;min-height:88px;max-height:88px;overflow:hidden}
 .matrix-wrap[data-compact="1"] .matrix-day span,.matrix-wrap[data-compact="1"] .matrix-day b,.matrix-wrap[data-compact="1"] .matrix-day small{font-size:9px;line-height:1.15}
}

.self-leave-permissions{margin:16px 0 0;border:1px solid #9fa2a555;border-radius:10px;padding:12px}.self-leave-permissions legend{padding:0 6px;font-size:13px;font-weight:700}
.wish-person-field.store-closed-person select{pointer-events:none;opacity:1}
.wish-controls .store-closed-tool{color:#b53636!important;border-color:#c96c6c!important;background:#fff0ee!important}
.wish-controls .store-closed-tool.active{color:#fff!important;background:#b84747!important;border-color:#b84747!important;box-shadow:0 0 0 2px #db8d8d44}
.wish-layout .wish-date.shop-closed{background:#fff0ee}.wish-date .shop-closed-label{background:#b84747;color:#fff}
html[data-theme=dark] .wish-controls .store-closed-tool{color:#ffc4bd!important;background:#452b2a!important;border-color:#c87872!important}
html[data-theme=dark] .wish-controls .store-closed-tool.active{color:#fff!important;background:#a54343!important}
html[data-theme=dark] .wish-layout .wish-date.shop-closed{background:#452b2a}
/* Settings sections retain their form values when folded. */
.settings-card-heading{display:flex;align-items:center;gap:14px;min-height:44px;margin-bottom:18px}
.settings-card-heading h2{margin:0;min-width:0}
.settings-card-heading .settings-inline-content{margin:0;min-height:38px}
.settings-collapse{margin-left:auto;flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;border:1px solid transparent;background:transparent;color:inherit;border-radius:9px;cursor:pointer;opacity:.65;transition:background .15s,opacity .15s}
.settings-collapse:hover,.settings-collapse:focus-visible{background:#7a7e8322;opacity:1}
.settings-collapse svg{width:19px;height:19px;transition:transform .18s}
.settings-collapse[aria-expanded=false] svg{transform:rotate(-90deg)}
.settings-collapsible:has(>.settings-card-body[hidden])>.settings-card-heading,.appearance-settings>.settings-card-heading{margin-bottom:0}
.settings-card-body[hidden],.settings-inline-content[hidden]{display:none!important}
.status-switch input[value="0"]+span{color:#af454b}
.status-switch input[value="0"]:checked+span{background:#b64c54;color:#fff;box-shadow:0 1px 5px #72232c25}
html[data-theme=dark] .status-switch input[value="0"]+span{color:#f2a0a5}
html[data-theme=dark] .status-switch input[value="0"]:checked+span{background:#ad4852;color:#fff}
.status-switch input:focus-visible+span{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:600px){.settings-card-heading{gap:8px}.settings-card-heading h2{font-size:18px}.settings-card-heading .settings-inline-content{font-size:13px;padding:7px 10px}.settings-collapse{flex-basis:32px;width:32px}.job-title-detail .note{line-height:1.5}}
.settings-page{display:grid;gap:16px;align-items:start}
.settings-page>.card,.settings-page>.grid{margin-top:0;margin-bottom:0}
.people-page-actions{display:flex;justify-content:flex-end;margin-bottom:16px}
.permission-page{display:grid;gap:18px;align-items:start}
.manual-clock-card form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;margin-top:16px}
.manual-clock-card form>.button{justify-self:start;grid-column:1/-1}
.company-cards{display:grid;gap:14px}
.company-entry{padding:16px;border:1px solid #dfe0e2;border-radius:12px}
.company-entry .card-head{margin-bottom:6px}
.company-action-group{margin-top:14px;border-top:1px solid #dfe0e2;padding-top:12px}
.company-action-group>.toolbar{margin:8px 0}
html[data-theme=dark] .company-entry,html[data-theme=dark] .company-action-group{border-color:#494c4f}
@media(min-width:901px){.shell>.side{position:sticky;top:0;height:100dvh;align-self:start;overflow-y:auto;scrollbar-width:thin}.shell>.side .side-toggle{position:fixed}}
@media(max-width:600px){.manual-clock-card form{grid-template-columns:minmax(0,1fr)}.company-entry{padding:12px}.company-entry .toolbar{gap:7px}}
.category-order-row{position:relative;justify-content:flex-start}
.category-order-row>strong{flex:1}
.person .category-drag-handle{touch-action:none;user-select:none;cursor:grab;background:transparent;color:#797d81;font-size:21px;padding:5px 7px;min-width:32px}
.person .category-drag-handle:active{cursor:grabbing}
.category-order-row.dragging{opacity:.55}
.category-order-row.drag-before:before,.category-order-row.drag-after:after{content:'';position:absolute;left:0;right:0;height:3px;border-radius:3px;background:#a7502e}
.category-order-row.drag-before:before{top:-5px}.category-order-row.drag-after:after{bottom:-5px}
html[data-theme=dark] .person .category-drag-handle{color:#bcbec1}
.platform-management{max-width:850px}
@media(max-width:900px){
 .wish-layout .wish-date-meta{min-width:0;align-items:flex-start}
 .wish-layout .wish-date-meta .holiday-badge{display:flex;align-items:center;justify-content:space-evenly;width:100%;max-width:none;min-width:0;height:15px;font-size:clamp(7px,2vw,10px);line-height:13px;padding:0;letter-spacing:0;flex:none;box-sizing:border-box}
 .wish-layout .wish-date-meta .holiday-badge>span{display:block;flex:none;font:inherit;line-height:inherit}
}
@media(max-width:900px){
 .wish-layout .wish-date-head strong{flex:0 0 2ch;width:2ch;font-variant-numeric:tabular-nums}
 .wish-layout .wish-date-meta .holiday-badge{font-size:clamp(7px,1.9vw,9px)}
}

.people-heading-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.people-heading-actions h2{margin:0}@media(max-width:600px){.people-page .card-head>.people-heading-actions{flex-basis:auto}.people-heading-actions{gap:10px}}
/* Planned times and actual punches share the same two-column alignment. */
.today-shift-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.today-company-name{font-size:17px;overflow-wrap:anywhere}.today-shift .today-shift-time{display:grid;grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr);gap:0;text-align:center}.today-shift-time>time{min-width:0}.today-shift-time>span{font-size:18px}.today-shift .today-punch-actions{margin-top:20px;gap:10px;align-items:stretch}.today-punch-result{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:58px;padding:8px 4px;border:1px solid var(--home-border);border-radius:13px;background:var(--home-soft);text-align:center;box-sizing:border-box}.today-punch-result>span{font-size:12px;color:var(--home-muted)}.today-punch-result>strong{font-size:20px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.today-punch-actions>*{min-width:0}@media(max-width:900px){.today-company-name{font-size:15px}.today-shift .today-punch-actions{margin-top:16px}.today-punch-result{min-height:60px}.employee-interface .today-punch-result{min-height:52px}.today-punch-result>strong{font-size:18px}}

.today-shift-time>span{justify-self:center;letter-spacing:0;line-height:1}.today-work-card #todayWorkTitle{line-height:1.5}

@media(max-width:900px){.today-work-card #todayWorkTitle{font-size:clamp(15px,4.15vw,18px);word-break:keep-all;overflow-wrap:anywhere}}

.branch-settings .toolbar input{flex:1;min-width:140px;max-width:100%}.branch-settings .person>div:first-child{min-width:0;overflow-wrap:anywhere}.branch-support{border:1px solid var(--border,#ced0d2);border-radius:10px;padding:14px;display:grid;gap:12px}.branch-support label{display:flex;align-items:center;gap:6px}.branch-support input{width:auto}
.branch-switcher{display:flex;align-items:center;gap:10px;margin:0 0 12px;flex-wrap:wrap;font-size:13px}.branch-switcher label{font-weight:600}.branch-switcher select{border:1px solid #cdcfd1;border-radius:10px;padding:7px 30px 7px 10px;max-width:100%;background:#f1f2f2;color:#243343}.branch-member .person-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}html[data-theme=dark] .branch-switcher select{background:#2c2e30;color:#eaebec;border-color:#535659}@media(max-width:700px){.branch-switcher{gap:7px;margin-bottom:8px}.branch-member .person-actions{max-width:100px}.branch-member .person-actions button{font-size:12px;padding:6px 8px}}


.branch-settings .toolbar input{border:1px solid #ced0d2;border-radius:10px;background:#fff;color:#292a30;padding:10px 12px}.branch-settings .person-actions{flex-shrink:0}html[data-theme=dark] .branch-settings .toolbar input{background:#1c1f23;color:#f0f1f5;border-color:#58616c}html[data-theme=dark] .branch-support{border-color:#58616c}html[data-theme=dark] .branch-settings .pill{background:#28394b;color:#e3e4e5}


.branch-list{display:grid;gap:10px;margin-top:16px}.branch-entry{border:1px solid #e0e1e2;border-radius:12px;overflow:hidden}.branch-entry>summary{display:flex;align-items:center;gap:8px;padding:14px;cursor:pointer;list-style:none}.branch-entry>summary::-webkit-details-marker{display:none}.branch-entry>summary strong{min-width:0;overflow-wrap:anywhere}.branch-member-count{margin-left:auto;white-space:nowrap}.branch-chevron{transition:transform .18s ease}.branch-entry[open] .branch-chevron{transform:rotate(180deg)}.branch-entry>summary:hover{background:#f0f0f1}.branch-entry>summary:focus-visible{outline:2px solid #e5a078;outline-offset:-3px}.branch-entry-body{padding:0 14px 10px;border-top:1px solid #e0e1e2}.branch-actions{display:flex;gap:8px;padding:12px 0}.branch-member>button{flex-shrink:0}.branch-empty{line-height:1.6}.branch-support [data-branch-support]{display:grid;gap:12px}html[data-theme=dark] .branch-entry,html[data-theme=dark] .branch-entry-body{border-color:#45484b}html[data-theme=dark] .branch-entry>summary:hover{background:#343940}@media(max-width:700px){.branch-entry>summary{padding:12px;gap:6px}.branch-entry>summary .pill{font-size:10px;white-space:nowrap}.branch-entry-body{padding:0 10px 8px}.branch-member .note{font-size:11px}.branch-member>button{font-size:12px;padding:7px 9px}}


/* Shared card outline and compact branch/menu controls. */
[data-page=schedule] .matrix-card,[data-page=schedule] .personal-schedule-layout .calendar-card,.employee-interface[data-page=schedule] .matrix-card,.employee-interface[data-page=schedule] .personal-schedule-layout .calendar-card{border-radius:18px}
.branch-chevron{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;color:#6d7175;line-height:1}
.branch-chevron svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme=dark] .branch-chevron{color:#c5c6c8}
.side>.branch-switcher{display:grid;gap:7px;margin:0;padding:0 10px;color:#e1e2e3}
.side>.branch-switcher select{width:100%;min-width:0;background:#69452f;color:#fff;border-color:#666a6e;font-size:12px}
.side-collapsed .side>.branch-switcher{display:none}
.mobile-publish-button{display:none}
@media(max-width:900px){
 [data-page=schedule] .unified-schedule-heading{grid-template-columns:auto auto minmax(0,1fr);gap:5px}
 [data-page=schedule] .unified-schedule-heading:not(:has(.mobile-publish-button)){grid-template-columns:auto minmax(0,1fr)}
 .mobile-publish-button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:10px!important;padding:7px 5px!important;min-height:32px}
 [data-page=schedule] .unified-schedule-heading .schedule-heading-actions{display:none}
 [data-page=schedule] .unified-schedule-heading .schedule-month{gap:4px;min-width:0}
 [data-page=schedule] .unified-schedule-heading .schedule-month strong{font-size:clamp(11px,3.3vw,16px);white-space:nowrap}
 [data-page=schedule] .unified-schedule-heading .schedule-month>button{width:25px;height:30px;min-width:25px;padding:0}
 [data-page=schedule] .unified-schedule-heading .schedule-mode-toggle{flex-shrink:0}
 .mobile-home button{min-width:0}
 .modal .branch-switcher{display:grid;gap:10px;margin:16px 0}
}

.nav .collapsed-branch-button{display:none}.side-collapsed .nav .collapsed-branch-button{display:block}

/* Mobile planning pages share one header, calendar and lower-panel geometry. */
.schedule-quota-panel{display:none}
@media(max-width:900px){
 .personal-schedule-layout,.employee-interface .personal-schedule-layout{display:flex;flex-direction:column;gap:6px;height:calc(100dvh - 104px - env(safe-area-inset-bottom))}
 [data-page=schedule] .personal-schedule-layout .calendar-card,.employee-interface[data-page=schedule] .personal-schedule-layout .calendar-card{flex:1;min-height:0!important;height:auto!important;width:100%;padding:8px}
 .schedule-quota-panel{display:flex;align-items:center;height:76px;min-height:76px;max-height:76px;flex:none;padding:8px;width:100%}
 .schedule-quota-panel .quota-summary{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:0;width:100%}
 .schedule-quota-panel .quota-summary span{font-size:12px;padding:6px;white-space:nowrap}
 .schedule-quota-panel .quota-summary .button{font-size:11px;padding:6px;white-space:nowrap;margin-left:auto}
 [data-page=schedule] .unified-schedule-heading>.quota-summary{display:none}
 .wish-layout .unified-schedule-heading,[data-page=schedule] .unified-schedule-heading,[data-page=schedule] .unified-schedule-heading:not(:has(.mobile-publish-button)){
  display:grid;grid-template-columns:84px minmax(0,1fr) auto;grid-template-rows:44px 18px;gap:5px;align-items:center;margin-bottom:5px;min-height:0;flex:none
 }
 .wish-layout .unified-schedule-heading>.schedule-mode-toggle,[data-page=schedule] .unified-schedule-heading>.schedule-mode-toggle{grid-column:1;grid-row:1;width:84px;height:44px;margin:0}
 .wish-layout .unified-schedule-heading>.schedule-month,[data-page=schedule] .unified-schedule-heading>.schedule-month{grid-column:3;grid-row:1;gap:4px;min-width:0;justify-content:flex-end}
 .wish-layout .unified-schedule-heading>.schedule-month strong,[data-page=schedule] .unified-schedule-heading>.schedule-month strong{font-size:clamp(11px,3.3vw,16px);white-space:nowrap}
 .wish-layout .unified-schedule-heading>.schedule-month>button,[data-page=schedule] .unified-schedule-heading>.schedule-month>button{width:25px;height:30px;min-width:25px;padding:0}
 [data-page=schedule] .mobile-publish-button{grid-column:2;grid-row:1;justify-self:center}
 .wish-layout .unified-schedule-heading>.wish-color-legend{grid-column:1/-1;grid-row:2;margin:0;height:18px}
 .personal-schedule-layout .wish-weekdays,.employee-interface .personal-schedule-layout .wish-weekdays{padding:5px 0;font-size:9px;flex:none}
 .personal-schedule-layout .wish-month{flex:1;min-height:0;display:grid;grid-auto-rows:minmax(0,1fr);overflow-y:auto}
 [data-page=schedule]>.main>.schedule-quota-panel{margin:6px 0 18px}
 [data-page=schedule] .matrix-card{margin-bottom:6px}
}

.mobile-matrix-legend{display:none}
@media(max-width:900px){
 [data-page=schedule] .matrix-card,.employee-interface[data-page=schedule] .matrix-card{padding:8px}
 .matrix-card .desktop-matrix-legend{display:none}
 .unified-schedule-heading>.mobile-matrix-legend{grid-column:1/-1;grid-row:2;display:flex;align-items:center;height:18px;min-height:18px;margin:0;padding:0;gap:8px;font-size:10px;line-height:18px;letter-spacing:0;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:nowrap;min-width:0}
 .mobile-matrix-legend>span{display:inline-flex;align-items:center;gap:4px;flex:none}
 .mobile-matrix-legend .legend-swatch,.mobile-matrix-legend .legend-swatch.conflict-swatch{width:13px;height:13px;min-width:13px;border-radius:4px}
}

@media(max-width:900px){[data-page=schedule] .matrix-card,.employee-interface[data-page=schedule] .matrix-card{height:calc(100dvh - 186px - env(safe-area-inset-bottom));display:flex;flex-direction:column}.matrix-card .matrix-wrap{flex:none;min-height:0}}

/* Palette ordering uses the same single insertion marker as other editors. */
.palette-order-row{position:relative;gap:7px}.palette-row-description{flex:1;min-width:0}.palette-drag-handle{touch-action:none;cursor:grab!important;flex:none;background:transparent!important;font-size:20px!important;color:#868a8f!important;padding:4px!important}.palette-order-buttons{display:inline-flex;gap:3px}.palette-order-row.drag-before:before,.palette-order-row.drag-after:after{content:'';position:absolute;left:0;right:0;height:3px;background:#a7502e;border-radius:3px}.palette-order-row.drag-before:before{top:-5px}.palette-order-row.drag-after:after{bottom:-5px}
@media(min-width:901px){
 .shell[data-page=schedule]:has(.matrix-card)>.main{height:100dvh;display:flex;flex-direction:column;gap:12px;padding-top:20px;padding-bottom:20px;overflow:hidden}
 [data-page=schedule] .matrix-card{display:flex;flex-direction:column;flex:1;min-height:0;margin:0;padding:16px}
 [data-page=schedule] .matrix-wrap{flex:1;min-height:0;max-height:none}
 [data-page=schedule] .unified-schedule-heading{gap:8px;justify-content:flex-start;margin-bottom:10px}
 .unified-schedule-heading>.desktop-matrix-legend{display:flex;margin:0;gap:9px;font-size:10px;line-height:1.4}
 .matrix-zoom-cell .matrix-width-control{display:grid;grid-template-columns:auto 1fr auto;gap:2px 4px;width:100%;padding:6px;margin:0;font-size:10px;font-weight:400}
 .matrix-zoom-cell .matrix-width-control>span{font-size:9px}.matrix-zoom-cell .matrix-width-control input{grid-column:1/-1;grid-row:2;width:100%;min-width:0;margin:3px 0;accent-color:#425e7b}
 [data-page=schedule] .schedule-tools{flex:none;display:grid;grid-template-columns:minmax(0,2.4fr) minmax(100px,.7fr) minmax(165px,1.3fr);gap:12px;padding:12px 14px;margin:0;overflow:visible}
 .schedule-tools>.tool-section{position:relative;min-width:0}.schedule-tools>.tool-section+.tool-section{margin:0;padding:0 0 0 12px;border-top:0;border-left:1px solid #ced0d2}
 .schedule-tools .tool-heading{gap:6px;justify-content:flex-start;margin-bottom:7px}.schedule-tools h3{font-size:13px;margin:0 0 7px}.schedule-tools .tool-heading h3{margin:0}
 .schedule-tools .tool-palette{gap:5px;margin:0}.schedule-tools .tool-button{font-size:11px;padding:6px 8px}.schedule-tools .tool-heading .button{font-size:10px;padding:5px 7px}
 .schedule-tools .custom-shift-fields{position:absolute;bottom:100%;left:0;z-index:6;width:min(460px,65vw);max-height:55vh;overflow:auto;margin-bottom:14px;border:1px solid #d2d3d5;box-shadow:0 8px 28px #0003}
 html[data-theme=dark] .schedule-tools>.tool-section+.tool-section{border-color:#58616c}
}

/* The time block and independent day notes always occupy the same slots. */
.schedule-matrix .matrix-work-time{display:flex;flex-direction:column;gap:1px;line-height:1.2}
.schedule-matrix .matrix-work-time>span{font-size:12px;font-weight:700;white-space:nowrap;overflow-wrap:normal}
.schedule-matrix .matrix-cell-notes{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 4px;line-height:1.2}
.schedule-matrix .matrix-cell-notes>span{font-size:11px;font-weight:700;white-space:nowrap}
@media(max-width:767px){
 .schedule-matrix .matrix-work-time>span{font-size:9px}
 .schedule-matrix .matrix-cell-notes>span{font-size:9px}
}

/* Notes flank the time on desktop, and frame it vertically on phones. */
.schedule-matrix .matrix-cell-layout{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;width:100%;gap:3px;line-height:1.1}
.schedule-matrix .matrix-cell-main{display:flex;flex-direction:column;align-items:center;min-width:0}
.schedule-matrix .matrix-work-time{align-items:center;gap:2px}
.schedule-matrix .matrix-time-divider{display:block;width:1px;height:5px;background:currentColor;opacity:.65;flex:none}
.schedule-matrix .matrix-work-time.wish-fulfilled{border:1px solid var(--wish-label-border);background:var(--wish-label-bg);color:var(--wish-label-text);border-radius:6px;padding:3px 5px;box-sizing:border-box;width:42px;height:48px;justify-content:center;flex:none}
.schedule-matrix.schedule-source-colors .matrix-cell.conflict,html[data-theme=dark] .schedule-matrix.schedule-source-colors .matrix-cell.conflict{background:var(--schedule-cell-bg);box-shadow:none}
.schedule-matrix .matrix-work-time.wish-fulfilled.wish-conflict{border-color:#c95454;background:#fbe5e5;color:#a52c2c}
html[data-theme=dark] .schedule-matrix .matrix-work-time.wish-fulfilled.wish-conflict{border-color:#df8585;background:#663838;color:#ffe5e5}
.matrix-legend .legend-swatch.conflict-swatch{background:#c95454;border-color:#e7a1a1}
html[data-theme=dark] .matrix-legend .legend-swatch.conflict-swatch{background:#a64e4e;border-color:#df8585}
.schedule-matrix.schedule-source-colors .schedule-leave-label,.schedule-matrix.schedule-source-colors .schedule-wish-label{display:inline-flex;align-items:center;justify-content:center;width:42px;min-width:42px;height:48px;padding:2px!important;font-size:12px;line-height:1.1;font-weight:700}
@media(max-width:767px){
 .schedule-matrix .matrix-work-time.wish-fulfilled{padding:2px 3px;border-radius:4px;width:32px;height:34px}
 .schedule-matrix.schedule-source-colors .schedule-leave-label,.schedule-matrix.schedule-source-colors .schedule-wish-label{width:32px;min-width:0;max-width:100%;height:34px;font-size:9px!important}
}
.schedule-matrix .matrix-cell-notes{display:flex;align-items:center;justify-content:center;gap:2px;min-width:0}
.schedule-matrix .matrix-cell-notes>span{writing-mode:vertical-rl;text-orientation:upright;white-space:normal;line-height:1.15}
@media(max-width:767px){
 .schedule-matrix .matrix-cell-layout{grid-template-columns:minmax(0,1fr);gap:1px}
 .schedule-matrix .matrix-work-time{gap:1px;line-height:1.05}
 .schedule-matrix .matrix-time-divider{height:4px}
 .schedule-matrix .matrix-cell-notes{gap:1px 3px;line-height:1}
 .schedule-matrix .matrix-cell-notes:empty{display:none}
 .schedule-matrix .matrix-cell-notes>span{writing-mode:horizontal-tb;text-orientation:mixed;font-size:9px;line-height:1.05;white-space:normal}
}

.shift-form-fields{display:grid;gap:10px;margin:14px 0}
.shift-form-fields .field{margin:0;min-width:0}
.shift-form-identity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:end}
.shift-form-times{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:end}
.shift-form-fields input,.shift-form-fields select{width:100%}
.shift-form-fields .field-label-actions{min-height:28px}
.shift-form-times .shift-time-part{padding:7px 5px}
.shift-form-times label{white-space:nowrap;font-size:12px}
.shift-help-button{border:1px solid currentColor;background:transparent;color:inherit;border-radius:50%;width:22px;height:22px;font-size:13px;cursor:pointer;opacity:.8}
.shift-help-button:hover{opacity:1;background:#45638122}
.shift-scope-preview{margin:7px 0 0;font-size:11px;line-height:1.5}
.shift-mapping-guide{margin:10px 0;font-size:12px}.shift-mapping-guide summary{cursor:pointer}
.shift-mapping-table{overflow-x:auto;margin:10px 0}.shift-mapping-table table{width:100%;border-collapse:collapse;font-size:12px}.shift-mapping-table th,.shift-mapping-table td{padding:7px;text-align:left;border-bottom:1px solid #858a8e44;white-space:nowrap}
.shift-time-choices{display:grid;gap:8px}.shift-time-choices .button{display:flex;flex-direction:column;gap:5px;text-align:left}.shift-time-choices span{font-size:12px}
@media(max-width:480px){.shift-form-fields{gap:9px}.shift-form-identity{gap:8px}.shift-form-times{gap:5px}.shift-form-times label{font-size:10px;letter-spacing:-.4px}.shift-form-times .shift-time-control{font-size:13px}.shift-form-times .shift-time-part{padding:7px 2px}.shift-form-times input{padding-left:7px;padding-right:7px}}

.shift-form-identity>.field>label,.shift-form-identity .field-label-actions{height:28px;margin:0 0 6px;display:flex;align-items:center}
.shift-form-identity .field-label-actions>label{margin:0}
.shift-form-times>.field>label{line-height:1.3;margin:0 0 6px}
.shift-form-times input{height:43px}

.custom-shift-summary{display:flex;align-items:center;gap:8px;margin-top:7px;font-size:11px;flex-wrap:wrap}
.custom-shift-error{color:#c4574d!important;margin:5px 0!important;min-height:1em}
.schedule-tools .tool-heading{flex-wrap:wrap}

/* Desktop calendars share a right panel; the matrix keeps compact lower tools. */
@media(min-width:901px){
 .shell:is([data-page=wishes],[data-page=schedule])>.main{height:100dvh;display:flex;flex-direction:column;gap:12px;padding-top:20px;padding-bottom:20px;overflow:hidden;--planning-tools-height:120px}
 .wish-layout,.personal-schedule-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 290px;grid-template-rows:minmax(0,1fr);gap:12px;width:100%;flex:1;min-height:0;align-items:stretch}
 .grid.wish-layout{align-items:stretch}
 .wish-layout .calendar-card,[data-page=schedule] .personal-schedule-layout .calendar-card,[data-page=schedule] .matrix-card,.employee-interface .wish-layout .calendar-card{display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0;height:auto;padding:16px;margin:0;border-radius:18px}
 [data-page=schedule] .schedule-tools{flex:none;grid-template-columns:minmax(0,2fr) minmax(150px,.9fr) minmax(180px,1.3fr);height:var(--planning-tools-height);min-height:var(--planning-tools-height);max-height:var(--planning-tools-height);padding:10px 14px;margin:0;overflow-y:auto;scrollbar-width:thin}
 .wish-layout .wish-controls{display:block;width:100%;height:auto;min-height:0;max-height:100%;padding:18px;margin:0;overflow-y:auto;scrollbar-width:thin}
 .wish-controls .field{margin-bottom:16px}.wish-controls .tool-palette{margin:8px 0 16px}.wish-controls .wish-totals{margin:12px 0;font-size:13px;line-height:1.7}
 .wish-controls h3{font-size:15px;margin:0 0 8px}.wish-controls .tool-button{padding:8px 11px;font-size:14px}
 .wish-controls .wish-history{min-width:0;margin-top:18px;padding-top:18px}.wish-history .panel-list{max-height:220px;overflow-y:auto;margin:0}
 .personal-schedule-layout{padding-bottom:0}
 .personal-schedule-layout>.schedule-quota-panel{display:block;padding:18px;align-self:start}
 .personal-schedule-layout>.schedule-quota-panel .quota-summary{display:flex;flex-wrap:wrap;gap:10px;margin:0}
 .personal-schedule-layout>.schedule-quota-panel .quota-summary span{font-size:15px}
 .wish-layout .unified-schedule-heading,[data-page=schedule] .personal-schedule-layout .unified-schedule-heading{grid-template-columns:80px minmax(0,1fr)}
 .wish-layout .unified-schedule-heading>.wish-color-legend{grid-column:1/-1;grid-row:2;flex-wrap:wrap}
 .personal-schedule-layout .unified-schedule-heading>.quota-summary{display:none}
 .personal-schedule-layout .unified-schedule-heading>.schedule-heading-actions{grid-column:1/-1;grid-row:2}
 [data-page=schedule] .schedule-tools h3{font-size:16px}.schedule-tools .tool-heading h3{font-size:16px}
 [data-page=schedule] .schedule-tools .tool-button{font-size:14px;padding:7px 10px}
 [data-page=schedule] .schedule-tools .tool-heading .button{font-size:12px;padding:5px 8px;white-space:nowrap;margin-left:0}
 [data-page=schedule] .schedule-tools h3{white-space:nowrap}
 [data-page=schedule] .schedule-tools .tool-palette{gap:6px}.schedule-tools .shift-scope-preview,.schedule-tools .custom-shift-summary{font-size:13px}
 .wish-layout .wish-month,.personal-schedule-layout .wish-month{display:grid;grid-auto-rows:minmax(0,1fr);flex:1;min-height:0;overflow-y:auto}
 .wish-layout .wish-week,.personal-calendar-week{min-height:0}
 .wish-layout .wish-weekdays,.personal-schedule-layout .wish-weekdays{flex:none;height:34px;padding:9px 0;font-size:11px}
 .wish-layout .unified-schedule-heading,[data-page=schedule] .unified-schedule-heading{display:grid;grid-template-columns:80px 220px minmax(0,1fr);grid-template-rows:44px 32px;gap:6px 12px;min-height:82px;height:82px;flex:none;margin:0 0 10px;align-items:center}
 .unified-schedule-heading>.schedule-mode-toggle{grid-column:1;grid-row:1;width:80px;height:44px;margin:0}
 .unified-schedule-heading>.schedule-month{grid-column:2;grid-row:1;justify-content:space-between;gap:8px;margin:0}
 .unified-schedule-heading>.schedule-month strong{font-size:17px}
 .unified-schedule-heading>.wish-color-legend,.unified-schedule-heading>.quota-summary{grid-column:3;grid-row:1;margin:0;min-width:0;justify-content:flex-start;gap:8px;flex-wrap:nowrap}
 .unified-schedule-heading>.desktop-matrix-legend{grid-column:1/-1;grid-row:2;justify-self:start;margin:0;font-size:11px;gap:10px}
 .unified-schedule-heading>.schedule-heading-actions{grid-column:3;grid-row:2;justify-self:end;margin:0;gap:6px;flex-wrap:nowrap}
 .unified-schedule-heading>.quota-summary span{font-size:14px;padding:6px 8px}.unified-schedule-heading>.quota-summary .button{font-size:11px;padding:6px 8px}
 .unified-schedule-heading>.schedule-heading-actions .button{font-size:11px;padding:6px 8px}
 .wish-layout .unified-schedule-heading,[data-page=schedule] .personal-schedule-layout .unified-schedule-heading{grid-template-columns:80px minmax(0,1fr)}
 .wish-layout .unified-schedule-heading>.wish-color-legend{grid-column:1/-1;grid-row:2;flex-wrap:wrap}
 .personal-schedule-layout .unified-schedule-heading>.schedule-heading-actions{grid-column:1/-1;grid-row:2}
 .wish-layout .unified-schedule-heading>.schedule-month,.personal-schedule-layout .unified-schedule-heading>.schedule-month{width:220px;max-width:100%}
}
@media(min-width:901px) and (max-width:1200px){
 .shell:is([data-page=wishes],[data-page=schedule])>.main{--planning-tools-height:140px}
 .wish-layout,.personal-schedule-layout{grid-template-columns:minmax(0,1fr) 240px}
 .unified-schedule-heading>.desktop-matrix-legend{font-size:9px;gap:6px}
 .unified-schedule-heading>.quota-summary{gap:5px}.unified-schedule-heading>.quota-summary span{font-size:12px;padding:5px}
 .unified-schedule-heading>.quota-summary .button{font-size:10px;padding:5px}
}

@media(min-width:901px){
 [data-page=schedule] .unified-schedule-heading{display:flex;flex-wrap:wrap;align-content:flex-start;align-items:center;gap:6px 12px;height:auto;min-height:82px}
 [data-page=schedule] .unified-schedule-heading>.schedule-month{width:220px;flex:none}
 [data-page=schedule] .unified-schedule-heading>.quota-summary{display:flex;flex-wrap:nowrap;flex:none;margin:0}
 [data-page=schedule] .unified-schedule-heading>.schedule-heading-actions{margin-left:auto;flex-wrap:nowrap}
 [data-page=schedule] .unified-schedule-heading>.desktop-matrix-legend{order:10;flex-basis:100%;min-height:26px}
 .personal-schedule-layout>.schedule-quota-panel{visibility:hidden}
 .wish-controls .wish-history .panel-list{max-height:none;overflow:visible}
}

/* Two option rows establish the baseline; extra rows expand the panel upward. */
@media(min-width:901px){
 [data-page=schedule] .schedule-tools{grid-template-columns:250px 220px minmax(260px,1fr) 160px;height:auto;min-height:0;max-height:none;align-items:start;padding:10px 14px;overflow:visible}
 .schedule-tools>.tool-section{overflow:visible;padding-right:0;min-width:0}
 .schedule-tools .tool-heading{min-height:28px;margin-bottom:6px;align-content:center}
 .schedule-tools>.tool-section>h3{min-height:28px;display:flex;align-items:center;margin-bottom:6px}
 [data-page=schedule] .schedule-tools .tool-palette{min-height:78px;align-content:flex-start;align-items:flex-start;gap:6px}
 [data-page=schedule] .schedule-tools .tool-button{white-space:nowrap;min-height:36px;padding:7px 10px}
 [data-page=schedule] .schedule-leave-section .tool-palette{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,36px);grid-auto-flow:column;gap:6px}
 [data-page=schedule] .schedule-leave-section .tool-button{padding:5px 2px;height:36px}
 [data-page=schedule] .schedule-leave-section [data-schedule-tool="leave:rest"],[data-page=schedule] .schedule-leave-section [data-schedule-tool="leave:annual"]{grid-row:span 2;height:78px;font-size:19px}
}
@media(min-width:901px) and (max-width:1450px){
 [data-page=schedule] .schedule-tools{grid-template-columns:minmax(250px,1fr) minmax(0,1.5fr);grid-template-rows:auto auto;gap:10px 12px}
 .schedule-tools>.tool-section:nth-child(3){border-left:0;padding-left:0}
 .schedule-tools>.tool-section:nth-child(n+3){border-top:1px solid #8b8f9355;padding-top:8px}
}

/* Time scheduling checks and the single-use time editor. */
.time-check-toggle{display:inline-flex;align-items:center;gap:5px;font-size:13px;cursor:pointer;white-space:nowrap;color:inherit}
.time-check-toggle input{width:16px;height:16px;margin:0;accent-color:#405b77}
.custom-time-tools{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;max-width:100%}

.schedule-heading.unified-schedule-heading > .staffing-settings-button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}

.staffing-settings-button{white-space:nowrap}
.staffing-check-toggle{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;margin:12px 0}
.staffing-check-toggle input{width:18px;height:18px;accent-color:#405b77}
@media(max-width:900px){
 .schedule-heading.unified-schedule-heading>.staffing-settings-button{display:none}
 .schedule-quota-panel.matrix-quota-panel{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:8px;align-items:center}
 .matrix-quota-panel .quota-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;justify-items:center}
 .matrix-quota-panel .quota-summary span{padding:5px 3px;font-size:12px;max-width:100%}
 .matrix-quota-panel .quota-summary>.button{grid-column:1/-1;margin:0;justify-self:center;padding:5px 8px}
 .matrix-quota-panel>.staffing-settings-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;height:52px;padding:6px;font-size:12px;line-height:1.3}
}

/* Keep the original lower-panel height, with adjacent cards visible as swipe cues. */
@media(max-width:900px){
 .matrix-quota-panel .quota-summary{grid-template-columns:max-content max-content;justify-content:start;justify-items:start;column-gap:5px}
 .matrix-quota-panel .quota-summary>.button{justify-self:start;margin-left:0}
 .matrix-carousel{--matrix-tool-label-width:62px;margin:6px 0 18px;min-width:0;flex:none}
 .matrix-carousel-stage{height:76px;position:relative;overflow:hidden;touch-action:pan-y}
 .matrix-carousel-panel{position:absolute!important;inset:0 auto 0 16px;width:calc(100% - 32px);height:76px!important;min-height:76px!important;max-height:76px!important;margin:0!important;padding:6px 8px!important;box-sizing:border-box;overflow:auto;border:1px solid #e5e6e7!important;border-radius:16px;background:#fff;box-shadow:none}
 html[data-theme=dark] .matrix-carousel-panel{background:#292528;border-color:#42474f!important}
 .matrix-carousel-panel[hidden]{display:none!important}
 .matrix-carousel-panel h3{font-size:13px;margin:0 0 4px}
 .matrix-carousel-panel .tool-heading{justify-content:flex-start;gap:8px;margin-bottom:4px}
 .matrix-carousel-panel .tool-heading h3{margin:0}
 .matrix-carousel-panel .tool-heading .button{font-size:11px;padding:3px 6px}
 .matrix-carousel-panel .tool-palette{display:flex;flex-wrap:wrap;gap:4px;margin:0}
 .matrix-carousel-panel .tool-button{font-size:13px;padding:5px 8px}
 .matrix-carousel-panel .custom-time-tools{display:inline-flex;gap:5px;align-items:center}
 .matrix-carousel-panel.matrix-quota-panel{align-content:center;grid-template-columns:minmax(0,1fr) 76px;gap:4px}
 .matrix-carousel-panel .quota-summary span{font-size:11px;padding:4px 2px}
 .matrix-carousel-panel .custom-shift-fields{margin:6px 0;padding:8px}
}

/* Two-row mobile palettes keep their card size and scroll only the options. */
@media(max-width:900px){
 .matrix-carousel-panel.tool-section{display:grid;grid-template-columns:var(--matrix-tool-label-width) minmax(0,1fr);grid-template-rows:62px;gap:4px;overflow:hidden}
 .matrix-carousel-panel.tool-section>h3,.matrix-carousel-panel.tool-section>.tool-heading{grid-column:1;grid-row:1;margin:0;align-self:start}
 .matrix-carousel-panel.tool-section>.tool-heading{display:flex;flex-wrap:wrap;gap:3px;align-content:flex-start;align-items:center}
 .matrix-carousel-panel.tool-section>.tool-heading h3{flex:0 0 100%;font-size:13px;line-height:22px;white-space:nowrap}
 .matrix-carousel-panel.tool-section>.tool-heading .button{font-size:9.5px;padding:4px 1px;white-space:nowrap;margin-left:0!important}
 .matrix-carousel-panel .shift-help-button{width:14px;height:20px;font-size:11px;padding:0;margin:0}
 .matrix-carousel-panel.tool-section>.tool-palette{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,29px);grid-auto-rows:29px;grid-auto-flow:row;gap:4px;height:62px;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;scrollbar-width:none;overscroll-behavior:contain;touch-action:pan-y}
 .matrix-carousel-panel.tool-section .tool-button{height:auto;min-height:0;min-width:0;padding:2px 0;font-size:11px;line-height:1.2;box-shadow:none;border-radius:7px;overflow-wrap:anywhere}
 .matrix-carousel-panel.tool-section.matrix-palette-large .tool-palette>.tool-button{grid-row:span 2}
 .matrix-carousel-panel.tool-section.schedule-time-section>.tool-palette{grid-template-columns:repeat(4,minmax(0,1fr))}
 .matrix-carousel-panel.tool-section.schedule-time-section .tool-button{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .matrix-carousel-panel.tool-section .custom-time-tools{display:flex;min-width:0;flex-direction:column;gap:2px}
 .matrix-carousel-panel.tool-section .custom-time-tools>.tool-button{width:100%;height:29px;flex-shrink:0}
 .matrix-carousel-panel.tool-section .custom-time-tools>.button{font-size:9px;padding:3px 0;min-width:0}
 .matrix-carousel-panel .shift-scope-preview{display:none}
 .matrix-carousel-panel .time-check-toggle{gap:4px;font-size:11px;flex:0 0 100%;line-height:24px}
 .matrix-carousel-panel .time-check-toggle input{appearance:none;-webkit-appearance:none;width:28px;height:16px;flex:none;border:1px solid #a4534e;border-radius:12px;background:#ba5d56;position:relative;cursor:pointer;transition:background .15s,border-color .15s}
 .matrix-carousel-panel .time-check-toggle input:before{content:"";position:absolute;top:2px;left:2px;width:10px;height:10px;border-radius:50%;background:#fff;transition:transform .15s}
 .matrix-carousel-panel .time-check-toggle input:checked{background:#405b77;border-color:#405b77}
 .matrix-carousel-panel .time-check-toggle input:checked:before{transform:translateX(12px)}
 .matrix-carousel-panel .time-check-toggle input:focus-visible{outline:2px solid #7897b7;outline-offset:2px}
 html[data-theme=dark] .matrix-carousel-panel .time-check-toggle input:not(:checked){background:#b95953;border-color:#dc8e87}
}

/* All five mobile cards share the same left column and two 29px rows. */
@media(max-width:900px){
 .matrix-carousel-panel.matrix-quota-panel{grid-template-columns:var(--matrix-tool-label-width) minmax(0,1fr);grid-template-rows:62px;gap:4px;align-content:start;align-items:stretch}
 .matrix-carousel-panel.matrix-quota-panel>.staffing-settings-button{grid-column:1;grid-row:1;height:62px;min-width:0;padding:3px;font-size:12px;gap:4px;align-self:stretch}
 .matrix-carousel-panel.matrix-quota-panel>.quota-summary{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,29px);height:62px;gap:4px;align-items:stretch;justify-items:stretch;align-content:start}
 .matrix-carousel-panel.matrix-quota-panel>.quota-summary>span{display:flex;align-items:center;justify-content:center;height:29px;margin:0;padding:2px;font-size:11px}
 .matrix-carousel-panel.matrix-quota-panel>.quota-summary>.button{grid-column:1/-1;grid-row:2;height:29px;width:100%;justify-self:stretch;margin:0;padding:2px 6px;text-align:left}
 .matrix-carousel-panel.tool-section>.tool-heading{display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:repeat(2,29px);gap:4px 3px;align-content:start;align-items:center;height:62px;width:100%}
 .matrix-carousel-panel.tool-section>.tool-heading h3{grid-column:1/-1;grid-row:1;display:flex;align-items:center;height:29px;line-height:normal;min-width:0;margin:0}
 .matrix-carousel-panel.tool-section>.tool-heading .button{grid-column:1;grid-row:2;height:29px;margin:0!important;align-self:center}
 .matrix-carousel-panel.tool-section>.tool-heading .shift-help-button{grid-column:2;grid-row:2;align-self:center}
 .matrix-carousel-panel.tool-section>.tool-heading .time-check-toggle{grid-column:1/-1;grid-row:2;display:flex;align-items:center;height:29px;line-height:normal;margin:0}
 .matrix-carousel-panel.tool-section>h3{height:29px;display:flex;align-items:center;line-height:normal;margin:0}
}

.quota-mode-card{border:1px solid #ced0d2;border-radius:12px;padding:12px;margin:12px 0}
.quota-mode-title{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;margin-bottom:10px}
.quota-mode-title input{accent-color:#405b77;margin:0;width:17px;height:17px}
.quota-mode-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.quota-mode-fields>label{display:grid;gap:6px;font-size:13px}
.quota-mode-fields>label>span{display:flex;align-items:center;gap:6px}
.quota-mode-fields input{width:70px;min-width:0;padding:8px;border:1px solid #ced0d2;border-radius:8px;background:#fff;color:inherit}
.quota-mode-fields .quota-day-picker{width:76px;height:40px;min-width:0;padding:6px 10px;font:inherit;font-size:16px;border:1px solid #ced0d2;border-radius:8px;background:#fff;color:inherit;color-scheme:light}
html[data-theme=dark] .quota-mode-fields .quota-day-picker{border-color:#58616c;background:#1f2022;color-scheme:dark}
html[data-theme=dark] .quota-mode-card{border-color:#58616c;background:#2b2f34}
html[data-theme=dark] .quota-mode-fields input{border-color:#58616c;background:#1f2022}
@media(max-width:900px){
 .matrix-carousel-panel.tool-section.matrix-palette-large>.tool-palette{grid-template-columns:repeat(var(--palette-columns,5),minmax(0,1fr))}
 .matrix-carousel-panel.matrix-quota-panel>.quota-summary>.button{display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px;font-weight:700;padding:2px 4px;line-height:1.2}
 .staffing-dialog .modal{width:min(100%,420px);padding:16px}
 .staffing-dialog .modal h2{font-size:19px}
 .staffing-dialog .pattern-form{margin:12px 0}
 .staffing-dialog .pattern-form>.inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .staffing-dialog .field{gap:5px;margin-bottom:10px;font-size:12px}
 .staffing-dialog .field input,.staffing-dialog .field select{height:38px;padding:7px 9px;font-size:14px}
 .staffing-dialog .pattern-count-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .staffing-dialog .pattern-count-fields .field{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:7px;border:1px solid #8b8f9355;border-radius:9px}
 .staffing-dialog .pattern-count-fields input{width:50px;flex:none;text-align:center}
 .staffing-dialog .pattern-form>.button{width:100%;height:38px}
 .staffing-dialog .editor-list{max-height:30dvh;margin-top:10px}
 .staffing-dialog .person{padding:9px;gap:6px}
 .staffing-dialog .person>div:first-child{min-width:0;flex:1}
 .staffing-dialog .person-actions{flex:none;gap:4px}
 .staffing-dialog .person-actions button{padding:5px;font-size:11px}
 .quota-dialog .modal{padding:18px;width:min(100%,420px)}
 .quota-dialog .quota-mode-fields{gap:8px}
 .quota-dialog .quota-mode-fields input{width:64px;height:38px}
}

/* Short labels use less space; note editing remains a readable secondary action. */
@media(max-width:900px){
 .matrix-carousel-panel.tool-section.schedule-leave-section{grid-template-columns:34px minmax(0,1fr)}
 .matrix-carousel-panel.tool-section.schedule-leave-section>h3{grid-row:1;align-self:center;height:62px;font-size:15px;justify-content:center}
 .matrix-carousel-panel.tool-section.schedule-note-section{grid-template-columns:58px minmax(0,1fr)}
 .matrix-carousel-panel.tool-section.schedule-note-section>.tool-heading{grid-template-columns:minmax(0,1fr)}
 .matrix-carousel-panel.tool-section.schedule-note-section>.tool-heading h3{font-size:15px;justify-content:center}
 .matrix-carousel-panel.tool-section.schedule-note-section>.tool-heading .button{font-size:11px;padding:2px 3px;line-height:1.2;width:100%;justify-self:stretch}
}

.today-history{position:relative}
@media(max-width:900px){
 .personal-schedule-layout>.schedule-quota-panel>.quota-summary{display:flex;flex-wrap:nowrap;align-items:stretch;height:100%;gap:8px}
 .personal-schedule-layout>.schedule-quota-panel>.quota-summary>span{flex:1;display:flex;align-items:center;justify-content:center;min-width:0;margin:0;padding:6px 3px;font-size:clamp(12px,3.6vw,16px);text-align:center}
}
.today-history>.schedule-update-dot{position:absolute;right:4px;top:4px}
.daily-clock-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.daily-clock-date{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.daily-clock-date input{font:inherit;min-width:0;width:165px;border:1px solid #ced0d2;border-radius:9px;padding:8px;background:#fff;color:inherit;color-scheme:light}
.daily-clock-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.daily-clock-person{border:1px solid #dadbdc;border-radius:12px;padding:12px;min-width:0}
.daily-clock-person-heading{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:16px}
.daily-clock-person-heading>span,.daily-clock-person-heading>small{font-size:12px}
.daily-clock-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.daily-clock-side{min-width:0}
.daily-clock-side h3{margin:0 0 8px;font-size:14px}
.daily-clock-planned,.daily-clock-actual{display:flex;flex-direction:column;gap:6px;align-items:stretch;font-size:12px}
.daily-clock-planned{padding:8px;background:#f0f0f1;border-radius:8px;margin-bottom:7px}
.daily-clock-planned strong{font-size:18px}
.daily-clock-time{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px;border:1px solid #ced0d2;border-radius:8px;background:#fff;color:inherit;min-height:44px;width:100%}
.daily-clock-time strong{font-size:18px}
.daily-clock-time small{font-size:11px}
.daily-clock-time small:empty{display:none}
.daily-clock-missing{padding:8px 0;font-weight:700}
.clock-alert{color:#b53e38!important;font-weight:700}
.daily-clock-time.clock-alert{border-color:#cf6a62;background:#fff0ee}
html[data-theme=dark] .daily-clock-person{border-color:#58616c}
html[data-theme=dark] .daily-clock-planned{background:#2e3032}
html[data-theme=dark] .daily-clock-date input,html[data-theme=dark] .daily-clock-time{background:#2b2f34;border-color:#58616c;color-scheme:dark}
html[data-theme=dark] .clock-alert{color:#f19c95!important}
html[data-theme=dark] .daily-clock-time.clock-alert{background:#442d2b;border-color:#b46c66}
@media(max-width:900px){.daily-clock-review{padding:14px}.daily-clock-review h2{font-size:18px}.daily-clock-people{grid-template-columns:minmax(0,1fr)}.daily-clock-date{gap:5px}.daily-clock-date input{width:147px}.daily-clock-person{padding:10px}.daily-clock-person-heading{font-size:15px}}
.today-management-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 12px}
.today-management-actions.has-location-settings{grid-template-columns:repeat(3,minmax(0,1fr))}
.employee-home .today-management-actions>.button{margin:0;width:100%;min-width:0;min-height:44px;padding:10px 8px;font-size:14px;display:flex;align-items:center;justify-content:center}
@media(max-width:600px){.employee-home .today-management-actions>.button{font-size:12px;padding:8px 4px}.today-management-actions{gap:8px}.today-management-actions.has-location-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.today-management-actions.has-location-settings .today-history{grid-column:1/-1}}
.clock-location-check{display:grid;gap:12px;line-height:1.5}
.clock-location-check-title{font-size:18px;color:var(--text-main)}
.clock-location-check-title.ok{color:#8bd2af}.clock-location-check-title.outside{color:#edaa93}
.clock-location-check-facts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:9px 14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.clock-location-check-facts span{color:var(--text-muted)}.clock-location-check-facts strong{text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html[data-theme=light] .clock-location-check-title.ok{color:#236b4d}html[data-theme=light] .clock-location-check-title.outside{color:#a0442d}
.clock-location-editor .modal{width:min(560px,calc(100vw - 28px))}
.clock-location-content .person{gap:10px;flex-wrap:wrap}
.daily-clock-review{--home-muted:#5c5f62;padding:18px}
html[data-theme=dark] .daily-clock-review{--home-muted:#bbbdbf}
.daily-clock-header{margin-bottom:10px}
.daily-clock-header h2{margin:0}
.daily-clock-summary{font-size:12px;margin-left:auto}
.daily-clock-draft{margin:6px 0;font-size:11px}
.daily-clock-columns,.daily-clock-person{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px}
.daily-clock-columns{margin-top:10px;padding:0 8px 6px;font-size:13px;color:var(--home-muted)}
.daily-clock-columns>div{display:grid;grid-template-columns:1fr 1fr;gap:3px;text-align:center}
.daily-clock-columns small{grid-column:1/-1;font-size:11px}
.daily-clock-people{display:block}
.daily-clock-person{border:0;border-top:1px solid #dadbdc;border-radius:0;padding:6px 8px;align-items:center;min-height:70px}
.daily-clock-person-heading{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0;font-size:16px;overflow-wrap:anywhere}
.daily-clock-pair{gap:10px;align-items:start}
.daily-clock-planned{padding:2px 6px;margin:0 0 3px;text-align:center;background:transparent!important}
.daily-clock-planned strong{font-size:13px;font-weight:500;color:var(--home-muted)}
.daily-clock-actual{gap:3px}
.daily-clock-time{flex-direction:row;flex-wrap:wrap;gap:3px 7px;min-height:32px;padding:4px 6px}
.daily-clock-time strong{font-size:16px}
.daily-clock-time small{font-size:11px}
.daily-clock-add{font-size:12px;color:var(--home-muted)}
.daily-clock-missing{padding:6px 0;text-align:center;font-size:12px}
@media(max-width:900px){
 .daily-clock-review{padding:12px}
 .daily-clock-header{gap:6px;margin-bottom:8px}
 .daily-clock-review h2{font-size:16px}
 .daily-clock-header .button{padding:5px 9px;min-height:32px;font-size:12px}
 .daily-clock-date{gap:4px;flex-wrap:nowrap}
 .daily-clock-date .button{min-height:32px;padding:4px 9px;font-size:12px}
 .daily-clock-date input{width:135px;padding:5px;font-size:13px}
 .daily-clock-columns,.daily-clock-person{grid-template-columns:64px minmax(0,1fr);gap:6px}
 .daily-clock-columns{padding:0 0 5px;margin-top:7px}
 .daily-clock-columns small{font-size:10px}
 .daily-clock-person{padding:5px 0;min-height:70px}
 .daily-clock-person-heading{font-size:14px;line-height:1.3}
 .daily-clock-pair{gap:6px}
 .daily-clock-time{padding:4px 3px;gap:2px 4px;min-height:32px}
 .daily-clock-time strong{font-size:15px}
 .daily-clock-time small{font-size:10px}
 .daily-clock-add small{font-size:10px}
 .daily-clock-summary{font-size:10px;white-space:nowrap}
}
/* Reordering lifts the complete row while retaining its original space. */
.title-drag-handle,.matrix-name .drag-handle{touch-action:none;user-select:none;cursor:grab}
.order-drag-active,.order-drag-active *{cursor:grabbing!important;user-select:none!important}
.order-drag-source{opacity:.25!important}
.order-drag-preview{position:fixed;z-index:1000;pointer-events:none;overflow:hidden;border-radius:12px;background:#fff;box-shadow:0 12px 28px #102b3240;outline:2px solid #a7502e;will-change:transform}
html[data-theme=dark] .order-drag-preview{background:#2c3035;box-shadow:0 12px 30px #0008}
.order-drag-preview *{pointer-events:none!important}
.matrix-person.drag-before>*,.matrix-person.drag-after>*{box-shadow:inset 0 3px #a7502e}
.matrix-person.drag-after>*{box-shadow:inset 0 -3px #a7502e}

/* Browser chrome already reserves the home-indicator area on iPhone. */
@media(max-width:900px){
 .shell{min-height:100dvh;--mobile-bottom-inset:min(env(safe-area-inset-bottom,0px),6px);--mobile-nav-height:calc(58px + var(--mobile-bottom-inset))}
 .shell>.main,.shell.employee-interface>.main{padding:6px 7px calc(var(--mobile-nav-height) + 8px)}
 .mobile-home,.employee-interface .mobile-home{padding:3px max(5px,env(safe-area-inset-right)) calc(3px + var(--mobile-bottom-inset));gap:2px;min-height:var(--mobile-nav-height)}
 .mobile-home button{padding:5px 2px;min-height:50px}
 .shell .wish-layout,.shell .personal-schedule-layout{height:calc(100dvh - var(--mobile-nav-height) - 20px)}
 .shell[data-page=schedule] .matrix-card{height:calc(100dvh - var(--mobile-nav-height) - 102px)}
 .shell .matrix-carousel{margin:6px 0 0}
 .shell[data-page=schedule]>.main>.schedule-quota-panel{margin:6px 0 0}
 .shell .card-pad{padding:12px}
 .shell .calendar-card,.shell .matrix-card,.shell .wish-controls,.shell .schedule-quota-panel{padding:8px}
 .shell .settings-page{gap:10px}
 .shell .settings-card-heading{min-height:38px}
 .shell .today-work-card{padding:12px}
}
@media(max-width:900px) and (display-mode:standalone){
 .shell{--mobile-bottom-inset:env(safe-area-inset-bottom,0px)}
 .shell>.main{padding-top:max(6px,env(safe-area-inset-top))}
 .shell .wish-layout,.shell .personal-schedule-layout{height:calc(100dvh - var(--mobile-nav-height) - max(6px,env(safe-area-inset-top)) - 14px)}
 .shell[data-page=schedule] .matrix-card{height:calc(100dvh - var(--mobile-nav-height) - max(6px,env(safe-area-inset-top)) - 96px)}
}


/* Shared outline icons and floating mobile navigation. */
.nav-icon{display:inline-block;width:24px;height:24px;flex:none;vertical-align:middle}
.nav button .nav-icon{margin-right:10px}
.side-collapsed .nav button .nav-icon{margin:0}
@media(max-width:900px){
 .shell{--mobile-nav-gap:max(8px,env(safe-area-inset-bottom,0px));--mobile-nav-height:calc(68px + var(--mobile-nav-gap))}
 .shell .mobile-home,.shell.employee-interface .mobile-home{left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));bottom:var(--mobile-nav-gap);height:60px;min-height:60px;padding:4px;gap:2px;border:1px solid #d6d7d8;border-radius:32px;background:#fffdf9f5;box-shadow:0 5px 22px #1c1f2324;align-items:stretch}
 .shell .mobile-home button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:0;margin:0;padding:3px 1px;border-radius:26px;font-size:10px;line-height:1.1;color:#5c6063;-webkit-tap-highlight-color:transparent}
 .shell .mobile-home button.active{background:#f6e5d9;color:#2d4154}
 .mobile-home .nav-icon{display:block;width:23px;height:23px;margin:0}
 html[data-theme=dark] .shell .mobile-home{background:#292528f5;border-color:#525457;box-shadow:0 5px 22px #0004}
 html[data-theme=dark] .shell .mobile-home button{color:#cacccd}
 html[data-theme=dark] .shell .mobile-home button.active{background:#4c3529;color:#e5a078}
 #toast{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
}


/* Terracotta orange and cream theme: paired light and dark surfaces and controls. */
:root{--page-bg:#faf5ec;--surface:#ffffff;--surface-soft:#f4ece0;--control-bg:#f4ece0;--text-main:#292a30;--text-muted:#70675f;--line:#e4d9ca;--accent:#a7502e;--accent-text:#ffffff;--accent-soft:#f6e5d9;--accent-ink:#934525;color:var(--text-main);background:var(--page-bg)}
html[data-theme=dark]{--page-bg:#1a1819;--surface:#292528;--surface-soft:#322d30;--control-bg:#322d30;--text-main:#f0f1f5;--text-muted:#c1b6bc;--line:#4a4246;--accent:#e5a078;--accent-text:#1b1d27;--accent-soft:#4c3529;--accent-ink:#edb695;color:var(--text-main);background:var(--page-bg)}
html[data-theme] .main{background:var(--page-bg)}
html[data-theme] .card,html[data-theme] .modal,html[data-theme] .login-card{background:var(--surface);color:var(--text-main);border-color:var(--line)}
html[data-theme] .note,html[data-theme] .muted,html[data-theme] .field,html[data-theme] .person small,html[data-theme] .matrix-name small,html[data-theme] .matrix-legend,html[data-theme] .week,html[data-theme] .wish-weekdays,html[data-theme] .modal p{color:var(--text-muted)}
html[data-theme] .button,html[data-theme] .tool-button,html[data-theme] .person button,html[data-theme] .calendar-controls button,html[data-theme] .schedule-month button,html[data-theme] .adjust-buttons button{background:var(--control-bg);border-color:var(--line);color:var(--text-main)}
html[data-theme] .button.primary,html[data-theme] .tool-button.active,html[data-theme] .segmented button.active,html[data-theme] .status-switch input:checked+span{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
html[data-theme] .button:focus-visible,html[data-theme] button:focus-visible,html[data-theme] input:focus-visible,html[data-theme] select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html[data-theme] input,html[data-theme] select,html[data-theme] textarea,html[data-theme] .shift-time-control,html[data-theme] .shift-time-menu,html[data-theme] .shift-time-menu button{background:var(--surface);color:var(--text-main);border-color:var(--line)}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--text-muted)}
html[data-theme] input:focus,html[data-theme] select:focus,html[data-theme] textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
html[data-theme] input[type=checkbox],html[data-theme] input[type=radio],html[data-theme] input[type=range]{accent-color:var(--accent)}
html[data-theme] .employee-home{--home-soft:var(--surface-soft);--home-border:var(--line);--home-muted:var(--text-muted)}
html[data-theme] .today-work-card{border-top-color:var(--accent)}
html[data-theme] .today-shift{color:var(--text-main)}
html[data-theme] .quota-summary span{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme] .schedule-source-colors,html[data-theme] .matrix-legend{--schedule-cell-bg:var(--surface)}
html[data-theme] .nav button{color:#d5c9c1}
html[data-theme] .nav button.active,html[data-theme] .nav button:hover{background:var(--accent-soft);color:var(--accent-ink)}
html[data-theme] .side{background:#292528;color:#f0f1f5}
html[data-theme] .side-foot{color:#c1b6bc}
html[data-theme] .side-toggle{color:#edb695;background:#4c3529;border-color:#805943}
html[data-theme] .reminder-status.resolved{background:#e5f0e9;color:#396c50}
html[data-theme=dark] .reminder-status.resolved{background:#284434;color:#b5e5c4}
/* Destructive actions keep their red meaning instead of adopting the accent. */
html[data-theme] .button.danger-outline{background:#fff0ee;color:#a63833;border-color:#d99189}
html[data-theme=dark] .button.danger-outline{background:#472d2c;color:#ffbdb6;border-color:#b35c57}
@media(max-width:900px){
 html[data-theme] .shell .mobile-home{background:#fffdf9f5;border-color:var(--line);box-shadow:0 5px 22px #1b1d2724}
 html[data-theme] .shell .mobile-home button{color:var(--text-muted)}
 html[data-theme] .shell .mobile-home button.active{background:var(--accent-soft);color:var(--accent-ink)}
 html[data-theme=dark] .shell .mobile-home{background:#292528f5;border-color:var(--line);box-shadow:0 5px 22px #0004}
 html[data-theme=dark] .shell .mobile-home button{color:var(--text-muted)}
 html[data-theme=dark] .shell .mobile-home button.active{background:var(--accent-soft);color:var(--accent)}
}

/* Warm charcoal and apricot: dark-first theme, with restrained matrix accents. */
html[data-theme=dark]{--page-bg:#191817;--surface:#252321;--surface-soft:#33302d;--control-bg:#33302d;--text-main:#f3eee8;--text-muted:#b8aea5;--line:#46413c;--accent:#e4a077;--accent-text:#251d18;--accent-soft:#49352a;--accent-ink:#efb996}
html[data-theme=dark] .side{background:#211f1d;color:var(--text-main)}
html[data-theme=dark] .side-foot,html[data-theme=dark] .nav button{color:var(--text-muted)}
html[data-theme=dark] .side-toggle{background:#33302d;border-color:#605044;color:var(--accent)}
html[data-theme=dark] .order-drag-preview{background:var(--surface-soft);outline-color:var(--accent)}
html[data-theme=dark] .shell .mobile-home{background:#252321f5;border-color:var(--line)}
html[data-theme=dark] .shell .mobile-home button.active{color:var(--accent);background:var(--accent-soft)}
html[data-theme=dark] .schedule-source-colors,html[data-theme=dark] .matrix-legend{--schedule-cell-bg:#252321;--wish-label-bg:#493a43;--wish-label-text:#f1dce7;--wish-label-border:#b28b9f;--leave-label-bg:rgba(72,140,166,.25);--leave-label-text:#c6e6f0;--leave-label-border:rgba(112,173,196,.65)}
html[data-theme=dark] .matrix-wrap{background:#252321;border-color:#60574e}
html[data-theme=dark] .schedule-matrix th,html[data-theme=dark] .schedule-matrix td{border-color:#3e3934}
html[data-theme=dark] .schedule-matrix thead th,html[data-theme=dark] .schedule-matrix .matrix-name{background:#2e2a26;color:var(--text-main)}
html[data-theme=dark] .schedule-matrix thead .matrix-name{background:#35302b}
html[data-theme=dark] .schedule-matrix .matrix-cell,html[data-theme=dark] .schedule-matrix .matrix-cell.shop-closed{background:#252321}
html[data-theme=dark] .schedule-matrix .matrix-cell button,html[data-theme=dark] .matrix-day button{color:var(--text-main)}
html[data-theme=dark] .schedule-matrix .matrix-day.over,html[data-theme=dark] .schedule-matrix .matrix-day.under,html[data-theme=dark] .schedule-matrix .matrix-day.mixed{background:#2e2a26;box-shadow:inset 0 -2px #cf8875}
html[data-theme=dark] .matrix-day.over b,html[data-theme=dark] .matrix-day.under b,html[data-theme=dark] .matrix-day.mixed b{color:#e3a18d}
html[data-theme=dark] .matrix-day.holiday strong{color:#e89d96}
html[data-theme=dark] .matrix-day.selected{box-shadow:inset 0 -2px var(--accent)}
html[data-theme=dark] .schedule-matrix .matrix-cell.selected{box-shadow:inset 0 0 0 1px var(--accent)}
html[data-theme=dark] .schedule-matrix .matrix-work-time.wish-fulfilled.wish-conflict{background:#512f2b;border-color:#e08b7e;color:#ffe0d9}
html[data-theme=dark] .matrix-legend .legend-swatch.conflict-swatch{background:#512f2b;border-color:#e08b7e}

/* Mobile pages use open surfaces; calendars share geometry and palette. */
@media(max-width:900px){
 .shell{--calendar-bg:var(--surface);--calendar-empty:var(--surface-soft);--calendar-line:var(--line);--calendar-day:var(--text-main);--calendar-weekend:#ba5d56;--calendar-today:var(--accent)}
 html[data-theme=dark] .shell{--calendar-bg:#252321;--calendar-empty:#211f1d;--calendar-line:#46413c;--calendar-weekend:#e89d96}
 .shell .wish-layout,.shell .personal-schedule-layout{display:flex;flex-direction:column;gap:6px;min-height:0}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout)>.calendar-card,html[data-theme] .shell .matrix-card,html[data-theme] .shell .today-work-card,html[data-theme] .shell .people-page>section.card{border:0;border-radius:0;box-shadow:none;background:transparent;padding:6px 5px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout)>.calendar-card{display:flex;flex-direction:column;flex:1;min-height:0!important;height:auto!important;margin:0;width:100%}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading{display:grid;grid-template-columns:84px minmax(0,1fr) auto;grid-template-rows:44px 18px;gap:5px;min-height:67px;height:67px;flex:none;margin:0 0 5px;align-items:center}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading>.schedule-mode-toggle{grid-column:1;grid-row:1;width:84px;height:44px;margin:0}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading>.schedule-month{grid-column:3;grid-row:1;justify-content:flex-end;width:auto;max-width:100%;gap:4px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-weekdays{height:27px;min-height:27px;padding:6px 0;font-size:10px;line-height:14px;flex:none;border-color:var(--calendar-line);color:var(--text-muted)}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-month{display:grid;grid-auto-rows:minmax(0,1fr);flex:1;min-height:0;overflow-y:auto}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-week,.personal-calendar-week){min-height:0;border-top:1px solid var(--calendar-line)}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-date,.personal-calendar-date){padding:2px 3px;border-right:1px solid var(--calendar-line);background:var(--calendar-bg);color:var(--calendar-day);gap:3px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-date,.personal-calendar-date):last-child{border-right:0}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .empty-date{background:var(--calendar-empty)}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .weekend strong{color:var(--calendar-weekend)}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-head{display:flex;flex-direction:row;align-items:flex-start;width:100%;height:20px;min-height:20px;gap:1px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-head strong{flex:0 0 2ch;width:2ch;height:16px;font-size:12px;line-height:16px;font-variant-numeric:tabular-nums}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-meta{flex:1;min-width:0;width:auto;gap:1px;align-items:flex-start}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-meta .holiday-badge{display:flex;justify-content:space-evenly;align-items:center;width:100%;max-width:none;min-width:0;height:15px;font-size:clamp(7px,1.9vw,9px);line-height:13px;padding:0;letter-spacing:0;border-radius:3px;box-sizing:border-box;white-space:nowrap}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .holiday-badge>span{display:block;flex:none;font:inherit;line-height:inherit}
 .shell .personal-calendar-date.is-today{box-shadow:inset 0 0 0 1px var(--calendar-today)}
 .shell .personal-shift-times{color:var(--text-main)}
 html[data-theme] .shell .wish-layout>.wish-controls,html[data-theme] .shell .personal-schedule-layout>.schedule-quota-panel{flex:none;height:76px;min-height:76px;max-height:76px;margin:0;padding:6px 5px;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
 html[data-theme] .shell .people-page>.card>.panel-list>.person{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;padding:12px 0;box-shadow:none}
 html[data-theme] .shell .settings-page>section.card{border-color:var(--line);box-shadow:none;border-radius:12px;padding:12px}
 .shell .today-work-card>.card-head{margin-bottom:14px}
}

/* Complete shared theme surfaces on desktop; retain existing layout geometry. */
@media(min-width:901px){
 html[data-theme] :is(.wish-date,.personal-calendar-date,.day){background:var(--surface);color:var(--text-main);border-color:var(--line)}
 html[data-theme] :is(.wish-week,.personal-calendar-week,.wish-weekdays,.week){border-color:var(--line)}
 html[data-theme] :is(.wish-date.empty-date,.personal-calendar-date.empty-date,.day.other){background:var(--surface-soft);color:var(--text-muted)}
 html[data-theme] :is(.wish-date.selected,.day.selected,.day:hover){background:var(--accent-soft)}
 html[data-theme] :is(.stat,.segmented,.status-switch,.custom-shift-fields,.quota-editor,.wish-limit-group,.shift-time-control){background:var(--surface-soft);border-color:var(--line);color:var(--text-main)}
 html[data-theme] :is(.person,.weekday-details,.settings-section,.list-item,.wish-history,.wish-limit-group){border-color:var(--line)}
 html[data-theme] :is(.segmented button,.status-switch span,.stat span){color:var(--text-muted)}
 html[data-theme] :is(.segmented button.active,.status-switch input:checked+span){background:var(--accent);color:var(--accent-text)}
 html[data-theme] :is(.wish-totals,.personal-shift-times,.wish-limit-group h4){color:var(--text-main)}
 html[data-theme] :is(.personal-shift-name,.personal-unassigned,.personal-calendar-meta){color:var(--text-muted)}
 html[data-theme] .personal-calendar-date.is-today{box-shadow:inset 0 0 0 1px var(--accent)}
 html[data-theme] .wish-date.shop-closed{background:#f6e2de}
 html[data-theme=dark] .wish-date.shop-closed{background:#452d29}
 html[data-theme] .wish-date .shop-closed-label{background:#a94f45;color:#fff}
 html[data-theme] .schedule-mode-toggle{background:var(--surface-soft);border-color:var(--line)}
 html[data-theme] .schedule-mode-toggle :is(button,span){color:var(--text-muted)}
 html[data-theme] .schedule-mode-toggle .active{background:var(--accent);color:var(--accent-text)}
 html[data-theme] .shift-time-menu button.selected{background:var(--accent-soft);color:var(--accent-ink)}
 html[data-theme=dark] .personal-leave{color:#f1dce7}
 html[data-theme=dark] .side>.branch-switcher select{background:var(--surface-soft);border-color:var(--line);color:var(--text-main)}
}

/* Edge-to-edge mobile calendars, with readable insets for controls. */
@media(max-width:900px){
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout){margin-inline:-7px;width:calc(100% + 14px)}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout)>.calendar-card{padding-inline:0}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading{margin-inline:max(12px,env(safe-area-inset-left,0px)) max(12px,env(safe-area-inset-right,0px))}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-weekdays,.wish-month){width:100%;margin-inline:0}
 html[data-theme] .shell .wish-layout>.wish-controls,html[data-theme] .shell .personal-schedule-layout>.schedule-quota-panel{padding-inline:max(12px,env(safe-area-inset-left,0px)) max(12px,env(safe-area-inset-right,0px))}
}
@media(max-width:900px){html{scrollbar-gutter:auto}}

/* The navigation reservation already includes its top breathing room. */
@media(max-width:900px){
 .shell .wish-layout,.shell .personal-schedule-layout{height:calc(100dvh - var(--mobile-nav-height) - 6px)}
}
@media(max-width:900px) and (display-mode:standalone){
 .shell .wish-layout,.shell .personal-schedule-layout{height:calc(100dvh - var(--mobile-nav-height) - max(6px,env(safe-area-inset-top)))}
}
@media(max-width:900px){.shell>.main:has(>.wish-layout),.shell>.main:has(>.personal-schedule-layout){padding-bottom:var(--mobile-nav-height)}}

/* Matrix shares the calendar's outer bounds and the carousel shares one surface. */
@media(max-width:900px){
 html[data-theme] .shell[data-page=schedule] .matrix-card{margin-inline:-7px;width:calc(100% + 14px);height:calc(100dvh - var(--mobile-nav-height) - 88px);padding-inline:0}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading{margin-inline:max(12px,env(safe-area-inset-left,0px)) max(12px,env(safe-area-inset-right,0px));height:67px;min-height:67px;flex:none}
 html[data-theme] .shell .matrix-card>.matrix-wrap{width:100%;margin-inline:0;border-inline:0;border-radius:0}
 html[data-theme] .shell .matrix-carousel-panel{background:var(--surface)!important;color:var(--text-main);border-color:var(--line)!important}
 .shell>.main:has(>.matrix-card){padding-bottom:var(--mobile-nav-height)}
}
@media(max-width:900px) and (display-mode:standalone){
 html[data-theme] .shell[data-page=schedule] .matrix-card{height:calc(100dvh - var(--mobile-nav-height) - max(6px,env(safe-area-inset-top)) - 82px)}
}

/* Branch selection is separate from expanding its employee list. */
html[data-theme] .branch-entry.branch-current{background:var(--accent-soft);border-color:var(--accent)}
html[data-theme] .branch-entry.branch-current>summary>strong{color:var(--accent-ink)}
.branch-select-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:32px;height:32px;padding:5px;border:1px solid var(--line);border-radius:9px;background:var(--control-bg);color:var(--text-main);cursor:pointer}
.branch-select-button svg{width:20px;height:20px}
.branch-select-button[aria-pressed=true]{background:var(--accent);color:var(--accent-text);border-color:var(--accent);opacity:1;cursor:default}
.branch-settings #branchForm{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.branch-entry>summary>strong{min-width:0;overflow-wrap:anywhere}
@media(max-width:900px){.branch-entry>summary{gap:7px}.branch-entry>summary>.branch-select-button{width:30px;height:30px}.matrix-carousel-stage{cursor:grab}.matrix-carousel-stage:active{cursor:grabbing}}

/* A single moving track keeps the five tools attached throughout a drag. */
.matrix-carousel-track{position:absolute;inset:0;will-change:transform;transition:none;user-select:none;-webkit-user-select:none}
.matrix-expand-toggle{display:none}
@media(min-width:901px){
 .matrix-card{position:relative}
 .matrix-card .schedule-heading{padding-right:100px}
 .matrix-expand-toggle{display:block;position:absolute;right:16px;top:18px;z-index:2}
 .schedule-matrix .matrix-cell,.schedule-matrix tbody .matrix-name{height:var(--matrix-row-height,62px)}
 .schedule-matrix .matrix-cell button{height:var(--matrix-row-height,62px);min-height:0;padding:2px}
 .schedule-matrix .matrix-cell-layout{grid-template-columns:minmax(0,1fr);gap:2px}
 .schedule-matrix .matrix-cell-notes:empty{display:none}
 .schedule-matrix .matrix-cell-notes>span{writing-mode:horizontal-tb;text-orientation:mixed;line-height:1.05}
 .shell.matrix-expanded[data-page=schedule]{display:block}
 .shell.matrix-expanded[data-page=schedule]>.side{display:none}
 .shell.matrix-expanded[data-page=schedule]>.main{position:fixed;inset:0;z-index:6;width:100%;padding:10px;background:var(--page-bg);gap:8px}
 .matrix-expanded .matrix-card .schedule-heading,.matrix-expanded .matrix-card .schedule-update-links{display:none!important}
 .matrix-expanded .matrix-card{padding:0!important;border:0;border-radius:0!important;background:var(--page-bg)}
 .matrix-expanded .matrix-wrap{margin:0;padding:0}
 .matrix-expanded .matrix-expand-toggle{top:8px;right:8px;opacity:.85}
 .matrix-expanded .matrix-zoom-cell{padding-top:38px}
}

@media(min-width:901px){
 .schedule-matrix tbody .matrix-name{box-sizing:border-box;padding:3px 10px}
 .schedule-matrix .matrix-cell{box-sizing:border-box}
 .shell.matrix-expanded .schedule-tools{grid-template-columns:250px 220px minmax(260px,1fr) 160px;grid-template-rows:auto;gap:12px}
 .shell.matrix-expanded .schedule-tools>.tool-section:nth-child(n+3){border-top:0;border-left:1px solid var(--line);padding-top:0;padding-left:12px}
}

.rest-rule-option{padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.rest-rule-option>label:first-child{display:flex;align-items:center;gap:6px}
.rest-fixed-days{display:flex;align-items:center;gap:8px;margin:9px 0 0 24px}
.rest-fixed-days input{width:68px;padding:7px;border:1px solid var(--line);border-radius:8px;background:var(--control-bg);color:var(--text-main)}
.quota-dialog .quota-mode-fields{grid-template-columns:1fr;gap:18px}
.quota-dialog .quota-mode-fields>label>span{gap:8px}
.quota-dialog .quota-step{width:40px;height:40px;flex:none;padding:0;font-size:20px}

.rest-rule-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--text-main)}
.rest-rule-line .rest-rule-days{width:58px;min-width:0;height:36px;padding:6px;border:1px solid var(--line);border-radius:8px;background:var(--control-bg);color:var(--text-main);font:inherit;text-align:center}
html[data-theme] .weekday-details summary{color:var(--text-main);padding:5px 0;transition:color .15s}
html[data-theme] .weekday-details summary:hover{color:var(--accent-ink)}
html[data-theme] .weekday-details summary:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-radius:4px}

.rest-settings-form{display:grid;gap:8px;margin-top:12px}
.rest-settings-group{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.rest-settings-group>summary{list-style:none;display:flex;align-items:center;gap:10px;padding:13px 14px;cursor:pointer;color:var(--text-main)}
.rest-settings-group>summary::-webkit-details-marker{display:none}
.rest-settings-group>summary strong{font-size:14px}
.rest-settings-group>summary>span{margin-left:auto;font-size:12px;color:var(--text-muted);text-align:right}
.rest-settings-group>summary:after{content:'›';font-size:22px;color:var(--accent-ink);transition:transform .15s}
.rest-settings-group[open]>summary:after{transform:rotate(90deg)}
.rest-settings-group>summary:hover{background:var(--control-bg)}
.rest-settings-group>summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.rest-settings-body{padding:0 14px 14px;border-top:1px solid var(--line)}
.rest-settings-body>.note{margin:10px 0}
.rest-settings-body .rest-rule-settings{margin-top:0;padding-top:0;border-top:0}
.rest-settings-body .rest-rule-option:last-of-type{border-bottom:0}
.rest-settings-body .settings-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.weekday-cap-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px;margin-top:12px}
.rest-settings-body .field{margin-bottom:12px}
.rest-settings-body .weekday-details{margin-bottom:8px;padding:8px 10px}
.rest-settings-body .wish-limit-groups{margin-bottom:0}
.rest-settings-body .wish-request-deadline{border-top:1px solid var(--line);margin-top:14px;padding-top:14px;max-width:360px}
.rest-settings-body .wish-request-deadline .field{margin-bottom:0}
.date-cap-body{padding-top:12px}
.rest-settings-save{display:flex;justify-content:flex-end;padding:4px 0 12px}
.rest-settings-card> .rest-settings-group{margin-top:0}
.branch-create-action{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.personal-profile-settings form>.note{grid-column:1/-1;margin:0}
@media(min-width:901px){
 .shell[data-page=people]>.main{padding-top:20px}
 .shell[data-page=people] .people-page>section.card{margin-top:0;border-radius:18px;padding:16px}
}
@media(max-width:900px){
 html[data-theme] .wish-controls .mobile-leave-menu.active{background:var(--accent);color:var(--accent-text);border-color:var(--accent-ink);box-shadow:0 0 0 2px var(--accent-ink);font-weight:750}
 html[data-theme] .wish-controls .mobile-leave-menu:focus-visible{outline:2px solid var(--accent-ink);outline-offset:3px}
}
/* Shared settings alignment, including cards with previously narrower widths. */
.shell .settings-page{width:100%;max-width:1100px;margin-inline:auto;gap:14px;min-width:0}
html[data-theme] .shell .settings-page>section.card{width:100%;max-width:none;box-sizing:border-box;margin:0;padding:20px 24px;border:1px solid var(--line);border-radius:16px;box-shadow:none;min-width:0}
.shell .settings-page .settings-card-heading{min-height:40px;gap:16px;margin:0}
.shell .settings-page .settings-card-heading h2{font-size:20px;line-height:1.4}
.shell .settings-page .settings-card-body:not([hidden]){margin-top:16px;padding-top:16px;border-top:1px solid var(--line);min-width:0}
.shell .settings-page .settings-card-body>.note:first-child{margin:0 0 14px}
.shell .settings-page .settings-inline-content{margin-left:auto}
.settings-page .field,.settings-page .inline-fields>*{min-width:0}
.settings-page input,.settings-page select{max-width:100%;box-sizing:border-box}
.settings-page .toolbar{gap:10px;align-items:center}
.settings-page #branchForm input,.settings-page .job-title-create .toolbar input{min-width:0}
.settings-page #branchForm .button,.settings-page .job-title-create .toolbar .button{flex:none;white-space:nowrap}
.settings-page .account-settings .email-binding form{max-width:640px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.settings-page .account-settings .email-binding form .field{margin:0}
.settings-page .account-settings .email-binding form>.button{grid-column:1/-1;justify-self:start}
.settings-page .email-account-status{overflow-wrap:anywhere}
.settings-page .company-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.settings-page .company-entry{min-width:0;margin:0}
.settings-page .person>div:first-child,.settings-page .job-title-detail{min-width:0;overflow-wrap:anywhere}
.settings-page .branch-member .person-actions{flex-wrap:wrap;justify-content:flex-end}
.settings-page .rest-settings-form{margin-top:0}
.settings-page .rest-settings-save{padding:8px 0 0}
@media(min-width:901px){
 .settings-page .weekday-cap-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .settings-page .rest-settings-body .settings-pair{max-width:720px}
}
@media(max-width:900px){
 html[data-theme] .shell .settings-page>section.card{padding:14px;border-radius:12px}
 .shell .settings-page{gap:10px}
 .shell .settings-page .settings-card-heading{min-height:36px;gap:10px}
 .shell .settings-page .settings-card-heading h2{font-size:18px}
 .shell .settings-page .settings-card-body:not([hidden]){margin-top:12px;padding-top:12px}
 .settings-page .company-cards{grid-template-columns:minmax(0,1fr)}
 .settings-page .branch-entry>summary{padding:11px 10px;gap:7px}
 .settings-page .branch-entry>summary strong{overflow-wrap:anywhere}
 .settings-page .branch-member{align-items:flex-start;gap:8px;flex-wrap:wrap}
 .settings-page .branch-member .person-actions{margin-left:auto}
 .settings-page .job-title-row{gap:8px;flex-wrap:wrap}
 .settings-page .job-title-row .job-title-detail{flex:1 1 120px}
 .settings-page .job-title-row .person-actions{margin-left:auto}
 .settings-page .account-settings .email-binding form{grid-template-columns:minmax(0,1fr)}
 .settings-page .account-settings .email-binding form>.button{justify-self:stretch}
 .settings-page .appearance-settings .settings-inline-content{font-size:13px;padding:8px 12px}
}
@media(max-width:900px){
 .rest-settings-group>summary{padding:12px 10px;gap:7px}
 .rest-settings-group>summary strong{font-size:13px;white-space:nowrap}
 .rest-settings-group>summary>span{font-size:11px}
 .rest-settings-body{padding:0 10px 10px}
 .weekday-cap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rest-settings-body .wish-limit-group .inline-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rest-settings-save .button{width:100%}
}

/* Store closure occupies two label rows, independently of holiday names. */
.wish-layout .wish-bar.shop-closed-bar{position:relative;left:auto;top:auto;width:auto;height:auto;min-height:0;margin:0 3px;display:grid;place-items:center;background:#a94642!important;color:#fff;border:1px solid #d3776e;align-self:stretch;font-weight:700;text-align:center}
.personnel-row-actions{flex-shrink:0;gap:6px}
.personnel-email{overflow-wrap:anywhere;font-size:12px}
.personnel-edit-form .field{margin:0 0 10px}
.personnel-edit-form .inline-fields{gap:10px}
.personnel-edit-group{border-top:1px solid var(--line);margin-top:8px;padding-top:4px}
.personnel-edit-group>summary{cursor:pointer;padding:9px 0;font-weight:700;font-size:14px}
.personnel-edit-group>summary~*{margin-top:8px}
.personnel-edit-dialog .modal{max-width:620px}
.personnel-edit-form .field>small{font-size:11px;line-height:1.4}
.personnel-status{align-items:center}
.rest-settings-form{gap:6px}
.rest-settings-group{border-radius:9px}
.rest-settings-card .rest-settings-group>summary{min-height:40px;box-sizing:border-box;padding:8px 12px;gap:8px}
.rest-settings-card .rest-settings-body{padding:0 12px 10px}
.rest-settings-card .settings-pair{gap:10px;margin:8px 0}
.rest-settings-card .rest-settings-body .field{margin-bottom:8px}
@media(max-width:900px){
 .wish-layout .wish-bar.shop-closed-bar{margin:0 2px;font-size:11px;padding:1px 2px}
 .personnel-row-actions button{padding:7px 9px;font-size:12px}
 .people-page .person{gap:8px}
 .personnel-edit-dialog .modal{padding:16px}
 .personnel-edit-form .inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .personnel-edit-form input:not([type=checkbox]):not([type=radio]),.personnel-edit-form select{min-width:0;width:100%;padding:8px}
 .rest-settings-card .rest-settings-group>summary{padding:7px 10px}
 .rest-settings-card .rest-settings-body{padding:0 10px 8px}
}

.rest-settings-card .rest-settings-group>summary:after{line-height:1}
.rest-settings-card .rest-settings-group>summary strong,.rest-settings-card .rest-settings-group>summary>span{line-height:1.4}

/* Destructive schedule confirmation follows the warm theme in both modes. */
html[data-theme] .clear-schedule-warning{background:#fff0ec;border-color:#ddb0a2;color:#963e35}
html[data-theme] .modal .clear-schedule-warning p{color:#75544d;line-height:1.6}
html[data-theme=dark] .clear-schedule-warning{background:#342725;border-color:#76504a;color:#f0b0a4}
html[data-theme=dark] .modal .clear-schedule-warning p{color:#d4bab3}
html[data-theme] .button.danger{background:#b54c43;border-color:#b54c43;color:#fff8f5}
html[data-theme] .button.danger:hover{background:#9d3e37;border-color:#9d3e37}
html[data-theme=dark] .button.danger{background:#a84e45;border-color:#c37669;color:#fff8f5}
html[data-theme=dark] .button.danger:hover{background:#bd5d52;border-color:#dd9385}
.personnel-edit-form>.personnel-status{border-top:1px solid var(--line);padding-top:12px;margin-top:12px}

@media(min-width:901px){.matrix-expand-toggle{z-index:5}}

/* Touch sorting starts anywhere in the actual name cell, not an inline glyph. */
.schedule-matrix [data-person-drag]{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
.schedule-matrix [data-person-drag] .drag-handle{display:inline-block;min-width:12px;line-height:1;pointer-events:none}

.matrix-order-preview{border-radius:8px;outline:2px solid var(--accent);box-shadow:0 6px 18px #0005}
.matrix-person.order-drag-source{opacity:1!important}
.matrix-person.order-drag-source>th,.matrix-person.order-drag-source>td{background:var(--control-bg)!important}
.matrix-person.order-drag-source>th>*,.matrix-person.order-drag-source>td>*{visibility:hidden}
.matrix-person.order-drag-source>th{color:transparent!important}

.category-name-form .category-drag-handle{flex:none;align-self:stretch;min-height:40px;padding:4px 6px}
.category-name-form input[name=name]{flex:1;width:0;min-width:0}
.category-name-form{flex-wrap:wrap}
.category-auto-class{display:grid;gap:3px;min-width:130px;font-size:12px;color:var(--text-muted)}
.category-auto-class select{width:100%;min-height:36px}
@media(max-width:600px){.category-name-form .category-auto-class{order:3;flex-basis:100%;margin-left:30px}.category-name-form .person-actions{order:2}}

.category-order-row.order-drag-source{opacity:1!important;background:var(--control-bg)!important;border-style:dashed}
.category-order-row.order-drag-source>*{visibility:hidden}

.palette-order-row.order-drag-source,.job-title-row.order-drag-source{opacity:1!important;background:var(--control-bg)!important;border-style:dashed}
.palette-order-row.order-drag-source>*,.job-title-row.order-drag-source>*{visibility:hidden}
.title-drag-handle{display:inline-flex;align-items:center;align-self:stretch;min-height:40px;flex:none}

/* Time coverage editor uses compact rows on both phone and desktop. */
.pattern-form [hidden]{display:none!important}
.staffing-range-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(64px,.7fr) 32px;gap:8px;align-items:end;margin-bottom:8px}
.staffing-range-row label{font-size:12px;min-width:0}
.staffing-range-row input{display:block;width:100%;min-width:0;box-sizing:border-box;margin-top:4px}
.staffing-range-row .button{padding:4px;height:38px}
@media(max-width:600px){.staffing-range-row{gap:5px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 66px 28px}.staffing-range-row input{padding:7px 3px;font-size:14px}.time-editor .shift-form-times{grid-template-columns:1fr 1fr 76px}}

/* Authentication shares the app palette, including its dark default. */
html[data-theme] .login{background:radial-gradient(ellipse at 75% 12%,var(--accent-soft),transparent 55%),var(--page-bg);color:var(--text-main);min-height:100vh;min-height:100dvh;padding:max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
html[data-theme] .login-card{border:1px solid var(--line);box-shadow:0 16px 56px #482b1912}
html[data-theme=dark] .login-card{box-shadow:0 16px 56px #0004}
html[data-theme] .login-card h1{color:var(--text-main)}
html[data-theme] .login-card .field{color:var(--text-muted)}
html[data-theme] .login-card input{background:var(--page-bg);color:var(--text-main);border-color:var(--line);caret-color:var(--accent)}
html[data-theme] .login-card input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
html[data-theme] .login-card input:-webkit-autofill{-webkit-text-fill-color:var(--text-main);-webkit-box-shadow:0 0 0 1000px var(--page-bg) inset;caret-color:var(--accent)}
html[data-theme] .login-card .auth-links button{color:var(--accent-ink);text-decoration-color:var(--line);text-underline-offset:4px}
html[data-theme] .login-card .auth-links button:hover{color:var(--accent);text-decoration-color:currentColor}
html[data-theme] .login-card .button.primary:hover{filter:brightness(1.07)}
html[data-theme] .login-card .local-mail-note{background:var(--accent-soft);color:var(--accent-ink);border:1px solid var(--line)}
@media(max-width:480px){html[data-theme] .login-card{padding:26px 22px;border-radius:22px}html[data-theme] .login-card input{font-size:16px}html[data-theme] .login-card h1{font-size:25px}}

/* Authentication hierarchy: brand, form, account actions, alternate sign-in. */
html[data-theme] .login{background:radial-gradient(ellipse at 80% 0%,color-mix(in srgb,var(--accent-soft) 65%,transparent),transparent 60%),var(--page-bg)}
html[data-theme] .login-card{width:min(100%,440px);padding:32px;border-radius:24px}
.login-card .auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:30px}
.login-card .auth-brand .logo{width:44px;height:44px;display:block}
.login-card .auth-brand strong{font-size:20px;letter-spacing:.06em;font-weight:750}
html[data-theme] .login-card h1{font-size:27px;letter-spacing:.01em;line-height:1.35;margin:0 0 8px}
.login-card h1+.muted{margin:0 0 26px;line-height:1.6;font-size:14px}
.login-card form{display:grid;gap:18px}
.login-card .field{display:grid;gap:8px;margin:0}
.login-card .field label{font-size:14px;font-weight:600;line-height:1.4}
.login-card .field>small{margin:0;font-size:12px}
html[data-theme] .login-card input:not([type=hidden]){width:100%;height:48px;border-radius:12px;padding:12px 14px;font-size:16px}
.login-card .auth-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:24px}
.login-card .auth-label-row label{color:var(--text-muted)}
.login-card .auth-text-button,.login-card .auth-account-prompt button,.login-card .auth-alternate button{border:0;background:transparent;color:var(--accent-ink);padding:4px 0;font-size:13px;line-height:1.5;cursor:pointer}
.login-card .auth-password-input{position:relative}
html[data-theme] .login-card .auth-password-input input{padding-right:64px}
.login-card .auth-password-toggle{position:absolute;right:5px;top:4px;height:40px;min-width:52px;padding:6px;border:0;background:transparent;color:var(--text-muted);font-size:13px;border-radius:8px}
.login-card .auth-password-toggle:hover{color:var(--accent-ink);background:var(--accent-soft)}
.password-field{position:relative;display:flex;width:100%;min-width:0;align-items:stretch}
html[data-theme] .password-field input{width:100%;min-width:0;padding-right:48px}
.password-eye{position:absolute;inset:0 2px 0 auto;display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--text-muted);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.password-eye:hover{color:var(--accent-ink)}
.password-eye:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
input::-ms-reveal,input::-ms-clear{display:none}
.auth-form-error{margin:12px 0;padding:12px 14px;color:var(--danger,#c46f6a);border:1px solid currentColor;border-radius:10px;font-size:14px;line-height:1.6}
.email-preview{margin:12px -12px;overflow-wrap:anywhere}
.email-preview h1{font-size:24px}
.invitation-summary{padding:16px;margin:16px 0;border:1px solid var(--border);border-radius:12px;line-height:1.8}
.invitation-summary strong{display:block;font-size:20px}
.pending-invitations{margin:16px 0;padding:16px;border:1px solid var(--border);border-radius:12px}

/* Keep the request limits on one aligned row within each employment group. */
.rest-settings-body .wish-limit-groups{grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:stretch}
.rest-settings-body .wish-limit-group .inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.rest-settings-body .wish-limit-group:first-child .inline-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.rest-settings-body .wish-limit-group .field{display:grid;grid-template-rows:18px 44px;gap:8px;margin:0;align-content:start}
.rest-settings-body .wish-limit-group .field label{min-height:18px;margin:0;line-height:18px;font-size:12px;white-space:nowrap}
.rest-settings-body .wish-limit-group .field input{height:44px;min-height:44px;margin:0;padding:10px 12px;font-size:14px;line-height:22px}
@media(max-width:700px){
 .rest-settings-body .wish-limit-groups{grid-template-columns:minmax(0,1fr)}
 .rest-settings-body .wish-limit-group .inline-fields{gap:10px}
 .rest-settings-body .wish-limit-group .field input{padding-inline:10px}
}
html[data-theme] .login-card form>.button{width:100%;min-height:48px;border-radius:12px;font-size:16px;margin-top:4px}
.login-card .auth-account-prompt{display:flex;align-items:center;justify-content:center;gap:6px;margin:20px 0 0;font-size:14px;color:var(--text-muted)}
.login-card .auth-account-prompt button{font-size:14px;font-weight:650;padding:10px 0}
.login-card .auth-alternate{border-top:1px solid var(--line);margin-top:18px;padding-top:14px;text-align:center}
.login-card .auth-alternate button{color:var(--text-muted);min-height:40px}
.login-card .auth-alternate button:hover{color:var(--accent-ink)}
html[data-theme] .login-card .auth-back{width:100%;min-height:44px;background:transparent;border:0;color:var(--accent-ink);margin-top:14px}
.login-card .auth-help{line-height:1.6;margin-bottom:0;font-size:12px;text-align:center}
@media(max-width:480px){html[data-theme] .login{padding:20px 18px}html[data-theme] .login-card{padding:26px 24px;border-radius:22px}.login-card .auth-brand{margin-bottom:26px}.login-card h1+.muted{margin-bottom:24px}.login-card .auth-brand strong{font-size:19px}html[data-theme] .login-card h1{font-size:25px}}
@media(max-width:480px) and (max-height:700px){html[data-theme] .login{align-items:start}.login-card .auth-brand{margin-bottom:20px}}

/* Staffing setup: explicit 24-hour controls and sequential time cards. */
.staffing-dialog .modal{width:min(100%,620px)}
.staffing-first-use{display:grid;gap:8px;margin:12px 0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--accent-soft);color:var(--text-main)}
.staffing-first-use strong{font-size:15px}.staffing-first-use p{margin:0;font-size:13px;line-height:1.55;color:var(--text-muted)}
.staffing-first-use .button{justify-self:start}
.staffing-dialog .staffing-check-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;background:var(--surface-soft);border:1px solid var(--line);border-radius:12px}
.staffing-check-toggle>span{display:grid;gap:4px}.staffing-check-toggle small{color:var(--text-muted);font-size:12px;font-weight:400}.staffing-check-toggle input{flex:none;width:20px;height:20px}
.staffing-guide{margin:12px 0;color:var(--text-muted);font-size:13px}.staffing-guide summary{cursor:pointer}.staffing-guide p{line-height:1.6}
.staffing-dialog .pattern-form{display:grid;gap:12px;padding:16px 0;margin:0;border-top:1px solid var(--line)}
.staffing-form-heading h3,.staffing-dialog .staffing-saved-heading{margin:0;font-size:15px}
.staffing-dialog .pattern-form .field{margin:0;min-width:0}
.staffing-dialog .pattern-form>.inline-fields{gap:10px;margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.staffing-dialog .pattern-form [hidden]{display:none!important}
.staffing-scope-fields>.field:last-child{grid-column:auto}
.staffing-ranges-heading{display:flex;align-items:center;gap:8px;margin:4px 0 10px;font-size:13px}
.staffing-range-count{color:var(--text-muted);font-size:12px}.staffing-time-format{margin-left:auto;color:var(--accent-ink);font-size:12px}
.staffing-dialog .staffing-range-row{display:block;padding:10px 12px;margin:0 0 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.staffing-range-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:12px}
.staffing-remove-range{background:transparent;border:0;color:var(--text-muted);font-size:12px;min-height:28px;padding:4px 0 4px 12px}.staffing-remove-range:hover{color:#d47e72}
.staffing-range-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 90px;gap:12px;align-items:end}
.staffing-range-fields .field>label{font-size:12px;color:var(--text-muted)}
.staffing-dialog .staffing-range-row input{margin:0;height:40px}
.staffing-dialog .staffing-range-row .shift-time-control{min-width:0;min-height:40px;justify-content:center;gap:2px;padding:2px}
.staffing-dialog .staffing-range-row .shift-time-part{min-width:28px;width:auto;font-size:16px;padding:4px 2px}
.staffing-dialog .staffing-range-row .shift-time-colon{font-size:14px}
.staffing-dialog .staffing-range-row .shift-time-menu{z-index:4;min-width:64px}
.staffing-people-input{position:relative}.staffing-people-input>span{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--text-muted);pointer-events:none}
.staffing-dialog .staffing-people-input input{padding:6px 27px 6px 8px;text-align:center;width:100%;font-size:16px;-moz-appearance:textfield}.staffing-people-input input::-webkit-inner-spin-button{appearance:none}
.staffing-dialog .staffing-add-range{width:100%;min-height:40px;border:1px dashed var(--line);background:transparent;color:var(--accent-ink);border-radius:10px;font-size:13px}
.staffing-dialog .staffing-add-range:hover{background:var(--accent-soft);border-color:var(--accent)}
.staffing-range-help{margin:6px 0 12px!important;font-size:11px!important;color:var(--text-muted)}
.staffing-range-error:empty{display:none}.staffing-range-error{margin:8px 0 0;color:#d47e72;font-size:12px;line-height:1.5}.staffing-range-row.invalid{border-color:#d47e72}
.staffing-dialog .pattern-add-feedback:empty{display:none}.staffing-dialog .pattern-add-feedback{color:var(--accent-ink);font-size:13px}
.staffing-dialog .staffing-saved-heading{border-top:1px solid var(--line);padding-top:16px;margin-top:4px}
.staffing-dialog .editor-list{max-height:32dvh;overflow:auto}.staffing-dialog .person .note{line-height:1.65;overflow-wrap:anywhere}
@media(max-width:600px){.staffing-dialog .modal{width:min(100%,440px);padding:16px}.staffing-dialog .staffing-range-row{padding:8px 10px}.staffing-range-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 72px;gap:8px}.staffing-dialog .pattern-form{gap:10px}.staffing-dialog .staffing-check-toggle{padding:10px 12px}.staffing-dialog .staffing-range-row .shift-time-part{font-size:15px;min-width:25px}.staffing-dialog .staffing-range-row .shift-time-menu{max-height:170px}}
.staffing-dialog .staffing-range-row.invalid{border-color:#d47e72}

/* Compact staffing rows share column labels instead of repeating a card header. */
.staffing-range-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 64px;gap:8px;padding:0 40px 0 30px;margin-bottom:6px;color:var(--text-muted);font-size:12px;text-align:center}
.staffing-dialog .staffing-range-row{display:grid;grid-template-columns:16px minmax(0,1fr) 28px;gap:6px;align-items:center;padding:5px 7px;margin-bottom:5px;border-radius:9px}
.staffing-dialog .staffing-range-heading{display:contents}
.staffing-range-heading>[data-range-title]{grid-column:1;grid-row:1;text-align:center;font-size:11px;font-weight:500;color:var(--text-muted)}
.staffing-dialog .staffing-remove-range{grid-column:3;grid-row:1;min-height:40px;width:28px;padding:0;font-size:20px;border-radius:7px;line-height:1}
.staffing-dialog .staffing-remove-range:hover{background:var(--accent-soft)}
.staffing-dialog .staffing-range-fields{grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 64px;gap:8px}
.staffing-dialog .staffing-range-fields .field{gap:0}
.staffing-range-fields .field>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.staffing-dialog .staffing-range-row .shift-time-control{height:38px;min-height:38px;padding:1px;gap:1px}
.staffing-dialog .staffing-range-row .shift-time-part{height:34px;min-height:34px;min-width:24px;padding:2px 1px;font-size:15px}
.staffing-dialog .staffing-range-row input{height:38px}
.staffing-dialog .staffing-people-input input{font-size:16px;padding:5px 22px 5px 4px}
.staffing-people-input>span{right:7px}
.staffing-dialog .staffing-range-error{grid-column:1/-1;margin:0 0 2px}
@media(max-width:600px){.staffing-dialog .staffing-range-fields,.staffing-range-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px;gap:6px}.staffing-dialog .staffing-range-row .shift-time-part{min-width:21px}.staffing-range-columns{padding-left:30px;padding-right:40px}}

/* Permission descriptions follow the current feature names and entry points. */
.permission-basics{padding:12px 14px;background:var(--surface-soft);border:1px solid var(--line);border-radius:10px;margin:12px 0;color:var(--text-main)}
.permission-basics strong{font-size:13px}.permission-basics p{margin:5px 0 0;font-size:12px;line-height:1.65;color:var(--text-muted)}
.permission-editor{display:grid;gap:14px;margin-top:14px}
.permission-independent-note{margin:0;font-size:12px;line-height:1.6}
.permission-group{margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;min-width:0}
.permission-group legend{font-size:14px;font-weight:700;padding:0 6px;color:var(--text-main)}
.permission-group .permission-grid{margin:0;gap:8px;grid-template-columns:1fr}
html[data-theme] .permission-choice{background:var(--surface);color:var(--text-main);border-color:var(--line);padding:12px;gap:10px;align-items:flex-start}
.permission-choice>span{min-width:0;display:grid;gap:5px}.permission-choice strong{font-size:14px;font-weight:650;line-height:1.4}
.permission-description{font-size:12px;line-height:1.65;color:var(--text-muted)}
.permission-entry{font-size:11px;line-height:1.5;color:var(--accent-ink)}
.permission-choice input{margin-top:2px;flex:none}
html[data-theme] .permission-choice:has(input:checked){background:var(--accent-soft);border-color:var(--accent)}
.permission-group.self-leave-permissions>p{font-size:12px;line-height:1.6;margin:0 0 10px}
.permission-group .permission-leave-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.permission-group .permission-leave{padding:10px 8px;align-items:center;justify-content:center;gap:6px}.permission-leave input{margin:0}.permission-leave strong{font-size:13px}
.permission-summary-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.permission-summary-tags>span{padding:3px 7px;border:1px solid var(--line);border-radius:6px;font-size:11px;line-height:1.4;color:var(--text-muted);background:var(--surface-soft)}
.permission-summary-tags>.permission-self-summary{color:var(--accent-ink)}
.job-title-create-panel,.permission-scope-guide,.inactive-job-titles{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}
.job-title-create-panel>summary,.permission-scope-guide>summary,.inactive-job-titles>summary{cursor:pointer;font-size:13px;font-weight:650;line-height:1.6;padding:5px 0}
.job-title-create-panel>summary{color:var(--accent-ink)}
.job-title-create-panel form{margin-top:12px}.job-title-create-panel form>.button{margin-top:14px}
.permission-scope-guide p{font-size:12px;line-height:1.7}
.job-title-dialog .modal{width:min(100%,740px)}
.job-title-dialog .permission-change-note{font-size:13px;line-height:1.6;margin-top:0}
.job-title-dialog .modal>.modal-actions{position:sticky;bottom:-24px;background:var(--surface);padding:12px 0;margin-bottom:0;border-top:1px solid var(--line)}
@media(min-width:700px){.permission-group .permission-grid:not(.permission-leave-grid){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.job-title-dialog .modal{padding:16px}.permission-group{padding:10px}.permission-group .permission-leave-grid{grid-template-columns:repeat(3,minmax(0,1fr))}html[data-theme] .permission-choice{padding:10px}.permission-description{font-size:12px}.permission-entry{font-size:11px}.job-title-dialog .modal>.modal-actions{bottom:-16px}.job-title-settings .job-title-row{align-items:flex-start}.job-title-settings .person-actions{align-self:flex-start}}

.permission-summary-compact{margin:5px 0 0;font-size:12px;line-height:1.65;color:var(--text-muted)}
.permission-choice>span{gap:4px}

/* Equal job-title rows grow together to fit the longest permission summary. */
.job-title-settings .job-title-list{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:1fr;gap:8px}
.job-title-settings .job-title-row{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:10px;align-items:center;min-height:88px;width:100%;margin:0;padding:12px}
.job-title-settings .job-title-row .job-title-detail{min-width:0}
.job-title-settings .job-title-row .person-actions{margin:0;align-self:center;flex-wrap:nowrap}
.job-title-settings .job-title-row .job-title-detail>.note{margin:5px 0 0;line-height:1.6}
@media(max-width:600px){.job-title-settings .job-title-row{gap:7px;min-height:92px;padding:10px;grid-template-columns:12px minmax(0,1fr) 88px}.job-title-settings .job-title-row .person-actions{justify-content:flex-end;gap:4px}.job-title-settings .job-title-row .person-actions button{min-height:36px;width:42px;padding:6px 3px;font-size:12px}.job-title-settings .job-title-row .pill{font-size:11px;padding:5px 7px;white-space:nowrap}}

/* Warm branch header, neutral expanded body, and separate personnel surfaces. */
html[data-theme] .branch-entry{background:var(--surface);border-color:var(--line)}
html[data-theme] .branch-entry.branch-current{background:var(--surface);border-color:var(--accent)}
html[data-theme] .branch-entry>summary{background:var(--surface-soft);transition:background .15s}
html[data-theme] .branch-entry>summary:hover{background:color-mix(in srgb,var(--accent-soft) 40%,var(--surface-soft))}
html[data-theme] .branch-entry.branch-current>summary{background:var(--accent-soft)}
html[data-theme] .branch-entry-body{background:var(--page-bg);border-color:var(--line);padding:0 12px 12px}
.branch-entry-body .branch-actions{padding:12px 0 10px;border-bottom:1px solid var(--line);margin-bottom:10px}
.branch-entry-body .panel-list{gap:8px;margin:0}
html[data-theme] .branch-entry-body .branch-member{background:var(--surface);border-color:var(--line);border-radius:10px;padding:12px;margin:0;box-shadow:0 1px 3px #0000000a}
html[data-theme] .branch-entry-body .branch-member .note{color:var(--text-muted);line-height:1.6}
html[data-theme] .branch-entry-body .branch-member .person-actions button{background:var(--surface-soft);border-color:var(--line);color:var(--text-main)}
html[data-theme] .branch-entry-body .branch-member .person-actions button:hover{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}
html[data-theme] .branch-entry-body .branch-member-support{border-left:3px solid #78988a}
html[data-theme] .branch-member-support .pill{background:#e7efe9;color:#4a6b5a}
html[data-theme=dark] .branch-member-support .pill{background:#2a3830;color:#b3cdbd}
@media(max-width:600px){html[data-theme] .branch-entry-body{padding:0 9px 9px}html[data-theme] .branch-entry-body .branch-member{padding:10px}.branch-entry-body .branch-actions{padding:9px 0;margin-bottom:9px}}
/* Keep browser pull-to-refresh outside the app's own scrolling surface. */
.app-startup{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-main);background:var(--page-bg)}
.app-startup strong{font-size:22px}.app-startup p{margin:0;color:var(--text-muted);font-size:14px}
.calendar-request-status{position:fixed;z-index:8;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);padding:8px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text-main);font-size:13px;box-shadow:0 4px 12px #0002;pointer-events:none}
.calendar-saving{opacity:.6;outline:2px solid var(--accent);outline-offset:-2px}
@media(max-width:900px){
 html,body{height:100%;overflow:hidden;overscroll-behavior-y:none;background:var(--page-bg)}
 #app{height:100dvh;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:none;-webkit-overflow-scrolling:touch}
 .shell{min-height:100%}
}
.performance-dialog .modal{width:min(96vw,900px)}
.performance-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.performance-heading>strong{margin-right:auto}
.performance-results{display:grid;gap:12px}.performance-result{border:1px solid var(--line);border-radius:12px;padding:14px}.performance-result h3{margin:0 0 6px}
.performance-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.performance-values>div{display:grid;gap:5px;padding:10px;background:var(--surface-soft);border-radius:8px}.performance-values span,.performance-values small{font-size:12px;color:var(--text-muted)}.performance-values strong{font-size:17px}
@media(max-width:600px){.performance-dialog .modal{padding:16px}.performance-values{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-values strong{font-size:15px}}
/* Pending previews never alter authoritative schedule data or row dimensions. */
.calendar-cell-pending{position:relative!important}
.calendar-pending-preview{position:absolute;z-index:3;inset:3px;display:flex;align-items:center;justify-content:center;padding:3px;background:var(--surface,#302c28);color:var(--text-main,#f3eee8);border:1px dashed var(--accent,#e6a275);border-radius:7px;font-size:12px;line-height:1.25;white-space:normal;pointer-events:none}
.wish-date .calendar-pending-preview{inset:auto 2px 3px;min-height:23px;font-size:11px}

/* Every palette is one finite horizontal row. Tile height stays at two old rows. */
.palette-time-label{display:inline-flex;align-items:center;justify-content:center;gap:0}
.horizontal-drag-preview{position:fixed;z-index:1001;pointer-events:none;border-radius:8px;outline:2px solid var(--accent);box-shadow:0 8px 22px #0005;overflow:hidden;will-change:transform}
.horizontal-drag-source{opacity:.25!important}
.horizontal-palette-dragging,.horizontal-palette-dragging *{user-select:none!important;-webkit-user-select:none!important;cursor:grabbing!important}
@media(max-width:900px){
 .wish-controls .wish-shift-tools{min-width:0;overflow:hidden;flex:1}
 .wish-controls .wish-section-heading{display:none!important}
 .wish-controls .wish-shift-tools>.tool-palette,.employee-interface .wish-controls .wish-shift-tools>.tool-palette{position:relative;display:grid!important;grid-template-columns:none!important;grid-template-rows:40px!important;grid-auto-flow:column;grid-auto-columns:calc((100% - (var(--palette-columns,3) - 1)*6px)/var(--palette-columns,3));gap:6px;flex:1;min-width:0;height:40px;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x;align-content:stretch}
 .wish-controls .wish-shift-tools .tool-button{height:40px;min-height:40px;min-width:0;margin:0;padding:4px;font-size:15px;white-space:nowrap}
 .matrix-carousel-panel.tool-section>.tool-palette{position:relative;display:grid!important;grid-template-columns:repeat(var(--palette-columns,5),minmax(0,1fr))!important;grid-template-rows:repeat(2,29px)!important;grid-auto-flow:row!important;grid-auto-columns:auto;grid-auto-rows:29px;gap:4px;height:62px;padding-right:7px;overflow-x:hidden!important;overflow-y:auto!important;touch-action:pan-y;overscroll-behavior-y:contain;align-content:start;scrollbar-width:none}
 .matrix-carousel-panel.tool-section .tool-palette>.tool-button,.matrix-carousel-panel.tool-section.matrix-palette-large .tool-palette>.tool-button{grid-row:auto!important;height:29px!important;min-height:0;max-height:none;padding:2px;font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
 .matrix-carousel-panel.tool-section .tool-palette.palette-large-tiles>.tool-button{grid-row:span 2!important;height:62px!important;font-size:14px}
 .matrix-carousel-panel.tool-section .tool-palette.palette-pinned-rest>[data-palette-key="leave:rest"]{grid-column:1;grid-row:1 / span 2!important;height:62px!important;font-size:14px}
 .matrix-carousel-panel.tool-section.schedule-time-section .tool-palette>.tool-button{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:clip}
 .matrix-carousel-panel .palette-time-label{display:inline-flex;flex-direction:row;gap:0;white-space:nowrap}
 .matrix-carousel-panel .palette-time-label>span{font-size:9px;line-height:normal}
 .matrix-peek-button{position:absolute;z-index:3;top:0;bottom:0;width:18px;border:0;padding:0;background:transparent;touch-action:pan-y;cursor:pointer}
 .matrix-peek-button.previous{left:0}.matrix-peek-button.next{right:0}
 .matrix-peek-button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:12px}
 .palette-scrollbar{position:absolute;right:9px;top:6px;width:3px;height:62px;background:color-mix(in srgb,var(--text-muted) 15%,transparent);border-radius:3px;pointer-events:none}
 .palette-scrollbar>span{display:block;width:3px;border-radius:3px;background:var(--text-muted);opacity:.65}
 .palette-scrollbar[hidden]{display:none}
 [data-horizontal-palette] [data-palette-key]{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
 [data-horizontal-palette]::-webkit-scrollbar{display:none}
 #toast,.calendar-request-status{position:fixed;top:auto;bottom:calc(80px + max(8px,env(safe-area-inset-bottom,0px)));left:50%;transform:translateX(-50%);z-index:30;max-width:calc(100vw - 24px);width:max-content;padding:9px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text-main);font-size:13px;line-height:1.35;box-shadow:0 4px 12px #0002;pointer-events:none}
 #toast.error{background:#963e38;color:#fff;border-color:#bd6962}
}
@media(min-width:901px){.calendar-request-status{top:auto;bottom:22px}}

/* Home Screen uses a separate scroll surface below an opaque system-safe edge. */
@media(max-width:900px) and (display-mode:standalone){
 body::before{content:'';position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);background:var(--page-bg);z-index:9;pointer-events:none}
 #app{position:fixed;top:env(safe-area-inset-top,0px);left:0;right:0;bottom:0;height:auto;background:var(--page-bg)}
 .shell>.main,.shell.employee-interface>.main{padding-top:6px}
 html[data-theme] .shell .wish-layout,html[data-theme] .shell .personal-schedule-layout{height:calc(100dvh - env(safe-area-inset-top,0px) - var(--mobile-nav-height) - 6px)}
 html[data-theme] .shell[data-page=schedule] .matrix-card{height:calc(100dvh - env(safe-area-inset-top,0px) - var(--mobile-nav-height) - 88px)}
}

@media(min-width:901px){.palette-scrollbar,.matrix-peek-button{display:none}}

/* Feedback stays beside the action. Nothing here adds network activity. */
button{transition:background-color .14s ease,color .14s ease,box-shadow .14s ease}
.nav button:active,.mobile-home button:active,.tool-palette button:active,.wish-controls button:active{transform:scale(.97)}
.feedback-enter{animation:feedback-enter .15s ease-out}
@keyframes feedback-enter{from{opacity:.65}to{opacity:1}}
.feedback-changed{animation:feedback-changed .65s ease-out}
@keyframes feedback-changed{from{box-shadow:inset 0 0 0 2px var(--accent);background-color:color-mix(in srgb,var(--accent) 18%,var(--surface))}to{box-shadow:inset 0 0 0 0 transparent}}
.feedback-spinner::before{content:"";display:inline-block;width:.8em;height:.8em;margin-right:6px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-.05em;animation:feedback-spin .9s linear infinite}
@keyframes feedback-spin{to{transform:rotate(360deg)}}
.action-pending{cursor:wait}
.form-feedback-error{color:var(--danger,#c76b63);font-size:13px;line-height:1.5;margin:12px 0 0;white-space:pre-line}
.palette-save-status,.scope-switch-status,.attendance-loading,.calendar-live-status{display:inline-flex;align-items:center;font-size:12px;line-height:1.4;color:var(--text-muted);gap:3px}
.palette-save-status{position:absolute;inset:auto 8px 2px auto;padding:2px 6px;background:var(--surface);border-radius:5px;pointer-events:none}
.tool-section{position:relative}
html[data-theme] .calendar-request-status{position:static;inset:auto;transform:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:0;box-shadow:none;font-size:12px;line-height:1.4;width:auto;background:none;color:var(--text-muted)}
.calendar-live-status{flex-basis:100%}
html[data-theme] .calendar-cell-pending{position:relative!important;outline:1px solid var(--accent);outline-offset:-2px;opacity:1}
html[data-theme] .calendar-pending-preview{inset:3px;min-height:0;display:flex;gap:4px;align-items:center;justify-content:center;border:0;background:var(--surface);padding:3px;border-radius:6px;color:var(--text-main);font-size:12px}
html[data-theme] .wish-date .calendar-pending-preview{inset:auto 2px 3px;min-height:22px;font-size:11px}
.calendar-pending-dot{flex:none;width:5px;height:5px;border:1px solid var(--accent);border-radius:50%;background:var(--accent)}
.calendar-preview-label{min-width:0;white-space:normal;overflow-wrap:anywhere}
.calendar-loading .wish-bars,.calendar-loading .wish-date-meta,.calendar-loading .personal-calendar-date>:not(.wish-date-head),.calendar-loading [data-schedule-cell]>*,.calendar-loading .matrix-day small,.calendar-loading .matrix-name small,.calendar-loading .wish-totals,.calendar-loading .schedule-quota,.calendar-loading .personal-rest-summary{visibility:hidden!important}
.calendar-loading .wish-month,.calendar-loading .matrix-wrap{pointer-events:none;background:color-mix(in srgb,var(--surface) 90%,var(--accent) 10%)}
.calendar-loading .personal-calendar-date{color:var(--text-main)}
.calendar-loading .quota-summary,.calendar-loading .matrix-name small{visibility:hidden!important}
.calendar-loading .matrix-day{background:var(--surface)!important}
.calendar-loading .matrix-day button>*:not(:first-child){visibility:hidden}
.attendance-pending .daily-clock-actual,.attendance-pending .daily-clock-planned,.attendance-pending .daily-clock-summary,.attendance-pending .daily-clock-draft{visibility:hidden}
.attendance-pending .daily-clock-people{pointer-events:none}
.scope-loading{padding:18px}
.feedback-placeholder{height:68px;background:var(--surface);border-radius:12px;margin:12px 0;opacity:.6}
#toast.error{pointer-events:auto;display:flex;align-items:center;gap:12px}
#toast.error button{flex:none;padding:5px 8px;border:1px solid #ffffff60;border-radius:6px;color:inherit;background:transparent}
.schedule-month,.calendar-controls{position:relative}
.permission-group .others-wish-permissions{margin:10px 0 0;background:var(--surface);border-color:var(--line)}
.others-wish-permissions:disabled{opacity:.55}
.platform-company-list{margin-top:14px}
.platform-company-list>summary{cursor:pointer;font-weight:600}
.platform-company-list>.panel-list{margin-top:12px}
.platform-company-search{display:grid;grid-template-columns:minmax(0,1fr) 130px auto;align-items:end;gap:10px;margin:14px 0}
.platform-company-search .field{margin:0;min-width:0}
.platform-company-search label{font-size:13px}
.platform-company-results{min-height:48px}
.platform-company-pages{justify-content:flex-end}
@media(max-width:600px){.platform-company-search{grid-template-columns:minmax(0,1fr) auto}.platform-company-search>.field:first-child{grid-column:1/-1}}
.today-work-card>.card-head{position:relative}
html[data-theme] .today-work-card>.card-head>.calendar-request-status{position:absolute;top:calc(100% + 2px);right:0;bottom:auto;left:auto;white-space:nowrap;font-size:10px;line-height:12px;z-index:1}
html[data-theme] :is(.schedule-month,.calendar-controls)>.calendar-request-status,:is(.schedule-month,.calendar-controls)>.calendar-live-status{position:absolute;top:calc(100% + 2px);right:0;white-space:nowrap;font-size:10px;line-height:12px;z-index:1}
#companyForm button{min-width:130px}
@media(prefers-reduced-motion:reduce){
 .feedback-enter,.feedback-changed,.feedback-spinner::before{animation:none!important}
 button,.matrix-carousel-track{transition:none!important}
 .nav button:active,.mobile-home button:active,.tool-palette button:active,.wish-controls button:active{transform:none}
}

/* Confirmed wish-origin assignments share one color; pending wishes stay outlined. */
.schedule-source-colors .schedule-wish-label.pending-wish,.matrix-legend .legend-swatch.pending-wish{background:transparent;color:var(--muted);border:1px dashed var(--wish-label-border)}
.personal-calendar-date.wish-confirmed .personal-shift-name,.personal-calendar-date.wish-confirmed .personal-leave{background:var(--wish-label-bg);color:var(--wish-label-text);border:1px solid var(--wish-label-border);border-radius:6px}

/* Date notes remain distinct from holiday and staffing warnings. */
html[data-theme] .matrix-day em.matrix-date-note{color:#783e23;background:#f6e4d4;border:1px solid #cfaa8b;border-radius:5px;padding:2px 5px;margin:4px auto 0;font-size:11px;font-weight:600;line-height:1.4;box-sizing:border-box}
html[data-theme=dark] .matrix-day em.matrix-date-note{color:#ffd7b6;background:#49382c;border-color:#967154}
.wish-controls .wish-totals{display:flex;flex-wrap:wrap;column-gap:12px;row-gap:2px}
.wish-totals>span{display:inline-block}
.wish-totals .wish-annual-summary{flex-basis:100%}
.calendar-note-content{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;color:var(--text-main);max-height:55dvh;overflow-y:auto}
.publication-date-fields{display:grid;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);align-items:center;gap:8px;margin:18px 0 12px}
.publication-date-fields label{display:grid;gap:7px;min-width:0;font-size:12px;color:var(--text-muted)}
.publication-date-fields label>span{padding-left:3px}
html[data-theme] .publication-date-fields input{width:100%;min-width:0;box-sizing:border-box;height:48px;padding:10px 9px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--text-main);font:inherit;font-size:14px;font-weight:650;box-shadow:none;color-scheme:light}
html[data-theme=dark] .publication-date-fields input{color-scheme:dark}
html[data-theme] .publication-date-fields input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 2px var(--accent-soft)}
.publication-date-separator{padding-top:22px;text-align:center;color:var(--text-muted);font-size:16px}
.publication-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--line);border-radius:13px;background:var(--surface-soft);margin:0}
html[data-theme] .publication-shortcuts .button{min-width:0;min-height:40px;margin:0;padding:8px 6px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text-muted);font-size:14px;line-height:1.3;font-weight:600;box-shadow:none;transform:none!important;transition:none}
html[data-theme] .publication-shortcuts .button.selected{background:var(--accent-soft);border-color:var(--accent-ink);color:var(--accent-ink)}
.publication-check-status{height:18px;margin:6px 0 0;font-size:11px;line-height:18px;color:var(--text-muted)}
.publication-preview{min-height:110px;font-size:13px;line-height:1.6}.publication-preview p{margin:8px 0}
html[data-theme] .publication-dialog [data-action="confirm-publication"]{min-width:150px;min-height:42px;transition:none}
html[data-theme] .publication-dialog [data-action="confirm-publication"]:disabled{opacity:1;cursor:wait}
.publication-preview details summary{cursor:pointer;font-weight:650;padding:8px 0}
.publication-warnings{max-height:25dvh;overflow-y:auto;overflow-wrap:anywhere}
.publication-caution{color:var(--text-main);font-weight:600}
.matrix-day .publication-day-state{font-size:10px;line-height:1.4;font-weight:500;color:var(--muted);margin:3px 0}
.matrix-day .publication-day-state.published{color:#577c65}
html[data-theme=dark] .matrix-day .publication-day-state.published{color:#aad2b5}
.matrix-day .publication-day-state.changed{color:#ad5630;font-weight:700}
html[data-theme=dark] .matrix-day .publication-day-state.changed{color:#f3bb8d}
.personal-publication-label{font-size:10px;line-height:1.4;color:var(--muted);padding:4px 2px}
.personal-calendar-guide{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px 14px;flex:none;padding:4px 0 8px;font-size:11px;line-height:1.5;color:var(--text-muted)}
.personal-calendar-guide>span{white-space:nowrap}
.personal-day-content{display:flex;flex:1;min-height:0;width:100%;box-sizing:border-box;align-items:center;justify-content:center;padding-bottom:8px}
html[data-theme] .shell .personal-schedule-layout .personal-shift-times{display:grid;gap:4px;line-height:1.25;font-size:18px;font-weight:800;letter-spacing:0;font-variant-numeric:tabular-nums;color:var(--text-main);text-align:center}
html[data-theme] .shell .personal-schedule-layout .personal-calendar-date .personal-leave{display:inline-flex;align-items:center;justify-content:center;width:max-content;min-width:38px;max-width:100%;min-height:38px;box-sizing:border-box;margin:0;padding:5px 9px;border-radius:8px;border:1px solid var(--leave-label-border,#8da7b0);background:var(--leave-label-bg,#dce7eb);color:var(--leave-label-text,#263a43);font-size:16px;font-weight:750;line-height:1.2;white-space:nowrap}
html[data-theme] .shell .personal-schedule-layout .personal-calendar-date.wish-confirmed .personal-leave{background:var(--employee-leave-bg);color:var(--employee-leave-text);border-color:var(--employee-leave-border)}
html[data-theme] .shell .personal-schedule-layout .personal-calendar-date.unpublished-date{background:#eae3d9}
html[data-theme=dark] .shell .personal-schedule-layout .personal-calendar-date.unpublished-date{background:#191816}
.personal-empty-mark{color:var(--text-muted);font-size:17px;font-weight:500;opacity:.65}
@media(max-width:900px){
 .personal-calendar-guide{padding:3px 12px 7px;font-size:10px;gap:2px 10px}
 html[data-theme] .shell .personal-schedule-layout .personal-shift-times{font-size:clamp(12px,3.9vw,17px);gap:4px}
 html[data-theme] .shell .personal-schedule-layout .personal-calendar-date .personal-leave{font-size:clamp(13px,3.9vw,16px);min-width:34px;min-height:34px;padding:5px 6px}
}
@media(max-width:760px){
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-annual-summary){height:100px;min-height:100px;max-height:100px}
}

/* Clock requests reuse the current theme and remain independent of GPS capture. */
.clock-request-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.clock-request-tabs .button{min-height:40px}.clock-request-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;padding:1px 5px;border-radius:10px;background:var(--accent-soft);color:var(--accent-ink);font-size:11px}
.clock-request-home{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.clock-request-notice{width:100%;border:0;background:var(--surface-soft);color:var(--text-main);border-radius:9px;padding:10px 12px;text-align:left;font-size:12px}
.clock-request-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-top:16px}.clock-request-filters label{display:grid;gap:5px;color:var(--text-muted);font-size:12px}.clock-request-filters select,.clock-request-filters input{width:100%;min-width:0;border:1px solid var(--line);border-radius:9px;padding:9px}
.clock-request-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:13px 0;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text-main);text-align:left}.clock-request-row>span:first-child{display:grid;gap:5px;min-width:0}.clock-request-row small{color:var(--text-muted);font-size:12px;overflow-wrap:anywhere}.clock-request-status{flex:none;display:inline-flex;align-items:center;white-space:nowrap;gap:4px;font-size:12px;border:1px solid var(--line);border-radius:20px;padding:4px 9px;background:var(--surface-soft);color:var(--text-muted)}.clock-request-status.pending{color:var(--accent-ink);background:var(--accent-soft)}.clock-request-status.approved{border-color:#668b7b;color:#32644c}.clock-request-status.rejected{border-color:#ac706a;color:#9f4339}
.clock-request-dialog .modal{width:min(100%,520px)}.clock-request-context{display:grid;gap:5px;padding:10px 12px;margin:12px 0;background:var(--surface-soft);border:1px solid var(--line);border-radius:10px;font-size:12px;color:var(--text-muted)}.clock-request-item{display:grid;grid-template-columns:minmax(115px,1fr) minmax(125px,1fr);gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.clock-request-item>label{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:14px}.clock-request-item small{display:block;width:100%;font-size:11px;color:var(--text-muted)}.clock-request-item input[type=checkbox]{width:18px;height:18px}.clock-request-item .field{margin:0}.clock-request-time .field>label{font-size:11px}.clock-request-dialog textarea{resize:vertical;min-height:72px;width:100%;padding:10px;border:1px solid var(--line);border-radius:9px}.clock-request-dialog form>.field:last-child{margin-top:14px}.clock-request-detail>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}.clock-request-proposal{display:grid;gap:6px;padding:12px;color:var(--accent-ink);background:var(--accent-soft);border-radius:10px}.clock-request-detail p{white-space:pre-wrap;overflow-wrap:anywhere}.clock-request-dialog .modal-actions{flex-wrap:wrap}.clock-request-rejection{border-left:3px solid #c87970;padding-left:10px}
@media(max-width:600px){.clock-request-panel{padding:16px}.clock-request-tabs{gap:6px}.clock-request-tabs .button{flex:1;padding:8px 5px;white-space:nowrap;font-size:12px}.clock-request-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.clock-request-dialog .modal{padding:18px}.clock-request-item{grid-template-columns:minmax(105px,1fr) minmax(125px,1fr)}.clock-request-row{padding:12px 0}.clock-request-detail>div:first-child{align-items:flex-start}.clock-request-dialog .modal-actions .button{min-height:40px}}

html[data-theme=dark] .clock-request-status.approved{color:#99c9b2}html[data-theme=dark] .clock-request-status.rejected{color:#e5a098}

.clock-request-home:empty{display:none}

/* The attendance and request views share one stationary heading and toolbar. */
html:has(.clock-workspace){scrollbar-gutter:stable}
.clock-workspace{padding:18px}
.clock-workspace-header{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:36px;margin:0}
.clock-workspace .clock-workspace-header h2{margin:0;font-size:18px;line-height:26px}
.clock-workspace-header>.button{min-height:32px;padding:5px 9px;font-size:12px;flex:none}
.clock-workspace .clock-request-tabs{display:flex;align-items:stretch;justify-content:space-between;flex-wrap:nowrap;gap:10px;margin:12px 0 16px}
.clock-request-sections{display:flex;align-items:stretch;gap:4px;padding:3px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft);min-width:0}
.clock-workspace .clock-request-sections .button{min-width:96px;min-height:34px;padding:6px 12px;border-color:transparent;background:transparent;color:var(--text-muted);border-radius:8px;white-space:nowrap}
.clock-workspace .clock-request-sections .button.primary{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--line)}
.clock-workspace .clock-request-create{flex:none;min-height:42px;padding:8px 12px;white-space:nowrap}
@media(max-width:900px){.clock-workspace{padding:12px}.clock-workspace .clock-workspace-header h2{font-size:16px;line-height:24px}.clock-workspace .clock-request-tabs{gap:8px}.clock-workspace .clock-request-sections .button{min-width:82px;flex:1;padding:6px 8px;font-size:12px}.clock-workspace .clock-request-create{flex:none;padding:8px 10px;font-size:12px}}

@media(max-width:900px){html:has(.clock-workspace){scrollbar-gutter:auto}#app:has(.clock-workspace){scrollbar-gutter:stable}}

/* Personal availability is separate from confirmed work and leave. */
.availability-tabs{display:flex;gap:4px;padding:4px;background:var(--surface-soft);border:1px solid var(--line);border-radius:12px;margin-bottom:14px}.availability-tabs button{flex:1;min-height:40px;border:0;border-radius:9px;background:transparent;color:var(--text-muted);font:inherit;font-size:14px;white-space:nowrap}.availability-tabs button.active{background:var(--accent-soft);color:var(--accent-ink);font-weight:700}
.availability-heading,.availability-person{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.availability-heading h2{margin:0}.availability-person{margin-top:14px}.availability-person label{display:flex;align-items:center;gap:10px;font-size:13px}.availability-person select{min-width:125px;max-width:200px}.availability-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid var(--line);border-left:1px solid var(--line)}.availability-date,.availability-empty{min-width:0;min-height:110px;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--surface);color:var(--text-main);padding:9px 5px;text-align:left;display:flex;flex-direction:column;gap:5px}.availability-date.selected{box-shadow:inset 0 0 0 2px var(--accent-ink);background:var(--accent-soft)}.availability-date:disabled{opacity:.75;cursor:default}.availability-date.weekend>strong{color:#cc8f88}.availability-offer{font-size:12px;line-height:1.45;color:var(--accent-ink)}.availability-lock{font-size:10px;color:var(--text-muted)}.availability-controls{padding-top:14px}.availability-presets,.availability-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.availability-presets{max-height:112px;overflow-y:auto}.availability-actions strong{font-size:13px}.availability-range{display:grid;grid-template-columns:1fr 1fr 40px;gap:8px;align-items:center}.availability-range .field{min-width:0}.availability-range-list{max-height:330px;overflow-y:auto}.availability-whole{display:flex;align-items:center;gap:8px;margin:16px 0}.availability-person-setting{margin:12px 0;border:1px solid var(--line);border-radius:10px;padding:12px}.availability-person-setting[hidden]{display:none}.availability-person-setting select{width:100%;font-size:13px}.availability-matrix-hint{display:block;color:var(--accent-ink);font-size:11px;line-height:1.5;font-weight:500;white-space:normal;opacity:.85}.availability-overlay-toggle{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-main);margin:8px 0}.availability-overlay-toggle input{accent-color:var(--accent-ink)}
@media(max-width:900px){.availability-card{border:0;border-radius:0;background:transparent;padding:0}.availability-heading,.availability-person,.availability-controls,.availability-card>.note,.availability-tabs{margin-left:12px;margin-right:12px}.availability-heading h2{font-size:18px}.availability-date,.availability-empty{min-height:96px;padding:7px 4px}.availability-offer{font-size:10px}.availability-date .holiday-badge{font-size:9px;max-height:28px;overflow:hidden}.availability-actions .button{min-height:40px;font-size:12px}.availability-tabs button{font-size:13px}.availability-person label{flex-wrap:wrap}.availability-person select{min-height:42px}.availability-heading .schedule-month strong{font-size:14px}.availability-month{border-left:0}.availability-date:nth-child(7n){border-right:0}}

.availability-matrix-detail{display:block;font-size:10px;color:var(--accent-ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}.availability-person-setting[hidden],[data-wish-limit-fields][hidden]{display:none}
@media(max-width:900px){html[data-theme] .shell>.main:has(>.availability-card){padding-inline:0}.availability-range-list[hidden]{display:none}}

@media(max-width:900px){.desktop-availability-overlay{display:none}}@media(min-width:901px){.mobile-availability-overlay{display:none}}
@media(max-width:900px){html[data-theme] .shell .matrix-card>.unified-schedule-heading:has(.mobile-availability-overlay){grid-template-rows:44px 18px 28px;height:100px;min-height:100px}.matrix-card .mobile-availability-overlay{grid-column:1/-1;grid-row:3;margin:0;min-height:28px;white-space:nowrap;position:relative;z-index:1}}

[data-availability-quota-section][hidden]{display:none}.wish-view-title{margin:0;font-size:16px;white-space:nowrap}@media(max-width:900px){html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-view-title{grid-column:1/3;grid-row:1;font-size:16px}}

/* Availability settings and all three request calendars share the same frame. */
.availability-person-setting{min-width:0;margin:12px 0;padding:12px;border-radius:12px;box-sizing:border-box}
.availability-person-setting legend{font-size:13px;font-weight:700;padding:0 5px}
.availability-mode-options{display:grid;gap:8px}
.availability-mode-option{display:flex;align-items:flex-start;gap:10px;width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer}
.availability-mode-option:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.availability-mode-option input{width:17px;height:17px;flex:0 0 17px;margin:2px 0 0;accent-color:var(--accent)}
.availability-mode-option span{display:grid;gap:5px;min-width:0}
.availability-mode-option strong{font-size:14px;line-height:1.5;color:var(--text-main)}
.availability-mode-option small,.availability-mode-reminder{font-size:12px;line-height:1.6;color:var(--text-muted)}
.availability-mode-reminder{margin:10px 2px 0}
.wish-page-select{width:136px;min-height:44px;margin:0;padding:8px 28px 8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text-main);font:inherit;font-size:14px;font-weight:700}
.availability-card .availability-month{display:grid;grid-template-columns:none;border:0;grid-auto-rows:minmax(0,1fr)}
.availability-card .availability-date,.availability-card .availability-empty{min-height:0;height:100%;border-bottom:0;box-sizing:border-box;background:var(--surface);color:var(--text-main)}
.availability-card .availability-date.selected{background:var(--accent-soft);box-shadow:inset 0 0 0 2px var(--accent)}
.availability-controls .availability-person{margin:0 0 10px}.availability-controls>.note{margin:6px 0 10px}
@media(max-width:900px){
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-select{grid-row:1;grid-column:1/3;width:124px;max-width:100%;font-size:13px}
 html[data-theme] .shell .availability-layout>.calendar-card{padding-inline:0}
 html[data-theme] .shell .availability-layout .availability-month{grid-template-columns:none}
 html[data-theme] .shell .availability-layout .availability-date,html[data-theme] .shell .availability-layout .availability-empty{padding:2px 3px;min-height:0;background:var(--calendar-bg);border-color:var(--calendar-line)}
 html[data-theme] .shell .availability-layout .availability-empty{background:var(--calendar-empty)}
 .availability-layout .availability-date>strong{font-size:12px;line-height:20px}
 html[data-theme] .shell .availability-layout>.availability-controls{flex:none;height:76px;min-height:76px;max-height:76px;padding:6px 12px;margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;overflow-y:auto;scrollbar-width:thin}
 .availability-controls .availability-person{margin:0;display:inline-flex}.availability-controls .availability-person label{font-size:0;gap:0}.availability-controls .availability-person select{font-size:12px;min-height:32px;height:32px;max-width:125px;padding-block:4px}
 .availability-controls .availability-person>.button,.availability-controls>.availability-instruction{display:none}
 .availability-controls .availability-presets{display:inline-flex;margin:0 0 4px 6px;max-height:none;vertical-align:top;gap:4px}
 .availability-controls .availability-actions{gap:5px;margin:2px 0 0}.availability-controls .button{min-height:30px;padding:5px 7px;font-size:11px}
 .availability-controls .availability-actions strong{font-size:11px}
}

@media(max-width:900px){
 html[data-theme] .shell .wish-layout>.wish-controls,html[data-theme] .shell .availability-layout>.availability-controls,html[data-theme] .shell .personal-schedule-layout>.schedule-quota-panel{height:100px;min-height:100px;max-height:100px}
 .availability-card .availability-date:disabled{opacity:1}
 html[data-theme] .shell .availability-layout .availability-date.selected{background:var(--accent-soft)}
}

/* Planning controls: month first, mode second; availability has a clear editor. */
.wish-page-tabs{display:inline-flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);min-width:0}
.wish-page-tabs button{min-height:36px;padding:7px 12px;border:0;border-radius:7px;background:transparent;color:var(--text-muted);font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
.wish-page-tabs button.active{background:var(--accent-soft);color:var(--text-main);font-weight:700}
.wish-page-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.desktop-matrix-management{display:none}
.availability-controls{min-width:0;box-sizing:border-box}
.availability-panel-heading,.availability-preset-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.availability-panel-heading{padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.availability-panel-heading h3,.availability-preset-heading h4{margin:0;font-size:15px}
.availability-panel-heading>span{font-size:12px;color:var(--text-muted);white-space:nowrap}
.availability-controls .availability-person{display:grid;gap:8px;margin:0 0 12px}
.availability-controls .availability-person label{display:grid;gap:7px;font-size:12px;color:var(--text-muted)}
.availability-controls .availability-person select{width:100%;max-width:none;min-width:0;min-height:40px}
.availability-controls .availability-person>.button{justify-self:start}
.availability-controls .availability-instruction{font-size:12px;line-height:1.65;margin:0 0 18px}
.availability-preset-heading{margin-bottom:8px}
.availability-controls .availability-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 16px;max-height:220px;overflow-y:auto}
.availability-controls .availability-presets .button{width:100%;margin:0;min-width:0;white-space:normal;overflow-wrap:anywhere}
.availability-controls .availability-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding-top:14px;border-top:1px solid var(--line)}
.availability-controls .availability-actions .button{margin:0;min-width:0;padding:9px 7px}
.availability-controls .availability-actions [data-availability-apply]{grid-column:1/-1;grid-row:1}
.availability-date{align-items:stretch;justify-content:flex-start}
.availability-date .wish-date-head{display:flex;align-items:flex-start;gap:1px;height:20px;min-height:20px;flex:none;width:100%}
.availability-date .wish-date-head strong{display:block;flex:0 0 2ch;font-size:12px;line-height:16px;text-align:left}
.availability-date .wish-date-meta{flex:1;min-width:0}
@media(min-width:901px){
 .unified-schedule-heading>.schedule-month{order:0;margin:0;width:auto;flex:none}
 .unified-schedule-heading>.schedule-mode-toggle,.unified-schedule-heading>.wish-page-tabs{order:1;margin:0}
 .unified-schedule-heading>:not(.schedule-month):not(.schedule-mode-toggle):not(.wish-page-tabs){order:2}
 [data-page=schedule] .schedule-tools,.shell.matrix-expanded .schedule-tools{grid-template-columns:minmax(145px,1fr) minmax(155px,1.15fr) minmax(140px,1fr) minmax(180px,1.5fr) minmax(90px,.7fr);gap:12px}
 .desktop-matrix-management{display:flex;flex-direction:column;gap:9px;padding-right:12px;border-right:1px solid var(--line);min-width:0}
 .desktop-matrix-management .staffing-settings-button{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:0 4px;width:100%;min-height:38px}
 .desktop-matrix-management .quota-summary{display:grid;grid-template-columns:1fr;gap:6px;margin:0;width:100%}
 .desktop-matrix-management .quota-summary span{font-size:12px;text-align:center;padding:6px;border-radius:7px;background:var(--accent-soft);white-space:nowrap}
 .desktop-matrix-management .quota-summary button{width:100%;margin:0;font-size:12px}
 [data-page=schedule] .schedule-tools>.tool-section{min-width:0;padding-left:0}
 [data-page=schedule] .schedule-tools .tool-heading{flex-wrap:wrap;gap:5px}
 [data-page=schedule] .schedule-tools .tool-button{font-size:12px;max-width:100%}
 .availability-card .availability-date,.availability-card .availability-empty{padding:7px 5px}
}
@media(max-width:900px){
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading{grid-template-columns:auto minmax(0,1fr);column-gap:7px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading>.schedule-month{grid-column:1;grid-row:1;justify-content:flex-start}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading>.schedule-mode-toggle{grid-column:2;grid-row:1;justify-self:start}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs{grid-column:2;grid-row:1;justify-self:end;margin:0;max-width:100%}
 .wish-page-tabs{gap:1px;padding:2px}.wish-page-tabs button{font-size:11px;min-height:36px;padding:6px 5px}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-month{grid-column:1;grid-row:1;justify-self:start;width:auto}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-mode-toggle{grid-column:2;grid-row:1;justify-self:start}
 .availability-panel-heading,.availability-controls .availability-instruction{display:none}
 .availability-controls .availability-person{display:inline-flex;vertical-align:top;margin:0 6px 5px 0;gap:0}
 .availability-controls .availability-person label{font-size:0;gap:0}.availability-controls .availability-person select{height:30px;min-height:30px;max-width:110px;font-size:12px}
 .availability-controls .availability-person>.button{display:none}
 .availability-preset-heading{display:inline-flex;margin:0 5px 5px 0;gap:5px}.availability-preset-heading h4{font-size:11px}
 .availability-controls .availability-presets{display:flex;flex-wrap:nowrap;overflow-x:auto;max-height:none;margin:0 0 5px;gap:5px}
 .availability-controls .availability-presets .button{width:auto;flex:none;white-space:nowrap}
 .availability-controls .availability-actions{display:flex;flex-wrap:wrap;margin:0;padding:0;border:0;gap:5px}
 .availability-controls .availability-actions .button{padding:5px 7px}
 .availability-controls .availability-actions [data-availability-apply]{order:-1}
 html[data-theme] .shell .availability-layout .availability-date{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;text-align:left;vertical-align:top}
}

@media(min-width:901px){
 html[data-theme] .shell .wish-layout .unified-schedule-heading{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:44px 18px;gap:5px 12px;height:67px;min-height:67px}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.schedule-month{grid-column:1;grid-row:1;width:auto;justify-content:flex-start;position:static}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs{grid-column:2;grid-row:1;justify-self:start;max-width:100%;width:auto}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-color-legend{grid-column:1/-1;grid-row:2}
}

@media(min-width:901px){
 .availability-layout>.availability-controls{align-self:start;height:auto;min-height:0;max-height:calc(100dvh - 40px);overflow-y:auto;scrollbar-width:thin}
 .availability-controls .availability-person{justify-content:stretch;grid-template-columns:minmax(0,1fr)}
 .availability-controls .availability-person label{width:100%;min-width:0}
}

@media(max-width:900px){
 html[data-theme] .shell .matrix-card>.unified-schedule-heading{grid-template-columns:auto 84px minmax(0,1fr)}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.mobile-publish-button{grid-column:3;grid-row:1;justify-self:end;margin:0}
}

@media(min-width:901px) and (max-width:1200px){
 [data-page=schedule] .schedule-tools,.shell.matrix-expanded .schedule-tools{grid-template-columns:minmax(145px,.9fr) minmax(0,1.2fr) minmax(0,1fr)}
 .desktop-matrix-management{grid-column:1;grid-row:1/3}
 [data-page=schedule] .schedule-tools>.schedule-leave-section{grid-column:2;grid-row:1}
 [data-page=schedule] .schedule-tools>.schedule-category-section{grid-column:3;grid-row:1}
 [data-page=schedule] .schedule-tools>.schedule-time-section{grid-column:2;grid-row:2}
 [data-page=schedule] .schedule-tools>.schedule-note-section{grid-column:3;grid-row:2}
}

/* One geometry for all monthly calendars, including cells containing times. */
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout)>.calendar-card{display:flex;flex-direction:column;min-width:0;min-height:0;box-sizing:border-box}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:44px 18px;gap:5px 12px;box-sizing:border-box;height:67px;min-height:67px;max-height:67px;flex:none;padding:0;margin-block:0 5px}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout,.matrix-card) .unified-schedule-heading>.schedule-month{position:static;grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:flex-start;gap:8px;width:auto;min-width:0;height:44px;margin:0;flex:none}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout,.matrix-card) .schedule-month>button{box-sizing:border-box;display:grid;place-items:center;min-width:32px;width:32px;height:32px;padding:0;margin:0;font-size:18px;line-height:1}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout,.matrix-card) .schedule-month>strong{font-size:16px;line-height:24px;white-space:nowrap}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading>:is(.wish-page-tabs,.schedule-mode-toggle){grid-column:2;grid-row:1;justify-self:start;margin:0;width:auto}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading>:is(.wish-color-legend,.personal-calendar-guide){grid-column:1/-1;grid-row:2;display:flex;align-items:center;gap:12px;margin:0;padding:0;height:18px;min-height:18px;line-height:18px;overflow:hidden;white-space:nowrap;font-size:10px}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-weekdays{box-sizing:border-box;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:27px;min-height:27px;max-height:27px;flex:none;align-items:center;padding:0;margin:0;font-size:10px;line-height:14px}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-month{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(0,1fr);flex:1;min-height:0;margin:0;border:0;overflow-y:auto}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-week,.personal-calendar-week){height:auto;min-height:0;margin:0;position:relative;border-top:1px solid var(--line)}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-dates{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:100%;min-height:0}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(button.wish-date,button.personal-calendar-date){appearance:none;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;box-sizing:border-box;height:100%;min-height:0;min-width:0;margin:0;padding:7px 5px;gap:3px;border:0;border-right:1px solid var(--line);border-radius:0;text-align:left;line-height:normal;overflow:hidden}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(button.wish-date,button.personal-calendar-date):last-child{border-right:0}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-head{position:static;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:1px;box-sizing:border-box;height:20px;min-height:20px;max-height:20px;flex:0 0 20px;margin:0;padding:0;width:100%}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-head>strong{display:block;flex:0 0 2ch;width:2ch;height:16px;margin:0;padding:0;font-size:12px;line-height:16px;font-weight:700;text-align:left;font-variant-numeric:tabular-nums}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-date-meta{display:flex;flex:1;min-width:0;margin:0;padding:0;gap:1px}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .personal-day-content{position:static;display:flex;flex:1;min-height:0;align-items:center;justify-content:center;width:100%;margin:0}
html[data-theme] .shell :is(.wish-controls,.availability-controls)>.wish-person-field{display:block;margin:0 0 16px;width:100%}
html[data-theme] .shell :is(.wish-controls,.availability-controls)>.wish-person-field>label{display:block;margin:0 0 7px;font-size:12px;line-height:18px;color:var(--text-muted)}
html[data-theme] .shell :is(.wish-controls,.availability-controls) .planning-person-select{appearance:auto;box-sizing:border-box;display:block;width:100%;max-width:none;min-width:0;height:40px;min-height:40px;padding:8px 10px;margin:0;font:inherit;font-size:13px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);color:var(--text-main)}
.availability-overview-button{margin-top:12px;width:100%}
.availability-time-form .availability-range{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;align-items:end;padding:0 0 10px}
.availability-time-form .availability-range>.button{margin-bottom:14px}
.availability-time-form .availability-whole{margin-top:4px}
@media(min-width:901px){
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout){display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:12px;height:calc(100dvh - 40px);align-items:start}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout)>.calendar-card{height:100%;min-height:0;padding:16px}
}
@media(max-width:900px){
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout)>.calendar-card{padding:6px 0}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .unified-schedule-heading{column-gap:7px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout,.matrix-card) .schedule-month{gap:4px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout,.matrix-card) .schedule-month>button{min-width:26px;width:26px;height:32px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout,.matrix-card) .schedule-month>strong{font-size:14px}
 html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(button.wish-date,button.personal-calendar-date){padding:2px 3px}
 html[data-theme] .shell :is(.wish-controls,.availability-controls)>.wish-person-field{display:inline-block;margin:0 5px 5px 0;width:110px;vertical-align:top}
 html[data-theme] .shell :is(.wish-controls,.availability-controls)>.wish-person-field>label{display:none}
 html[data-theme] .shell :is(.wish-controls,.availability-controls) .planning-person-select{height:36px;min-height:36px;padding:5px 7px;font-size:12px}
 .availability-overview-button{display:none}
}

/* Availability uses the same direct-to-day tool interaction as the matrix. */
html[data-theme] .shell .availability-controls .availability-presets{margin:0;max-height:360px;align-content:start}
.availability-presets [data-availability-custom] small{display:block;margin-top:5px;font-size:10px;line-height:1.4}
.availability-presets .button[aria-pressed=true]{box-shadow:0 0 0 1px var(--accent)}
.availability-date .availability-offer{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:stretch;gap:5px;min-height:0;padding:0 2px;margin:0;width:100%;box-sizing:border-box}
.availability-range-label{display:flex;justify-content:center;align-items:center;gap:4px;padding:5px 2px;border:1px solid #167880;border-radius:7px;background:#167880;color:#fff;font-size:11px;line-height:15px;font-variant-numeric:tabular-nums}
.availability-range-label i{font-style:normal;color:#fff}
.availability-all-day{align-self:center;display:inline-block;padding:7px 9px;border:1px solid #167880;border-radius:8px;background:#167880;color:#fff;font-size:12px;line-height:1.4;text-align:center}
.availability-date.saving{box-shadow:inset 0 0 0 2px var(--accent)}
.availability-time-form .shift-form-times{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.availability-clock-dialog .modal{overflow:visible}
@media(min-width:901px){
 html[data-theme] .shell .wish-layout>:is(.wish-controls,.availability-controls){padding:18px;align-self:start}
 html[data-theme] .shell .wish-layout>:is(.wish-controls,.availability-controls)>.wish-person-field{margin:0 0 16px;padding:0}
}
@media(max-width:900px){
 html[data-theme] .shell .availability-controls .availability-presets{display:flex;max-height:none;overflow-x:auto;gap:5px;margin:4px 0 0;padding-bottom:4px}
 .availability-controls .availability-preset-heading{vertical-align:top;height:36px;align-items:center;margin:0}
 .availability-date .availability-offer{gap:3px;padding:0 1px}
 .availability-range-label{display:flex;flex-direction:column;gap:0;padding:2px 1px;font-size:10px;line-height:11px;border-radius:5px}
 .availability-range-label i{display:block;width:12px;height:1px;margin:2px 0;background:var(--text-muted);font-size:0}
 .availability-all-day{padding:4px 3px;font-size:10px;border-radius:5px}
}

@media(max-width:900px){
 html[data-theme] .shell .wish-layout>.wish-controls{align-content:flex-start;align-items:flex-start}
 html[data-theme] .shell .wish-layout>:is(.wish-controls,.availability-controls)>.wish-person-field{align-self:flex-start;vertical-align:top}
}

/* Shared settings headings and fixed two-row availability option. */
html[data-theme] .shell :is(.wish-controls .wish-section-heading,.availability-controls .availability-preset-heading){display:flex;justify-content:space-between;align-items:center;gap:8px;height:36px;min-height:36px;box-sizing:border-box;margin:0 0 8px;padding:0}
html[data-theme] .shell :is(.wish-controls .wish-section-heading,.availability-controls .availability-preset-heading)>:is(h3,h4){margin:0;font-size:15px;line-height:20px}
html[data-theme] .shell .planning-settings-button{display:inline-flex;justify-content:center;align-items:center;flex:none;box-sizing:border-box;width:52px;min-width:52px;height:32px;min-height:32px;margin:0;padding:6px 8px;font-size:12px;line-height:18px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);color:var(--text-main)}
html[data-theme] .shell .availability-controls .availability-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:40px;gap:6px;overflow-y:auto}
html[data-theme] .shell .availability-controls .availability-presets>[data-availability-preset="-1"]{grid-column:1;grid-row:1/span 2;height:auto;white-space:normal;line-height:1.5}
html[data-theme] .shell .availability-controls [data-availability-custom]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;overflow:hidden;line-height:12px}
html[data-theme] .shell .availability-controls [data-availability-custom]>small{display:block;max-width:100%;font-size:10px;line-height:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
html[data-theme] .shell .availability-controls .availability-presets>.button{height:100%;min-height:0;padding:6px;font-size:12px}
@media(min-width:901px){
 html[data-theme] .shell .availability-controls .availability-presets>[data-availability-preset="-1"]{grid-column:1/-1;grid-row:auto;height:40px}
 html[data-theme] .shell .availability-controls>.availability-all-day-tool{width:100%;height:40px;margin:0 0 6px;font-size:12px}
 html[data-theme] .shell .availability-controls .planning-settings-button{width:76px;min-width:76px}
 [data-page=schedule] .schedule-tools,.shell.matrix-expanded .schedule-tools{grid-template-columns:minmax(280px,1.65fr) minmax(120px,1fr) minmax(120px,1fr) minmax(160px,1.35fr) minmax(80px,.65fr)}
 .desktop-matrix-management{display:grid;grid-template-columns:1fr 1fr 1.3fr;grid-template-rows:36px 36px;gap:6px;align-items:stretch;align-content:start;margin-top:34px;padding-right:12px}
 .desktop-matrix-management>.staffing-settings-button{grid-column:1;grid-row:1/span 2;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;height:auto;margin:0;padding:5px;font-size:12px;line-height:1.6}
 .desktop-matrix-management>[data-action="toggle-quota"]{grid-column:2;grid-row:1/span 2;margin:0;padding:5px;font-size:12px;line-height:1.6;white-space:normal}
 .desktop-matrix-management>span{display:flex;justify-content:center;align-items:center;margin:0;padding:4px;border-radius:7px;background:var(--accent-soft);color:var(--text-main);font-size:12px;white-space:nowrap}
 .desktop-matrix-management>.matrix-base-quota{grid-column:3;grid-row:1}
 .desktop-matrix-management>.matrix-holiday-quota{grid-column:3;grid-row:2}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-rows:44px auto;gap:8px 12px;min-height:76px;height:auto;padding:0;margin-bottom:12px}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-month{grid-column:1;grid-row:1}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-mode-toggle{grid-column:2;grid-row:1;margin:0}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.desktop-availability-overlay{grid-column:3;grid-row:1;margin:0}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-heading-actions{grid-column:4;grid-row:1;display:flex;gap:7px;margin:0;justify-self:end;align-items:center}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-heading-actions>.button{box-sizing:border-box;min-width:88px;height:36px;min-height:36px;padding:7px 12px;font-size:12px;line-height:20px;margin:0}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.desktop-matrix-legend{grid-column:1/-1;grid-row:2;margin:0}
 html[data-theme] .shell .matrix-card>.matrix-expand-toggle{position:static;align-self:flex-end;margin:0 0 10px;min-height:30px}
}
@media(min-width:901px) and (max-width:1200px){
 [data-page=schedule] .schedule-tools,.shell.matrix-expanded .schedule-tools{grid-template-columns:minmax(260px,1.6fr) minmax(0,1fr) minmax(0,1fr)}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading{grid-template-columns:auto auto minmax(0,1fr);grid-template-rows:44px auto auto}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.schedule-heading-actions{grid-column:3;grid-row:1}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.desktop-availability-overlay{grid-column:1/-1;grid-row:2}
 html[data-theme] .shell .matrix-card>.unified-schedule-heading>.desktop-matrix-legend{grid-row:3}
}
@media(max-width:900px){
 html[data-theme] .shell .availability-controls .availability-presets{grid-template-columns:repeat(2,minmax(105px,1fr));grid-auto-rows:32px;grid-auto-flow:row;max-height:150px;overflow:auto;margin:4px 0 0;padding-bottom:3px}
 html[data-theme] .shell :is(.wish-controls .wish-section-heading,.availability-controls .availability-preset-heading)>:is(h3,h4){font-size:12px}
 html[data-theme] .shell .planning-settings-button{height:30px;min-height:30px;width:44px;min-width:44px;padding:4px 6px;font-size:11px}
}

@media(min-width:901px){
 html[data-theme] .shell .matrix-card{position:relative}
 html[data-theme] .shell .matrix-card>.matrix-expand-toggle{position:absolute;right:16px;top:66px;margin:0;height:30px;min-height:30px}
 html[data-theme] .shell .matrix-card .desktop-matrix-legend{padding-right:104px}
}
@media(min-width:901px) and (max-width:1200px){html[data-theme] .shell .matrix-card>.matrix-expand-toggle{top:100px}}

/* Mobile wishes retain their original inline controls; availability fits that baseline. */
@media(max-width:900px){
 html[data-theme] .shell .wish-layout>:is(.wish-controls,.availability-controls),
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-annual-summary),
 html[data-theme] .shell .personal-schedule-layout>.schedule-quota-panel{height:80px;min-height:80px;max-height:80px}
 html[data-theme] .shell .wish-layout>:is(.wish-controls,.availability-controls){position:relative;box-sizing:border-box;padding:6px 12px 0;align-content:end;overflow-y:auto}
 html[data-theme] .shell :is(.wish-controls,.availability-controls)>.wish-person-field{width:110px;margin:0;align-self:start}
 html[data-theme] .shell :is(.wish-controls,.availability-controls) .planning-person-select{height:40px;min-height:40px;padding:7px 5px;font-size:15px;font-weight:650}
 html[data-theme] .shell .wish-controls{gap:4px;align-items:start}
 html[data-theme] .shell .wish-controls .wish-leave-tools .tool-button,
 html[data-theme] .shell .wish-controls .mobile-leave-menu{height:40px;min-height:40px}
 html[data-theme] .shell .wish-controls .wish-section-heading{display:flex!important;position:static;order:2;flex:0 0 44px;width:44px;height:40px;min-height:40px;margin:0!important;gap:0}
 html[data-theme] .shell .wish-controls .wish-section-heading>h3{display:none!important}
 html[data-theme] .shell :is(.wish-controls,.availability-controls) .planning-settings-button{position:static;width:44px;min-width:44px;height:40px;min-height:40px;margin:0;padding:4px 6px;font-size:12px}
 html[data-theme] .shell .wish-controls .wish-shift-tools{align-items:start;gap:6px}
 html[data-theme] .shell .availability-controls{display:grid;grid-template-columns:110px minmax(0,1fr) 52px;grid-template-rows:32px 32px;gap:6px;align-items:start;align-content:end}
 html[data-theme] .shell .availability-controls>.wish-person-field{grid-column:1;grid-row:1}
 html[data-theme] .shell .availability-controls .availability-preset-heading{grid-column:3;grid-row:1/span 2;display:flex;position:static;box-sizing:border-box;width:52px;height:70px;min-height:70px;margin:0;padding:0}
 html[data-theme] .shell .availability-controls .availability-preset-heading>h4{display:none}
 html[data-theme] .shell .availability-controls .availability-presets{grid-column:2;grid-row:1/span 2;box-sizing:border-box;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:32px;gap:6px;height:70px;max-height:70px;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;min-width:0}
 html[data-theme] .shell .availability-controls .availability-presets>.button{white-space:normal;padding:3px;font-size:11px;line-height:1.3;min-width:0}
 html[data-theme] .shell .availability-controls>.note{grid-column:1/-1;grid-row:auto;margin:0}
 html[data-theme] .shell .availability-controls.availability-self-only{grid-template-columns:minmax(0,1fr) 52px}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-person{display:none}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-preset-heading{grid-column:2}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-presets{grid-column:1}
 html[data-theme] .shell .availability-controls .availability-presets>[data-availability-custom]{line-height:12px;padding:2px 3px}
 html[data-theme] .shell .availability-controls .planning-person-select{height:32px;min-height:32px;padding:4px 5px}
 html[data-theme] .shell .availability-controls>.availability-all-day-tool{grid-column:1;grid-row:2;box-sizing:border-box;width:110px;height:32px;min-height:32px;margin:0;padding:2px;font-size:11px;line-height:13px}
 html[data-theme] .shell .availability-controls .availability-preset-heading>.planning-settings-button{width:52px;min-width:52px;height:70px;min-height:70px;white-space:normal;padding:4px 10px;font-size:13px;line-height:20px}
 html[data-theme] .shell .availability-controls.availability-self-only .availability-presets{grid-template-columns:repeat(3,minmax(0,1fr))}
 html[data-theme] .shell .availability-controls.availability-self-only .availability-presets>.availability-all-day-tool{grid-column:auto;grid-row:auto;height:32px;min-height:32px;line-height:13px;padding:2px}

}

/* Matrix tools keep one title row and exactly two rows of options. */
.leave-option-settings{display:grid;gap:0}
.leave-option-settings>label{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 2px;border-bottom:1px solid var(--line);font-size:14px}
.leave-option-settings input{width:18px;height:18px;accent-color:var(--accent)}
.availability-date .availability-all-day{align-self:stretch;box-sizing:border-box;width:100%;min-height:57px;display:flex;align-items:center;justify-content:center;text-align:center}
.availability-date .availability-offer{gap:5px}
@media(min-width:901px){
 html[data-theme] .shell :is(.schedule-tools,.matrix-expanded .schedule-tools){display:grid;grid-template-columns:280px minmax(180px,1fr) minmax(200px,1.15fr) minmax(220px,1.8fr) minmax(150px,.8fr);grid-template-rows:minmax(0,1fr);gap:0;box-sizing:border-box;height:132px;min-height:132px;max-height:132px;padding:10px 12px;overflow-x:auto;overflow-y:hidden;align-items:stretch}
 html[data-theme] .shell .schedule-tools>.desktop-matrix-management{grid-column:1;grid-row:1;grid-template-columns:70px 80px minmax(0,1fr);grid-template-rows:32px 32px;gap:6px;min-width:0;margin:34px 0 0;padding:0 12px 0 0;border:0;align-content:start}
 html[data-theme] .shell .schedule-tools>.desktop-matrix-management>.button{font-size:12px;padding:4px}
 html[data-theme] .shell .schedule-tools>.desktop-matrix-management>[data-action="toggle-quota"]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
 html[data-theme] .shell .schedule-tools>.desktop-matrix-management>span{font-size:12px;padding:3px}
 html[data-theme] .shell .schedule-tools>.tool-section{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:28px minmax(0,1fr);grid-column:auto;grid-row:1;gap:6px;box-sizing:border-box;height:110px;min-height:0;margin:0;padding:0 12px;border:0;border-left:1px solid var(--line);overflow:hidden}
 html[data-theme] .shell .schedule-tools>.tool-section>.tool-heading{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-width:0;height:28px;min-height:28px;margin:0;padding:0;flex-wrap:nowrap}
 html[data-theme] .shell .schedule-tools h3{margin:0;font-size:15px;line-height:20px;white-space:nowrap}
 html[data-theme] .shell .schedule-tools .tool-heading>.button{min-height:26px;height:26px;max-width:100%;margin:0;padding:4px 6px;font-size:12px;white-space:nowrap}
 html[data-theme] .shell .schedule-tools .tool-palette{box-sizing:border-box;margin:0;padding:0;min-height:0;height:70px;max-height:70px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;align-content:start;align-items:start;gap:6px}
 html[data-theme] .shell .schedule-tools .tool-button{box-sizing:border-box;height:32px;min-height:32px;max-height:70px;margin:0;padding:5px 8px;font-size:12px;line-height:20px}
 html[data-theme] .shell .schedule-leave-section .tool-palette{grid-template-rows:repeat(2,32px);grid-auto-rows:32px}
 html[data-theme] .shell .schedule-leave-section :is([data-schedule-tool="leave:rest"],[data-schedule-tool="leave:annual"]){grid-row:span 2;height:70px;font-size:19px}
 html[data-theme] .shell .schedule-tools .shift-scope-preview{display:none}
 html[data-theme] .shell .schedule-tools .schedule-time-section .tool-palette{display:flex;flex-wrap:wrap}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .tool-palette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,32px);grid-auto-rows:32px;grid-auto-flow:row}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .tool-palette:has(>.tool-button:nth-child(1):last-child){grid-template-columns:repeat(1,minmax(0,1fr))}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .tool-palette:has(>.tool-button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .tool-palette:has(>.tool-button:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .tool-palette:has(>.tool-button:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .tool-button{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;padding:4px}
 html[data-theme] .shell .schedule-tools :is(.schedule-category-section,.schedule-note-section) .palette-large-tiles>.tool-button{grid-row:span 2;height:70px;font-size:14px}
 .availability-date .availability-all-day{min-height:57px}
}
@media(min-width:901px) and (max-width:1600px){
 html[data-theme] .shell .schedule-tools .schedule-category-section .tool-palette:has(>.tool-button:nth-child(4)){grid-template-columns:repeat(3,minmax(0,1fr))}
 html[data-theme] .shell .schedule-tools .schedule-category-section .tool-palette:has(>.tool-button:nth-child(4))>.tool-button{grid-row:span 1;height:32px;font-size:12px}
}
@media(max-width:900px){.availability-date .availability-all-day{min-height:57px;font-size:10px}}

.availability-date .availability-offer{--availability-range-height:27px;--availability-range-gap:5px;gap:var(--availability-range-gap)}
.availability-date .availability-range-label{box-sizing:border-box;height:var(--availability-range-height);min-height:var(--availability-range-height);flex:none}
.availability-date .availability-all-day{height:calc(2 * var(--availability-range-height) + var(--availability-range-gap));min-height:calc(2 * var(--availability-range-height) + var(--availability-range-gap));flex:none}
@media(max-width:900px){
 .availability-date .availability-offer{--availability-range-gap:3px}
 .availability-date .availability-range-label{padding:1px;line-height:10px}
 .availability-date .availability-range-label i{margin:1px 0}
}

/* Fixed work requests share the established wishes toolbar, not the part-time grid. */
.fixed-time-tool-label{display:inline-flex;align-items:center;justify-content:center;gap:2px;font-variant-numeric:tabular-nums}
.fixed-time-tool-label i{font-style:normal}
.fixed-time-controls .wish-shift-tools .tool-palette{overflow-y:auto}
@media(max-width:900px){
 html[data-theme] .shell .fixed-time-controls .wish-shift-tools .tool-button{font-size:12px}
 .fixed-time-tool-label{display:flex;flex-direction:column;gap:0;line-height:13px}
 .fixed-time-tool-label i{font-size:0;height:1px;width:9px;background:currentColor;margin:1px 0;opacity:.65}
 .fixed-time-controls .wish-totals{padding-top:0}
}

@media(max-width:900px){
 html[data-theme] .shell .wish-controls{scrollbar-width:none}
 .fixed-time-controls .fixed-time-explanation{flex-basis:100%;color:var(--text-muted)}
}

/* Publication withdrawal uses the same date form in both themes. */
.publication-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px}.publication-mode-tabs .button{min-height:42px}.publication-reopen{margin:16px 0;padding:14px;border:1px solid var(--border);border-radius:14px}.publication-reopen[hidden]{display:none}.publication-reopen-toggle{display:flex;align-items:center;gap:8px;margin-bottom:12px}.publication-reopen-date{display:grid;gap:8px}.publication-reopen-date input{width:100%;min-width:0;box-sizing:border-box}.publication-reopen .note{margin-bottom:0}

/* Keep one dialog and fixed result space when switching publication modes. */
.publication-dialog .modal{height:min(650px,calc(100dvh - 32px));display:flex;flex-direction:column;overflow:hidden}
.publication-dialog .modal{width:min(100%,620px)}
.publication-dialog .modal>h2,.publication-dialog .publication-mode-tabs,.publication-dialog .publication-description,.publication-dialog .publication-date-fields,.publication-dialog .publication-shortcuts,.publication-dialog .modal-actions{flex-shrink:0}
.publication-description{min-height:42px;margin:0;line-height:1.5}
.publication-result-area{flex:1;min-height:80px;overflow-y:auto;overscroll-behavior:contain;padding:0 2px}
.publication-mode-tabs .button{transition:none!important;transform:none!important}
.publication-dialog .modal-actions{margin-top:12px}
.publication-dialog [data-action="confirm-publication"]:disabled{cursor:default!important}
.publication-dialog [data-action="confirm-publication"][aria-busy="true"]{cursor:wait!important}
.publication-empty-state{display:grid;gap:8px;padding:16px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--text-main)}
.publication-empty-state span{color:var(--text-muted)}
html[data-theme] .publication-dialog [data-action="confirm-publication"]:disabled:not([aria-busy="true"]){background:var(--surface-soft);border-color:var(--line);color:var(--text-muted)}
.publication-change-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}.publication-change-counts span{display:grid;gap:2px;min-width:0;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--text-muted);text-align:center;font-size:11px;line-height:1.3}.publication-change-counts strong{color:var(--text-main);font-size:18px}.publication-day-list{display:grid;gap:6px;margin:12px 0}.publication-day-change{border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);overflow:hidden}.publication-day-change summary{display:flex;justify-content:space-between;gap:8px;align-items:center;list-style:none;padding:9px 11px!important;color:var(--text-main)}.publication-day-change summary::-webkit-details-marker{display:none}.publication-day-change summary strong{font-size:12px;color:var(--accent-ink)}.publication-person-changes{padding:0 11px 8px}.publication-person-changes p{display:flex;justify-content:space-between;gap:12px;margin:4px 0!important;font-size:12px}.publication-person-changes span{min-width:0;text-align:right;overflow-wrap:anywhere}.publication-day-change>.note{padding:0 11px 8px}.publication-warning-section{border-top:1px solid var(--line);margin-top:12px;padding-top:4px}.schedule-notice-dialog .modal{width:min(100%,520px)}.schedule-notice-list{display:grid;gap:12px;max-height:55dvh;overflow:auto;margin-top:14px}.schedule-notice-day{border:1px solid var(--line);border-radius:12px;padding:11px 13px;background:var(--surface-soft)}.schedule-notice-day h3{margin:0 0 7px;color:var(--text-main);font-size:14px}.schedule-notice-day p{margin:4px 0;color:var(--text-muted)}.schedule-notice-day p.unread{color:var(--text-main);font-weight:650}.schedule-update-current{border-color:var(--accent-ink)!important;color:var(--accent-ink)!important}
@media(max-width:480px){.publication-dialog .modal{height:min(780px,calc(100dvh - 24px))}.publication-change-counts span{padding:7px 3px}.publication-person-changes p{display:grid;gap:1px}.publication-person-changes span{text-align:left}}
@media(max-width:360px){.publication-date-fields{grid-template-columns:minmax(0,1fr);gap:8px}.publication-date-separator{display:none}.publication-date-fields label>span{padding-left:0}.publication-dialog .modal{width:calc(100vw - 12px);padding:17px}.publication-date-fields input{max-width:100%}}



/* Planning calendars share geometry; unavailable dates keep readable content. */
html[data-theme] .shell .wish-layout .wish-date.planning-date-unavailable{background:#eae3d9}
html[data-theme] .shell .wish-layout .availability-empty.empty-date{background:var(--surface-soft)}
html[data-theme="dark"] .shell .wish-layout .wish-date.planning-date-unavailable{background:#191816}
html[data-theme] .shell .wish-layout .wish-date.selected{box-shadow:inset 0 0 0 2px var(--accent)}
.planning-date-legend{display:flex;align-items:center;gap:12px;font-size:11px;color:var(--text-muted)}
.planning-date-legend>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.planning-date-legend i{width:12px;height:12px;border:1px solid var(--line);border-radius:3px;background:var(--surface)}
.planning-date-legend i.unavailable{background:#eae3d9}
html[data-theme="dark"] .planning-date-legend i.unavailable{background:#191816}
.shared-time-offers{display:flex;flex-direction:column;gap:5px;width:100%;min-width:0;overflow:auto;text-align:left}
.shared-time-person{display:flex;flex-direction:column;padding:4px;border-radius:5px;background:#2d6f9e;color:#fff;font-size:11px;line-height:1.4;min-width:0}
.shared-time-person strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shared-time-person>span{font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:900px){
 .wish-layout .wish-heading .planning-date-legend{position:absolute;right:0;bottom:0;gap:8px;font-size:10px}
 .wish-layout .wish-heading{position:relative}
 .wish-layout .wish-heading .wish-color-legend{padding-right:142px}
 .shared-time-person{padding:3px 2px;font-size:10px}
 .shared-time-person>span{display:flex;flex-direction:column;align-items:center;font-size:0}
 .shared-time-person time{font-size:10px}
}

html[data-theme] .shell .wish-layout .wish-heading{position:relative}
html[data-theme] .shell .wish-layout .wish-heading>.planning-date-legend{position:absolute;bottom:0;right:0;height:18px;line-height:18px}

html[data-theme] .shell .wish-layout .wish-date.planning-date-available.selected{background:var(--surface)}
html[data-theme] .shell .wish-layout .wish-date.planning-date-unavailable.selected{background:#eae3d9}
html[data-theme="dark"] .shell .wish-layout .wish-date.planning-date-unavailable.selected{background:#191816}

/* The three request calendars share one month/week control and one focused week. */
.wish-calendar-toggle{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:44px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--text-main);cursor:pointer;white-space:nowrap}
.wish-calendar-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.wish-toggle-text{display:flex;gap:3px;font-size:13px}
.wish-toggle-text>span{box-sizing:border-box;display:grid;place-items:center;width:76px;min-height:36px;padding:7px 12px;border-radius:7px;color:var(--text-muted)}
.wish-toggle-text>.active{background:var(--accent-soft);color:var(--text-main);font-weight:700}
.wish-toggle-icons{display:none}
html[data-theme] .shell .wish-layout .unified-schedule-heading{grid-template-columns:auto auto minmax(0,1fr);column-gap:8px}
html[data-theme] .shell .wish-layout .unified-schedule-heading>.schedule-month{grid-column:1;grid-row:1}
html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-calendar-toggle{grid-column:2;grid-row:1;justify-self:start}
html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs{grid-column:3;grid-row:1;justify-self:start}
html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-color-legend{grid-column:1/-1;grid-row:2}
@media(max-width:900px){
 .wish-calendar-toggle{position:relative;width:36px;min-width:36px;height:36px;padding:0;overflow:hidden}
 .wish-toggle-text{display:none}
 .wish-toggle-icons{position:absolute;inset:2px;display:block;border-radius:7px;overflow:hidden;isolation:isolate}
 .wish-toggle-icons::before{content:"";position:absolute;inset:0;background:var(--accent-soft);z-index:1;clip-path:polygon(0 0,70% 0,60% 100%,0 100%);transition:clip-path .22s ease}
 .wish-calendar-toggle.is-week .wish-toggle-icons::before{clip-path:polygon(40% 0,100% 0,100% 100%,30% 100%)}
 .wish-calendar-toggle.is-week.from-month .wish-toggle-icons::before{clip-path:polygon(0 0,70% 0,60% 100%,0 100%)}
 .wish-calendar-toggle.is-month.from-week .wish-toggle-icons::before{clip-path:polygon(40% 0,100% 0,100% 100%,30% 100%)}
 .wish-toggle-icons>span{position:absolute;z-index:0;display:grid;place-items:center;width:15px;height:16px;color:var(--text-muted);font-size:12px;font-weight:700;line-height:1;opacity:.75;transition:color .22s ease,opacity .22s ease,font-size .22s ease}
 .wish-toggle-month{top:2px;left:1px}.wish-toggle-week{right:1px;bottom:1px}
 .wish-toggle-icons>.active{z-index:2;color:var(--accent-ink);font-size:15px;font-weight:800;opacity:1}
 html[data-theme] .shell .wish-layout .unified-schedule-heading{grid-template-columns:auto 36px minmax(0,1fr);column-gap:5px}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs{justify-self:start}
}
@media(max-width:900px) and (prefers-reduced-motion:reduce){.wish-toggle-icons::before,.wish-toggle-icons>span{transition:none}}
@media(max-width:380px){
 html[data-theme] .shell .wish-layout .unified-schedule-heading{column-gap:3px}
 html[data-theme] .shell .wish-layout .schedule-month{gap:2px}
 html[data-theme] .shell .wish-layout .schedule-month>button{min-width:24px;width:24px}
 html[data-theme] .shell .wish-layout .schedule-month>strong{font-size:13px}
 html[data-theme] .shell .wish-layout .wish-page-tabs button{padding-inline:3px}
}
@media(max-width:340px){
 html[data-theme] .shell .wish-layout .unified-schedule-heading{grid-template-columns:auto 36px;grid-template-rows:40px 36px 18px;height:99px;min-height:99px;max-height:99px}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs{grid-column:1/-1;grid-row:2}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>:is(.wish-color-legend,.planning-date-legend){grid-row:3}
}
@media(max-width:900px){
 html[data-theme] .shell .shared-time-person{padding:2px;gap:0;flex:none}
 html[data-theme] .shell .shared-time-person strong{font-size:10px;line-height:13px}
 html[data-theme] .shell .shared-time-person>span{line-height:11px}
 html[data-theme] .shell .shared-time-person time{font-size:10px;line-height:11px}
 .shared-time-offers{gap:3px}
}

.shared-time-person i{font-style:normal}
@media(max-width:900px){.shared-time-person i{display:none}}

/* The fixed-time picker uses the same two-row mobile geometry as availability. */
.fixed-time-summary-mobile{display:none!important}
@media(max-width:900px){
 html[data-theme] .shell .wish-layout>.fixed-time-controls{display:grid!important;grid-template-columns:110px minmax(0,1fr) 52px;grid-template-rows:32px 32px;gap:6px;align-content:start!important;align-items:start;overflow:hidden}
 html[data-theme] .shell .wish-layout>.fixed-time-controls:not(:has(.planning-settings-button)){grid-template-columns:110px minmax(0,1fr)}
 html[data-theme] .shell .fixed-time-controls .wish-shift-tools{display:contents!important}
 html[data-theme] .shell .fixed-time-controls>.wish-person-field{grid-column:1;grid-row:1;width:110px;margin:0}
 html[data-theme] .shell .fixed-time-controls .wish-section-heading{grid-column:3;grid-row:1/span 2;order:initial;width:52px;height:70px;min-height:70px;margin:0!important;flex:none}
 html[data-theme] .shell .fixed-time-controls .wish-section-heading:not(:has(button)){display:none!important}
 html[data-theme] .shell .fixed-time-controls .wish-section-heading>.planning-settings-button{width:52px;min-width:52px;height:70px;min-height:70px;padding:4px;font-size:12px}
 html[data-theme] .shell .fixed-time-controls .fixed-time-presets{grid-column:2;grid-row:1/span 2;box-sizing:border-box;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;grid-auto-rows:32px!important;gap:6px;height:70px;min-height:70px;min-width:0;margin:0;padding:0 2px 0 0;overflow-x:hidden!important;overflow-y:auto!important;align-content:start;touch-action:pan-y;overscroll-behavior-y:contain;scrollbar-width:thin}
 html[data-theme] .shell .fixed-time-controls .fixed-time-presets>.tool-button{box-sizing:border-box;width:100%;height:32px;min-height:32px;max-height:32px;min-width:0;margin:0;padding:2px;font-size:11px;line-height:12px;white-space:normal}
 html[data-theme] .shell .fixed-time-controls .fixed-time-tool-label{display:inline-flex;flex-direction:row;align-items:center;gap:0;line-height:1;white-space:nowrap;font-size:11px}
 html[data-theme] .shell .fixed-time-controls .fixed-time-tool-label i{display:inline;width:auto;height:auto;margin:0 1px;background:none;font-size:11px;opacity:1}
 html[data-theme] .shell .fixed-time-controls>.wish-totals{grid-column:1;grid-row:2;display:block;width:110px;min-width:0;max-width:110px;margin:0!important;padding:1px 0 0!important;font-size:10px!important;line-height:14px!important}
 html[data-theme] .shell .fixed-time-controls .fixed-time-summary-full{display:none}
 html[data-theme] .shell .fixed-time-controls .fixed-time-summary-mobile{display:block!important}
 html[data-theme] .shell .fixed-time-controls.fixed-time-self-only>.wish-totals{grid-row:1/span 2;align-self:center}
 html[data-theme] .shell .availability-controls:not(:has(>p.note)){overflow:hidden}
 html[data-theme] .shell .availability-controls .availability-presets{scrollbar-width:thin;overscroll-behavior-y:contain;touch-action:pan-y}
 html[data-theme] .shell :is(.availability-controls .availability-presets,.fixed-time-controls .fixed-time-presets).has-overflow{padding-right:4px;scrollbar-color:var(--accent) transparent}
 html[data-theme] .shell :is(.availability-controls .availability-presets,.fixed-time-controls .fixed-time-presets).has-overflow::-webkit-scrollbar{width:3px}
 html[data-theme] .shell :is(.availability-controls .availability-presets,.fixed-time-controls .fixed-time-presets).has-overflow::-webkit-scrollbar-thumb{background:var(--accent);border-radius:3px}
}
@media(max-width:380px){
 html[data-theme] .shell .availability-controls:not(.availability-self-only){grid-template-columns:90px minmax(0,1fr) 48px}
 html[data-theme] .shell .availability-controls.availability-self-only{grid-template-columns:minmax(0,1fr) 48px}
 html[data-theme] .shell .availability-controls>.availability-all-day-tool{width:90px}
 html[data-theme] .shell .availability-controls .availability-preset-heading{width:48px}
 html[data-theme] .shell .availability-controls .availability-preset-heading>.planning-settings-button{width:48px;min-width:48px;padding:3px}
 html[data-theme] .shell .wish-layout>.fixed-time-controls{grid-template-columns:90px minmax(0,1fr) 48px}
 html[data-theme] .shell .wish-layout>.fixed-time-controls:not(:has(.planning-settings-button)){grid-template-columns:90px minmax(0,1fr)}
 html[data-theme] .shell .fixed-time-controls>.wish-person-field,html[data-theme] .shell .fixed-time-controls>.wish-totals{width:90px;max-width:90px}
 html[data-theme] .shell .fixed-time-controls .wish-section-heading,html[data-theme] .shell .fixed-time-controls .wish-section-heading>.planning-settings-button{width:48px;min-width:48px}
 html[data-theme] .shell .fixed-time-controls .fixed-time-presets>.tool-button,html[data-theme] .shell .fixed-time-controls .fixed-time-tool-label{font-size:10px}
 html[data-theme] .shell .fixed-time-controls .fixed-time-tool-label{display:flex;flex-direction:column;white-space:normal;line-height:10px}
 html[data-theme] .shell .fixed-time-controls .fixed-time-tool-label i{display:block;width:9px;height:1px;margin:1px 0;background:currentColor;font-size:0;opacity:.65}
}

.shared-time-offers{scrollbar-width:thin}

/* Keep names and times legible on the offered-time fill, including weekends. */
html[data-theme] .shell .wish-date.weekend .shared-time-person strong,html[data-theme] .shell .wish-date .shared-time-person strong{color:#fff}
html[data-theme] .shell .wish-date .shared-time-person{color:#fff}
.attendance-workspace{min-width:0}
.attendance-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:16px 0}
.attendance-view-switch{display:flex;gap:0;padding:3px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.attendance-view-switch .button{border:0;background:none;box-shadow:none;min-width:72px;padding:8px 16px}
.attendance-view-switch .button.primary{background:var(--accent-soft);color:var(--text-main)}
.attendance-issue-filter{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-muted);cursor:pointer}
.attendance-issue-filter input{width:16px;height:16px;accent-color:var(--accent)}
.attendance-toolbar>[data-attendance-refresh]{margin-left:auto}
.attendance-workspace .daily-clock-date{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.attendance-summary{font-size:12px;color:var(--text-muted);margin-left:6px}
.attendance-unpublished-note{padding:10px 12px;background:var(--surface-soft);border:1px solid var(--line);border-radius:9px;color:var(--text-muted);font-size:12px;line-height:1.6;margin:12px 0}
.attendance-day-person{display:grid;grid-template-columns:minmax(115px,.8fr) minmax(0,4fr);gap:20px;padding:15px 4px;border-top:1px solid var(--line);align-items:center}
.attendance-person{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;overflow-wrap:anywhere}
.attendance-person>strong{font-size:16px;line-height:1.5}
.attendance-plan-kind{font-size:11px;color:var(--text-muted)}
.attendance-status{display:inline-flex;width:fit-content;max-width:100%;padding:4px 7px;border:1px solid transparent;border-radius:6px;font-size:11px;line-height:1.5}
.attendance-neutral{color:var(--text-muted)}
.attendance-status.attendance-neutral{background:var(--surface-soft)}
.attendance-status.attendance-success{color:#236747;background:#e2f1e8;border-color:#b3d7c0}
.attendance-status.attendance-info{color:#2f617b;background:#e5eff5;border-color:#bed3df}
.attendance-status.attendance-danger{color:#993e36;background:#fae9e6;border-color:#e3b7b0}
.attendance-status.attendance-warning{color:#8a5a18;background:#fcf0d8;border-color:#dec69f}
.attendance-detail-link{border:0;background:none;padding:2px 0;color:var(--accent-ink);font-size:12px;text-decoration:underline;text-underline-offset:3px}
.attendance-time-grid{display:grid;grid-template-columns:40px minmax(0,1fr) minmax(0,1fr);gap:8px 12px;align-items:center;min-width:0}
.attendance-time-heading{font-size:11px;text-align:center;color:var(--text-muted)}
.attendance-time-label{font-size:12px;color:var(--text-muted)}
.attendance-plan-time{text-align:center;font-size:14px;color:var(--text-muted);font-variant-numeric:tabular-nums}
.attendance-plan-empty{grid-column:span 2;text-align:center;font-size:12px;color:var(--text-muted)}
.attendance-punches{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0}
.attendance-punch{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid var(--line);border-radius:9px;padding:8px;background:var(--surface-soft);color:var(--text-main);text-align:center;min-height:40px}
.attendance-punch strong{font-size:18px;line-height:1.4;font-variant-numeric:tabular-nums}
.attendance-punch small{font-size:11px;line-height:1.5;white-space:normal}
.attendance-punch.attendance-danger,.attendance-no-punch.attendance-danger{color:#aa443a;border-color:#d7a49d}
.attendance-no-punch{text-align:center;padding:9px 2px;color:var(--text-muted);font-size:13px}
.attendance-add{align-self:center}
.attendance-detail-dialog .modal{max-width:640px;width:min(640px,calc(100vw - 32px))}
.attendance-detail-dialog .attendance-day-person{display:block;border:0;padding:12px 0}
.attendance-detail-dialog .attendance-person{margin-bottom:20px}
.attendance-month-controls{display:flex;align-items:center;gap:8px;margin:12px 0}
.attendance-month-controls input{border:1px solid var(--line);background:var(--control-bg);color:var(--text-main);border-radius:8px;padding:8px 10px;width:170px;font-weight:650}
.attendance-month-guide{display:flex;flex-wrap:wrap;gap:8px 20px;color:var(--text-muted);font-size:11px;margin:12px 0}
.attendance-month-scroll{max-height:calc(100dvh - 280px);min-height:240px;overflow:auto;border:1px solid var(--line);border-radius:10px;isolation:isolate;scrollbar-width:thin}
.attendance-month-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;table-layout:fixed}
.attendance-month-table th,.attendance-month-table td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:0;text-align:center;vertical-align:middle}
.attendance-month-table thead th{position:sticky;top:0;z-index:2;padding:10px 4px;font-size:13px;background:var(--surface-soft);color:var(--text-main);height:54px;min-width:78px}
.attendance-month-table th small{display:block;font-size:10px;font-weight:400;color:var(--text-muted);margin-top:3px}
.attendance-month-table tbody th,.attendance-month-table thead th:first-child{position:sticky;left:0;z-index:1;min-width:110px;max-width:150px;width:110px;padding:10px;background:var(--surface);font-size:13px;overflow-wrap:anywhere;text-align:left}
.attendance-month-table thead th:first-child{z-index:3;background:var(--surface-soft)}
.attendance-month-cell{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;box-sizing:border-box;border:0;border-radius:0;width:100%;min-width:76px;min-height:86px;padding:8px 4px;background:var(--surface);font-variant-numeric:tabular-nums;cursor:pointer;color:var(--text-muted)}
.attendance-month-times{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:650;line-height:1.2}
.attendance-month-leave{font-size:13px}
.attendance-cell-label{font-size:10px;line-height:1.3}
.attendance-month-cell.attendance-success{background:#edf7f0;color:#276547}
.attendance-month-cell.attendance-danger{background:#faeae7;color:#a23f35}
.attendance-month-cell.attendance-warning{background:#fbf0dc;color:#815719}
.attendance-month-cell.attendance-info{color:#366b86}
.attendance-month-cell.attendance-not-published{background:#eae3d9}
.attendance-month-cell.attendance-cell-muted{opacity:.5}
.attendance-month-cell:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.attendance-month-mobile{display:none}
.attendance-load-error{color:var(--calendar-red);font-size:12px}
html[data-theme=dark] .attendance-status.attendance-success{background:#233e32;color:#a0d6b8;border-color:#436756}
html[data-theme=dark] .attendance-status.attendance-info{background:#243b48;color:#b0d2e5;border-color:#466374}
html[data-theme=dark] .attendance-status.attendance-danger{background:#4e2e2a;color:#f2b4a9;border-color:#805449}
html[data-theme=dark] .attendance-status.attendance-warning{background:#493c25;color:#e4c78f;border-color:#796343}
html[data-theme=dark] .attendance-month-cell.attendance-success{background:#253c30;color:#b4d9c0}
html[data-theme=dark] .attendance-month-cell.attendance-danger{background:#4a2d29;color:#edb0a6}
html[data-theme=dark] .attendance-month-cell.attendance-warning{background:#453923;color:#e4c78f}
html[data-theme=dark] .attendance-month-cell.attendance-info{color:#adcbdc}
html[data-theme=dark] .attendance-month-cell.attendance-not-published{background:#191816}
html[data-theme=dark] .attendance-punch.attendance-danger,html[data-theme=dark] .attendance-no-punch.attendance-danger{color:#edb0a6}
@media(max-width:900px){
 .attendance-toolbar{gap:8px;margin:12px 0}
 .attendance-view-switch .button{min-width:58px;padding:8px 12px}
 .attendance-issue-filter{font-size:11px;gap:4px}
 .attendance-toolbar>[data-attendance-refresh]{padding:7px 9px}
 .attendance-workspace .daily-clock-date{gap:5px}
 .attendance-summary{font-size:11px;flex:1;min-width:110px;margin-left:0}
 .attendance-day-person{grid-template-columns:82px minmax(0,1fr);gap:8px;padding:12px 0}
 .attendance-person>strong{font-size:14px}
 .attendance-status{font-size:10px;padding:3px 5px}
 .attendance-time-grid{grid-template-columns:28px minmax(0,1fr) minmax(0,1fr);gap:7px 5px}
 .attendance-time-label{font-size:10px}
 .attendance-plan-time{font-size:12px}
 .attendance-punch{padding:7px 3px;border-radius:7px;min-height:38px}
 .attendance-punch strong{font-size:14px}
 .attendance-punch small{font-size:10px}
 .attendance-add{padding:5px!important;font-size:10px!important}
 .attendance-month-desktop{display:none}
 .attendance-month-mobile{display:block}
 .attendance-month-mobile .field{font-size:12px;margin:16px 0 12px}
 .attendance-month-mobile select{width:100%;min-height:42px}
 .attendance-month-weekdays,.attendance-month-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
 .attendance-month-weekdays{font-size:10px;text-align:center;color:var(--text-muted);padding:8px 0}
 .attendance-month-calendar{border-top:1px solid var(--line);border-left:1px solid var(--line)}
 .attendance-month-calendar>.attendance-month-cell,.attendance-empty-date{border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-width:0;min-height:100px;padding:5px 2px;gap:5px}
 .attendance-month-date{font-size:11px;align-self:flex-start;margin:0 0 auto 3px;color:var(--text-main)}
 .attendance-month-times{font-size:11px;gap:5px}
 .attendance-month-calendar .attendance-cell-label{font-size:9px;min-height:22px}
 .attendance-month-calendar .attendance-month-leave{font-size:11px;margin:auto 0}
 .attendance-month-calendar .attendance-month-dash{margin:auto 0}
 .attendance-month-guide{font-size:10px;gap:6px 12px}
}

.attendance-pending .attendance-time-grid,.attendance-pending .attendance-status,.attendance-pending .attendance-summary,.attendance-pending .attendance-unpublished-note{visibility:hidden}

.attendance-month-table{width:100%}
.attendance-month-table thead th:not(:first-child){min-width:0}
.attendance-month-desktop .attendance-month-cell{min-width:0}

/* Attendance review: shared headings, compact rows, no per-person cards. */
.attendance-workspace .clock-request-tabs{margin:8px 0 10px}
.attendance-toolbar{display:block;margin:10px 0}
.attendance-toolbar-main,.attendance-toolbar-filters{display:flex;align-items:center;gap:10px;min-width:0}
.attendance-toolbar-main>[data-attendance-refresh]{margin-left:auto}
.attendance-toolbar .daily-clock-date,.attendance-toolbar .attendance-month-controls{margin:0;gap:5px;flex-wrap:nowrap}
.attendance-toolbar .daily-clock-date input,.attendance-toolbar .attendance-month-controls input{width:158px;min-height:34px;padding:5px 8px;font-size:14px;box-sizing:border-box}
.attendance-view-switch{border-radius:9px;padding:2px}
.attendance-view-switch .button{min-width:56px;min-height:30px;padding:5px 10px;font-size:13px}
.attendance-toolbar-filters{margin-top:8px}
.attendance-toolbar-filters>input{width:190px;min-width:0;min-height:32px;padding:5px 10px;border:1px solid var(--line);border-radius:8px;background:var(--control-bg);color:var(--text-main);font-size:13px}
.attendance-issue-filter{white-space:nowrap}
.attendance-daily-table{overflow:auto;max-height:calc(100dvh - 235px);border:1px solid var(--line);border-radius:9px;isolation:isolate}
.attendance-compact-head,.attendance-compact-row{display:grid;grid-template-columns:minmax(110px,.85fr) minmax(150px,1fr) minmax(100px,.8fr) minmax(100px,.8fr) minmax(160px,1.4fr);gap:12px;align-items:center;box-sizing:border-box}
.attendance-compact-head{position:sticky;top:0;z-index:1;background:var(--surface-soft);padding:10px 14px;font-size:12px;font-weight:650;color:var(--text-muted);border-bottom:1px solid var(--line)}
.attendance-compact-row{min-height:46px;padding:5px 14px;border-bottom:1px solid var(--line);font-size:14px;line-height:1.4;background:var(--surface)}
.attendance-compact-row:last-child{border-bottom:0}
.attendance-compact-row:hover{background:var(--surface-soft)}
.attendance-compact-name{min-width:0;overflow-wrap:anywhere}
.attendance-compact-name strong{font-size:14px}.attendance-compact-name small{margin-left:6px;color:var(--text-muted);font-size:11px}
.attendance-compact-plan{font-size:13px;color:var(--text-muted);font-variant-numeric:tabular-nums}
.attendance-compact-in,.attendance-compact-out{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-variant-numeric:tabular-nums;min-height:34px}
.attendance-inline-time,.attendance-inline-add{border:0;background:none;box-shadow:none;color:var(--text-main);font:inherit;padding:6px 0;min-height:34px;line-height:1.3;text-align:left;font-weight:650}
button.attendance-inline-time:hover,button.attendance-inline-add:hover{text-decoration:underline;text-underline-offset:4px}
.attendance-inline-add{font-size:13px;font-weight:500;color:var(--text-muted);min-width:40px}
.attendance-compact-issue{font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.attendance-compact-row .attendance-danger{color:#a13e35}.attendance-compact-row .attendance-warning{color:#865a1b}
html[data-theme=dark] .attendance-compact-row .attendance-danger{color:#edb0a6}
html[data-theme=dark] .attendance-compact-row .attendance-warning{color:#e4c78f}
.attendance-mobile-label,.attendance-mobile-plan-label{display:none}
.attendance-workspace .attendance-unpublished-note{border:0;border-radius:0;background:none;padding:0;margin:8px 0;font-size:12px}
.attendance-month-desktop .attendance-month-cell{min-height:62px;padding:4px;gap:3px}
.attendance-month-desktop .attendance-month-times{font-size:13px;gap:3px}
.attendance-month-desktop .attendance-cell-label{font-size:10px}
.attendance-month-table thead th{height:44px;padding:6px 4px}
.attendance-month-table tbody th{padding:6px 10px}
.attendance-month-scroll{max-height:calc(100dvh - 270px)}
.attendance-month-cell.attendance-success{background:var(--surface);color:var(--text-main)}
html[data-theme=dark] .attendance-month-cell.attendance-success{background:var(--surface);color:var(--text-main)}
.attendance-pending .attendance-compact-plan,.attendance-pending .attendance-compact-in,.attendance-pending .attendance-compact-out,.attendance-pending .attendance-compact-issue{visibility:hidden}
@media(max-width:900px){
 .attendance-toolbar-main{gap:6px;flex-wrap:wrap}
 .attendance-toolbar .daily-clock-date input,.attendance-toolbar .attendance-month-controls input{width:132px;font-size:13px;min-height:34px}
 .attendance-toolbar .daily-clock-date .button,.attendance-toolbar .attendance-month-controls .button{padding:5px 7px;min-height:34px}
 .attendance-view-switch .button{min-width:43px;padding:5px 7px;font-size:12px}
 .attendance-toolbar-main>[data-attendance-refresh]{padding:5px 7px;font-size:12px;min-height:34px}
 .attendance-toolbar-filters{gap:10px}.attendance-toolbar-filters>input{flex:1;width:130px}
 .attendance-issue-filter{font-size:11px}
 .attendance-daily-table{max-height:none;overflow:visible;border:0;border-top:1px solid var(--line);border-radius:0}
 .attendance-compact-head{display:none}
 .attendance-compact-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px 12px;min-height:68px;padding:7px 0}
 .attendance-compact-name{grid-column:1;grid-row:1}.attendance-compact-name strong{font-size:14px}
 .attendance-compact-plan{grid-column:2;grid-row:1;text-align:right;font-size:12px;white-space:nowrap}
 .attendance-compact-in{grid-column:1;grid-row:2}.attendance-compact-out{grid-column:2;grid-row:2;justify-content:flex-end}
 .attendance-mobile-label{display:inline;color:var(--text-muted);font-size:11px;font-weight:400}
 .attendance-mobile-plan-label{display:inline}
 .attendance-compact-issue:empty{display:none}
 .attendance-compact-issue{grid-column:1/-1;font-size:11px}
 .attendance-inline-time,.attendance-inline-add{min-height:32px;padding:5px 0}
 .attendance-month-guide{margin:8px 0}
}

/* All four personal planning calendars use the availability calendar's cell surface and spacing. */
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) .wish-month{grid-auto-rows:minmax(0,1fr);min-height:0}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-week,.personal-calendar-week){min-height:0;border-top-color:var(--calendar-line)}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-date,.personal-calendar-date):not(.planning-date-unavailable):not(.unpublished-date):not(.selected){background:var(--calendar-bg);color:var(--calendar-day);border-right-color:var(--calendar-line)}
html[data-theme] .shell :is(.wish-layout,.personal-schedule-layout) :is(.wish-date,.personal-calendar-date,.availability-empty).empty-date{background:var(--calendar-empty);border-right-color:var(--calendar-line)}

/* The leave and fixed-time palettes occupy the same mobile footer as availability. */
@media(max-width:900px){
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])),
 html[data-theme] .shell .wish-layout>.fixed-time-controls{height:80px;min-height:80px;max-height:80px;padding:6px 12px 4px;overflow:hidden}
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])){display:grid;grid-template-columns:110px minmax(0,1fr) 52px;grid-template-rows:40px 28px;gap:2px 6px;align-content:start;align-items:start}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-person-field{grid-column:1;grid-row:1;width:110px;margin:0}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-leave-tools{grid-column:2;grid-row:1;min-width:0}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.mobile-leave-menu{grid-column:3;grid-row:1;width:52px;min-width:0;max-width:52px;margin:0;padding:2px;font-size:10px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-totals{grid-column:1/-1;grid-row:2;display:flex;flex-direction:column;justify-content:flex-start;gap:0;min-height:28px;margin:0!important;font-size:10px!important;line-height:14px!important;white-space:nowrap}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):not(:has(>.wish-person-field))>.wish-leave-tools{grid-column:1/3}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):not(:has(>.mobile-leave-menu-wrap))>.wish-leave-tools{grid-column:2/-1}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):not(:has(>.mobile-leave-menu-wrap)):not(:has(>.wish-person-field))>.wish-leave-tools{grid-column:1/-1}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])) .wish-leave-tools>.tool-palette{height:40px;margin:0;display:flex;gap:6px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])) .wish-leave-tools .tool-button{flex:1;min-width:0;padding:4px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])) .planning-person-select,
 html[data-theme] .shell .fixed-time-controls .planning-person-select{height:32px;min-height:32px;padding:4px 5px}
 html[data-theme] .shell .fixed-time-controls{align-content:start!important}
}
@media(max-width:380px){
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])){grid-template-columns:90px minmax(0,1fr) 48px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-person-field{width:90px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.mobile-leave-menu{width:48px;max-width:48px;font-size:9px}
}

/* Self service keeps the same left column without showing a person picker. */
.wish-self-name{display:none}
@media(max-width:900px){
 html[data-theme] .shell .wish-layout .wish-self-name{display:block;grid-column:1;grid-row:2;align-self:center;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-main);font-size:11px;font-weight:700;line-height:16px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-totals{grid-column:2/-1;grid-row:2}
 html[data-theme] .shell .fixed-time-controls.fixed-time-self-only>.wish-totals{grid-column:1;grid-row:1;align-self:start;width:110px;max-width:110px;padding-top:0!important}
 html[data-theme] .shell .availability-controls.availability-self-only{grid-template-columns:110px minmax(0,1fr) 52px}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-all-day-tool{grid-column:1;grid-row:1;width:110px;height:32px;min-height:32px}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-presets{grid-column:2;grid-row:1/span 2;grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-preset-heading{grid-column:3;grid-row:1/span 2}
 html[data-theme] .shell .wish-layout .unified-schedule-heading{flex:none;align-self:stretch}
 html[data-theme] .shell .wish-layout .wish-heading>.wish-color-legend:empty{visibility:hidden}
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name){grid-template-rows:32px 32px;gap:6px;align-content:start}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-leave-tools,
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-leave-tools>.tool-palette{display:contents}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name) .wish-leave-tools .tool-button{box-sizing:border-box;grid-row:1;width:100%;height:32px;min-height:32px;max-height:32px;margin:0}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name) .wish-leave-tools .tool-button:first-child{grid-column:1}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name) .wish-leave-tools .tool-button:nth-child(2){grid-column:2}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.mobile-leave-menu{grid-column:3;grid-row:1/span 2;height:70px;min-height:70px;max-height:70px;white-space:normal}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-totals{grid-column:2;grid-row:2}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name):not(:has(>.mobile-leave-menu-wrap))>.wish-totals{grid-column:2/-1}
}
@media(max-width:380px){
 html[data-theme] .shell .fixed-time-controls.fixed-time-self-only>.wish-totals{width:90px;max-width:90px}
 html[data-theme] .shell .availability-controls.availability-self-only{grid-template-columns:90px minmax(0,1fr) 48px}
 html[data-theme] .shell .availability-controls.availability-self-only>.availability-all-day-tool{width:90px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-totals{font-size:9px!important}
}

/* Keep the calendar and footer in place for employees who are not in scheduling. */
.wish-inactive-controls .wish-inactive-status{margin:0;line-height:1.5}
.wish-inactive-controls .wish-self-name{display:block;margin-top:12px;font-weight:700}
.wish-layout .wish-month .wish-date:disabled{opacity:1;cursor:default}
@media(max-width:900px){
 html[data-theme] .shell .wish-layout>.wish-inactive-controls{box-sizing:border-box;display:grid;grid-template-columns:110px minmax(0,1fr);grid-template-rows:32px 32px;gap:6px;height:80px;min-height:80px;max-height:80px;padding:6px 12px 4px;align-content:start;overflow:hidden}
 html[data-theme] .shell .wish-inactive-controls>.wish-inactive-status{grid-column:1/-1;grid-row:1;align-self:center;margin:0!important;font-size:11px;line-height:15px}
 html[data-theme] .shell .wish-inactive-controls>.wish-self-name{grid-column:1;grid-row:2;align-self:center;margin:0;font-size:11px;line-height:16px}
}

/* Employee leave and fixed-time footers use the manager's person/summary positions. */
@media(max-width:900px){
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-leave-tools{grid-row:1/span 2;align-self:stretch}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])) .wish-leave-tools>.tool-palette{height:70px;min-height:70px;margin:0}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden])) .wish-leave-tools .tool-button{height:70px;min-height:70px;max-height:70px}
 html[data-theme] .shell .wish-controls:has(.wish-leave-tools:not([hidden]))>.mobile-leave-menu{grid-row:1/span 2;height:70px;min-height:70px;max-height:70px}
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name){grid-template-columns:110px minmax(0,1fr) minmax(0,1fr) 52px;grid-template-rows:32px 32px;gap:6px;align-content:start}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-self-name{grid-column:1;grid-row:1;align-self:center;margin:0;font-size:15px;line-height:20px}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name) .wish-leave-tools .tool-button{grid-row:1/span 2;height:70px;min-height:70px;max-height:70px}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name) .wish-leave-tools .tool-button:first-child{grid-column:2}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name) .wish-leave-tools .tool-button:nth-child(2){grid-column:3}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.mobile-leave-menu-wrap{grid-column:4;grid-row:1/span 2;width:52px;max-width:52px}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-totals{grid-column:1/4;grid-row:2;align-self:start;font-size:10px!important;line-height:14px!important}
 html[data-theme] .shell .fixed-time-controls.fixed-time-self-only>.wish-self-name{grid-column:1;grid-row:1;align-self:center;margin:0;font-size:15px;line-height:20px}
 html[data-theme] .shell .fixed-time-controls.fixed-time-self-only>.wish-totals{grid-column:1;grid-row:2/span 1;align-self:start;width:110px;max-width:110px;padding-top:0!important}
 html[data-theme] .shell .wish-inactive-controls>.wish-self-name{grid-column:1;grid-row:1;font-size:15px;line-height:20px}
 html[data-theme] .shell .wish-inactive-controls>.wish-inactive-status{grid-column:1/-1;grid-row:2;align-self:start}
}
@media(max-width:380px){
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name){grid-template-columns:90px minmax(0,1fr) minmax(0,1fr) 48px}
 html[data-theme] .shell .wish-layout .wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.mobile-leave-menu-wrap{width:48px;max-width:48px}
 html[data-theme] .shell .fixed-time-controls.fixed-time-self-only>.wish-totals{width:90px;max-width:90px}
}

/* Fixed tab widths stop the right tab growing when its selected label becomes bold. */
@media(max-width:900px){
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs{box-sizing:border-box;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:108px;max-width:100%;min-width:0;justify-self:start}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs:has(>button:only-child){grid-template-columns:minmax(0,1fr);width:56px}
 html[data-theme] .shell .wish-layout .unified-schedule-heading>.wish-page-tabs:has(>button:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr));width:146px}
 html[data-theme] .shell .wish-layout .wish-page-tabs button{box-sizing:border-box;width:100%;min-width:0;padding-inline:2px;font-size:10px;text-align:center}
 html[data-theme] .shell .wish-layout>.wish-controls,
 html[data-theme] .shell .wish-layout>.availability-controls{box-sizing:border-box;align-self:stretch;width:100%;height:80px;min-height:80px;max-height:80px;margin:0;padding:6px 12px 4px;align-content:start;overflow:hidden}
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])){grid-template-rows:32px 32px;gap:6px}
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-totals,
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-totals{grid-column:1;grid-row:2;max-width:110px;white-space:nowrap;font-size:10px!important;line-height:14px!important}
 html[data-theme] .shell .wish-layout>.availability-controls{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
 html[data-theme] .shell .fixed-time-controls>.wish-totals{line-height:14px!important}
 html[data-theme] .shell .fixed-time-controls .fixed-time-summary-mobile{display:block!important;white-space:nowrap;font-size:10px;letter-spacing:-.02em}
}
@media(max-width:380px){
 html[data-theme] .shell .fixed-time-controls .fixed-time-summary-mobile{font-size:9px;letter-spacing:-.04em}
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden]))>.wish-totals,
 html[data-theme] .shell .wish-layout>.wish-controls:has(.wish-leave-tools:not([hidden])):has(>.wish-self-name)>.wish-totals{max-width:90px;font-size:9px!important}
}

/* Keep the native leave selector accessible while displaying its label on two lines. */
.mobile-leave-menu-wrap{display:none}
@media(max-width:900px){
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap{position:relative;box-sizing:border-box;display:grid;place-items:center;grid-column:3;grid-row:1/span 2;align-self:stretch;width:52px;min-width:0;height:70px;min-height:70px;max-height:70px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);color:var(--text-main);font-size:12px;font-weight:700;line-height:16px;text-align:center}
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap.active{background:var(--accent);color:var(--accent-text);border-color:var(--accent-ink)}
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap::before{content:'';position:absolute;right:7px;bottom:23px;left:7px;border-top:1px solid currentColor;opacity:.3;pointer-events:none}
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap::after{content:'';position:absolute;left:50%;bottom:9px;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateX(-50%) rotate(45deg);pointer-events:none}
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap:focus-within{outline:2px solid var(--accent-ink);outline-offset:2px}
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap>.mobile-leave-menu{position:absolute;inset:0;display:block;width:100%;max-width:none;height:100%;min-height:0;max-height:none;margin:0;padding:0;opacity:0;cursor:pointer;z-index:1}
 html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap>.mobile-leave-menu-label{position:relative;top:-7px;pointer-events:none}
}
@media(max-width:380px){html[data-theme] .shell .wish-layout .wish-controls>.mobile-leave-menu-wrap{width:48px;font-size:11px}}

/* One review layout for deadline, quota and combined supervisor overrides. */
.wish-review-dialog .modal{width:min(390px,calc(100vw - 28px));padding:20px}
.wish-review-dialog .modal h2{margin-bottom:12px;font-size:19px}
.wish-review-context{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;padding-bottom:11px;border-bottom:1px solid var(--line)}
.wish-review-context strong{font-size:15px;line-height:1.4;color:var(--text-main)}
.wish-review-context span{font-size:13px;color:var(--text-muted)}
.wish-review-list{display:grid;gap:0;margin-top:6px}
.wish-review-item{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.4}
.wish-review-item span{color:var(--text-muted)}
.wish-review-item strong{color:var(--text-main);font-weight:700;text-align:right}
.wish-review-block{padding:12px 0;border-bottom:1px solid var(--line);color:var(--text-main);font-size:14px;line-height:1.5}
.wish-review-dialog .wish-review-error{margin:10px 0 0;color:#b53632;font-weight:700}
.wish-review-dialog .wish-review-error:empty{display:none}
html[data-theme=dark] .wish-review-dialog .wish-review-error{color:#ff9c91}
.wish-review-dialog .modal-actions{flex-wrap:wrap}

/* The schedule stays primary; availability is a small status marker or a pending outline. */
.schedule-matrix .matrix-cell button{position:relative}
.schedule-matrix .matrix-offer-dot{position:absolute;top:5px;left:5px;z-index:1;width:8px;height:8px;border-radius:50%;border:1px solid var(--surface);box-shadow:0 0 0 1px #328568;pointer-events:none}
.schedule-matrix .matrix-offer-dot.exact,.matrix-offer-legend-dot.exact{background:#2ca36e}
.schedule-matrix .matrix-offer-dot.within,.matrix-offer-legend-dot.within{background:#e4b449}
.schedule-matrix .matrix-offer-dot.within{box-shadow:0 0 0 1px #b78119}
.matrix-legend .matrix-offer-legend-dot{display:inline-block;flex-shrink:0;width:9px;height:9px;border-radius:50%}
.schedule-matrix .matrix-pending-offer{display:flex;flex-direction:column;gap:1px;white-space:normal;line-height:1.15}
.schedule-matrix .matrix-pending-offer>span{font-size:10px;line-height:1.1}
.schedule-matrix .matrix-pending-ranges{display:none}
.schedule-matrix .matrix-cell-main>strong[hidden],.schedule-matrix .matrix-offer-preview[hidden]{display:none!important}
.schedule-matrix .matrix-offer-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:44px;color:var(--accent-ink)}
.schedule-matrix .matrix-offer-preview>small{display:block;font-size:9px;line-height:1.1;color:var(--accent-ink)}
.schedule-matrix .matrix-offer-preview>strong{display:flex;flex-direction:column;font-size:11px;line-height:1.15}
.schedule-matrix .matrix-offer-preview>strong>i{display:block;width:1px;height:3px;margin:auto;background:currentColor;opacity:.65}
.schedule-matrix .matrix-cell button.matrix-offer-open{background:var(--accent-soft)}
.matrix-offer-popover{position:fixed;z-index:9;min-width:156px;max-width:min(218px,calc(100vw - 16px));padding:11px 13px;border:1px solid var(--line);border-radius:11px;background:var(--surface);box-shadow:0 12px 30px #0005;color:var(--text-main);font-size:13px}
.matrix-offer-popover>strong{display:block;margin-bottom:6px;font-size:12px;color:var(--text-muted)}
.matrix-offer-popover-times{display:grid;gap:5px;font-weight:700;font-variant-numeric:tabular-nums}
@media(max-width:767px){.schedule-matrix .matrix-offer-dot{top:3px;left:3px;width:6px;height:6px}.schedule-matrix .matrix-pending-offer>span{font-size:9px}.schedule-matrix .matrix-offer-preview{min-height:31px}.schedule-matrix .matrix-offer-preview>small{font-size:8px}.schedule-matrix .matrix-offer-preview>strong{font-size:9px}}

/* Light palette: give surfaces, controls and status colors distinct readable levels. */
html[data-theme=light]{color-scheme:light;--page-bg:#f6f2eb;--surface:#fffdfa;--surface-soft:#efe8df;--control-bg:#f3ede5;--text-main:#2d2926;--text-muted:#625b55;--line:#d8ccbf;--accent:#9d4c2d;--accent-text:#fff;--accent-soft:#f2dfd2;--accent-ink:#813a20}
html[data-theme=light] .side{background:#292725;color:#f4eee7}
html[data-theme=light] .side-foot,html[data-theme=light] .nav button{color:#d3c9bf}
html[data-theme=light] .nav button.active,html[data-theme=light] .nav button:hover{background:#f0d9c9;color:#5d2c1a}
html[data-theme=light] .side-toggle{background:#292725;border-color:#605b54;color:#ded0c3}
html[data-theme=light] .side-toggle:hover,html[data-theme=light] .side-toggle:focus-visible{background:#80472f;color:#fff}
html[data-theme=light] .card,html[data-theme=light] .modal,html[data-theme=light] .login-card{box-shadow:0 5px 20px #59402a0c}
html[data-theme=light] :is(.button:not(.primary):not(.warn):not(.danger):not(.danger-outline),.tool-button:not(.active),.person button,.schedule-month button):hover{background:#e8ded3;border-color:#bfae9d}
html[data-theme=light] :is(input,select,textarea,.shift-time-control){border-color:#cfc2b5}
html[data-theme=light] :is(.segmented,.status-switch,.quota-editor,.custom-shift-fields,.wish-limit-group){background:var(--surface-soft);border-color:var(--line)}
html[data-theme=light] :is(.segmented button,.status-switch span){color:var(--text-muted)}
html[data-theme=light] .clock-workspace .clock-request-sections .button:not(.primary):hover{background:#e8ded3;color:var(--text-main)}
html[data-theme=light] :is(.permission-choice,.branch-entry,.settings-section,.person){border-color:var(--line)}
html[data-theme=light] .permission-choice{background:var(--surface-soft)}
html[data-theme=light] :is(.pill:not(.draft):not(.attendance-alert),.stat,.clock-request-status:not(.pending):not(.approved):not(.rejected)){background:var(--surface-soft);color:#4e4841}
html[data-theme=light] .pill.draft{background:#f4e5cc;color:#77501b}
html[data-theme=light] .quota-summary span{background:#f1dfd2;color:#79371f}
html[data-theme=light] .login{background:radial-gradient(ellipse at 80% 0%,#eddbce,transparent 56%),var(--page-bg)}

/* Planning calendars: distinguish blank, editable and unavailable days without dimming text. */
html[data-theme=light] .shell{--calendar-bg:var(--surface);--calendar-empty:#ebe4db;--calendar-line:#d9cec2;--calendar-day:var(--text-main);--calendar-weekend:#a34e47;--calendar-today:var(--accent)}
html[data-theme=light] .shell .wish-layout .wish-date.planning-date-unavailable,
html[data-theme=light] .shell .wish-layout .wish-date.planning-date-unavailable.selected,
html[data-theme=light] .shell .personal-schedule-layout .personal-calendar-date.unpublished-date{background:#eae1d6}
html[data-theme=light] .wish-date.weekend strong,html[data-theme=light] .availability-date.weekend>strong{color:#a34e47}
html[data-theme=light] .wish-weekdays,html[data-theme=light] .week{color:var(--text-muted);border-color:var(--line)}
html[data-theme=light] .schedule-source-colors,html[data-theme=light] .matrix-legend{--wish-label-bg:#f0e5ec;--wish-label-text:#654456;--wish-label-border:#a98299;--employee-leave-bg:rgba(163,103,26,.23);--employee-leave-text:#704313;--employee-leave-border:rgba(148,91,20,.65);--leave-label-bg:rgba(44,103,127,.2);--leave-label-text:#24516a;--leave-label-border:rgba(44,103,127,.58)}
html[data-theme=light] .availability-date .availability-offer{color:#225c63}
html[data-theme=light] :is(.availability-range-label,.availability-all-day){background:#176e76;border-color:#176e76;color:#fff}
html[data-theme=light] .shared-time-person{background:#28678f;color:#fff}

/* Matrix and attendance surfaces remain legible when many cells are shown together. */
html[data-theme=light] .matrix-wrap{background:var(--surface);border-color:var(--line)}
html[data-theme=light] .schedule-matrix th,html[data-theme=light] .schedule-matrix td{border-color:#d9cec2}
html[data-theme=light] .schedule-matrix thead th,html[data-theme=light] .schedule-matrix .matrix-name{background:#f2ebe2;color:var(--text-main)}
html[data-theme=light] .schedule-matrix thead .matrix-name{background:#e9dfd3}
html[data-theme=light] .schedule-matrix .matrix-day.shop-closed{background:#665548;border-bottom-color:#665548;box-shadow:inset 3px 0 #493d34,inset -3px 0 #493d34}
html[data-theme=light] .schedule-matrix .matrix-cell.shop-closed:not(.shop-work){background:#e8e2d9;border-bottom-color:#e8e2d9}
html[data-theme=light] .attendance-month-cell.attendance-success{background:var(--surface);color:var(--text-main)}
html[data-theme=light] .attendance-month-cell.attendance-danger{background:#f9e9e5;color:#923c34}
html[data-theme=light] .attendance-month-cell.attendance-warning{background:#f7ecd6;color:#75501b}
html[data-theme=light] .attendance-month-cell.attendance-info{color:#285a72}
html[data-theme=light] .attendance-month-cell.attendance-not-published{background:#eae1d6}
html[data-theme=light] .attendance-compact-head{background:var(--surface-soft);color:#544d45}
html[data-theme=light] .attendance-issue{background:#fdf8f0;border-color:#e1c9a9;border-left-color:#ab6d32}
html[data-theme=light] .attendance-issue button{background:#f7e9d3;border-color:#d9b98f;color:#65421e}

/* Dialogs, notices and destructive actions keep separate semantic colors. */
html[data-theme=light] .matrix-day em.matrix-date-note{background:#f4e4d7;color:#713d25;border-color:#bd9271}
html[data-theme=light] .button.danger-outline{background:#f9e9e6;color:#94352e;border-color:#c9877e}
html[data-theme=light] .reminder-status.resolved{background:#e3efe7;color:#285e41}
html[data-theme=light] .reminder-status.pending{background:#f5e8cb;color:#78501b}
html[data-theme=light] .clock-request-status.approved{background:#e6f1e9;border-color:#91b39c;color:#285f40}
html[data-theme=light] .clock-request-status.rejected{background:#f8eae6;border-color:#cc938c;color:#943c33}
@media(max-width:900px){html[data-theme=light] .shell .mobile-home{background:#fffdfaf5;border-color:var(--line);box-shadow:0 -6px 24px #59402a17}html[data-theme=light] .shell .mobile-home button{color:#625b55}html[data-theme=light] .shell .mobile-home button.active{background:#f1dfd2;color:#813a20}}

/* Employees only need the two monthly quota figures below the matrix. */
@media(max-width:900px){
 html[data-theme] .shell.employee-interface[data-page=schedule] .matrix-card{height:calc(100dvh - var(--mobile-nav-height) - 76px)}
 html[data-theme] .shell.employee-interface[data-page=schedule]>.main>.employee-matrix-quota-panel{display:inline-flex;width:max-content;max-width:calc(100% - 16px);height:50px;min-height:50px;max-height:50px;padding:6px 8px;margin:6px 0 0;align-items:center;align-self:flex-start}
 html[data-theme] .shell.employee-interface .employee-matrix-quota-panel .quota-summary{display:flex;width:auto;gap:6px;align-items:center;flex-wrap:nowrap}
 html[data-theme] .shell.employee-interface .employee-matrix-quota-panel .quota-summary>span{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:30px;padding:4px 7px;white-space:nowrap;font-size:12px}
}

/* Make existing punches look editable, and unavailable requests look final. */
.attendance-inline-time .attendance-edit-indicator{display:inline-block;margin-left:5px;font-size:12px;color:var(--accent-ink)}
.attendance-punch .attendance-edit-label{display:block;margin-top:2px;color:var(--accent-ink);font-weight:700}
.clock-request-item.is-unavailable{color:var(--text-muted)}
.clock-request-unavailable-label{display:grid;gap:3px;font-size:14px}
.clock-request-unavailable-label small{width:auto!important;margin:0}
.clock-request-unavailable-status{justify-self:end;border:1px solid var(--line);border-radius:999px;padding:5px 10px;background:var(--surface-soft);color:var(--text-muted);font-size:12px;white-space:nowrap}

/* Mobile matrix: five dates and six people visible, with legible cell text. */
@media(max-width:767px){
 .schedule-matrix .matrix-name{width:72px;min-width:72px;max-width:72px}
 .schedule-matrix tbody .matrix-name{font-size:14px;line-height:1.2}
 .schedule-matrix tbody .matrix-name small{font-size:11px;line-height:1.2;letter-spacing:-.2px;margin-top:3px}
 .schedule-matrix .matrix-day strong{font-size:14px}
 .schedule-matrix .matrix-day span,.schedule-matrix .matrix-day small,.schedule-matrix .matrix-day b{font-size:10px!important;line-height:1.2}
 .schedule-matrix .matrix-day .holiday-badge{font-size:10px!important;line-height:1.1;padding:1px 2px}
 .schedule-matrix .matrix-cell strong{font-size:13px}
 .schedule-matrix .matrix-work-time>span{font-size:12px;line-height:1.15}
 .schedule-matrix .matrix-work-time.wish-fulfilled{width:40px;max-width:100%;height:44px;padding:2px 1px}
 .schedule-matrix .matrix-work-time.wish-fulfilled>span{letter-spacing:-.2px}
 .schedule-matrix.schedule-source-colors .schedule-leave-label,.schedule-matrix.schedule-source-colors .schedule-wish-label{width:38px;max-width:100%;min-width:0;height:40px;font-size:15px!important}
 .schedule-matrix.schedule-source-colors .matrix-pending-offer{width:40px;height:44px;padding:1px!important;font-size:11px!important;line-height:1.15}
 .schedule-matrix.schedule-source-colors .matrix-pending-two-ranges{width:clamp(42px,calc(100% - 6px),56px);height:min(58px,calc(var(--matrix-row-height,62px) - 4px))}
 .schedule-matrix .matrix-cell-notes>span{font-size:11px;line-height:1.15}
 .schedule-matrix .matrix-pending-offer>span{font-size:12px;line-height:1.15;white-space:nowrap;overflow-wrap:normal;letter-spacing:-.2px}
 .schedule-matrix .matrix-pending-all-day{display:flex;flex-direction:column;align-items:center}
 .schedule-matrix .matrix-pending-all-day>span{font-size:12px;line-height:1.1;white-space:nowrap;overflow-wrap:normal}
 .schedule-matrix .matrix-pending-count{display:none}
 .schedule-matrix .matrix-pending-offer .matrix-pending-ranges{display:grid;align-content:center;grid-template-rows:max-content max-content;gap:2px;width:100%;height:100%}
 .schedule-matrix .matrix-pending-range{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;line-height:1}
 .schedule-matrix .matrix-pending-range+.matrix-pending-range{border-top:1px solid currentColor;padding-top:1px}
 .schedule-matrix .matrix-pending-range>span{font-size:11px;line-height:.95;letter-spacing:-.2px;white-space:nowrap;overflow-wrap:normal}
 .schedule-matrix .matrix-offer-preview>small{font-size:9px;line-height:1;letter-spacing:-.3px;white-space:nowrap}
 .schedule-matrix .matrix-offer-preview>strong>span{font-size:12px}
 .unified-schedule-heading>.mobile-matrix-legend{font-size:11px}
}
@media(min-width:361px) and (max-width:767px){
 .schedule-matrix .matrix-work-time>span,.schedule-matrix .matrix-offer-preview>strong>span{font-size:13px}
 .schedule-matrix .matrix-pending-offer>span{font-size:13px}
 .schedule-matrix .matrix-pending-range>span{font-size:12px}
}

/* Auto scheduling stays separate from the compact four-part matrix palette. */
.mobile-schedule-actions{display:none}
.auto-schedule-unavailable{opacity:.68}
@media(max-width:900px){
 html[data-theme] .shell .matrix-card>.unified-schedule-heading:has(.mobile-auto-schedule-button){grid-template-rows:64px 18px;height:87px;min-height:87px}
 [data-page=schedule] .unified-schedule-heading>.mobile-schedule-actions{display:flex;grid-column:3;grid-row:1;flex-direction:column;gap:3px;min-width:0;align-self:center}
 .mobile-schedule-actions .button{display:flex;align-items:center;justify-content:center;min-height:30px;height:30px;padding:3px 5px!important;font-size:13px!important;white-space:nowrap}
}
.auto-schedule-preview-dialog .modal{width:min(960px,calc(100vw - 28px));max-width:none;height:min(900px,calc(100dvh - 28px));max-height:calc(100dvh - 28px);display:flex;flex-direction:column;overflow:hidden;padding:22px}
.auto-schedule-preview-dialog .modal>h2,.auto-schedule-preview-dialog .auto-review-head,.auto-schedule-preview-dialog .auto-review-kpis,.auto-schedule-preview-dialog .auto-review-search-note,.auto-schedule-preview-dialog .auto-review-tabs,.auto-schedule-preview-dialog .modal-actions{flex:none}
.auto-schedule-preview-dialog .modal>h2{margin-bottom:8px}.auto-schedule-preview-dialog .modal-actions{border-top:1px solid var(--line);padding-top:12px;margin-top:8px;background:var(--surface)}
.auto-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.auto-review-head p{margin:0;font-size:14px;line-height:1.45}
.auto-review-status{flex:none;border-radius:30px;padding:6px 10px;background:var(--accent-soft);color:var(--accent-ink);font-size:12px;font-weight:700}.auto-review-status.attention,.auto-review-status.stale{background:var(--surface-soft);border:1px solid var(--warning-border,#b27342);color:var(--text-main)}
.auto-review-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 8px}.auto-review-kpis span{display:flex;justify-content:space-between;gap:5px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);font-size:13px}.auto-review-kpis strong{font-size:15px;white-space:nowrap}
.auto-review-comparison{padding:9px 11px;margin:10px 0 0;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);font-size:13px;line-height:1.45}.auto-review-search-note{margin:2px 0 8px}
.auto-review-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;border-bottom:1px solid var(--line);margin-top:8px}.auto-review-tabs button{min-height:42px;padding:7px 5px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--text-muted);font-size:14px;font-weight:700}.auto-review-tabs button.active{border-bottom-color:var(--accent-ink);color:var(--text-main)}
.auto-review-page{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 2px}.auto-review-day-nav{display:flex;align-items:center;justify-content:center;gap:9px;margin-bottom:12px}.auto-review-day-nav .button{height:42px;width:42px;min-width:42px;padding:0;font-size:24px}.auto-review-day-nav label{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:700}.auto-review-day-nav select{min-height:42px;border-radius:9px;padding:7px 9px;border:1px solid var(--line);background:var(--surface);color:var(--text-main);font-variant-numeric:tabular-nums}
.auto-review-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(270px,.8fr);align-items:start;gap:14px}.auto-review-roster{display:grid;gap:6px;align-content:start}.auto-review-person{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:44px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text-main);text-align:left;font-size:14px}.auto-review-person.selected{border-color:var(--accent-ink);background:var(--accent-soft)}.auto-review-person>span:first-child{display:grid;min-width:0}.auto-review-person small{font-size:11px;color:var(--text-muted)}.auto-review-person>span:last-child{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.auto-review-evidence{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--surface-soft);font-size:13px;line-height:1.55}.auto-review-evidence h3{margin:0 0 10px;font-size:16px}.auto-review-evidence ul{padding-left:20px;margin:10px 0}.auto-review-evidence li+li{margin-top:5px}.auto-review-evidence .note{margin:10px 0}.auto-review-rules{display:grid;gap:7px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}.auto-review-rules>div{display:grid;gap:2px}.auto-review-rules>div+div{padding-top:7px;border-top:1px solid var(--line)}.auto-review-rules span{color:var(--text-muted)}.auto-review-desktop-evidence{position:sticky;top:0}.auto-review-mobile-evidence{display:none}
.auto-review-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.auto-review-people article{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}.auto-review-people h3{margin:0 0 9px;font-size:16px}.auto-review-people article>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;font-size:13px}.auto-review-people article>div span{display:grid;gap:2px}.auto-review-people .note{margin:11px 0 0}
.auto-review-warning-groups{display:grid;gap:12px}.auto-review-warning-groups section{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--surface-soft)}.auto-review-warning-groups h3{font-size:15px;margin:0 0 8px}.auto-review-warning-groups ul{list-style:none;padding:0;margin:0}.auto-review-warning-groups li{display:flex;align-items:flex-start;gap:10px;padding:8px 0;font-size:14px;line-height:1.45}.auto-review-warning-groups li+li{border-top:1px solid var(--line)}.auto-review-warning-link{border:0;background:none;color:var(--accent-ink);font-weight:700;white-space:nowrap;padding:0}.auto-review-empty{padding:20px;border:1px solid var(--line);border-radius:12px;text-align:center}
.auto-review-matrix-intro,.auto-review-person-guide{margin:0 0 10px;color:var(--text-muted);font-size:13px;line-height:1.45}
.auto-review-page.matrix-view{display:flex;flex-direction:column;overflow:hidden}.auto-review-page.matrix-view .auto-review-matrix-scroll{flex:1;min-height:0;max-height:none}.auto-review-page.matrix-view .auto-review-evidence{flex:none;position:static;max-height:170px;overflow:auto;box-shadow:none}
.auto-review-matrix-nav{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 10px;font-variant-numeric:tabular-nums}.auto-review-matrix-nav .button{width:38px;height:38px;min-width:38px;padding:0;font-size:23px}.auto-review-matrix-nav strong{min-width:110px;text-align:center;font-size:14px}
.auto-review-matrix-scroll{max-height:390px;overflow:auto;border:1px solid var(--line);border-radius:11px;overscroll-behavior:contain}.auto-review-matrix{min-width:0}.auto-review-matrix-row{display:grid;grid-template-columns:minmax(104px,120px) repeat(var(--auto-preview-columns),minmax(0,1fr));min-width:0}.auto-review-matrix-row+.auto-review-matrix-row{border-top:1px solid var(--line)}
.auto-review-matrix-header{position:sticky;top:0;z-index:3;background:var(--surface-soft)}.auto-review-matrix-name{position:sticky;left:0;z-index:1;display:flex;align-items:center;min-width:0;padding:7px 9px;background:var(--surface-soft);font-size:13px;font-weight:700;overflow-wrap:anywhere}.auto-review-matrix-header .auto-review-matrix-name{z-index:4}.auto-review-matrix-date{display:grid;place-content:center;gap:1px;min-height:49px;padding:4px 2px;border-left:1px solid var(--line);text-align:center;font-size:13px;font-variant-numeric:tabular-nums}.auto-review-matrix-date small{color:var(--text-muted);font-size:10px;white-space:nowrap}.auto-review-matrix-date.selected{background:var(--accent-soft)}
.auto-review-matrix-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;min-height:57px;padding:4px 1px;border:0;border-left:1px solid var(--line);background:var(--surface);color:var(--text-main);font-family:inherit;font-size:12px;font-weight:700;line-height:1.28;font-variant-numeric:tabular-nums;cursor:pointer}.auto-review-matrix-cell span{white-space:nowrap}.auto-review-matrix-cell strong{font-size:16px}.auto-review-matrix-cell small{font-size:10px;color:var(--text-muted)}.auto-review-matrix-cell.rest,.auto-review-matrix-cell.comp,.auto-review-matrix-cell.leave{background:var(--leave-label-bg,var(--accent-soft));color:var(--leave-label-text,var(--text-main))}.auto-review-matrix-cell.fixed{box-shadow:inset 3px 0 var(--employee-leave-border,var(--accent-ink))}.auto-review-matrix-cell.selected{outline:2px solid var(--accent-ink);outline-offset:-2px;position:relative;z-index:2}.auto-review-matrix-cell:focus-visible,.auto-review-week-day:focus-visible{outline:2px solid var(--accent-ink);outline-offset:-2px}
.auto-review-evidence{position:sticky;bottom:0;z-index:5;margin-top:11px;box-shadow:0 -5px 20px #0002}.auto-review-evidence-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.auto-review-evidence-heading h3{margin:0;font-size:15px}.auto-review-evidence-heading span{color:var(--text-muted);font-size:12px}.auto-review-evidence details{margin-top:8px}.auto-review-evidence details>summary{cursor:pointer;font-weight:700}.auto-review-evidence>.button{margin-top:8px}
.auto-review-person-picker{display:flex;align-items:center;gap:10px;margin-bottom:11px;font-size:14px;font-weight:700}.auto-review-person-picker select{min-width:170px;min-height:40px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text-main);font:inherit}.auto-review-person-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:10px}.auto-review-person-totals span{display:flex;justify-content:space-between;gap:4px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);font-size:13px}.auto-review-person-totals strong{white-space:nowrap}.auto-review-person-weeks{display:grid;gap:9px}.auto-review-person-week{padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}.auto-review-week-heading{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:7px;font-size:13px}.auto-review-week-heading span{color:var(--text-muted)}.auto-review-week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.auto-review-week-day{display:grid;place-content:center;gap:2px;min-width:0;min-height:52px;padding:3px 1px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text-main);font:inherit;cursor:pointer}.auto-review-week-day small{font-size:11px;white-space:nowrap}.auto-review-week-day strong{font-size:15px}.auto-review-week-day.rest,.auto-review-week-day.comp,.auto-review-week-day.leave{background:var(--leave-label-bg,var(--accent-soft));color:var(--leave-label-text,var(--text-main))}.auto-review-week-day.fixed{border-color:var(--employee-leave-border,var(--accent-ink))}.auto-review-person-more{margin-top:12px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;font-size:13px}.auto-review-person-more summary{cursor:pointer;font-weight:700}.auto-review-person-more p{margin:7px 0 0;line-height:1.5}
@media(max-width:600px){.auto-review-page.matrix-view .auto-review-evidence{max-height:125px}.auto-review-matrix-row{grid-template-columns:74px repeat(var(--auto-preview-columns),minmax(0,1fr))}.auto-review-matrix-name{padding:5px 4px;font-size:11px}.auto-review-matrix-date{font-size:11px}.auto-review-matrix-date small{font-size:9px}.auto-review-matrix-cell{min-height:53px;font-size:11px}.auto-review-matrix-cell strong{font-size:15px}.auto-review-person-totals span{display:grid;gap:2px;padding:7px 5px;text-align:center;font-size:11px}.auto-review-person-totals strong{font-size:13px}.auto-review-week-days{gap:3px}.auto-review-week-day{min-height:48px}.auto-review-week-day small{font-size:10px}.auto-review-week-day strong{font-size:14px}}
@media(max-width:600px){.auto-schedule-preview-dialog .auto-review-kpis{display:none}}
@media(max-width:360px){.auto-review-matrix-row{grid-template-columns:64px repeat(var(--auto-preview-columns),minmax(0,1fr))}.auto-review-matrix-date small{display:none}}
.auto-schedule-workspace .modal{width:min(920px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:24px}
.auto-schedule-workspace .modal>h2{margin-bottom:4px}
.auto-schedule-workspace .modal-actions{position:sticky;bottom:-24px;padding:12px 0 0;margin-top:12px;border-top:1px solid var(--line);background:var(--surface)}
.auto-workspace-intro{margin:4px 0 14px}
.auto-workspace-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 16px}
.auto-workspace-overview>span{display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0;padding:11px 13px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft);font-size:13px;color:var(--text-muted)}
.auto-workspace-overview strong{font-size:15px;color:var(--text-main);white-space:nowrap}
.auto-workspace-overview .needs-attention{border-color:var(--warning-border,#b27342);color:var(--text-main)}
.auto-workspace-rule-panel{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(240px,.85fr);gap:12px;margin-top:14px}
.auto-workspace-day-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;align-content:start}
.auto-workspace-day{display:grid;place-items:center;gap:1px;min-width:0;min-height:49px;padding:4px 2px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);color:var(--text-main);font-variant-numeric:tabular-nums}
.auto-workspace-day span{font-size:14px;font-weight:700}.auto-workspace-day small{font-size:10px;white-space:nowrap;color:var(--text-muted)}
.auto-workspace-day.missing{border-color:var(--warning-border,#b27342)}.auto-workspace-day.missing small{color:var(--text-main)}
.auto-workspace-day.closed,.auto-workspace-day.published{opacity:.72}.auto-workspace-day.selected{outline:2px solid var(--accent-ink);outline-offset:1px}
.auto-workspace-rule-detail{min-width:0;border:1px solid var(--line);border-radius:11px;padding:12px;background:var(--surface-soft);font-size:13px;line-height:1.5}
.auto-workspace-rule-detail>strong{display:block;margin-bottom:9px}.auto-workspace-rule-detail>div+div{border-top:1px solid var(--line);padding-top:8px;margin-top:8px}
.auto-schedule-workspace .auto-workspace-rule-detail p{margin:3px 0 0}
.auto-workspace-section{border:1px solid var(--line);border-radius:13px;padding:15px;margin:10px 0;background:var(--surface)}
.auto-workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.auto-workspace-heading h3{margin:0;font-size:16px}
.auto-schedule-workspace .auto-workspace-section p{margin:9px 0;font-size:13px;line-height:1.55;color:var(--text-main)}
.auto-workspace-status{font-size:12px;font-weight:700;padding:5px 9px;border-radius:30px;white-space:nowrap;background:var(--surface-soft);color:var(--text-main)}
.auto-workspace-status.ready{background:var(--accent-soft);color:var(--accent-ink)}
.auto-workspace-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.auto-workspace-actions .button{min-height:36px}
.auto-schedule-workspace .auto-workspace-section p.auto-workspace-hint{color:var(--text-muted);font-size:12px}
.auto-schedule-workspace .auto-workspace-warning{border-left:3px solid #b27342;padding:7px 10px;background:var(--surface-soft);color:var(--text-main);overflow-wrap:anywhere}
.auto-workspace-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:220px;overflow:auto}
.auto-workspace-people>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;font-size:13px;min-width:0}
.auto-workspace-people span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auto-workspace-people button{flex:none}
.auto-schedule-workspace [data-comp-hours][hidden]{display:none}
.auto-long-shift-rules{display:grid;gap:10px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}
.auto-long-shift-rules[hidden]{display:none}
.auto-long-shift-rules .note{margin:0}
.auto-long-shift-rules .field{margin:0}
.auto-workspace-run{background:var(--surface-soft)}
@media(max-width:600px){
 .auto-schedule-workspace{padding:6px}
 .auto-schedule-workspace .modal{width:100%;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:14px;padding:16px}
 .auto-schedule-workspace .modal-actions{bottom:-16px}
 .auto-workspace-section{padding:12px}
 .auto-workspace-people{grid-template-columns:1fr;max-height:180px}
 .auto-workspace-actions .button{min-height:42px;font-size:13px}
  .auto-workspace-overview{gap:5px}.auto-workspace-overview>span{display:grid;place-items:center;gap:2px;padding:8px 3px;font-size:11px;text-align:center}.auto-workspace-overview strong{font-size:13px}
  .auto-workspace-rule-panel{grid-template-columns:1fr}.auto-workspace-day-grid{gap:4px}.auto-workspace-day{min-height:46px}.auto-workspace-day small{font-size:9px}
}
.auto-preview-warnings{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:12px 0;background:var(--surface-soft)}
.auto-preview-warnings ul{margin:8px 0 0;padding-left:20px;max-height:180px;overflow:auto}
.auto-preview-rows{margin-top:12px}
@media(min-width:901px){
 html[data-theme] .shell .schedule-leave-section .tool-palette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-flow:column}
 html[data-theme] .shell .schedule-leave-section .tool-button{width:100%;min-width:0;padding:3px 1px;white-space:normal;overflow-wrap:anywhere;font-size:clamp(11px,.9vw,13px);line-height:1.2}
 html[data-theme] .shell .schedule-leave-section :is([data-schedule-tool="leave:rest"],[data-schedule-tool="leave:annual"]){font-size:clamp(14px,1.15vw,18px)}
 html[data-theme] .shell .schedule-leave-section [data-schedule-tool="leave:annual"]{font-size:14px;white-space:nowrap}
}
@media(min-width:1201px){
 html[data-theme] .shell :is(.schedule-tools,.matrix-expanded .schedule-tools){grid-template-columns:280px minmax(210px,1.15fr) minmax(175px,1fr) minmax(210px,1.8fr) minmax(130px,.8fr)}
}
@media(max-width:900px){
 html[data-theme] .shell .matrix-carousel-panel.schedule-leave-section .tool-palette>.tool-button{min-width:0;padding:2px 1px;font-size:clamp(12px,3.4vw,14px);line-height:1.1;overflow-wrap:anywhere}
}
.auto-preview-scroll{max-height:45vh;overflow:auto;margin-top:8px;border:1px solid var(--line);border-radius:10px}
.auto-preview-scroll table{width:100%;border-collapse:collapse;font-size:13px}
.auto-preview-scroll .auto-funding-table{min-width:620px}
.auto-preview-scroll th,.auto-preview-scroll td{padding:7px 9px;border-bottom:1px solid var(--line);text-align:left}
@media(max-width:600px){
  .auto-schedule-preview-dialog .modal{width:100%;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:15px;border-radius:14px}
  .auto-review-head{align-items:flex-start;flex-direction:column;gap:6px}.auto-review-head p{font-size:13px}.auto-review-status{font-size:12px}
  .auto-review-kpis{gap:5px;margin:9px 0 4px}.auto-review-kpis span{display:grid;place-items:center;gap:2px;padding:7px 3px;font-size:11px;text-align:center}.auto-review-kpis strong{font-size:13px}
  .auto-review-tabs button{min-height:44px;font-size:13px}.auto-review-layout{display:block}.auto-review-desktop-evidence{display:none}.auto-review-mobile-evidence{display:block;margin:2px 0 8px}.auto-review-evidence{padding:11px;font-size:13px}.auto-review-people{grid-template-columns:1fr}.auto-review-person{min-height:46px}.auto-review-day-nav{gap:6px}.auto-review-day-nav label span{display:none}
 .auto-schedule-preview-dialog .modal-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .auto-schedule-preview-dialog .modal-actions .button{min-width:0;white-space:normal;min-height:42px;padding:7px 5px}
 .auto-schedule-preview-dialog .modal-actions [data-action="auto-schedule-apply"]{grid-column:1/-1}
}
/* Keep compensation history available without lengthening the preference form. */
.comp-ledger-history{margin-top:10px;border-top:1px solid var(--line);padding-top:10px;color:var(--text-main)}
.comp-ledger-history>summary{cursor:pointer;font-weight:700}
.comp-ledger-history>ol{list-style:none;margin:8px 0 0;padding:0;max-height:180px;overflow:auto;scrollbar-width:thin}
.comp-ledger-history li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:6px 0;border-bottom:1px solid var(--line);font-size:12px}
.comp-ledger-history li strong{font-variant-numeric:tabular-nums;white-space:nowrap}
.comp-ledger-history li small{grid-column:1/-1;color:var(--text-muted)}
/* Work segments use the existing theme and fit narrow screens. */
.work-segment-toolbar{display:flex;justify-content:flex-end;margin-bottom:8px}
.work-segment-row{min-width:0;border:1px solid var(--border,#68615a);border-radius:12px;padding:12px;margin:12px 0}
.work-segment-times{display:grid;grid-template-columns:1fr 1fr .8fr;gap:10px}
.work-segment-times input{width:100%;min-width:0}
.clock-card-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}
.clock-card-navigation>span{text-align:center;font-size:14px}
.clock-card-dots{display:flex;justify-content:center;gap:6px;margin-top:6px}
.clock-card-dots button{width:8px;height:8px;min-height:8px;padding:0;border-radius:50%;background:var(--muted,#8d8882);border:0}
.clock-card-dots button.active{background:var(--accent,#e5a276)}
[data-clock-swipe]{touch-action:pan-y}
.matrix-work-time.matrix-multi-segment{display:flex;flex-direction:column;gap:4px;width:100%;max-width:100%;font-size:14px;line-height:1.15}
.matrix-work-time.matrix-multi-segment>span{display:flex;flex-direction:column;gap:0;white-space:nowrap}
@media(max-width:420px){.work-segment-times{grid-template-columns:1fr 1fr}.work-segment-times .field:last-child{grid-column:1/-1}.work-segment-row{padding:8px}}

.clock-time-alert{color:var(--danger,#db867c)!important;border-color:var(--danger,#db867c)!important}.today-punch-actions .clock-time-alert.primary{background:var(--danger-bg,rgba(168,65,55,.18));color:var(--danger,#db867c)}

.desktop-report-action,.matrix-report-icon{display:none}
@media(min-width:901px){
 .desktop-report-action{display:inline-flex;align-items:center;white-space:nowrap}
 .attendance-report-action{height:32px;min-height:32px;margin-inline-start:auto}
 .personal-clock-history .attendance-report-action{height:28px;min-height:28px;padding-block:3px}
 .matrix-card>.matrix-report-action{position:absolute;top:66px;right:112px;z-index:5;height:30px;min-height:30px;margin:0;padding:4px 8px;font-size:12px}
 .matrix-expanded .matrix-report-action{display:none}
}
@media(min-width:901px) and (max-width:1200px){.matrix-card>.matrix-report-action{top:100px}}
@media(min-width:901px) and (max-width:960px){
 .matrix-card>.matrix-report-action{width:30px;min-width:30px;padding:0;justify-content:center}
 .matrix-report-action>.matrix-report-label{display:none}
 .matrix-report-action>.matrix-report-icon{display:block;font-size:16px}
}
#reportDownloadForm .field{display:grid;gap:5px;margin-bottom:12px}
#reportDownloadForm select,#reportDownloadForm input:not([type=checkbox]){width:100%;min-width:0}
