/* ==========================================================================
   Dashboard design tokens
   ========================================================================== */

:root {
  --color-bg-app: #0b1020;
  --color-bg-sidebar: #111827;
  --color-bg-card: #151c2e;
  --color-bg-card-alt: #1b2438;
  --color-bg-input: #0f1525;
  --color-border: #2d374f;
  --color-border-subtle: #232d44;
  --dashboard-border: var(--color-border);
  --color-brand: #3b82f6;
  --color-brand-hover: #2563eb;
  --color-brand-muted: rgba(59, 130, 246, 0.14);
  --color-brand-focus: rgba(59, 130, 246, 0.28);
  --color-primary: var(--color-brand);
  --color-primary-hover: var(--color-brand-hover);
  --color-accent: #8b5cf6;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-text-subtle: #6b7280;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-width: 248px;
  --content-max-width: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-brand);
  text-decoration: none;
}

a:hover {
  color: var(--color-brand-hover);
  text-decoration: none;
  filter: brightness(1.12);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background: var(--color-bg-input);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--color-bg-sidebar);
  color: var(--color-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--color-border);
}

.dashboard-sidebar__brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: transparent;
}

.dashboard-sidebar__brand-link {
  display: block;
  line-height: 0;
  background: transparent;
}

.dashboard-sidebar__brand-link:hover,
.dashboard-sidebar__brand-link:focus-visible {
  filter: none;
}

.dashboard-sidebar__brand-logo {
  display: block;
  max-height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: none;
  background-color: transparent;
  mix-blend-mode: normal;
}

.dashboard-sidebar__brand h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-sidebar__business,
.dashboard-sidebar__business-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  word-break: break-word;
}

.dashboard-sidebar__business-info {
  margin-top: 0.875rem;
}

.dashboard-sidebar__business-type {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-subtle);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.business-switcher + .dashboard-sidebar__business-type {
  margin-top: 0.5rem;
}

.business-switcher {
  margin: 0.75rem 0 0;
}

.business-switcher__select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.business-switcher__select:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dashboard-body fieldset {
  border: 1px solid var(--dashboard-border);
  border-radius: var(--radius-md);
  margin: 0;
  padding: 0;
  min-width: 0;
}

fieldset:disabled input,
fieldset:disabled select,
fieldset:disabled textarea,
fieldset:disabled button {
  opacity: 0.55;
  cursor: not-allowed;
}

.dashboard-nav {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.625rem;
}

.dashboard-nav__label {
  padding: 0.9rem 0.875rem 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #5c6570);
}

.dashboard-sidebar__nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.dashboard-sidebar__footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.75rem 0.625rem 1rem;
  border-top: 1px solid var(--color-border-subtle);
}

.dashboard-nav-privacy {
  display: block;
  padding: 0.25rem 0.875rem 0.5rem;
  font-size: 0.8125rem;
}

.dashboard-nav-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: var(--color-danger);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-nav-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  text-decoration: none;
}

.dashboard-nav-logout:focus-visible {
  outline: 2px solid var(--color-danger);
  outline-offset: 2px;
}

.dashboard-nav-logout__icon {
  flex-shrink: 0;
}

.dashboard-nav li a {
  display: block;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.125rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-nav li a:hover {
  background: var(--color-bg-card-alt);
  color: var(--color-text);
  text-decoration: none;
}

.dashboard-nav li a.active {
  background: var(--color-brand-muted);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: inset 3px 0 0 var(--color-brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 1.75rem 2rem 2.5rem;
  overflow-x: auto;
}

.dashboard-main > .dashboard-page-header,
.dashboard-main > .messages,
.dashboard-main > .dashboard-header,
.dashboard-main > .dashboard-welcome,
.dashboard-main > .dashboard-top-row,
.dashboard-main > .stats-grid,
.dashboard-main > .dashboard-panels,
.dashboard-main > .card,
.dashboard-main > .dashboard-tabs,
.dashboard-main > .table-wrap,
.dashboard-main > .page-actions,
.dashboard-main > .booking-detail-bar,
.dashboard-main > .settings-page,
.dashboard-main > .settings-stack,
.dashboard-main > .email-settings-layout,
.dashboard-main > .detail-grid,
.dashboard-main > .form-actions,
.dashboard-main > .booking-calendar__header,
.dashboard-main > .booking-calendar__legend,
.dashboard-main > .booking-calendar__grid,
.dashboard-main > .calendar-day-list,
.dashboard-main > .confirm-warning,
.dashboard-main > .restriction-accordion,
.dashboard-main > .blocked-dates-messages,
.dashboard-main > .stats-grid--schedule,
.dashboard-main > .schedule-section {
  max-width: var(--content-max-width);
}

/* ==========================================================================
   Page headers
   ========================================================================== */

.dashboard-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  max-width: var(--content-max-width);
}

.dashboard-page-header__main {
  flex: 1;
  min-width: 0;
}

.dashboard-page-header__main h2,
.dashboard-page-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.dashboard-page-header__main p,
.dashboard-page-header > .dashboard-page-header__main > p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.dashboard-page-header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-top: 0.15rem;
}

.dashboard-page-header .dashboard-profile-menu {
  flex-shrink: 0;
  align-self: flex-start;
}

.dashboard-header {
  margin-bottom: 1.75rem;
}

.dashboard-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.dashboard-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.dashboard-header--with-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dashboard-header__main {
  min-width: 0;
}

.dashboard-header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.messages {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  max-width: var(--content-max-width);
}

.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
}

.message-success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.message-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.message-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.past-due-banner {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
}

.past-due-banner__content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.past-due-banner__message {
  margin: 0;
  color: #fcd34d;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.past-due-banner__cta {
  flex-shrink: 0;
}

.billing-setup-banner {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
}

.billing-setup-banner__content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.billing-setup-banner__message {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.billing-setup-banner__cta {
  flex-shrink: 0;
}

.onboarding-banner {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
}

.onboarding-banner__content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.onboarding-banner__message {
  margin: 0;
  color: #bbf7d0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.onboarding-banner__cta {
  flex-shrink: 0;
}

/* ==========================================================================
   Stat cards
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stats-grid--garage-overview {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .stats-grid--garage-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .stats-grid--garage-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .stats-grid--garage-overview {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.stat-card:hover {
  background: var(--color-bg-card-alt);
  border-color: #3d4f6f;
  transform: translateY(-1px);
}

.stat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--color-brand-muted);
  color: var(--color-brand);
}

.stat-card__value {
  font-size: 2.125rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.stat-card__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Cards & panels
   ========================================================================== */

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.pricing-options {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.pricing-options h3 {
  margin-top: 0;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

.dashboard-panels .card {
  margin-bottom: 0;
}

.dashboard-panel-footer {
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
}

.dashboard-panel-footer a {
  font-weight: 500;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card-alt);
}

table.dashboard-table,
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.dashboard-table {
  margin-top: 0.75rem;
}

.card > .table-wrap {
  margin: 0 -0.25rem;
}

table.dashboard-table th,
table.dashboard-table td,
table.data-table th,
table.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border-subtle);
}

