/*
  Property Shoot Log v150 Shared Danger Surface Polish
  -----------------------------------------------
  Purpose: keep the approved v139 color system while fixing invalid color-token typos and stabilizing the PIN title size.

  Organization map:
  1. Base reset / shared icon helpers
  2. PIN lock / sync feedback / toast
  3. Stats / toolbar / search / cards
  4. Reports and report tables
  5. Form modal / task checklist / sticky actions
  6. Settings screens and management lists
  7. Bottom navigation and mobile scroll behavior
  8. Grid/List view stability rules
  9. Grid quick-link buttons
  10. Settings menu + Agent Portal Access management
  11. Mobile behavior + font system wiring

  Notes:
  - CSS-only cleanup. No app logic or Supabase behavior changed.
  - User-approved font system values are kept.
  - Color tokens live in the main :root block with backward-compatible aliases.
  - Repeated hardcoded colors are routed to color variables where safe.
  - High-risk layout rules are kept in place to avoid visual regressions.
*/

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

input::placeholder,
textarea::placeholder {
  color: var(--muted-light);
  opacity: 0.8;
}

button {
  border: 0;
  cursor: pointer;
}

/* Shared inline SVG icon system */
svg {
  display: block;
}

.icon-svg,
.btn-icon,
.sync-btn svg,
.search-icon svg,
.clear-search svg,
.close-btn svg,
.empty-icon svg,
.icon-action-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.compact-icon-btn .btn-icon {
  width: 18px;
  height: 18px;
}

.add-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.stats, .report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats article, .report-summary article {
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stats span, .report-summary strong {
  display: block;
  margin-bottom: 2px;
  font-size: 24px;
  font-weight: var(--fw-stats);
  letter-spacing: -0.03em;
}

.stats p, .report-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.toolbar, .report-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px 0 26px;
  align-items: end;
}

.report-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
}

.records {
  display: grid;
  gap: 12px;
}

.text-btn {
  padding: 8px 4px;
  color: var(--blue);
  background: transparent;
  font-size: 14px;
  font-weight: var(--fw-button);
}

.shoot-card, .report-card, .report-paper {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.shoot-card:active {
  transform: scale(0.995);
  background: var(--color-surface-soft);
}


.pill.progress {
  color: var(--color-warning-text);
  background: var(--orange-soft);
}

.pill.done {
  color: var(--color-success-text);
  background: var(--green-soft);
}

.pill.missing {
  color: var(--color-warning-text);
  background: var(--orange-soft);
}

.empty-state {
  padding: 32px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
}

.empty-icon svg {
  width: 20px;
  height: 20px;
}

.empty-state h3 {
  margin: 0 0 6px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none !important;
}
/* PIN lock screen */
.app.app-locked {
  display: none;
}

.pin-lock-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, var(--color-primary-glow), transparent 34%),
    var(--bg);
}

.pin-card {
  width: min(100%, 390px);
  padding: 28px 22px 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-elevated);
  text-align: center;
}

.pin-card h1 {
  margin: 3px 0 7px;
  color: var(--text);
  font-size: 30px;
  letter-spacing: -0.04em;
}

.pin-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.pin-form {
  display: grid;
  gap: 12px;
}

.pin-form input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--soft);
  color: var(--text);
  font-size: 26px;
  font-weight: var(--fw-input);
  letter-spacing: 0.42em;
  text-align: center;
  padding: 0 16px 0 26px;
  outline: none;
}

.pin-form input:focus {
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.pin-error {
  margin: -2px 0 0;
  color: var(--color-danger-dark);
  font-size: 13px;
  font-weight: var(--fw-meta);
}


.data-backup-card {
  margin-top: 14px;
}

.backup-actions {
  display: grid;
  gap: 10px;
}

.backup-btn {
  width: 100%;
  min-height: 46px;
}

.security-card {
  margin-top: 14px;
}

.lock-app-btn {
  width: 100%;
}


.report-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.report-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
}

.report-brand strong {
  color: var(--text);
  font-size: 13px;
}

.report-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

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

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-divider);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-form-label);
}

.bottom-nav button.active {
  color: white;
  background: var(--blue);
}

.grabber {
  width: 42px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--color-grabber);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.close-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close-btn svg {
  width: 22px;
  height: 22px;
}

form {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
}

input, textarea {
  width: 100%;
  padding: 14px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: var(--color-surface-soft);
}

.link-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.link-input-wrap input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-link-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--color-surface-soft);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.copy-link-btn:active {
  transform: scale(0.96);
}

.copy-link-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

textarea {
  resize: vertical;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.status-box {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.status-box legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
}

.radio-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  padding: 11px;
  border-radius: 13px;
  background: var(--color-surface-soft);
}

.radio-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.radio-row strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
}

.radio-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.delete-btn,
.duplicate-btn {
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-action-btn svg {
  width: 20px;
  height: 20px;
}

.delete-btn {
  color: var(--red);
  background: var(--red-soft);
}

.duplicate-btn {
  color: var(--text);
  background: var(--color-muted-pill);
}

@media (min-width: 820px) {
  .app {
    padding-top: 34px;
  }

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

  .report-summary {
    grid-template-columns: repeat(4, 1fr);
  }

  .modal {
    place-items: center;
  }

  .sheet {
    border-radius: 24px;
  }
}

.report-controls {
  grid-template-columns: 1fr;
}

.report-controls .primary-btn {
  width: 100%;
}
.secondary-btn {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  font-weight: var(--fw-button);
}

.secondary-btn:active {
  transform: translateY(1px);
}


.report-summary strong {
  overflow-wrap: anywhere;
}

.report-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-direction: column;
}

.report-brand {
  display: grid;
  gap: 4px;
  align-content: start;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 390px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .report-paper {
    padding: 12px;
    border-radius: 18px;
  }

  .report-summary {
    grid-template-columns: 1fr;
  }

  .report-summary article {
    padding: 13px 12px;
  }

  .report-header h2 {
    font-size: 22px;
  }

  table {
    min-width: 560px;
    font-size: 12px;
  }

  th, td {
    padding: 8px 6px;
  }
}

@media (min-width: 820px) {
  .report-controls {
    grid-template-columns: 1fr auto;
  }

  .report-header {
    flex-direction: row;
  }

  .report-brand {
    text-align: right;
  }
}

.app, .screen, main, .report-paper, .report-card, .table-card, .report-summary, .report-summary article, .report-grid, .report-controls {
  max-width: 100%;
  min-width: 0;
}

#reportsScreen {
  overflow-x: hidden;
  padding-bottom: 120px;
}

.report-paper {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  width: 100%;
  overflow: hidden;
}

.report-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  display: grid;
  width: 100%;
  gap: 10px;
}

.report-summary article {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.report-card {
  padding: 14px;
  border-radius: 18px;
  width: 100%;
  overflow: hidden;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-divider-strong);
  color: var(--muted);
  font-size: 14px;
  align-items: center;
}

.summary-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-row strong {
  color: var(--text);
  flex: 0 0 auto;
  margin-left: 12px;
}

.table-card {
  padding-bottom: 18px;
}

.table-wrap::after {
  content: "Swipe left to see full table";
  display: block;
  margin-top: 8px;
  color: var(--muted-light);
  font-size: 12px;
}

table {
  width: max-content;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
  max-width: none;
}

@media (max-width: 520px) {
  .app {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .report-controls {
    grid-template-columns: 1fr;
  }

  .report-paper {
    padding: 12px;
    border-radius: 18px;
  }

  .report-header {
    flex-direction: column;
  }

  .report-brand {
    text-align: left;
  }

  .report-summary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .report-summary article {
    padding: 12px;
    border-radius: 15px;
  }

  .report-summary strong {
    font-size: 26px;
  }

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

  .report-card {
    padding: 13px;
    border-radius: 16px;
  }
}

@media (max-width: 360px) {
  .report-summary {
    grid-template-columns: 1fr;
  }
}

.missing-links-card {
  display: grid;
  gap: 0;
}


.missing-links-toggle {
  width: 100%;
  padding: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.missing-links-toggle > span {
  display: grid;
  gap: 6px;
  min-width: 0;
}


.missing-links-toggle strong {
  color: var(--text);
}

.missing-links-chevron {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.24s ease, color 0.2s ease;
  flex: 0 0 auto;
}

.missing-links-card.is-expanded .missing-links-chevron {
  transform: rotate(180deg);
  color: var(--blue);
}

.missing-links-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.2s ease;
  margin-top: 0;
}

.missing-links-card.is-expanded .missing-links-panel {
  opacity: 1;
  margin-top: 12px;
}

.missing-links-list {
  display: grid;
  gap: 7px;
}

.missing-link-row {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid var(--color-divider);
  color: var(--muted);
  font-size: 12px;
}

.missing-link-row span {
  overflow-wrap: anywhere;
}

.missing-link-row strong {
  color: var(--color-warning-text);
  font-size: 12px;
  letter-spacing: 0;
}

.mini-note {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
}

.mini-note.good {
  color: var(--color-success-text);
}


.agent-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-divider-strong);
  color: var(--muted);
  font-size: 14px;
}

.agent-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agent-row strong {
  flex: 0 0 auto;
  color: var(--text);
}

@media (min-width: 520px) {
  .report-summary-compact {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 520px) {
  /* Removed unused agent summary grid responsive styles */
}


.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-divider);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 520px) {
  .summary-grid {
    gap: 0 16px;
  }
}

.summary-line:last-child {
  border-bottom: 1px solid var(--color-divider);
}

.summary-grid {
  display: grid;
  gap: 10px;
  align-items: start;
}

.summary-line, .summary-line:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  border-radius: 13px;
  background: var(--color-surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.summary-line span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.summary-line strong {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 13px;
  font-weight: var(--fw-stats);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-primary-bg);
}

.report-summary-compact {
  grid-template-columns: 1fr !important;
}

@media (min-width: 520px) {
  .report-summary-compact {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 820px) {
  .table-wrap {
    overflow-x: visible;
  }

  table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: auto;
  }

  th, td {
    border-bottom: 1px solid var(--color-divider);
  }

  .table-wrap::after {
    display: none;
  }
}

.view-toggle button.active {
  background: var(--blue);
  color: white;
}


@media (max-width: 430px) {
  .section-head {
    align-items: flex-start;
  }

  .section-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

}

.field-disabled {
  opacity: 0.45;
}

.field-disabled input {
  background: var(--color-disabled-bg);
  cursor: not-allowed;
}

.actions.new-record {
  grid-template-columns: 1fr;
}

.actions.new-record .primary-btn {
  width: 100%;
}

.actions {
  display: grid;
  grid-template-columns: 56px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  position: absolute;
  bottom: 0;
  z-index: 20;
  margin-left: -16px;
  margin-right: -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--color-sheet-bg);
  backdrop-filter: blur(18px);
  left: 0;
  right: 0;
  margin: 0;
  box-shadow: var(--shadow-sticky);
}

.actions .primary-btn {
  min-height: 56px;
  white-space: nowrap;
}

@media (min-width: 820px) {
  .table-card table {
    table-layout: fixed;
  }

  .table-card th:nth-child(1), .table-card td:nth-child(1) {
    width: 9%;
  }

  .table-card th:nth-child(2), .table-card td:nth-child(2) {
    width: 19%;
  }

  .table-card th:nth-child(3), .table-card td:nth-child(3) {
    width: 8%;
  }

  .table-card th:nth-child(4), .table-card td:nth-child(4) {
    width: 13%;
  }

  .table-card th:nth-child(5), .table-card td:nth-child(5) {
    width: 34%;
  }

  .table-card th:nth-child(6), .table-card td:nth-child(6) {
    width: 8%;
  }

  .table-card th:nth-child(7), .table-card td:nth-child(7) {
    width: 9%;
  }
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

@media (max-width: 430px) {
  .section-actions {
    align-items: flex-end;
  }

  .view-toggle button {
    min-width: 72px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }
}

.view-toggle button {
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: var(--fw-button);
  min-width: 58px;
  display: grid;
  place-items: center;
}


@media (max-width: 430px) {
  .view-toggle button.density-btn {
    min-width: 98px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
    gap: 6px;
  }

  .density-icon {
    width: 16px;
    height: 16px;
  }

  .compact-icon {
    background: linear-gradient(currentColor 0 0) 0 3px / 16px 2px no-repeat,
        linear-gradient(currentColor 0 0) 0 8px / 16px 2px no-repeat,
        linear-gradient(currentColor 0 0) 0 13px / 16px 2px no-repeat;
  }
}

.density-icon, .comfortable-icon, .compact-icon {
  display: none !important;
}

@media (max-width: 430px) {
  .view-toggle button.density-btn {
    min-width: 70px;
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0 18px;
  padding-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.caption {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
}

.sync-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.connection-status {
  min-width: 66px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: var(--fw-pill);
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--muted);
  background: var(--color-surface-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.connection-status.online {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--color-success-border);
}

.connection-status.syncing {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--color-primary-border);
}

.connection-status.offline,
.connection-status.issue,
.connection-status.fallback {
  color: var(--color-warning-dark);
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border-strong);
}

.sync-notice {
  margin: -5px 0 10px;
  width: 100%;
  max-width: none;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--color-warning-deep);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  font-size: 13px;
  font-weight: var(--fw-pill);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sync-notice.hidden {
  display: none;
}

@media (max-width: 390px) {
  .connection-status {
    min-width: auto;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sync-cluster {
    gap: 6px;
  }
}

.sync-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.sync-btn svg {
  width: 20px;
  height: 20px;
}

.sync-btn:disabled {
  opacity: 0.78;
  cursor: default;
}

.sync-btn.is-syncing svg {
  animation: sync-spin 0.8s linear infinite;
}

.sync-btn.sync-ok {
  color: var(--green);
  background: var(--green-soft);
}

@keyframes sync-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 120;
  transform: translate(-50%, 12px);
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--color-white);
  background: var(--color-toast-bg);
  font-size: 13px;
  font-weight: var(--fw-pill);
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.stats {
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stats article {
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--color-divider);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.stats article:last-child {
  border-right: 0;
}

.stats span {
  margin-bottom: 0;
  font-size: 22px;
}

.stats p {
  margin-top: 2px;
}

.primary-btn {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 15px;
  background: var(--blue);
  color: white;
  font-weight: var(--fw-button);
  box-shadow: none;
}

.toolbar .primary-btn {
  min-height: 48px;
  border-radius: 17px;
  font-size: 14px;
}


.toolbar select {
  min-height: 48px;
  border-radius: 17px;
  font-size: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--color-white);
  box-shadow: var(--shadow-button);
}

.view-toggle button.density-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 64px;
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  height: 30px;
  font-weight: var(--fw-button);
}

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

