:root {
  color-scheme: light;
  --bg: #eaf5fb;
  --surface: #ffffff;
  --surface-soft: #f7fbfe;
  --surface-tint: #eef8fd;
  --line: rgba(29, 78, 113, 0.14);
  --line-strong: rgba(15, 95, 140, 0.24);
  --text: #183044;
  --text-soft: #5c7486;
  --blue: #0f5f8c;
  --blue-strong: #1f7cab;
  --blue-soft: #dff1fa;
  --green: #2f7d64;
  --green-strong: #1f5b46;
  --green-soft: #c9ebd7;
  --green-line: rgba(47, 125, 100, 0.42);
  --amber: #a56a1d;
  --amber-soft: #ffe3a1;
  --red: #a44141;
  --red-soft: #f6c8c8;
  --shadow: 0 24px 58px rgba(26, 73, 105, 0.13);
  --shadow-soft: 0 10px 28px rgba(26, 73, 105, 0.08);
  --page-gutter: clamp(16px, 3vw, 32px);
  --sidebar-width: 300px;
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(135deg, #e8f6fc 0%, #f5fbff 46%, #edf8fd 100%);
}

body.has-cookie-banner {
  padding-bottom: 112px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 95, 140, 0.16);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  height: 100svh;
  padding: 28px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(237, 250, 232, 0.96), rgba(222, 243, 229, 0.94)),
    #edf8e9;
  box-shadow: 12px 0 36px rgba(47, 125, 100, 0.08);
}

