:root {
  --font-sans: Inter, Roboto, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text: #161616;
  --text-secondary: #6f6f6b;
  --text-tertiary: #999994;
  --canvas: #f5f5f3;
  --surface: #ffffff;
  --surface-subtle: #f7f7f5;
  --surface-hover: #efefec;
  --brand-start: #f08c75;
  --brand-end: #e47187;
  --brand-gradient: linear-gradient(135deg, var(--brand-start) 0%, #ec7f7d 48%, var(--brand-end) 100%);
  --brand-soft: #fff1ee;
  --green: #277143;
  --green-soft: #eaf6ed;
  --booking-text: #355b72;
  --booking-soft: #edf5f8;
  --booking-two-text: #5a5872;
  --booking-two-soft: #f1f0f7;
  --danger: #b84a45;
  --danger-soft: #fff0ef;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --hour-height: 88px;
  --hour-width: 150px;
  --row-height: 64px;
  --rail-width: 140px;
  --calendar-min-width: 660px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
}

body {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font: inherit; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(228, 113, 135, .2);
}

.material-symbols-rounded {
  flex: 0 0 auto;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.app-shell {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.topbar {
  flex: 0 0 42px;
  width: 100%;
  max-width: 1500px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 auto var(--space-2);
  padding: 0 var(--space-2);
  background: var(--canvas);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -.025em;
}

.brand strong { font-weight: 680; }

.brand-mark {
  width: 34px;
  height: 25px;
  display: block;
  object-fit: contain;
}

.restaurant-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 9px 4px 4px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
}

.restaurant-monogram {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #343432;
  font-size: 12px;
  font-weight: 650;
}

.restaurant-switcher > span:nth-child(2) { min-width: 112px; display: grid; line-height: 1.1; }
.restaurant-switcher strong { font-size: 12px; font-weight: 650; }
.restaurant-switcher small { margin-top: 2px; color: var(--text-secondary); font-size: 8px; }
.restaurant-switcher > .material-symbols-rounded { color: var(--text-secondary); font-size: 17px; }

.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); }

.service-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 560;
}

.service-state span { width: 7px; height: 7px; border-radius: 50%; background: #75a37f; }

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.icon-button .material-symbols-rounded { font-size: 19px; }
.icon-button:hover { background: var(--surface-hover); }
.icon-button.subtle { background: var(--surface-subtle); }
.icon-button:active,
button:active { transform: translateY(1px) scale(.98); }

.workspace {
  width: 100%;
  max-width: 1500px;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--space-3);
  margin: 0 auto;
  overflow: hidden;
}

.panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.requests-panel {
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-4) var(--space-3);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px var(--space-4);
  gap: var(--space-2);
}

.panel-tabs { display: flex; padding: 3px; border: 0; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.panel-tab {
  position: relative;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.panel-tab:hover { color: var(--text); }
.panel-tab.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
.panel-tab-badge {
  min-width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-gradient, #e47187);
  font-size: 10px;
  font-weight: 700;
  animation: reveal .25s cubic-bezier(.16, 1, .3, 1) both;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .13em;
}

h1,
h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: 20px; font-weight: 650; }
h2 { font-size: 23px; font-weight: 650; }

h1 span {
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 8px;
  color: var(--text-secondary);
  background: var(--surface-hover);
  font-size: 11px;
  vertical-align: 3px;
}

.quick-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-2); padding-bottom: var(--space-3); }

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.accept-button,
.decline-button {
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 650;
}

.gradient-action {
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 5px 14px rgba(228, 113, 135, .16);
}

.gradient-action:hover { opacity: .92; }
.secondary-button:hover { background: var(--surface-hover); }
.primary-button .material-symbols-rounded,
.secondary-button .material-symbols-rounded { font-size: 18px; }

.danger-button { min-height: 39px; padding: 0 13px; border-radius: var(--radius-sm); color: var(--danger); background: var(--danger-soft); font-size: 12px; font-weight: 620; }
.text-button { min-height: 36px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; font-size: 11px; font-weight: 600; }
.text-button:hover { background: var(--surface-subtle); }