.shoot-card {
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-card-strong);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.property {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: var(--fw-card-title);
  line-height: 1.35;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.record-meta-line {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.record-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--fw-pill);
}

.status-pill.progress {
  color: var(--color-warning-text);
  background: var(--orange-soft);
}

.status-pill.done {
  color: var(--color-success-text);
  background: var(--green-soft);
}

.shoot-card .status-pill {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.link-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-pill);
}

.link-text.needs-attention {
  color: var(--color-warning-text);
}

.link-text.ok {
  color: var(--color-success-text);
}

.bottom-nav button {
  min-height: 39px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: var(--fw-button);
  font-size: 12px;
  white-space: nowrap;
}

.bottom-nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

@media (max-width: 430px) {
  h1 {
    font-size: 36px;
  }

  .stats span {
    font-size: 22px;
  }

  .stats article {
    padding: 9px 10px;
  }

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

  .toolbar select {
    width: 100%;
  }

  .section-head {
    align-items: center;
  }

  .section-actions {
    align-items: flex-end;
  }
}


/* =========================================================
   List View - Unified Row Style (all devices)
   ---------------------------------------------------------
   One consistent row-style list for mobile, tablet, and desktop.
   This matches the older compact list layout while avoiding the
   previous table-like responsive CSS layers.
   ========================================================= */
.records.list-mode {
  overflow-x: visible;
}

.shoot-list.list-view {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-card-strong);
}

.shoot-list.list-view .shoot-card {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 18px 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.shoot-list.list-view .shoot-card:last-child {
  border-bottom: 0;
}

.shoot-list.list-view .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}

.shoot-list.list-view .card-top span {
  color: var(--muted);
  font-size: 16px;
  font-weight: var(--fw-meta);
  line-height: 1.25;
}

.shoot-list.list-view .card-top span:last-child {
  text-align: right;
  white-space: nowrap;
}

.shoot-list.list-view .property {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--fw-card-title);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.shoot-list.list-view .record-meta-line {
  display: none;
}

.shoot-list.list-view .record-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
}

.shoot-list.list-view .list-meta-inline {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: var(--fw-meta);
  line-height: 1.3;
}

.shoot-list.list-view .status-pill {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: var(--fw-pill);
}

.shoot-list.list-view .link-text {
  flex: 0 1 auto;
  font-size: 15px;
  font-weight: var(--fw-pill);
  line-height: 1.3;
}

@media (max-width: 430px) {
  .shoot-list.list-view {
    border-radius: 22px;
  }

  .shoot-list.list-view .shoot-card {
    padding: 16px 18px;
  }

  .shoot-list.list-view .card-top {
    gap: 12px;
  }

  .shoot-list.list-view .card-top span {
    font-size: 15px;
  }

  .shoot-list.list-view .property {
    margin-bottom: 14px;
    font-size: 18px;
  }

  .shoot-list.list-view .list-meta-inline,
  .shoot-list.list-view .link-text {
    font-size: 14px;
  }
}

.sheet, #shootForm {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sheet::-webkit-scrollbar, #shootForm::-webkit-scrollbar {
  display: none;
}

#shootForm > label, #shootForm > .grid-2, #shootForm > .status-box,
.video-requirement-toggle {
  margin-left: 0;
  margin-right: 0;
}

#formOverlay .sheet-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-divider);
}

#formOverlay .shoot-agent-company-row {
  align-items: end;
}

#formOverlay .shoot-form-divider {
  height: 1px;
  margin: 2px 0;
  background: var(--color-divider);
}

input, textarea, select {
  line-height: 1.25;
  background-clip: padding-box;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--focus-border-strong);
  box-shadow: inset 0 0 0 1px var(--focus-border-strong),
    0 0 0 4px var(--focus-ring);
  background: white;
  outline: none;
}

@media (max-width: 520px) {
  .sheet {
    padding-left: 14px;
    padding-right: 14px;
  }

  #shootForm {
    padding-left: 6px;
    padding-right: 6px;
    margin-left: -6px;
    margin-right: -6px;
  }

  .actions {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.video-requirement-section,
.task-section {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.video-requirement-title,
.task-section-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
  line-height: 1.2;
}

#formOverlay .video-requirement-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--color-surface-soft);
}

#formOverlay .video-requirement-toggle button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-button);
  cursor: pointer;
}

#formOverlay .video-requirement-toggle button.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--color-primary-border-strong);
}

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--color-surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: var(--fw-form-label);
}

.check-row input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--blue);
}

.task-hint {
  margin: 2px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-status-preview {
  margin: 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-status-preview strong {
  color: inherit;
  font-size: inherit;
  font-weight: var(--fw-form-label);
}

.check-row.field-disabled {
  opacity: 0.48;
}

.check-row.field-disabled input {
  cursor: not-allowed;
}

select {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' stroke='%23111827' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 18px center !important;
  background-size: 18px 18px !important;
  background-repeat: no-repeat !important;
  padding-left: 16px;
  background-color: var(--surface);
}

select:focus {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' stroke='%23007AFF' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 18px 18px !important;
  background-position: right 18px center !important;
}

input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.25' y='4.25' width='13.5' height='12.5' rx='2.25' stroke='%23111827' stroke-width='1.8'/%3E%3Cpath d='M6 2.75V5.75M14 2.75V5.75M3.75 8H16.25' stroke='%23111827' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

input[type="time"] {
  min-height: 52px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='7.25' stroke='%23111827' stroke-width='1.8'/%3E%3Cpath d='M10 5.75V10.25L13 12' stroke='%23111827' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

input[type="date"]:focus {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.25' y='4.25' width='13.5' height='12.5' rx='2.25' stroke='%23007AFF' stroke-width='1.8'/%3E%3Cpath d='M6 2.75V5.75M14 2.75V5.75M3.75 8H16.25' stroke='%23007AFF' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

input[type="time"]:focus {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='7.25' stroke='%23007AFF' stroke-width='1.8'/%3E%3Cpath d='M10 5.75V10.25L13 12' stroke='%23007AFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator {
  margin-right: 2px;
  padding: 0;
  cursor: pointer;
  opacity: 0 !important;
  width: 46px;
  height: 100%;
  margin: 0;
  color: transparent !important;
  background: transparent !important;
  display: block;
  position: absolute;
  right: 0;
}

input[type="date"]::-webkit-inner-spin-button, input[type="time"]::-webkit-inner-spin-button, input[type="date"]::-webkit-clear-button, input[type="time"]::-webkit-clear-button {
  display: none !important;
  -webkit-appearance: none !important;
}

input[type="date"], input[type="time"] {
  min-height: 52px;
  padding-right: 46px !important;
  background-repeat: no-repeat !important;
  background-size: 18px 18px !important;
  background-position: right 18px center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
}

.shoot-date-input-wrap,
.shoot-time-input-wrap {
  position: relative;
  display: block;
}

.shoot-date-input-wrap input[type="date"],
.shoot-time-input-wrap input[type="time"],
#bookingCreateOverlay .booking-native-date-control input[type="date"],
#bookingRescheduleOverlay .booking-native-date-control input[type="date"] {
  background-image: none !important;
}

.shoot-date-input-wrap > svg,
.shoot-time-input-wrap > svg,
#bookingCreateOverlay .booking-native-date-control > svg,
#bookingRescheduleOverlay .booking-native-date-control > svg {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 18px;
  height: 18px;
  color: var(--text);
  pointer-events: none;
  transform: translateY(-50%);
}

.shoot-date-input-wrap > svg,
#bookingCreateOverlay .booking-native-date-control > svg,
#bookingRescheduleOverlay .booking-native-date-control > svg {
  width: 18px;
  height: 18px;
}

.shoot-date-input-wrap:focus-within > svg,
.shoot-time-input-wrap:focus-within > svg,
#bookingCreateOverlay .booking-native-date-control:focus-within > svg,
#bookingRescheduleOverlay .booking-native-date-control:focus-within > svg {
  color: var(--blue);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 10;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(calc(100% - 24px), 440px);
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--color-nav-bg);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(18px);
  max-width: 520px;
}

.settings-stack {
  display: grid;
  gap: 14px;
}

.settings-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.settings-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.settings-toggle button {
  min-height: 40px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: var(--fw-button);
}

.settings-toggle button.active {
  background: var(--blue);
  color: white;
}

.settings-add-form input {
  min-height: 46px;
}

.settings-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--color-surface-soft);
}

.settings-list-row span {
  min-width: 0;
  color: var(--text);
  font-weight: var(--fw-card-title);
  overflow-wrap: anywhere;
}

.settings-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 820px) {
  .settings-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .settings-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .bottom-nav {
    width: min(calc(100% - 24px), 520px);
  }

  .bottom-nav button {
    font-size: 12px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .settings-add-form {
    grid-template-columns: 1fr;
  }
}

#agentName, #apartmentDetails {
  min-height: 52px;
}

:root {
  /* 1. Base surfaces */
  --color-bg: #f7f7f8;
  --color-surface: #ffffff;
  --color-white: #ffffff;
  --color-surface-soft: #fbfbfc;
  --color-surface-muted: #f3f4f6;

  /* 2. Borders / dividers */
  --color-border: #e5e7eb;
  --color-divider: #eef0f2;
  --color-divider-strong: #f0f1f3;

  /* 3. Text */
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;

  /* 4. Primary / brand */
  --color-primary: #0a84ff;
  --color-primary-soft: #e8f2ff;
  --color-primary-soft-2: #e8f3ff;
  --color-primary-soft-3: #dceeff;
  --color-primary-bg: #eef6ff;
  --color-primary-border: rgba(0, 122, 255, 0.16);
  --color-primary-border-strong: rgba(0, 122, 255, 0.18);
  --color-primary-icon-border: rgba(24, 134, 255, 0.04);
  --color-primary-tint: rgba(0, 122, 255, 0.08);
  --color-primary-glow: rgba(0, 122, 255, 0.10);

  /* 5. Success */
  --color-success: #34c759;
  --color-success-text: #187735;
  --color-success-dark: #137c38;
  --color-success-soft: #eaf8ee;
  --color-success-soft-2: #e8f8ee;
  --color-success-border: rgba(52, 199, 89, 0.18);

  /* 6. Warning */
  --color-warning: #ff9500;
  --color-warning-text: #9a5a00;
  --color-warning-dark: #b45309;
  --color-warning-deep: #92400e;
  --color-warning-soft: #fff4e5;
  --color-warning-bg: #fff7ed;
  --color-warning-border: rgba(245, 158, 11, 0.2);
  --color-warning-border-strong: rgba(245, 158, 11, 0.22);

  /* 7. Danger */
  --color-danger: #ff3b30;
  --color-danger-dark: #b42318;
  --color-danger-text: #c12b22;
  --color-danger-text-2: #c6312b;
  --color-danger-soft: #ffeceb;
  --color-danger-soft-2: #fff1f1;
  --color-danger-border: rgba(255, 59, 48, 0.16);
  --color-danger-border-soft: rgba(255, 59, 48, 0.08);
  --color-danger-border-strong: rgba(255, 59, 48, 0.2);
  --danger-surface-bg: var(--color-danger-soft-2);
  --danger-surface-border: var(--color-danger-border-strong);
  --danger-surface-active-bg: var(--color-danger-soft);

  /* 8. Neutral / disabled */
  --color-muted-pill: #f2f4f7;
  --color-disabled-bg: #f1f2f4;
  --color-grabber: #d1d5db;
  --color-neutral-text: #7b8190;
  --color-neutral-border: #c2c8d2;
  --color-neutral-soft: #8f96a3;

  /* 9. Overlays / focus */
  --color-backdrop: rgba(17, 24, 39, 0.28);
  --color-sheet-bg: rgba(255, 255, 255, 0.96);
  --color-nav-bg: rgba(255, 255, 255, 0.86);
  --color-toast-bg: rgba(15, 23, 42, 0.9);
  --focus-border: rgba(0, 122, 255, 0.55);
  --focus-border-strong: rgba(0, 122, 255, 0.72);
  --focus-ring: rgba(0, 122, 255, 0.12);

  /* 10. Shadows */
  --shadow-card: 0 2px 12px rgba(15, 23, 42, 0.03);
  --shadow-card-strong: 0 2px 12px rgba(15, 23, 42, 0.035);
  --shadow-soft: 0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-elevated: 0 18px 55px rgba(15, 23, 42, 0.12);
  --shadow-nav: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-toast: 0 12px 30px rgba(15, 23, 42, 0.18);
  --shadow-button: 0 1px 5px rgba(15, 23, 42, 0.04);
  --shadow-sticky: 0 -10px 24px rgba(15, 23, 42, 0.06);

  /* 11. Backward-compatible aliases */
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --surface-2: var(--color-surface-muted);
  --border: var(--color-border);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --muted-light: var(--color-text-light);
  --blue: var(--color-primary);
  --blue-soft: var(--color-primary-soft);
  --green: var(--color-success);
  --green-soft: var(--color-success-soft);
  --orange: var(--color-warning);
  --orange-soft: var(--color-warning-soft);
  --red: var(--color-danger);
  --red-soft: var(--color-danger-soft);
  --shadow: var(--shadow-soft);

  /* Font system */
  --app-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --fw-page-title: 600;
  --fw-section-title: 500;
  --fw-card-title: 500;
  --fw-meta: 400;
  --fw-body: 400;
  --fw-button: 500;
  --fw-pill: 600;
  --fw-stats: 700;
  --fw-form-label: 600;
  --fw-input: 400;
  --leading-title: 0.98;
  --leading-tight: 1.12;
  --leading-normal: 1.35;
  --leading-relaxed: 1.5;
  --tracking-title: -0.04em;
  --tracking-heading: -0.03em;
  --tracking-card: -0.02em;
  color-scheme: light;
}

.settings-card:first-child {
  grid-column: auto;
}

@media (min-width: 820px) {
  .settings-card:first-child {
    grid-column: auto;
  }
}


.settings-delete-text {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: var(--fw-button);
  line-height: normal;
}

