@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Manrope:wght@600;700;800&display=swap");

/* ==========================================================================
   Design tokens
   Every component reads from these. Dark mode only redefines tokens.
   ========================================================================== */

:root {
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Manrope", "DM Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef2f4;
  --border: #e3e9ec;
  --border-strong: #cdd8dd;

  --text: #0f2432;
  --text-2: #435d6b;
  --text-3: #6d818c;

  --primary: #0c2636;
  --primary-hover: #183d52;
  --on-primary: #ffffff;

  --accent: #0f8f89;
  --accent-hover: #0b7a75;
  --accent-soft: #e2f5f3;
  --accent-text: #0b746f;

  --danger: #d14343;
  --danger-hover: #b93636;
  --danger-soft: #fdeeee;
  --danger-text: #b23a3a;

  --success-bg: #e4f6ed;
  --success-fg: #0b7a55;
  --warning-bg: #fff3d9;
  --warning-fg: #8f5d0b;
  --danger-bg: #fdecec;
  --danger-fg: #b03838;
  --info-bg: #e6f1fb;
  --info-fg: #1c67a1;
  --violet-bg: #efeafb;
  --violet-fg: #6449ab;
  --neutral-bg: #eef2f4;
  --neutral-fg: #546a76;

  --sidebar-bg: #0b1f2c;
  --sidebar-border: #ffffff14;
  --sidebar-text: #9ab0bc;
  --sidebar-text-strong: #ffffff;
  --sidebar-hover: #ffffff0d;
  --sidebar-active: #ffffff17;

  --ring: 0 0 0 3px #0f8f8930;
  --shadow-sm: 0 1px 2px #10243208;
  --shadow-md: 0 1px 2px #10243208, 0 6px 20px #1024320a;
  --shadow-lg: 0 24px 70px #04121d47;
  --backdrop: #061520b3;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --control-h: 38px;

  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a161e;
  --surface: #0f212d;
  --surface-2: #132936;
  --surface-3: #193342;
  --border: #203949;
  --border-strong: #2c4b5d;

  --text: #e4edf1;
  --text-2: #adc1ca;
  --text-3: #7f97a3;

  --primary: #2bc0b7;
  --primary-hover: #4dd0c8;
  --on-primary: #03211f;

  --accent: #2bc0b7;
  --accent-hover: #4dd0c8;
  --accent-soft: #2bc0b724;
  --accent-text: #6ddcd4;

  --danger: #e05a5a;
  --danger-hover: #ea7272;
  --danger-soft: #e05a5a24;
  --danger-text: #f39c9c;

  --success-bg: #2fbf8a26;
  --success-fg: #6fdbb2;
  --warning-bg: #f0b34a26;
  --warning-fg: #f2c776;
  --danger-bg: #e05a5a26;
  --danger-fg: #f3a1a1;
  --info-bg: #4aa3e626;
  --info-fg: #8fcaf3;
  --violet-bg: #9a7ff026;
  --violet-fg: #c6b5f5;
  --neutral-bg: #ffffff12;
  --neutral-fg: #a5b8c2;

  --sidebar-bg: #071219;

  --ring: 0 0 0 3px #2bc0b740;
  --shadow-sm: 0 1px 2px #00000033;
  --shadow-md: 0 1px 2px #00000033, 0 8px 24px #00000033;
  --shadow-lg: 0 24px 70px #00000080;
  --backdrop: #01080dcc;

  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.015em;
}
strong {
  font-weight: 700;
}
a {
  color: var(--accent-text);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
code {
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}
.mono {
  font-family: var(--font-mono);
  font-size: 12px !important;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   App shell & sidebar
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}
.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  overflow: hidden;
  color: var(--sidebar-text-strong);
  background: var(--sidebar-bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #062230;
  background: linear-gradient(135deg, #2bc0b7, #8ee4dd);
}
.brand-copy {
  min-width: 0;
}
.brand-copy strong,
.brand-copy span {
  display: block;
  white-space: nowrap;
}
.brand-copy strong {
  font-family: var(--font-display);
  font-size: 14px;
}
.brand-copy span {
  color: var(--sidebar-text);
  font-size: 11.5px;
}
.mobile-close {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--sidebar-text);
  background: transparent;
}
.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 0;
  scrollbar-width: none;
}
.nav-group {
  display: grid;
  gap: 2px;
  padding: 8px 0;
}
.nav-label {
  padding: 4px 10px 6px;
  color: #6f8894;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.sidebar-nav a svg {
  flex: 0 0 auto;
}
.sidebar-nav a:hover {
  color: var(--sidebar-text-strong);
  background: var(--sidebar-hover);
}
.sidebar-nav a.active {
  color: var(--sidebar-text-strong);
  background: var(--sidebar-active);
  font-weight: 600;
}
.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2bc0b7;
}
.sidebar-nav a.active svg {
  color: #5fd6ce;
}
.sidebar-footer {
  display: grid;
  gap: 10px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #3a2600;
  background: #f2b553;
  font: 700 12px var(--font-display);
}
.sidebar-user-details {
  min-width: 0;
}
.sidebar-user-details strong,
.sidebar-user-details span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-details strong {
  font-size: 13px;
}
.sidebar-user-details span {
  color: var(--sidebar-text);
  font-size: 11.5px;
}
.sidebar-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.sidebar-action {
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius);
  color: var(--sidebar-text);
  background: transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.sidebar-action:hover {
  color: var(--sidebar-text-strong);
  background: var(--sidebar-hover);
}