.request-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 2px 12px 0;
  scrollbar-width: thin;
  scrollbar-color: #d8d8d4 transparent;
}

.request-card {
  margin-bottom: 5px;
  padding: 13px 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  animation: reveal .3s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--index) * 45ms);
  transition: background .18s ease;
}

.request-card:hover { background: var(--surface-subtle); }
.request-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.request-name { margin: 0; font-size: 14px; font-weight: 660; letter-spacing: -.015em; }
.request-timeago { color: var(--text-tertiary); font-size: 9px; white-space: nowrap; }
.request-details { display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 7px 0 10px; color: var(--text-secondary); font-size: 10px; }
.request-details span { display: inline-flex; align-items: center; gap: 3px; }
.request-details .material-symbols-rounded { color: var(--text-tertiary); font-size: 13px; }
.request-actions { display: flex; align-items: center; gap: 6px; }
.accept-button,
.decline-button { height: 29px; padding: 0 10px; border-radius: 9px; font-size: 10px; font-weight: 650; }
.accept-button { color: var(--green); background: var(--green-soft); }
.accept-button:hover { background: #dcefe1; }
.decline-button { color: var(--text-secondary); background: transparent; }
.decline-button:hover { background: var(--surface-hover); }

.empty-state { min-height: 230px; display: grid; place-items: center; align-content: center; gap: var(--space-2); padding: var(--space-6); color: var(--text-secondary); text-align: center; }
.empty-state > .material-symbols-rounded { color: var(--text-tertiary); font-size: 32px; }
.empty-state strong { color: var(--text); font-size: 13px; }
.empty-state p { max-width: 210px; margin: 0; font-size: 10px; line-height: 1.5; }

.upcoming-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
  padding: 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  animation: reveal .3s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--index) * 30ms);
  transition: background .18s ease;
}
.upcoming-card:hover { background: var(--surface-subtle); }
.upcoming-date {
  flex: 0 0 auto;
  width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 2px;
  border-radius: 9px;
  background: var(--surface-hover);
  text-align: center;
}
.upcoming-date span { font-size: 9px; font-weight: 650; text-transform: capitalize; color: var(--text-secondary); }
.upcoming-date strong { font-size: 15px; font-weight: 700; color: var(--text); }
.upcoming-info { flex: 1 1 auto; min-width: 0; }
.upcoming-name { margin: 0 0 4px; font-size: 13px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: var(--text-secondary); font-size: 10px; }
.upcoming-meta span { display: inline-flex; align-items: center; gap: 3px; }
.upcoming-meta .material-symbols-rounded { color: var(--text-tertiary); font-size: 13px; }
.upcoming-walkin-pill { padding: 1px 7px; border-radius: 999px; color: var(--text-secondary); background: var(--surface-hover); font-size: 9px; font-weight: 650; }

.calendar-panel { display: flex; flex-direction: column; }
.calendar-toolbar { flex: 0 0 auto; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-4) 8px; }
.date-navigation,
.calendar-meta { display: flex; align-items: center; gap: 5px; }

.date-button {
  height: 42px;
  min-width: 184px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  cursor: pointer;
  text-align: left;
}