.search-section {
  margin: -10px 0 22px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 46px 0 44px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow-card);
}

.search-box input::placeholder {
  color: var(--muted-light);
}

.search-icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  color: var(--muted);
  pointer-events: none;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.clear-search {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.clear-search svg {
  width: 18px;
  height: 18px;
}

.clear-search:active {
  transform: scale(0.96);
}

@media (min-width: 820px) {
  .search-section {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .search-section {
    margin-top: -6px;
    margin-bottom: 20px;
  }

  .search-box input {
    min-height: 46px;
    border-radius: 15px;
    font-size: 14px;
  }
}

input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}

.toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  margin: 14px 0 24px;
  align-items: center;
}

.toolbar .primary-btn, .toolbar select {
  width: 100%;
}

@media (max-width: 430px) {
  .toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(128px, 0.62fr);
    gap: 8px;
  }

  .toolbar .primary-btn, .toolbar select {
    min-height: 46px;
    font-size: 14px;
    border-radius: 15px;
  }

  .toolbar .primary-btn {
    padding-left: 10px;
    padding-right: 10px;
  }

  .toolbar select {
    padding-left: 12px;
    padding-right: 40px;
  }
}

@media (max-width: 340px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
}

.secondary-screen .top-bar {
  padding-bottom: 18px;
}

.secondary-screen h1 {
  font-size: 36px;
  letter-spacing: -0.04em;
}

.secondary-screen .caption {
  font-size: 13px;
  color: var(--muted);
}

.settings-add-form button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: var(--fw-button);
  width: 100%;
  border: 1px solid var(--color-primary-border-strong);
  box-shadow: none;
  font-size: 15px;
}

.settings-add-form button:active {
  transform: scale(0.99);
}


.settings-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.settings-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.settings-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-add-form {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 820px) {
  .settings-stack {
    align-items: start;
  }
}

body:not(.secondary-screen) h1 {
  font-size: 36px;
}

body:not(.secondary-screen) #screenTitle {
  font-size: 36px !important;
}

.app:has(#bookingScreen:not(.hidden)) > .top-bar, .app:has(#reportsScreen:not(.hidden)) > .top-bar, .app:has(#settingsScreen:not(.hidden)) > .top-bar {
  display: none !important;
}

#bookingScreen:not(.hidden) .screen-local-header, #reportsScreen:not(.hidden) .screen-local-header, #settingsScreen:not(.hidden) .screen-local-header {
  display: block;
  padding: 12px 0 20px;
}

.screen-local-header .caption {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
}

@media (min-width: 820px) {
  #bookingScreen:not(.hidden) .screen-local-header, #reportsScreen:not(.hidden) .screen-local-header, #settingsScreen:not(.hidden) .screen-local-header {
    padding-top: 4px;
  }
}

.screen-local-header {
  display: none;
  padding-bottom: 22px;
}

.top-bar h1 {
  margin-bottom: 0;
}

.top-bar .caption, .screen-local-header .caption {
  margin: 6px 0 0;
  display: none !important;
}

.top-bar, .screen-local-header {
  padding-bottom: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar, html::-webkit-scrollbar, .app::-webkit-scrollbar, .app-content::-webkit-scrollbar, .screen::-webkit-scrollbar, main::-webkit-scrollbar {
  display: none;
}

.table-wrap, .shoot-list.list-view {
  scrollbar-width: auto;
  -ms-overflow-style: auto;
}

.table-wrap::-webkit-scrollbar, .shoot-list.list-view::-webkit-scrollbar {
  display: block;
}

#screenTitle, .screen-local-header h1 {
  margin: 0 !important;
}

.app, .app-content, main, #screenViewport, .screen {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

#screenViewport {
  touch-action: pan-y;
}

.table-wrap {
  overflow-x: auto !important;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  display: block;
  max-width: 100%;
  overflow-y: hidden;
  padding-bottom: 10px;
}

.shoot-list.list-view {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card-strong);
  overflow-x: auto !important;
}

html, body {
  margin: 0;
  background: var(--bg) !important;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  overscroll-behavior-y: auto !important;
  overscroll-behavior-x: none;
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: auto !important;
}

.app, .app-content, main, #screenViewport, .screen, #logScreen, #bookingScreen, #reportsScreen, #settingsScreen {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  touch-action: auto !important;
}

html {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none !important;
}

.table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.app {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 16px 98px;
  overflow-x: hidden;
  padding-top: 20px;
  padding-bottom: 112px !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 10px;
  background: var(--color-backdrop);
  backdrop-filter: blur(10px);
  overflow: hidden !important;
}

.sheet {
  width: min(100%, 760px);
  max-height: 94vh !important;
  overflow: hidden !important;
  padding: 8px 16px 18px;
  border-radius: 24px 24px 20px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding-bottom: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

#shootForm {
  padding-bottom: 112px;
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-left: 5px;
  padding-right: 5px;
  margin-left: -5px;
  margin-right: -5px;
}

.screen-local-header h1 {
  margin: 0;
  font-size: 36px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em !important;
}

body.secondary-screen #screenTitle {
  font-size: 36px !important;
  letter-spacing: -0.04em !important;
  line-height: 1.05 !important;
}


/* =========================================================
   v87: Preserve v81 Cards/Grid + Compact List View
   ---------------------------------------------------------
   - Cards/Grid view is locked back to the v81 card styling.
   - List view keeps one continuous row-list style on all devices.
   - List typography is intentionally smaller/compact so the bottom
     meta/status/link line stays on one line where space allows.
   ========================================================= */

/* Restore/protect v81 Cards view so List View cleanup cannot affect it */
.shoot-list:not(.list-view) {
  display: grid !important;
  gap: 10px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.shoot-list:not(.list-view) .shoot-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 16px !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card-strong) !important;
  text-align: left !important;
}

.shoot-list:not(.list-view) .card-top {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.shoot-list:not(.list-view) .property {
  display: block !important;
  margin: 0 0 6px !important;
  color: var(--text) !important;
  font-size: 18px !important;
  font-weight: var(--fw-card-title);
  line-height: 1.35 !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.shoot-list:not(.list-view) .shoot-card.has-record-links .property {
  max-width: calc(100% - 58px) !important;
}

.shoot-list:not(.list-view) .record-meta-line {
  display: block !important;
  margin: 0 0 12px !important;
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.shoot-list:not(.list-view) .record-footer {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Compact continuous list view: same layout on mobile/tablet/desktop */
.records.list-mode {
  overflow-x: visible !important;
}

.shoot-list.list-view {
  display: block !important;
  overflow: hidden !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card-strong) !important;
}

.shoot-list.list-view .shoot-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

.shoot-list.list-view .shoot-card:last-child {
  border-bottom: 0 !important;
}

.shoot-list.list-view .card-top {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 8px !important;
}

.shoot-list.list-view .card-top span {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: var(--fw-meta);
  line-height: 1.25 !important;
}

.shoot-list.list-view .card-top span:last-child {
  flex: 0 0 auto !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.shoot-list.list-view .property {
  display: block !important;
  margin: 0 0 8px !important;
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: var(--fw-card-title);
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
}

.shoot-list.list-view .record-meta-line {
  display: none !important;
}

.shoot-list.list-view .record-footer {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.shoot-list.list-view .list-meta-inline {
  display: inline-flex !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  align-items: center !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: var(--fw-meta);
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.shoot-list.list-view .status-pill {
  flex: 0 0 auto !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  font-weight: var(--fw-pill);
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.shoot-list.list-view .link-text {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: var(--fw-pill);
  line-height: 1.25 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.shoot-list.list-view .link-text.needs-attention {
  color: var(--color-warning-text) !important;
}

.shoot-list.list-view .link-text.ok {
  color: var(--color-success-text) !important;
}

@media (max-width: 430px) {
  .shoot-list.list-view {
    border-radius: 22px !important;
  }

  .shoot-list.list-view .shoot-card {
    padding: 13px 16px !important;
  }

  .shoot-list.list-view .card-top span,
  .shoot-list.list-view .list-meta-inline,
  .shoot-list.list-view .link-text {
    font-size: 12px !important;
  }

  .shoot-list.list-view .property {
    font-size: 14px !important;
  }

  .shoot-list.list-view .status-pill {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
}

/* =========================================================
   v88 Grid/List correction
   ---------------------------------------------------------
   - Grid/Cards view must show company-agent-apartment only once.
   - .list-meta-inline is only for compact List View.
   - Cards view follows the v81 structure:
     date/time, property, company-agent-apartment, status/link.
   ========================================================= */
.list-meta-inline {
  display: none !important;
}

.shoot-list:not(.list-view) .list-meta-inline {
  display: none !important;
}

.shoot-list:not(.list-view) .record-footer {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
}

.shoot-list.list-view .list-meta-inline {
  display: inline-flex !important;
}

/* =========================================================
   Grid card quick link buttons
   ---------------------------------------------------------
   - Cards/Grid view shows external photo/video buttons only when links exist.
   - Icon column is anchored to the card body/footer area, not the time row.
   - One available link stays bottom-right.
   - Two available links stack in the lower-right: photo above, video below.
   - List View stays compact and does not show these buttons.
   ========================================================= */
.shoot-list:not(.list-view) .shoot-card {
  position: relative !important;
  cursor: pointer !important;
}

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

.record-link-actions {
  display: none;
}

.shoot-list:not(.list-view) .record-link-actions {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 2;
}

.record-link-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--blue);
  background: var(--color-primary-soft-2);
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--color-primary-icon-border);
  transition: transform 0.15s ease, background 0.15s ease;
}

.record-link-btn:active {
  transform: scale(0.96);
  background: var(--color-primary-soft-3);
}

.record-link-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shoot-list.list-view .record-link-actions {
  display: none !important;
}

@media (max-width: 430px) {
  .shoot-list:not(.list-view) .record-link-actions {
    right: 18px;
    bottom: 20px;
    gap: 8px;
  }

  .record-link-btn {
    width: 32px;
    height: 32px;
  }

  .record-link-btn svg {
    width: 17px;
    height: 17px;
  }
}

/* v125 Settings menu structure */
.settings-menu {
  display: grid;
  gap: 22px;
}

.settings-group {
  display: grid;
  gap: 10px;
}

.settings-group-label {
  margin: 0 0 2px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-section-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-menu-card {
  width: 100%;
  min-height: 72px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  color: var(--text);
}

.settings-menu-card:active {
  transform: scale(0.995);
}

.settings-menu-card.has-icon {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  display: grid;
  gap: 12px;
}

.settings-menu-icon {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: var(--color-primary-tint);
}

.settings-menu-icon svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.settings-menu-text {
  min-width: 0;
}

.settings-menu-card strong {
  display: block;
  font-size: 17px;
  font-weight: var(--fw-card-title);
  letter-spacing: -0.02em;
}

.settings-menu-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
  line-height: 1.3;
}

.settings-menu-chevron {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-neutral-border);
}

.settings-menu-chevron svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.settings-detail {
  display: grid;
  gap: 14px;
}

.settings-detail-head {
  display: grid;
  gap: 5px;
}

.settings-detail-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px; font-weight: var(--fw-page-title);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.settings-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.settings-row-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-edit-text,
.settings-delete-text {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--fw-button);
  white-space: nowrap;
}

.settings-edit-text {
  border: 1px solid var(--color-primary-border);
  background: var(--color-primary-tint);
  color: var(--blue);
}

.settings-delete-text {
  border: 1px solid var(--color-danger-border);
  background: var(--color-danger-border-soft);
  color: var(--color-danger-text);
}

.settings-placeholder-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.settings-edit-sheet {
  max-width: 520px;
}

.settings-edit-form {
  display: grid;
  gap: 14px;
}

.settings-edit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
}

.settings-edit-form input {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--soft);
  color: var(--text);
  font-size: 15px;
  font-weight: var(--fw-input);
  padding: 0 14px;
  outline: none;
}

.settings-edit-form input:focus {
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.settings-edit-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-edit-actions {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

@media (max-width: 420px) {
  .settings-list-row {
    gap: 10px;
  }

  .settings-row-actions {
    gap: 6px;
  }

  .settings-edit-text,
  .settings-delete-text {
    padding: 0 9px;
  }
}

/* v126: Settings edit modal should not use the sticky shoot-form action bar */
.settings-edit-sheet {
  padding-bottom: 18px;
}

.settings-edit-form .actions,
.settings-edit-actions {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  margin: 8px 0 0;
  padding: 0;
  border-top: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.settings-edit-actions .primary-btn,
.settings-edit-actions .secondary-btn {
  min-height: 52px;
}

/* v127/v133: Agent Portal Access management */
.portal-access-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.portal-access-list {
  margin-top: 0;
}

.portal-user-row {
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--color-white);
  cursor: pointer;
  text-align: left;
}

.portal-user-row:active {
  transform: scale(0.995);
}

.portal-user-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.portal-user-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.portal-user-row strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.portal-user-row small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
  line-height: 1.25;
}

.portal-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: var(--fw-pill);
  line-height: 1.2;
}

.portal-status-pill.is-active {
  background: var(--color-success-soft-2);
  color: var(--color-success-dark);
}

.portal-status-pill.is-inactive {
  background: var(--color-danger-soft-2);
  color: var(--color-danger-text-2);
}

.portal-user-row.is-inactive .portal-user-info > strong,
.portal-user-row.is-inactive .portal-user-info > small {
  opacity: 0.72;
}

.portal-edit-form select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background-color: var(--soft);
  color: var(--text);
  font-size: 15px;
  font-weight: var(--fw-input);
  line-height: 1.25;
  padding: 0 46px 0 14px;
}

.portal-delete-access-btn {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--danger-surface-border);
  border-radius: 15px;
  background: var(--danger-surface-bg);
  color: var(--red);
  font: inherit;
  font-size: 15px;
  font-weight: var(--fw-button);
  cursor: pointer;
}

.portal-delete-access-btn:active {
  transform: scale(0.99);
  background: var(--danger-surface-active-bg);
}