.sidebar-collapsed .brand {
  justify-content: center;
  padding-inline: 0;
}
.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-nav a span,
.sidebar-collapsed .sidebar-user-details {
  display: none;
}
.sidebar-collapsed .nav-group + .nav-group {
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-collapsed .sidebar-nav a {
  justify-content: center;
  padding: 0;
}
.sidebar-collapsed .sidebar-user {
  justify-content: center;
}
.sidebar-collapsed .sidebar-actions {
  grid-template-columns: 1fr;
}

.main-panel {
  min-width: 0;
}
.mobile-header,
.scrim {
  display: none;
}

/* ==========================================================================
   Page scaffolding
   ========================================================================== */

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 36px 64px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}
.page-header h1 {
  margin: 4px 0 6px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.page-header p {
  max-width: 680px;
  color: var(--text-3);
}
.page-header-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.eyebrow {
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.btn {
  height: var(--control-h);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.btn-primary {
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.btn-secondary {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
}
.btn-danger {
  color: #fff;
  background: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-hover);
}
.btn-danger-outline {
  color: var(--danger-text);
  border-color: var(--border-strong);
  background: var(--surface);
}
.btn-danger-outline:hover:not(:disabled) {
  background: var(--danger-soft);
}
.btn-sm {
  height: 32px;
  padding: 0 11px;
  font-size: 12.5px;
}
.btn-block {
  width: 100%;
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-3);
  background: transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.icon-btn:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-3);
}
.icon-btn-accent:hover:not(:disabled) {
  color: var(--accent-text);
  background: var(--accent-soft);
}
.icon-btn-danger:hover:not(:disabled) {
  color: var(--danger-text);
  background: var(--danger-soft);
}
.icon-btn.is-field-aligned {
  height: var(--control-h);
  width: var(--control-h);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  margin: -4px -6px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.text-button:hover {
  background: var(--accent-soft);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  height: 22px;
  padding: 0 9px 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-neutral {
  color: var(--neutral-fg);
  background: var(--neutral-bg);
}
.badge-success {
  color: var(--success-fg);
  background: var(--success-bg);
}
.badge-warning {
  color: var(--warning-fg);
  background: var(--warning-bg);
}
.badge-danger {
  color: var(--danger-fg);
  background: var(--danger-bg);
}
.badge-info {
  color: var(--info-fg);
  background: var(--info-bg);
}
.badge-violet {
  color: var(--violet-fg);
  background: var(--violet-bg);
}
.badge-accent {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  background: var(--surface-3);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ==========================================================================
   Toolbar, search, selects
   ========================================================================== */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.toolbar-count {
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
}
.search-box {
  width: min(380px, 100%);
  height: var(--control-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-3);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}
.search-box input::-webkit-search-cancel-button {
  display: none;
}
.search-box button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text-3);
  background: var(--surface-3);
}
.select,
.field select,
.field input,
.field textarea,
.input {
  width: 100%;
  height: var(--control-h);
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  color: var(--text);
  background: var(--surface);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.select,
.field select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f97a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.toolbar .select {
  width: auto;
  min-width: 180px;
  box-shadow: var(--shadow-sm);
}
.field textarea {
  height: auto;
  min-height: 92px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.5;
}
.select:focus,
.field select:focus,
.field input:focus,
.field textarea:focus,
.input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.field input:disabled,
.field textarea:disabled,
.input:disabled {
  color: var(--text-3);
  background: var(--surface-2);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-3);
  opacity: 0.8;
}

/* ==========================================================================
   Cards & tables
   ========================================================================== */

.card,
.data-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.data-card {
  overflow-x: auto;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-size: 15px;
}
.card-header p {
  color: var(--text-3);
  font-size: 12.5px;
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
th {
  position: sticky;
  top: 0;
  color: var(--text-3);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  color: var(--text-2);
  font-size: 13.5px;
}
td strong {
  color: var(--text);
  font-weight: 600;
}
td small {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12px;
}
tbody tr {
  transition: background 0.12s ease;
}
tbody tr:hover {
  background: var(--surface-2);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tr.is-clickable {
  cursor: pointer;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.row-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
.row-actions > * + * {
  margin-left: 2px;
}
.bookings-table table {
  min-width: 1120px;
}
.payments-table table {
  min-width: 1080px;
}
.truncate {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Empty / loading / boot states
   ========================================================================== */

.empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 40px 24px;
  text-align: center;
}
.empty-state-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 12px;
  color: var(--text-3);
  background: var(--surface-3);
}
.empty-state h3 {
  font-size: 15px;
}
.empty-state p {
  max-width: 380px;
  color: var(--text-3);
  font-size: 13px;
}
.empty-state .btn {
  margin-top: 12px;
}
.location-grid > .empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.loading-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
}
.spinner,
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-2);
  background: var(--bg);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--backdrop);
  backdrop-filter: blur(3px);
  animation: fade-in 0.15s ease;
}
.modal {
  width: min(600px, 100%);
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: rise-in 0.18s ease;
}
.modal-wide {
  width: min(1120px, 100%);
}
.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 16px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 18px;
}
.modal-header p {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 13px;
}
.modal-header .icon-btn {
  margin: -2px -4px 0 0;
}
.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}
.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.full {
  grid-column: 1 / -1;
}
.span-2 {
  grid-column: span 2;
}
.field {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.field-label {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}
.field small {
  color: var(--text-3);
  font-size: 12px;
}
.field em {
  color: var(--danger-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}
.check-field {
  min-height: var(--control-h);
  display: flex;
  align-items: center;
  gap: 9px;
  align-self: end;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.check-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}
.form-grid > .form-actions {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.sticky-actions {
  position: sticky;
  bottom: -24px;
  z-index: 3;
  margin: 0 -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.confirm-text {
  color: var(--text-2);
  line-height: 1.6;
}

/* Multi-section forms (locations, parking services) */

.form-section + .form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading h3 {
  font-size: 15px;
}
.section-heading p {
  margin-top: 1px;
  color: var(--text-3);
  font-size: 12.5px;
}
.section-heading-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--accent-text);
  background: var(--accent-soft);
}
.section-heading-action {
  margin-left: auto;
}
.nested-stack {
  display: grid;
  gap: 12px;
}
.nested-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.nested-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px -4px 12px 0;
}
.nested-card-header strong {
  font-size: 13.5px;
}
.nested-card-actions {
  display: flex;
  gap: 2px;
}
.sub-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
.sub-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}
.sub-section-empty {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12.5px;
}
.nested-empty {
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.ship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ship-grid .nested-empty {
  grid-column: 1 / -1;
}
.ship-grid .nested-card {
  display: grid;
  gap: 12px;
}
.hour-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.1fr) 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.hour-row-actions {
  display: flex;
  gap: 2px;
}
.pricing-tier-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.type-picker {
  margin-top: 18px;
}
.type-picker > .field-label {
  display: block;
  margin-bottom: 8px;
}
.type-picker > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.type-picker label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.type-picker label span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-2);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.15s ease;
}
.type-picker label span:hover {
  border-color: var(--accent);
}
.type-picker label input:checked + span {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: 600;
}
.type-picker label input:focus-visible + span {
  box-shadow: var(--ring);
}