table.data-table th {
  background: rgba(15, 21, 37, 0.6);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.dashboard-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  background: rgba(15, 21, 37, 0.6);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data-table tbody tr:last-child td,
table.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr:hover td,
table.dashboard-table tbody tr:hover td {
  background: var(--color-brand-muted);
}

table.dashboard-table input[type="text"],
table.dashboard-table input[type="number"] {
  width: 100%;
  min-width: 4rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--color-bg-input);
  color: var(--color-text);
}

.pricing-options__checkbox {
  text-align: center;
  white-space: nowrap;
}

.table-actions {
  white-space: nowrap;
}

.table-actions form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  vertical-align: middle;
}

.table-actions form + form {
  margin-left: 0.5rem;
}

.table-actions a {
  font-weight: 500;
  font-size: 0.8125rem;
}

.table-actions a + a {
  margin-left: 0.75rem;
}

.table-actions__danger {
  color: #f87171;
}

.table-actions__danger:hover {
  color: #fca5a5;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge-pending,
.badge-pending_payment {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-expired {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
}

.badge-completed {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-no_show,
.badge-draft {
  background: rgba(107, 114, 128, 0.15);
  color: var(--color-text-muted);
  border-color: rgba(107, 114, 128, 0.3);
}

.badge-available {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-sold_out {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-active {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.25);
}

.badge-inactive {
  background: rgba(107, 114, 128, 0.12);
  color: var(--color-text-muted);
  border-color: rgba(107, 114, 128, 0.25);
}

.badge-scheduled,
.badge-reserved {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-sent,
.badge-captured {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-released,
.badge-reversed {
  background: rgba(107, 114, 128, 0.12);
  color: var(--color-text-muted);
  border-color: rgba(107, 114, 128, 0.25);
}

.gift-settings-form:not(:has(#gift-custom-amount-enabled:checked)) .gift-custom-amount-fields {
  opacity: 0.55;
}

.gift-settings-form:not(:has(#gift-custom-amount-enabled:checked)) .gift-custom-amount-fields label {
  color: var(--color-text-muted);
}

.gift-terms-snapshot {
  white-space: pre-wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}

.btn-primary:hover {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--color-bg-card-alt);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: #243049;
  color: var(--color-text);
  border-color: #3d4f6f;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-secondary-warning {
  color: var(--color-warning);
  border-color: color-mix(in srgb, var(--color-warning) 55%, var(--color-border));
}

.btn-secondary-warning:hover {
  color: var(--color-warning);
  border-color: var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 12%, var(--color-bg-card-alt));
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8125rem;
}

.page-actions {
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.blocked-dates-messages {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
  margin-bottom: 1.125rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group input[type="color"],
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 480px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--color-bg-input);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-focus);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group .helptext {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.form-group .errorlist {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  color: #fca5a5;
  font-size: 0.8125rem;
}

.form-group--checkbox label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: normal;
  cursor: pointer;
}

.form-group--checkbox input {
  width: auto;
  max-width: none;
  accent-color: var(--color-brand);
}

.form-group--checkbox-inline {
  margin-bottom: 0.5rem;
}

.form-group--checkbox-inline label {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0;
  font-weight: 500;
  gap: 0.5rem;
}

.form-group--checkbox-inline label span {
  flex: 0 1 auto;
}

.form-group--checkbox-inline input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.searchable-select {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 480px;
}

.searchable-select__filter {
  width: 100%;
  max-width: 480px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--color-bg-input);
  color: var(--color-text);
}

.searchable-select__filter:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-focus);
}

.searchable-select select {
  width: 100%;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.form-actions__danger {
  margin-left: auto;
}

.bank-holidays-import {
  position: relative;
}

.bank-holidays-import__trigger {
  list-style: none;
}

.bank-holidays-import__trigger::-webkit-details-marker {
  display: none;
}

.bank-holidays-import__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 20;
  min-width: 280px;
  padding: 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
}

.bank-holidays-import__panel .form-group:last-of-type {
  margin-bottom: 0.75rem;
}

.bank-holidays-import__panel .form-actions {
  margin-top: 0;
}

.widget-link-box {
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  word-break: break-all;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.embed-code {
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.confirm-warning {
  margin: 1rem 0;
  padding: 0.875rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  color: #fcd34d;
  font-size: 0.9rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.625rem 1.25rem;
  font-size: 0.9rem;
}

.detail-grid dt {
  font-weight: 500;
  color: var(--color-text-muted);
}

.detail-grid dd {
  margin: 0;
  color: var(--color-text);
}

.detail-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.625rem;
}

.booking-detail-bar {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.booking-detail-bar__actions {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
}

.booking-detail-bar__actions form {
  margin: 0;
}

.calendar-update-form,
.calendar-cancel-form {
  margin: 0;
}

.calendar-cancel-form:has(.calendar-removal-note) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 22rem;
}

.calendar-removal-note {
  margin: 0;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
}

.booking-detail-danger {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.06);
}

.booking-detail-danger h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--color-text);
}

.booking-detail-danger p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 36rem;
}

@media (max-width: 520px) {
  .booking-detail-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .booking-detail-bar__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .booking-detail-bar__actions .btn {
    width: 100%;
    text-align: center;
  }

  .booking-detail-danger .btn {
    width: 100%;
    text-align: center;
  }
}

.colour-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.colour-row .form-group {
  flex: 1;
  min-width: 140px;
}

.colour-row input[type="color"] {
  max-width: 80px;
  height: 40px;
  padding: 3px;
  cursor: pointer;
}

.colour-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem 1rem;
}

.colour-grid .form-group {
  margin-bottom: 0;
}

.colour-grid input[type="color"] {
  width: 100%;
  max-width: 5rem;
  height: 2.5rem;
  padding: 0.1875rem;
  cursor: pointer;
}