@media (max-width: 760px) {
  .portal-user-row {
    padding: 16px;
  }

  .portal-user-info {
    min-width: 0;
  }

  .portal-user-row strong,
  .portal-user-row small {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* v136: Font wiring cleanup
   ---------------------------------------------------------
   Font weights are controlled by semantic role tokens below.
   Change these values first instead of chasing font-weight
   values across the file.

   Confirmed font group map:
   Page Title: 700
   Section Title: 600
   Card Title: 600
   Meta Text: 400
   Body Text: 400
   Buttons: 600
   Pills: 600
   Stats Numbers: 700
   Form Labels: 600
   Input Text: 400 */
body {
  font-family: var(--app-font);
  font-weight: var(--fw-body);
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.modal {
  overscroll-behavior: contain;
}

.sheet {
  max-height: calc(100dvh - 24px) !important;
}

.settings-edit-sheet {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.actions {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.bottom-nav {
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}

button,
.record-card,
.settings-menu-card,
.settings-list-row,
.portal-user-row,
.record-link-btn {
  transition: transform 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

button:active,
.record-card:active,
.settings-menu-card:active,
.portal-user-row:active,
.record-link-btn:active {
  transform: scale(0.985);
}

/* Page title group: Shoot Log, Reports, Settings, Settings detail screens */
h1,
.screen-title,
#screenTitle,
.top-bar h1,
.screen-local-header h1,
.sheet-head h2,
.settings-panel-title,
.report-paper h2 {
  font-weight: var(--fw-page-title) !important;
  letter-spacing: var(--tracking-title) !important;
  line-height: var(--leading-title) !important;
}

/* PIN screen title: keep private access title from scaling like app page titles */
.pin-card h1 {
  font-size: 32px !important;
  font-weight: var(--fw-page-title) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.04em !important;
  text-wrap: balance;
}

/* Section title group: Recent, Management/Data, report card headings, settings card headings */
.section-title,
.section-head h2,
.settings-section-title,
.settings-group-label,
.settings-menu-title,
.settings-card h2,
.report-card h3,
.settings-placeholder-card h3,
.empty-state h3 {
  font-weight: var(--fw-section-title) !important;
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-tight);
}

/* Card title group: property details, settings row names, portal access names */
.property,
.record-card .property,
.shoot-card .property,
.shoot-list:not(.list-view) .property,
.shoot-list.list-view .property,
.portal-user-name,
.portal-user-row strong,
.settings-list-row > span,
.settings-menu-card strong,
.summary-line strong,
.summary-row strong,
.agent-row strong {
  font-weight: var(--fw-card-title) !important;
  letter-spacing: var(--tracking-card);
}

/* Meta text group: dates, time, subtitles, secondary descriptions */
.caption,
.card-top span,
.record-meta-line,
.meta,
.record-meta,
.list-meta-inline,
.settings-menu-subtitle,
.settings-menu-card p,
.settings-card p,
.settings-edit-hint,
.portal-user-meta,
.portal-user-row small,
.report-subtitle,
.report-brand,
.report-controls label,
.helper-text,
.task-hint,
.task-status-preview,
.mini-note,
.empty-state p,
.summary-line span,
.summary-row span,
.agent-row span,
.table-wrap::after {
  font-weight: var(--fw-meta) !important;
  line-height: var(--leading-normal);
}

/* Body text group */
body,
p,
td,
.missing-link-row,
.settings-empty,
.portal-access-note {
  font-weight: var(--fw-body) !important;
}

/* Button group */
button,
.btn,
.primary-btn,
.secondary-btn,
.text-btn,
.segmented button,
.settings-toggle button,
.settings-add-form button,
.settings-edit-text,
.settings-delete-text,
.portal-delete-access-btn,
.bottom-nav button,
.view-toggle button,
.backup-btn,
.lock-app-btn,
.add-btn,
.delete-btn,
.duplicate-btn {
  font-weight: var(--fw-button) !important;
}

/* Pill/status group */
.status-pill,
.link-text,
.connection-status,
.portal-status-pill,
.pill,
.mini-note.good,
.missing-link-row strong {
  font-weight: var(--fw-pill) !important;
}

/* Stats number group */
.stats span,
.report-summary strong {
  font-weight: var(--fw-stats) !important;
}

/* Form label group */
label,
th,
.task-section-title,
.video-requirement-title,
.status-box legend,
.settings-edit-form label,
.portal-access-note,
.radio-row strong,
.check-row {
  font-weight: var(--fw-form-label);
}

/* Input text group */
input,
textarea,
select,
.pin-form input {
  font-weight: var(--fw-input);
}

.pin-form input {
  letter-spacing: 0.42em;
}

/* =========================================================
   v141 Custom confirmation dialog
   ---------------------------------------------------------
   Reusable app-styled confirm modal for destructive actions.
   ========================================================= */
.app-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: end center;
  padding: 14px;
  background: var(--color-backdrop);
  backdrop-filter: blur(10px);
  animation: app-confirm-fade-in 0.14s ease-out;
}

.app-confirm-overlay.closing {
  animation: app-confirm-fade-out 0.14s ease-in forwards;
}

.app-confirm-dialog {
  width: min(100%, 420px);
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-elevated);
  animation: app-confirm-slide-up 0.16s ease-out;
}

.app-confirm-dialog h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: var(--fw-section-title);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}

.app-confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-body);
  line-height: var(--leading-relaxed);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.app-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.app-confirm-actions button {
  min-height: 46px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: var(--fw-button);
}

.app-confirm-cancel {
  color: var(--text);
  background: var(--color-surface-muted);
}

.app-confirm-accept {
  color: var(--color-white);
  background: var(--blue);
}

.app-confirm-dialog.danger .app-confirm-accept {
  background: var(--red);
}

.app-confirm-actions button:active {
  transform: scale(0.985);
}

.app-confirm-actions button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.app-video-choice-dialog {
  display: grid;
  gap: 14px;
}

.app-video-choice-dialog h2 {
  margin-bottom: 0;
}

.app-video-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-video-choice-actions button {
  min-height: 46px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: var(--fw-button);
}

.app-video-choice-btn {
  color: var(--color-white);
  background: var(--blue);
}

.app-video-choice-cancel {
  grid-column: 1 / -1;
  color: var(--text);
  background: var(--color-surface-muted);
}

.app-video-choice-actions button:active {
  transform: scale(0.985);
}

.app-video-choice-actions button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

@media (max-width: 340px) {
  .app-video-choice-actions {
    grid-template-columns: 1fr;
  }

  .app-video-choice-cancel {
    grid-column: auto;
  }
}

@keyframes app-confirm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes app-confirm-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes app-confirm-slide-up {
  from { transform: translateY(14px); opacity: 0.94; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 640px) {
  .app-confirm-overlay {
    place-items: center;
  }
}

/* =========================================================
   v142 Custom notice modal
   ---------------------------------------------------------
   Reusable app-styled notice/warning modal for alerts.
   ========================================================= */
.app-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 121;
  display: grid;
  place-items: end center;
  padding: 14px;
  background: var(--color-backdrop);
  backdrop-filter: blur(10px);
  animation: app-confirm-fade-in 0.14s ease-out;
}

.app-notice-overlay.closing {
  animation: app-confirm-fade-out 0.14s ease-in forwards;
}

.app-notice-dialog {
  width: min(100%, 420px);
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  display: grid;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-elevated);
  animation: app-confirm-slide-up 0.16s ease-out;
}

.app-notice-dialog h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: var(--fw-section-title);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}

.app-notice-dialog.warning h2 {
  color: var(--color-warning-deep);
}

.app-notice-dialog.danger h2 {
  color: var(--red);
}

.app-notice-dialog p {
  min-width: 0;
  max-height: 42dvh;
  margin: 0;
  overflow-y: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-body);
  line-height: var(--leading-relaxed);
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-notice-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.app-notice-actions button {
  min-height: 46px;
  border-radius: 16px;
  color: var(--color-white);
  background: var(--blue);
  font-size: 14px;
  font-weight: var(--fw-button);
}

.app-notice-dialog.warning .app-notice-actions button {
  color: var(--color-warning-deep);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
}

.app-notice-dialog.danger .app-notice-actions button {
  background: var(--red);
}

.app-notice-actions button:active {
  transform: scale(0.985);
}

.app-notice-actions button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

@media (min-width: 640px) {
  .app-notice-overlay {
    place-items: center;
  }
}


/* v152: Admin report filters matched to Agent Portal range button style */
.report-controls {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
}

.report-range-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: -2px 0 0;
}

.report-range-filter .report-range-btn,
.report-range-filter button {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-button);
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: var(--shadow-button);
}

.report-range-filter .report-range-btn.active,
.report-range-filter button.active {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--color-primary-border-strong);
  box-shadow: inset 0 0 0 1px var(--color-primary-border-strong);
}

.report-range-filter .report-range-btn:active,
.report-range-filter button:active {
  transform: scale(0.99);
}

.report-generated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.report-header {
  align-items: flex-start;
}

@media (max-width: 390px) {
  .report-range-filter {
    gap: 6px;
  }

  .report-range-filter .report-range-btn,
  .report-range-filter button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
    border-radius: 14px;
  }
}


/* v155: compact report summary cards */
.report-grid .report-card {
  padding: 13px;
}

.report-grid .report-card h3 {
  margin-bottom: 10px;
}

.report-grid .summary-grid,
.report-grid .summary-list {
  gap: 8px;
}

.report-grid .summary-line,
.report-grid .summary-line:last-child {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.report-grid .summary-line strong {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

@media (max-width: 520px) {
  .report-grid .report-card {
    padding: 12px;
  }

  .report-grid .summary-line,
  .report-grid .summary-line:last-child {
    min-height: 42px;
    padding: 8px 10px;
  }
}

/* v157: Reports controls responsive layout polish
   - Mobile keeps stacked layout: month, range filters, export.
   - Tablet/desktop puts range filters and Export PDF on one row.
   - Range filter height matches Export PDF button height on all devices. */
#reportsScreen .report-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

#reportsScreen .report-controls label {
  margin: 0;
}

#reportsScreen .report-range-filter {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

#reportsScreen .report-range-filter .report-range-btn,
#reportsScreen .report-range-filter button,
#reportsScreen #exportPdfBtn {
  min-height: 48px;
  border-radius: 16px;
}

#reportsScreen #exportPdfBtn {
  width: 100%;
  margin: 0;
  white-space: nowrap;
}

@media (min-width: 820px) {
  #reportsScreen .report-controls {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    gap: 14px 12px;
    align-items: stretch;
  }

  #reportsScreen .report-controls label {
    grid-column: 1 / -1;
  }

  #reportsScreen .report-range-filter {
    grid-column: 1;
  }

  #reportsScreen #exportPdfBtn {
    grid-column: 2;
    align-self: stretch;
  }
}

@media (max-width: 390px) {
  #reportsScreen .report-range-filter .report-range-btn,
  #reportsScreen .report-range-filter button,
  #reportsScreen #exportPdfBtn {
    min-height: 46px;
    border-radius: 15px;
  }
}

/* v161: App Lock moved to Settings header using Agent Portal lock button style */
#settingsScreen:not(.hidden) .settings-main-header:not(.hidden) {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-main-header h1 {
  min-width: 0;
}

.settings-lock-top-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.settings-lock-top-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =========================================================
   v162: Shoot CSV import preview
   ---------------------------------------------------------
   Preview-only import UI with responsive matching comparison.
   No records are saved in this version.
   ========================================================= */
.import-card,
.data-backup-card {
  gap: 18px;
}

.import-card-head {
  margin-bottom: 0;
}

.import-card h3,
.data-backup-card h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--fw-section-title);
  letter-spacing: var(--tracking-card);
}

.import-actions {
  grid-template-columns: 1fr;
}

.import-preview {
  display: grid;
  gap: 14px;
  margin-top: 2px;
}

.import-preview-head strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--fw-section-title);
  letter-spacing: var(--tracking-card);
}

.import-preview-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.import-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-preview-stats article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.import-preview-stats span {
  display: block;
  color: var(--text);
  font-size: 24px;
  font-weight: var(--fw-stats);
  line-height: 1;
}

.import-preview-stats p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.import-preview-stats .has-errors {
  border-color: var(--color-danger-border);
  background: var(--danger-surface-bg, var(--color-danger-soft-2));
}

.import-match-grid {
  display: grid;
  gap: 12px;
}

.import-match-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.import-match-card h4,
.import-errors h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: var(--fw-section-title);
  letter-spacing: var(--tracking-card);
}

.import-match-table {
  display: grid;
  gap: 7px;
}

.import-match-head,
.import-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.import-match-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-form-label);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.import-match-row span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-divider);
  border-radius: 13px;
  background: var(--color-surface-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.import-match-row span:last-child {
  display: grid;
  gap: 5px;
}

.import-match-row em {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-style: normal;
  color: var(--color-success-text);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: var(--fw-pill);
}

.import-match-row.is-unmatched em {
  color: var(--color-danger-text);
  background: var(--red-soft);
}

.import-match-row.is-new em {
  color: var(--blue);
  background: var(--blue-soft);
}

.settings-import-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: var(--color-surface-soft);
  font-size: 13px;
  line-height: 1.35;
}

.import-errors,
.import-ready-note {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--color-surface-soft);
}

.import-errors {
  border-color: var(--color-warning-border);
  background: var(--color-warning-bg);
}

.import-errors ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--color-warning-deep);
  font-size: 13px;
  line-height: 1.4;
}

.import-ready-note strong {
  display: block;
  color: var(--color-success-text);
  font-weight: var(--fw-card-title);
}

.import-ready-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (min-width: 720px) {
  .import-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .import-preview-stats {
    grid-template-columns: 1fr;
  }

  .import-match-head,
  .import-match-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  .import-match-row span {
    padding: 9px;
    font-size: 12px;
  }
}

/* v168: Shoot CSV import action */
.import-confirm-btn {
  width: 100%;
  margin-top: 12px;
}
.import-confirm-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

/* v170: Settings CSV import match sections collapse by default */
.import-match-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.import-match-card-head > div {
  min-width: 0;
}

.import-match-card-head h4 {
  margin: 0;
}

.import-match-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
  line-height: 1.3;
}

.import-match-chevron {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.24s ease, color 0.18s ease;
}

.import-match-card.is-expanded .import-match-chevron {
  transform: rotate(180deg);
  color: var(--blue);
}

.import-match-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: grid-template-rows 0.28s ease, opacity 0.18s ease, margin-top 0.28s ease;
}

.import-match-panel > .import-match-table {
  min-height: 0;
  overflow: hidden;
}

.import-match-card.is-expanded .import-match-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
}

.import-match-card.is-empty .import-match-card-head {
  cursor: default;
}


