/* Personalsidan – inloggning, bokningar, kalender, beläggning och inställningar */
.staff-page { padding-top: 120px; }
.staff-notice { margin: 0 0 28px; padding: 12px 16px; background: var(--paper-2); border-left: 3px solid #3f8a5a; font-size: 14px; color: var(--ink-2); }
.staff-notice.is-demo { border-left-color: var(--red); }
.staff-notice:empty { display: none; }
.staff-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.staff-user i { width: 8px; height: 8px; border-radius: 50%; background: #3f8a5a; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.muted { color: var(--muted); }

/* Inloggning */
.login { min-height: 100vh; display: grid; place-items: center; padding: 120px 20px 60px; background: radial-gradient(ellipse at 50% 0%, rgba(150, 30, 28, .08), transparent 60%), var(--paper); }
.login-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); padding: 40px 40px 34px; box-shadow: 0 30px 80px rgba(0, 0, 0, .08); }
.login-card h1 { font: 300 clamp(2rem, 4vw, 2.8rem)/1 var(--font-display); margin: 8px 0 12px; }
.login-lede { margin: 0 0 26px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.login-btn { display: flex; justify-content: center; width: 100%; }
.login-btn svg { width: 16px; height: 16px; flex: none; }
.login-btn svg rect:nth-child(1) { fill: #f25022; } .login-btn svg rect:nth-child(2) { fill: #7fba00; }
.login-btn svg rect:nth-child(3) { fill: #00a4ef; } .login-btn svg rect:nth-child(4) { fill: #ffb900; }
.login-error { margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid var(--red); background: rgba(150, 30, 28, .06); color: var(--ink); font-size: 14px; line-height: 1.5; }
.login-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: clamp(32px, 4vw, 56px); }
.kpi { background: var(--paper); padding: 22px 24px; min-width: 0; }
.kpi span { display: block; font: 500 11px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; margin: 10px 0 6px; font: 400 clamp(1.5rem, 2vw, 2rem)/1.05 var(--font-display); }
.kpi small { font-size: 13px; color: var(--ink-2); }
.kpi.is-warn b { color: var(--red); }
.kpi-btn { text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; transition: background .2s; }
.kpi-btn:hover { background: var(--paper-2); }
.kpi-btn.is-new { background: linear-gradient(135deg, rgba(150, 30, 28, .07), var(--paper) 60%); }
.kpi-btn.is-new b { color: var(--red); }

/* Förfrågningar */
.tag-request { color: #fff; background: var(--red); border-color: var(--red); }
.bk.is-request .bk-row { border-left-color: var(--red); background: linear-gradient(90deg, rgba(150, 30, 28, .06), transparent 40%); }
.bk.is-request .bk-what b::before { content: "Förfrågan · "; color: var(--red); font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; }
.bk-details .dl-wide { grid-column: 1 / -1; }
.req-custom { margin: 0 0 24px; padding: 18px 20px 6px; border: 1px solid rgba(150, 30, 28, .35); background: linear-gradient(135deg, rgba(150, 30, 28, .05), transparent 60%); }
.req-custom h3 { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.req-custom h3 b { font: 400 1.3rem var(--font-display); }
.req-custom h3 span { font-size: 13px; color: var(--muted); }
.req-custom h3 a { color: var(--ink); text-decoration: underline; }
.req { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; padding: 14px 0; border-top: 1px dashed var(--line); }
.req-main > b { display: block; font: 400 1.1rem var(--font-display); }
.req-main > span { display: block; font-size: 13px; margin: 3px 0 8px; }
.req-main p { margin: 4px 0; font-size: 14px; line-height: 1.45; }
.req-actions { display: grid; gap: 8px; }
.req-actions .btn { padding: 10px 14px; font-size: 13px; white-space: nowrap; }

/* Flytt från provperioden */
.legacy-notice { border-left-color: var(--red); }
.legacy-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: 10px; vertical-align: middle; }
.legacy-actions .btn { padding: 8px 12px; font-size: 13px; }

/* Layout */
.staff-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 64px); align-items: start; }
.staff-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 9px 14px; border: 1px solid var(--line); background: none; border-radius: 999px; font: 500 13px var(--font-body); color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.staff-search input { width: min(360px, 100%); padding: 11px 14px; border: 1px solid var(--line); background: #fff; font: 400 14px var(--font-body); color: var(--ink); }
.staff-search input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.staff-dayfilter { margin: 0 0 16px; padding: 12px 16px; background: var(--paper-2); font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 16px; }

/* Bokningslista */
.bk-week { display: flex; align-items: baseline; gap: 14px; margin: 28px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.bk-week:first-child { margin-top: 0; }
.bk-week b { font: 400 1.3rem var(--font-display); }
.bk-week span { font-size: 13px; color: var(--muted); }
.bk { border-bottom: 1px solid var(--line); }
.bk-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto 92px; gap: 18px; align-items: center;
  width: 100%; text-align: left; padding: 16px 12px; border: 0; background: none; color: inherit; border-left: 3px solid transparent;
  transition: background .2s;
}
.bk-row:hover { background: var(--paper-2); }
.bk.is-open .bk-row { background: var(--paper-2); }
.bk-dag .bk-row { border-left-color: #c9b98a; }
.bk-kvall .bk-row { border-left-color: var(--ink-2); }
.bk-full .bk-row, .bk-span2 .bk-row { border-left-color: var(--red); }
.bk-date b { display: block; font: 500 15px var(--font-body); }
.bk-date span, .bk-what span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.bk-what b { display: block; font: 400 1.15rem/1.2 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font: 600 10px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px 4px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.tag-paid { color: #2f6b45; background: rgba(63, 138, 90, .12); border-color: rgba(63, 138, 90, .3); }
.tag-invoice { color: var(--ink-2); background: rgba(0, 0, 0, .05); border-color: var(--line); }
.tag-pending { color: var(--red); background: rgba(150, 30, 28, .07); border-color: rgba(150, 30, 28, .3); }
.tag-clean { color: #7a5a1a; background: rgba(201, 185, 138, .3); border-color: rgba(201, 185, 138, .8); }
.tag-block { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.tag-today { color: #fff; background: #2f6b45; border-color: #2f6b45; }
.tag-manual { color: #1f4f7a; background: rgba(31, 79, 122, .1); border-color: rgba(31, 79, 122, .3); }
.bk-price { font-family: var(--font-display); font-size: 1.2rem; text-align: right; white-space: nowrap; }
.bk-details { padding: 6px 15px 22px; background: var(--paper-2); border-top: 1px dashed var(--line); }
.bk-details dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; margin: 14px 0 18px; }
.bk-details dt { font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.bk-details dd { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.bk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-wait { margin: 0; max-width: 72ch; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.bk-actions .btn { padding: 10px 14px; font-size: 13px; }
.btn-danger { border-color: rgba(150, 30, 28, .4); color: var(--red); background: none; }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.bk-empty { padding: 40px 0; color: var(--muted); text-align: center; }
.bk-empty-start { text-align: left; padding: 28px 24px; border: 1px dashed var(--line); color: var(--ink-2); }
.bk-empty-start h3 { font: 400 1.5rem var(--font-display); margin: 0 0 8px; color: var(--ink); }
.bk-empty-start p { margin: 0; font-size: 15px; line-height: 1.5; }
.bk-empty-start a { color: var(--ink); text-decoration: underline; }
.bk-more { display: block; width: 100%; margin-top: 20px; }
.bk-block { border-left-color: var(--ink) !important; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, .04) 6px 7px); }
/* Historik */
.hist-head { margin: 0 0 22px; padding: 16px 18px; background: var(--paper-2); }
.hist-head p { margin: 12px 0 0; max-width: 72ch; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.hist-chips .chip { padding: 7px 12px; font-size: 12px; background: #fff; }
.hist-chips .chip.is-active { background: var(--ink); }
.hist-chips .chip small { margin-left: 3px; font-size: 11px; opacity: .6; }
.hist-chips .chip.is-warn:not(.is-active) { color: var(--red); border-color: rgba(150, 30, 28, .4); }
.tag-done { color: var(--ink-2); background: rgba(0, 0, 0, .04); border-color: var(--line); }
.bk.is-hist-cancelled .bk-price, .bk.is-hist-declined .bk-price { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.bk-custom .bk-row { border-left-color: var(--line); }
.bk-log { margin: 20px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.bk-log h4 { margin: 0 0 8px; font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-log li { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.bk-log time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-log .is-ok span { color: #2f6b45; }
.bk-log .is-warn span { color: var(--red); }

.bk-row-static { cursor: default; }
.bk-row-static:hover { background: none; }
.bk-row-static .bk-price { font-size: 13px; }
.bk.is-manual .bk-row, .bk.is-edited .bk-row { background: linear-gradient(90deg, rgba(31, 79, 122, .05), transparent 30%); }

/* Sidokolumn */
.staff-side { display: grid; gap: 20px; position: sticky; top: 96px; }
.side-card { border: 1px solid var(--line); padding: 22px; background: #fff; }
.side-card .eyebrow { margin-bottom: 14px; }
.side-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.lock-status { font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.lock-status ul { margin: 8px 0 12px; padding-left: 18px; }
.lock-status p { margin: 0 0 8px; }
.lock-warn { color: var(--red); }
.side-actions { display: grid; gap: 8px; }
.side-actions .btn { padding: 12px 16px; font-size: 14px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mini-head h3 { font: 400 1.35rem var(--font-display); margin: 0; }
.mini-head .cal-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 15px; display: grid; place-items: center; }
.mini-head .cal-nav:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mini-weekdays, .mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mini-weekdays span { text-align: center; font: 500 10px var(--font-body); letter-spacing: .1em; color: var(--muted); padding-bottom: 6px; }
.mini-day { min-height: 44px; border: 0; background: none; color: inherit; padding: 5px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 6px; font: 500 13px var(--font-body); }
.mini-day:hover { background: var(--paper-2); }
.mini-day.is-off { color: var(--muted); opacity: .4; }
.mini-day.is-selected { background: var(--ink); color: var(--paper); }
.mini-day.is-blocked { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(0, 0, 0, .09) 4px 5px); }
.mini-day .marks { display: flex; gap: 2px; min-height: 6px; }
.mini-day .marks i, .mini-legend i { display: block; width: 6px; height: 6px; border-radius: 50%; }
.m-dag { background: #c9b98a; }
.m-kvall { background: var(--ink-2); }
.m-helg { background: var(--red); }
.m-both { background: linear-gradient(90deg, #c9b98a 50%, var(--ink-2) 50%); }
.m-block { background: repeating-linear-gradient(135deg, transparent 0 1px, rgba(0, 0, 0, .35) 1px 2px); border: 1px solid var(--line); }
.mini-day.is-selected .marks i { outline: 1px solid var(--paper); }
.mini-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.mini-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Beläggning */
.occ { display: grid; gap: 8px; }
.occ-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font: 500 12px var(--font-body); color: var(--ink-2); }
.occ-row i { display: block; height: 10px; background: rgba(0, 0, 0, .07); overflow: hidden; }
.occ-row b { display: block; height: 100%; background: var(--red); transition: width .4s; }
.occ-row small { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }

/* Rutiner */
.routine-list { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.routine-list li { border-top: 1px solid var(--line); padding: 12px 0 12px 30px; position: relative; counter-increment: r; }
.routine-list li::before { content: counter(r); position: absolute; left: 0; top: 13px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 11px/20px var(--font-body); text-align: center; }
.routine-list b { display: block; font: 500 14px var(--font-body); }
.routine-list small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.routine-list em { font-style: normal; color: var(--ink); }

/* Formulär (redigering och inställningar) */
.staff input[type="text"], .staff input[type="tel"], .staff input[type="email"], .staff input[type="number"], .staff input[type="date"], .staff input[type="time"], .staff input[type="search"], .staff select, .staff textarea {
  width: 100%; border: 1px solid var(--line-2, var(--line)); background: #fff; color: var(--ink); padding: 10px 12px; font: 400 14px/1.3 var(--font-body); border-radius: 0; min-height: 42px;
}
.staff textarea { resize: vertical; min-height: 64px; }
.staff input:focus-visible, .staff select:focus-visible, .staff textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.set-row { display: grid; gap: 12px 16px; margin-top: 14px; }
.set-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.set-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.set-row label { display: flex; flex-direction: column; gap: 6px; font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.set-row label > input, .set-row label > select, .set-row label > textarea { letter-spacing: 0; text-transform: none; }
.set-span2 { grid-column: span 2; }
.set-check { flex-direction: row !important; align-items: center; gap: 10px !important; align-self: end; min-height: 42px; text-transform: none !important; letter-spacing: 0 !important; font: 400 14px var(--font-body) !important; color: var(--ink) !important; cursor: pointer; }
.set-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.set-check-row { display: flex; margin-top: 14px; }
.set-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.set-actions .btn { padding: 12px 18px; font-size: 14px; }
.set-msg { font-size: 14px; color: var(--muted); }
.set-msg.is-error { color: var(--red); }
.set-msg.is-ok { color: #2f6b45; }
.bk-edit { padding: 6px 0 4px; }
.bk-edit .set-row:first-child { margin-top: 10px; }

/* Inställningar */
.staff-settings { margin-top: clamp(64px, 8vw, 112px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.staff-settings .section-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; align-items: end; }
.staff-settings .section-note { margin: 0; color: var(--ink-2); font-size: 15px; }
.set-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.set-tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 16px; font: 500 14px var(--font-body); color: var(--ink-2); cursor: pointer; transition: color .2s, border-color .2s; }
.set-tab:hover { color: var(--ink); }
.set-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.set-panels { margin-top: 20px; }
.set-panel > .set-card { border-top: 0; }
.set-card { background: var(--paper); border: 1px solid var(--line); padding: 26px 28px 28px; min-width: 0; }
.set-wide { grid-column: 1 / -1; }
.set-head h3 { font: 400 1.5rem/1.1 var(--font-display); margin: 0 0 6px; }
.set-head p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 78ch; }
.set-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.set-head-row .btn { padding: 11px 16px; font-size: 14px; flex: none; }
.set-inline { display: grid; grid-template-columns: 170px 170px minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 16px; }
.set-inline label { display: flex; flex-direction: column; gap: 6px; font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.set-inline .btn { padding: 12px 18px; font-size: 14px; min-height: 42px; }
.block-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.block-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; background: var(--paper-2); font-size: 14px; }
.block-list li.muted { background: none; padding-left: 0; }

/* Drift */
.drift-modes { display: grid; gap: 10px; margin-top: 16px; }
.drift-mode { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.drift-mode:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.drift-mode input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.drift-mode b { display: block; font: 500 14px var(--font-body); }
.drift-mode small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }

/* Sätten att hyra */
.ways-table { margin-top: 18px; display: grid; gap: 4px; }
.wt-head { display: grid; grid-template-columns: 44px 1.3fr 212px 104px 225px 100px 100px; gap: 10px; padding: 0 0 4px; }
.wt-head span { font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wt-row { padding: 12px 0 10px; border-top: 1px dashed var(--line); }
.wt-top { display: grid; grid-template-columns: 44px 1.3fr 212px 104px 225px 100px 100px; gap: 10px; align-items: center; }
.wt-bottom { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding-left: 54px; }
.wt-bottom .wt-f-desc { flex: 1 1 320px; }
.wt-row.is-off .wt-f, .wt-row.is-off .wt-bottom { opacity: .45; }
.wt-f { min-width: 0; }
.wt-lbl { display: none; font: 500 10px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.wt-on { position: relative; display: block; width: 38px; height: 22px; cursor: pointer; }
.wt-on input { position: absolute; opacity: 0; width: 0; height: 0; }
.wt-on i { display: block; width: 38px; height: 22px; border-radius: 11px; background: rgba(0, 0, 0, .15); position: relative; transition: background .2s; }
.wt-on i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.wt-on input:checked + i { background: #3f8a5a; }
.wt-on input:checked + i::after { left: 18px; }
.wt-days { display: flex; gap: 4px; }
.wt-days label { position: relative; cursor: pointer; }
.wt-days input { position: absolute; opacity: 0; width: 0; height: 0; }
.wt-days span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); font: 600 11px var(--font-body); color: var(--muted); background: #fff; transition: background .15s, color .15s, border-color .15s; }
.wt-days input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wt-days input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }
.wt-end { display: flex; align-items: center; gap: 8px; }
.wt-end input[type="time"] { width: 104px; flex: none; }
.wt-next { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.wt-next input { width: 15px; height: 15px; accent-color: var(--ink); }
.wt-next:has(input:disabled) { opacity: .4; }
.wt-tools { display: flex; gap: 4px; justify-content: flex-end; }
.wt-btn { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 50%; font-size: 13px; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.wt-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wt-btn:disabled { opacity: .3; cursor: default; }
.wt-del:hover { background: var(--red) !important; border-color: var(--red) !important; }
.wt-row[data-armed="1"] .wt-del { width: auto; padding: 0 8px; border-radius: 15px; background: var(--red); color: #fff; border-color: var(--red); font-size: 11px; }
.wt-span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.wt-span input { width: 15px; height: 15px; accent-color: var(--ink); }
.wt-needs { font-size: 12px; color: var(--muted); white-space: nowrap; }
.wt-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Texter */
.tx-search input { width: min(320px, 100%); }
.tx-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tx-page { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; border-radius: 999px; font: 500 13px var(--font-body); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.tx-page:hover { border-color: var(--ink); color: var(--ink); }
.tx-page.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tx-page b { font: 600 11px/1 var(--font-body); background: #1f4f7a; color: #fff; border-radius: 999px; padding: 4px 7px; }
.tx-page.is-active b { background: var(--paper); color: var(--ink); }
.texts-list { display: grid; gap: 14px; margin-top: 18px; }
.tx-pagehead { font: 400 1.3rem var(--font-display); margin: 12px 0 -4px; }
.tx-sec { border: 1px solid var(--line); background: #fff; padding: 18px 20px 20px; min-width: 0; }
.tx-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.tx-sec-head h4 { font: 400 1.15rem var(--font-display); margin: 0; }
.tx-sec-reset { font-size: 12px; color: var(--muted); }
.tx-fields { display: grid; gap: 14px; }
.tx, .tx-list { min-width: 0; padding-left: 12px; border-left: 2px solid transparent; }
.tx.is-changed, .tx-list.is-changed { border-left-color: #1f4f7a; }
.tx textarea, .tx input, .tx-f textarea, .tx-f input { width: 100%; }
.tx textarea, .tx-f textarea { resize: none; min-height: 44px; overflow: hidden; line-height: 1.45; }
.tx-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tx-revert { background: none; border: 0; padding: 0; font: 500 12px var(--font-body); letter-spacing: 0; text-transform: none; color: #1f4f7a; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.tx-show { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; color: var(--ink); cursor: pointer; padding-left: 14px; }
.tx-show input { width: 16px; height: 16px; accent-color: var(--ink); }
.tx-list { display: grid; gap: 10px; }
.tx-list > .tx-label { margin-bottom: 0; }
.tx-item { background: var(--paper-2); padding: 12px 14px 14px; display: grid; gap: 10px; }
.tx-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tx-item-head b { font: 500 13px var(--font-body); color: var(--ink-2); }
.tx-item-tools { display: flex; gap: 4px; }
.tx-item-fields { display: grid; gap: 10px; }
.tx-item-fields.is-row { grid-template-columns: minmax(120px, 1fr) 2fr; }
.tx-f { display: flex; flex-direction: column; gap: 5px; font: 500 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.tx-f input, .tx-f textarea { letter-spacing: 0; text-transform: none; }
.tx-add { justify-self: start; padding: 9px 14px !important; font-size: 13px !important; }
.tx-dirty { color: #a1541b; }
.wt-btn[data-armed="1"] { width: auto; padding: 0 8px; border-radius: 15px; background: var(--red); color: #fff; border-color: var(--red); font-size: 11px; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Så funkar det */
.staff-how { margin-top: clamp(64px, 8vw, 112px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.how-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(28px, 4vw, 48px); }
.how-cols b { display: block; font: 300 3.5rem/1 var(--font-display); color: var(--paper-2); -webkit-text-stroke: 1px var(--ink-2); }
.how-cols h3 { font: 400 1.4rem var(--font-display); margin: 14px 0 10px; }
.how-cols p { margin: 0; font-size: 15px; color: var(--ink-2); }
.how-cols em { font-style: normal; color: var(--ink); font-weight: 500; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 80; max-width: min(560px, calc(100% - 32px));
  background: var(--ink); color: var(--paper); padding: 14px 20px; font-size: 14px; line-height: 1.45; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .staff-grid { grid-template-columns: 1fr; }
  .staff-side { position: static; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .req { grid-template-columns: 1fr; }
  .req-actions { grid-template-columns: 1fr 1fr; }
  .bk-row { grid-template-columns: 110px minmax(0, 1fr) 90px; }
  .bk-tags { grid-column: 1 / -1; justify-content: flex-start; }
  .wt-head { display: none; }
  .wt-top { grid-template-columns: 44px 1fr 1fr; align-items: start; }
  .wt-on { grid-area: 1 / 1; margin-top: 22px; }
  .wt-f-name { grid-area: 1 / 2 / 2 / 4; }
  .wt-f-days { grid-area: 2 / 2 / 3 / 4; }
  .wt-f-start { grid-area: 3 / 2; }
  .wt-f-price { grid-area: 3 / 3; }
  .wt-f-end { grid-area: 4 / 2 / 5 / 4; }
  .wt-tools { grid-area: 5 / 2 / 6 / 4; justify-content: flex-start; }
  .wt-bottom { padding-left: 0; }
  .wt-lbl { display: block; }
}
@media (max-width: 900px) {
  .staff-page { padding-top: 104px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-btn { grid-column: 1 / -1; }
  .how-cols { grid-template-columns: 1fr; }
  .bk-details dl { grid-template-columns: 1fr 1fr; }
  .staff-settings .section-head { grid-template-columns: 1fr; }
  .set-card { padding: 20px 16px 22px; }
  .set-row-2, .set-row-3 { grid-template-columns: 1fr 1fr; }
  .set-span2 { grid-column: 1 / -1; }
  .set-inline { grid-template-columns: 1fr 1fr; }
  .set-inline .grow { grid-column: 1 / -1; }
  .bk-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 8px 14px; padding: 14px 10px; }
  .bk-date { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
  .bk-date span { margin: 0; }
  .login-card { padding: 30px 22px 26px; }
  body.nav-open .staff-user { color: rgba(243, 238, 228, .6); font-family: var(--font-body); font-size: 14px; }
}
@media (max-width: 560px) {
  .bk-log li { grid-template-columns: 1fr; gap: 0; }
  .set-row-2, .set-row-3 { grid-template-columns: 1fr; }
  .set-span2 { grid-column: auto; }
  .set-tab { padding: 10px 12px; font-size: 13px; }
  .tx-sec { padding: 14px 12px 16px; }
  .tx-item-fields.is-row { grid-template-columns: 1fr; }
  .wt-top { grid-template-columns: 44px 1fr; }
  .wt-f-name { grid-area: 1 / 2 / 2 / 3; }
  .wt-f-days { grid-area: 2 / 2 / 3 / 3; }
  .wt-f-start { grid-area: 3 / 2 / 4 / 3; }
  .wt-f-price { grid-area: 4 / 2 / 5 / 3; }
  .wt-f-end { grid-area: 5 / 2 / 6 / 3; }
  .wt-tools { grid-area: 6 / 2 / 7 / 3; }
}

/* Utskrift: bara bokningslistan */
@media print {
  .site-header, footer, .staff-side, .staff-settings, .staff-how, .staff-tools, .staff-notice, .toast, .bk-actions, .bk-more, .curtain, .kpis, .page-lede, .hist-chips { display: none !important; }
  .staff-page { padding-top: 0; }
  .staff-grid { display: block; }
  .bk-row { break-inside: avoid; padding: 8px 6px; }
  .bk-details { display: block !important; }
  .bk-details[hidden] { display: none !important; }
  .bk-week { break-after: avoid; }
}