.brand {
  display: grid;
  gap: 8px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: var(--shadow-soft);
  font-weight: 900;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.brand-kicker,
.eyebrow {
  display: block;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
}

.brand p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.nav,
.nav-group,
.nav-group-items {
  display: grid;
  gap: 8px;
}

.nav {
  gap: 18px;
}

.customer-switch {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 95, 140, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.customer-switch .field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.customer-switch select {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 760;
}

.nav-group-title {
  margin: 0 0 2px;
  padding: 0 8px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-link,
.kind-button,
.page-link {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
}

.nav-link:hover,
.nav-link-active,
.kind-button:hover,
.kind-button.active,
.page-link:hover,
.page-link-active {
  background: linear-gradient(135deg, rgba(223, 241, 250, 0.95), rgba(255, 255, 255, 0.9));
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(15, 95, 140, 0.08);
  transform: translateX(2px);
}

.kind-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border-radius: 16px;
}

.kind-button svg,
.nav-link svg {
  color: var(--blue);
  flex: 0 0 auto;
}

.kind-button strong,
.kind-button small,
.page-link strong,
.page-link small {
  display: block;
  min-width: 0;
}

.kind-button strong,
.page-link strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kind-button small,
.page-link small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kind-button em {
  display: grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.page-link {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 12px;
  border-radius: 16px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-soft);
}

.status-dot-live {
  background: var(--green);
}

.status-dot-scheduled {
  background: var(--amber);
}

.status-dot-draft {
  background: var(--text-soft);
}

.status-dot-paused {
  background: var(--red);
}

.policy-panel {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(165, 106, 29, 0.32);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8e5, #fff);
  box-shadow: var(--shadow-soft);
}

.policy-panel svg {
  flex: 0 0 auto;
  color: var(--amber);
}

.policy-panel strong,
.policy-panel span {
  display: block;
}

.policy-panel strong {
  font-size: 0.86rem;
}

.policy-panel p {
  margin: 6px 0 10px;
  color: #755c30;
  font-size: 0.78rem;
  line-height: 1.45;
}

.policy-panel span {
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 800;
}

.workspace {
  min-width: 0;
  padding: var(--page-gutter);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
}

.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(15, 95, 140, 0.12);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.status-tile {
  min-height: 140px;
  padding: 18px;
  border: 1px solid var(--green-line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(227, 245, 235, 0.96), rgba(249, 255, 252, 0.98));
  box-shadow: var(--shadow-soft);
}

.status-tile:nth-child(2) {
  border-color: rgba(15, 95, 140, 0.24);
  background: linear-gradient(135deg, #dff1fa, #f6fcff);
}

.status-tile:nth-child(3) {
  border-color: rgba(165, 106, 29, 0.38);
  background: linear-gradient(135deg, #ffe3a1, #fff2ce);
}

.status-tile:nth-child(4) {
  border-color: rgba(47, 125, 100, 0.38);
  background: linear-gradient(135deg, #c9ebd7, #eaf8ef);
}

.tile-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.status-tile span,
.status-tile small {
  display: block;
  color: var(--text-soft);
}

.status-tile span {
  font-size: 0.78rem;
  font-weight: 800;
}

.status-tile strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 2.05rem;
  line-height: 1;
}

.status-tile small {
  font-size: 0.8rem;
  line-height: 1.35;
}

.booking-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.admin-device-booking-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.panel,
.hero {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.inline-header {
  margin: 8px 0 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-info,
.pill-ready {
  border: 1px solid var(--green-line);
  background: var(--green-soft);
  color: var(--green);
}

.pill-success {
  border: 1px solid rgba(31, 91, 70, 0.7);
  background: var(--green-strong);
  color: #fff;
}

.pill-warning {
  border: 1px solid rgba(165, 106, 29, 0.46);
  background: var(--amber-soft);
  color: var(--amber);
}

.pill-danger {
  border: 1px solid rgba(164, 65, 65, 0.34);
  background: var(--red-soft);
  color: var(--red);
}

.pill-neutral {
  border: 1px solid var(--line);
  background: rgba(15, 95, 140, 0.08);
  color: var(--text);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  padding: 12px 16px;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(26, 73, 105, 0.06);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.button:hover:not(:disabled),
.icon-button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px rgba(26, 73, 105, 0.1);
  transform: translateY(-1px);
}

.button:disabled,
.slot-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.button-primary {
  border-color: rgba(15, 95, 140, 0.18);
  background: linear-gradient(135deg, #0f5f8c, #1f7cab);
  color: #fff;
}

.button-danger {
  border-color: rgba(164, 65, 65, 0.34);
  background: #fff2f2;
  color: var(--red);
}

.button-full {
  width: 100%;
}

.icon-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.status-chip-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.status-chip-link span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-list,
.booking-form,
.landing-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.resource-row {
  --resource-color: var(--blue);
  --resource-accent: var(--blue-soft);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.resource-row:hover,
.resource-row.active {
  border-color: color-mix(in srgb, var(--resource-color), white 62%);
  background: color-mix(in srgb, var(--resource-accent), white 36%);
}

.resource-icon {
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--resource-color), white 62%);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--resource-color), white 42%), transparent),
    var(--resource-accent);
}

.resource-copy {
  min-width: 0;
}

.resource-copy strong,
.resource-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-copy strong {
  font-size: 0.92rem;
}

.resource-copy small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.availability {
  justify-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.availability.free {
  background: #dcfce7;
  color: #166534;
}

.availability.busy {
  background: #fee2e2;
  color: #991b1b;
}

.resource-detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.resource-detail div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--resource-color), white 72%);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.25;
}

.resource-detail svg {
  flex: 0 0 auto;
  color: var(--resource-color);
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.feature-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 760;
}

.form-grid,
.selector-grid {
  display: grid;
  gap: 18px;
}

.two-columns,
.selector-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.booking-form label {
  display: grid;
  gap: 8px;
}

.field-label,
.booking-form label span {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 760;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
  outline: 3px solid rgba(15, 95, 140, 0.14);
}

input:disabled {
  color: #657987;
  background: #eef6fa;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.45;
}

input[type="checkbox"],
input[type="radio"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.access-toggle {
  align-items: center;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.access-toggle span {
  display: grid;
  gap: 3px;
}

.access-toggle small {
  color: var(--text-soft);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.notice svg {
  flex: 0 0 auto;
}

.notice strong,
.notice span {
  display: block;
}

.notice.error {
  border: 1px solid rgba(164, 65, 65, 0.34);
  background: #fff2f2;
  color: var(--red);
}

.notice.success {
  border: 1px solid var(--green-line);
  background: #eefaf2;
  color: var(--green-strong);
}

.alternatives {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.alternatives span {
  width: 100%;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.alternatives button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 820;
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.date-strip.compact {
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.date-strip button {
  min-width: 0;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
}

.date-strip button.active {
  border-color: rgba(15, 95, 140, 0.32);
  background: var(--blue-soft);
  color: var(--blue);
}

.date-strip strong,
.date-strip span {
  display: block;
}

.date-strip strong {
  font-size: 0.78rem;
}

.date-strip span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-hours {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.timeline-track {
  position: relative;
  height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(to bottom, transparent 24%, rgba(92, 116, 134, 0.13) 25%, transparent 26%),
    linear-gradient(to right, rgba(92, 116, 134, 0.12) 1px, transparent 1px),
    #fbfdff;
  background-size:
    100% 25%,
    20% 100%;
}

.timeline-entry {
  --entry-color: var(--blue);
  position: absolute;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-content: center;
  gap: 0 8px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--entry-color), white 55%);
  border-left: 4px solid var(--entry-color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.timeline-entry.pending {
  border-style: dashed;
}

.timeline-entry span,
.timeline-entry strong,
.timeline-entry small {
  display: block;
  grid-column: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-entry span {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 820;
}

.timeline-entry strong {
  margin-top: 2px;
  font-size: 0.86rem;
}

.timeline-entry small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.timeline-entry svg {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  color: var(--text-soft);
}

.empty-state {
  display: grid;
  height: 100%;
  place-content: center;
  justify-items: center;
  padding: 24px;
  color: var(--text-soft);
  text-align: center;
}

.empty-state svg {
  color: var(--blue);
}

.empty-state strong {
  margin-top: 9px;
  color: var(--text);
}

.empty-state span {
  margin-top: 4px;
  font-size: 0.82rem;
}

.booking-list {
  display: grid;
  gap: 8px;
}

.booking-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.booking-row span:nth-child(2) {
  min-width: 0;
}

.booking-row strong,
.booking-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-row strong {
  font-size: 0.86rem;
}

.booking-row small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.74rem;
}

.booking-dot {
  --entry-color: var(--blue);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--entry-color);
}

.booking-row em {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.booking-row em.confirmed {
  background: #dcfce7;
  color: #166534;
}

.booking-row em.pending {
  background: #fef3c7;
  color: #92400e;
}

.booking-row em.declined {
  background: #fee2e2;
  color: #991b1b;
}

.public-workspace,
.admin-workspace {
  display: grid;
  gap: 18px;
  align-items: start;
}

.public-workspace {
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
}

.admin-workspace {
  grid-template-columns: minmax(260px, 0.42fr) minmax(420px, 1fr) minmax(240px, 0.38fr);
}

.page-picker {
  position: sticky;
  top: var(--page-gutter);
}

.landing-card {
  --page-accent: var(--blue);
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--page-accent);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.landing-card:hover,
.landing-card.active {
  border-color: color-mix(in srgb, var(--page-accent), white 60%);
  border-left-color: var(--page-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--page-accent), white 88%), #fff);
}

.landing-card strong,
.landing-card small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-card small {
  color: var(--text-soft);
  white-space: nowrap;
}

.public-preview {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.public-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0;
}

.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.public-url {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-soft);
  font-weight: 760;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.hero-compact {
  align-items: center;
}

.public-hero {
  --page-accent: var(--blue);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--page-accent), white 82%), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.hero h1 {
  margin: 6px 0 10px;
  max-width: 18ch;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.08;
}

.hero-copy {
  max-width: 66ch;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.hero-note {
  min-width: 230px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.hero-note strong {
  display: block;
  margin-top: 10px;
  font-size: 1.08rem;
}

.hero-note p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.public-booking-form,
.admin-editor {
  display: grid;
  gap: 18px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.slot-button {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-align: center;
}

.slot-button.active {
  border-color: rgba(15, 95, 140, 0.34);
  background: linear-gradient(135deg, #0f5f8c, #1f7cab);
  color: #fff;
}

.slot-button span {
  color: inherit;
  font-size: 0.74rem;
  opacity: 0.78;
}

.resource-assignment {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.resource-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.resource-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.device-resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.resource-choice {
  --resource-color: var(--blue);
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  min-height: 96px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--resource-color), white 70%);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--resource-color), white 92%), #fff);
  box-shadow: var(--shadow-soft);
}

.resource-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--resource-color), white 34%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--resource-color), white 82%), #fff);
}

.resource-choice span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.resource-choice strong,
.resource-choice small,
.resource-choice em {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-choice small {
  color: var(--text-soft);
}

.resource-choice em {
  color: var(--resource-color);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 820;
}

.device-selection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.device-selection-toolbar {
  display: flex;
  gap: 8px;
}

.device-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(26, 73, 105, 0.06);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.device-action-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px rgba(26, 73, 105, 0.1);
  transform: translateY(-1px);
}

.device-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.selected-device-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.selected-device-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.selected-device-table th,
.selected-device-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.selected-device-table th {
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.selected-device-table tr:last-child td {
  border-bottom: 0;
}

.selected-device-table tr.selected-device-row-problem td {
  border-bottom-color: #f3b4ac;
  background: #fff1ef;
  color: #8f1d12;
}

.selected-device-table tr.selected-device-row-problem strong {
  color: #8f1d12;
}

.selected-device-table td:first-child,
.selected-device-table th:first-child {
  width: 92px;
}

.selected-device-table strong {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-device-empty td {
  color: var(--text-soft);
  font-weight: 760;
  text-align: center;
}

.availability-status {
  display: block;
  min-height: 1.25rem;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 760;
}

.availability-status-checking {
  color: #80550d;
}

.availability-status-success {
  color: #17633a;
}

.availability-status-warning {
  color: #8f1d12;
}

.availability-popup {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 80;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: min(440px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid #f0afa5;
  border-left: 6px solid #c63625;
  border-radius: 16px;
  background: #fff7f5;
  color: #7b1a11;
  box-shadow: 0 22px 48px rgba(87, 23, 14, 0.18);
}

.availability-popup strong {
  display: block;
  margin-bottom: 4px;
  color: #7b1a11;
}

.availability-popup p {
  margin: 0;
  white-space: pre-line;
  line-height: 1.45;
}

.availability-popup button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #e7a397;
  border-radius: 10px;
  background: #fff;
  color: #7b1a11;
  font-weight: 820;
}

.captcha-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.captcha-check input {
  width: 20px;
  height: 20px;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.device-picker-modal[hidden] {
  display: none;
}

.device-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.device-picker-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 32, 45, 0.48);
}

.device-picker-panel {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(780px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(11, 32, 45, 0.24);
}

.customer-modal-panel {
  width: min(680px, 100%);
}

.resource-modal-panel {
  width: min(940px, 100%);
}

.landing-page-modal-panel {
  width: min(1040px, 100%);
}

.customer-form {
  gap: 14px;
}

.landing-page-form {
  display: grid;
  gap: 18px;
}

.device-picker-header,
.device-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.device-picker-header h3 {
  margin: 0;
}

.device-picker-grid {
  max-height: 460px;
  overflow: auto;
  padding: 2px;
}

.device-picker-footer {
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.booking-time-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.time-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-mode-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-weight: 820;
}

.time-mode-option:has(input:checked) {
  border-color: rgba(15, 95, 140, 0.34);
  background: linear-gradient(135deg, rgba(223, 241, 250, 0.94), #fff);
}

.school-time-grid,
.free-time-grid {
  margin-top: 2px;
}

.recurrence-until-required input {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(15, 95, 140, 0.1);
}

.resource-check span,
.compact-list-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.resource-check strong,
.resource-check small,
.compact-list-row strong,
.compact-list-row small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-check small,
.compact-list-row small {
  color: var(--text-soft);
}

.compact-list-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.compact-list-row svg {
  color: var(--blue);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.resource-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 18px;
  align-items: start;
}

.resource-list-layout {
  grid-template-columns: 1fr;
}

.customer-admin-layout {
  display: grid;
  gap: 18px;
}

.landing-page-admin-layout {
  display: grid;
  gap: 18px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 140px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-soft);
  font-weight: 820;
  text-decoration: none;
}

.admin-tab:hover,
.admin-tab-active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, #0f5f8c, #1f7cab);
  color: #fff;
}

.account-main,
.resource-admin-main,
.account-form,
.resource-form,
.category-form,
.import-form {
  display: grid;
  gap: 18px;
}

.account-editor,
.resource-editor {
  position: sticky;
  top: var(--page-gutter);
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.selection-counter {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text-soft);
  font-weight: 800;
  white-space: nowrap;
}

.field-compact {
  width: min(220px, 100%);
}

.bulk-extra[hidden] {
  display: none;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.data-table th a {
  color: var(--text-soft);
  text-decoration: none;
}

.data-table tbody tr:hover {
  background: #f9fdff;
}

.data-table tbody tr.table-row-selected {
  background: #eef8fd;
}

.data-table tbody tr.table-row-selected:hover {
  background: #e5f4fb;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table strong,
.data-table small {
  display: block;
}

.data-table small {
  margin-top: 3px;
  color: var(--text-soft);
}

.select-column {
  width: 52px;
  text-align: center;
}

.select-column input {
  margin-inline: auto;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 820;
  text-decoration: none;
  white-space: nowrap;
}

.table-action:hover {
  border-color: var(--line-strong);
  background: var(--blue-soft);
}

.table-action.danger {
  color: var(--red);
}

.table-action.muted {
  color: var(--text-soft);
  cursor: default;
}

.import-report .data-table {
  min-width: 640px;
}

.resource-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(150px, 0.8fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.resource-filter-grid .filter-actions {
  align-self: end;
}

.resource-table {
  min-width: 960px;
}

.landing-resource-table {
  min-width: 860px;
}

.category-table {
  min-width: 780px;
}

.customer-table {
  min-width: 940px;
}

.customer-table code {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.78rem;
}

.audit-table,
.account-table {
  min-width: 1040px;
}

.inline-action-form {
  display: inline;
  margin: 0;
}

.category-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--category-color, var(--blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--category-color, var(--blue)), white 78%);
  vertical-align: middle;
}

.category-dot.large {
  width: 16px;
  height: 16px;
  margin-right: 0;
}

.category-admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.category-item span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.category-item strong,
.category-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-help {
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.role-checkset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.role-checkset legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 760;
}

.scout-category-checkset[hidden] {
  display: none;
}

.roles-layout,
.roles-grid {
  display: grid;
  gap: 18px;
}

.roles-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-card {
  align-content: start;
}

.clean-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding-left: 16px;
  color: var(--text-soft);
  line-height: 1.45;
  position: relative;
}

.clean-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}

.protection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.protection-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.protection-grid p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

@media (max-width: 1320px) {
  .booking-workspace {
    grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1fr);
  }

  .schedule-panel {
    grid-column: 1 / -1;
  }

  .admin-workspace {
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  }

  .resource-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .access-panel {
    grid-column: 1 / -1;
  }

  .public-booking-layout {
    grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  }
}

@media (max-width: 1040px) {
  :root {
    --sidebar-width: 260px;
    --page-gutter: 22px;
  }

  .sidebar {
    padding: 22px;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-workspace,
  .admin-workspace,
  .account-layout,
  .resource-admin-layout,
  .category-admin-grid {
    grid-template-columns: 1fr;
  }

  .page-picker,
  .account-editor,
  .resource-editor {
    position: static;
  }

  .public-booking-layout {
    grid-template-columns: 1fr;
  }

  .public-calendar-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: 48vh;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
  }

  .topbar,
  .hero,
  .panel-header,
  .public-preview-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .booking-workspace {
    grid-template-columns: 1fr;
  }

  .resource-detail,
  .two-columns,
  .selector-grid,
  .resource-filter-grid,
  .roles-grid,
  .protection-grid,
  .role-checkset {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 14px;
  }

  .workspace,
  .sidebar {
    padding: var(--page-gutter);
  }

  .sidebar {
    max-height: 46vh;
  }

  .brand {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 4px 12px;
    align-items: center;
  }

  .brand-mark {
    grid-row: 1 / span 3;
  }

  .brand h1 {
    font-size: 1.55rem;
  }

  .brand p {
    display: none;
  }

  .status-grid,
  .date-strip {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .hero {
    padding: 18px;
    border-radius: 18px;
  }

  .resource-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .availability {
    grid-column: 2;
    justify-self: start;
  }

  .booking-row {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .booking-row em {
    grid-column: 2;
    justify-self: start;
  }

  .timeline-track {
    height: 420px;
  }

  .timeline-entry {
    left: 12px !important;
    right: 12px !important;
  }

  .button,
  .status-chip,
  .admin-tab {
    width: 100%;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }
}

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

.page,
.stack {
  display: grid;
  gap: 20px;
}

.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.public-topbar,
.public-main {
  width: min(920px, calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
}

body:has(.public-booking-layout) .public-topbar,
body:has(.public-booking-layout) .public-main {
  width: min(1480px, calc(100% - (var(--page-gutter) * 2)));
}

.public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}

.public-main {
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 20px 0 56px;
}

html.is-embedded {
  --page-gutter: 18px;
  --sidebar-width: 260px;
}

.is-embedded .sidebar {
  padding: 18px;
}

.is-embedded .workspace {
  padding: 18px 20px;
}

.is-embedded .hero,
.is-embedded .panel {
  border-radius: 18px;
}

.is-embedded .public-topbar,
.is-embedded .public-main {
  margin-left: var(--page-gutter);
  margin-right: auto;
}

.is-embedded .public-main {
  padding-top: 16px;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.public-nav-link {
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--text-soft);
  font-weight: 760;
  text-decoration: none;
}

.public-nav-active,
.public-nav-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #0f5f8c, #1f7cab);
}

.landing-grid,
.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.public-booking-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.86fr) minmax(500px, 1.14fr);
  gap: 20px;
  align-items: start;
}

.public-booking-layout .device-booking-form .two-columns {
  grid-template-columns: 1fr;
}

.public-calendar-panel {
  position: sticky;
  top: 18px;
}

.public-calendar-panel .calendar-header {
  align-items: flex-start;
}

.public-calendar-panel .calendar-nav .button {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 0.84rem;
}

.public-calendar-panel .calendar-day {
  min-height: 142px;
  padding: 9px;
}

.public-calendar-panel .calendar-day-top span {
  display: none;
}

@media (max-width: 900px) {
  .public-booking-layout {
    grid-template-columns: 1fr;
  }

  .public-calendar-panel {
    position: static;
  }

  .device-picker-modal {
    padding: 12px;
  }

  .device-picker-panel {
    max-height: calc(100vh - 24px);
    padding: 14px;
    border-radius: 16px;
  }

  .device-picker-header,
  .device-picker-footer {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .device-picker-footer .button {
    flex: 1 1 180px;
  }

  .time-mode-switch {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  padding: 18px;
  border: 1px solid var(--green-line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(227, 245, 235, 0.96), rgba(249, 255, 252, 0.98));
  box-shadow: var(--shadow-soft);
}

.metric-label,
.metric-copy {
  color: var(--text-soft);
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 2.1rem;
}

.field-inline {
  width: min(260px, 100%);
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.overview-table,
.booking-table {
  display: grid;
  gap: 10px;
}

.bulk-booking-form {
  display: none;
}

.bulk-booking-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.bulk-booking-select-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 820;
}

.bulk-booking-select-all input,
.overview-row-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.bulk-booking-count {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 780;
}

.overview-row {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.overview-row-dashboard {
  grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr);
  align-items: center;
}

.overview-row-with-actions {
  grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr) auto;
}

.overview-row-with-selection {
  grid-template-columns: 38px minmax(180px, 1.3fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr);
}

.overview-row-with-selection.overview-row-with-actions {
  grid-template-columns: 38px minmax(180px, 1.3fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr) auto;
}

.overview-row-bulk-selected {
  border-color: rgba(15, 95, 140, 0.32);
  background: color-mix(in srgb, var(--blue-soft), white 42%);
}

.overview-row-select {
  display: flex;
  align-items: center;
  justify-content: center;
}

.overview-row-actions {
  justify-self: end;
}

.overview-row div,
.overview-row strong,
.overview-row span {
  min-width: 0;
}

.overview-row span,
.help-copy {
  color: var(--text-soft);
  line-height: 1.45;
}

.calendar-panel {
  display: grid;
  gap: 14px;
}

.calendar-header {
  margin-bottom: 0;
}

.calendar-nav {
  justify-content: flex-end;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 168px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.calendar-day-outside {
  background: var(--surface-soft);
  opacity: 0.72;
}

.calendar-day-selected {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 2px rgba(15, 95, 140, 0.1);
}

.calendar-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.calendar-day-top strong {
  font-size: 1rem;
}

.calendar-day-top span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-bookings {
  display: grid;
  gap: 6px;
}

.calendar-entry-row {
  display: grid;
  gap: 6px;
}

.calendar-entry-row-parallel {
  grid-template-columns: repeat(var(--parallel-count, 2), minmax(0, 1fr));
  gap: 4px;
}

.calendar-entry {
  --entry-color: var(--blue);
  position: relative;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--entry-color), white 68%);
  border-left: 4px solid var(--entry-color);
  border-radius: 12px;
  background: color-mix(in srgb, var(--entry-color), white 91%);
  cursor: help;
}

.calendar-entry-row-parallel .calendar-entry {
  gap: 1px;
  padding: 6px 4px;
  border-left-width: 3px;
  border-radius: 10px;
}

.calendar-entry-row-parallel .calendar-entry strong {
  font-size: 0.68rem;
}

.calendar-entry-row-parallel .calendar-entry span,
.calendar-entry-row-parallel .calendar-entry small {
  font-size: 0.62rem;
}

.calendar-entry strong,
.calendar-entry span,
.calendar-entry small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-entry strong {
  color: var(--text);
  font-size: 0.74rem;
}

.calendar-entry span,
.calendar-entry small,
.calendar-empty,
.calendar-more {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.calendar-entry-popover {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 35;
  display: grid;
  gap: 10px;
  width: min(310px, 76vw);
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--entry-color), white 52%);
  border-left: 5px solid var(--entry-color);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 42px rgba(26, 73, 105, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  visibility: hidden;
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    visibility 0s linear 150ms;
}

.calendar-entry-admin .calendar-entry-popover {
  width: min(360px, 82vw);
}

.calendar-entry:hover,
.calendar-entry:focus-within {
  z-index: 40;
}

.calendar-entry:hover .calendar-entry-popover,
.calendar-entry:focus-within .calendar-entry-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 220ms, 220ms, 0s;
}