/* v171: Import preview collapse + centralized CSV template export */
.import-card .import-actions {
  grid-template-columns: 1fr !important;
}

.data-backup-card .backup-actions {
  grid-template-columns: 1fr;
}


/* v176: Keep Shoot/Settings import preview sections one column on all screen sizes */
.import-match-grid {
  grid-template-columns: 1fr !important;
}

/* v173: Align Reports header rhythm with Settings tab
   - Keeps Reports/Settings headers vertically consistent.
   - Removes the extra inherited top margin before Report Month so it matches Settings → Management spacing. */
#bookingScreen:not(.hidden) .screen-local-header,
#reportsScreen:not(.hidden) .screen-local-header,
#settingsScreen:not(.hidden) .screen-local-header {
  padding-top: 12px;
  padding-bottom: 20px;
}

#reportsScreen .report-controls {
  margin: 0 0 26px;
}

@media (min-width: 820px) {
  #bookingScreen:not(.hidden) .screen-local-header,
  #reportsScreen:not(.hidden) .screen-local-header,
  #settingsScreen:not(.hidden) .screen-local-header {
    padding-top: 4px;
  }
}

/* =========================================================
   v174: Unified tab header vertical alignment
   ---------------------------------------------------------
   Keeps Log, Reports, and Settings headers on the same
   vertical rhythm across mobile/tablet/desktop. The title,
   status pill, refresh button, and lock button all align to
   the same header row sizing.
   ========================================================= */
:root {
  --tab-header-top-space: 12px;
  --tab-header-bottom-space: 20px;
  --tab-header-action-size: 44px;
}

.app > .top-bar,
#bookingScreen:not(.hidden) > .screen-local-header,
#reportsScreen:not(.hidden) > .screen-local-header,
#settingsScreen:not(.hidden) > .screen-local-header:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-height: calc(var(--tab-header-action-size) + var(--tab-header-top-space) + var(--tab-header-bottom-space));
  padding-top: var(--tab-header-top-space) !important;
  padding-bottom: var(--tab-header-bottom-space) !important;
}

#bookingScreen:not(.hidden) > .screen-local-header {
  justify-content: space-between !important;
}

#reportsScreen:not(.hidden) > .screen-local-header {
  justify-content: space-between !important;
}

.app > .top-bar > div:first-child,
#bookingScreen:not(.hidden) > .screen-local-header > h1,
#settingsScreen:not(.hidden) > .screen-local-header > h1,
#reportsScreen:not(.hidden) > .screen-local-header > h1 {
  min-width: 0;
}

.sync-cluster {
  min-height: var(--tab-header-action-size);
  align-items: center !important;
}

.sync-btn,
.settings-lock-top-btn {
  width: var(--tab-header-action-size) !important;
  height: var(--tab-header-action-size) !important;
  flex: 0 0 var(--tab-header-action-size) !important;
}

.connection-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 820px) {
  .app > .top-bar,
  #bookingScreen:not(.hidden) > .screen-local-header,
  #reportsScreen:not(.hidden) > .screen-local-header,
  #settingsScreen:not(.hidden) > .screen-local-header:not(.hidden) {
    padding-top: var(--tab-header-top-space) !important;
    padding-bottom: var(--tab-header-bottom-space) !important;
  }
}


/* v183 Log result pill and Settings access indicators */
.log-result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--color-surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-pill);
  line-height: 1;
  white-space: nowrap;
}

.log-result-pill.is-found,
.log-result-pill.is-count {
  background: var(--color-success-soft-2);
  color: var(--color-success-dark);
  border-color: transparent;
}

.log-result-pill.is-searching {
  background: var(--color-warning-soft);
  color: var(--color-warning-text);
  border-color: transparent;
}

.log-result-pill.is-empty {
  background: var(--color-danger-soft-2);
  color: var(--color-danger-text-2);
  border-color: transparent;
}

.log-result-pill.is-local {
  background: var(--surface);
  color: var(--muted);
}

.settings-item-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-item-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-access-key-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-warning-soft);
  color: var(--color-warning-text);
}

.agent-access-key-pill svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-user-row .portal-status-pill {
  margin-left: auto;
  flex: 0 0 auto;
}

/* v182 scalable Log loading */
.log-list-footer {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px 8px 4px;
  color: var(--muted);
  text-align: center;
}

.log-list-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.log-list-footer .compact {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
}

.inline-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}

.log-loading-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  margin: 4px auto;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
  box-shadow: var(--shadow-soft);
}

.log-dot-placeholder {
  justify-content: center;
}

.stats .log-dot-placeholder {
  min-height: 29px;
}

.small-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: sync-spin 0.8s linear infinite;
}


/* v191 large data import/export loading states */
.app-toast.is-progress {
  min-width: min(86vw, 280px);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  text-align: left;
}

.app-toast-progress,
.import-loading-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.app-toast-progress span,
.import-loading-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: var(--color-primary);
  animation: loading-bar-slide 1.05s ease-in-out infinite;
}

.import-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 124;
  display: none;
  place-items: center;
  padding: 24px;
  background: var(--color-backdrop);
  backdrop-filter: blur(10px);
}

.import-loading-overlay.show {
  display: grid;
}

.import-loading-dialog {
  width: min(100%, 380px);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-elevated);
}

.import-loading-dialog h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: var(--fw-section-title);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}

.import-loading-dialog p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-body);
  line-height: var(--leading-relaxed);
}

.import-loading-dialog .import-loading-bar {
  height: 6px;
  background: var(--color-primary-soft);
}

@keyframes loading-bar-slide {
  0% {
    transform: translateX(-110%);
  }
  50% {
    transform: translateX(70%);
  }
  100% {
    transform: translateX(245%);
  }
}

/* v208 Booking Settings foundation */
.booking-settings-card {
  gap: 12px;
}

.booking-rules-form {
  display: grid;
  gap: 12px;
}

.booking-rules-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-section-title);
  letter-spacing: 0.01em;
}

.booking-rules-form input,
.booking-add-form input,
.booking-duration-form input,
.booking-holiday-form input,
.booking-working-row input[type="time"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 0 13px;
  font-size: 15px;
  outline: none;
}

.booking-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.booking-input-unit span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.booking-save-btn {
  min-height: 46px;
}

.booking-profile-row.is-inactive {
  opacity: 0.62;
}

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

.booking-working-row {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) minmax(0, 100px) minmax(0, 100px);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted, #f8f8f9);
}

.booking-working-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: var(--fw-card-title);
}

.booking-working-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.booking-working-row input:disabled {
  opacity: 0.45;
}

.settings-item-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
}

@media (min-width: 720px) {
  .booking-rules-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-full-field,
  .booking-save-btn {
    grid-column: 1 / -1;
  }

  .booking-add-form,
  .booking-duration-form,
  .booking-holiday-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .booking-add-form button,
  .booking-duration-form button,
  .booking-holiday-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .booking-working-row {
    grid-template-columns: 1fr;
  }
}

/* v208 Booking Settings structure refinement */
.booking-settings-subpanel {
  display: grid;
  gap: 14px;
}

.booking-settings-subpanel.hidden {
  display: none !important;
}

.booking-subpanel-head {
  display: grid;
  gap: 10px;
}

.booking-subpanel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: var(--fw-title);
}

.booking-subpanel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-back-btn {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: var(--fw-button);
  cursor: pointer;
}

.booking-suffix-field {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.booking-suffix-field input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.booking-suffix-field span {
  display: inline-flex;
  align-items: center;
  border-left: 1px solid var(--border);
  padding: 0 12px;
  background: var(--surface-muted, #f8f8f9);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.booking-rule-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.booking-upload-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-section-title);
}

.booking-upload-field input[type="file"] {
  width: 100%;
  min-height: 44px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--surface-muted, #f8f8f9);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
}

.booking-profile-grid {
  display: grid;
  gap: 10px;
}

.booking-profile-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 12px;
  color: var(--text);
  cursor: pointer;
}

.booking-profile-card.is-inactive {
  opacity: 0.62;
}

.booking-profile-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-muted, #f1f3f5);
  color: var(--blue);
  font-size: 22px;
  font-weight: var(--fw-title);
}

.booking-profile-thumb svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-profile-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.booking-profile-info strong,
.booking-profile-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-profile-info strong {
  font-size: 15px;
  font-weight: var(--fw-card-title);
}

.booking-profile-info small {
  color: var(--muted);
  font-size: 12px;
}

.booking-working-row {
  grid-template-columns: minmax(116px, 1.2fr) repeat(4, minmax(95px, 1fr));
}

.booking-working-row label:not(.booking-working-toggle) {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-section-title);
}

.booking-break-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.booking-banner-form {
  display: grid;
  gap: 14px;
}

.booking-banner-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background-color: var(--surface-muted, #f8f8f9);
  background-position: center;
  background-size: cover;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.booking-banner-preview {
  min-height: 150px;
}

@media (min-width: 720px) {
  .booking-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-upload-field,
  .booking-rule-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .booking-working-row {
    grid-template-columns: 1fr 1fr;
  }

  .booking-working-toggle,
  .booking-break-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .booking-suffix-field {
    display: grid;
  }

  .booking-suffix-field span {
    min-height: 36px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

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

/* v209 Booking Settings UX refinement */
.booking-rules-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 0 38px 0 13px;
  font-size: 15px;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.booking-working-hours {
  gap: 8px;
}

.booking-working-day {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted, #f8f8f9);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.booking-working-day-head {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
}

.booking-working-slots {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 12px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.booking-working-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted, #f8f8f9);
}

.booking-working-slot:last-of-type {
  border-bottom: 1px solid var(--border);
}

.booking-working-time {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
}

.booking-working-time-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-working-slot-actions {
  justify-content: flex-end;
}

.booking-working-day.is-disabled .booking-working-slot {
  background: color-mix(in srgb, var(--surface-muted, #f8f8f9) 72%, var(--surface) 28%);
}

.booking-working-day.is-disabled .booking-working-time,
.booking-working-day.is-disabled .booking-day-off {
  opacity: 0.48;
}

.booking-working-day.is-disabled .booking-working-slot-actions,
.booking-working-day.is-disabled .booking-working-slot-actions button {
  opacity: 1;
  pointer-events: auto;
}

.booking-working-expand-btn {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 0 0 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.booking-working-status-pill {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--color-primary-tint);
  color: var(--blue);
  font-size: 12px;
  font-weight: var(--fw-pill);
  white-space: nowrap;
}

.booking-working-status-pill.is-off {
  background: var(--color-muted-pill);
  color: var(--muted);
}

.booking-working-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--color-neutral-border);
  transform: rotate(0deg);
  transition: transform 0.14s ease;
}

.booking-working-chevron svg {
  width: 20px;
  height: 20px;
}

.booking-working-day.is-expanded .booking-working-chevron {
  transform: rotate(90deg);
}

.booking-add-slot-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  width: 100%;
  min-height: 42px;
  justify-self: stretch;
  border-radius: 14px;
  padding: 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: var(--fw-button);
}

.booking-day-off {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-card-title);
  background: var(--surface);
}

.booking-custom-upload {
  position: relative;
  gap: 8px;
}

.booking-custom-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.booking-upload-control {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--blue);
  border-radius: 14px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  color: var(--blue);
  font-size: 14px;
  font-weight: var(--fw-button);
  cursor: pointer;
}

.booking-custom-upload small {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .booking-working-day-head {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 50px;
    padding: 7px 10px;
  }

  .booking-working-slots {
    margin: 0;
    padding: 0 10px 10px;
  }

  .booking-working-slot {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 44px;
    padding: 6px 7px 6px 10px;
  }

  .booking-working-time {
    gap: 7px;
    font-size: 13px;
  }

  .booking-working-slot-actions {
    gap: 6px;
  }

  .booking-working-slot-actions .settings-edit-text,
  .booking-working-slot-actions .settings-delete-text {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .booking-working-day-head {
    min-height: 48px;
    gap: 7px;
    padding: 6px 9px;
  }

  .booking-working-slots {
    margin: 0;
    padding: 0 8px 8px;
  }

  .booking-working-slot {
    gap: 6px;
    padding: 6px;
  }

  .booking-working-time {
    gap: 5px;
    font-size: 12px;
  }

  .booking-working-time-icon {
    width: 15px;
    height: 15px;
  }

  .booking-working-slot-actions {
    gap: 5px;
  }

  .booking-working-slot-actions .settings-edit-text,
  .booking-working-slot-actions .settings-delete-text {
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }

  .booking-working-status-pill {
    min-height: 24px;
    padding: 0 7px;
    font-size: 11px;
  }
}

.booking-working-slot-time-grid {
  display: grid;
  gap: 12px;
}

.booking-working-slot-form input[readonly] {
  color: var(--muted);
  background: var(--color-surface-muted);
}

@media (min-width: 560px) {
  .booking-working-slot-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v210 Booking Settings polish */
#bookingSettingsPanel .booking-suffix-field:focus-within,
#bookingSettingsPanel .booking-rules-form select:focus,
#bookingSettingsPanel .booking-working-expand-btn:focus-visible,
#bookingSettingsPanel .booking-add-slot-btn:focus-visible {
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

#bookingSettingsPanel .booking-custom-upload:focus-within .booking-upload-control {
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

#bookingSettingsPanel .booking-upload-control:active,
#bookingSettingsPanel .booking-add-slot-btn:active,
#bookingSettingsPanel .booking-working-expand-btn:active,
#bookingSettingsPanel .booking-profile-card:active {
  transform: scale(0.99);
}

#bookingSettingsPanel .booking-working-toggle input[type="checkbox"],
#bookingPhotographerOverlay .portal-active-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 21px;
  height: 21px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1.6px solid var(--color-neutral-soft);
  border-radius: 6px;
  background: var(--color-white);
  display: inline-grid;
  place-content: center;
  flex: 0 0 21px;
  outline: none;
  box-shadow: none;
  cursor: pointer;
}

#bookingSettingsPanel .booking-working-toggle input[type="checkbox"]::after,
#bookingPhotographerOverlay .portal-active-toggle input[type="checkbox"]::after {
  content: "";
  width: 5px;
  height: 10px;
  border: solid var(--color-white);
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
}

#bookingSettingsPanel .booking-working-toggle input[type="checkbox"]:checked,
#bookingPhotographerOverlay .portal-active-toggle input[type="checkbox"]:checked {
  border-color: var(--blue);
  background: var(--blue);
}

