@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&display=swap');
:root{--bg:#f6f5ef;--paper:#fff;--ink:#1f2a22;--muted:#56625a;--line:#dcdfd6;--green:#2d6849;--green-dark:#23563b;--green-soft:#e6efdf;--warn:#7a4708;--warn-bg:#fff3df;--warn-line:#e9c98f;--ok:#2b5f3a;--ok-bg:#e8f2e3;--radius:12px;
 --c7:#eef0d8;--c7t:#5a5f16;--c8:#f3e6ef;--c8t:#7a3466;
 --c1:#e3efe6;--c1t:#1f5c3c;--c2:#e5edf6;--c2t:#2f5677;--c3:#efe9f7;--c3t:#594484;--c4:#fbeedb;--c4t:#7f5313;--c5:#f9e6e2;--c5t:#86392b;--c6:#e3f2f2;--c6t:#21605f;
 font-family:'DM Sans',-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:17px;line-height:1.45;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}
body{margin:0;min-width:320px;min-height:100vh}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.45}
:focus-visible{outline:3px solid #b16b4f;outline-offset:2px}
h1{font-size:30px;line-height:1.2;margin:0}
h2{font-size:20px;line-height:1.3;margin:0 0 12px}
.muted{color:var(--muted);margin:0 0 14px}
.lead{color:var(--muted);margin:6px 0 0;max-width:640px;font-size:18px}
.lead b{color:var(--ink)}
.narrow-only{display:none}

/* Toppen och stegen */
.top{background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:4}
.top-in{max-width:1240px;margin:0 auto;padding:10px 28px;display:flex;align-items:center;gap:24px}
.brand{display:flex;align-items:center;gap:10px}
.brand b{display:block;font-size:19px;line-height:1.1}
.brand small{display:block;color:var(--muted);font-size:14px}
.brand-mark{width:38px;height:38px;border-radius:10px;background:var(--green);color:#fff;display:grid;place-items:center;font-weight:700;font-size:19px}
.steps{display:flex;gap:6px;margin-left:auto}
.step{display:flex;align-items:center;gap:10px;border:0;background:transparent;border-radius:999px;padding:8px 18px 8px 8px;min-height:52px;font-size:17px;font-weight:500;color:var(--muted)}
.step:hover{background:#f0f1ea}
.step-n{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;border:2px solid #c9cec3;font-weight:700;font-size:16px;color:var(--muted);background:#fff}
.step.active{background:var(--green-soft);color:var(--green-dark);font-weight:700}
.step.active .step-n{background:var(--green);border-color:var(--green);color:#fff}

/* Exempel eller Mitt schema */
.mode-switch{display:flex;align-items:center;gap:10px;border:1.5px solid #c9cec3;background:#fff;border-radius:999px;min-height:48px;padding:6px 16px 6px 8px;font-size:16px;font-weight:700;color:var(--ink);flex:none}
.mode-switch:hover{border-color:#9da592}
.ms-track{width:44px;height:26px;border-radius:99px;background:#d5d9cf;position:relative;transition:background .2s;flex:none}
.ms-dot{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .2s}
.mode-switch[aria-checked=true]{border-color:#d9a441;background:#fff8e8}
.mode-switch[aria-checked=true] .ms-track{background:#c98a1a}
.mode-switch[aria-checked=true] .ms-dot{transform:translateX(18px)}
body.is-demo .top{background:#fffbf0}
body.is-demo .app-foot{display:none}
.demo-banner{max-width:1240px;margin:16px auto 0;padding:14px 18px;background:#fff3d6;border:1.5px solid #e9c98f;border-radius:14px;display:flex;align-items:center;justify-content:space-between;gap:12px 18px;flex-wrap:wrap;color:#5c3d07}
.demo-banner>div:first-child{flex:1;min-width:260px}
.db-btns{display:flex;gap:8px;flex-wrap:wrap}
.start-card{text-align:center;padding:36px 24px}
.start-card .lead{margin:6px auto 22px}
.start-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 auto 24px;max-width:860px;text-align:left}
.start-steps>div{background:#f7f8f3;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:4px}
.start-steps .step-n{margin-bottom:4px}
.start-steps span:last-child{color:var(--muted);font-size:15px}
.start-demo{margin:18px 0 0}
.welcome-alt{margin:16px 0 0;font-size:18px}

/* Sidan */
.page{max-width:1240px;margin:0 auto;padding:30px 28px 60px}
.head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px;flex-wrap:wrap}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:18px}
.card.flush{padding:0;overflow:hidden}
.card-pad{padding:20px 22px 4px}
.count{font-size:16px;font-weight:500;color:var(--muted);margin-left:6px}
.empty{color:var(--muted);margin:0}

/* Knappar */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 20px;border-radius:10px;border:1.5px solid #c9cec3;background:#fff;font-size:17px;font-weight:700;color:var(--ink);white-space:nowrap}
.btn:hover:not(:disabled){background:#f3f4ee;border-color:#aeb5a8}
.btn.primary{background:var(--green);border-color:var(--green);color:#fff}
.btn.primary:hover:not(:disabled){background:var(--green-dark);border-color:var(--green-dark)}
.btn.big{min-height:60px;padding:14px 30px;font-size:19px}
.btn.small{min-height:42px;padding:6px 14px;font-size:16px}
.btn.icon{width:52px;padding:0;font-size:26px;line-height:1}
.btn.danger{color:#a3332a;border-color:#e3bdb7}
.btn.danger:hover{background:#fcefec}
.link{border:0;background:none;padding:4px 2px;color:var(--green-dark);font-weight:700;text-decoration:underline;font-size:inherit}

/* Val (avdelning, dag) */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.chip{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:8px 18px;border-radius:999px;border:1.5px solid #c9cec3;background:#fff;font-size:17px;font-weight:500}
.chip:hover{border-color:#9da592}
.chip.on{background:var(--green);border-color:var(--green);color:#fff;font-weight:700}
.chip.on .dot{box-shadow:0 0 0 2px #fff}
.chip small{font-size:14px;opacity:.75}
.chip.add{border-style:dashed;color:var(--green-dark);font-weight:700}
.chip.check{cursor:pointer;user-select:none}
.chip.check input{width:20px;height:20px;margin:0;accent-color:var(--green)}
.chip.check:has(input:checked){background:var(--green-soft);border-color:var(--green);color:var(--green-dark);font-weight:700}
.dot{display:inline-block;width:12px;height:12px;border-radius:50%;flex:none}
.dot.c1,.av.c1,.shift.c1{background:var(--c1);color:var(--c1t)}.dot.c1{background:var(--c1t)}
.dot.c2,.av.c2,.shift.c2{background:var(--c2);color:var(--c2t)}.dot.c2{background:var(--c2t)}
.dot.c3,.av.c3,.shift.c3{background:var(--c3);color:var(--c3t)}.dot.c3{background:var(--c3t)}
.dot.c4,.av.c4,.shift.c4{background:var(--c4);color:var(--c4t)}.dot.c4{background:var(--c4t)}
.dot.c5,.av.c5,.shift.c5{background:var(--c5);color:var(--c5t)}.dot.c5{background:var(--c5t)}
.dot.c6,.av.c6,.shift.c6{background:var(--c6);color:var(--c6t)}.dot.c6{background:var(--c6t)}
.dot.c7,.av.c7,.shift.c7{background:var(--c7);color:var(--c7t)}.dot.c7{background:var(--c7t)}
.dot.c8,.av.c8,.shift.c8{background:var(--c8);color:var(--c8t)}.dot.c8{background:var(--c8t)}

/* Personal */
.people{list-style:none;margin:0;padding:0}
.person{display:flex;align-items:center;gap:16px;padding:14px 0;border-top:1px solid #eceee8}
.person:first-child{border-top:0;padding-top:4px}
.av{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:16px;flex:none}
.p-main{flex:1;min-width:0;display:flex;flex-direction:column}
.p-main b{font-size:18px}
.p-main span{color:var(--muted)}

.head-btns{display:flex;gap:10px;flex-wrap:wrap}
.p-acts{display:flex;gap:8px;flex:none}
.btn.del{color:#a3332a;border-color:#e3bdb7;padding:10px 14px}
.btn.del:hover:not(:disabled){background:#fcefec;border-color:#c98d84}
.btn.danger-solid{background:#a3332a;border-color:#a3332a;color:#fff}
.btn.danger-solid:hover:not(:disabled){background:#86271f}
.pickable{cursor:pointer;border-radius:12px;padding-left:10px!important;padding-right:10px;margin:0 -10px}
.pickable:hover{background:#f6f7f2}
.pickable.picked{background:#fcefec}
.pick-box{width:28px;height:28px;margin:0;flex:none;accent-color:#a3332a;cursor:pointer}
.people>li:first-child>.pickable{padding-top:14px}
.people>li+li>.pickable{border-top:1px solid #eceee8}
.select-bar{position:sticky;bottom:16px;z-index:5;display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border:2px solid #e3bdb7;border-radius:14px;padding:12px 14px;box-shadow:0 8px 28px #1a28201f;margin-top:8px}
.select-bar #pick-count{flex:1;font-weight:700;font-size:18px;min-width:120px}
.toast.has-undo{pointer-events:auto;display:flex;align-items:center;gap:14px;text-align:left}
.toast-undo{border:2px solid #fff;background:transparent;color:#fff;border-radius:10px;min-height:44px;padding:6px 16px;font-weight:700;font-size:17px;flex:none}
.toast-undo:hover{background:#fff;color:#1f2a22}
.group-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.group-head h2{margin:0}
.pen{display:inline-flex;align-items:center;gap:6px;border:1.5px solid transparent;background:transparent;color:var(--green-dark);border-radius:10px;min-height:44px;padding:4px 10px;font-weight:700;font-size:16px}
.pen:hover{border-color:#c9cec3;background:#f3f4ee}
.group-add{margin-left:auto}
.modal.wide{width:min(820px,100%)}
.bt-wrap{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:10px}
.bulk-table{width:100%;border-collapse:collapse}
.bulk-table th{background:#fbfbf7;text-align:left;font-size:15px;padding:10px 10px;border-bottom:1px solid var(--line);color:var(--muted)}
.bulk-table td{padding:6px 6px;border-bottom:1px solid #eceee8;vertical-align:middle}
.bulk-table tr:last-child td{border-bottom:0}
.bulk-table td:first-child{padding-left:10px}
.bulk-table input,.bulk-table select{width:100%;height:48px;border:1.5px solid #c9cec3;border-radius:9px;padding:0 12px;font-size:17px;background:#fff;min-width:0}
.bulk-table input:focus{border-color:var(--green)}
.bulk-table th:nth-child(1){width:44%}
.bulk-table th:nth-child(3){width:130px}
.bulk-table th:nth-child(4),.bt-state{width:110px}
.bt-state{color:var(--warn);font-weight:700;font-size:15px;padding-right:10px!important}
.bulk-table tr.dup input.bt-name{border-color:var(--warn-line);background:var(--warn-bg)}
.bt-tip{color:var(--muted);font-size:15px;margin:10px 0 18px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Behov per timme */
.pick-label{font-size:15px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 0 10px}
.need-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--line)}
.need-head b{font-size:20px}
.need-head span{color:var(--muted)}
.need-list{list-style:none;margin:0;padding:0;max-width:520px}
.need-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #eceee8}
.need-time{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.stepper{display:inline-flex;align-items:center;gap:10px}
.stepper button{width:52px;height:52px;border-radius:10px;border:1.5px solid #c9cec3;background:#fff;font-size:26px;font-weight:700;line-height:1;color:var(--green-dark)}
.stepper button:hover:not(:disabled){background:var(--green-soft);border-color:var(--green)}
.stepper output{min-width:104px;text-align:center;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}
.stepper output small{font-size:16px;font-weight:500;color:var(--muted)}
.stepper input{width:90px;height:52px;text-align:center;font-size:22px;font-weight:700;border:1.5px solid #c9cec3;border-radius:10px}
.need-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
.copy{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted)}
.dept-chips{align-items:center}
.needs-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.needs-layout .card{margin-bottom:0}
.needs-layout .week-need{order:-1}
.dn-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.dn-head h2{margin:0;font-size:24px}
.muted-inline{color:var(--muted)}
.quick{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 0 12px;border-bottom:1px solid var(--line);color:var(--muted);font-size:16px}
.quick span{margin-right:4px}
.qn{width:44px;height:44px;border-radius:10px;border:1.5px solid #c9cec3;background:#fff;font-weight:700;font-size:18px}
.qn:hover{background:var(--green-soft);border-color:var(--green)}
.need-list li.flash{animation:flash 1.4s ease-out}
@keyframes flash{0%{background:#fff3c4}100%{background:transparent}}
.dn-sum{margin:14px 0 10px}
.dn-warn{display:block;color:var(--warn);font-weight:700;margin-top:4px}
.copy{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted)}
.need-grid{border-collapse:separate;border-spacing:3px;width:100%;table-layout:fixed}
.need-grid th{font-size:15px;color:var(--muted);font-weight:700;font-variant-numeric:tabular-nums}
.need-grid tbody th,.need-grid tfoot th{width:44px;text-align:left}
.ng-day{width:100%;min-height:40px;border:0;border-radius:8px;background:transparent;font-weight:700;font-size:16px;color:var(--ink)}
.ng-day:hover{background:#f0f1ea}
.ng-day.on{background:var(--green);color:#fff}
.ng-cell{width:100%;height:36px;border:0;border-radius:6px;background:rgb(45 104 73 / var(--a));color:var(--ink);font-weight:700;font-size:16px;font-variant-numeric:tabular-nums}
.ng-cell.zero{background:#f1f2ec;color:#9aa196}
.ng-cell{color:#173f2b}
.ng-cell.dark{font-size:17px}
.ng-cell:hover{outline:2px solid var(--green);outline-offset:1px}
.need-grid td.sel .ng-cell{box-shadow:inset 0 0 0 2px #1f2a22}
.need-grid tfoot td{text-align:center;font-weight:700;font-size:15px;color:var(--muted);padding-top:4px}
.need-grid tfoot td.sel{color:var(--ink)}
.helper{background:#fbfbf7;margin-top:18px}
.helper summary{display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;list-style:none;min-height:44px}
.helper summary::-webkit-details-marker{display:none}
.helper summary b{display:block;font-size:19px}
.helper summary small{display:block;color:var(--muted);font-size:16px}
.sum-icon{width:40px;height:40px;border-radius:50%;border:1.5px solid #c9cec3;display:grid;place-items:center;font-size:22px;font-weight:700;flex:none}
.helper[open] .sum-icon{transform:rotate(45deg)}
.helper[open] summary{margin-bottom:16px}
.suggest{font-size:18px;margin:4px 0 14px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:12px}
.field{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:16px;margin:0 0 16px;border:0;padding:0;min-width:0}
.field legend{padding:0;margin-bottom:8px}
.field input:not([type=checkbox]),.field select{height:52px;border:1.5px solid #c9cec3;border-radius:10px;padding:0 14px;font-size:18px;font-weight:500;background:#fff;width:100%;min-width:0}
.field small{font-weight:500;color:var(--muted);font-size:16px}
.field .chips{margin-bottom:6px}
.with-unit{display:flex;align-items:center;gap:8px;font-weight:500}
.form-row .field{margin-bottom:0}
.toggle{display:flex;align-items:center;gap:12px;min-height:48px;font-weight:700;cursor:pointer;margin:2px 0 8px}
.toggle input{width:24px;height:24px;margin:0;accent-color:var(--green)}
.perday{background:#f7f8f3;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:8px}
.perday[hidden],.perday-row[hidden]{display:none}
.perday-hint{margin:0 0 8px;color:var(--muted);font-size:16px}
.perday-row{display:grid;grid-template-columns:96px 1fr auto 1fr;align-items:center;gap:8px;padding:5px 0}
.perday-day{font-weight:700}
.perday select{height:48px;border:1.5px solid #c9cec3;border-radius:10px;padding:0 10px;font-size:17px;background:#fff;min-width:0;width:100%}

/* Schema */
.weekbar{display:flex;align-items:center;gap:12px}
.wk{display:flex;flex-direction:column;align-items:center;min-width:150px}
.wk b{font-size:21px}
.wk span{color:var(--muted);font-size:16px}
.empty-week{text-align:center;padding:48px 24px}
.empty-week .lead{margin:0 auto 26px}
.note{border-radius:var(--radius);padding:16px 20px;margin-bottom:16px;font-size:18px}
.note.ok{background:var(--ok-bg);color:var(--ok);border:1px solid #bfd8bb}
.note.info{background:#eef3f8;border:1px solid #c5d5e5;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.note.warn{background:var(--warn-bg);border:1px solid var(--warn-line);color:var(--warn)}
.note.warn summary{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;cursor:pointer;list-style:none}
.note.warn summary::-webkit-details-marker{display:none}
.note.warn summary .link{color:var(--warn)}
.note.warn summary .hide,.note.warn[open] summary .show{display:none}
.note.warn[open] summary .hide{display:inline}
.gaps{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:10px}
.gaps li{background:#fff;border-radius:10px;padding:12px 16px;display:flex;flex-direction:column;gap:2px;color:var(--ink)}
.gaps li span{color:var(--muted);font-size:17px}
/* Ändra i schemat */
.edit-hint{display:flex;align-items:flex-start;gap:12px;background:#eef3f8;border:1px solid #c5d5e5;border-radius:12px;padding:12px 16px;margin:0 0 14px;color:#24394d}
.eh-icon{width:30px;height:30px;border-radius:50%;background:#2f5677;color:#fff;display:grid;place-items:center;flex:none;font-size:16px}
.hourly .name{display:block;width:100%;border:1px solid transparent;cursor:pointer;text-align:center;font:inherit;font-size:16px;color:var(--ink)}
.hourly .name:hover{border-color:var(--green);background:var(--green-soft)}
.add-here{display:block;width:100%;margin-top:4px;border:1.5px dashed var(--warn);background:#fff;color:var(--warn);border-radius:6px;padding:4px 6px;font-weight:700;font-size:15px;white-space:nowrap}
.add-here:hover{background:var(--warn);color:#fff}
.off-line .muted-inline{color:var(--muted);font-size:15px;margin-left:6px}
.off-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.add-person{font-weight:500}
.add-person span{color:var(--green);font-weight:700;font-size:20px}
.pick-h{font-size:16px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:6px 0 8px}
.pick-row{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:#fff;border:1.5px solid var(--line);border-radius:12px;padding:10px 14px;margin-bottom:8px;min-height:64px}
.pick-row:hover{border-color:var(--green);background:#f6faf4}
.pr-main{flex:1;display:flex;flex-direction:column;min-width:0}
.pr-main span{color:var(--muted);font-size:15px}
.pr-time{font-weight:700;font-size:18px;color:var(--green-dark);font-variant-numeric:tabular-nums}
.pick-foot{margin:6px 0 0}

/* Saknade timmar */
.gap-panel{border-radius:16px;margin-bottom:18px}
.gap-panel.ok{display:flex;align-items:center;gap:16px;background:var(--ok-bg);border:1px solid #bfd8bb;color:var(--ok);padding:18px 22px}
.gap-panel.ok b{display:block;font-size:19px}
.gap-panel.ok span{color:#3d6b48}
.gap-ok-icon{width:44px;height:44px;border-radius:50%;background:var(--ok);color:#fff;display:grid;place-items:center;font-size:22px;font-weight:700;flex:none}
.gap-panel.bad{background:#fff;border:2px solid var(--warn-line);padding:20px 22px;box-shadow:0 2px 10px #7a47080d}
.gap-top{display:flex;align-items:center;gap:22px;flex-wrap:wrap;margin-bottom:16px}
.gap-top p{margin:0;color:var(--muted);flex:1;min-width:220px}
.gap-num{display:flex;align-items:center;gap:12px;color:var(--warn)}
.gap-num b{font-size:46px;line-height:1;font-variant-numeric:tabular-nums}
.gap-num span{font-weight:700;font-size:18px;line-height:1.25}
.gap-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.gday{display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:12px;padding:10px 4px;min-height:96px;justify-content:center;text-align:center;border:2px solid transparent}
.gd-n{font-weight:700;font-size:18px}
.gd-date{font-size:14px;opacity:.8}
.gd-v{font-size:15px;margin-top:4px}
.gd-v b{font-size:20px}
.gday.good{background:var(--ok-bg);color:var(--ok)}
.gday.bad{background:rgb(246 178 92 / var(--lvl));color:#5c3304;cursor:pointer}
.gday.bad:hover{border-color:#c0761c}
.gday.bad.on{border-color:var(--warn);box-shadow:0 0 0 3px #fff,0 0 0 5px var(--warn)}
.gap-detail{margin-top:18px;padding-top:18px;border-top:1px solid #f0dcb8}
.gap-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.gap-detail-head h3{margin:0;font-size:22px}
.gap-reason{background:var(--warn-bg);border-radius:12px;padding:16px 18px;margin-bottom:10px}
.gr-dept{display:flex;align-items:center;gap:8px;font-weight:700;font-size:18px;margin-bottom:8px}
.gr-times{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.tchip{background:#fff;border:1px solid var(--warn-line);border-radius:999px;padding:5px 12px;font-size:16px;font-variant-numeric:tabular-nums}
.tchip b{color:var(--warn);margin-left:4px}
.gr-head{margin:0;font-weight:700}
.gr-why{display:inline-block;background:var(--warn);color:#fff;border-radius:6px;padding:0 8px;font-size:14px;margin-right:4px;vertical-align:2px}
.gr-advice{margin:4px 0 12px;color:#5b4a35}
.gr-acts{display:flex;gap:8px;flex-wrap:wrap}
.gr-acts .btn{background:#fff}
.viewbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.seg{display:flex;background:#fff;border:1.5px solid #c9cec3;border-radius:12px;padding:4px;gap:4px}
.seg button{border:0;background:transparent;border-radius:8px;min-height:46px;padding:8px 18px;font-size:17px;font-weight:500;color:var(--muted)}
.seg button.on{background:var(--green);color:#fff;font-weight:700}
.tools{display:flex;gap:8px}
.table-wrap{overflow-x:auto}
table{border-collapse:separate;border-spacing:0;width:100%}
.week th,.week td,.hourly th,.hourly td{border-bottom:1px solid #eceee8;padding:8px;text-align:center;vertical-align:middle}
.week thead th,.hourly thead th{background:#fbfbf7;font-weight:700;font-size:16px;white-space:nowrap}
.week thead th .d{display:block;font-size:18px}
.week thead th .date{display:block;color:var(--muted);font-weight:500;font-size:14px}
.badge{display:inline-block;margin-top:6px;border-radius:999px;padding:2px 10px;font-size:14px;font-weight:700}
.badge.ok{background:var(--ok-bg);color:var(--ok)}
.badge.bad{background:var(--warn-bg);color:var(--warn)}
.sticky{position:sticky;left:0;z-index:1;background:#fff;text-align:left!important;min-width:180px;border-right:1px solid #eceee8}
thead .sticky{background:#fbfbf7}
.week tbody th b{display:block;font-size:17px;white-space:nowrap}
.week tbody th span{display:block;color:var(--muted);font-weight:500;font-size:15px}
.week td{min-width:92px}
.shift{width:100%;min-height:48px;border:0;border-radius:9px;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.shift:hover{filter:brightness(.96);box-shadow:inset 0 0 0 2px currentColor}
.free{width:100%;min-height:48px;border:1.5px dashed transparent;border-radius:9px;background:transparent;color:#8b938a;font-size:16px}
.free:hover{border-color:#c9cec3;color:var(--green-dark)}
.free:hover::before{content:'+ '}
.hrs{font-weight:700;font-size:18px;white-space:nowrap}
.hrs small{font-weight:500;color:var(--muted);font-size:15px}
.hrs.off{color:var(--warn)}
.day-list{list-style:none;margin:0;padding:0}
.day-list li{display:flex;align-items:center;gap:18px;padding:12px 0;border-top:1px solid #eceee8}
.day-list li:first-child{border-top:0}
.day-list .time{font-size:21px;font-weight:700;min-width:96px;font-variant-numeric:tabular-nums}
.day-list .who{flex:1;display:flex;flex-direction:column}
.day-list .who b{font-size:18px}
.day-list .who span{color:var(--muted);display:flex;align-items:center;gap:8px}
.off-line{margin:14px 0 0;padding-top:14px;border-top:1px solid var(--line);color:var(--muted)}
.off-line b{color:var(--ink)}
.hourly td{min-width:104px;vertical-align:top;font-size:16px}
.hourly tbody th{font-size:17px;white-space:nowrap}
.hourly tbody th .dot{margin-right:8px}
.hourly .need{display:block;font-size:14px;font-weight:700;color:var(--ok);margin-bottom:4px}
.hourly .name{display:block;background:#f1f3ec;border-radius:6px;padding:3px 6px;margin:3px 0;font-size:16px}
.hourly td.short{background:var(--warn-bg)}
.hourly td.short .need{color:var(--warn)}
.hourly td.closed{background:#f6f6f2;color:#8b938a;vertical-align:middle}
.foot{color:var(--muted);font-size:16px;margin:4px 0 0}
.scroll-hint{margin:0;padding:10px 14px;color:var(--muted);font-size:15px;border-bottom:1px solid #eceee8}
.phone-only{display:none}
.phone-day h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.phone-day h2 .count{margin-left:0}
.phone-day h2 .badge{margin:0 0 0 auto}
.phone-day .shift{width:96px;flex:none}

/* Rutor */
.modal-backdrop{position:fixed;inset:0;background:#101a1470;display:grid;place-items:center;padding:16px;z-index:10;overflow-y:auto}
.modal{width:min(560px,100%);background:#fff;border-radius:16px;box-shadow:0 24px 80px #101a1440;padding:26px;max-height:calc(100vh - 32px);overflow-y:auto}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px}
.modal-head h2{font-size:24px;margin:0}
.modal-head p{color:var(--muted);margin:4px 0 0}
.modal-close{width:48px;height:48px;border:0;border-radius:10px;background:#f1f2ec;font-size:28px;line-height:1;flex:none}
.modal-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);margin-top:8px;padding-top:18px;flex-wrap:wrap}
.modal-footer .right{display:flex;gap:10px;margin-left:auto}
.form-error{background:#fcefec;color:#a3332a;border-radius:10px;padding:10px 14px;font-weight:700;margin:12px 0 0}

/* Frånvaro */
.absent{width:100%;min-height:48px;border:1.5px dashed #9fb3c8;border-radius:9px;background:#eef3f8;color:#2f5677;font-size:15px;font-weight:700}
.absent:hover{background:#e1eaf3}
.ab-tag{display:inline-block;background:#e1eaf3;color:#2f5677;border-radius:6px;padding:0 8px;font-size:14px;font-weight:700}
.away-line{margin:12px 0 0;padding-top:12px;border-top:1px solid var(--line);color:var(--muted)}
.away-line b{color:var(--ink)}
.abs-card .abs-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
.abs-card h2{margin-bottom:4px}
.abs-list{list-style:none;margin:10px 0 0;padding:0}
.abs-list li{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #eceee8;flex-wrap:wrap}
.abs-list li>span{flex:1;color:var(--muted)}
.abs-quick{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:6px 0 4px;color:var(--muted);font-size:16px}
.abs-quick .chip{min-height:42px;padding:6px 14px;font-size:16px}
.ab-note{background:#eef3f8;border-radius:10px;padding:10px 14px;margin:0 0 14px}
.chip.radio input{width:20px;height:20px;margin:0;accent-color:var(--green)}
.chip.check:has(input[type=radio]:checked){background:var(--green-soft);border-color:var(--green);color:var(--green-dark);font-weight:700}
.empty-btns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

.range-box{background:#f7f8f3;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 14px}
.range-box summary{cursor:pointer;font-weight:700;color:var(--green-dark);min-height:32px}
.range-box[open] summary{margin-bottom:8px}
.range-box input[type=date]{height:52px}
.leave-now{background:#eef3f8;border-radius:10px;padding:10px 14px;margin:0 0 6px}
.p-main .leave{color:#2f5677;font-weight:700}
.key-tag{display:inline-block;background:#fbeedb;color:#7f5313;border-radius:6px;padding:0 7px;font-size:13px;font-weight:700;vertical-align:2px}
.wk-hist{display:block;font-size:13px;color:var(--muted);font-weight:500}
.key-toggle{align-items:flex-start;margin:0}
.key-toggle span small{display:block;font-weight:500;color:var(--muted);font-size:15px}
.field small{font-weight:500}
.week-sum{display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 18px;margin-bottom:16px;font-size:17px}
.week-sum small{color:var(--muted)}
.week-sum .over{color:#a3332a;font-weight:700}
.week-sum .under{color:var(--ok);font-weight:700}
.week-sum .link{margin-left:auto}
.rest-h{font-size:16px;margin:10px 0 4px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}

/* Vila */
.rest-panel{background:#fff;border:1.5px solid #e3cf9f;border-radius:14px;padding:14px 18px;margin-bottom:18px}
.rest-panel summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;flex-wrap:wrap}
.rest-panel summary::-webkit-details-marker{display:none}
.rest-panel summary b{flex:none}
.rest-panel .sum-what{flex:1;color:var(--muted)}
.rest-panel .hide,.rest-panel[open] .show{display:none}
.rest-panel[open] .hide{display:inline}
.rest-panel[open] summary{margin-bottom:10px}
.rest-icon{width:30px;height:30px;border-radius:50%;background:#e9c98f;color:#5c3304;display:grid;place-items:center;font-weight:700;flex:none}
.rest-list{list-style:none;margin:0;padding:0}
.rest-list li{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #eceee8}
.rest-list li span{flex:1}

/* Till Coop */
.tr-top{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:8px}
.tr-top h2{margin:0}
.tr-bar{flex:1;min-width:160px;height:12px;background:#eceee8;border-radius:99px;overflow:hidden}
.tr-bar i{display:block;height:100%;background:var(--green);border-radius:99px}
.tr-list{list-style:none;margin:0;padding:0}
.tr-person{display:flex;gap:16px;padding:14px 0;border-top:1px solid #eceee8;align-items:flex-start}
.tr-person.done .tr-main{opacity:.5}
.tr-check{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:14px;font-weight:700;color:var(--muted);cursor:pointer;min-width:64px;padding-top:4px}
.tr-check input{width:32px;height:32px;margin:0;accent-color:var(--green);cursor:pointer}
.tr-main{flex:1;min-width:0}
.tr-name{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.tr-name b{font-size:19px}
.tr-name span{color:var(--muted);display:flex;align-items:center;gap:6px}
.tr-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.tr-day{background:#f1f5ef;border-radius:8px;padding:6px 8px;font-weight:700;font-variant-numeric:tabular-nums;font-size:16px}
.tr-day small{display:block;font-weight:500;color:var(--muted);font-size:13px}
.tr-day.off{background:#f6f6f2;color:#8b938a;font-weight:500}
.tr-warn{margin:8px 0 0;color:var(--warn);font-weight:700}

/* Säkerhetskopia */
.app-foot{max-width:1240px;margin:0 auto;padding:0 28px 40px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:16px}
.app-foot p{margin:0;flex:1;min-width:260px}
.app-foot b{color:var(--ink)}
.foot-btns{display:flex;gap:8px;flex-wrap:wrap}
.foot-btns label{cursor:pointer}

/* Välkomstskärm */
.welcome{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 30% 20%,#e9f1e2 0,#f6f5ef 55%);transition:opacity .35s}
.welcome.out{opacity:0}
body.has-welcome{overflow:hidden}
.welcome-card{width:min(560px,100%);text-align:center;animation:rise .5s ease-out}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.welcome-mark{width:64px;height:64px;font-size:30px;border-radius:18px;margin:0 auto 26px}
.welcome-hi{font-size:24px;color:var(--muted);margin:0}
.welcome h1{font-size:52px;margin:0 0 18px;color:var(--green-dark)}
.welcome-msg{font-size:21px;line-height:1.5;margin:0 auto 10px;max-width:440px}
.welcome-facts{color:var(--muted);margin:0 0 32px}
.welcome .btn.big{min-height:64px;font-size:20px;padding:16px 32px;border-radius:14px}
@media(max-width:720px){.welcome h1{font-size:42px}.welcome-msg{font-size:19px}.welcome .btn.big{width:100%;white-space:normal}}
@media(prefers-reduced-motion:reduce){.welcome-card{animation:none}}

.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);background:#1f2a22;color:#fff;padding:14px 20px;border-radius:12px;font-size:17px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:20;max-width:calc(100% - 32px);text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:900px){
 .top-in{padding:10px 18px}
 .page{padding:24px 18px 60px}
 .step{padding-right:12px}
}
@media(max-width:1000px){.needs-layout{grid-template-columns:1fr}}
@media(max-width:720px){
 :root{font-size:16px}
 .dept-chips .pen span{display:inline}
 .quick span{width:100%}
 .need-grid{border-spacing:2px}
 .need-grid tbody th,.need-grid tfoot th{width:30px;font-size:13px}
 .ng-cell{height:34px;font-size:15px}
 .ng-day{font-size:14px;padding:0}
 .wide-only{display:none}
 .narrow-only{display:inline}
 p.narrow-only{display:block}
 h1{font-size:26px}
 .lead{font-size:17px}
 body{padding-bottom:84px}
 .top-in{padding:10px 16px}
 .steps{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:6px 8px calc(6px + env(safe-area-inset-bottom));margin:0;gap:4px;box-shadow:0 -4px 16px #1a28200f}
 .step{flex:1;flex-direction:column;gap:3px;padding:6px 4px;border-radius:12px;font-size:15px;min-height:64px}
 .step-n{width:28px;height:28px;font-size:15px}
 .page{padding:20px 14px 40px}
 .head{align-items:stretch;flex-direction:column;gap:14px}
 .head>.btn{width:100%}
 .head-btns .btn{flex:1}
 .head-btns{flex-direction:column-reverse}
 .pen span{display:none}
 .group-add{margin-left:0}
 .bulk-table thead{display:none}
 .bulk-table,.bulk-table tbody{display:block}
 .bulk-table tr{display:grid;grid-template-columns:1fr 92px;gap:6px;padding:10px;border-bottom:1px solid var(--line)}
 .bulk-table tr:last-child{border-bottom:0}
 .bulk-table td{display:block;padding:0!important;border:0;width:auto!important}
 .bulk-table td:first-child{grid-column:1/-1}
 .bulk-table td.bt-state:empty{display:none}
 .bulk-table td.bt-state{grid-column:1/-1}
 .card{padding:16px}
 .card-pad{padding:16px 16px 2px}
 .person{flex-wrap:wrap;gap:12px}
 .person .btn{min-width:90px}
 .p-acts{width:100%;padding-left:56px}
 .p-acts .btn{flex:1}
 .btn.del span{display:inline}
 .pickable{flex-wrap:nowrap}
 .select-bar{bottom:92px}
 .select-bar .btn{flex:1}
 .select-bar #pick-count{width:100%;flex:none}
 .av{width:44px;height:44px}
 .need-list{grid-template-columns:1fr}
 .stepper output{min-width:96px;font-size:20px}
 .form-row{grid-template-columns:1fr 1fr;gap:10px}
 .weekbar{justify-content:space-between}
 .viewbar{flex-direction:column;align-items:stretch}
 .seg button{flex:1;padding:8px 6px;font-size:15px}
 .tools .btn{flex:1}
 .gap-panel.bad{padding:16px 14px}
 .gap-num b{font-size:40px}
 .gap-days{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .gday{min-height:84px}
 .gap-reason{padding:14px}
 .gr-acts .btn{flex:1}
 .tr-days{grid-template-columns:1fr 1fr}
 .tr-day{display:flex;justify-content:space-between;align-items:baseline;gap:6px}
 .tr-day small{display:inline}
 .tr-person{flex-wrap:nowrap}
 .tools{flex-wrap:wrap;width:100%}
 .tools .btn{flex:1 1 auto;padding:10px 12px}
 .tr-person{gap:10px}
 .tr-check{min-width:48px}
 .app-foot{padding:0 14px 24px}
 .foot-btns .btn{flex:1}
 .mode-switch{margin-left:auto;padding:6px 12px 6px 6px;font-size:15px}
 .demo-banner{margin:12px 14px 0}
 .db-btns .btn{flex:1}
 .start-steps{grid-template-columns:1fr 1fr}
 .start-card{padding:24px 16px}
 .phone-only{display:block}
 .wide-block{display:none}
 .sticky{min-width:118px}
 .week tbody th b{white-space:normal}
 .day-list li{flex-wrap:wrap;gap:6px 14px}
 .day-list .time{min-width:80px;font-size:19px}
 .day-list .btn{margin-left:auto}
 .chip{padding:8px 14px}
 .perday-row{grid-template-columns:52px 1fr auto 1fr}
 .modal-backdrop{padding:0;place-items:end stretch}
 .modal{border-radius:16px 16px 0 0;padding:20px;max-height:92vh}
 .modal-footer .right{width:100%}
 .modal-footer .right .btn{flex:1}
 .modal-footer .btn.danger{width:100%;order:2}
 .toast{bottom:96px;width:calc(100% - 32px)}
 .toast.has-undo{justify-content:space-between}
}
@media print{
 .top,.viewbar,.tools,.foot,.note,.chips,.scroll-hint,.weekbar .btn,.app-foot,.edit-hint,.gap-panel,.rest-panel,.abs-card,.tr-check{display:none!important}
 body{background:#fff;padding:0}
 .card{border:0;padding:0}
 .table-wrap{overflow:visible}
 .shift,.free{min-height:0;font-size:12px;padding:2px}
 .free{color:#999}
}
/* ---------- Efter granskningen mot Apples riktlinjer (2026-10-28) ---------- */
/* Kontrast: grå text på vitt var 2,9–3,2:1. #5f685e ger 5,8:1 på vitt och 5,4:1 på #f6f6f2 (krav 4,5:1). */
.free,.hourly td.closed,.tr-day.off,.closed-hour{color:#5f685e}
.ng-cell.zero{color:#5f685e}
/* Minsta text 15 px för den som ska läsa (13–14 px innan). */
.gd-date,.week thead th .date,.badge,.hourly .need,.tr-day small,.chip small,.brand small,.wk-hist,.tr-check,.key-tag,.ab-tag{font-size:15px}
/* Tryckytor minst 44 px (accessibility.md › Mobility). */
.btn.small{min-height:44px}
.link{display:inline-flex;align-items:center;min-height:44px}
.hourly .name,.add-here{min-height:44px}
.ng-cell{height:44px}
.ng-day{min-height:44px}
.abs-quick .chip{min-height:44px}
.range-box summary{display:flex;align-items:center;min-height:44px}
/* En färg betyder en sak: orange = något behöver ses över, blått = information och exemplet, lila = frånvaro. */
.key-tag{display:inline-flex;align-items:center;gap:4px;background:#eceee8;color:#2f3a32;border-radius:6px;padding:1px 8px;vertical-align:1px}
.mode-switch[aria-checked=true]{border-color:#7aa0c4;background:#eef3f8}
.mode-switch[aria-checked=true] .ms-track{background:#2f5677}
body.is-demo .top{background:#f3f7fb}
.demo-banner{background:#e8f0f8;border-color:#b9cde0;color:#1f3a52}
.absent{background:#f3eefa;border-color:#b9a6d6;color:#563a80}
.absent:hover{background:#ebe3f6}
.ab-tag{background:#ece4f6;color:#563a80}
.ab-note,.leave-now{background:#f4effa}
.p-main .leave{color:#563a80}
/* Instruktionsraden går att stänga. */
.edit-hint{align-items:center}
.edit-hint>span:nth-child(2){flex:1}
.eh-close{flex:none;color:#2f5677}
/* Frågerutor och meddelanden */
.modal.small{width:min(480px,100%)}
.ask-text{font-size:18px;margin:0 0 6px}
.toast-close{border:0;background:transparent;color:#fff;font-size:26px;width:44px;height:44px;flex:none;border-radius:10px}
.toast-close:hover{background:#ffffff22}
.week tbody th b .key-tag{display:inline-flex;margin-left:4px;font-weight:700;color:#2f3a32}
@media(max-width:720px){.ng-day,.need-grid tbody th,.need-grid tfoot th,.ng-cell{font-size:15px}.need-grid tbody th,.need-grid tfoot th{width:26px}.pen{min-width:44px;justify-content:center}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.shift-break{display:block;margin-top:3px;font-size:12px;font-weight:500;line-height:1.2;opacity:.9}
.day-list .time .shift-break{font-size:14px;color:var(--muted);white-space:nowrap}
.break-name{display:block;margin:4px 0;padding:4px 5px;border-radius:5px;background:#fff3d8;color:#75531a;font-size:13px;line-height:1.2}
.break-field{margin-top:12px}
.break-field small{max-width:45em;line-height:1.4}

.department-group{padding:12px 18px}
.group-summary{display:flex;align-items:center;gap:8px;min-height:48px;cursor:pointer;list-style:none}
.group-summary::-webkit-details-marker{display:none}
.group-summary h2{flex:1;margin:0}
.group-chevron{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;color:var(--green-dark);font-size:22px;line-height:1;flex:none}
.group-chevron::before{content:'⌄';transform:translateY(-2px)}
.department-group:not([open]) .group-chevron::before{content:'›';transform:none}
.group-summary:focus-visible{outline:3px solid #287951;outline-offset:3px;border-radius:8px}
.group-body{padding-top:6px}
.department-group .group-head{justify-content:flex-end;margin-bottom:8px}