.calendar-entry-popover strong,
.calendar-entry-popover span,
.calendar-entry-popover small {
  overflow: visible;
  color: var(--text);
  text-overflow: clip;
  white-space: normal;
}

.calendar-entry-details {
  display: grid;
  gap: 7px;
  margin: 0;
}

.calendar-entry-details div {
  display: grid;
  grid-template-columns: minmax(82px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.calendar-entry-details dt {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.calendar-entry-details dd {
  margin: 0;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.calendar-entry-delete-form {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.calendar-more {
  font-weight: 820;
}

.calendar-empty {
  padding: 8px 0;
}

.public-form,
.admin-form,
.staff-form {
  display: grid;
  gap: 18px;
}

.surface-feedback {
  display: grid;
  gap: 12px;
}

.legal-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.legal-footer a {
  color: var(--text-soft);
  font-weight: 760;
  text-decoration: none;
}

.legal-panel {
  width: 100%;
  justify-self: stretch;
}

.legal-content {
  color: var(--text);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4 {
  margin: 1.2em 0 0.45em;
  line-height: 1.2;
}

.legal-content h1:first-child,
.legal-content h2:first-child,
.legal-content h3:first-child,
.legal-content h4:first-child,
.legal-content p:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
  margin: 0 0 1em;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.4rem;
}

.legal-content li + li {
  margin-top: 0.35em;
}

.legal-content a {
  color: var(--blue);
  font-weight: 700;
}

.legal-content code {
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

.legal-textarea {
  min-height: 260px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.settings-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 800;
}

.settings-tab:hover,
.settings-tab-active {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.settings-tab-panel {
  display: grid;
  gap: 18px;
}

.settings-tab-panel[hidden] {
  display: none;
}

.retention-setting {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(260px, 1fr);
  gap: 18px;
  align-items: end;
  max-width: 860px;
}

.retention-field {
  gap: 10px;
}

.input-with-unit {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-with-unit input {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.retention-copy {
  margin: 0 0 10px;
  max-width: 520px;
}

.field-hint {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.row-selector {
  width: auto;
}

.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.slot-grid input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.slot-grid label {
  position: relative;
}

.slot-grid input[type="radio"]:checked + .slot-button {
  border-color: rgba(15, 95, 140, 0.34);
  background: linear-gradient(135deg, #0f5f8c, #1f7cab);
  color: #fff;
}

.nav-link-static {
  cursor: default;
}

.app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  width: min(320px, calc(100vw - 28px));
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 28px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  transform: translateX(calc(-100% - 24px));
  transition: transform 180ms ease;
}

.sidebar .nav {
  grid-template-columns: 1fr;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .sidebar {
  transform: translateX(0);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: rgba(24, 48, 68, 0.34);
  backdrop-filter: blur(2px);
  box-shadow: none;
  cursor: pointer;
}

.menu-overlay[hidden] {
  display: none;
}

.menu-overlay:hover:not(:disabled) {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-close,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.sidebar-close {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.7rem;
  line-height: 1;
}

.menu-toggle {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.sidebar-close:hover,
.menu-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

body.menu-open .menu-toggle {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.topbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.topbar-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  transition: transform 140ms ease;
}

.topbar-logo-link:hover .topbar-logo {
  transform: translateY(-1px);
}

.topbar-title {
  min-width: 0;
}

.topbar-title h2 {
  overflow-wrap: anywhere;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.status-chip-session {
  gap: 12px;
  padding-right: 8px;
}

.status-session-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.status-session-label {
  color: var(--text);
  font-weight: 800;
}

.status-session-user {
  max-width: 180px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.86rem;
  text-overflow: ellipsis;
}

.status-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  margin-left: auto;
  padding: 0 13px;
  border-left: 1px solid var(--line);
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.status-logout:hover {
  color: var(--blue-strong);
}

.detail-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.detail-section-grid > .panel:first-child {
  grid-row: span 2;
}

.version-panel {
  width: min(760px, 100%);
}

.version-panel .compact-list-row,
.detail-section-grid .compact-list-row {
  grid-template-columns: minmax(0, 1fr);
}

.version-change-list {
  margin: 4px 0 0;
  padding-left: 1.25rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.version-change-list li + li {
  margin-top: 4px;
}

.version-history {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.version-history-item {
  display: grid;
  gap: 4px;
}

.version-history-item strong {
  color: var(--text);
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-main {
    width: 100%;
  }

  .status-cluster,
  .status-chip-session {
    width: 100%;
  }

  .status-session-user {
    max-width: none;
  }

  .detail-section-grid {
    grid-template-columns: 1fr;
  }

  .detail-section-grid > .panel:first-child {
    grid-row: auto;
  }

  .retention-setting {
    grid-template-columns: 1fr;
  }

  .settings-tab {
    width: 100%;
  }

  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }

  body.has-cookie-banner {
    padding-bottom: 210px;
  }

  .sidebar {
    width: min(300px, calc(100vw - 18px));
    padding: 18px;
  }

  .topbar-logo {
    width: 44px;
    height: 44px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .public-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .public-nav {
    width: 100%;
  }

  .public-nav-link {
    flex: 1;
    text-align: center;
  }

  .captcha-check {
    width: 100%;
  }

  .overview-row-dashboard {
    grid-template-columns: 1fr;
  }

  .overview-row-with-selection,
  .overview-row-with-selection.overview-row-with-actions {
    grid-template-columns: 1fr;
  }

  .overview-row-select,
  .overview-row-actions {
    justify-self: start;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-day {
    min-height: 148px;
  }
}