#bookingSettingsPanel .booking-working-toggle input[type="checkbox"]:checked::after,
#bookingPhotographerOverlay .portal-active-toggle input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

#bookingPhotographerOverlay .portal-active-toggle:focus-within {
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}

#bookingSettingsPanel .booking-working-toggle:focus-within {
  box-shadow: none;
}

#bookingSettingsPanel .booking-working-toggle input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}

#bookingPhotographerOverlay .portal-active-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--color-surface-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-form-label);
}

#bookingSettingsPanel .booking-working-toggle {
  min-width: 0;
  padding: 4px 6px;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}

#bookingSettingsPanel .booking-working-toggle span {
  min-width: 0;
}

@media (min-width: 521px) and (max-width: 700px) {
  #bookingSettingsPanel .booking-working-slot {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 420px) {
  #bookingSettingsPanel .booking-subpanel-head h3 {
    font-size: 19px;
  }

  #bookingSettingsPanel .booking-subpanel-head p,
  #bookingSettingsPanel .settings-menu-card small {
    overflow-wrap: anywhere;
  }
}

/* v212 Agent Booking Rules + Shoot Types + Booking Durations */
#bookingRulesPanel .booking-rules-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

#bookingRulesPanel .booking-rule-group {
  display: grid;
  gap: 12px;
}

#bookingRulesPanel .booking-rule-group h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: var(--fw-section-title);
  letter-spacing: 0;
}

#bookingRulesPanel .booking-rule-fields {
  display: grid;
  gap: 12px;
}

#bookingRulesPanel .booking-rule-fields label {
  min-width: 0;
}

#bookingRulesPanel .booking-rule-note {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted, #f8f8f9);
}

#bookingShootTypeList .booking-choice-row,
#bookingDurationList .booking-choice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
}

#bookingShootTypeList .settings-item-label,
#bookingDurationList .settings-item-label {
  flex: 1 1 auto;
  min-width: 0;
}

#bookingDurationList .booking-duration-label {
  display: grid;
  gap: 2px;
  align-content: center;
}

#bookingDurationList .booking-duration-label small {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
  white-space: nowrap;
}

#bookingShootTypeList .settings-row-actions,
#bookingDurationList .settings-row-actions {
  align-self: center;
  justify-content: flex-end;
}

.booking-settings-edit-form label.hidden {
  display: none;
}

/* v213 Booking Holidays date range */
#bookingHolidaysPanel .booking-holiday-form {
  gap: 12px;
}

#bookingHolidaysPanel .booking-holiday-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-section-title);
}

#bookingHolidaysPanel .booking-holiday-field span {
  line-height: 1.25;
}

#bookingHolidaysPanel .booking-holiday-form textarea,
#bookingHolidayEditOverlay .booking-holiday-edit-form textarea {
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 13px;
  font-size: 15px;
  font-weight: var(--fw-input);
  line-height: 1.35;
  resize: vertical;
  outline: none;
}

#bookingHolidaysPanel .booking-holiday-form input:focus,
#bookingHolidaysPanel .booking-holiday-form textarea:focus,
#bookingHolidayEditOverlay .booking-holiday-edit-form input:focus,
#bookingHolidayEditOverlay .booking-holiday-edit-form textarea:focus {
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

#bookingHolidaysPanel .booking-holiday-day-count,
#bookingHolidayEditOverlay .booking-holiday-day-count {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
  line-height: 1.35;
}

#bookingHolidayList {
  gap: 10px;
}

#bookingHolidayList .booking-holiday-card {
  width: 100%;
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--color-surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

#bookingHolidayList .booking-holiday-card:hover {
  border-color: var(--color-primary-border-strong);
  background: var(--surface);
}

#bookingHolidayList .booking-holiday-card:focus-visible {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

#bookingHolidayList .booking-holiday-card-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

#bookingHolidayList .booking-holiday-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

#bookingHolidayList .settings-item-name {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: var(--fw-card-title);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#bookingHolidayList small {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#bookingHolidayList .booking-holiday-status {
  justify-self: end;
  white-space: nowrap;
}

#bookingHolidayList .booking-holiday-status.is-ongoing {
  background: var(--color-success-soft-2);
  color: var(--color-success-dark);
}

#bookingHolidayList .booking-holiday-status.is-upcoming {
  background: var(--color-primary-soft);
  color: var(--blue);
}

#bookingHolidayList .booking-holiday-status.is-past {
  background: var(--color-muted-pill);
  color: var(--color-neutral-text);
}

#bookingHolidayList .booking-past-holidays {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

#bookingHolidayList .booking-past-holidays h4 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: var(--fw-section-title);
  line-height: 1.25;
}

#bookingHolidayList .booking-past-holiday-list {
  display: grid;
  gap: 10px;
}

#bookingHolidayEditOverlay .booking-holiday-date-grid {
  display: grid;
  gap: 12px;
}

#bookingHolidayEditOverlay .booking-holiday-delete-btn {
  margin-top: 2px;
}

@media (min-width: 720px) {
  #bookingHolidaysPanel .booking-holiday-title-field,
  #bookingHolidaysPanel .booking-holiday-message-field,
  #bookingHolidaysPanel .booking-holiday-day-count,
  #bookingHolidaysPanel .booking-holiday-form button {
    grid-column: 1 / -1;
  }

  #bookingHolidayEditOverlay .booking-holiday-date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  #bookingHolidayList .booking-holiday-card-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #bookingHolidayList .booking-holiday-status {
    justify-self: start;
  }
}

@media (min-width: 720px) {
  #bookingRulesPanel .booking-rule-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #bookingShootTypeList .booking-choice-row,
  #bookingDurationList .booking-choice-row {
    gap: 10px;
  }

  #bookingShootTypeList .settings-row-actions,
  #bookingDurationList .settings-row-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
  }
}

/* v211 Banner Upload polish */
#bookingBannerPanel .booking-upload-field {
  gap: 8px;
}

#bookingBannerPanel .booking-upload-choose {
  display: grid;
}

#bookingBannerPanel .booking-upload-choose.hidden,
#bookingBannerPanel .booking-upload-selected.hidden {
  display: none;
}

#bookingBannerPanel .booking-upload-selected {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 4px 4px 4px 12px;
}

#bookingBannerPanel .booking-upload-selected small {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: var(--fw-meta);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bookingBannerPanel .booking-upload-remove {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}

#bookingBannerPanel .booking-upload-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#bookingBannerPanel .booking-upload-remove:active {
  transform: scale(0.96);
}

#bookingPhotographersPanel .booking-profile-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px;
}

#bookingPhotographersPanel .booking-profile-card.is-inactive {
  opacity: 1;
}

#bookingPhotographersPanel .booking-profile-card.is-inactive .booking-profile-thumb,
#bookingPhotographersPanel .booking-profile-card.is-inactive .booking-profile-info {
  opacity: 0.72;
}

#bookingPhotographersPanel .booking-profile-info {
  min-width: 0;
  gap: 5px;
}

#bookingPhotographersPanel .booking-profile-card > .portal-status-pill {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

#bookingPhotographersPanel .booking-profile-thumb {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}

#bookingPhotographersPanel .booking-profile-thumb svg {
  width: 24px;
  height: 24px;
}

#bookingPhotographerOverlay .portal-edit-form {
  display: grid;
  gap: 12px;
}

#bookingPhotographerOverlay .settings-edit-sheet {
  padding-bottom: 0;
}

#bookingPhotographerOverlay .booking-photographer-edit-top {
  display: grid;
  gap: 10px;
}

#bookingPhotographerOverlay .booking-photographer-edit-fields {
  display: grid;
  gap: 12px;
}

#bookingPhotographerOverlay .booking-photographer-edit-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
}

#bookingPhotographerOverlay .booking-photographer-edit-fields input {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--soft);
  color: var(--text);
  font-size: 15px;
  font-weight: var(--fw-input);
  padding: 0 14px;
  outline: none;
}

#bookingPhotographerOverlay .booking-status-control,
#portalEditOverlay .portal-status-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
}

#bookingPhotographerOverlay .booking-status-toggle,
#portalEditOverlay .portal-status-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--color-surface-soft);
}

#bookingPhotographerOverlay .booking-status-toggle button,
#portalEditOverlay .portal-status-toggle button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--fw-button);
  cursor: pointer;
}

#bookingPhotographerOverlay .booking-status-toggle button.active,
#portalEditOverlay .portal-status-toggle button.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--color-primary-border-strong);
}

#bookingBannerPanel .booking-banner-preview {
  min-height: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background-size: contain;
  background-repeat: no-repeat;
}

@media (max-width: 520px) {
  #bookingPhotographersPanel .booking-profile-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  #bookingPhotographersPanel .booking-profile-card > .portal-status-pill {
    grid-column: 3;
    justify-self: end;
  }

  #bookingBannerPanel .booking-banner-preview {
    aspect-ratio: 16 / 9;
  }
}

/* v214 Default Working Hours compact row alignment */
#bookingWorkingHoursPanel .booking-working-day-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  gap: 10px;
  min-height: 50px;
  padding: 7px 12px;
}

#bookingWorkingHoursPanel .booking-working-toggle {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0;
  max-width: 100%;
  display: inline-grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-self: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

#bookingWorkingHoursPanel .booking-working-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bookingWorkingHoursPanel .booking-working-expand-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: auto !important;
  max-width: max-content;
  align-self: center;
  justify-self: end;
  display: inline-flex !important;
  flex: 0 0 auto;
  white-space: nowrap;
}

#bookingWorkingHoursPanel .booking-working-status-pill,
#bookingWorkingHoursPanel .booking-working-chevron {
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  #bookingWorkingHoursPanel .booking-working-day-head {
    min-height: 48px;
    gap: 8px;
    padding: 6px 9px;
  }

  #bookingWorkingHoursPanel .booking-working-toggle {
    gap: 7px;
  }

  #bookingWorkingHoursPanel .booking-working-status-pill {
    min-height: 24px;
    padding: 0 7px;
    font-size: 11px;
  }

  #bookingWorkingHoursPanel .booking-working-chevron {
    width: 18px;
    height: 18px;
  }

  #bookingWorkingHoursPanel .booking-working-chevron svg {
    width: 18px;
    height: 18px;
  }
}

/* v215 Booking Settings layout and copy consistency */
#bookingSettingsPanel .booking-settings-subpanel {
  gap: 16px;
}

#bookingSettingsPanel .booking-detail-head,
#bookingDeleteSettingsPanel .booking-detail-head,
#agentSettingsPanel .booking-detail-head,
#apartmentSettingsPanel .booking-detail-head,
#portalSettingsPanel .booking-detail-head,
#backupSettingsPanel .booking-detail-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

#bookingSettingsPanel .booking-detail-back-btn,
#bookingDeleteSettingsPanel .booking-detail-back-btn,
#agentSettingsPanel .booking-detail-back-btn,
#apartmentSettingsPanel .booking-detail-back-btn,
#portalSettingsPanel .booking-detail-back-btn,
#backupSettingsPanel .booking-detail-back-btn,
#reportsScreen .booking-detail-back-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  padding: 0;
}

#bookingSettingsPanel .booking-detail-back-btn svg,
#bookingDeleteSettingsPanel .booking-detail-back-btn svg,
#agentSettingsPanel .booking-detail-back-btn svg,
#apartmentSettingsPanel .booking-detail-back-btn svg,
#portalSettingsPanel .booking-detail-back-btn svg,
#backupSettingsPanel .booking-detail-back-btn svg,
#reportsScreen .booking-detail-back-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#bookingSettingsPanel .booking-detail-head h3,
#bookingDeleteSettingsPanel .booking-detail-head h3,
#agentSettingsPanel .booking-detail-head h3,
#apartmentSettingsPanel .booking-detail-head h3,
#portalSettingsPanel .booking-detail-head h3,
#backupSettingsPanel .booking-detail-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: var(--fw-section-title);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

#bookingSettingsPanel .booking-detail-head p,
#bookingDeleteSettingsPanel .booking-detail-head p,
#agentSettingsPanel .booking-detail-head p,
#apartmentSettingsPanel .booking-detail-head p,
#portalSettingsPanel .booking-detail-head p,
#backupSettingsPanel .booking-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

#apartmentSettingsPanel .settings-add-form {
  margin-bottom: 0;
}

#apartmentSettingsPanel .settings-list {
  margin-top: 0;
}

#apartmentSettingsList .settings-item-label {
  flex: 1 1 auto;
}

#bookingSettingsPanel .booking-primary-add-btn,
#agentSettingsPanel .booking-primary-add-btn,
#portalSettingsPanel .booking-primary-add-btn {
  justify-self: stretch;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--color-primary-border-strong);
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: none;
  font-size: 15px;
  font-weight: var(--fw-button);
}

#bookingSettingsPanel .booking-primary-add-btn:active,
#agentSettingsPanel .booking-primary-add-btn:active,
#portalSettingsPanel .booking-primary-add-btn:active {
  transform: scale(0.99);
}

#bookingRulesPanel .booking-rules-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#bookingRulesPanel .booking-rule-group {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

#bookingRulesPanel .booking-rule-group-head {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  text-align: left;
  font-size: 15px;
  font-weight: var(--fw-section-title);
  cursor: pointer;
}

#bookingRulesPanel .booking-rule-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  justify-self: end;
  color: var(--muted);
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

#bookingRulesPanel .booking-rule-chevron svg {
  width: 22px;
  height: 22px;
}

#bookingRulesPanel .booking-rule-group.is-open .booking-rule-chevron {
  transform: rotate(90deg);
}

#bookingRulesPanel .booking-rule-fields {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

#bookingRulesPanel .booking-rule-fields.hidden {
  display: none !important;
}

#bookingRulesPanel .booking-rule-fields label {
  min-width: 0;
}

#bookingRulesPanel .booking-suffix-field {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

#bookingRulesPanel .booking-suffix-field input {
  min-width: 56px;
}

#bookingRulesPanel .booking-suffix-field span {
  flex: 0 0 auto;
  min-height: 42px;
  border-left: 1px solid var(--border);
  border-top: 0;
  white-space: nowrap;
}

#bookingRulesPanel .booking-save-btn,
#bookingBannerPanel .booking-save-btn {
  min-height: 52px;
  border-radius: 15px;
  font-weight: var(--fw-button);
}