.widget-colour-reset {
  margin-top: 0.875rem;
}

.widget-colour-reset__help {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.widget-advanced-colours {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.widget-advanced-colours__toggle {
  margin-bottom: 0.875rem;
}

.widget-advanced-colours__toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.widget-advanced-colours__help {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.widget-advanced-colours__fields[hidden] {
  display: none !important;
}

.widget-size-settings__toggle {
  margin-bottom: 0.875rem;
}

.widget-size-settings__toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.widget-size-settings__help {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.widget-size-settings__fixed-fields[hidden] {
  display: none !important;
}

.widget-advanced-colour-field__picker {
  width: 100%;
  max-width: 5rem;
  height: 2.5rem;
  padding: 0.1875rem;
  cursor: pointer;
}

.empty-state {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: 2rem 1rem;
  text-align: center;
}

.empty-state--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  margin: 0;
}

.col-emphasis {
  font-weight: 600;
  color: var(--color-text);
}

.col-muted {
  color: var(--color-text-subtle);
  font-size: 0.8125rem;
}

.data-table--dashboard td,
.data-table--dashboard th {
  padding: 0.875rem 1rem;
}

.table-wrap--compact {
  border: none;
  background: transparent;
}

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

.dashboard-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
  width: 100%;
}

.dashboard-top-row > * {
  min-width: 0;
}

.dashboard-top-row .dashboard-welcome {
  margin-bottom: 0;
}

.dashboard-top-row .dashboard-panel--actions {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .dashboard-top-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dashboard-panel {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-welcome {
  margin-bottom: 1.5rem;
  padding: 1.125rem 1.375rem;
  background: linear-gradient(
    135deg,
    var(--color-bg-card) 0%,
    color-mix(in srgb, var(--color-brand-muted) 40%, var(--color-bg-card)) 100%
  );
}

.dashboard-welcome__greeting {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.dashboard-welcome__detail {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.status-summary {
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.status-summary__row:last-child {
  border-bottom: none;
}

.status-summary__count {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
}

.quick-actions__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card-alt);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.quick-actions__item:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-muted);
  color: var(--color-text);
  text-decoration: none;
}

.quick-actions__item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Garage bookings list
   ========================================================================== */

.bookings-card {
  padding: 0;
  overflow: hidden;
}

.bookings-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(15, 21, 37, 0.35);
}

.bookings-toolbar__search {
  flex: 1 1 16rem;
  min-width: 0;
}

.bookings-toolbar__search input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.bookings-toolbar__search input[type="search"]:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
  border-color: var(--color-brand);
}

.bookings-toolbar__field {
  flex: 0 0 auto;
}

.bookings-toolbar__select {
  min-width: 8.5rem;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.bookings-toolbar__select:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
  border-color: var(--color-brand);
}

.bookings-toolbar__reset {
  flex-shrink: 0;
  white-space: nowrap;
}

.bookings-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.875rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(15, 21, 37, 0.2);
}

.bookings-summary__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.bookings-summary__count {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.bookings-summary__total {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
}

.table-wrap--bookings {
  border: none;
  border-radius: 0;
  background: transparent;
}

.card.bookings-card > .table-wrap--bookings {
  margin: 0;
}

table.data-table--clickable tbody tr.data-table__row--clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}

table.data-table--clickable tbody tr.data-table__row--clickable:hover td {
  background: var(--color-brand-muted);
}

table.data-table--bookings th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 21, 37, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.625rem 1rem;
}

table.data-table--bookings td {
  padding: 0.875rem 1rem;
}

table.data-table--bookings tbody tr.bookings-table__row {
  cursor: pointer;
  transition: background 0.12s ease;
}

table.data-table--bookings tbody tr.bookings-table__row:hover td,
table.data-table--bookings tbody tr.bookings-table__row:focus-visible td {
  background: var(--color-brand-muted);
}

table.data-table--bookings tbody tr.bookings-table__row:focus {
  outline: none;
}

table.data-table--bookings tbody tr.bookings-table__row:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-brand);
}

