@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/roboto-latin-ext-variable.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/roboto-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --navy: #071d2b;
  --navy-soft: #0d2b3f;
  --ink: #102433;
  --muted: #70808c;
  --surface: #fbfaf8;
  --canvas: #f3f0e9;
  --line: #dcd9d1;
  --line-strong: #bdc7cc;
  --gold: #c6a15b;
  --gold-soft: #f4ead6;
  --blue: #224b66;
  --green: #2f7159;
  --green-soft: #e9f2ed;
  --red: #a64a42;
  --red-soft: #f8e9e6;
  --shadow: 0 12px 34px rgba(24, 39, 48, .07);
  font-family: Roboto, Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 18px 22px; color: #eef3f5; background: var(--navy); }
.brand { width: 132px; height: 132px; display: grid; place-items: center; margin: 0 auto 24px; }
.brand img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.sidebar-kicker { margin: 0 24px 26px; color: var(--gold); font-size: .68rem; font-weight: 750; letter-spacing: .2em; }
.main-nav { display: grid; gap: 6px; }
.nav-item { position: relative; width: 100%; min-height: 48px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid transparent; border-radius: 0; color: #b8c4ca; background: transparent; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-item::before { content: ""; position: absolute; inset: 7px auto 7px 0; width: 3px; background: transparent; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-item.is-active { color: #fff; border-color: rgba(113, 151, 173, .38); background: rgba(29, 67, 91, .38); }
.nav-item.is-active::before { background: var(--gold); }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { font-size: .83rem; font-weight: 620; }
.nav-item b, .nav-item i { min-width: 22px; padding: 3px 5px; color: #dce7eb; background: rgba(255,255,255,.08); font-size: .62rem; font-style: normal; text-align: center; }
.sidebar-bottom { display: grid; gap: 18px; margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.prototype-stamp { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.prototype-stamp > span { width: 8px; height: 8px; background: var(--gold); }
.prototype-stamp b, .prototype-stamp small, .profile-card b, .profile-card small { display: block; }
.prototype-stamp b { font-size: .73rem; }
.prototype-stamp small { margin-top: 2px; color: #82939d; font-size: .65rem; }
.profile-card { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 12px 10px 0; }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: #123b54; font-weight: 700; }
.profile-card b { font-size: .78rem; }
.profile-card small { margin-top: 4px; color: #83949d; font-size: .65rem; }
.profile-card button { border: 0; color: #82939d; background: transparent; cursor: pointer; }

.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(251,250,248,.96); backdrop-filter: blur(16px); }
.page-ident span { color: var(--blue); font-size: .69rem; font-weight: 750; letter-spacing: .18em; }
.page-ident b { font-weight: inherit; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.sync-state { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.sync-state > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync-state b, .sync-state small { display: block; }
.sync-state b { color: #425966; font-size: .7rem; font-weight: 650; }
.sync-state small { margin-top: 2px; font-size: .62rem; }
.menu-button { display: none; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); background: transparent; }
.menu-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 0; font-size: .75rem; font-weight: 680; cursor: pointer; transition: .18s ease; }
.button-primary { border: 1px solid var(--navy); color: #fff; background: var(--navy); }
.button-primary:hover { background: #12394f; }
.button-outline { border: 1px solid var(--blue); color: var(--ink); background: transparent; }
.button-outline:hover { color: #fff; background: var(--blue); }
.button-quiet { border: 1px solid var(--line); color: #546773; background: #fff; }
.button-danger { border: 1px solid var(--red); color: #fff; background: var(--red); }
.button-danger:hover { background: #873b35; }
.button-clock { border: 1px solid var(--green); color: #fff; background: var(--green); }
.button-clock:hover { background: #245b47; }
.button-danger-outline { border: 1px solid var(--red); color: var(--red); background: #fff; }
.button-danger-outline:hover { color: #fff; background: var(--red); }
.button.full { width: 100%; }
.text-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: .69rem; font-weight: 680; cursor: pointer; }
.text-button span { margin-left: 5px; }

.content { min-height: calc(100vh - 82px); padding: 36px 42px 56px; }
.view { max-width: 1500px; margin: 0 auto; }
.view[hidden] { display: none; }
.view-heading { min-height: 130px; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.view-heading.compact { min-height: 112px; align-items: center; }
.eyebrow { display: block; color: var(--blue); font-size: .67rem; font-weight: 780; letter-spacing: .2em; }
h1, h2, p { margin-top: 0; }
h1 { margin: 15px 0 10px; font-size: clamp(2rem, 4vw, 3.45rem); font-weight: 390; letter-spacing: -.045em; line-height: .98; }
.view-heading.compact h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
.view-heading p { margin-bottom: 0; color: var(--muted); font-size: .85rem; }
.date-card { min-width: 132px; padding: 12px 0 12px 18px; border-left: 2px solid var(--gold); text-align: left; }
.date-card span, .date-card b, .date-card small { display: block; }
.date-card span { color: var(--muted); font-size: .58rem; font-weight: 750; letter-spacing: .18em; }
.date-card b { margin: 6px 0 3px; font-size: .83rem; }
.date-card small { color: #92a0a8; font-size: .65rem; }
.example-chip, .live-chip { padding: 10px 13px; border: 1px solid var(--line-strong); color: var(--muted); font-size: .62rem; font-weight: 750; letter-spacing: .12em; }
.live-chip i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 144px; padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 5px 18px rgba(24,39,48,.025); }
.stat-card.is-alert { border-top: 3px solid var(--gold); padding-top: 20px; }
.stat-label { display: block; color: var(--blue); font-size: .62rem; font-weight: 760; letter-spacing: .15em; }
.stat-card > div { display: flex; align-items: baseline; gap: 8px; margin: 17px 0 11px; }
.stat-card b { font-size: 2rem; font-weight: 450; letter-spacing: -.04em; }
.stat-card i { color: var(--muted); font-size: .68rem; font-style: normal; }
.stat-card small { color: #84919a; font-size: .65rem; }

.dashboard-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr); gap: 18px; }
.dashboard-grid > *, .schedule-card, .table-wrap { min-width: 0; }
.schedule-card { overflow: hidden; }
.dashboard-side { display: grid; align-content: start; gap: 18px; }
.card { border: 1px solid var(--line); background: var(--surface); box-shadow: 0 6px 22px rgba(24,39,48,.035); }
.card-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 6px 0 0; font-size: 1.18rem; font-weight: 520; letter-spacing: -.02em; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.week-day { min-height: 72px; display: grid; place-items: center; align-content: center; gap: 7px; border-right: 1px solid var(--line); color: var(--muted); }
.week-day:last-child { border-right: 0; }
.week-day span { font-size: .59rem; font-weight: 730; letter-spacing: .1em; }
.week-day b { width: 28px; height: 28px; display: grid; place-items: center; font-size: .73rem; font-weight: 650; }
.week-day i { font-size: .56rem; font-style: normal; }
.week-day.is-today { color: var(--navy); background: var(--gold-soft); }
.week-day.is-today b { color: #fff; background: var(--navy); }

.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap.large { min-height: 390px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 15px 18px; color: #71818b; background: #f5f3ee; font-size: .59rem; font-weight: 750; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
td { padding: 17px 18px; border-top: 1px solid #e5e2dc; color: #314957; font-size: .72rem; }
tbody tr:hover { background: #f9f7f2; }
.clickable-row { cursor: pointer; }
.clickable-row:hover .job-title { color: var(--blue); }
.job-title { display: block; color: var(--ink); font-weight: 680; }
.job-sub { display: block; margin-top: 4px; color: #87949c; font-size: .61rem; }
.color-coded-row { box-shadow: inset 4px 0 var(--shift-color, var(--blue)); }
.color-title { display: inline-flex; align-items: center; gap: 8px; }
.color-title i { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--shift-color, var(--blue)); }
.person-inline { display: inline-flex; align-items: center; gap: 8px; }
.mini-avatar { width: 28px; height: 28px; display: inline-grid; place-items: center; color: #fff; background: var(--blue); font-size: .56rem; font-weight: 740; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line-strong); color: #526773; background: #fff; font-size: .59rem; font-weight: 680; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #788b95; }
.status-pill.confirmed::before, .status-pill.done::before { background: var(--green); }
.status-pill.in_progress { border-color: #d7bd87; background: #fbf5e8; }
.status-pill.in_progress::before { background: var(--gold); }
.status-pill.new { border-color: #d9aba6; background: var(--red-soft); }
.status-pill.new::before { background: var(--red); }
.checklist-badge { display: inline-block; padding: 6px 8px; border: 1px solid #d7bd87; color: #725b2f; background: #fbf5e8; font-size: .59rem; font-weight: 700; }
.checklist-badge.complete { border-color: #9fc1ae; color: var(--green); background: var(--green-soft); }
.checklist-badge.empty { border-color: var(--line); color: var(--muted); background: #fff; }
.status-stack { display: inline-grid; gap: 5px; justify-items: start; }
.assignment-cell { min-width: 150px; display: grid; gap: 6px; }
.assignment-cell select { width: 100%; padding: 0 8px; color: var(--ink); font-weight: 680; }
.assignment-state { color: var(--muted); font-size: .54rem; font-weight: 700; letter-spacing: .04em; }
.assignment-state.complete { color: var(--green); }
.assignment-state.started { color: #8a6420; }
.assignment-state.attention { color: var(--red); }
.approval-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid currentColor; font-size: .57rem; font-weight: 760; white-space: nowrap; }
.approval-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.approval-pill.accepted { color: var(--green); background: var(--green-soft); }
.approval-pill.pending, .approval-pill.declined { color: var(--red); background: var(--red-soft); }
.empty-row td { padding: 56px 20px; color: var(--muted); text-align: center; }

.attention-card { padding-bottom: 18px; }
.amari-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--navy); font-family: Georgia, serif; font-size: .94rem; }
.amari-mark.large { width: 58px; height: 58px; font-size: 1.35rem; }
.alert-list { display: grid; gap: 0; padding: 0 22px 18px; }
.alert-item { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.alert-index { color: var(--gold); font-size: .66rem; font-weight: 760; }
.alert-item b { display: block; font-size: .74rem; }
.alert-item p { margin: 5px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.5; }
.attention-card .button { width: calc(100% - 44px); margin: 0 22px; }
.staff-preview { padding: 2px 22px 12px; }
.staff-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.staff-row:last-child { border-bottom: 0; }
.staff-row .mini-avatar { width: 34px; height: 34px; }
.staff-row b, .staff-row small { display: block; }
.staff-row b { font-size: .7rem; }
.staff-row small { margin-top: 3px; color: var(--muted); font-size: .6rem; }
.staff-row > span:last-child { color: var(--green); font-size: .59rem; font-weight: 700; }

.management-card { min-height: 510px; }
.toolbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-field { width: min(440px, 100%); min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line-strong); background: #fff; }
.search-field svg { width: 18px; fill: none; stroke: #82919a; stroke-width: 1.7; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .73rem; }
.toolbar select { min-height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--line-strong); border-radius: 0; color: #415864; background: #fff; font-size: .7rem; }
.toolbar-filters { display: flex; align-items: center; gap: 8px; }
.compact-switch button { min-width: 72px; height: 40px; }
.booking-calendar-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.drag-instruction { color: var(--muted); font-size: .64rem; line-height: 1.45; }

.schedule-board-card { min-height: 540px; overflow: hidden; }
.schedule-controlbar { min-height: 70px; display: flex; align-items: center; gap: 22px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.schedule-view-switch { display: flex; border: 1px solid var(--line-strong); }
.schedule-view-switch button { min-width: 78px; height: 38px; padding: 0 13px; border: 0; border-right: 1px solid var(--line-strong); color: var(--muted); background: #fff; font-size: .66rem; font-weight: 720; cursor: pointer; }
.schedule-view-switch button:last-child { border-right: 0; }
.schedule-view-switch button.is-active { color: #fff; background: var(--navy); }
.week-nav { display: grid; grid-template-columns: 38px minmax(160px, auto) 38px; align-items: center; border: 1px solid var(--line-strong); }
.week-nav button { height: 38px; border: 0; background: #f5f3ee; cursor: pointer; font-size: 1.3rem; }
.week-nav strong { padding: 0 15px; font-size: .72rem; text-align: center; }
.month-nav { display: grid; grid-template-columns: 38px minmax(150px, auto) 38px auto; align-items: center; border: 1px solid var(--line-strong); }
.month-nav button { height: 38px; padding: 0 12px; border: 0; border-left: 1px solid var(--line); color: var(--ink); background: #f5f3ee; font-size: .68rem; font-weight: 700; cursor: pointer; }
.month-nav button:first-child { border-left: 0; font-size: 1.3rem; }
.month-nav button:nth-child(3) { font-size: 1.3rem; }
.month-nav strong { padding: 0 15px; font-size: .72rem; text-align: center; }
.schedule-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .67rem; }
.schedule-filter select { min-height: 40px; padding: 0 32px 0 10px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; font-size: .7rem; }
.schedule-legend { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: .65rem; }
.schedule-legend i { width: 8px; height: 8px; background: var(--blue); }
.schedule-board-wrap { overflow-x: auto; padding: 18px; }
.schedule-board { min-width: 1040px; display: grid; grid-template-columns: 150px repeat(7, minmax(125px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.schedule-cell { min-height: 112px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.schedule-cell[data-week-drop-date] { position: relative; transition: background .14s ease, box-shadow .14s ease; }
.schedule-cell[data-week-drop-date].is-drop-target { z-index: 3; background: #e4f3ea; box-shadow: inset 0 0 0 2px var(--green); }
.schedule-cell[data-week-drop-date].is-drop-target::after { position: absolute; z-index: 5; inset: 8px; display: grid; place-items: center; border: 1px dashed var(--green); color: var(--green); background: rgba(255,255,255,.9); content: "SLÄPP FÖR ATT KOPIERA"; font-size: .55rem; font-weight: 800; letter-spacing: .08em; pointer-events: none; }
.schedule-cell.is-today { background: #fcf8ef; }
.schedule-cell.head { min-height: 64px; display: grid; place-items: center; align-content: center; background: #f1efe9; text-align: center; }
.schedule-cell.head.is-today { color: #fff; background: var(--navy); }
.schedule-cell.head.is-today small { color: #d7e1e6; }
.schedule-cell.head b { font-size: .68rem; }
.schedule-cell.head small { margin-top: 4px; color: var(--muted); font-size: .58rem; }
.schedule-cell.person { display: flex; align-items: center; gap: 8px; background: #f8f6f1; }
.schedule-cell.person b { display: block; font-size: .67rem; }
.schedule-cell.person small { display: block; margin-top: 3px; color: var(--muted); font-size: .56rem; }
.schedule-job-shell { position: relative; margin-bottom: 7px; background: #edf2f4; }
.schedule-job-shell.accepted { box-shadow: inset 0 0 0 1px #74a78f; }
.schedule-job-shell.pending, .schedule-job-shell.declined { box-shadow: inset 0 0 0 1px #cf8f88; }
.schedule-job { position: relative; width: 100%; display: grid; gap: 4px; margin: 0; padding: 9px 30px 9px 9px; border: 0; border-left: 4px solid var(--shift-color, var(--blue)); color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.schedule-job[draggable="true"] { cursor: grab; user-select: none; }
.schedule-job[draggable="true"]:active { cursor: grabbing; }
.schedule-job.is-dragging { opacity: .45; transform: scale(.98); }
.schedule-job:hover { background: #dde9ee; }
.schedule-job.in_progress { background: #fbf5e8; }
.schedule-job.done { background: var(--green-soft); }
.schedule-job b { font-size: .65rem; }
.schedule-job span { overflow: hidden; font-size: .62rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.schedule-job small { overflow: hidden; color: var(--muted); font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-job em { position: absolute; bottom: 7px; right: 7px; color: var(--blue); font-size: .54rem; font-style: normal; font-weight: 760; }
.job-option { position: absolute; z-index: 2; top: 2px; right: 3px; width: 26px; height: 24px; border: 0; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 800; cursor: pointer; }
.job-option:hover { color: var(--navy); background: rgba(255,255,255,.72); }
.approval-dot { position: absolute; z-index: 2; top: 9px; right: 28px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); pointer-events: none; }
.schedule-job-shell.accepted .approval-dot { background: var(--green); }
.schedule-summary { min-height: 62px; display: flex; align-items: center; gap: 30px; padding: 12px 18px; border-top: 1px solid var(--line); background: #f5f3ee; }
.schedule-summary span { color: var(--muted); font-size: .64rem; }
.schedule-summary b { margin-right: 4px; color: var(--ink); font-size: .78rem; }
.schedule-mobile { display: none; }
.schedule-toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 32px)); padding: 14px 18px; border-left: 4px solid var(--green); color: #fff; background: var(--navy); box-shadow: 0 16px 40px rgba(7,29,43,.28); font-size: .72rem; font-weight: 700; animation: toast-in .18s ease-out; }
.schedule-toast.warning { border-left-color: var(--gold); }
.schedule-toast.error { border-left-color: var(--red); }
.schedule-toast.working { border-left-color: var(--blue); }
.schedule-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.service-color-legend { min-height: 52px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #f8f6f1; }
.service-color-legend span { display: inline-flex; align-items: center; gap: 7px; color: #526773; font-size: .6rem; font-weight: 670; }
.service-color-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--legend-color); }
.month-calendar-wrap { overflow-x: auto; padding: 18px; }
.month-calendar { min-width: 960px; display: grid; grid-template-columns: repeat(7, minmax(128px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-weekday { min-height: 38px; display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); background: #f1efe9; font-size: .58rem; font-weight: 780; letter-spacing: .1em; }
.calendar-day { min-height: 142px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; transition: background .14s ease, box-shadow .14s ease; }
.calendar-day.is-outside { background: #f8f7f4; }
.calendar-day.is-outside > * { opacity: .58; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--gold); }
.calendar-day.is-drop-target { background: #edf7f2; box-shadow: inset 0 0 0 3px var(--green); }
.calendar-day.is-drop-target.is-outside > * { opacity: 1; }
.calendar-day > header { min-height: 24px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.calendar-day > header span { width: 25px; height: 25px; display: grid; place-items: center; font-size: .65rem; font-weight: 760; }
.calendar-day.is-today > header span { color: #fff; background: var(--navy); }
.calendar-day > header i { min-width: 19px; height: 19px; display: grid; place-items: center; color: var(--muted); background: #f1efe9; font-size: .52rem; font-style: normal; font-weight: 760; }
.calendar-add { width: 23px; height: 23px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 700; cursor: pointer; }
.calendar-add:hover, .calendar-add:focus-visible { border-color: var(--line-strong); color: var(--navy); background: #fff; }
.calendar-day > div { display: grid; gap: 5px; }
.calendar-event { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 5px; padding: 6px 7px; border: 0; border-left: 4px solid var(--event-color); color: var(--ink); background: #f8fafb; background: color-mix(in srgb, var(--event-color) 10%, white); text-align: left; cursor: grab; }
.calendar-event:hover { background: color-mix(in srgb, var(--event-color) 18%, white); }
.calendar-event:active { cursor: grabbing; }
.calendar-event.is-dragging { opacity: .32; }
.calendar-event span { color: var(--event-color); font-size: .51rem; font-weight: 820; }
.calendar-event b { overflow: hidden; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: .5rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.done { opacity: .78; }
.month-calendar-mobile { display: none; }

.employee-grid, .agent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.employee-empty { grid-column: 1 / -1; border: 1px solid var(--line); background: var(--surface); }
.employee-card, .agent-card { min-height: 220px; padding: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 6px 22px rgba(24,39,48,.035); }
.employee-head { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.employee-avatar { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 760; }
.employee-head h2, .agent-card h2 { margin: 0; font-size: 1.04rem; font-weight: 590; }
.employee-head p, .agent-card p { margin: 5px 0 0; color: var(--muted); font-size: .67rem; }
.employee-status-select { min-height: 34px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--green); background: #fff; font-size: .62rem; }
.employee-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.employee-metrics div { padding: 12px; background: #f5f3ee; }
.employee-metrics span, .employee-metrics b { display: block; }
.employee-metrics span { color: var(--muted); font-size: .57rem; font-weight: 710; letter-spacing: .08em; }
.employee-metrics b { margin-top: 7px; font-size: .85rem; }
.employee-remove-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.employee-remove-row .button { min-height: 34px; padding: 0 12px; font-size: .62rem; }
.employee-archive { grid-column: 1 / -1; border: 1px solid var(--line); background: var(--surface); }
.employee-archive summary { display: flex; justify-content: space-between; cursor: pointer; padding: 14px 18px; color: var(--blue); font-size: .72rem; font-weight: 650; }
.employee-archive summary span { color: var(--muted); }
.employee-archive > p { margin: 0; padding: 0 18px 12px; color: var(--muted); font-size: .65rem; }
.employee-archive-list { padding: 0 18px 12px; }
.employee-archive-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .7rem; }
.employee-archive-person small { display: block; margin-top: 3px; color: var(--muted); font-size: .6rem; }
.employee-archive-person .button { min-height: 34px; padding: 0 12px; font-size: .62rem; }
.timeclock { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 14px; border-left: 3px solid var(--line-strong); background: #f5f3ee; }
.timeclock.is-running { border-left-color: var(--green); background: var(--green-soft); }
.timeclock span, .timeclock b, .timeclock small { display: block; }
.timeclock span { color: var(--blue); font-size: .56rem; font-weight: 760; letter-spacing: .1em; }
.timeclock b { margin-top: 5px; font-size: .72rem; }
.timeclock small { margin-top: 4px; color: var(--muted); font-size: .6rem; }
.timeclock .button { flex: 0 0 auto; min-height: 36px; padding-inline: 12px; font-size: .65rem; }

.agent-card { position: relative; overflow: hidden; }
.agent-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--agent-accent); }
.agent-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.agent-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--agent-accent); background: #fff; font-family: Georgia, serif; font-size: 1.1rem; }
.agent-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: .61rem; font-weight: 720; }
.agent-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.agent-card h2 { margin-top: 24px; }
.agent-focus { margin-top: 20px; padding: 13px; border-left: 2px solid var(--agent-accent); background: #f5f3ee; }
.agent-focus span, .agent-focus b { display: block; }
.agent-focus span { color: var(--muted); font-size: .56rem; font-weight: 720; letter-spacing: .1em; }
.agent-focus b { margin-top: 7px; font-size: .69rem; }
.integration-note { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin-top: 18px; padding: 24px; }
.integration-note h2 { margin: 7px 0 5px; font-size: 1.08rem; }
.integration-note p { margin: 0; color: var(--muted); font-size: .69rem; line-height: 1.55; }

.booking-dialog { width: min(690px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px rgba(7,29,43,.25); }
.booking-dialog.compact-dialog { width: min(590px, calc(100vw - 28px)); }
.booking-dialog::backdrop { background: rgba(7,29,43,.58); backdrop-filter: blur(3px); }
.booking-dialog form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.booking-dialog h2 { margin: 7px 0 5px; font-size: 1.6rem; font-weight: 480; }
.booking-dialog header p { margin: 0; color: var(--muted); font-size: .66rem; }
.dialog-close { width: 38px; height: 38px; border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 1.35rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 24px 26px; }
.form-grid label { display: grid; gap: 8px; color: #405663; font-size: .65rem; font-weight: 700; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; font-size: .73rem; }
.form-grid textarea { resize: vertical; }
.color-field { display: grid; gap: 9px; color: #405663; font-size: .65rem; font-weight: 700; }
.color-field > span { color: var(--blue); font-size: .61rem; font-weight: 760; letter-spacing: .14em; }
.color-field > small, .detail-block > small { color: var(--muted); font-size: .59rem; font-weight: 500; line-height: 1.45; }
.color-picker { display: grid; grid-template-columns: repeat(6, minmax(54px, 1fr)); gap: 8px; }
.color-swatch { position: relative; min-width: 0; min-height: 52px; display: grid; justify-items: center; gap: 5px; padding: 6px 4px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.color-swatch span { width: 24px; height: 24px; display: block; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(7,29,43,.12); }
.color-swatch b { overflow: hidden; max-width: 100%; color: var(--muted); font-size: .5rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.color-swatch.is-selected { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.color-swatch.is-selected::after { content: "✓"; position: absolute; top: 3px; right: 5px; color: var(--navy); font-size: .62rem; font-weight: 850; }
.check-field { min-height: 68px; grid-template-columns: 20px 1fr; align-items: center; padding: 12px 14px; border: 1px solid var(--line); background: #f5f3ee; }
.check-field input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green); }
.check-field span, .check-field b, .check-field small { display: block; }
.check-field small { margin-top: 5px; color: var(--muted); font-size: .61rem; font-weight: 500; line-height: 1.45; }
.form-status { min-height: 18px; margin: -8px 26px 12px; color: var(--red); font-size: .67rem; }
.form-status.success { color: var(--green); }
.booking-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px 22px; border-top: 1px solid var(--line); }
.danger-text { color: var(--red); }
.confirm-copy { display: grid; gap: 8px; margin: 24px 26px 16px; padding: 18px; border-left: 3px solid var(--red); background: var(--red-soft); }
.confirm-copy span { color: var(--red); font-size: .59rem; font-weight: 780; letter-spacing: .14em; }
.confirm-copy b { font-size: .78rem; line-height: 1.5; }
.confirm-copy small { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.calendar-drop-copy { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px 16px; align-items: center; margin: 24px 26px 16px; padding: 18px; border-left: 3px solid var(--blue); background: #edf2f4; }
.calendar-drop-copy span { color: var(--blue); font-size: .56rem; font-weight: 790; letter-spacing: .12em; }
.calendar-drop-copy span:nth-of-type(2) { grid-column: 3; }
.calendar-drop-copy b, .calendar-drop-copy strong { font-size: .78rem; line-height: 1.45; }
.calendar-drop-copy b { grid-column: 1; }
.calendar-drop-copy small { grid-column: 1; color: var(--muted); font-size: .62rem; line-height: 1.45; }
.calendar-drop-copy i { grid-column: 2; grid-row: 2 / 4; color: var(--gold); font-size: 1.35rem; font-style: normal; }
.calendar-drop-copy strong { grid-column: 3; grid-row: 2 / 4; }
.calendar-drop-warning { display: grid; gap: 5px; margin: 0 26px 16px; padding: 13px 15px; border-left: 3px solid var(--gold); background: var(--gold-soft); }
.calendar-drop-warning b { font-size: .7rem; }
.calendar-drop-warning span { color: #685b43; font-size: .64rem; line-height: 1.45; }

.shift-dialog { position: fixed; inset: 0 0 0 auto; width: min(720px, 100vw); height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); box-shadow: -24px 0 80px rgba(7,29,43,.2); }
.shift-dialog::backdrop { background: rgba(7,29,43,.52); backdrop-filter: blur(2px); }
.shift-shell { min-height: 100%; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; }
.shift-head { min-height: 116px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 28px 20px; border-bottom: 1px solid var(--line); }
.shift-head h2 { margin: 8px 0 7px; font-size: clamp(1.35rem, 4vw, 1.85rem); font-weight: 480; letter-spacing: -.03em; }
.shift-head p { margin: 0; color: var(--muted); font-size: .75rem; }
.shift-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.shift-head-actions .button { min-height: 38px; padding-inline: 12px; font-size: .65rem; }
.shift-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #fff; }
.shift-tabs button { min-height: 52px; border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 700; cursor: pointer; }
.shift-tabs button:last-child { border-right: 0; }
.shift-tabs button.is-active { border-bottom-color: var(--gold); color: var(--navy); background: #fbfaf8; }
.shift-tabs span { margin-left: 6px; padding: 3px 6px; color: var(--blue); background: #edf2f4; font-size: .58rem; }
.shift-body { overflow-y: auto; }
.shift-panel { padding: 26px 28px 34px; }
.shift-panel[hidden] { display: none; }
.shift-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.detail-block { min-height: 94px; display: grid; align-content: center; gap: 9px; padding: 15px 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.detail-block.span-2 { grid-column: 1 / -1; }
.detail-block > span { color: var(--blue); font-size: .61rem; font-weight: 760; letter-spacing: .14em; }
.detail-block > b { font-size: .78rem; line-height: 1.45; }
.detail-block select { width: 100%; min-height: 41px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; font-size: .73rem; }
.shift-assignee-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.shift-assignee-actions .button { min-height: 41px; padding-inline: 12px; font-size: .66rem; }
.approval-block > div { display: flex; align-items: center; gap: 10px; }
.approval-block select { flex: 1; }
.shift-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.shift-tags span { padding: 7px 9px; color: var(--blue); background: #edf2f4; font-size: .61rem; font-weight: 720; }
.safety-note { padding: 18px; border-left: 3px solid var(--gold); background: var(--gold-soft); }
.safety-note strong { display: block; margin-bottom: 7px; font-size: .76rem; }
.safety-note p { margin: 0; color: #5e5543; font-size: .72rem; line-height: 1.65; }
.shift-report-card { display: grid; gap: 8px; margin: 18px 0; padding: 17px 18px; border-left: 3px solid var(--line-strong); background: #f5f3ee; }
.shift-report-card > span { color: var(--blue); font-size: .57rem; font-weight: 790; letter-spacing: .12em; }
.shift-report-card > b { font-size: .79rem; }
.shift-report-card p { margin: 0; color: var(--muted); font-size: .67rem; line-height: 1.55; white-space: pre-wrap; }
.shift-report-card > div { display: grid; gap: 5px; margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.shift-report-card strong { color: var(--blue); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.shift-report-card.attention { border-left-color: var(--red); background: var(--red-soft); }
.shift-report-card.started { border-left-color: var(--gold); background: var(--gold-soft); }
.shift-report-card.complete { border-left-color: var(--green); background: var(--green-soft); }
.task-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.task-progress-head h3 { margin: 7px 0 0; font-size: 1.2rem; font-weight: 530; }
.task-progress-head > strong { color: var(--green); font-size: 1.55rem; font-weight: 480; }
.task-progress { height: 7px; margin: 15px 0 24px; overflow: hidden; background: #e5e2dc; }
.task-progress span { display: block; width: 0; height: 100%; background: var(--green); transition: width .25s ease; }
.checklist-source { display: grid; gap: 5px; margin: -4px 0 18px; padding: 13px 14px; border-left: 3px solid var(--green); background: var(--green-soft); }
.checklist-source[hidden] { display: none; }
.checklist-source span { color: var(--green); font-size: .56rem; font-weight: 780; letter-spacing: .14em; }
.checklist-source b { font-size: .69rem; }
.required-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 18px; padding: 12px 14px; border: 1px solid #d7bd87; color: #635431; background: var(--gold-soft); }
.required-note[hidden] { display: none; }
.required-note b { font-size: .68rem; }
.required-note span { font-size: .61rem; line-height: 1.45; text-align: right; }
.task-groups { display: grid; gap: 18px; }
.task-group { border: 1px solid var(--line); background: #fff; }
.task-group > header { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #f5f3ee; }
.task-group > header span { color: var(--blue); font-size: .63rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.task-group > header b { color: var(--muted); font-size: .64rem; }
.task-row { position: relative; min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px 9px 14px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-toggle { min-width: 0; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 12px; cursor: pointer; }
.task-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.task-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: transparent; background: #fff; font-size: .75rem; }
.task-toggle input:checked + .task-check { border-color: var(--green); color: #fff; background: var(--green); }
.task-copy b, .task-copy small { display: block; }
.task-copy b { font-size: .72rem; line-height: 1.45; }
.task-copy small { margin-top: 4px; color: var(--muted); font-size: .6rem; }
.task-row.is-complete .task-copy b { color: var(--muted); text-decoration: line-through; }
.task-actions { display: flex; align-items: center; gap: 4px; }
.task-actions button { padding: 7px 8px; border: 0; color: var(--blue); background: transparent; font-size: .59rem; font-weight: 700; cursor: pointer; }
.task-actions button:hover { background: #edf2f4; }
.task-actions button.danger { color: var(--red); }
.task-actions button.danger:hover { background: var(--red-soft); }
.add-task-form { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 9px; margin-top: 18px; padding: 14px; border: 1px solid var(--line); background: #f5f3ee; }
.add-task-form input, .add-task-form select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; font-size: .72rem; }
.activity-list { border-top: 1px solid var(--line); }
.activity-row { display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.activity-row > span { width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.activity-row b, .activity-row small { display: block; }
.activity-row b { font-size: .72rem; font-weight: 620; line-height: 1.45; }
.activity-row small { margin-top: 5px; color: var(--muted); font-size: .61rem; }
.empty-panel { padding: 44px 15px; color: var(--muted); text-align: center; font-size: .72rem; }
.shift-footer { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 28px; border-top: 1px solid var(--line); background: #fff; }
.shift-footer > div:first-child span, .shift-footer > div:first-child b { display: block; }
.shift-footer > div:first-child span { color: var(--muted); font-size: .55rem; font-weight: 750; letter-spacing: .12em; }
.shift-footer > div:first-child b { margin-top: 4px; font-size: .66rem; }
.shift-footer > div:last-child { display: flex; gap: 9px; }

/* Säker inloggning och rollbaserade arbetsytor */
[hidden] { display: none !important; }
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 42%) minmax(360px, 1fr); background: var(--surface); }
.login-brand { display: grid; place-items: center; padding: 40px; background: var(--navy); }
.login-brand img { width: min(360px, 72%); filter: brightness(0) invert(1); }
.login-card { width: min(470px, calc(100% - 48px)); align-self: center; justify-self: center; padding: 42px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 12px 0 8px; font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 450; letter-spacing: -.045em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); font-size: .76rem; line-height: 1.65; }
.login-card label, .account-card label { display: grid; gap: 8px; margin-top: 16px; color: var(--blue); font-size: .64rem; font-weight: 760; letter-spacing: .05em; }
.login-card input, .account-card input { min-height: 48px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; font-size: .8rem; }
.login-card .form-status { margin: 12px 0 4px; }
.login-card > small { display: block; margin-top: 16px; color: var(--muted); font-size: .61rem; text-align: center; }
.profile-card { position: relative; }
.profile-card button { margin-left: auto; padding: 5px 0 5px 8px; border: 0; color: #aab8c1; background: transparent; font-size: .55rem; cursor: pointer; }
.profile-card button:hover { color: #fff; }

.employee-account { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); background: #fff; }
.employee-account span, .employee-account b, .employee-account small { display: block; }
.employee-account span { color: var(--blue); font-size: .54rem; font-weight: 780; letter-spacing: .1em; }
.employee-account b { margin-top: 4px; font-size: .72rem; }
.employee-account small { margin-top: 3px; color: var(--muted); font-size: .58rem; }
.employee-account .button { min-height: 34px; padding-inline: 11px; font-size: .61rem; }

.chat-workspace { min-height: 620px; display: grid; grid-template-columns: 280px minmax(0, 1fr); overflow: hidden; }
.conversation-list { border-right: 1px solid var(--line); background: #f5f3ee; }
.conversation { width: 100%; min-height: 78px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; background: transparent; text-align: left; cursor: pointer; }
.conversation.is-active { border-left-color: var(--gold); background: #fff; }
.conversation > span:nth-child(2) { min-width: 0; }
.conversation b, .conversation small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation b { font-size: .7rem; }
.conversation small { margin-top: 5px; color: var(--muted); font-size: .59rem; }
.conversation i { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-size: .55rem; font-style: normal; font-weight: 800; }
.chat-panel { min-width: 0; display: grid; grid-template-rows: auto minmax(340px, 1fr) auto; background: #fff; }
.chat-panel > header, .employee-chat-card > header { min-height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.chat-panel h2, .employee-chat-card h2 { margin: 6px 0 0; font-size: 1.05rem; font-weight: 560; }
.chat-messages { min-height: 320px; max-height: 560px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 22px; background: #f7f5f0; }
.chat-bubble { max-width: min(75%, 520px); padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.chat-bubble.mine { align-self: flex-end; border-color: var(--navy); color: #fff; background: var(--navy); }
.chat-bubble.theirs { align-self: flex-start; }
.chat-bubble p { margin: 0; font-size: .73rem; line-height: 1.55; white-space: pre-wrap; }
.chat-bubble small { display: block; margin-top: 6px; color: var(--muted); font-size: .55rem; }
.chat-bubble.mine small { color: #aebbc3; text-align: right; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { min-height: 44px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; }

.employee-portal { min-height: 100vh; background: var(--canvas); }
.employee-topbar { min-height: 80px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; padding: 10px max(18px, calc((100vw - 1120px) / 2)); color: #fff; background: var(--navy); }
.employee-brand { width: 58px; height: 58px; display: grid; place-items: center; }
.employee-brand img { width: 100%; filter: brightness(0) invert(1); }
.employee-topbar strong { display: block; margin-top: 5px; font-size: .82rem; }
.employee-topbar .eyebrow { color: #c7d3da; }
.employee-topbar .button { color: #fff; border-color: #78909d; }
.employee-content { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 36px 0 64px; }
.employee-hero { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 30px; border: 1px solid var(--line); background: #fff; }
.employee-hero h1 { margin: 10px 0 6px; font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 440; letter-spacing: -.05em; }
.employee-hero p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.employee-clock-summary { min-width: 180px; padding: 18px 20px; border-left: 3px solid var(--green); background: var(--green-soft); }
.employee-clock-summary span, .employee-clock-summary b, .employee-clock-summary small { display: block; }
.employee-clock-summary span { color: var(--green); font-size: .58rem; font-weight: 800; letter-spacing: .12em; }
.employee-clock-summary b { margin-top: 7px; font-size: 1.35rem; }
.employee-clock-summary small { margin-top: 4px; color: var(--muted); font-size: .6rem; }
.employee-tabs { display: flex; gap: 0; margin: 18px 0; border: 1px solid var(--line); background: #fff; }
.employee-tabs button { min-height: 50px; padding: 0 22px; border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 720; cursor: pointer; }
.employee-tabs button.is-active { border-bottom-color: var(--gold); color: var(--navy); }
.employee-tabs b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 5px; border-radius: 50%; color: #fff; background: var(--red); font-size: .52rem; }
.employee-shift-list { display: grid; gap: 14px; }
.employee-list-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 10px 2px; border-bottom: 1px solid var(--line-strong); }
.employee-list-heading.upcoming { margin-top: 24px; }
.employee-list-heading span { color: var(--blue); font-size: .67rem; font-weight: 790; letter-spacing: .12em; text-transform: uppercase; }
.employee-list-heading b { color: var(--muted); font-size: .63rem; }
.employee-shift { border: 1px solid var(--line); background: #fff; box-shadow: 0 6px 22px rgba(24,39,48,.035); }
.employee-shift.is-today { border-top: 4px solid var(--gold); }
.employee-shift.is-active { border-top-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.employee-shift > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.employee-shift > header span:first-child { color: var(--blue); font-size: .58rem; font-weight: 780; letter-spacing: .12em; }
.employee-shift h2 { margin: 7px 0 5px; font-size: 1.2rem; font-weight: 540; }
.employee-shift header p { margin: 0; color: var(--muted); font-size: .68rem; }
.employee-shift-facts { display: grid; grid-template-columns: .7fr 1.55fr .8fr .72fr; border-bottom: 1px solid var(--line); }
.employee-shift-facts div { min-height: 74px; display: grid; align-content: center; gap: 7px; padding: 13px 20px; border-right: 1px solid var(--line); }
.employee-shift-facts div:last-child { border-right: 0; }
.employee-shift-facts span { color: var(--muted); font-size: .55rem; font-weight: 750; letter-spacing: .1em; }
.employee-shift-facts b { font-size: .72rem; line-height: 1.4; }
.employee-shift-note { margin: 0; padding: 13px 20px; color: #5e5543; background: var(--gold-soft); font-size: .67rem; line-height: 1.55; }
.employee-flow { display: grid; grid-template-columns: repeat(3, 1fr); }
.employee-flow-step { min-height: 88px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.employee-flow-step:last-child { border-right: 0; }
.employee-flow-step > span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); font-size: .62rem; }
.employee-flow-step.done > span { border-color: var(--green); color: #fff; background: var(--green); }
.employee-flow-step b, .employee-flow-step small { display: block; }
.employee-flow-step b { font-size: .68rem; }
.employee-flow-step small { margin-top: 4px; color: var(--muted); font-size: .57rem; line-height: 1.35; }
.employee-flow-step button { min-height: 32px; padding: 0 9px; border: 1px solid var(--blue); color: var(--blue); background: #fff; font-size: .59rem; font-weight: 760; cursor: pointer; }
.employee-flow-step em { color: var(--muted); font-size: .58rem; font-style: normal; }
.employee-shift-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 18px; }
.employee-shift-actions .button { min-height: 38px; font-size: .64rem; }
.employee-task-area { margin: 0 18px 18px; border: 1px solid var(--line); }
.employee-checklist-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: #5e5543; background: var(--gold-soft); }
.employee-checklist-head b { font-size: .68rem; }
.employee-checklist-head span { font-size: .61rem; }
.employee-task { min-height: 58px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.employee-task input { position: absolute; opacity: 0; }
.employee-task > span { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: transparent; }
.employee-task input:checked + span { border-color: var(--green); color: #fff; background: var(--green); }
.employee-task b { font-size: .69rem; }
.employee-task small { color: var(--muted); font-size: .57rem; }
.employee-task.is-complete b { color: var(--muted); text-decoration: line-through; }
.text-complete { color: var(--green); }
.text-attention { color: var(--red); }
.employee-report-form { display: grid; gap: 13px; padding: 18px; border-top: 1px solid var(--line-strong); background: #fbfaf8; }
.employee-report-form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.employee-report-form header span, .employee-report-form header b { display: block; }
.employee-report-form header span { color: var(--blue); font-size: .55rem; font-weight: 790; letter-spacing: .12em; }
.employee-report-form header b { margin-top: 5px; font-size: .76rem; }
.employee-report-form header em { padding: 6px 8px; color: var(--green); background: var(--green-soft); font-size: .57rem; font-style: normal; font-weight: 720; }
.employee-report-form label { display: grid; gap: 7px; color: #405663; font-size: .62rem; font-weight: 720; }
.employee-report-form textarea { width: 100%; min-height: 84px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: #fff; font: inherit; font-size: .7rem; line-height: 1.5; }
.employee-report-form label:nth-of-type(2) textarea { min-height: 68px; }
.employee-report-status { margin: 0; color: var(--muted); font-size: .61rem; line-height: 1.5; }
.employee-report-form .button { justify-self: end; }
.employee-chat-card { overflow: hidden; }
.employee-chat-card .chat-messages { min-height: 460px; }
.account-card { max-width: 620px; padding: 28px; }
.account-card h2 { margin: 8px 0; font-size: 1.5rem; font-weight: 500; }
.account-card > p { color: var(--muted); font-size: .7rem; line-height: 1.6; }
.account-card .form-status { margin: 12px 0; }
.account-card .button { margin-top: 12px; }
.employee-no-shift { border: 1px solid var(--line); background: #fff; }
.start-code-box { display: grid; gap: 7px; margin: 24px 26px 16px; padding: 20px; border-left: 3px solid var(--green); background: var(--green-soft); }
.start-code-box span { margin-top: 7px; color: var(--green); font-size: .56rem; font-weight: 780; letter-spacing: .12em; }
.start-code-box b { font-size: .86rem; }
.start-code-box strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; letter-spacing: .04em; }
.start-code-box small { margin-top: 9px; color: var(--muted); font-size: .61rem; line-height: 1.45; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 210px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { width: 112px; height: 112px; }
  .topbar, .content { padding-inline: 26px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-side { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: min(286px, 86vw); padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 18px 0 50px rgba(7,29,43,.22); }
  body.menu-open .sidebar { transform: translateX(0); }
  body.menu-open::after { content: ""; position: fixed; z-index: 40; inset: 0; background: rgba(7,29,43,.35); }
  .brand { width: 94px; height: 94px; margin-bottom: 16px; }
  .topbar { height: calc(68px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; }
  .menu-button { display: grid; }
  .page-ident { display: none; }
  .topbar-actions { margin-left: auto; gap: 10px; }
  .sync-state { display: none; }
  .button { min-height: 44px; padding-inline: 13px; }
  .content { min-height: calc(100vh - 68px); padding: 20px 12px max(48px, calc(28px + env(safe-area-inset-bottom))); }
  .view-heading, .view-heading.compact { min-height: 108px; }
  .view-heading p { max-width: 260px; }
  .date-card, .desktop-action, .example-chip, .live-chip { display: none; }
  h1 { font-size: clamp(2rem, 10vw, 2.45rem); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .stat-card { min-height: 126px; padding: 17px 15px; }
  .stat-card.is-alert { padding-top: 15px; }
  .stat-card b { font-size: 1.65rem; }
  .stat-card small { line-height: 1.35; }
  .dashboard-side { grid-template-columns: 1fr; }
  .schedule-card .card-header { align-items: flex-start; }
  .card-header { padding-inline: 16px; }
  .week-day { min-height: 64px; }
  .week-day i { display: none; }
  .table-wrap, .table-wrap.large { min-height: 0; overflow: visible; }
  table, tbody { width: 100%; display: block; white-space: normal; }
  thead { display: none; }
  tbody { padding: 10px; }
  tbody tr { position: relative; display: block; margin-bottom: 10px; border: 1px solid var(--line); background: #fff; box-shadow: inset 4px 0 var(--shift-color, var(--line-strong)); }
  tbody tr:last-child { margin-bottom: 0; }
  tbody tr:hover { background: #fff; }
  td { min-height: 46px; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line); font-size: .76rem; white-space: normal; }
  td:first-child { border-top: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .56rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
  .empty-row { box-shadow: none; }
  .empty-row td { display: block; padding: 34px 16px; border: 0; text-align: center; }
  .empty-row td::before { display: none; }
  .assignment-cell { min-width: 0; }
  .assignment-cell select, .booking-status-select { width: 100%; min-height: 44px; font-size: 16px; }
  .person-inline { white-space: normal; }
  .employee-grid, .agent-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
  .toolbar-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-filters .compact-switch { grid-column: 1 / -1; }
  .toolbar input, .toolbar select { min-height: 46px; font-size: 16px; }
  .schedule-controlbar { align-items: stretch; flex-direction: column; }
  .schedule-view-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .schedule-view-switch button { min-height: 44px; border-right: 1px solid var(--line-strong); font-size: .72rem; }
  .week-nav { grid-template-columns: 38px 1fr 38px; }
  .month-nav { grid-template-columns: 44px minmax(0, 1fr) 44px auto; }
  .month-nav button { min-height: 44px; padding-inline: 10px; }
  .month-nav strong { min-width: 0; padding-inline: 8px; font-size: .68rem; }
  .booking-calendar-toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
  .booking-calendar-toolbar .month-nav { width: 100%; }
  .drag-instruction { display: none; }
  .schedule-filter { justify-content: space-between; }
  .schedule-filter select { flex: 1; }
  .schedule-legend { margin-left: 0; }
  .schedule-summary { align-items: flex-start; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
  .search-field { max-width: none; }
  .schedule-board-wrap { display: none; }
  .schedule-mobile { display: grid; gap: 16px; padding: 12px; }
  .mobile-day { overflow: hidden; border: 1px solid var(--line); background: #fff; }
  .mobile-day > header { min-height: 50px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #f5f3ee; }
  .mobile-day.is-today > header { color: #fff; background: var(--navy); }
  .mobile-day > header span { font-size: .58rem; font-weight: 800; letter-spacing: .1em; }
  .mobile-day > header b { font-size: .74rem; }
  .mobile-day > header i { color: var(--muted); font-size: .58rem; font-style: normal; }
  .mobile-day.is-today > header i { color: #ccd7dd; }
  .mobile-shift-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--line); border-left: 5px solid var(--shift-color, var(--blue)); }
  .mobile-day > .mobile-shift-card:first-of-type { border-top: 0; }
  .mobile-shift-main { min-width: 0; display: grid; gap: 5px; padding: 14px 12px; border: 0; background: #fff; text-align: left; cursor: pointer; }
  .mobile-shift-main span { color: var(--blue); font-size: .62rem; font-weight: 780; }
  .mobile-shift-main b { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-shift-main small, .mobile-shift-main em { color: var(--muted); font-size: .63rem; font-style: normal; line-height: 1.4; }
  .mobile-shift-main em { color: var(--ink); font-weight: 650; }
  .mobile-shift-card > div { min-width: 98px; display: grid; align-content: center; justify-items: end; gap: 6px; padding: 10px; background: #fbfaf8; }
  .mobile-shift-card .status-pill, .mobile-shift-card .approval-pill { font-size: .52rem; }
  .mobile-shift-card .job-option { position: static; width: 36px; height: 32px; }
  .schedule-mobile-empty { border: 1px solid var(--line); background: #fff; }
  .service-color-legend { flex-wrap: nowrap; overflow-x: auto; padding: 11px 12px; scrollbar-width: none; }
  .service-color-legend::-webkit-scrollbar { display: none; }
  .service-color-legend span { flex: 0 0 auto; font-size: .62rem; }
  .month-calendar-wrap { display: none; }
  .month-calendar-mobile { display: grid; gap: 14px; padding: 12px; }
  .calendar-agenda-day { overflow: hidden; border: 1px solid var(--line); background: #fff; }
  .calendar-agenda-day > header { min-height: 48px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #f5f3ee; }
  .calendar-agenda-day.is-today > header { color: #fff; background: var(--navy); }
  .calendar-agenda-day > header span { color: var(--blue); font-size: .57rem; font-weight: 800; letter-spacing: .1em; }
  .calendar-agenda-day.is-today > header span { color: var(--gold); }
  .calendar-agenda-day > header b { font-size: .72rem; }
  .calendar-agenda-day > header i { color: var(--muted); font-size: .57rem; font-style: normal; }
  .calendar-agenda-day.is-today > header i { color: #c9d5db; }
  .calendar-agenda-event { width: 100%; min-height: 72px; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 12px 13px; border: 0; border-bottom: 1px solid var(--line); border-left: 5px solid var(--event-color); background: #fff; text-align: left; cursor: pointer; }
  .calendar-agenda-event:last-child { border-bottom: 0; }
  .calendar-agenda-event span { grid-row: 1 / 3; color: var(--event-color); font-size: .65rem; font-weight: 820; }
  .calendar-agenda-event b { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-agenda-event small { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-empty { border: 1px solid var(--line); background: #fff; }
  .integration-note { grid-template-columns: auto 1fr; }
  .integration-note .button { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; padding: 18px 16px; }
  .form-grid .span-2 { grid-column: auto; }
  .form-grid input, .form-grid select, .form-grid textarea, .login-card input, .account-card input, .chat-form input, .employee-report-form textarea, .detail-block select, .add-task-form input, .add-task-form select { font-size: 16px; }
  .booking-dialog, .booking-dialog.compact-dialog { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; }
  .booking-dialog form { min-height: 100dvh; display: flex; flex-direction: column; }
  .booking-dialog form > header { padding: max(20px, env(safe-area-inset-top)) 16px 16px; }
  .booking-dialog footer { position: sticky; bottom: 0; margin-top: auto; padding: 14px 16px max(14px, env(safe-area-inset-bottom)); background: #fff; }
  .calendar-drop-copy { grid-template-columns: 1fr; margin: 18px 16px 14px; }
  .calendar-drop-copy span:nth-of-type(2), .calendar-drop-copy b, .calendar-drop-copy small, .calendar-drop-copy i, .calendar-drop-copy strong { grid-column: 1; grid-row: auto; }
  .calendar-drop-copy i { transform: rotate(90deg); }
  .calendar-drop-warning { margin-inline: 16px; }
  .calendar-drop-actions { display: grid !important; grid-template-columns: 1fr 1fr; }
  .calendar-drop-actions #cancelCalendarDrop { grid-column: 1 / -1; }
  .form-status { margin-inline: 16px; }
  .color-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .color-swatch { min-height: 58px; }
  .shift-dialog { inset: 0; width: 100vw; max-width: none; border-left: 0; }
  .shift-head { padding: max(18px, env(safe-area-inset-top)) 16px 16px; }
  .shift-panel, .shift-footer { padding-inline: 16px; }
  .shift-head { align-items: stretch; flex-direction: column; }
  .shift-head-actions { justify-content: flex-start; }
  .shift-head-actions .dialog-close { flex: 0 0 38px; margin-left: auto; }
  .shift-tabs { position: sticky; z-index: 3; top: 0; background: #fff; }
  .shift-detail-grid { grid-template-columns: 1fr; }
  .detail-block.span-2 { grid-column: auto; }
  .detail-block { min-height: 88px; padding-inline: 14px; border-right: 0; }
  .shift-assignee-actions { grid-template-columns: 1fr; }
  .shift-assignee-actions .button { width: 100%; }
  .shift-footer { align-items: stretch; flex-direction: column; }
  .shift-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .shift-footer > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .task-row { grid-template-columns: 1fr; gap: 4px; }
  .task-actions { justify-content: flex-end; }
  .add-task-form { grid-template-columns: 1fr; }
  .required-note { align-items: flex-start; flex-direction: column; }
  .required-note span { text-align: left; }
  .login-view { min-height: 100vh; min-height: 100dvh; grid-template-columns: 1fr; grid-template-rows: minmax(220px, 34vh) minmax(0, 1fr); grid-template-rows: minmax(220px, 34dvh) minmax(0, 1fr); align-content: stretch; padding: 0; background: #fff; }
  .login-brand { width: 100%; min-height: 0; padding: max(28px, env(safe-area-inset-top)) 24px 24px; }
  .login-brand img { width: min(220px, 54vw); }
  .login-card { width: 100%; max-width: 520px; align-self: start; justify-self: center; padding: 32px 24px max(34px, env(safe-area-inset-bottom)); border: 0; box-shadow: none; }
  .login-card h1 { font-size: clamp(2.25rem, 11vw, 3rem); }
  .chat-workspace { min-height: 640px; grid-template-columns: 1fr; }
  .conversation-list { max-height: 230px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-panel { grid-template-rows: auto minmax(300px, 1fr) auto; }
  .employee-topbar { grid-template-columns: 48px 1fr auto; padding: max(9px, env(safe-area-inset-top)) 14px 9px; }
  .employee-brand { width: 46px; height: 46px; }
  .employee-topbar .button { min-height: 34px; padding-inline: 9px; font-size: .58rem; }
  .employee-content { width: calc(100% - 24px); padding: 18px 0 max(64px, calc(40px + env(safe-area-inset-bottom))); }
  .employee-hero { align-items: stretch; flex-direction: column; padding: 22px 18px; }
  .employee-clock-summary { min-width: 0; }
  .employee-tabs { overflow-x: auto; }
  .employee-tabs button { flex: 0 0 auto; padding-inline: 15px; }
  .employee-shift-facts { grid-template-columns: 1fr 1fr; }
  .employee-shift-facts div { min-height: 62px; border-right: 0; border-bottom: 1px solid var(--line); }
  .employee-shift-facts div:last-child { border-bottom: 0; }
  .employee-flow { grid-template-columns: 1fr; }
  .employee-flow-step { min-height: 76px; border-right: 0; }
  .employee-shift-actions { align-items: stretch; flex-direction: column; }
  .employee-shift-actions .button { width: 100%; }
  .employee-task { grid-template-columns: 24px minmax(0, 1fr); }
  .employee-task small { grid-column: 2; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form .button { width: 100%; }
}

@media (max-width: 420px) {
  .topbar .button-primary { font-size: .68rem; }
  .stat-card { min-height: 134px; }
  .stat-label { min-height: 25px; line-height: 1.25; }
  .stat-card > div { margin-top: 10px; }
  .employee-head { grid-template-columns: 46px 1fr; }
  .employee-status-select { grid-column: 1 / -1; }
  .timeclock { align-items: stretch; flex-direction: column; }
  .timeclock .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Authenticated object library and planning workspace. Geometry is schematic. */
.gym-view { max-width: 1580px; }
.archive-heading { min-height: 150px !important; align-items: flex-start !important; }
.archive-heading p { max-width: 770px; line-height: 1.55; }
.archive-count { flex: 0 0 auto; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line-strong); color: var(--blue); background: #fff; font-size: .62rem; font-weight: 780; letter-spacing: .13em; }
.object-archive-home[hidden], .gym-folder-detail[hidden] { display: none; }
.object-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.object-folder { min-width: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.object-folder:hover, .object-folder:focus-visible { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(24,39,48,.11); }
.object-folder-art { height: clamp(210px, 28vw, 350px); display: block; position: relative; overflow: hidden; background: linear-gradient(145deg, #244657, #071d2b 70%); }
.object-folder-art::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(5,25,36,.66)); content: ""; pointer-events: none; }
.object-folder-art img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .79; }
.object-folder-art img[hidden] { display: none; }
.object-folder-icon { position: absolute; top: 20px; left: 23px; z-index: 1; color: #fff; font-size: 2rem; line-height: 1; transform: rotate(-12deg); }
.object-folder-index { position: absolute; bottom: 20px; left: 23px; z-index: 1; color: #fff; font-size: .65rem; font-weight: 780; letter-spacing: .15em; }
.object-folder-body { min-height: 169px; display: grid; align-content: start; gap: 7px; padding: 19px 23px 21px; }
.object-folder-body small { color: var(--blue); font-size: .61rem; font-weight: 800; letter-spacing: .13em; }
.object-folder-body strong { font-size: clamp(1.4rem, 2.25vw, 2rem); font-weight: 520; letter-spacing: -.035em; }
.object-folder-body > span { color: var(--muted); font-size: .74rem; line-height: 1.55; }
.object-folder-body em { margin-top: 7px; color: var(--blue); font-size: .67rem; font-style: normal; font-weight: 750; }
.object-folder-body em span { font-size: .95rem; }
.object-folder-empty { min-height: 380px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 36px; border-style: dashed; background: #f7f7f4; }
.object-folder-empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 23px; border: 1px solid var(--line-strong); color: var(--blue); background: #fff; font-size: 1.8rem; }
.object-folder-empty h2 { margin: 8px 0 10px; font-size: clamp(1.28rem, 2vw, 1.75rem); font-weight: 520; }
.object-folder-empty p { max-width: 380px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.65; }
.archive-back { margin: 0 0 20px; padding: 8px 0; border: 0; color: var(--blue); background: transparent; font-size: .71rem; font-weight: 750; cursor: pointer; }
.archive-back:hover { text-decoration: underline; }
.gym-heading { min-height: 122px; }
.gym-heading p { max-width: 650px; }
.gym-heading-actions { display: flex; align-items: center; gap: 9px; }
.gym-heading-actions .button { min-height: 34px; padding-inline: 10px; font-size: .59rem; }
.gym-draft-chip { align-self: flex-start; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid #dbc59b; color: #785f32; background: #faf2e2; font-size: .59rem; font-weight: 780; letter-spacing: .11em; white-space: nowrap; }
.gym-draft-chip::before { content: ""; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--gold); }
.gym-load-state { margin: -12px 0 15px; color: var(--muted); font-size: .72rem; }
.gym-load-state[hidden] { display: none; }
.gym-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid var(--line); background: var(--surface); }
.gym-facts > div { min-height: 91px; display: grid; align-content: center; gap: 8px; padding: 17px 22px; border-right: 1px solid var(--line); }
.gym-facts > div:last-child { border-right: 0; }
.gym-facts small { color: var(--blue); font-size: .59rem; font-weight: 780; letter-spacing: .15em; }
.gym-facts strong { font-size: clamp(.9rem, 1.35vw, 1.2rem); font-weight: 580; letter-spacing: -.02em; }
.gym-workspace-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .68fr); gap: 18px; align-items: start; }
.gym-plan-card { min-width: 0; overflow: hidden; }
.gym-card-heading { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.gym-card-heading h2 { margin: 6px 0 5px; font-size: 1.28rem; font-weight: 520; letter-spacing: -.025em; }
.gym-card-heading p { margin: 0; color: var(--muted); font-size: .67rem; line-height: 1.5; }
.gym-control-strip { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.gym-plan-controls { flex: 0 0 auto; display: flex; border: 1px solid var(--line-strong); }
.gym-plan-controls button { min-width: 34px; height: 34px; border: 0; border-right: 1px solid var(--line-strong); background: #fff; font-size: 1.05rem; cursor: pointer; }
.gym-plan-controls button:last-child { border-right: 0; }
.gym-plan-controls #gymZoomReset { min-width: 61px; font-size: .65rem; font-weight: 720; }
.gym-map-viewport { max-height: 690px; overflow: auto; background: #eef0ec; scrollbar-color: #8da6aa #eef0ec; }
.gym-map { width: 100%; min-width: 0; height: auto; display: block; touch-action: none; }
.gym-map.is-dragging { cursor: grabbing; }
.gym-map-zone { cursor: pointer; outline: none; }
.gym-map-zone-face { transition: filter .15s ease, stroke-width .15s ease; }
.gym-map-zone:hover .gym-map-zone-face, .gym-map-zone:focus .gym-map-zone-face { filter: brightness(.96); stroke: #123e51; stroke-width: 4; }
.gym-map-zone:focus-visible .gym-map-marker { stroke: #c6a15b; stroke-width: 4; }
.gym-map-marker-number { font-size: 12px; font-weight: 800; pointer-events: none; }
.gym-map-label { fill: #123849; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 4px; pointer-events: none; }
.gym-map-label.is-long { font-size: 9px; letter-spacing: .45px; }
.gym-map-furniture { pointer-events: none; }
.gym-map-caption { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 17px; border-top: 1px solid var(--line); color: #4f6972; background: #f8f9f6; font-size: .56rem; font-weight: 700; letter-spacing: .07em; }
.gym-zone-order { margin: 0; padding: 11px 16px; border-top: 1px solid var(--line); color: #1e4758; background: #f8f9f6; font-size: .61rem; font-weight: 780; letter-spacing: .13em; }
.gym-zone-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.gym-zone-choice { min-width: 0; min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 0; border-left: 3px solid transparent; background: #fff; text-align: left; cursor: pointer; }
.gym-zone-choice:hover { background: #f5f8f8; }
.gym-zone-choice.is-active { border-left-color: var(--gold); background: #eaf1f1; }
.gym-zone-choice i { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 2px; }
.gym-zone-choice span { min-width: 0; display: grid; gap: 4px; }
.gym-zone-choice strong { font-size: .73rem; line-height: 1.3; overflow-wrap: anywhere; }
.gym-zone-choice small { color: var(--muted); font-size: .61rem; line-height: 1.3; overflow-wrap: anywhere; }
.gym-detail-stack { min-width: 0; display: grid; gap: 18px; }
.gym-detail-card { padding: 24px 24px 22px; border-top: 3px solid var(--gold); }
.gym-detail-card h2 { margin: 9px 0 11px; font-size: 1.7rem; font-weight: 500; letter-spacing: -.03em; }
.gym-detail-card p { margin: 0; color: #526672; font-size: .7rem; line-height: 1.67; }
.gym-detail-divider { height: 1px; margin: 22px 0; background: var(--line); }
.gym-task-list { display: grid; gap: 0; margin: 9px 0 18px; padding: 0; list-style: none; counter-reset: gymTask; }
.gym-task-list li { display: grid; grid-template-columns: 22px 1fr; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); color: #263d49; font-size: .69rem; line-height: 1.5; counter-increment: gymTask; }
.gym-task-list li::before { color: var(--gold); font-size: .65rem; font-weight: 780; content: counter(gymTask, decimal-leading-zero); }
.gym-zone-caution { padding: 11px 13px; border-left: 3px solid var(--gold); color: #685638; background: #f8efdc; font-size: .65rem; line-height: 1.5; }
.gym-brief-card { padding: 22px 24px; }
.gym-brief-card h2 { margin: 9px 0 15px; font-size: 1.17rem; font-weight: 540; }
.gym-brief-card ul { display: grid; gap: 10px; margin: 0; padding-left: 17px; color: #405664; font-size: .67rem; line-height: 1.5; }
.gym-brief-card li::marker { color: var(--gold); }
.gym-brief-card p { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: #6d7b82; font-size: .64rem; line-height: 1.5; }
.gym-gallery-card { margin-top: 18px; }
.gym-gallery-card .gym-card-heading .button { flex: 0 0 auto; }
.gym-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--line); }
.gym-photo-tile { min-width: 0; padding: 0; border: 0; background: #fff; text-align: left; cursor: pointer; }
.gym-photo-tile:hover img { transform: scale(1.04); }
.gym-photo-tile img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #e3e6e4; transition: transform .18s ease; }
.gym-photo-tile > span { display: grid; gap: 5px; min-height: 58px; padding: 11px 12px; }
.gym-photo-tile b { font-size: .68rem; }
.gym-photo-tile small { color: var(--muted); font-size: .58rem; }
.gym-gallery-empty { grid-column: 1 / -1; padding: 25px; color: var(--muted); background: #fff; font-size: .7rem; line-height: 1.6; }
.gym-photo-dialog { width: min(980px, 95vw); max-width: none; max-height: 92dvh; padding: 0; border: 1px solid #82939d; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.4); }
.gym-photo-dialog::backdrop { background: rgba(5, 18, 28, .82); }
.gym-photo-dialog-top { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; }
.gym-photo-dialog-top strong { display: block; margin-top: 5px; font-size: .9rem; }
.gym-photo-dialog-top button { width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; cursor: pointer; }
.gym-photo-dialog img { width: 100%; max-height: calc(92dvh - 120px); display: block; object-fit: contain; background: #132838; }
.gym-photo-dialog-bottom { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; }
.gym-photo-dialog-bottom button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); background: #fff; font-size: .66rem; cursor: pointer; }
.gym-photo-dialog-bottom span { color: var(--muted); font-size: .66rem; }

@media (max-width: 1250px) {
  .gym-workspace-grid { grid-template-columns: 1fr; }
  .gym-detail-stack { grid-template-columns: 1.25fr .75fr; }
}
@media (max-width: 760px) {
  .archive-heading { min-height: auto !important; display: block !important; }
  .archive-heading h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .archive-heading p { font-size: .78rem; }
  .archive-count { display: inline-block; margin: 17px 0 21px; }
  .object-archive-grid { grid-template-columns: 1fr; gap: 14px; }
  .object-folder-art { height: 215px; }
  .object-folder-body { min-height: auto; padding: 19px; }
  .object-folder-empty { min-height: 230px; padding: 25px; }
  .archive-back { margin-bottom: 12px; }
  .gym-heading { min-height: 132px !important; display: block; }
  .gym-heading h1 { font-size: 2.2rem; }
  .gym-heading p { max-width: none; line-height: 1.45; }
  .gym-heading-actions { margin-top: 13px; flex-wrap: wrap; }
  .gym-facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gym-facts > div { min-height: 79px; padding: 13px; border-bottom: 1px solid var(--line); }
  .gym-facts > div:nth-child(2) { border-right: 0; }
  .gym-facts > div:nth-child(n+3) { border-bottom: 0; }
  .gym-facts strong { font-size: .83rem; line-height: 1.3; }
  .gym-card-heading { align-items: flex-start; flex-direction: column; padding: 16px; }
  .gym-control-strip { align-self: stretch; justify-content: flex-start; }
  .gym-zone-list { grid-template-columns: 1fr; }
  .gym-zone-choice { padding: 10px; }
  .gym-zone-choice strong { font-size: .69rem; }
  .gym-map-caption { align-items: flex-start; flex-direction: column; gap: 3px; padding: 9px 10px; font-size: .55rem; line-height: 1.35; }
  .gym-map-label { display: none; }
  .gym-detail-stack { grid-template-columns: 1fr; }
  .gym-detail-card, .gym-brief-card { padding: 19px; }
  .gym-photo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gym-photo-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; border: 0; }
  .gym-photo-dialog img { height: calc(100dvh - 124px); max-height: none; }
  .gym-photo-dialog-top { padding-top: max(12px, env(safe-area-inset-top)); }
  .gym-photo-dialog-bottom { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .gym-zone-list { grid-template-columns: 1fr; }
  .gym-zone-choice { min-height: 57px; }
  .gym-photo-tile > span { min-height: 69px; }
}

/* Driftöversikt v18: bemanning, checklistor och notiser. */
.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card.is-alert { position: relative; overflow: hidden; border-top-color: #b9c7c3; }
.stat-card.is-alert.has-attention { border-color: #dccb9c; border-top: 3px solid #a67c30; background: #fffaf0; box-shadow: 0 9px 30px rgba(166,124,48,.11); }
.stat-card.is-alert.has-attention::after { content: ""; position: absolute; top: -30px; right: -25px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(166,124,48,.13), rgba(166,124,48,0) 70%); pointer-events: none; }
.stat-card.is-alert.has-attention .stat-label, .stat-card.is-alert.has-attention b { color: #79591c; }
.stat-card.is-alert.has-critical { border-color: #dcaeaa; border-top-color: var(--red); background: #fff9f8; box-shadow: 0 9px 30px rgba(166,74,66,.13); }
.stat-card.is-alert.has-critical::after { background: radial-gradient(circle, rgba(166,74,66,.14), rgba(166,74,66,0) 70%); }
.stat-card.is-alert.has-critical .stat-label, .stat-card.is-alert.has-critical b { color: #9d342e; }
.stat-action { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 0; border: 0; color: #9d342e; background: transparent; font-size: .65rem; font-weight: 760; cursor: pointer; }
.stat-action[hidden] { display: none; }
.stat-action:hover, .stat-action:focus-visible { text-decoration: underline; }
.dashboard-top-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr); gap: 18px; margin-bottom: 18px; }
.dashboard-top-row > * { min-width: 0; }
.dashboard-grid { display: block; margin-bottom: 18px; }
.staff-preview { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; padding-top: 9px; }
.staff-row { min-width: 0; }
.staff-row .staff-state { padding: 5px 7px; border: 1px solid #bdd4c5; color: var(--green); background: var(--green-soft); white-space: nowrap; }
.staff-row .staff-state.off, .staff-row .staff-state.sick { border-color: var(--line); color: var(--muted); background: #f5f3ee; }
.staff-row .staff-state.working { border-color: #a8cbd0; color: var(--blue); background: #edf5f5; }
.overview-notice-preview { padding: 8px 16px 13px; }
.notification-anchor { position: relative; }
.notification-trigger { position: relative; min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line-strong); color: var(--navy); background: #fff; font-size: .68rem; font-weight: 730; cursor: pointer; }
.notification-trigger:hover, .notification-trigger[aria-expanded="true"] { border-color: var(--blue); background: #f2f7f8; }
.notification-trigger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.notification-trigger b { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; color: #fff; background: var(--red); font-size: .57rem; }
.notification-trigger b[hidden] { display: none; }
.notification-panel { position: absolute; z-index: 90; top: calc(100% + 10px); right: 0; width: min(410px, calc(100vw - 24px)); max-height: min(620px, 70vh); overflow-y: auto; border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 24px 60px rgba(7,29,43,.22); color: var(--ink); }
.notification-panel[hidden] { display: none; }
.notification-panel > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.notification-panel h2 { margin: 4px 0 0; font-size: 1.12rem; }
.notification-panel header small { color: var(--muted); font-size: .62rem; }
.notification-panel > p { margin: 0; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .6rem; }
.notification-list { padding: 6px 10px; }
.notification-item { width: 100%; min-height: 74px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover, .notification-item:focus-visible { background: #f6f8f8; }
.notification-level { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.notification-level.critical { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.notification-copy { min-width: 0; }
.notification-copy b, .notification-copy small, .notification-copy em { display: block; }
.notification-copy b { font-size: .71rem; }
.notification-copy small { margin-top: 4px; color: var(--muted); font-size: .62rem; line-height: 1.45; }
.notification-copy em { margin-top: 5px; color: var(--blue); font-size: .57rem; font-style: normal; }
.notification-arrow { color: var(--blue); font-size: .95rem; }
.notification-empty { display: grid; gap: 5px; padding: 22px 12px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.notification-empty b { color: var(--green); font-size: .78rem; }
.notification-empty.error { color: var(--red); }
.overview-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fcfbf8; }
.overview-day-heading strong { font-size: .73rem; font-weight: 700; text-transform: capitalize; }
.overview-day-heading span { color: var(--muted); font-size: .6rem; }
.week-day { width: 100%; border: 0; border-right: 1px solid var(--line); background: #fff; cursor: pointer; }
.week-day:hover, .week-day:focus-visible { background: #eef4f5; }
.week-day.is-today { background: var(--gold-soft); }
.week-day.is-selected { box-shadow: inset 0 -3px var(--blue); }
.week-day.is-selected b { color: #fff; background: var(--navy); }
.overview-assignee { display: grid; gap: 6px; }
.pass-detail-link { justify-self: start; padding: 2px 0; border: 0; color: var(--blue); background: transparent; font-size: .59rem; font-weight: 740; cursor: pointer; }
.pass-detail-link:hover, .pass-detail-link:focus-visible { text-decoration: underline; }
.checklist-status { min-width: 124px; display: inline-grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 8px; }
.checklist-symbol { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #d8bd83; color: #8a6828; background: #fbf5e8; font-size: .8rem; font-weight: 800; }
.checklist-status.complete .checklist-symbol { border-color: var(--green); color: #fff; background: var(--green); }
.checklist-status.missing .checklist-symbol { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.checklist-status b, .checklist-status small { display: block; }
.checklist-status b { color: var(--ink); font-size: .65rem; }
.checklist-status small { margin-top: 3px; color: var(--muted); font-size: .53rem; }
.checklist-meter, .checklist-meter > i { height: 3px; display: block; }
.checklist-meter { width: 100%; margin-top: 6px; background: #e4e7e5; }
.checklist-meter > i { background: var(--gold); }
.checklist-status.complete .checklist-meter > i { background: var(--green); }
.overview-history-card { overflow: hidden; }
.overview-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.overview-history-grid > section { min-width: 0; padding: 16px 20px 20px; }
.overview-history-grid > section + section { border-left: 1px solid var(--line); }
.overview-history-grid h3 { margin: 0 0 8px; color: var(--blue); font-size: .64rem; font-weight: 770; letter-spacing: .12em; text-transform: uppercase; }
.overview-history-item { width: 100%; min-height: 72px; position: relative; display: grid; gap: 4px; padding: 11px 25px 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.overview-history-item:hover b { color: var(--blue); }
.overview-history-item span { color: var(--blue); font-size: .57rem; }
.overview-history-item b { color: var(--ink); font-size: .73rem; }
.overview-history-item small { color: var(--muted); font-size: .61rem; }
.overview-history-item i { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); color: var(--blue); font-size: .9rem; font-style: normal; }
.overview-history-empty { margin: 15px 0; color: var(--muted); font-size: .7rem; }
.employee-topbar-actions { display: flex; align-items: center; gap: 9px; }
.employee-topbar .notification-trigger { border-color: #68879a; color: #fff; background: rgba(255,255,255,.08); }
.employee-topbar .notification-trigger:hover { background: rgba(255,255,255,.17); }
.employee-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.employee-clock-summary { min-width: 0; }
.employee-availability { min-width: 170px; display: grid; align-content: center; gap: 8px; padding: 16px 18px; border-left: 3px solid var(--blue); background: #eef3f5; }
.employee-availability > span { color: var(--blue); font-size: .58rem; font-weight: 780; letter-spacing: .12em; }
.employee-availability .button { width: 100%; min-height: 35px; padding: 0 9px; font-size: .63rem; }
.employee-availability .button.is-available { border-color: var(--green); color: var(--green); }
.employee-availability small { color: var(--muted); font-size: .57rem; line-height: 1.4; }
.employee-shift-progress { display: flex; align-items: center; gap: 18px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: #f4f9f6; }
.employee-shift-progress.needs-work { background: #fbf5e8; }
.employee-shift-progress > span { min-width: 165px; }
.employee-shift-progress b, .employee-shift-progress small { display: block; }
.employee-shift-progress b { font-size: .64rem; }
.employee-shift-progress small { margin-top: 3px; color: var(--muted); font-size: .56rem; }
.employee-shift-progress > i { flex: 1; height: 6px; background: #dce3df; }
.employee-shift-progress > i > i { height: 100%; display: block; background: var(--green); }
.employee-shift-progress.needs-work > i > i { background: var(--gold); }
.employee-checklist-head { gap: 12px; padding: 10px 14px; }
.employee-checklist-head small { display: block; margin-top: 4px; color: #74694f; font-size: .56rem; line-height: 1.4; }
.employee-checklist-head > span { flex: 0 0 auto; }
.employee-task { grid-template-columns: 24px 48px minmax(0, 1fr); min-height: 75px; gap: 11px; }
.employee-task > .employee-task-check { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: transparent; }
.employee-task input:checked + .employee-task-check { border-color: var(--green); color: #fff; background: var(--green); }
.employee-task > .task-illustration, .task-toggle > .task-illustration { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #d8e3e5; color: inherit; background: #eef4f5; }
.task-illustration img { width: 33px; height: 33px; object-fit: contain; }
.employee-task > .employee-task-copy { width: auto; height: auto; display: block; border: 0; color: var(--ink); }
.employee-task-copy b, .employee-task-copy small { display: block; }
.employee-task-copy small { margin-top: 5px; }
.employee-task.is-complete .employee-task-copy b { color: var(--muted); text-decoration: line-through; }
.task-toggle { grid-template-columns: 26px 48px minmax(0,1fr); }
.checklist-illustration-note { margin: 12px 0 16px; color: var(--muted); font-size: .63rem; line-height: 1.45; }

@media (max-width: 1120px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card.is-alert { grid-column: 1 / -1; }
  .dashboard-top-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dashboard-top-row { gap: 12px; margin-bottom: 12px; }
  .staff-preview { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card.is-alert { grid-column: 1 / -1; }
  .topbar-actions { gap: 9px; }
  .notification-trigger { width: 44px; justify-content: center; padding: 0; }
  .notification-trigger span { display: none; }
  .notification-trigger b { position: absolute; top: -6px; right: -5px; }
  .notification-panel { right: -80px; }
  .overview-day-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .overview-day-heading span { font-size: .57rem; }
  .overview-history-grid { grid-template-columns: 1fr; }
  .overview-history-grid > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .employee-topbar-actions { gap: 6px; }
  .employee-topbar .notification-panel { right: -64px; }
  .employee-hero-actions { grid-template-columns: 1fr; }
  .employee-availability { min-width: 0; }
  .employee-task { grid-template-columns: 24px 42px minmax(0,1fr); }
  .employee-task > .task-illustration { width: 40px; height: 40px; }
  .employee-task .employee-task-copy small { grid-column: auto; }
  .task-toggle { grid-template-columns: 26px 40px minmax(0,1fr); }
  .task-toggle > .task-illustration { width: 40px; height: 40px; }
}

/* Checklistans egna bildinstruktioner v19. */
.task-row { grid-template-columns: minmax(0, 1fr) minmax(155px, 205px); align-items: start; }
.task-row-main { min-width: 0; }
.task-image-line { margin: 9px 0 0 98px; }
.task-image-empty { display: block; margin: 5px 0 0 98px; color: var(--muted); font-size: .55rem; }
.task-row .task-actions { justify-content: flex-end; flex-wrap: wrap; }
.task-row .task-actions button[data-task-image-upload] { border: 1px solid #abc9d0; color: var(--blue); background: #f0f6f7; }
.task-row .task-actions button[data-task-image-upload]:hover { border-color: var(--blue); background: #e5f0f2; }
.task-image-status { padding: 10px 12px; border-left: 3px solid var(--blue); color: var(--blue); background: #eef4f5; font-size: .64rem; }
.task-image-status:empty { display: none; }
.task-image-file-input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; opacity: 0; pointer-events: none; }
.task-image-preview { max-width: 100%; min-height: 61px; display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border: 1px solid #bdd1d6; color: var(--blue); background: #f2f7f8; text-align: left; font-size: .61rem; font-weight: 720; cursor: zoom-in; }
.task-image-preview:hover, .task-image-preview:focus-visible { border-color: var(--blue); background: #e9f1f4; }
.task-image-preview img { width: 73px; height: 50px; display: block; object-fit: cover; background: #dce8ea; }
.task-image-preview span { display: inline-flex; align-items: center; gap: 5px; }
.task-image-preview i { font-style: normal; font-size: .9rem; }
.employee-task-entry { border-top: 1px solid var(--line); }
.employee-task-entry > .employee-task { border-top: 0; }
.employee-task-entry > .task-image-preview { margin: 0 14px 13px 111px; }
.task-image-dialog { width: min(960px, calc(100vw - 24px)); max-height: 90vh; padding: 0; border: 1px solid var(--line-strong); color: var(--ink); background: #fff; box-shadow: 0 25px 70px rgba(5,22,34,.3); }
.task-image-dialog::backdrop { background: rgba(5,22,34,.7); }
.task-image-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.task-image-dialog h2 { margin: 5px 0 0; font-size: clamp(.9rem, 2.5vw, 1.4rem); font-weight: 610; }
.task-image-dialog > img { width: 100%; max-height: calc(90vh - 140px); display: block; object-fit: contain; background: #edf0ef; }
.task-image-dialog > p { margin: 0; padding: 12px 20px; color: var(--muted); font-size: .63rem; }
@media (max-width: 760px) {
  .task-row { grid-template-columns: 1fr; }
  .task-row .task-actions { justify-content: flex-start; }
  .task-image-line, .task-image-empty { margin-left: 0; }
  .employee-task-entry > .task-image-preview { margin: 0 10px 12px 14px; }
}

/* v20: lokalt Roboto och en tätare, lugnare arbetsyta. */
:root {
  --surface: #fff;
  --canvas: #f5f6f4;
  --line: #e1e5e3;
  --shadow: 0 5px 20px rgba(24, 39, 48, .05);
}
.page-ident span, .eyebrow, .stat-label { letter-spacing: .12em; }
.page-ident span, .eyebrow { font-weight: 700; }
.stat-label { font-weight: 700; }
.amari-mark, .agent-icon { font-family: Roboto, Arial, sans-serif; }
.card, .stat-card, .employee-card, .agent-card { box-shadow: none; }
.button, .text-button { font-weight: 600; }
.job-title { font-weight: 600; }

@media (min-width: 761px) {
  .app-shell { grid-template-columns: 216px minmax(0, 1fr); }
  .sidebar { padding: 21px 14px 18px; }
  .brand { width: 102px; height: 102px; margin-bottom: 14px; }
  .sidebar-kicker { margin: 0 16px 16px; font-size: .62rem; letter-spacing: .15em; }
  .main-nav { gap: 3px; }
  .nav-item { min-height: 42px; gap: 9px; padding-inline: 12px; }
  .nav-item span { font-size: .78rem; font-weight: 600; }
  .sidebar-bottom { gap: 12px; padding-top: 16px; }
  .topbar { height: 64px; padding-inline: 30px; }
  .topbar-actions { gap: 13px; }
  .content { min-height: calc(100vh - 64px); padding: 24px 30px 42px; }
  .view-heading { min-height: 94px; }
  .view-heading.compact { min-height: 80px; }
  h1 { margin: 10px 0 7px; font-size: clamp(1.85rem, 3vw, 2.45rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.06; }
  .view-heading.compact h1 { font-size: clamp(1.8rem, 2.6vw, 2.25rem); }
  .view-heading p { font-size: .79rem; }
  .date-card { padding-block: 8px; }
  .button { min-height: 38px; padding-inline: 14px; }
  .notification-trigger { min-height: 38px; }
  .stat-grid { gap: 12px; margin-bottom: 14px; }
  .stat-card { min-height: 110px; padding: 16px 18px; }
  .stat-card.is-alert { padding-top: 14px; }
  .stat-card > div { margin: 11px 0 6px; }
  .stat-card b { font-size: 1.72rem; font-weight: 500; }
  .dashboard-top-row { gap: 14px; margin-bottom: 14px; }
  .dashboard-grid { margin-bottom: 14px; }
  .card-header { min-height: 62px; padding: 12px 18px; }
  .card-header h2 { margin-top: 4px; font-size: 1.05rem; font-weight: 600; }
  .week-day { min-height: 58px; gap: 4px; }
  .week-day b { width: 26px; height: 26px; }
  .staff-preview { padding: 2px 16px 8px; }
  .staff-row { padding-block: 8px; }
  .overview-notice-preview { padding: 4px 14px 10px; }
  .overview-day-heading { padding: 10px 14px; }
  .overview-history-grid > section { padding: 13px 16px 16px; }
  .overview-history-item { min-height: 62px; padding-block: 8px; }
  th { padding: 11px 14px; }
  td { padding: 12px 14px; }
  .toolbar { min-height: 60px; padding: 10px 14px; }
  .booking-calendar-toolbar { min-height: 56px; padding: 10px 14px; }
  .schedule-controlbar { min-height: 58px; gap: 14px; padding: 9px 14px; }
  .schedule-board-wrap, .month-calendar-wrap { padding: 12px; }
  .schedule-cell { min-height: 96px; padding: 8px; }
  .schedule-cell.head { min-height: 52px; }
  .schedule-job { padding: 8px 30px 8px 8px; }
  .calendar-day { min-height: 124px; }
  .employee-card, .agent-card { min-height: 190px; padding: 18px; }
  .employee-head { padding-bottom: 14px; }
  .employee-metrics { margin-top: 14px; }
  .employee-content { padding: 24px 0 48px; }
  .employee-hero { min-height: 122px; padding: 20px 24px; }
  .employee-hero h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 400; }
  .login-card h1 { font-size: clamp(2rem, 3vw, 2.7rem); font-weight: 400; }
}

@media (max-width: 760px) {
  .topbar { height: calc(64px + env(safe-area-inset-top)); }
  .content { min-height: calc(100vh - 64px); padding-top: 16px; }
  .view-heading, .view-heading.compact { min-height: 92px; }
  h1 { margin: 9px 0 7px; font-size: clamp(1.85rem, 8.5vw, 2.2rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.07; }
  .view-heading p { font-size: .77rem; }
  .stat-grid { gap: 8px; margin-bottom: 12px; }
  .stat-card { min-height: 112px; padding: 14px 13px; }
  .stat-card.is-alert { padding-top: 12px; }
  .stat-card > div { margin: 9px 0 6px; }
  .stat-card b { font-size: 1.55rem; font-weight: 500; }
  .card-header { min-height: 60px; padding: 12px 14px; }
  .card-header h2 { font-size: 1.03rem; font-weight: 600; }
  .week-day { min-height: 58px; }
  .employee-content { padding-top: 16px; }
  .employee-hero h1 { font-weight: 400; }
}

@media (max-width: 420px) {
  .stat-card { min-height: 114px; }
  .stat-label { min-height: 20px; }
}

/* v21: fasta textlinjer och utrymme för riktiga kund- och uppdragsnamn. */
.page-ident, .view-heading > div:first-child, .card-header > div:first-child,
.staff-row > div, .notification-copy, .overview-history-item,
.task-row-main, .task-copy, .detail-block, .employee-shift-facts > div,
.object-folder-body, .gym-card-heading > div:first-child {
  min-width: 0;
}

.card-header { gap: 14px; }
.card-header h2, .staff-row b, .staff-row small,
.notification-copy b, .notification-copy small, .notification-copy em,
.overview-history-item b, .overview-history-item small,
.task-copy b, .task-copy small, .detail-block > b,
.employee-shift-facts b, .object-folder-body strong,
.object-folder-body > span, .gym-detail-card p, .gym-task-list li,
.gym-brief-card li {
  overflow-wrap: anywhere;
}
.card-header h2 { line-height: 1.25; }
.card-header .text-button { flex: 0 0 auto; white-space: nowrap; }
.profile-card { grid-template-columns: 38px minmax(0, 1fr) auto; }
.profile-card b, .profile-card small { overflow-wrap: anywhere; }

.stat-card > small { display: block; line-height: 1.4; overflow-wrap: anywhere; }
.stat-card.is-alert { display: flex; flex-direction: column; align-items: flex-start; }
.stat-card.is-alert > div { width: 100%; flex: 0 0 auto; }
.stat-card.is-alert > small { width: 100%; }
.stat-card.is-alert .stat-action { flex: 0 0 auto; align-self: flex-start; margin-top: 9px; white-space: nowrap; }
.stat-card.is-alert .stat-action[hidden] { display: none; }

.staff-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.staff-row .staff-state { max-width: 100%; }
.employee-head { grid-template-columns: 48px minmax(0, 1fr) auto; }
.employee-head > div { min-width: 0; }
.employee-head h2, .employee-head p { overflow-wrap: anywhere; }
.employee-status-select { max-width: 100%; }
.schedule-legend i { flex: 0 0 8px; }
.search-field { min-width: 0; }
.search-field svg { flex: 0 0 18px; }
.search-field input { min-width: 0; }
.toolbar-filters { min-width: 0; }
.toolbar-filters select { min-width: 0; max-width: 100%; }
.schedule-filter { min-width: 0; }
.schedule-filter select { min-width: 0; max-width: 100%; }
.task-row .task-actions { min-width: 0; }

/* Mellanbredd: verktyg bryts på en ny rad i stället för att skäras av. */
@media (min-width: 761px) and (max-width: 1120px) {
  .topbar { gap: 12px; padding-inline: 20px; }
  .page-ident { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { flex: 0 0 auto; gap: 8px; }
  .sync-state { display: none; }
  .content { padding-inline: 20px; }
  .schedule-controlbar, .booking-calendar-toolbar, .toolbar { flex-wrap: wrap; gap: 10px 14px; }
  .schedule-controlbar > *, .booking-calendar-toolbar > * { flex-shrink: 0; }
  .schedule-legend, .booking-calendar-toolbar .drag-instruction { flex-basis: 100%; margin-left: 0; }
  .schedule-filter { flex: 1 1 170px; }
  .schedule-filter select { flex: 1; }
  .staff-preview { grid-template-columns: 1fr; }
  .toolbar .search-field { flex: 1 1 230px; width: auto; }
  .toolbar-filters { flex-wrap: wrap; }

  /* Sexkolumnslistan visas som två tydliga fältkolumner när sidomenyn tar plats. */
  #bookingListView { overflow-x: visible; }
  #bookingListView table, #bookingListView tbody { display: block; width: 100%; white-space: normal; }
  #bookingListView thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #bookingListView tbody { padding: 12px; }
  #bookingListView tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; border: 1px solid var(--line); background: #fff; }
  #bookingListView tr:last-child { margin-bottom: 0; }
  #bookingListView td { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }
  #bookingListView td:nth-child(-n+2) { border-top: 0; }
  #bookingListView td:nth-child(odd) { border-right: 1px solid var(--line); }
  #bookingListView td::before { content: attr(data-label); color: var(--muted); font-size: .56rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  #bookingListView td > * { min-width: 0; max-width: 100%; }
  #bookingListView .assignment-cell { min-width: 0; }
  #bookingListView .assignment-cell select, #bookingListView .booking-status-select { min-width: 0; max-width: 100%; }
  #bookingListView .empty-row { grid-template-columns: 1fr; }
  #bookingListView .empty-row td { display: block; border: 0; text-align: center; }
  #bookingListView .empty-row td::before { display: none; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .employee-grid { grid-template-columns: 1fr; }
  #bookingListView tr { grid-template-columns: 1fr; }
  #bookingListView td:nth-child(2) { border-top: 1px solid var(--line); }
  #bookingListView td:nth-child(odd) { border-right: 0; }
}

@media (max-width: 760px) {
  .view[data-view-panel="employees"] .view-heading.compact { align-items: stretch; flex-direction: column; gap: 12px; padding-bottom: 12px; }
  #addEmployeeButton { align-self: flex-start; }
  .card-header { gap: 8px; align-items: flex-start; }
  .card-header .text-button { align-self: flex-start; }
  .stat-card.is-alert { min-height: 0; }
  .toolbar-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  td { min-width: 0; overflow-wrap: anywhere; }
  td > *, .assignment-cell { min-width: 0; }
  .mobile-shift-card > div { min-width: 0; }
  .calendar-agenda-event { grid-template-columns: minmax(66px, 76px) minmax(0, 1fr); }
  .employee-task-copy, .employee-task-copy b, .employee-task-copy small { min-width: 0; overflow-wrap: anywhere; }
}

/* Schema: compact planning controls and calm, readable shift cards. */
.view[data-view-panel="schedule"] > .view-heading.compact {
  min-height: 0;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
}
.view[data-view-panel="schedule"] > .view-heading .eyebrow { font-size: .55rem; letter-spacing: .16em; }
.view[data-view-panel="schedule"] > .view-heading.compact h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.55rem, 2.1vw, 1.9rem);
  font-weight: 470;
  line-height: 1.1;
}
.view[data-view-panel="schedule"] > .view-heading p { font-size: .7rem; line-height: 1.4; }
.view[data-view-panel="schedule"] > .view-heading .button { min-height: 34px; padding-inline: 12px; font-size: .65rem; }
.view[data-view-panel="schedule"] .schedule-board-card { min-height: 0; }
.view[data-view-panel="schedule"] .schedule-controlbar { min-height: 0; gap: 10px 14px; padding: 8px 12px; }
.view[data-view-panel="schedule"] .schedule-view-switch button { min-width: 64px; height: 32px; padding-inline: 10px; font-size: .62rem; }
.view[data-view-panel="schedule"] .week-nav { grid-template-columns: 32px minmax(150px, auto) 32px; }
.view[data-view-panel="schedule"] .week-nav button,
.view[data-view-panel="schedule"] .month-nav button { height: 32px; }
.view[data-view-panel="schedule"] .week-nav strong,
.view[data-view-panel="schedule"] .month-nav strong { padding-inline: 10px; font-size: .66rem; }
.view[data-view-panel="schedule"] .month-nav { grid-template-columns: 32px minmax(130px, auto) 32px auto; }
.view[data-view-panel="schedule"] .schedule-filter { gap: 6px; font-size: .6rem; }
.view[data-view-panel="schedule"] .schedule-filter select { min-height: 34px; padding-left: 8px; font-size: .64rem; }
.view[data-view-panel="schedule"] .schedule-legend { max-width: 270px; font-size: .57rem; line-height: 1.35; }
.view[data-view-panel="schedule"] .schedule-board-wrap { padding: 10px; }
.view[data-view-panel="schedule"] .schedule-board { grid-template-columns: 138px repeat(7, minmax(126px, 1fr)); }
.view[data-view-panel="schedule"] .schedule-cell { min-height: 76px; padding: 6px; }
.view[data-view-panel="schedule"] .schedule-cell.head { min-height: 44px; }
.view[data-view-panel="schedule"] .schedule-cell.head b { font-size: .6rem; }
.view[data-view-panel="schedule"] .schedule-cell.head small { margin-top: 2px; font-size: .54rem; }
.view[data-view-panel="schedule"] .schedule-cell.person { gap: 6px; padding-inline: 8px; }
.view[data-view-panel="schedule"] .schedule-cell.person .mini-avatar { width: 25px; height: 25px; flex: 0 0 25px; font-size: .55rem; }
.view[data-view-panel="schedule"] .schedule-cell.person b { font-size: .61rem; line-height: 1.2; }
.view[data-view-panel="schedule"] .schedule-cell.person small { margin-top: 2px; font-size: .52rem; line-height: 1.25; }
.view[data-view-panel="schedule"] .schedule-job-shell {
  margin-bottom: 4px;
  border: 1px solid #dfe5e8;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 36, 51, .04);
}
.view[data-view-panel="schedule"] .schedule-job-shell.accepted,
.view[data-view-panel="schedule"] .schedule-job-shell.pending,
.view[data-view-panel="schedule"] .schedule-job-shell.declined { box-shadow: 0 1px 2px rgba(16, 36, 51, .04); }
.view[data-view-panel="schedule"] .schedule-job { gap: 2px; min-height: 57px; padding: 6px 23px 6px 7px; border-left-width: 3px; }
.view[data-view-panel="schedule"] .schedule-job:hover { background: #f3f7f8; }
.view[data-view-panel="schedule"] .schedule-job.in_progress { background: #fbf9f3; }
.view[data-view-panel="schedule"] .schedule-job.done { background: #f6f9f7; }
.view[data-view-panel="schedule"] .schedule-job b { font-size: .63rem; line-height: 1.15; }
.view[data-view-panel="schedule"] .schedule-job span { font-size: .62rem; font-weight: 650; line-height: 1.2; }
.view[data-view-panel="schedule"] .schedule-job small { font-size: .56rem; line-height: 1.2; }
.view[data-view-panel="schedule"] .schedule-job em { right: 5px; bottom: 5px; font-size: .54rem; }
.view[data-view-panel="schedule"] .schedule-board .job-option { top: 1px; right: 1px; width: 21px; height: 20px; font-size: .65rem; }
.view[data-view-panel="schedule"] .schedule-board .approval-dot { top: 7px; right: 22px; width: 6px; height: 6px; background: #bc9555; }
.view[data-view-panel="schedule"] .schedule-board .schedule-job-shell.accepted .approval-dot { background: #398365; }
.view[data-view-panel="schedule"] .schedule-board .schedule-job-shell.declined .approval-dot { background: #a64a42; }
.view[data-view-panel="schedule"] .schedule-summary { min-height: 44px; gap: 18px; padding: 9px 12px; }

@media (max-width: 760px) {
  .view[data-view-panel="schedule"] > .view-heading.compact { align-items: flex-start; flex-direction: column; gap: 10px; }
  .view[data-view-panel="schedule"] .schedule-controlbar { gap: 8px; }
  .view[data-view-panel="schedule"] .schedule-legend { max-width: none; margin-left: 0; }
}

/* Bokningar: kort väg till rätt tidsperiod och en kompakt arbetslista. */
.view[data-view-panel="bookings"] > .view-heading.compact { min-height: 66px; padding-block: 8px 14px; }
.view[data-view-panel="bookings"] .view-heading h1 { margin-block: 3px; font-size: clamp(1.65rem, 2.2vw, 2.05rem); }
.view[data-view-panel="bookings"] .view-heading p { font-size: .71rem; }
.booking-management-card { min-height: 0; }
.booking-management-card .toolbar { min-height: 58px; padding: 9px 14px; }
.booking-management-card .search-field, .booking-management-card .toolbar select { min-height: 36px; }
.booking-management-card .compact-switch button { height: 34px; }
.booking-list-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #f8f9f8; }
.booking-scope-switch { display: flex; align-items: center; min-width: 0; gap: 4px; }
.booking-scope-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 5px 10px; border: 1px solid transparent; color: #536b78; background: transparent; font: inherit; font-size: .66rem; font-weight: 680; cursor: pointer; white-space: nowrap; }
.booking-scope-switch button:hover { border-color: #cbd7dc; background: #fff; }
.booking-scope-switch button.is-active { border-color: #23475a; color: #fff; background: #16384a; }
.booking-scope-switch button span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 4px; color: inherit; background: rgba(28, 69, 87, .09); font-size: .56rem; }
.booking-scope-switch button.is-active span { background: rgba(255,255,255,.2); }
.booking-list-tools-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
#bookingListSummary { color: var(--muted); font-size: .62rem; white-space: nowrap; }
.booking-schema-link { padding: 6px 0; border: 0; color: #1f526b; background: transparent; font: inherit; font-size: .66rem; font-weight: 720; cursor: pointer; white-space: nowrap; }
.booking-schema-link:hover { text-decoration: underline; }
.booking-schema-link span { margin-left: 2px; }
#bookingListView { min-height: 0; }
#bookingListView table { table-layout: fixed; white-space: normal; }
#bookingListView th { padding: 10px 12px; font-size: .54rem; }
#bookingListView td { padding: 9px 12px; font-size: .67rem; line-height: 1.3; overflow-wrap: anywhere; }
#bookingListView th:nth-child(1) { width: 14%; }
#bookingListView th:nth-child(2) { width: 19%; }
#bookingListView th:nth-child(3) { width: 18%; }
#bookingListView th:nth-child(4) { width: 17%; }
#bookingListView th:nth-child(5) { width: 19%; }
#bookingListView th:nth-child(6) { width: 13%; }
#bookingListView .job-sub { margin-top: 2px; font-size: .58rem; }
#bookingListView .color-title { gap: 6px; }
#bookingListView .color-title i { width: 7px; height: 7px; }
#bookingListView .assignment-cell { min-width: 0; gap: 3px; }
#bookingListView .assignment-cell select, #bookingListView .booking-status-select { width: 100%; min-width: 0; max-width: 100%; min-height: 30px; font-size: .62rem; }
#bookingListView .assignment-state { font-size: .5rem; }
#bookingListView .status-stack { gap: 3px; }
#bookingListView .approval-pill { padding: 3px 5px; font-size: .49rem; }
#bookingListView .empty-row td { padding: 30px 16px; }
.booking-list-pager { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 54px; padding: 8px 12px; border-top: 1px solid var(--line); background: #fff; }
.booking-list-pager button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line-strong); color: #23475a; background: #fff; font: inherit; font-size: .62rem; font-weight: 680; cursor: pointer; }
.booking-list-pager button:hover:not(:disabled) { background: #f3f7f8; }
.booking-list-pager button:disabled { opacity: .42; cursor: default; }
.booking-list-pager span { color: var(--muted); font-size: .61rem; white-space: nowrap; }

@media (max-width: 1120px) {
  #bookingListView table { table-layout: auto; }
  #bookingListView td { line-height: 1.35; }
}
@media (max-width: 760px) {
  .booking-management-card .toolbar { padding: 10px; }
  .booking-management-card .search-field, .booking-management-card .toolbar select { min-height: 44px; }
  .booking-management-card .compact-switch button { min-height: 44px; }
  .booking-list-tools { align-items: stretch; flex-direction: column; padding: 10px; }
  .booking-scope-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking-scope-switch button { min-height: 42px; padding-inline: 4px; font-size: .6rem; }
  .booking-list-tools-right { justify-content: space-between; }
  #bookingListView tbody { padding: 8px; }
  #bookingListView tr { margin-bottom: 8px; }
  #bookingListView td { min-height: 0; grid-template-columns: 73px minmax(0, 1fr); padding: 7px 10px; font-size: .68rem; }
  #bookingListView td::before { font-size: .52rem; }
  #bookingListView .assignment-cell select, #bookingListView .booking-status-select { min-height: 44px; font-size: 16px; }
  .booking-list-pager { gap: 9px; }
  .booking-list-pager button { min-height: 42px; }
}

/* Medarbetare: compact roster with color reserved for operational status. */
.view[data-view-panel="employees"] > .view-heading.compact { min-height: 0; align-items: center; gap: 14px; padding-block: 8px 14px; }
.view[data-view-panel="employees"] .view-heading .eyebrow { font-size: .55rem; }
.view[data-view-panel="employees"] .view-heading h1 { margin-block: 3px; font-size: clamp(1.65rem, 2.2vw, 2.05rem); font-weight: 470; }
.view[data-view-panel="employees"] .view-heading p { font-size: .71rem; }
.view[data-view-panel="employees"] .view-heading .button { min-height: 36px; padding-inline: 13px; font-size: .65rem; }
.employee-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px 22px; margin-bottom: 12px; padding: 11px 16px; border: 1px solid var(--line); background: #fff; }
.employee-overview-heading { display: grid; gap: 3px; min-width: 160px; }
.employee-overview-heading .eyebrow { color: #23475a; font-size: .54rem; }
.employee-overview-heading small { color: var(--muted); font-size: .6rem; line-height: 1.3; }
.employee-roster-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.employee-summary-total, .employee-summary-count { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 4px 9px; border: 1px solid var(--line); color: #3f5562; background: #f8fafb; font-size: .62rem; white-space: nowrap; }
.employee-summary-total b, .employee-summary-count b { color: var(--ink); font-size: .69rem; }
.employee-summary-count i, .employee-state-badge i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--employee-state); }
.view[data-view-panel="employees"] :is(.employee-summary-count, .employee-state-badge, .employee-roster-item).is-available { --employee-state: #2f7159; --employee-soft: #edf7f1; }
.view[data-view-panel="employees"] :is(.employee-summary-count, .employee-state-badge, .employee-roster-item).is-working { --employee-state: #4169a1; --employee-soft: #eef3fa; }
.view[data-view-panel="employees"] :is(.employee-summary-count, .employee-state-badge, .employee-roster-item).is-off { --employee-state: #68747b; --employee-soft: #f1f3f4; }
.view[data-view-panel="employees"] :is(.employee-summary-count, .employee-state-badge, .employee-roster-item).is-sick { --employee-state: #a64a42; --employee-soft: #fbefed; }
.employee-roster-heading { display: grid; grid-template-columns: minmax(0, 1fr) 116px 80px 80px 12px; align-items: center; gap: 12px; padding: 8px 18px; border: 1px solid var(--line); border-bottom: 0; color: var(--muted); background: #f5f6f5; font-size: .54rem; font-weight: 750; letter-spacing: .1em; }
.employee-roster-heading span:nth-child(3), .employee-roster-heading span:nth-child(4) { text-align: right; }
.view[data-view-panel="employees"] .employee-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); background: #fff; }
.employee-roster-item { min-width: 0; border-bottom: 1px solid var(--line); background: #fff; }
.employee-roster-item:last-child { border-bottom: 0; }
.employee-roster-main { display: grid; grid-template-columns: minmax(0, 1fr) 116px 80px 80px 12px; align-items: center; gap: 12px; min-height: 62px; padding: 9px 18px; list-style: none; cursor: pointer; }
.employee-roster-main::-webkit-details-marker { display: none; }
.employee-roster-main:hover, .employee-roster-item[open] .employee-roster-main { background: #f8fafb; }
.employee-roster-main:focus-visible { outline: 2px solid #4169a1; outline-offset: -2px; }
.employee-roster-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.view[data-view-panel="employees"] .employee-avatar { width: 33px; height: 33px; flex: 0 0 33px; color: #23475a; background: #eaf0f3; font-size: .6rem; }
.employee-roster-name { display: grid; gap: 2px; min-width: 0; }
.employee-roster-name b { overflow: hidden; color: var(--ink); font-size: .72rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.employee-roster-name small { overflow: hidden; color: var(--muted); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.employee-state-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--employee-state) 28%, white); color: var(--employee-state); background: var(--employee-soft); font-size: .61rem; font-weight: 680; white-space: nowrap; }
.employee-roster-figure { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px; color: var(--ink); white-space: nowrap; }
.employee-roster-figure b { font-size: .72rem; }
.employee-roster-figure small { color: var(--muted); font-size: .55rem; }
.employee-row-chevron { width: 7px; height: 7px; border-right: 1.5px solid #607782; border-bottom: 1.5px solid #607782; transform: rotate(45deg); transition: transform .15s; }
.employee-roster-item[open] .employee-row-chevron { transform: rotate(225deg); }
.employee-roster-detail { padding: 11px 18px 14px 61px; border-top: 1px solid var(--line); background: #f8fafb; }
.employee-detail-metrics { display: none; }
.employee-detail-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.employee-detail-status .eyebrow { font-size: .52rem; }
.employee-detail-status p { margin: 3px 0 0; color: var(--muted); font-size: .61rem; }
.view[data-view-panel="employees"] .employee-status-select { grid-column: auto; min-width: 145px; min-height: 34px; padding-inline: 8px; color: var(--ink); font-size: .65rem; }
.employee-detail-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.view[data-view-panel="employees"] .employee-account,
.view[data-view-panel="employees"] .timeclock { min-width: 0; min-height: 70px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); background: #fff; }
.view[data-view-panel="employees"] .timeclock.is-running { border-left: 3px solid #4169a1; background: #f1f5fb; }
.view[data-view-panel="employees"] .timeclock.is-break { border-left: 3px solid #bd8d27; background: #fff8e9; }
.view[data-view-panel="employees"] .employee-account > div,
.view[data-view-panel="employees"] .timeclock > div { min-width: 0; }
.view[data-view-panel="employees"] .employee-account span,
.view[data-view-panel="employees"] .timeclock span { font-size: .52rem; letter-spacing: .07em; }
.view[data-view-panel="employees"] .employee-account b,
.view[data-view-panel="employees"] .timeclock b { overflow: hidden; margin-top: 3px; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.view[data-view-panel="employees"] .employee-account small,
.view[data-view-panel="employees"] .timeclock small { margin-top: 2px; font-size: .56rem; line-height: 1.3; }
.view[data-view-panel="employees"] .employee-account .button,
.view[data-view-panel="employees"] .timeclock .button { min-height: 32px; padding-inline: 10px; font-size: .6rem; }
.view[data-view-panel="employees"] .employee-remove-row { margin-top: 9px; }
.view[data-view-panel="employees"] .employee-remove-row .button { min-height: 30px; font-size: .58rem; }
.view[data-view-panel="employees"] .employee-archive { border: 0; background: #fff; }
.view[data-view-panel="employees"] .employee-archive summary { padding: 12px 18px; font-size: .65rem; }
.view[data-view-panel="employees"] .employee-empty { border: 0; }

@media (max-width: 760px) {
  .view[data-view-panel="employees"] > .view-heading.compact { align-items: stretch; }
  .employee-overview { align-items: flex-start; flex-direction: column; padding: 11px; }
  .employee-roster-summary { justify-content: flex-start; }
  .employee-roster-heading { display: none; }
  .employee-roster-main { grid-template-columns: minmax(0, 1fr) auto 10px; gap: 8px; min-height: 62px; padding-inline: 11px; }
  .employee-roster-main .employee-roster-figure { display: none; }
  .employee-roster-detail { padding: 11px; }
  .employee-detail-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
  .employee-detail-metrics span { padding: 6px 8px; border: 1px solid var(--line); color: var(--muted); background: #fff; font-size: .6rem; }
  .employee-detail-metrics b { margin-left: 4px; color: var(--ink); }
  .employee-detail-tools { grid-template-columns: minmax(0, 1fr); }
  .employee-detail-status { align-items: flex-start; flex-direction: column; }
  .view[data-view-panel="employees"] .employee-status-select { width: 100%; min-height: 44px; font-size: 16px; }
  .view[data-view-panel="employees"] .employee-account,
  .view[data-view-panel="employees"] .timeclock { align-items: center; flex-direction: row; }
  .view[data-view-panel="employees"] .employee-account .button,
  .view[data-view-panel="employees"] .timeclock .button { min-height: 40px; }
}
@media (max-width: 420px) {
  .view[data-view-panel="employees"] .employee-account,
  .view[data-view-panel="employees"] .timeclock { align-items: stretch; flex-direction: column; }
  .view[data-view-panel="employees"] .employee-account .button,
  .view[data-view-panel="employees"] .timeclock .button { width: 100%; min-height: 44px; }
}