#bookingShootTypeList,
#bookingDurationList,
#bookingHolidayList {
  display: grid;
  gap: 10px;
}

#bookingHolidayList .booking-holiday-card {
  min-height: 58px;
  padding: 10px 12px;
}

#bookingHolidayList .booking-holiday-card-main {
  gap: 4px;
}

#bookingHolidayList .booking-holiday-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

#bookingHolidayList .settings-item-name {
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bookingHolidayList small {
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bookingHolidayList .booking-holiday-status {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

#bookingWorkingHoursPanel .booking-working-slot {
  background: var(--surface-muted, #f8f8f9);
}

#bookingWorkingHoursPanel .booking-working-day {
  background: var(--surface);
}

#bookingWorkingHoursPanel .booking-working-time {
  justify-self: start;
}

#bookingWorkingHoursPanel .booking-working-slot-actions {
  align-self: center;
  justify-self: end;
}

#bookingBannerPanel .booking-banner-form {
  display: grid;
  gap: 12px;
}

#bookingBannerPanel .booking-banner-control {
  position: relative;
  width: 100%;
}

#bookingBannerPanel .booking-banner-preview-control {
  display: block;
  cursor: pointer;
}

#bookingBannerPanel .booking-banner-preview-control input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#bookingBannerPanel .booking-banner-preview {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

#bookingBannerPanel .booking-banner-preview.has-image {
  background-color: #f4f7fb;
  color: transparent;
}

#bookingBannerPanel .booking-banner-preview-control:focus-within .booking-banner-preview {
  border-color: var(--focus-border);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

#bookingBannerPanel .booking-photo-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}

#bookingBannerPanel .booking-photo-remove-btn.hidden {
  display: none;
}

#bookingBannerPanel .booking-photo-remove-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#bookingBannerPanel .booking-photo-remove-btn:active {
  transform: scale(0.96);
}

#bookingBannerPanel .booking-banner-file-name {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-phase-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

#bookingBannerPanel .booking-banner-preview-control.is-unavailable {
  cursor: not-allowed;
}

#bookingBannerPanel .booking-banner-preview-control.is-unavailable .booking-banner-preview {
  opacity: 0.72;
}

#bookingPhotographerOverlay .sheet-head,
#bookingSettingsEditOverlay .sheet-head,
#bookingWorkingSlotOverlay .sheet-head,
#bookingHolidayEditOverlay .sheet-head {
  align-items: center;
}

#bookingPhotographerOverlay .portal-delete-access-btn.hidden,
#bookingHolidayEditOverlay .booking-holiday-delete-btn.hidden {
  display: none;
}

@media (min-width: 720px) {
  #bookingRulesPanel .booking-rule-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #bookingSettingsPanel .booking-detail-head,
  #bookingDeleteSettingsPanel .booking-detail-head,
  #agentSettingsPanel .booking-detail-head,
  #apartmentSettingsPanel .booking-detail-head,
  #portalSettingsPanel .booking-detail-head,
  #backupSettingsPanel .booking-detail-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  #bookingSettingsPanel .booking-detail-back-btn,
  #bookingDeleteSettingsPanel .booking-detail-back-btn,
  #agentSettingsPanel .booking-detail-back-btn,
  #apartmentSettingsPanel .booking-detail-back-btn,
  #portalSettingsPanel .booking-detail-back-btn,
  #backupSettingsPanel .booking-detail-back-btn,
  #reportsScreen .booking-detail-back-btn {
    width: 40px;
    height: 40px;
  }

  #bookingSettingsPanel .booking-detail-head h3,
  #bookingDeleteSettingsPanel .booking-detail-head h3,
  #agentSettingsPanel .booking-detail-head h3,
  #apartmentSettingsPanel .booking-detail-head h3,
  #portalSettingsPanel .booking-detail-head h3,
  #backupSettingsPanel .booking-detail-head h3 {
    font-size: 19px;
  }

  #bookingSettingsPanel .booking-detail-head p,
  #bookingDeleteSettingsPanel .booking-detail-head p,
  #agentSettingsPanel .booking-detail-head p,
  #apartmentSettingsPanel .booking-detail-head p,
  #portalSettingsPanel .booking-detail-head p,
  #backupSettingsPanel .booking-detail-head p {
    font-size: 12.5px;
    overflow-wrap: normal;
  }

  #bookingSettingsPanel .booking-primary-add-btn,
  #agentSettingsPanel .booking-primary-add-btn,
  #portalSettingsPanel .booking-primary-add-btn {
    justify-content: center;
  }

  #bookingRulesPanel .booking-suffix-field {
    display: flex !important;
    align-items: center;
  }

  #bookingRulesPanel .booking-suffix-field span {
    min-height: 42px;
    border-top: 0;
    border-left: 1px solid var(--border);
    padding: 0 10px;
    font-size: 12px;
  }

  #bookingHolidayList .booking-holiday-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  #bookingHolidayList .booking-holiday-status {
    justify-self: end;
  }

  #bookingWorkingHoursPanel .booking-working-slot {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
}

/* v256: Settings header consistency */
.reports-header-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.reports-header-title h1 {
  min-width: 0;
}

#settingsScreen .booking-detail-head h3,
#reportsScreen.reports-from-settings .reports-header-title h1 {
  font-size: 22px !important;
  line-height: 1.1 !important;
  letter-spacing: -0.025em !important;
}

#reportsScreen.reports-from-settings .reports-header-title h1 {
  font-weight: var(--fw-section-title) !important;
}

@media (max-width: 520px) {
  .reports-header-title {
    gap: 12px;
  }
}

/* v248 Import & Export UI polish */
#backupSettingsPanel .import-export-section,
#backupSettingsPanel .import-export-item {
  display: grid;
  gap: 10px;
}

#backupSettingsPanel .import-preview {
  margin-top: 0;
}

/* v249 Import preview close button polish */
#backupSettingsPanel .import-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#backupSettingsPanel .import-preview-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

#backupSettingsPanel .import-preview-close-btn {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
}

#backupSettingsPanel .import-preview-close-btn svg {
  width: 18px;
  height: 18px;
}

/* v250 Settings CSV modernization */
#backupSettingsPanel .settings-import-preview-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#backupSettingsPanel .settings-import-preview-stats .is-new,
#backupSettingsPanel .settings-import-row.is-new em {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-soft);
}

#backupSettingsPanel .settings-import-preview-stats .is-updated,
#backupSettingsPanel .settings-import-row.is-updated em {
  color: var(--color-warning-deep);
  border-color: var(--color-warning-border);
  background: var(--color-warning-bg);
}

#backupSettingsPanel .settings-import-preview-stats .is-unchanged,
#backupSettingsPanel .settings-import-row.is-unchanged em {
  color: var(--color-success-text);
  border-color: var(--color-success-text);
  background: var(--green-soft);
}

#backupSettingsPanel .settings-import-preview-stats .is-skipped,
#backupSettingsPanel .settings-import-row.is-skipped em {
  color: var(--muted);
  border-color: var(--border);
  background: var(--color-surface-soft);
}

#backupSettingsPanel .settings-import-row.is-issues em {
  color: var(--color-danger-text);
  background: var(--red-soft);
}

#backupSettingsPanel .settings-import-warning strong {
  color: var(--color-warning-deep);
}

#backupSettingsPanel .import-errors p {
  margin: 0;
  color: var(--color-warning-deep);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  #backupSettingsPanel .settings-import-preview-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  #backupSettingsPanel .settings-import-preview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v217 Admin Booking Management */
#bookingScreen {
  padding-bottom: 120px;
}

.booking-home-header h1 {
  margin-bottom: 2px;
  font-size: 36px;
  line-height: 1.05;
}

.booking-home-hero,
.booking-home-primary,
.booking-filters,
.booking-records {
  margin-bottom: 14px;
}

.booking-next-card {
  position: relative;
  display: grid;
  align-items: center;
  width: 100%;
  height: 200px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.76) 0 16%, rgba(255, 255, 255, 0) 17%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(125, 211, 252, 0.28) 48%, rgba(240, 253, 250, 0.92));
  color: var(--text);
  box-shadow: var(--shadow-card-strong);
  overflow: hidden;
}

.booking-next-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.booking-next-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking-next-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 34%, rgba(255, 255, 255, 0.54) 58%, rgba(255, 255, 255, 0.16) 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2));
}

.booking-next-card.has-banner-image {
  border-color: var(--border);
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.76) 0 16%, rgba(255, 255, 255, 0) 17%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(125, 211, 252, 0.28) 48%, rgba(240, 253, 250, 0.92));
}

.booking-next-card.has-banner-image::after {
  display: none;
}

.booking-next-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  width: min(60%, 420px);
  min-width: 0;
}

.booking-next-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 92px;
  height: 58px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 20px 20px 10px 10px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.18);
}

.booking-next-card[role="button"] {
  cursor: pointer;
}

.booking-next-card:focus-visible,
.booking-compact-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.booking-next-card p,
.booking-next-card span,
.booking-next-card small {
  margin: 0;
}

.booking-next-card .booking-next-pill {
  justify-self: start;
  margin-bottom: 7px;
}

.booking-next-time-group {
  display: grid;
  gap: 2px;
  margin-bottom: 1px;
}

.booking-next-card strong {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--blue);
  font-size: 32px;
  line-height: 1.06;
}

.booking-next-card span {
  color: var(--text);
  font-weight: var(--fw-meta);
}

.booking-next-card .booking-next-date {
  color: var(--text);
  font-size: 14px;
  font-weight: var(--fw-meta);
  text-transform: uppercase;
}

.booking-next-card small {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.booking-dot-placeholder {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  min-height: 1em;
  color: var(--muted) !important;
}

.booking-dot-placeholder i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.32;
  animation: booking-dot-pulse 1s ease-in-out infinite;
}

.booking-dot-placeholder i:nth-child(2) {
  animation-delay: 0.14s;
}

.booking-dot-placeholder i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes booking-dot-pulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.28;
  }
  40% {
    transform: translateY(-3px);
    opacity: 0.76;
  }
}

.booking-next-property {
  color: var(--text) !important;
  font-weight: var(--fw-card-title);
}

.booking-next-property,
.booking-next-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-next-card.is-empty strong {
  font-size: 24px;
}

.booking-home-primary .primary-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  justify-content: center;
  border-radius: 17px;
  font-size: 14px;
}

.booking-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(124px, 168px);
}

.booking-records .section-head {
  align-items: center;
}

.booking-records .section-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.booking-records .section-head h2 {
  margin: 0;
  font-size: 22px;
}

.booking-filters select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  color: var(--text);
  padding: 0 38px 0 13px;
  font-size: 13px;
  outline: none;
}

.booking-search-box {
  min-width: 0;
}

.booking-settings-required,
.booking-error-state {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  padding: 13px;
  border: 1px solid var(--color-warning-border);
  border-radius: 16px;
  background: var(--color-warning-bg);
  color: var(--color-warning-deep);
}

.booking-settings-required p,
.booking-error-state p,
.booking-terminal-note,
.booking-card-note,
.booking-section-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.booking-section {
  display: grid;
  gap: 9px;
}

.booking-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.booking-section-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: var(--fw-card-title);
  line-height: 1.2;
}

.booking-section-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--color-surface-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: var(--fw-pill);
}

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

.booking-section-empty {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--color-surface-soft);
}

.booking-compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 13px 12px 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card-strong);
  cursor: pointer;
}

.booking-delete-settings-panel {
  padding-bottom: 170px;
}

.booking-delete-controls {
  display: grid;
  gap: 10px;
}

.booking-delete-controls select {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: var(--fw-meta);
}

.booking-delete-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.booking-delete-list-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: var(--fw-section-title);
  line-height: 1.2;
}

.booking-delete-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.booking-delete-card {
  grid-template-columns: 58px minmax(0, 1fr);
  cursor: pointer;
}

.booking-delete-card.is-selected {
  border-color: var(--color-primary-border-strong, var(--blue));
  background: var(--color-primary-tint);
}

.booking-delete-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.booking-delete-empty {
  padding-bottom: 8px;
}

.booking-delete-action-bar {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
  align-items: center;
  gap: 12px;
  width: min(calc(100% - 24px), 440px);
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--color-sheet-bg);
  box-shadow: var(--shadow-sticky);
  transform: translateX(-50%);
}

.booking-delete-action-bar span {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: var(--fw-section-title);
}

.booking-delete-action-bar .primary-btn {
  min-height: 46px;
  min-width: 0;
}

.booking-delete-cleanup-action {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.booking-delete-cleanup-action .booking-phase-note {
  text-align: center;
}

.booking-delete-selected-action {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
  align-items: center;
  gap: 12px;
}

.booking-delete-selection-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.booking-date-block {
  display: grid;
  align-content: center;
  justify-items: center;
  align-self: stretch;
  min-height: 68px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--blue);
}

.booking-date-block.is-finished {
  color: var(--color-success-text);
}

.booking-date-block.is-cancelled {
  color: var(--red);
}

.booking-date-block.is-pending {
  color: var(--color-warning-text);
}

.booking-date-block strong {
  font-size: 31px;
  font-weight: var(--fw-page-title);
  line-height: 1;
}

.booking-date-block span {
  margin-top: 3px;
  color: var(--text);
  font-size: 11px;
  font-weight: var(--fw-pill);
  text-transform: uppercase;
}

.booking-compact-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.booking-compact-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.booking-compact-time,
.booking-compact-main h3,
.booking-compact-main p,
.booking-compact-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-compact-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
  line-height: 1.25;
}

.booking-compact-main p,
.booking-compact-main small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
  line-height: 1.35;
}

.booking-compact-main h3 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: var(--fw-card-title);
  line-height: 1.35;
}

.booking-compact-meta {
  letter-spacing: 0;
}

.booking-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--fw-pill);
  line-height: 1.2;
  white-space: nowrap;
}

.booking-status-pill.is-upcoming {
  color: var(--blue);
  background: var(--color-primary-tint);
}

.booking-status-pill.is-rescheduled {
  color: var(--color-warning-text);
  background: var(--orange-soft);
}

.booking-status-pill.is-pending {
  color: var(--color-warning-text);
  background: var(--color-warning-bg);
}

.booking-status-pill.is-cancelled {
  color: var(--red);
  background: var(--red-soft);
}

.booking-status-pill.is-finished {
  color: var(--color-success-text);
  background: var(--green-soft);
}