.service-image-field {
  grid-row: span 2;
}
.service-image-upload,
.service-image-preview {
  min-height: 150px;
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.service-image-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-3);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.service-image-upload:hover {
  border-color: var(--accent);
}
.service-image-upload strong {
  color: var(--text);
  font-size: 13px;
}
.service-image-upload small {
  font-size: 12px;
}
.service-image-upload input {
  display: none;
}
.service-image-preview {
  position: relative;
  border-style: solid;
}
.service-image-preview img {
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
}
.service-image-preview .icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #fff;
  background: #071b28b3;
}

/* ==========================================================================
   Detail views (booking, payment, check-in)
   ========================================================================== */

.detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.detail-summary-label {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.detail-summary-value {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.detail-summary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.callout + .detail-grid,
.detail-grid + .detail-grid,
.detail-grid + .detail-section,
.detail-section + .detail-section {
  margin-top: 12px;
}
.detail-grid > .detail-section {
  margin-top: 0;
}
.detail-section {
  padding: 14px 16px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.detail-section h3 {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}
.detail-list {
  margin: 0;
}
.detail-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.detail-list > div:last-child {
  border-bottom: 0;
}
.detail-list dt {
  color: var(--text-3);
  font-size: 12.5px;
}
.detail-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}
.detail-note {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 12.5px;
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.callout svg {
  flex: 0 0 auto;
  margin-top: 1px;
}
.callout-success {
  color: var(--success-fg);
  background: var(--success-bg);
}
.callout-warning {
  color: var(--warning-fg);
  background: var(--warning-bg);
}
.callout-danger {
  color: var(--danger-fg);
  background: var(--danger-bg);
}
.callout-info {
  color: var(--info-fg);
  background: var(--info-bg);
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-grid + .toolbar {
  margin-top: 16px;
}
.metric-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 18px;
}
.metric-label {
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
}
.metric-value {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.metric-hint {
  grid-column: 1 / -1;
  color: var(--text-3);
  font-size: 12px;
}
.metric-icon {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}
.tone-accent .metric-icon {
  color: var(--accent-text);
  background: var(--accent-soft);
}
.tone-info .metric-icon {
  color: var(--info-fg);
  background: var(--info-bg);
}
.tone-warning .metric-icon {
  color: var(--warning-fg);
  background: var(--warning-bg);
}
.tone-success .metric-icon {
  color: var(--success-fg);
  background: var(--success-bg);
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.dash-grid .data-card {
  box-shadow: var(--shadow-md);
}
.dash-grid table {
  min-width: 620px;
}
.network-list {
  margin: 0;
  padding: 6px 0;
  list-style: none;
}
.network-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 18px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.12s ease;
}
.network-list a:hover {
  background: var(--surface-2);
}
.network-list svg {
  color: var(--text-3);
}
.network-list strong {
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Locations
   ========================================================================== */

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.location-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.location-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.location-pin {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--accent-text);
  background: var(--accent-soft);
}
.location-card h2 {
  margin-top: 14px;
  font-size: 16px;
}
.location-address {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 13px;
}
.location-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
  padding: 12px 0;
  border-block: 1px solid var(--border);
}
.location-stats span {
  color: var(--text-3);
  font-size: 11.5px;
}
.location-stats span + span {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.location-stats strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
td .tag-row {
  margin-top: 0;
}
.location-services {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.location-services article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.location-services article:not(:has(> img)) {
  grid-template-columns: minmax(0, 1fr);
}
.location-services article > img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
}
.location-service-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.location-service-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-services p {
  margin: 4px 0;
  color: var(--text-3);
  font-size: 12.5px;
}
.location-services small {
  color: var(--text-3);
  font-size: 12px;
}
.location-services.detailed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}
.service-tier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.location-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
}

/* ==========================================================================
   Check-in
   ========================================================================== */

.check-in-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.check-in-panel {
  padding: 18px;
}
.lookup-form > label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}
.lookup-row {
  display: flex;
  gap: 8px;
}
.lookup-row .input {
  min-width: 0;
  flex: 1;
}
.divider-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.divider-label::before,
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.scanner-viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-3);
  background: var(--surface-2);
}
.scanner-viewport video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.scanner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-size: 12.5px;
}
.scanner-placeholder svg {
  margin-bottom: 6px;
  color: var(--accent);
}
.scanner-placeholder strong {
  color: var(--text);
  font-size: 14px;
}
.scanner-viewport + .btn {
  margin-top: 10px;
}
.check-in-panel details {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.check-in-panel summary {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.check-in-panel details[open] summary {
  margin-bottom: 10px;
}
.check-in-result {
  min-height: 460px;
  padding: 20px;
}
.check-in-empty {
  min-height: 420px;
}
.check-in-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

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

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--surface);
}
.login-story {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px clamp(36px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(circle at 12% 88%, #2bc0b738, transparent 32%),
    radial-gradient(circle at 92% 8%, #2bc0b71c, transparent 30%),
    linear-gradient(150deg, #071a27, #0c3245);
}
.story-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 15px var(--font-display);
}
.login-story .eyebrow {
  color: #6ddcd4;
}
.login-story h1 {
  max-width: 620px;
  margin: 12px 0 18px;
  color: #fff;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: -0.045em;
}
.login-story p {
  max-width: 520px;
  color: #a6bcc7;
  font-size: 16px;
  line-height: 1.7;
}
.story-stat {
  padding-left: 14px;
  border-left: 3px solid #2bc0b7;
}
.story-stat strong,
.story-stat span {
  display: block;
}
.story-stat span {
  margin-top: 3px;
  color: #8ea7b4;
  font-size: 13px;
}
.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 36px;
  background: var(--surface);
}
.login-panel form {
  width: min(380px, 100%);
}
.login-theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface);
}
.login-theme-toggle:hover {
  background: var(--surface-2);
}
.login-heading h2 {
  margin: 8px 0 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.login-heading p {
  margin-bottom: 26px;
  color: var(--text-3);
}
.login-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.login-field > div {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-3);
  background: var(--surface);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.login-field > div:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.login-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus,
.login-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  transition: background-color 9999s ease-out 0s;
}
.login-field em {
  color: var(--danger-text);
  font-size: 12px;
  font-style: normal;
}
.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
}

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

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-grid,
  .check-in-layout {
    grid-template-columns: 1fr;
  }
  .check-in-panel {
    max-width: 620px;
  }
  .form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pricing-tier-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    width: 272px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-collapsed .brand {
    justify-content: flex-start;
    padding-inline: 8px;
  }
  .sidebar-collapsed .brand-copy,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-user-details {
    display: block;
  }
  .sidebar-collapsed .sidebar-nav a span {
    display: inline;
  }
  .sidebar-collapsed .nav-group + .nav-group {
    border-top: 0;
  }
  .sidebar-collapsed .sidebar-nav a {
    justify-content: flex-start;
    padding: 0 10px;
  }
  .sidebar-collapsed .sidebar-user {
    justify-content: flex-start;
  }
  .sidebar-actions,
  .sidebar-collapsed .sidebar-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar-collapse {
    display: none;
  }
  .mobile-close {
    display: block;
  }
  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    background: var(--backdrop);
  }
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 8px;
    color: #fff;
    background: var(--sidebar-bg);
    font-family: var(--font-display);
    font-weight: 700;
  }
  .mobile-header > button:first-child {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: transparent;
  }
  .mobile-header .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .mobile-theme-toggle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    margin-left: auto;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius);
    color: var(--sidebar-text);
    background: transparent;
  }
  .page {
    padding: 22px 16px 48px;
  }
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .page-header-actions .btn {
    width: 100%;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-box,
  .toolbar .select {
    width: 100%;
  }
  .toolbar-count {
    margin-left: 0;
  }
  .metric-grid,
  .location-grid,
  .login-page,
  .detail-grid,
  .form-grid,
  .form-grid-3,
  .form-grid-4,
  .ship-grid,
  .location-services.detailed {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .span-2 {
    grid-column: auto;
  }
  .hour-row {
    grid-template-columns: 1fr 1fr auto;
  }
  .hour-row > .field:first-child {
    grid-column: 1 / -1;
  }
  .pricing-tier-row {
    grid-template-columns: 1fr 1fr;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .modal-backdrop {
    align-items: end;
    padding: 0;
  }
  .modal {
    max-height: 94vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .modal-body {
    padding: 18px;
  }
  .sticky-actions {
    bottom: -18px;
    margin: 0 -18px -18px;
    padding: 12px 18px;
  }
  .form-actions {
    flex-direction: column-reverse;
  }
  .form-actions .btn {
    width: 100%;
  }
  .detail-summary-actions {
    width: 100%;
  }
  .lookup-row {
    flex-direction: column;
  }
  .check-in-actions {
    flex-direction: column-reverse;
  }
  .check-in-actions .btn {
    width: 100%;
  }
  .login-story {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
  }
}

/* ==========================================================================
   Server-rendered admin additions (web/admin)
   ========================================================================== */

.toast-region {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  animation: rise-in 0.18s ease;
}
.toast::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.toast-success::before {
  background: var(--success-fg);
}
.toast-error::before {
  background: var(--danger);
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: 0.2s ease;
}
.login-error {
  margin-bottom: 16px;
}
.htmx-request .btn-primary,
.btn-primary.htmx-request {
  opacity: 0.7;
  cursor: progress;
}
.sidebar-actions form {
  display: contents;
}
.when-light,
.when-dark {
  display: contents;
}
:root[data-theme="dark"] .when-light,
:root:not([data-theme="dark"]) .when-dark {
  display: none;
}
@media (max-width: 780px) {
  .app-shell:not(.nav-open) .scrim {
    display: none;
  }
}
.when-expanded,
.when-collapsed {
  display: contents;
}
.sidebar-collapsed .when-expanded,
.app-shell:not(.sidebar-collapsed) .when-collapsed {
  display: none;
}
.filter-form {
  display: contents;
}
.when-busy {
  display: none;
}
.htmx-request .when-busy,
.htmx-request.btn .when-busy,
form.htmx-request .when-busy {
  display: inline;
}
.htmx-request .when-idle,
.htmx-request.btn .when-idle,
form.htmx-request .when-idle {
  display: none;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.pager-links {
  display: flex;
  gap: 8px;
}
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}
.toast-warning::before {
  background: var(--warning-fg);
}
[hidden] {
  display: none !important;
}
.modal:focus {
  outline: none;
}
[data-hour-rows] > .sub-section-empty:not(:only-child),
[data-rows] > .sub-section-empty:not(:only-child),
[data-rows] > .nested-empty:not(:only-child) {
  display: none;
}
[data-tier-rows] > .sub-section-empty:not(:only-child) {
  display: none;
}
.service-image-upload:has(.htmx-request) .when-busy {
  display: inline;
}
.service-image-upload:has(.htmx-request) .when-idle {
  display: none;
}
.service-image-upload input[type="file"] {
  display: none;
}
.field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}
.type-picker.has-error label span {
  border-color: var(--danger);
}