.date-button:hover { background: var(--surface-hover); }
.date-button > .material-symbols-rounded { color: var(--text-secondary); font-size: 18px; }
.date-button span { display: grid; line-height: 1.15; }
.date-button strong { font-size: 12px; font-weight: 650; }
.date-button small { margin-top: 3px; color: var(--text-tertiary); font-size: 9px; }
.week-picker { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

.calendar-meta { gap: var(--space-2); }
.capacity { display: grid; grid-template-columns: auto 62px; align-items: center; column-gap: 7px; padding-right: var(--space-2); border-right: 1px solid var(--line, #e5e5e5); }
.capacity > span { grid-row: 1 / 3; font-size: 22px; font-weight: 620; letter-spacing: -.045em; }
.capacity small { color: var(--text-tertiary); font-size: 8px; line-height: 1.2; }

.floor-switch,
.view-switch { display: flex; padding: 3px; border: 0; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.floor-switch button,
.view-switch button { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--text-secondary); background: transparent; font-size: 9px; font-weight: 650; cursor: pointer; }
.floor-switch button.active,
.view-switch button.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }

.calendar-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d8d8d4 transparent;
}

.week-calendar { min-width: var(--calendar-min-width); padding: 0 8px 20px; }

.week-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: var(--calendar-min-width);
  height: 58px;
  display: grid;
  grid-template-columns: 54px repeat(7, minmax(84px, 1fr));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.week-header::before { content: ""; }
.day-heading { display: flex; align-items: center; justify-content: center; gap: 7px; }
.day-heading span:first-child { color: var(--text-tertiary); font-size: 9px; font-weight: 650; text-transform: uppercase; }
.day-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; font-size: 12px; font-weight: 650; }
.day-heading.today .day-number { color: #fff; background: #343432; }
.day-heading.today span:first-child { color: var(--text); }

.calendar-body { min-width: var(--calendar-min-width); display: grid; grid-template-columns: 54px minmax(606px, 1fr); }
.time-rail { position: relative; height: calc(var(--hour-height) * var(--hour-count, 8)); background: var(--surface); }
.time-label { position: absolute; top: calc(var(--index) * var(--hour-height)); right: 10px; transform: translateY(-6px); color: var(--text-tertiary); font-size: 9px; font-weight: 540; font-variant-numeric: tabular-nums; }
.day-grid { height: calc(var(--hour-height) * var(--hour-count, 8)); display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); gap: 4px; }

.day-column {
  position: relative;
  border: 0;
  border-radius: 10px;
  background: repeating-linear-gradient(to bottom, rgba(248, 248, 246, .72) 0, rgba(248, 248, 246, .72) calc(var(--hour-height) - 2px), transparent calc(var(--hour-height) - 2px), transparent var(--hour-height));
}

.day-column.today { background-color: #fdfcfb; }

.day-calendar { min-width: fit-content; padding: 0 8px 20px; }

.day-time-header {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 58px;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(calc(var(--hour-width) * var(--hour-count, 8)), 1fr);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.rail-corner { display: flex; align-items: center; padding: 0 14px; color: var(--text-tertiary); font-size: 9px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.hour-track { position: relative; }
.hour-label { position: absolute; top: 50%; left: calc(var(--index) * var(--hour-width)); transform: translate(6px, -50%); color: var(--text-tertiary); font-size: 9px; font-weight: 540; font-variant-numeric: tabular-nums; }

.day-calendar-body { min-width: var(--calendar-min-width); display: grid; grid-template-columns: var(--rail-width) minmax(calc(var(--hour-width) * var(--hour-count, 8)), 1fr); }

.table-rail { position: relative; background: var(--surface); }
.table-row-label { height: var(--row-height); display: flex; align-items: center; padding: 0 14px; color: var(--text); font-size: 11px; font-weight: 650; letter-spacing: -.01em; border-bottom: 1px solid rgba(22, 22, 22, .06); }
.table-row-label:last-child { border-bottom: 0; }

.table-grid { position: relative; }

.table-row {
  position: relative;
  height: var(--row-height);
  border-bottom: 1px solid rgba(22, 22, 22, .06);
  background: repeating-linear-gradient(to right, rgba(248, 248, 246, .72) 0, rgba(248, 248, 246, .72) calc(var(--hour-width) - 2px), transparent calc(var(--hour-width) - 2px), transparent var(--hour-width));
}

.table-row:last-child { border-bottom: 0; }

.booking-card {
  position: absolute;
  top: var(--top);
  left: var(--left, 4px);
  width: var(--width, calc(100% - 8px));
  height: var(--height);
  min-height: 44px;
  overflow: hidden;
  padding: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--booking-text);
  background: var(--booking-soft);
  cursor: pointer;
  text-align: left;
  animation: reveal .3s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--index) * 30ms);
  transition: transform .18s cubic-bezier(.16, 1, .3, 1), filter .18s ease;
}