.empty-state--bookings {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-state--bookings .empty-state__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.empty-state--bookings .empty-state__detail {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.empty-state--bookings a {
  font-weight: 500;
}

@media (max-width: 768px) {
  .bookings-toolbar {
    flex-wrap: wrap;
  }

  .bookings-toolbar__search {
    flex: 1 1 100%;
  }

  .bookings-toolbar__field {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
  }

  .bookings-toolbar__field .bookings-toolbar__select {
    width: 100%;
    min-width: 0;
  }

  .bookings-toolbar__reset {
    flex: 1 1 100%;
    text-align: center;
  }

  .bookings-summary__total {
    margin-left: 0;
    flex: 1 1 100%;
  }
}

/* ==========================================================================
   Services & Resources
   ========================================================================== */

.resources-card {
  padding: 0;
  overflow: hidden;
}

.resources-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.resources-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.card.resources-card > .table-wrap--resources {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.table-wrap--resources {
  border: none;
  border-radius: 0;
  background: transparent;
}

table.data-table--resources th {
  padding: 0.625rem 1.125rem;
  background: rgba(15, 21, 37, 0.5);
}

table.data-table--resources td {
  padding: 0.8125rem 1.125rem;
}

table.data-table--resources .col-sort,
table.data-table--resources th.col-sort {
  color: var(--color-text-subtle);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

table.data-table--resources th.col-sort {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data-table--resources .col-secondary {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.resources-table__name {
  font-weight: 600;
  color: var(--color-text);
}

table.data-table--resources tbody tr.resources-table__row {
  transition: background 0.12s ease;
}

table.data-table--resources tbody tr.resources-table__row:hover td {
  background: var(--color-brand-muted);
}

.resource-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.resource-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-text-muted);
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.resource-pill--muted {
  color: var(--color-text-subtle);
  background: transparent;
  border-style: dashed;
  border-color: var(--color-border);
}

.table-actions--resources {
  text-align: right;
}

.table-actions--resources a {
  font-size: 0.8125rem;
}

.table-actions--resources .table-actions__danger {
  color: #f87171;
  opacity: 0.85;
}

.table-actions--resources .table-actions__danger:hover {
  color: #fca5a5;
  opacity: 1;
}

.resources-help-note {
  margin: 0;
  padding: 0.75rem 1.375rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: color-mix(in srgb, #fcd34d 70%, var(--color-text-muted));
  background: rgba(245, 158, 11, 0.05);
  border-top: 1px solid rgba(245, 158, 11, 0.12);
}

.empty-state--resources {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-state--resources .empty-state__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.empty-state--resources .empty-state__detail {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.empty-state--resources .btn {
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .resources-card__header {
    flex-wrap: wrap;
    padding: 1rem 1.125rem;
  }

  .resources-card__header .btn {
    width: 100%;
    justify-content: center;
  }

  table.data-table--resources th,
  table.data-table--resources td {
    padding: 0.75rem 0.875rem;
  }
}

/* ==========================================================================
   Email settings layout (preview styles intentionally unchanged below)
   ========================================================================== */

.email-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 1.25rem;
  align-items: start;
}

.email-settings-layout__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  /* Reserve fixed save-bar space after both settings and test forms. */
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.email-settings-layout__main > .settings-page {
  padding-bottom: 0;
}

.email-settings-layout__main > .settings-page .settings-stack {
  margin-bottom: 0;
}

.email-test-send-form {
  max-width: var(--content-max-width);
  margin: 0;
}

.email-test-send-form__note {
  margin: 0 0 1rem;
}

.email-test-send-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.email-settings-layout__preview {
  min-width: 0;
}

.email-settings-preview {
  position: sticky;
  top: 1rem;
}

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

  .email-settings-preview {
    position: static;
  }
}

.email-settings-current-image img {
  display: block;
  max-width: 100%;
  max-height: 120px;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
}

.email-settings-preview h3 {
  margin-top: 0;
}

.gift-emails-layout.email-settings-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
}

.gift-email-preview-panel {
  position: sticky;
  top: 1rem;
}

.gift-email-preview-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gift-email-preview-nav__current {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.gift-email-preview-nav__kind {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.gift-email-preview-nav__meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.gift-email-preview-controls__label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.gift-email-preview-product,
.gift-email-preview-recipient-controls {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.gift-email-product-sample,
.gift-email-design-picker,
.gift-email-recipient-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.gift-email-product-sample__btn.is-active,
.gift-email-design-picker__btn.is-active,
.gift-email-recipient-mode__btn.is-active {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

.gift-email-preview-frame-outer {
  background: #e8eaed;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.gift-email-preview-frame {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 6px;
  background: #fff;
}

.gift-email-test-summary {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.gift-email-preview-loading {
  margin-top: 0.5rem;
}

.data-table .input-table {
  box-sizing: border-box;
  width: 100%;
  min-width: 5.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  background: var(--color-bg-input);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.data-table .input-table:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-focus);
}

.gift-products .form-actions {
  margin-top: 0.75rem;
}

.gift-products__existing {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}

.gift-products__existing .empty-state {
  margin: 0;
}

.gift-products .data-table th,
.gift-products .data-table td {
  padding: 0.4rem 0.55rem;
}

.gift-certificate-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gift-certificate-summary__item {
  margin: 0;
}

.gift-certificate-summary__label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.gift-certificate-summary__value {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 900px) {
  .gift-email-preview-panel {
    position: static;
  }

  .gift-email-preview-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .gift-email-preview-nav__arrow {
    flex: 0 0 auto;
  }

  .gift-email-preview-nav__current {
    flex: 1 1 100%;
    order: -1;
    padding-bottom: 0.25rem;
  }
}

.email-preview-frame {
  padding: 1.5rem;
  border-radius: 8px;
  background: #e8eaed;
}

.email-preview-card {
  max-width: 600px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.12), 0 1px 2px rgba(17, 24, 39, 0.06);
}

.email-preview-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.email-preview-header img {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.email-preview-body {
  padding: 1.5rem 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.email-preview-body p {
  margin: 0 0 0.75rem;
}

.email-preview-body p:last-child {
  margin-bottom: 0;
}

.email-preview-additional-message {
  margin-top: 1rem;
}

.email-preview-footer {
  padding: 1.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  margin-top: 1.25rem;
}

.email-preview-footer p {
  margin: 0 0 0.5rem;
}

.email-preview-footer p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Top bar & tabs
   ========================================================================== */

.dashboard-profile-menu {
  position: relative;
}

.dashboard-profile-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg-card);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-profile-menu__avatar:hover {
  background: var(--color-bg-card-alt);
  border-color: #3d4f6f;
}

.dashboard-profile-menu__avatar:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.dashboard-profile-menu__initials {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.dashboard-profile-menu__icon {
  display: block;
}

.dashboard-profile-menu__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 30;
  min-width: 11rem;
  padding: 0.375rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
}

.dashboard-profile-menu__item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: calc(var(--radius-md) - 2px);
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-profile-menu__item:hover {
  background: var(--color-bg-card-alt);
  color: var(--color-text);
  text-decoration: none;
}

.dashboard-profile-menu__item--danger {
  color: var(--color-danger);
}

.dashboard-profile-menu__item--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.dashboard-profile-menu__divider {
  height: 1px;
  margin: 0.375rem 0;
  background: var(--color-border-subtle);
}

.dashboard-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.dashboard-tabs__tab {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: calc(var(--radius-md) - 2px);
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-tabs__tab:hover {
  color: var(--color-text);
  background: var(--color-bg-card-alt);
  text-decoration: none;
}

.dashboard-tabs__tab.is-active {
  color: #fff;
  font-weight: 600;
  background: var(--color-brand);
  box-shadow: 0 1px 3px var(--color-brand-focus);
}

.dashboard-tabs__tab.is-active:hover {
  color: #fff;
  background: var(--color-brand-hover);
}

/* ==========================================================================
   Schedule
   ========================================================================== */

.stats-grid--schedule {
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  margin-bottom: 1.25rem;
}

.stat-card--schedule {
  padding: 0.875rem 1rem;
}

.stat-card--schedule .stat-card__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.5rem;
}

.stat-card--schedule .stat-card__value {
  font-size: 1.5rem;
}

.stat-card--schedule .stat-card__label {
  font-size: 0.75rem;
  line-height: 1.35;
}

.stat-card__value--text {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.schedule-section {
  margin-bottom: 0;
}

.schedule-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.schedule-section__header h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.schedule-section__intro {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  max-width: 42rem;
  line-height: 1.5;
}

.schedule-section__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.action-menu {
  position: relative;
}

.action-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
}

.action-menu__trigger::-webkit-details-marker {
  display: none;
}

.action-menu__panel {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 20;
  min-width: 18rem;
  max-width: 22rem;
  padding: 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.action-menu__title {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.action-menu__description {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.action-menu__panel .form-group:last-of-type {
  margin-bottom: 0.75rem;
}

.action-menu__panel .form-actions {
  margin: 0;
}

.opening-hours-form .form-actions,
.schedule-settings-form .form-actions {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
}

.schedule-settings-form__actions {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}

.opening-hours-form fieldset,
.schedule-settings-form fieldset,
.settings-page fieldset,
.restriction-options,
.scheduling-accordion fieldset,
.resource-blackout-add fieldset,
.resource-break-add fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.opening-hours {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.opening-hours__header {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) 4.5rem minmax(6rem, 1fr) minmax(6rem, 1fr);
  gap: 0.75rem 1rem;
  padding: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-subtle);
}

.opening-hours__row {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) 4.5rem minmax(6rem, 1fr) minmax(6rem, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.opening-hours__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.opening-hours__day {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
}

.opening-hours__day-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.4;
}

.opening-hours__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.opening-hours__col--closed .form-group--checkbox {
  margin: 0;
}

.opening-hours__col--time input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--color-bg-input);
  color: var(--color-text);
}

.opening-hours__col--time input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-focus);
}

.opening-hours__errors {
  padding: 0.35rem 0 0.75rem;
}

.blocked-dates-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.blocked-date-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-card-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.blocked-date-card:hover {
  border-color: var(--color-border);
  background: rgba(15, 21, 37, 0.35);
}

.blocked-date-card__date {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.blocked-date-card__reason {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.blocked-date-card__actions {
  flex-shrink: 0;
}

.empty-state--schedule {
  padding: 2rem 1rem;
  text-align: center;
}

.empty-state--schedule .empty-state__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

.empty-state--schedule .empty-state__detail {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.schedule-settings-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.schedule-settings-section__title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.schedule-settings-section__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.schedule-setting {
  padding: 0.875rem 1rem;
  background: var(--color-bg-card-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.schedule-setting__title {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.schedule-setting__description {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.schedule-setting__header .schedule-setting__description {
  margin-bottom: 0.625rem;
}

.schedule-setting__controls--value-unit {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.schedule-setting__controls--value-unit .form-group--value {
  flex: 1 1 0;
  min-width: 0;
}

.schedule-setting__controls--value-unit .form-group--unit {
  flex: 0 1 6.5rem;
  min-width: 0;
}

.schedule-setting__input-suffix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.schedule-setting__input-suffix input {
  flex: 1 1 0;
  min-width: 0;
  max-width: 6rem;
}

.schedule-setting__suffix {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.schedule-setting .form-group {
  margin-bottom: 0;
}

.schedule-setting .form-group input,
.schedule-setting .form-group select {
  width: 100%;
  max-width: none;
}

.schedule-setting--cancellation {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.schedule-setting__description--lead {
  margin: 0;
}

.schedule-setting__toggle {
  margin: 0;
}

.schedule-setting__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

.schedule-setting__checkbox input {
  margin: 0;
}

.schedule-setting__footnote {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.schedule-setting__notice {
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
  transition: opacity 0.15s ease;
}

.customer-settings-form:not(:has(#id_customer_self_service_enabled:checked)) .schedule-setting--permitted-actions,
.customer-settings-form:not(:has(#id_customer_self_service_enabled:checked)) .schedule-setting--changes-notice {
  opacity: 0.45;
  pointer-events: none;
}

.customer-settings-form:not(:has(#id_customer_self_service_enabled:checked)) .schedule-setting--permitted-actions input,
.customer-settings-form:not(:has(#id_customer_self_service_enabled:checked)) .schedule-setting--permitted-actions select,
.customer-settings-form:not(:has(#id_customer_self_service_enabled:checked)) .schedule-setting--changes-notice input,
.customer-settings-form:not(:has(#id_customer_self_service_enabled:checked)) .schedule-setting--changes-notice select {
  cursor: not-allowed;
}

.schedule-section--settings .schedule-section__header {
  margin-bottom: 1rem;
}

/* Legacy setting-card aliases kept for any includes still using them */
.schedule-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.setting-card {
  padding: 1rem 1.125rem;
  background: var(--color-bg-card-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.setting-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.setting-card__description {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.setting-card__fields--inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.setting-card__fields--notice {
  grid-template-columns: minmax(0, 1fr) minmax(7rem, 8.5rem);
  align-items: end;
}

.schedule-settings-grid {
  align-items: stretch;
}

.setting-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.setting-card__fields--notice .form-group input,
.setting-card__fields--notice .form-group select,
.setting-card__fields--inline .form-group input,
.setting-card__fields--inline .form-group select {
  max-width: none;
  width: 100%;
}

.setting-card .form-group {
  margin-bottom: 0;
}

.setting-card .form-group input,
.setting-card .form-group select {
  max-width: none;
}

.setting-card .helptext {
  margin-top: 0.5rem;
}

/* ==========================================================================
   Calendar
   ========================================================================== */

.calendar-day-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calendar-day__heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.booking-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.booking-calendar__month-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.booking-calendar__status-filter {
  margin: 0;
}

.booking-calendar__status-filter .form-group {
  margin: 0;
}

.booking-calendar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.booking-calendar__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.booking-calendar__legend-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  border-left-width: 3px;
  border-left-style: solid;
}

.booking-calendar__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.booking-calendar__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-bg-card);
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.booking-calendar__nav:hover {
  background: var(--color-bg-card-alt);
  border-color: #3d4f6f;
  text-decoration: none;
  color: var(--color-text);
}

.booking-calendar__grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.booking-calendar__grid th,
.booking-calendar__grid td {
  border: 1px solid var(--color-border-subtle);
  vertical-align: top;
  text-align: left;
}

.booking-calendar__grid th {
  padding: 0.625rem 0.75rem;
  background: rgba(15, 21, 37, 0.8);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.booking-calendar__day {
  min-height: 7rem;
  padding: 0.5rem;
  background: var(--color-bg-card);
}

.booking-calendar__day.is-outside-month {
  background: rgba(15, 21, 37, 0.5);
  color: var(--color-text-subtle);
}

.booking-calendar__day-number {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.booking-calendar__entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.booking-calendar__entry {
  display: block;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.35;
}

.booking-calendar__entry--pending_payment {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-left-color: var(--color-warning);
}

.booking-calendar__entry--confirmed {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  border-left-color: var(--color-success);
}

.booking-calendar__entry--completed {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  border-left-color: var(--color-primary);
}

.booking-calendar__entry--cancelled {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-left-color: var(--color-danger);
}

.booking-calendar__entry--expired {
  background: rgba(139, 92, 246, 0.18);
  color: #ddd6fe;
  border-left-color: var(--color-accent);
}

.booking-calendar__entry--no_show {
  background: rgba(107, 114, 128, 0.18);
  color: var(--color-text-muted);
  border-left-color: #6b7280;
}

.booking-calendar__entry--pending_payment:hover {
  background: rgba(245, 158, 11, 0.28);
}

.booking-calendar__entry--confirmed:hover {
  background: rgba(34, 197, 94, 0.28);
}

.booking-calendar__entry--completed:hover {
  background: rgba(59, 130, 246, 0.28);
}

.booking-calendar__entry--cancelled:hover {
  background: rgba(239, 68, 68, 0.28);
}

.booking-calendar__entry--expired:hover {
  background: rgba(139, 92, 246, 0.28);
}

.booking-calendar__entry--no_show:hover {
  background: rgba(107, 114, 128, 0.28);
}

.booking-calendar__entry:hover {
  text-decoration: none;
}

.booking-calendar__entry-status {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  margin-bottom: 0.1rem;
}

.booking-calendar__entry-time {
  display: block;
  font-weight: 600;
}

.booking-calendar__entry-customer,
.booking-calendar__entry-service {
  display: block;
}

/* ==========================================================================
   Drawer / modal
   ========================================================================== */

.dashboard-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(4px);
  z-index: 90;
}

.dashboard-drawer-backdrop.is-open {
  display: block;
}

.dashboard-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100vh;
  background: var(--color-bg-card);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
  z-index: 100;
  flex-direction: column;
}

.dashboard-drawer.is-open {
  display: flex;
}

.dashboard-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.dashboard-drawer__header h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dashboard-drawer__close {
  border: 0;
  background: var(--color-bg-card-alt);
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-drawer__close:hover {
  background: #243049;
  color: var(--color-text);
}

.dashboard-drawer__body {
  padding: 1.5rem;
  overflow-y: auto;
  color: var(--color-text-muted);
}

body.dashboard-drawer-open {
  overflow: hidden;
}

/* ==========================================================================
   Accordions & scheduling
   ========================================================================== */

.restriction-accordion {
  margin: 1.25rem 0 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card-alt);
}

.restriction-accordion__summary {
  padding: 0.875rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--color-text);
}

.restriction-accordion__summary::-webkit-details-marker {
  display: none;
}

.restriction-accordion__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
  color: var(--color-text-muted);
}

.restriction-accordion[open] .restriction-accordion__summary::before {
  transform: rotate(90deg);
}

.restriction-accordion__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--color-border);
}

.restriction-accordion__hint {
  margin: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.restriction-accordion__all label {
  font-weight: 500;
}

.restriction-accordion__specific {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}

.restriction-accordion__specific[hidden] {
  display: none;
}

.resource-restriction-form .restriction-accordion__specific ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.resource-restriction-form .restriction-accordion__specific li {
  margin: 0.35rem 0;
}

.scheduling-accordion__custom-label {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.scheduling-accordion__custom[hidden] {
  display: none;
}

.scheduling-accordion__section-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.scheduling-accordion__subsection-title {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.95rem;
}

.scheduling-accordion__new-blocked {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}

.scheduling-accordion__breaks-toggle {
  margin-top: 1rem;
}

.scheduling-accordion__breaks-hint {
  margin-top: 0.5rem;
}

.scheduling-accordion__breaks[hidden] {
  display: none;
}

.scheduling-accordion__breaks {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-app);
  padding: 1.5rem;
}

.login-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-elevated);
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.login-card p {
  margin: 0 0 1.75rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .dashboard-main {
    padding: 1.25rem 1rem 2rem;
  }

  .dashboard-header h2 {
    font-size: 1.375rem;
  }

  .dashboard-header--with-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-header__actions {
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

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

@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .form-actions-bar {
    left: 0;
    width: 100%;
  }

  .dashboard-sidebar {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .dashboard-sidebar__nav {
    flex: none;
    overflow-y: visible;
  }

  .dashboard-main {
    margin-left: 0;
  }

  .dashboard-page-header {
    flex-wrap: wrap;
  }

  .dashboard-page-header__actions {
    order: 3;
    width: 100%;
    padding-top: 0;
  }

  .dashboard-page-header .dashboard-profile-menu {
    order: 2;
    margin-left: auto;
  }

  .dashboard-sidebar__footer {
    margin-top: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
  }

  .dashboard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem 0.75rem;
  }

  .dashboard-nav li {
    flex: 1 1 auto;
  }

  .dashboard-nav li.dashboard-nav__label {
    flex: 1 1 100%;
    padding-top: 0.5rem;
  }

  .dashboard-nav li a {
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
  }

  .dashboard-nav li a.active {
    box-shadow: inset 0 -3px 0 var(--color-brand);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }

  .dashboard-tabs {
    width: 100%;
  }

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

  .schedule-settings-section__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-setting__controls--value-unit .form-group--unit {
    flex-basis: 5.5rem;
  }

  .opening-hours__header {
    display: none;
  }

  .opening-hours__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "day closed"
      "open close";
    gap: 0.5rem 0.75rem;
    padding: 1rem 0;
  }

  .opening-hours__col--day {
    grid-area: day;
  }

  .opening-hours__col--closed {
    grid-area: closed;
    justify-self: end;
  }

  .opening-hours__col--time:first-of-type {
    grid-area: open;
  }

  .opening-hours__col--time:last-of-type {
    grid-area: close;
  }

  .opening-hours__col--time::before {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
  }

  .opening-hours__row .opening-hours__col--time:nth-child(3)::before {
    content: "Open";
  }

  .opening-hours__row .opening-hours__col--time:nth-child(4)::before {
    content: "Close";
  }

  .schedule-section__header {
    flex-direction: column;
  }

  .schedule-section__actions {
    width: 100%;
  }

  .schedule-section__actions .btn-primary {
    flex: 1;
  }

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

  .blocked-date-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .booking-calendar__header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .resource-form-layout__aside {
    order: 2;
  }

  .resource-form-layout__main {
    order: 1;
  }

  .resource-blackout-add__fields {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Technician resource form
   ========================================================================== */

.resource-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1.25rem;
  align-items: start;
  max-width: var(--content-max-width);
}

.resource-form-card {
  margin-bottom: 0;
}

.resource-form-section {
  margin-bottom: 0.5rem;
}

.resource-form-section__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.restriction-accordion__hint--lead {
  margin-top: 0;
}

.restriction-options {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.restriction-options__option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-input);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.restriction-options__option:has(input:checked) {
  border-color: var(--color-brand);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

.restriction-options__radio {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--color-brand);
}

.restriction-options__content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.restriction-options__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.restriction-options__description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.restriction-accordion--modern .restriction-accordion__specific {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-card-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.form-toggle__label {
  min-width: 0;
}

.form-toggle__title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-toggle__description {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.form-toggle__switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.form-toggle__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-toggle__track {
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  background: var(--color-border);
  border-radius: 999px;
  transition: background 0.15s ease;
}

.form-toggle__track::after {
  content: "";
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.form-toggle__switch input:checked + .form-toggle__track {
  background: var(--color-brand);
}

.form-toggle__switch input:checked + .form-toggle__track::after {
  transform: translateX(1.25rem);
}

.form-toggle__switch input:focus-visible + .form-toggle__track {
  box-shadow: 0 0 0 3px var(--color-brand-focus);
}

.resource-summary-card {
  margin-bottom: 0;
  position: sticky;
  top: 1rem;
}

.resource-summary-card__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.resource-summary-card__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.resource-summary-card__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.resource-summary-card__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resource-summary-card__item dt {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.resource-summary-card__item dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}

.scheduling-accordion__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scheduling-nested-accordion {
  margin-top: 0;
}

.scheduling-nested-accordion .restriction-accordion__body {
  padding-top: 0.75rem;
}

.resource-blackout-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.resource-blackout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-card-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.resource-blackout-item__dates {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.resource-blackout-item__reason {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.resource-blackout-item__delete {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fca5a5;
  cursor: pointer;
}

.resource-blackout-item__delete input {
  accent-color: var(--color-brand);
}

.resource-blackout-add {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-subtle);
}

.resource-blackout-add__title {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.resource-blackout-add__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}

.technician-form,
.bay-form,
.service-form {
  padding-bottom: 5.5rem;
}

.form-actions-bar {
  position: fixed;
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  bottom: 0;
  z-index: 30;
  padding: 0.875rem 1.5rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--color-bg-app) 92%, transparent);
  border-top: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.form-actions-bar__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.form-actions-bar .form-actions {
  margin-top: 0;
}

/* ==========================================================================
   Settings pages
   ========================================================================== */

.settings-page {
  max-width: var(--content-max-width);
  /* Always reserve space for the fixed save bar so showing/hiding it
     never shifts cards or other content below the form. */
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.settings-stack .settings-stack {
  margin-bottom: 0;
}

.widget-settings-layout__form > .settings-stack > .widget-settings-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.settings-card {
  background: var(--color-bg-card);
  border: 1px solid var(--dashboard-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.375rem;
  box-shadow: var(--shadow-card);
}

.settings-card__header {
  margin-bottom: 1rem;
}

.settings-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.settings-card__description {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.settings-privacy-notice {
  position: static;
  max-width: 100%;
  margin: 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--dashboard-border);
  border-left: 3px solid var(--color-text);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
}

.settings-privacy-notice p {
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
}

.settings-calendar-actions {
  position: static;
  max-width: 100%;
  margin-top: 1.25rem;
}

.settings-calendar-actions form,
.settings-calendar-actions .btn {
  position: static;
  max-width: 100%;
  white-space: normal;
}

.settings-privacy-notice a {
  font-weight: 600;
}

.settings-card__preview-label {
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-card__fields {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.settings-card__fields--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.875rem 1rem;
}

.settings-card__fields--grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem 1rem;
}

.settings-card__fields--grid-platform {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem 1rem;
}

.settings-card__fields--grid-2 .form-group--full-row,
.settings-card__fields--grid-platform .form-group--full-row {
  grid-column: 1 / -1;
}

.settings-card__fields .form-group:last-child {
  margin-bottom: 0;
}

.settings-card--danger {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}

.settings-card--danger .settings-card__title {
  color: #fca5a5;
}

.stripe-credential-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.stripe-credential-row .stripe-credential-field {
  flex: 1 1 16rem;
  min-width: 0;
}

.stripe-credential-field--locked {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-text) 4%, var(--color-surface));
  cursor: default;
}

.settings-card--error {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
  max-width: var(--content-max-width);
  margin-bottom: 1rem;
}

.settings-card--status {
  max-width: var(--content-max-width);
}

.widget-fields-settings__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.widget-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--color-bg-card-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.widget-field-row__name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text);
  min-width: 0;
}

.widget-field-row__controls {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.75rem;
}

.widget-field-row__control {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}

.widget-field-row__control-label {
  white-space: nowrap;
}

.widget-field-row__control input[type="checkbox"] {
  margin: 0;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--color-brand);
}

.widget-field-row__control--require {
  min-width: 5.75rem;
  justify-content: flex-end;
}

.widget-fields-settings__custom-message {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-subtle);
}

.widget-services-list-message__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-card-alt);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.widget-services-list-message__toggle:focus-visible {
  outline: 2px solid var(--color-brand-focus);
  outline-offset: 2px;
}

.widget-services-list-message__chevron {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.widget-services-list-message__toggle.is-expanded .widget-services-list-message__chevron {
  transform: rotate(45deg);
}

.widget-field-row--message-toggle {
  align-items: flex-start;
}

.widget-fields-settings__message-field textarea {
  width: 100%;
  min-height: 5rem;
  resize: vertical;
}

.widget-fields-settings__custom-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
}

.widget-fields-settings__custom-fields-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-custom-fields-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.widget-custom-field-definition {
  padding-bottom: 0.25rem;
}

.widget-custom-field-definition + .widget-custom-field-definition {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-subtle);
}

.widget-custom-field-definition__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.widget-custom-field-definition__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.widget-custom-fields-add {
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .widget-custom-field-definition__header {
    flex-direction: column;
    align-items: stretch;
  }

  .widget-custom-field-definition__header .btn {
    width: 100%;
  }
}

.widget-field-row__control--inactive {
  opacity: 0.4;
  cursor: not-allowed;
}

.settings-readonly-note {
  margin: 0 0 1rem;
}

.settings-save-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.settings-save-bar__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.settings-save-bar .form-actions {
  margin-left: auto;
}

.settings-url-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.625rem;
}

.settings-url-row__value {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.settings-url-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.settings-install-section {
  margin-top: 0.25rem;
}

.settings-install-section__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.settings-install-section__description {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.settings-card--install .settings-card__header {
  margin-bottom: 0.75rem;
}

.settings-install-accordions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-install-accordion {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-card-alt);
}

.settings-install-accordion__summary {
  padding: 0.625rem 0.875rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  list-style: none;
  color: var(--color-text);
}

.settings-install-accordion__summary::-webkit-details-marker {
  display: none;
}

.settings-install-accordion__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
  color: var(--color-text-muted);
}

.settings-install-accordion[open] .settings-install-accordion__summary::before {
  transform: rotate(90deg);
}

.settings-install-accordion__body {
  padding: 0 0.875rem 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}

.settings-install-accordion__description {
  margin: 0.625rem 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.settings-install-accordion .code-block {
  margin-bottom: 0.625rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
}

.settings-install-accordion .helptext {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

.code-block {
  background: var(--color-bg-input);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.widget-link-box {
  border: none;
}

.embed-code {
  border: none;
}

.widget-settings-layout {
  max-width: 1120px;
  --widget-preview-frame-height: min(56rem, calc(100vh - 14rem));
}

.widget-settings-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.widget-settings-layout__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 1.5rem;
  align-items: start;
}

.widget-settings-layout__form {
  min-width: 0;
}

.widget-settings-layout__preview {
  min-width: 0;
  position: sticky;
  top: 1rem;
  align-self: start;
}

.widget-live-preview {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.widget-live-preview__header {
  flex-shrink: 0;
}

.widget-live-preview__frame-wrap {
  position: relative;
  flex: 1 1 auto;
  height: var(--widget-preview-frame-height);
  min-height: 32rem;
  max-height: var(--widget-preview-frame-height);
  border: none;
  border-radius: var(--radius-md);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--color-bg-input);
}

.widget-live-preview__iframe {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.widget-live-preview__note {
  flex-shrink: 0;
  margin: 0.625rem 0 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.settings-readonly-value {
  margin: 0;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  color: var(--color-text);
}

.account-status-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.account-status-list__item {
  display: grid;
  gap: 0.15rem;
}

.account-status-list__item dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.account-status-list__item dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

.account-status-message--warning {
  color: var(--color-text);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-brand-muted);
}

.resource-blackout-add__list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.resource-blackout-add__row {
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.resource-blackout-add__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resource-blackout-add__actions {
  margin-top: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resource-break-add__list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.resource-break-add__row {
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.resource-break-add__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resource-break-add__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}

.resource-break-add__actions {
  margin-top: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-status-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-status-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.settings-status-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-status-list__item dt {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.settings-status-list__item dd {
  margin: 0;
}

.settings-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.settings-status--active {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.settings-status--inactive {
  background: var(--color-bg-input);
  color: var(--color-text-muted);
}

.settings-status--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.settings-allowance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
}

.settings-allowance__count {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.settings-allowance__detail {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.settings-allowance-warning {
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.settings-allowance-warning--low {
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.settings-allowance-warning--exhausted {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.dashboard-sidebar__sms-usage {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.sms-meter__bar {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-border-subtle, #e5e7eb);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.sms-meter__fill {
  height: 100%;
  background: var(--dashboard-accent, #155e91);
  border-radius: 999px;
  min-width: 0;
  max-width: 100%;
}

.sms-meter__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.sms-meter__stats dt {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
}

.sms-meter__stats dd {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.sms-meter__period,
.sms-meter__detail,
.sms-meter__unlimited {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.sms-meter__unlimited {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .settings-card__fields--grid,
  .settings-card__fields--grid-2,
  .settings-card__fields--grid-platform {
    grid-template-columns: 1fr;
  }

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

  .widget-field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
  }

  .widget-field-row__controls {
    justify-content: flex-start;
  }

  .widget-settings-layout__main {
    grid-template-columns: 1fr;
  }

  .widget-settings-layout__preview {
    position: static;
    top: auto;
  }

  .widget-live-preview__frame-wrap {
    flex: none;
    height: auto;
    min-height: 16rem;
    max-height: min(55vh, 32rem);
  }

  .settings-page {
    /* Stacked save-bar controls need a taller reserved footer on narrow screens. */
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }

  .email-settings-layout__main {
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }

  .email-settings-layout__main > .settings-page {
    padding-bottom: 0;
  }

  .settings-save-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .settings-save-bar .form-actions {
    margin-left: 0;
    width: 100%;
  }

  .settings-save-bar .form-actions .btn {
    flex: 1 1 auto;
  }

  .settings-url-row {
    flex-direction: column;
  }

  .settings-url-row__actions {
    width: 100%;
  }

  .settings-url-row__actions .btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   Manual booking form
   ========================================================================== */

.manual-booking-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 960px;
}

.manual-booking-form__section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.manual-booking-form__section .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.manual-booking-form__actions {
  margin-top: 0.5rem;
}

.manual-booking-form__errors {
  border-color: var(--color-danger, #ef4444);
  color: var(--color-danger, #ef4444);
}

/* Privacy settings */
.privacy-settings-form .settings-card__header {
  margin-bottom: 0.875rem;
}

.privacy-settings-form .settings-card__fields {
  gap: 0.75rem;
}

.privacy-settings-form .privacy-retention-field {
  margin-bottom: 0;
  max-width: 16rem;
}

.privacy-settings-form .schedule-setting__footnote--warning {
  color: var(--color-text);
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.privacy-settings-form .schedule-setting__footnote--warning[hidden] {
  display: none;
}

.privacy-custom-notice {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.privacy-custom-notice.is-open {
  grid-template-rows: 1fr;
}

.privacy-custom-notice__inner {
  overflow: hidden;
  min-height: 0;
}

.privacy-custom-notice__field {
  margin-bottom: 0;
  padding-top: 0.25rem;
}

.privacy-custom-notice__textarea,
.privacy-settings-form .privacy-custom-notice__field textarea {
  width: 100%;
  max-width: none;
  min-height: 270px;
  height: 270px;
  resize: vertical;
}

.privacy-notice-preview-action {
  padding-top: 0.875rem;
  margin-top: 0.25rem;
}

.privacy-settings-form .privacy-notice-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

@media (max-width: 640px) {
  .privacy-settings-form .privacy-retention-field {
    max-width: none;
  }

  .privacy-custom-notice__textarea,
  .privacy-settings-form .privacy-custom-notice__field textarea {
    min-height: 220px;
    height: 220px;
  }
}