.booking-summary-sheet {
  overflow: hidden !important;
}

#bookingSummaryOverlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#bookingSummaryOverlay .sheet-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-divider);
}

.booking-summary-body {
  display: grid;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 0 5px 112px;
  margin-left: -5px;
  margin-right: -5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.booking-summary-body::-webkit-scrollbar {
  display: none;
}

.booking-summary-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-meta);
}

.booking-summary-feature {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--color-surface-soft);
}

.booking-summary-feature strong {
  font-size: 18px;
  line-height: 1.25;
}

.booking-summary-feature span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.booking-summary-detail {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.booking-summary-detail span {
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-meta);
  text-transform: uppercase;
}

.booking-summary-detail strong {
  font-size: 14px;
  line-height: 1.35;
}

.booking-linked-logs {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.booking-linked-logs-title {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-meta);
  line-height: 1.25;
  text-transform: uppercase;
}

.booking-linked-log-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.booking-linked-log-card:active {
  transform: scale(0.99);
}

.booking-linked-log-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-meta);
  line-height: 1.25;
  flex-wrap: wrap;
}

.booking-linked-log-meta .status-pill {
  min-height: 23px;
  padding: 4px 8px;
  font-size: 11px;
}

.booking-linked-log-title {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.booking-linked-log-sub,
.booking-linked-logs-empty {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.booking-summary-cancel-action {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--danger-surface-border);
  border-radius: 15px;
  background: var(--danger-surface-bg);
  color: var(--red);
  font: inherit;
  font-size: 15px;
  font-weight: var(--fw-button);
  cursor: pointer;
}

.booking-summary-cancel-action:active {
  transform: scale(0.99);
  background: var(--danger-surface-active-bg);
}

.booking-summary-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--color-sheet-bg);
  box-shadow: var(--shadow-sticky);
}

.booking-summary-footer > button {
  min-width: 0;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.booking-summary-primary-action,
.booking-summary-finish-btn {
  min-width: 0;
}

.booking-summary-primary-action {
  grid-column: 1 / -1;
  width: 100%;
}

.booking-action-btn.compact,
.booking-error-state .compact {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 13px;
  font-size: 13px;
}

.booking-terminal-note {
  align-self: center;
  font-weight: var(--fw-meta);
}

.booking-summary-footer .booking-terminal-note {
  grid-column: 1 / -1;
  text-align: center;
}

.booking-card-note {
  margin-top: 10px;
}

.booking-inline-loader {
  justify-self: center;
  margin-top: 8px;
}

.booking-action-sheet {
  max-height: 94vh !important;
}

.booking-action-form {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.booking-action-form select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--color-surface-soft);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

/* v222-test Create Booking native date picker flow: selected-day availability only. */
#bookingCreateOverlay .booking-availability-flow {
  display: grid;
  gap: 0;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

#bookingCreateOverlay .sheet-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-divider);
}

#bookingCreateOverlay .sheet-head .caption {
  margin-bottom: 2px;
}

#bookingCreateOverlay .sheet-head h2 {
  line-height: 1.15;
}

#bookingCreateOverlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#bookingCreateOverlay .booking-action-sheet {
  overflow: hidden !important;
}

#bookingCreateOverlay .booking-action-form {
  box-sizing: border-box;
  flex: 1;
  max-width: none;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 0 5px 112px;
  margin-left: -5px;
  margin-right: -5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#bookingCreateOverlay .booking-action-form::-webkit-scrollbar {
  display: none;
}

#bookingCreateOverlay .booking-flow-step {
  display: grid;
  gap: 15px;
  max-width: 100%;
  min-width: 0;
}

#bookingCreateOverlay .booking-flow-section-note,
#bookingCreateOverlay .booking-flow-empty,
#bookingCreateOverlay .booking-friendly-date {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

#bookingCreateOverlay .booking-flow-empty.is-warning,
#bookingRescheduleOverlay .booking-flow-empty.is-warning {
  padding: 10px 12px;
  border: 1px solid var(--color-warning-border);
  border-radius: 12px;
  color: var(--color-warning-deep);
  background: var(--color-warning-bg);
}

#bookingCreateOverlay .booking-header-divider,
#bookingCreateOverlay .booking-flow-divider {
  display: none;
}

#bookingCreateOverlay .booking-flow-section {
  display: grid;
  gap: 7px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#bookingCreateOverlay .booking-flow-section-head {
  display: grid;
  gap: 0;
}

#bookingCreateOverlay .booking-flow-section-title {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
  line-height: 1.2;
}

#bookingCreateOverlay .booking-action-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
  line-height: 1.2;
}

#bookingCreateOverlay .booking-duration-control,
#bookingCreateOverlay .booking-native-date-control {
  display: grid;
}

#bookingCreateOverlay .booking-native-date-control {
  position: relative;
}

#bookingCreateOverlay .booking-action-form select,
#bookingCreateOverlay .booking-action-form input,
#bookingCreateOverlay .booking-action-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
}

#bookingCreateOverlay .booking-friendly-date {
  color: var(--muted);
  font-weight: var(--fw-meta);
}

#bookingCreateOverlay .booking-slot-grid,
#bookingCreateOverlay .booking-photographer-grid,
#bookingRescheduleOverlay .booking-photographer-grid {
  display: grid;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
}

#bookingCreateOverlay .booking-slot-card,
#bookingCreateOverlay .booking-photographer-choice,
#bookingRescheduleOverlay .booking-photographer-choice {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  filter: none;
  transition: none;
}

#bookingCreateOverlay .booking-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 13px;
}

#bookingCreateOverlay .booking-slot-card:active,
#bookingCreateOverlay .booking-photographer-choice:active,
#bookingRescheduleOverlay .booking-photographer-choice:active {
  transform: none;
}

#bookingCreateOverlay .booking-slot-card.is-selected,
#bookingCreateOverlay .booking-photographer-choice.is-selected,
#bookingRescheduleOverlay .booking-photographer-choice.is-selected {
  border-color: var(--blue);
  background: var(--color-primary-tint);
  color: var(--text);
  box-shadow: none;
}

#bookingCreateOverlay .booking-slot-card strong,
#bookingCreateOverlay .booking-photographer-choice strong,
#bookingRescheduleOverlay .booking-photographer-choice strong {
  font-size: 14px;
  line-height: 1.25;
}

#bookingCreateOverlay .booking-slot-card span,
#bookingCreateOverlay .booking-photographer-choice small,
#bookingRescheduleOverlay .booking-photographer-choice small {
  color: var(--muted);
  font-size: 12px;
}

#bookingCreateOverlay .booking-photographer-choice,
#bookingRescheduleOverlay .booking-photographer-choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 11px;
}

#bookingCreateOverlay .booking-photographer-choice:focus-visible,
#bookingRescheduleOverlay .booking-photographer-choice:focus-visible {
  outline: 2px solid var(--color-primary-tint);
  outline-offset: 2px;
  box-shadow: none;
}

#bookingCreateOverlay .booking-photographer-copy,
#bookingRescheduleOverlay .booking-photographer-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#bookingCreateOverlay .booking-photographer-initials,
#bookingRescheduleOverlay .booking-photographer-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-surface-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: var(--fw-pill);
  overflow: hidden;
}

#bookingCreateOverlay .booking-photographer-initials svg,
#bookingRescheduleOverlay .booking-photographer-initials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#bookingCreateOverlay .booking-photographer-actions,
#bookingRescheduleOverlay .booking-photographer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  min-width: 0;
}

#bookingCreateOverlay .booking-photographer-action,
#bookingRescheduleOverlay .booking-photographer-action {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--color-surface-soft);
  color: var(--text);
}

#bookingCreateOverlay .booking-photographer-action svg,
#bookingRescheduleOverlay .booking-photographer-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#bookingCreateOverlay .booking-availability-loader {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 6px 0;
}

#bookingCreateOverlay .grid-2 {
  gap: 11px;
}

#bookingCreateOverlay .booking-modal-footer {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  box-sizing: border-box;
  max-width: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#bookingCreateOverlay .booking-modal-footer > button {
  min-width: 0;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#bookingCreateOverlay .booking-modal-footer > button.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 380px) {
  #bookingCreateOverlay .booking-photographer-choice,
  #bookingRescheduleOverlay .booking-photographer-choice {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  #bookingCreateOverlay .booking-photographer-initials,
  #bookingRescheduleOverlay .booking-photographer-initials {
    width: 38px;
    height: 38px;
  }

  #bookingCreateOverlay .booking-photographer-action,
  #bookingRescheduleOverlay .booking-photographer-action {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 720px) {
  #bookingCreateOverlay .booking-slot-grid,
  #bookingCreateOverlay .booking-photographer-grid,
  #bookingRescheduleOverlay .booking-photographer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v224-test Availability-backed Reschedule modal. */
#bookingRescheduleOverlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#bookingRescheduleOverlay .booking-action-sheet {
  overflow: hidden !important;
}

#bookingRescheduleOverlay .sheet-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-divider);
}

#bookingRescheduleOverlay .sheet-head .caption {
  margin-bottom: 2px;
}

#bookingRescheduleOverlay .sheet-head h2 {
  line-height: 1.15;
}

#bookingRescheduleOverlay .booking-reschedule-flow {
  box-sizing: border-box;
  display: grid;
  gap: 15px;
  max-width: none;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 0 5px 112px;
  margin-left: -5px;
  margin-right: -5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#bookingCancelOverlay .booking-action-form {
  box-sizing: border-box;
  max-width: none;
  overflow-x: hidden !important;
  padding-left: 5px;
  padding-right: 5px;
  margin-left: -5px;
  margin-right: -5px;
}

#bookingRescheduleOverlay .booking-reschedule-flow::-webkit-scrollbar {
  display: none;
}

#bookingRescheduleOverlay .booking-flow-section {
  display: grid;
  gap: 7px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#bookingRescheduleOverlay .booking-flow-section-head {
  display: grid;
  gap: 0;
}

#bookingRescheduleOverlay .booking-flow-section-title {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
  line-height: 1.2;
}

#bookingRescheduleOverlay .booking-readonly-value,
#bookingRescheduleOverlay .booking-flow-empty,
#bookingRescheduleOverlay .booking-friendly-date {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

#bookingRescheduleOverlay .booking-readonly-value {
  min-height: 50px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--color-surface-soft);
  color: var(--text);
  font-weight: var(--fw-meta);
}

#bookingRescheduleOverlay .booking-native-date-control {
  display: grid;
}

#bookingRescheduleOverlay .booking-native-date-control {
  position: relative;
}

#bookingRescheduleOverlay .booking-action-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-form-label);
  line-height: 1.2;
}

#bookingRescheduleOverlay .booking-action-form input,
#bookingRescheduleOverlay .booking-action-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
}

#bookingRescheduleOverlay .booking-friendly-date {
  color: var(--muted);
  font-weight: var(--fw-meta);
}

#bookingRescheduleOverlay .booking-slot-grid {
  display: grid;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
}

#bookingRescheduleOverlay .booking-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  filter: none;
  transition: none;
}

#bookingRescheduleOverlay .booking-slot-card:active {
  transform: none;
}

#bookingRescheduleOverlay .booking-slot-card.is-selected {
  border-color: var(--blue);
  background: var(--color-primary-tint);
  color: var(--text);
  box-shadow: none;
}

#bookingRescheduleOverlay .booking-slot-card strong {
  font-size: 14px;
  line-height: 1.25;
}

#bookingRescheduleOverlay .booking-availability-loader {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 6px 0;
}

#bookingRescheduleOverlay .booking-modal-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--color-sheet-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-sticky);
}

#bookingRescheduleOverlay .booking-modal-footer > button {
  min-width: 0;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 720px) {
  #bookingRescheduleOverlay .booking-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.danger-primary-btn {
  background: var(--red);
}

@media (min-width: 720px) {
  .booking-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#bookingCreateOverlay .booking-date-visual-placeholder,
#bookingRescheduleOverlay .booking-date-visual-placeholder {
  display: flex;
  position: absolute;
  inset: 0 46px 0 13px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: var(--fw-input);
  line-height: 1.25;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#bookingCreateOverlay .booking-native-date-control input[type="date"]:required:invalid,
#bookingRescheduleOverlay .booking-native-date-control input[type="date"]:required:invalid {
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--text);
}

#bookingCreateOverlay .booking-native-date-control input[type="date"]:required:invalid::-webkit-datetime-edit,
#bookingRescheduleOverlay .booking-native-date-control input[type="date"]:required:invalid::-webkit-datetime-edit {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

#bookingCreateOverlay .booking-native-date-control input[type="date"]:valid,
#bookingRescheduleOverlay .booking-native-date-control input[type="date"]:valid {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

#bookingCreateOverlay .booking-native-date-control input[type="date"]:valid::-webkit-datetime-edit,
#bookingRescheduleOverlay .booking-native-date-control input[type="date"]:valid::-webkit-datetime-edit {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

#bookingCreateOverlay .booking-native-date-control input[type="date"]:valid + .booking-date-visual-placeholder,
#bookingRescheduleOverlay .booking-native-date-control input[type="date"]:valid + .booking-date-visual-placeholder {
  display: none;
}

@media (max-width: 430px) {
  .booking-filters {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 0.52fr);
    gap: 8px;
  }

  .booking-filters select {
    min-width: 0;
    padding-left: 10px;
    padding-right: 34px;
    font-size: 13px;
  }

  .booking-next-property,
  .booking-next-meta {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .booking-home-primary .primary-btn {
    min-height: 46px;
    border-radius: 15px;
    font-size: 14px;
  }

  .booking-records .section-head {
    align-items: center;
    gap: 8px;
  }

  .booking-records .section-head h2 {
    font-size: 22px;
  }

  .booking-records .log-result-pill {
    flex-shrink: 0;
  }

}

@media (max-width: 380px) {
  .booking-compact-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .booking-date-block {
    min-height: 64px;
    padding-right: 10px;
  }

  .booking-date-block strong {
    font-size: 28px;
  }

  .booking-status-pill {
    padding-inline: 8px;
  }
}

@media (max-width: 340px) {
  .booking-filters {
    grid-template-columns: minmax(0, 1fr) minmax(124px, 0.5fr);
  }

  .booking-filters select {
    padding-left: 9px;
    padding-right: 30px;
    font-size: 12px;
  }
}