.booking-card:hover { transform: translateY(-1px); filter: brightness(.98); }
.booking-card.walkin { color: var(--green); background: var(--green-soft); }
.booking-card.floor-2 { color: var(--booking-two-text); background: var(--booking-two-soft); }
.booking-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; line-height: 1.2; }
.booking-card small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 520; opacity: .82; }

.booking-card.merged {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px rgba(22, 22, 22, .1);
}

.booking-card.merged:hover { filter: none; background: var(--surface-hover); box-shadow: inset 0 0 0 1px rgba(22, 22, 22, .18); }
.booking-card.merged .merged-icon { font-size: 14px; opacity: .65; }
.booking-card.merged strong { font-size: 11px; }

/* Ovanför bokningskorten (som ligger på auto), men under de klibbiga
   rubrikraderna med datum och klockslag — de ligger på z-index 2. */
.now-line { position: absolute; z-index: 1; pointer-events: none; }

.now-line-week {
  top: var(--top);
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
  box-shadow: 0 0 8px rgba(228, 113, 135, .35);
}
.now-line-week::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
  transform: translateY(-50%);
}

.now-line-day {
  top: 0;
  bottom: 0;
  left: var(--left);
  width: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
  box-shadow: 0 0 8px rgba(228, 113, 135, .35);
}
.now-line-day::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
  transform: translateX(-50%);
}

.panel-tab.bump { animation: tab-bump .5s ease; }
.panel-tab.bump .panel-tab-badge { animation: badge-bump .5s ease; }

.merged-popover {
  position: fixed;
  z-index: 30;
  width: 240px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
  animation: reveal .18s cubic-bezier(.16, 1, .3, 1) both;
}

.merged-popover-heading { padding: 7px 9px 5px; color: var(--text-tertiary); font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.merged-popover-item { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px 9px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.merged-popover-item:hover { background: var(--surface-subtle); }
.merged-popover-name { font-size: 12px; font-weight: 650; color: var(--text); }
.merged-popover-meta { font-size: 10px; color: var(--text-secondary); }

.calendar-loading { height: 100%; min-height: 420px; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-3); padding: var(--space-6); }
.calendar-loading div { height: 170px; border-radius: var(--radius-md); background: linear-gradient(100deg, #f7f7f5 20%, #fbfbfa 42%, #f7f7f5 65%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }

.booking-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .15);
}

.booking-dialog::backdrop { background: rgba(25, 25, 24, .3); backdrop-filter: blur(5px); }
.booking-dialog[open] { animation: dialog-in .25s cubic-bezier(.16, 1, .3, 1); }
.booking-dialog form { padding: var(--space-6); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-5); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.field { display: grid; gap: 7px; color: var(--text-secondary); font-size: 9px; font-weight: 650; letter-spacing: .025em; }
.field-wide { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea { width: 100%; padding: 11px 12px; border: 0; border-radius: var(--radius-sm); color: var(--text); background: var(--surface-subtle); font-size: 13px; font-weight: 500; letter-spacing: 0; resize: vertical; }
.field input,
.field select { height: 42px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-tertiary); }
.field-error { display: none; color: var(--danger); font-size: 9px; font-weight: 500; }
.field input.invalid { background: var(--danger-soft); box-shadow: inset 0 0 0 1px rgba(184, 74, 69, .28); }
.field input.invalid + .field-error { display: block; }
.form-error { min-height: 15px; margin: 9px 0 0; color: var(--danger); font-size: 10px; }

.dialog-footer { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--space-2); margin-top: 4px; padding-top: var(--space-3); }

.toast { position: fixed; right: 20px; bottom: 20px; max-width: 300px; padding: 11px 15px; border-radius: var(--radius-sm); color: #fff; background: #343432; box-shadow: 0 10px 26px rgba(0, 0, 0, .13); font-size: 11px; font-weight: 600; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .22s ease, transform .22s cubic-bezier(.16, 1, .3, 1); }
.toast.show { opacity: 1; transform: translateY(0); }

@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { to { background-position-x: -220%; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tab-bump { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.06); } }
@keyframes badge-bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } }

@media (max-width: 1100px) {
  .app-shell { padding: 6px 8px 8px; }
  .workspace { grid-template-columns: 270px minmax(0, 1fr); gap: var(--space-2); }
  .requests-panel { padding: var(--space-4) var(--space-3) var(--space-2); }
  .capacity { display: none; }
  .date-button { min-width: 166px; }
  .calendar-toolbar { padding-inline: var(--space-3); }
}

@media (max-width: 820px) {
  :root { --hour-height: 82px; --hour-width: 120px; --row-height: 56px; --rail-width: 112px; }
  .app-shell { padding: 5px; }
  .topbar { flex-basis: 39px; grid-template-columns: 1fr auto; margin-bottom: 5px; padding-inline: 5px; }
  .restaurant-switcher,
  .service-state { display: none; }
  .workspace { grid-template-columns: 1fr; grid-template-rows: 224px minmax(0, 1fr); gap: 6px; }
  .requests-panel { padding: 12px; }
  .panel-heading { padding-bottom: 8px; }
  .quick-actions { grid-template-columns: 1fr 1fr; padding-bottom: 6px; }
  .request-list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; }
  .request-card { min-width: 250px; margin: 0; padding: 10px; background: var(--surface-subtle); }
  .upcoming-card { min-width: 230px; margin: 0; padding: 10px; background: var(--surface-subtle); }
  .calendar-toolbar { min-height: 58px; padding: 7px 10px 5px; }
  .date-navigation > .icon-button { display: none; }
  .date-button { min-width: 155px; }
  .text-button { display: none; }
  .floor-switch button { padding-inline: 8px; }
  .week-header { height: 52px; }
}

@media (max-width: 560px) {
  .workspace { grid-template-rows: 210px minmax(0, 1fr); }
  .calendar-toolbar { flex-wrap: wrap; }
  .calendar-meta { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .dialog-footer { grid-template-columns: 1fr 1fr; }
  .dialog-footer > span { display: none; }
}

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

/* ---- Delad meny (hamburgermeny i headern, alla /app-sidor) ---- */
.nav-menu { position: relative; }

.nav-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 210px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
  animation: reveal .18s cubic-bezier(.16, 1, .3, 1) both;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background .16s ease;
}

.nav-menu-item:hover { background: var(--surface-subtle); }
.nav-menu-item.active { background: var(--surface-hover); }
.nav-menu-item .material-symbols-rounded { color: var(--text-secondary); font-size: 18px; }
.nav-menu-item.active .material-symbols-rounded { color: var(--text); }

/* ---- Enkel-panels-läge (sidor utan sidopanel, t.ex. Bord/Inställningar/Om restaurangen) ---- */
.workspace.single-panel {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

/* ---- Förenklad topbar (utan restaurangväxlare/service-status) ---- */
.topbar.topbar-simple { grid-template-columns: auto 1fr; }

/* ---- Lucide-ikoner: samma storlek/vikt som Material Symbols-ikonerna ---- */
.lucide-icon { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.75; }

.nav-menu-item .lucide-icon { color: var(--text-secondary); }
.nav-menu-item.active .lucide-icon { color: var(--text); }

/* ---- Generisk on/off-switch (används i inställningssidorna) ---- */
.switch { position: relative; display: inline-flex; align-items: center; width: 40px; height: 24px; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.switch .switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-hover); transition: background .18s ease; }
.switch .switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .22); transition: transform .18s cubic-bezier(.16, 1, .3, 1); }
.switch input:checked ~ .switch-track { background: var(--brand-gradient); }
.switch input:checked ~ .switch-thumb { transform: translateX(16px); }
.switch input:focus-visible ~ .switch-track { box-shadow: 0 0 0 3px rgba(228, 113, 135, .22); }
.switch input:disabled ~ .switch-track { opacity: .5; cursor: not-allowed; }

/* ---- Sidhuvud för sidor utan sidopanel (samma mönster som panel-heading) ---- */
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-5) var(--space-5) var(--space-3); }
.page-heading .eyebrow { margin-bottom: 3px; }

/* ---- Enkel sidram (t.ex. Gäster) — panel-heading + skrollbart innehåll ---- */
.page-shell { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.page-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--space-5) var(--space-5); overflow: hidden; }
