:root {
  color-scheme: light;
  --navy: #0b1220;
  --deep: #0f2747;
  --primary: #3F63F4;
  --primary-hover: #1d4ed8;
  --sky: #4ea3ff;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --placeholder: #9ca3af;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-lg: 0 6px 24px rgba(15, 39, 71, 0.08);
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);
}

/* Staff admin panel polish: iOS scroll lock, clearer actions, compact admin cards. */
html.body-scroll-locked,
body.body-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.booking-detail-drawer,
.admin-booking-drawer,
.client-edit-drawer,
.vehicle-edit-drawer {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.calendar-main-tabs .tab-icon {
  width: 22px;
  height: 22px;
}

.layout-toggle-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-layout-toggle button {
  display: inline-grid;
  place-items: center;
}

.calendar-controls {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.calendar-date-control input,
.calendar-post-control select {
  position: relative;
  z-index: 3;
  background: #fff;
}

.booking-detail-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-drawer-action {
  min-height: 72px;
  width: 100%;
}

.booking-drawer-action-icon {
  width: 28px;
  height: 28px;
}

.booking-mini-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-mini-actions .action-btn,
.action-btn.mini-action {
  justify-content: center;
  min-height: 44px;
  width: 100%;
  border-radius: 14px;
}

.booking-mini-actions .action-icon,
.action-btn.mini-action .action-icon {
  width: 22px;
  height: 22px;
}

.journal-actions,
.journal-confirm-actions,
.client-card-actions,
.client-bulk-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.journal-confirm-actions {
  padding: 3px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 14px;
  background: #fff7f7;
}

.journal-icon-btn,
.journal-confirm-actions .action-icon-btn,
.inline-confirm-zone .action-icon-btn,
.client-bulk-bar .action-icon-btn,
.client-select-chip {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
}

.journal-action-icon,
.action-svg {
  width: 22px;
  height: 22px;
}

.address-book-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.client-record {
  position: relative;
}

.client-record.selected {
  border-color: rgba(63, 99, 244, 0.42);
  box-shadow: 0 14px 30px rgba(63, 99, 244, 0.12);
}

.client-select-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(63, 99, 244, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.client-select-chip.active {
  background: var(--primary);
  color: #fff;
}

.client-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(63, 99, 244, 0.18);
  border-radius: 16px;
  background: #f5f8ff;
}

.client-bulk-bar.confirming {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fff7f7;
}

.client-bulk-bar span {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.inline-confirm-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 16px;
  background: #fff7f7;
}

.service-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.service-admin-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-admin-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 21px;
}

.service-admin-main p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-admin-meta {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.service-status-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.service-status-icon.active {
  color: #15803d;
  background: #eaf8ee;
}

.service-status-icon.disabled {
  color: #64748b;
  background: #f1f5f9;
}

.service-status-icon .action-svg {
  width: 18px;
  height: 18px;
}

.service-actions {
  margin: 0;
}

@media (max-width: 860px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calendar-main-tabs .tab-icon {
    width: 24px;
    height: 24px;
  }

  .calendar-controls {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .calendar-post-control {
    grid-column: 1 / -1;
  }

  .booking-detail-actions,
  .booking-mini-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-drawer-action {
    min-height: 76px;
  }
}

@media (max-width: 520px) {
  .client-bulk-bar,
  .inline-confirm-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-bulk-actions,
  .journal-confirm-actions {
    justify-content: flex-start;
  }

  .service-admin-item {
    grid-template-columns: minmax(0, 1fr) 44px;
    padding: 10px;
  }
}

/* Stage 2.6.2: calendar density + stronger icon emphasis */
.visually-hidden {
  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;
}

.action-icon,
.tab-icon,
.badge-icon,
.journal-action-icon,
.booking-drawer-action-icon,
.calendar-status-icon,
.calendar-car-icon,
.history-icon {
  width: 1.18em;
  height: 1.18em;
}

.nav-svg {
  width: 21px;
  height: 21px;
}

.sidebar-nav-icon,
.bottom-nav-icon,
.connection-icon-wrap,
.calendar-attention-icon {
  display: inline-grid;
  place-items: center;
}

.sidebar-nav-icon .nav-svg,
.bottom-nav-icon .nav-svg {
  width: 22px;
  height: 22px;
}

.user-menu-role-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.user-menu-avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: #eef3ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
}

.user-menu-role-row strong {
  font-size: 15px;
  line-height: 20px;
}

.user-menu-role-row small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 750;
}

@media (min-width: 981px) {
  .user-menu-panel {
    display: none;
  }
}

.calendar-control-card {
  grid-template-columns: minmax(250px, 390px) minmax(96px, 126px);
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.calendar-main-tabs {
  grid-column: 1;
  gap: 5px;
  padding: 3px;
  max-width: 390px;
  border-radius: 17px;
}

.calendar-main-tabs button {
  min-height: 36px;
  padding: 6px 10px;
  gap: 7px;
  font-size: 13px;
  border-radius: 13px;
}

.calendar-main-tabs .tab-icon {
  width: 18px;
  height: 18px;
}

.calendar-layout-toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 104px;
  padding: 3px;
  gap: 3px;
  border-radius: 15px;
}

.calendar-layout-toggle button {
  min-height: 34px;
  padding: 5px;
  border-radius: 12px;
  font-size: 0;
}

.calendar-layout-toggle .nav-svg {
  width: 20px;
  height: 20px;
}

.calendar-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 38px minmax(145px, 178px) 38px minmax(170px, 230px);
  justify-content: start;
  align-items: end;
  gap: 7px;
}

.calendar-controls > .btn-icon {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
}

.calendar-date-control,
.calendar-post-control {
  gap: 2px;
  font-size: 10px;
  line-height: 12px;
}

.calendar-date-control input,
.calendar-post-control select {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 20px;
}

.calendar-toolbar {
  display: block;
  margin-bottom: 8px;
}

.calendar-toolbar > div:first-child,
.calendar-note {
  display: none;
}

.calendar-legend {
  align-items: center;
  gap: 8px 12px;
  padding: 0 2px 2px;
  font-size: 12px;
  line-height: 16px;
}

.calendar-legend span {
  gap: 5px;
}

.legend-dot {
  width: 12px;
  height: 12px;
}

.cancel-badge.sample {
  min-height: 22px;
  padding: 2px 7px;
}

.calendar-grid-wrap {
  border-radius: 18px;
}

.calendar-corner,
.calendar-post-head {
  min-height: 40px;
  padding: 8px 10px;
}

.calendar-time,
.calendar-cell {
  min-height: 54px;
  padding: 5px 6px;
}

.calendar-detail .calendar-time,
.calendar-detail .calendar-cell {
  min-height: 82px;
}

.calendar-empty {
  min-height: 38px;
}

.calendar-booking {
  min-height: 72px;
  gap: 4px;
  padding: 8px 9px;
  border-radius: 16px;
}

.calendar-booking.compact {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  min-height: 50px;
  padding: 6px 8px;
}

.calendar-booking.compact.needs-action {
  min-height: 72px;
}

.calendar-status-dot {
  width: 24px;
  height: 24px;
}

.calendar-status-dot .calendar-status-icon,
.calendar-status-pill.icon-only .calendar-status-icon {
  width: 18px;
  height: 18px;
}

.calendar-status-pill.icon-only {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.calendar-booking-car {
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.calendar-car-mark {
  width: 28px;
  height: 28px;
}

.calendar-car-icon {
  width: 19px;
  height: 19px;
}

.calendar-booking-plate {
  font-size: 27px;
  line-height: 31px;
}

.calendar-menu-btn {
  min-width: 30px;
  min-height: 30px;
  border-radius: 12px;
  font-size: 17px;
}

.calendar-mini-action,
.action-btn.mini-action {
  min-height: 30px;
  padding: 5px 8px;
}

.booking-drawer-action-icon {
  width: 24px;
  height: 24px;
}

.booking-drawer-action {
  gap: 7px;
}

.calendar-new-btn span,
.calendar-attention-btn span {
  width: 26px;
  height: 26px;
  font-size: 22px;
}

/* Last-pass override: booking drawer actions must remain 2 rows x 3 columns. */
.booking-detail-actions,
.booking-mini-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-detail-actions .booking-drawer-action,
.booking-mini-actions .action-btn,
.action-btn.mini-action {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.booking-detail-actions .booking-drawer-action {
  min-height: 72px;
}

.booking-drawer-action-icon {
  width: 28px;
  height: 28px;
}

@media (max-width: 1180px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .calendar-main-tabs {
    max-width: none;
  }

  .calendar-layout-toggle {
    grid-column: 2;
    width: 104px;
  }
}

@media (max-width: 720px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) 96px;
    padding: 9px;
    border-radius: 18px;
  }

  .calendar-main-tabs button {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .calendar-layout-toggle {
    width: 96px;
  }

  .calendar-controls {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 6px;
  }

  .calendar-post-control {
    grid-column: 1 / -1;
  }

  .calendar-controls > .btn-icon {
    min-width: 36px;
    min-height: 36px;
  }

  .calendar-date-control input,
  .calendar-post-control select {
    min-height: 36px;
    font-size: 14px;
  }

  .calendar-legend {
    gap: 6px 9px;
    font-size: 11px;
  }

  .calendar-booking-plate {
    font-size: 25px;
    line-height: 29px;
  }
}

/* EOF override: booking drawer actions must remain 2x3. */
.booking-detail-actions,
.booking-mini-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-detail-actions .booking-drawer-action,
.booking-mini-actions .action-btn,
.action-btn.mini-action {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.booking-detail-actions .booking-drawer-action {
  min-height: 72px;
}

.booking-drawer-action-icon {
  width: 28px;
  height: 28px;
}

/* Final override: keep booking actions as 2 rows x 3 columns after all legacy blocks. */
.booking-detail-actions,
.booking-mini-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-detail-actions .booking-drawer-action,
.booking-mini-actions .action-btn,
.action-btn.mini-action {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.booking-detail-actions .booking-drawer-action {
  min-height: 72px;
}

.booking-drawer-action-icon {
  width: 28px;
  height: 28px;
}

/* Final staff admin polish override. */
html.body-scroll-locked,
body.body-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.booking-detail-drawer,
.admin-booking-drawer,
.client-edit-drawer,
.vehicle-edit-drawer {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.calendar-main-tabs .tab-icon {
  width: 22px;
  height: 22px;
}

.layout-toggle-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-layout-toggle button {
  display: inline-grid;
  place-items: center;
}

.calendar-controls {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.calendar-date-control input,
.calendar-post-control select {
  position: relative;
  z-index: 3;
  background: #fff;
}

.booking-detail-actions,
.booking-mini-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-drawer-action {
  width: 100%;
  min-height: 72px;
}

.booking-drawer-action-icon {
  width: 28px;
  height: 28px;
}

.booking-mini-actions .action-btn,
.action-btn.mini-action {
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
}

.booking-mini-actions .action-icon,
.action-btn.mini-action .action-icon {
  width: 22px;
  height: 22px;
}

.journal-confirm-actions,
.client-bulk-actions,
.client-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.journal-confirm-actions {
  padding: 3px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 14px;
  background: #fff7f7;
}

.journal-icon-btn,
.journal-confirm-actions .action-icon-btn,
.inline-confirm-zone .action-icon-btn,
.client-bulk-bar .action-icon-btn,
.client-select-chip {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
}

.journal-action-icon,
.action-svg {
  width: 22px;
  height: 22px;
}

.address-book-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.client-record {
  position: relative;
}

.client-record.selected {
  border-color: rgba(63, 99, 244, 0.42);
  box-shadow: 0 14px 30px rgba(63, 99, 244, 0.12);
}

.client-select-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(63, 99, 244, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.client-select-chip.active {
  background: var(--primary);
  color: #fff;
}

.client-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(63, 99, 244, 0.18);
  border-radius: 16px;
  background: #f5f8ff;
}

.client-bulk-bar.confirming {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fff7f7;
}

.client-bulk-bar span {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.inline-confirm-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 16px;
  background: #fff7f7;
}

.service-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.service-admin-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-admin-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 21px;
}

.service-admin-main p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-admin-meta {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.service-status-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.service-status-icon.active {
  color: #15803d;
  background: #eaf8ee;
}

.service-status-icon.disabled {
  color: #64748b;
  background: #f1f5f9;
}

.service-status-icon .action-svg {
  width: 18px;
  height: 18px;
}

.service-actions {
  margin: 0;
}

@media (max-width: 860px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calendar-main-tabs .tab-icon {
    width: 24px;
    height: 24px;
  }

  .calendar-controls {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .calendar-post-control {
    grid-column: 1 / -1;
  }

  .booking-drawer-action {
    min-height: 76px;
  }
}

@media (max-width: 520px) {
  .client-bulk-bar,
  .inline-confirm-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-bulk-actions,
  .journal-confirm-actions {
    justify-content: flex-start;
  }

  .service-admin-item {
    grid-template-columns: minmax(0, 1fr) 44px;
    padding: 10px;
  }
}

/* Stage 2.6.2 filter-bar height correction */
.calendar-date-control,
.calendar-post-control {
  gap: 0;
  font-size: 0;
  line-height: 0;
  grid-template-rows: 0 38px;
  overflow: hidden;
}

.calendar-post-control {
  grid-column: auto;
}

.calendar-main-tabs button {
  min-height: 34px;
}

.calendar-layout-toggle,
.calendar-layout-toggle button {
  min-height: 34px;
}

.calendar-layout-toggle {
  height: 40px;
  align-self: center;
}

.calendar-controls {
  align-items: center;
}

.calendar-controls > .btn-icon,
.calendar-date-control input,
.calendar-post-control select {
  min-height: 38px;
}

@media (max-width: 720px) {
  .calendar-post-control {
    grid-column: 1 / -1;
  }

  .calendar-date-control,
  .calendar-post-control {
    grid-template-rows: 0 36px;
  }

  .calendar-controls > .btn-icon,
  .calendar-date-control input,
  .calendar-post-control select {
    min-height: 36px;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .calendar-controls {
    grid-template-columns: 38px minmax(145px, 178px) 38px minmax(170px, 230px);
    justify-content: start;
  }

  .calendar-controls .calendar-post-control {
    grid-column: auto;
    width: 230px;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.button-link.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: #eff6ff;
}

.btn-success {
  background: var(--success);
}

.btn-danger {
  background: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.public-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(520px, 72vh) auto;
  background: var(--bg);
}

.public-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(15, 39, 71, 0.9)),
    radial-gradient(circle at 78% 30%, rgba(78, 163, 255, 0.3), transparent 30rem);
}

.public-copy h1 {
  margin: 0 0 14px;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}

.public-copy p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  line-height: 30px;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.public-actions .button-link {
  min-width: 170px;
}

.public-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 28px;
}

.public-info > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.public-info h2 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 30px;
}

.public-info p {
  margin: 0;
  color: var(--muted);
}

.public-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .public-page {
    grid-template-rows: auto auto;
  }

  .public-hero {
    min-height: 72vh;
    padding: 24px;
  }

  .public-copy h1 {
    font-size: 46px;
  }

  .public-copy p {
    font-size: 17px;
    line-height: 26px;
  }

  .public-actions {
    display: grid;
  }

  .public-info {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  padding: 28px;
}

.login-hero {
  min-height: calc(100vh - 56px);
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(15, 39, 71, 0.88)),
    radial-gradient(circle at 72% 26%, rgba(78, 163, 255, 0.28), transparent 28rem);
  box-shadow: var(--shadow-lg);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(78, 163, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #7ec3ff;
  font-weight: 900;
}

.login-hero h1 {
  max-width: 620px;
  margin: 0 0 16px;
  font-size: 56px;
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: 0;
}

.login-hero h1 span {
  color: var(--sky);
}

.login-hero p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.login-card-wrap {
  display: grid;
  align-content: center;
  gap: 16px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.login-card h2,
.mode-page h1,
.page-title h1 {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  margin: 22px 0;
  border-radius: 14px;
  background: #eef2f7;
}

.tabs.single-tab {
  grid-template-columns: 1fr;
}

.tabs button {
  background: transparent;
  color: var(--muted);
}

.tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
  font-size: 16px;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
  flex: 0 0 auto;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.mode-page {
  min-height: 100vh;
  padding: 34px;
  display: grid;
  align-content: center;
  gap: 24px;
}

.mode-header {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.mode-grid {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mode-card {
  min-height: 178px;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.mode-card:hover {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-lg);
}

.mode-card .nav-icon {
  margin-bottom: 14px;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  padding-left: 264px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 25;
  width: 264px;
  height: 100vh;
  height: 100dvh;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(180deg, var(--navy), #07101d);
  color: #fff;
  overflow: hidden;
}

.sidebar .brand-lockup {
  padding: 0 8px 14px;
}

.side-nav {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 26px rgba(76, 99, 255, 0.24);
}

.nav-item:focus-visible,
.bottom-nav button:focus-visible,
.bottom-more-btn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.96);
  outline-offset: 2px;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.sidebar .nav-icon {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
}

.sidebar-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.nav-item:hover .sidebar-nav-icon,
.nav-item.active .sidebar-nav-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-version {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-version-bottom {
  margin-top: 10px;
  color: var(--muted);
  text-align: right;
}

.role-switch {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topline,
.page-title,
.section-head,
.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topline {
  margin-bottom: 22px;
}

.connection-indicator {
  width: 28px;
  height: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(17, 24, 39, 0.05);
  white-space: nowrap;
}

.connection-icon,
.badge-icon,
.action-icon,
.history-icon {
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
}

.connection-icon {
  width: 22px;
  height: 22px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.connection-status-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.connection-indicator.synced {
  color: #15803d;
  background: rgba(234, 251, 239, 0.86);
}

.connection-indicator.connecting {
  color: var(--primary);
  background: rgba(234, 241, 255, 0.86);
}

.connection-indicator.stale {
  color: #b45309;
  background: rgba(255, 247, 230, 0.9);
}

.connection-indicator.offline {
  color: var(--danger);
  background: rgba(255, 240, 241, 0.9);
}


.page-title {
  margin-bottom: 20px;
}

.page-title p,
.section-head p {
  margin: 4px 0 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 14px;
}

.user-pill:hover {
  background: #f8fbff;
}

.user-menu-wrap {
  position: relative;
}

.user-menu-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(320px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.user-menu-panel p {
  margin: 0 0 4px;
}

.user-menu-panel strong {
  display: block;
  color: var(--text);
  line-height: 22px;
}

.user-menu-panel .role-switch {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.logout-panel-btn {
  justify-content: center;
  min-height: 42px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--danger);
  font-weight: 850;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.card-lg {
  box-shadow: var(--shadow-lg);
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 28px;
}

.card h3 {
  font-size: 18px;
  line-height: 24px;
}

.metric {
  min-height: 126px;
}

.metric-value {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 800;
}

.metric-delta {
  color: var(--success);
  font-size: 12px;
}

.queue-metrics {
  margin-bottom: 16px;
}

.queue-list-card {
  margin-bottom: 0;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.item.muted-card {
  opacity: 0.72;
}

.item strong {
  font-weight: 800;
}

.item p {
  margin: 4px 0 0;
}

.segmented-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.segmented-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.segmented-tabs button.active {
  background: #eef4ff;
  color: var(--primary);
}

.segmented-tabs span {
  margin-left: 4px;
  color: inherit;
  opacity: 0.72;
}

.address-book {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(360px, 1.14fr);
  gap: 16px;
  align-items: start;
}

.address-book.address-book-directory {
  display: block;
}

.address-book-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.address-book-list-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.search-box {
  margin: 0;
}

.client-list {
  display: grid;
  gap: 8px;
}

.client-directory-table {
  display: grid;
  gap: 8px;
}

.client-directory-head {
  display: grid;
  grid-template-columns: 56px minmax(190px, 1.3fr) minmax(140px, 0.9fr) minmax(150px, 1fr) minmax(120px, 0.8fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.client-sort-btn {
  min-height: 34px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 850;
  text-align: left;
  box-shadow: none;
}

.client-sort-btn:hover,
.client-sort-btn.active {
  background: #eef4ff;
  color: var(--primary);
}

.client-sort-btn span {
  min-width: 12px;
  color: inherit;
}

.client-record {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.client-record.expanded {
  border-color: rgba(63, 99, 244, 0.28);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.client-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.client-directory-row {
  min-height: 52px;
  grid-template-columns: 56px minmax(190px, 1.3fr) minmax(140px, 0.9fr) minmax(150px, 1fr) minmax(120px, 0.8fr) 42px;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.client-row:hover {
  background: #f8fbff;
  border-color: rgba(63, 99, 244, 0.28);
}

.client-col {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 750;
}

.client-col-index {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.client-col-phone,
.client-col-vehicle,
.client-col-parking {
  color: #42526b;
}

.client-row strong,
.client-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-row strong {
  font-size: 15px;
  line-height: 20px;
  font-weight: 850;
}

.client-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
}

.client-row-more {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0;
}

.client-row-more-icon {
  width: 17px;
  height: 17px;
}

.client-expanded-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: #f8fbff;
}

.client-expanded-head {
  align-items: flex-start;
}

.client-expanded-head p {
  margin: 3px 0 0;
}

.client-inline-edit {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(63, 99, 244, 0.18);
  border-radius: 14px;
  background: #fff;
}

.address-book-detail {
  position: sticky;
  top: 16px;
}

.profile-summary {
  display: grid;
  gap: 8px;
  margin: 14px 0 4px;
}

.profile-summary p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.profile-summary p:last-child {
  border-bottom: 0;
}

.profile-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.profile-summary strong {
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
  font-weight: 850;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, 0.32);
}

.client-edit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 36;
  width: min(460px, calc(100vw - 24px));
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 22px;
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 42px rgba(15, 23, 42, 0.22);
}

.client-create-panel {
  margin-bottom: 0;
}

.btn-add-compact,
.btn-icon {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.post-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.post-row-main {
  min-width: 0;
}

.post-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.post-toggle {
  margin: 0;
}

.post-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.post-toggle span {
  width: 42px;
  height: 26px;
  display: inline-block;
  position: relative;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
}

.post-toggle span::after {
  content: "";
  width: 20px;
  height: 20px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  transition: 0.16s ease;
}

.post-toggle input:checked + span {
  background: rgba(63, 99, 244, 0.92);
}

.post-toggle input:checked + span::after {
  transform: translateX(16px);
}

.vehicle-list {
  display: grid;
  gap: 10px;
}

.vehicle-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.vehicle-section-head h3 {
  margin: 0;
}

.vehicle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.vehicle-row-main {
  min-width: 0;
}

.vehicle-row .item-head {
  margin-bottom: 4px;
}

.vehicle-row p {
  margin: 0;
}

.vehicle-plate {
  margin-top: 4px !important;
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.vehicle-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.vehicle-row-actions .vehicle-archive-button {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  background: #fff;
  color: #ef4444;
  box-shadow: none;
}

.vehicle-row-actions .vehicle-archive-button:hover {
  border-color: #fecaca;
  background: #fff7f7;
}

.vehicle-row-actions .vehicle-archive-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.18);
}

.vehicle-row-actions .vehicle-archive-button .action-svg {
  width: 20px;
  height: 20px;
}

.vehicle-edit-drawer {
  width: min(500px, calc(100vw - 24px));
}

.client-compact-section {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.client-compact-section summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.client-compact-section summary::-webkit-details-marker {
  display: none;
}

.client-compact-section summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 900;
}

.client-compact-section[open] summary::after {
  content: "−";
}

.client-compact-section summary small {
  margin-left: auto;
  min-width: 26px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.client-section-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.compact-item strong {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.compact-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.compact-item-head .badge {
  flex: 0 0 auto;
}

.compact-booking-item {
  display: grid;
  gap: 4px;
}

.compact-plate {
  margin: 0 !important;
  font-size: 15px;
  line-height: 20px;
}

.compact-item p {
  margin: 4px 0 0;
}

.crud-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.crud-panel.compact {
  margin-top: 12px;
}

.crud-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.crud-panel-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 26px;
}

.crud-panel-head p {
  margin: 0;
}

.toggle-line {
  margin-bottom: 0;
}

.toggle-line span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toggle-line input {
  width: 20px;
  min-height: 20px;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-icon {
  width: 18px;
  height: 18px;
}

.badge.success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.badge.info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.badge.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.actions button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.action-icon {
  width: 20px;
  height: 20px;
}

.compact-action-row {
  align-items: center;
  gap: 6px;
}

.action-icon-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(63, 99, 244, 0.16);
  border-radius: 11px;
  background: #f4f7ff;
  color: var(--primary);
}

.action-icon-btn:hover {
  background: #eaf1ff;
  border-color: rgba(63, 99, 244, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.action-icon-btn.danger {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fff1f2;
  color: var(--danger);
}

.action-icon-btn.pending-delete {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.action-svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-list-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.client-bookings-title {
  align-items: center;
}

.client-booking-tabs {
  margin: 0 0 12px;
}

.client-bookings-card {
  padding: 12px;
}

.client-booking-list-item {
  border: 1px solid var(--border);
}

.primary-current-booking {
  border-color: rgba(34, 197, 94, 0.26);
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.08);
}

.booking-status-note,
.booking-detail-status-note {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.admin-booking-list-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
}

.admin-booking-list-item .item-head {
  gap: 8px;
}

.admin-booking-list-item p {
  margin: 0;
  font-size: 13px;
}

.booking-mini-actions {
  gap: 6px;
  margin-top: 6px;
}

.booking-mini-actions .action-btn,
.action-btn.mini-action {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(63, 99, 244, 0.16);
  background: #f4f7ff;
  color: var(--primary);
}

.booking-mini-actions .action-icon,
.action-btn.mini-action .action-icon {
  width: 16px;
  height: 16px;
}

.action-btn.mini-action:hover,
.journal-icon-btn:hover,
.client-row:hover,
.compact-item:hover,
.booking-list-item:hover,
.queue-item:hover,
.calendar-booking:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

.action-btn.danger {
  background: #ffe9e9;
  color: #df3e3e;
  border-color: rgba(223, 62, 62, 0.2);
}

.action-btn.pending-delete,
.journal-icon-btn.pending-delete {
  background: #df3e3e;
  color: #fff;
}

.journal-page-title {
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.journal-page-title h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 650;
  letter-spacing: 0;
}

.journal-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #eef4ff;
  color: #2f6bff;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.journal-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(250px, 330px);
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.journal-search-box {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(221, 229, 240, 0.95);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.journal-search-box .action-svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
}

.journal-search-box input {
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  outline: none;
}

.journal-segmented-filter {
  min-height: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(221, 229, 240, 0.95);
  border-radius: 12px;
  background: #fff;
}

.journal-segmented-filter button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 750;
  white-space: nowrap;
}

.journal-segmented-filter button.active {
  background: #eef4ff;
  color: #2f6bff;
  box-shadow: 0 1px 2px rgba(47, 107, 255, 0.08);
}

.booking-journal {
  display: grid;
  gap: 6px;
}

.journal-head,
.journal-row {
  display: grid;
  grid-template-columns: 64px 142px 118px minmax(86px, 0.62fr) minmax(135px, 1fr) minmax(145px, 1fr) 96px;
  gap: 8px;
  align-items: center;
}

.journal-head {
  padding: 0 14px 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
}

.journal-list {
  display: grid;
  gap: 6px;
}

.journal-row {
  position: relative;
  min-height: 50px;
  padding: 6px 8px 6px 14px;
  border: 1px solid #dde5f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.journal-row span,
.journal-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-row:hover {
  border-color: rgba(47, 107, 255, 0.34);
  box-shadow: 0 8px 18px rgba(20, 40, 80, 0.06);
  transform: translateY(-1px);
}

.journal-id,
.journal-client {
  color: #111827;
  font-size: 14px;
  line-height: 18px;
  font-weight: 650;
}

.journal-date,
.journal-post,
.journal-vehicle {
  color: #64748b;
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
}

.journal-mobile-meta {
  display: none;
}

.journal-status-pill {
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.journal-status-pill.warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fff8eb;
  color: #b45309;
}

.journal-status-pill.success {
  border-color: rgba(34, 197, 94, 0.22);
  background: #effaf2;
  color: #15803d;
}

.journal-status-pill.info {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
  color: #1d4ed8;
}

.journal-status-pill.done {
  border-color: rgba(71, 85, 105, 0.18);
  background: #f3f6fb;
  color: #475569;
}

.journal-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.journal-icon-btn,
.journal-open-proxy {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(63, 99, 244, 0.16);
  border-radius: 14px;
  background: #eef4ff;
  color: #2f6bff;
}

.journal-icon-btn.active,
.journal-icon-btn:hover,
.journal-open-proxy:hover {
  border-color: rgba(47, 107, 255, 0.28);
  background: #e7efff;
}

.journal-icon-btn.danger {
  background: #ffe9e9;
  color: #df3e3e;
}

.journal-action-icon,
.journal-menu-icon,
.journal-actions .action-svg {
  width: 18px;
  height: 18px;
}

.journal-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  min-width: 172px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(221, 229, 240, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.13);
}

.journal-action-menu button {
  min-height: 40px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111827;
  font-size: 13px;
  line-height: 18px;
  font-weight: 750;
  text-align: left;
}

.journal-action-menu button:hover {
  background: #f5f8ff;
}

.journal-action-menu button.danger {
  color: #df3e3e;
}

.journal-confirm-actions {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 14px;
  background: #fff7f7;
}

.time-offer-panel,
.history-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.calendar-time-offer-host {
  margin-top: 14px;
  padding: 0 16px 16px;
  border: 1px solid rgba(63, 99, 244, 0.16);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.calendar-time-offer-host .time-offer-panel {
  border-top: 0;
}

.time-offer-label {
  margin: 2px 0 -4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.offer-slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  white-space: normal;
  line-height: 16px;
}

.time-offer-panel .slot-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
}

.offer-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.offer-post-grid button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.offer-post-grid button.active {
  border-color: rgba(63, 99, 244, 0.36);
  background: #eaf1ff;
  color: var(--primary);
}

.client-proposed-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 14px;
  background: #fffbeb;
}

.client-proposed-head,
.client-time-choice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.client-proposed-head strong,
.client-time-choice-head strong {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}

.client-proposed-head p,
.client-time-choice-head p,
.client-proposed-panel > p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 18px;
}

.client-reschedule-actions {
  gap: 6px;
  margin-top: 0;
}

.client-reschedule-actions button {
  min-height: 38px;
  padding: 8px 11px;
}

.client-time-choice-panel {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(63, 99, 244, 0.18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.client-slot-choice-grid {
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}

.client-time-choice-actions {
  margin-top: 0;
}

.inline-message {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 750;
}

.inline-message.success {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.inline-message.warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.inline-message.error {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.inline-message.info {
  border-color: rgba(63, 99, 244, 0.18);
  background: #eef4ff;
  color: var(--primary);
}

.notification-summary {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(63, 99, 244, 0.14);
  border-radius: 999px;
  background: #f4f7ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(63, 99, 244, 0.12);
}

.nav-signal {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
}

.sidebar-nav-icon,
.bottom-nav-icon-wrap {
  position: relative;
}

.date-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 10px 0;
}

.date-chips button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 13px;
}

.date-chips button.active {
  background: #eaf1ff;
  color: var(--primary);
  border-color: rgba(63, 99, 244, 0.35);
}

.slot-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
}

.history-toggle {
  min-height: 34px;
  padding: 6px 0;
  font-size: 13px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.history-icon {
  width: 20px;
  height: 20px;
}

.svg-mask {
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-weight: 700;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
}

.service-choice-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.service-radio-card {
  display: block;
  margin: 0;
  cursor: pointer;
}

.service-radio-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.service-radio-body {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.service-radio-card.active .service-radio-body,
.service-radio-card:focus-within .service-radio-body {
  border-color: var(--primary);
  background: #eaf1ff;
  box-shadow: 0 0 0 3px rgba(63, 99, 244, 0.12);
}

.service-radio-main,
.service-radio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-radio-main strong {
  min-width: 0;
  font-size: 16px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.service-radio-main span,
.service-radio-footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.service-radio-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.service-radio-footer span:first-child {
  color: var(--text);
}

.service-radio-footer span:last-child {
  color: var(--primary);
}

.calendar-section {
  max-width: 100%;
  min-width: 0;
  margin-bottom: 20px;
}

.calendar-control-card {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.calendar-main-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calendar-main-tabs button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.calendar-main-tabs button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(63, 99, 244, 0.24);
}

.tab-icon {
  width: 20px;
  height: 20px;
}

.calendar-controls {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px) auto minmax(180px, 240px) minmax(220px, auto);
  align-items: end;
  gap: 10px;
}

.calendar-date-control,
.calendar-post-control {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-date-control input,
.calendar-post-control select {
  min-height: 42px;
  background: #fff;
}

.calendar-layout-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.calendar-layout-toggle button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.calendar-layout-toggle button.active {
  background: #eaf1ff;
  color: var(--primary);
}

.calendar-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.calendar-new-btn span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 20px;
  line-height: 20px;
}

.calendar-new-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.calendar-new-panel h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 24px;
}

.calendar-new-panel p {
  margin: 0;
}

.admin-booking-panel {
  display: block;
}

.admin-booking-backdrop {
  position: fixed;
  inset: 0;
  z-index: 62;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
}

.admin-booking-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 63;
  width: min(760px, calc(100vw - 28px));
  overflow-y: auto;
  padding: 22px;
  background: #fff;
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.18);
}

.admin-booking-drawer .crud-panel-head {
  align-items: flex-start;
}

.admin-booking-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-booking-drawer .admin-booking-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-booking-drawer .admin-booking-column.wide {
  grid-column: 1 / -1;
}

.admin-booking-drawer .slot-grid.compact {
  max-height: 224px;
  overflow-y: auto;
  padding-right: 2px;
}

.admin-booking-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(300px, 1.35fr);
  gap: 14px;
  margin-top: 14px;
}

.admin-booking-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-booking-column.wide {
  min-width: 0;
}

.admin-booking-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft);
}

.admin-booking-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-booking-create-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.admin-booking-create-box h3 {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}

.compact-grid {
  gap: 10px;
}

.calendar-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.calendar-toolbar h2 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-filters {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.calendar-filters button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-filters button.active {
  border-color: var(--primary);
  background: #eaf1ff;
  color: var(--primary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border);
}

.legend-dot.warning {
  background: var(--warning);
}

.legend-dot.success {
  background: var(--success);
}

.legend-dot.info {
  background: var(--primary);
}

.legend-dot.danger {
  background: var(--danger);
}

.legend-dot.muted-dot {
  background: var(--muted);
}

.calendar-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(63, 99, 244, 0.18);
  border-radius: 12px;
  background: #f5f8ff;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.calendar-grid-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  min-width: max(100%, calc(72px + var(--post-count) * 104px));
  display: grid;
  grid-template-columns: 72px repeat(var(--post-count), minmax(92px, 1fr));
}

.calendar-detail .calendar-grid {
  min-width: max(100%, calc(78px + var(--post-count) * 260px));
  grid-template-columns: 78px repeat(var(--post-count), minmax(236px, 1fr));
}

.calendar-corner,
.calendar-post-head,
.calendar-time,
.calendar-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.calendar-corner,
.calendar-post-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 46px;
  padding: 12px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.calendar-corner,
.calendar-time {
  position: sticky;
  left: 0;
  z-index: 3;
}

.calendar-time {
  min-height: 58px;
  padding: 12px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.calendar-cell {
  position: relative;
  min-height: 58px;
  padding: 6px;
  background: #fff;
}

.calendar-detail .calendar-time,
.calendar-detail .calendar-cell {
  min-height: 96px;
}

.calendar-empty {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 1px dashed transparent;
  border-radius: 10px;
  background: #f8fafc;
}

.calendar-empty:hover {
  border-color: rgba(63, 99, 244, 0.26);
  background: #f1f6ff;
}

.calendar-booking {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.calendar-booking.compact {
  width: 100%;
  min-height: 50px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-left-width: 0;
  text-align: left;
  color: var(--text);
}

.calendar-booking.needs-action {
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.12);
}

.calendar-booking.compact.needs-action {
  align-items: start;
  min-height: 86px;
}

.calendar-compact-time {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-compact-main {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.calendar-booking.compact strong,
.calendar-compact-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-booking.compact strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 18px;
  font-weight: 950;
}

.calendar-compact-main small {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 750;
}

.calendar-compact-side {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
}

.calendar-booking + .calendar-booking {
  margin-top: 8px;
}

.calendar-booking.warning {
  border-left-color: var(--warning);
  background: #fff8eb;
  border-color: rgba(245, 158, 11, 0.32);
}

.calendar-booking.success {
  border-left-color: var(--success);
  background: #effaf2;
  border-color: rgba(34, 197, 94, 0.24);
}

.calendar-booking.info {
  border-left-color: var(--primary);
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.24);
}

.calendar-booking.done {
  border-left-color: #475569;
  background: #f3f6fb;
  border-color: rgba(71, 85, 105, 0.18);
}

.calendar-status-stripe {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--primary);
}

.calendar-booking.warning .calendar-status-stripe {
  background: var(--warning);
}

.calendar-booking.success .calendar-status-stripe {
  background: var(--success);
}

.calendar-booking.info .calendar-status-stripe {
  background: var(--primary);
}

.calendar-booking.done .calendar-status-stripe {
  background: #475569;
}

.calendar-booking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.calendar-head-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.calendar-booking-head strong,
.calendar-booking-car,
.calendar-booking-plate {
  overflow-wrap: anywhere;
}

.calendar-car-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calendar-car-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #f1f5ff;
  color: var(--primary);
}

.calendar-car-icon {
  width: 18px;
  height: 18px;
}

.calendar-booking-car {
  min-width: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-booking-plate,
.queue-plate {
  color: var(--ink);
  font-weight: 900;
}

.calendar-booking-plate {
  font-size: 26px;
  line-height: 31px;
  letter-spacing: 0;
}

.calendar-booking-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.calendar-booking-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-status-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-menu-btn {
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.calendar-inline-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.calendar-mini-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-mini-action.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.calendar-mini-action.secondary {
  border-color: rgba(63, 99, 244, 0.32);
  color: var(--primary);
}

.calendar-mini-action.danger {
  border-color: rgba(239, 68, 68, 0.32);
  color: var(--danger);
}

.calendar-mini-action.menu {
  min-width: 30px;
  padding-inline: 8px;
}

.tablet-visible {
  display: none;
}

.queue-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.queue-main-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.queue-main-line div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.queue-main-line strong {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 23px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.queue-main-line span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item p {
  margin: 0;
  font-size: 13px;
}

.queue-actions {
  margin-top: 4px;
}

.queue-actions .washer-action {
  min-height: 38px;
  padding-inline: 12px;
}

.calendar-status-icon {
  width: 18px;
  height: 18px;
}

.calendar-status-dot {
  display: grid;
  place-items: center;
}

.cancel-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 8px;
  background: #fff5f5;
  color: var(--danger);
  font-size: 12px;
  line-height: 16px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.cancel-badge.sample {
  min-width: auto;
  margin-right: 2px;
}

.calendar-cancelled-group,
.calendar-cancelled-list {
  position: relative;
  min-height: 42px;
  display: grid;
  align-items: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 10px;
  background: #fff5f5;
}

.calendar-cancelled-group {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.calendar-cancelled-list {
  grid-template-columns: minmax(0, 1fr) auto;
}

.calendar-cancelled-group strong,
.calendar-cancelled-mini strong {
  color: #991b1b;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
}

.calendar-cancelled-mini {
  display: grid;
  min-width: 0;
}

.calendar-cancelled-mini span {
  overflow: hidden;
  color: #b45353;
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-popover,
.calendar-action-menu {
  position: absolute;
  right: 6px;
  top: 42px;
  z-index: 12;
  width: min(320px, calc(100vw - 32px));
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.calendar-action-menu {
  left: auto;
  top: 40px;
}

.calendar-action-menu .actions {
  display: grid;
  gap: 8px;
  margin: 0;
}

.calendar-action-menu .action-btn {
  width: 100%;
  justify-content: flex-start;
}

.calendar-booking .action-btn {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.calendar-booking .action-icon {
  width: 16px;
  height: 16px;
}

.calendar-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-popover-list {
  display: grid;
  gap: 8px;
}

.calendar-popover-item {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  width: 100%;
  background: transparent;
  color: inherit;
  text-align: left;
}

.calendar-popover-item strong {
  font-size: 13px;
  line-height: 18px;
}

.calendar-popover-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.booking-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
}

.booking-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(440px, calc(100vw - 28px));
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 22px;
  background: #fff;
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.18);
}

.booking-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.booking-detail-head p {
  margin: 0 0 4px;
}

.booking-detail-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 38px;
  letter-spacing: 0;
}

.booking-detail-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 900;
}

.booking-detail-status.warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: #fff8eb;
}

.booking-detail-status.success {
  border-color: rgba(34, 197, 94, 0.24);
  background: #effaf2;
}

.booking-detail-status.info {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
}

.booking-detail-status.done {
  border-color: rgba(71, 85, 105, 0.18);
  background: #f3f6fb;
}

.booking-detail-status-icon {
  width: 20px;
  height: 20px;
}

.booking-detail-car {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.booking-detail-car span {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #eaf1ff;
}

.booking-detail-car strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-detail-car-icon {
  width: 20px;
  height: 20px;
}

.booking-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-drawer-action {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 15px;
  font-weight: 900;
}

.booking-drawer-action:not(:disabled):hover {
  border-color: rgba(63, 99, 244, 0.32);
  background: #f5f8ff;
}

.booking-drawer-action.danger {
  color: var(--danger);
}

.booking-drawer-action.pending-delete {
  border-color: rgba(239, 68, 68, 0.28);
  background: #fff1f2;
}

.booking-drawer-action:disabled {
  opacity: 0.42;
}

.booking-drawer-action-icon {
  width: 20px;
  height: 20px;
}

.booking-detail-info {
  display: grid;
  gap: 8px;
}

.booking-detail-row {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.booking-detail-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.booking-detail-row strong {
  color: var(--text);
  font-size: 15px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.booking-detail-drawer .time-offer-panel,
.booking-detail-drawer .history-panel {
  margin: 0;
}

.booking-detail-drawer .history-toggle {
  width: 100%;
  justify-content: center;
}

.slot-btn {
  min-height: 40px;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.18);
  padding: 8px 10px;
}

.slot-btn.active {
  background: var(--primary);
  color: #fff;
}

.slot-btn.busy {
  background: #f3f4f6;
  color: var(--placeholder);
  border-color: var(--border);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.step {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.step::before {
  content: attr(data-step);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: var(--muted);
  font-weight: 900;
}

.step.active::before {
  background: var(--primary);
  color: #fff;
}

.mobile-frame {
  max-width: 420px;
  margin: 0 auto;
}

.bottom-nav {
  display: none;
}

.bottom-more-backdrop,
.bottom-more-panel {
  display: none;
}

.demo-page {
  padding: 28px;
}

.demo-section {
  margin-bottom: 28px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  width: min(520px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 980px) {
  .login-page,
  .app-shell,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .login-page {
    padding: 0;
    gap: 0;
  }

  .login-hero {
    min-height: 280px;
    border-radius: 0 0 24px 24px;
  }

  .login-hero h1 {
    font-size: 34px;
    line-height: 40px;
  }

  .login-card-wrap {
    padding: 16px;
  }

  .sidebar {
    display: none;
  }

  .app-shell {
    padding-left: 0;
  }

  .main {
    padding: calc(18px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(94px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  }

  .topline {
    align-items: flex-start;
  }

  .user-menu-wrap {
    width: 100%;
  }

  .user-pill {
    max-width: 100%;
  }

  .user-menu-panel {
    position: fixed;
    left: 14px;
    right: 14px;
    top: calc(66px + env(safe-area-inset-top));
    width: auto;
  }

  .page-title,
  .section-head,
  .item-head,
  .crud-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .crud-panel-head button,
  .crud-panel .actions button {
    width: 100%;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    min-height: calc(76px + env(safe-area-inset-bottom));
    padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: #fff;
    border-top: 1px solid var(--border);
  }

  .bottom-nav button {
    position: relative;
    min-height: 56px;
    width: 100%;
    padding: 8px 4px;
    border-radius: 16px;
    background: transparent;
    color: #111827;
    display: grid;
    place-items: center;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  }

  .bottom-nav button.active {
    background: #eaf1ff;
    color: var(--primary);
    transform: translateY(-1px);
  }

  .bottom-nav button.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
  }

  .bottom-nav-label {
    display: none;
  }

  .bottom-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: block;
    background: rgba(15, 23, 42, 0.08);
  }

  .bottom-more-panel {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 21;
    display: block;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-lg);
  }

  .bottom-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .bottom-more-btn {
    min-height: 52px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    line-height: 16px;
    text-align: left;
  }

  .bottom-more-btn span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-more-btn.active {
    border-color: rgba(76, 99, 255, 0.36);
    background: #eaf1ff;
    color: var(--primary);
  }


  .bottom-nav .nav-svg {
    width: 27px;
    height: 27px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-control-card {
    padding: 12px;
    border-radius: 14px;
  }

  .calendar-main-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-main-tabs button {
    min-height: 44px;
    font-size: 14px;
  }

  .calendar-controls {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .calendar-post-control,
  .calendar-layout-toggle {
    grid-column: 1 / -1;
  }

  .calendar-title-actions,
  .calendar-new-panel {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .admin-booking-grid {
    grid-template-columns: 1fr;
  }

  .calendar-title-actions input,
  .calendar-title-actions button,
  .calendar-new-panel button {
    width: 100%;
  }

  .calendar-filters {
    margin-right: -14px;
    margin-left: -14px;
    padding: 0 14px 4px;
  }

  .address-book-title {
    align-items: center;
  }

  .address-book {
    display: block;
  }

  .address-book-list-card {
    padding: 12px;
    border-radius: 14px;
  }

  .client-directory-head {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    overflow-x: auto;
    padding: 0 0 2px;
  }

  .client-sort-btn {
    min-width: max-content;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 14px;
  }

  .client-row {
    min-height: 56px;
    padding: 9px 11px;
  }

  .client-directory-row {
    grid-template-columns: 34px minmax(0, 1fr) 36px;
    grid-template-areas:
      "index name more"
      "phone phone more"
      "vehicle parking more";
    gap: 4px 8px;
    min-height: 74px;
    padding: 10px 11px;
  }

  .client-col-index {
    grid-area: index;
  }

  .client-col-name {
    grid-area: name;
  }

  .client-col-phone {
    grid-area: phone;
  }

  .client-col-vehicle {
    grid-area: vehicle;
  }

  .client-col-parking {
    grid-area: parking;
    text-align: right;
  }

  .client-row-more {
    grid-area: more;
    align-self: center;
  }

  .client-expanded-card {
    padding: 11px;
  }

  .client-inline-edit {
    padding: 11px;
  }

  .client-row-more {
    width: 32px;
    height: 32px;
  }

  .address-book-detail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 30;
    max-height: min(88vh, 760px);
    overflow-y: auto;
    border-radius: 22px 22px 0 0;
    padding: 18px;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
  }

  .client-edit-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: min(88vh, 720px);
    padding: 18px;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
  }

  .post-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .post-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .journal-head {
    display: none;
  }

  .journal-filter-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }

  .journal-search-box {
    min-height: 44px;
    border-radius: 16px;
  }

  .journal-search-box input {
    min-height: 42px;
    font-size: 14px;
    line-height: 18px;
  }

  .journal-segmented-filter {
    min-height: 44px;
    border-radius: 16px;
  }

  .journal-segmented-filter button {
    min-height: 36px;
    border-radius: 13px;
  }

  .booking-journal {
    overflow: visible;
    border: 1px solid rgba(221, 229, 240, 0.95);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 40, 80, 0.04);
  }

  .journal-list {
    gap: 0;
  }

  .journal-row {
    grid-template-columns: minmax(0, 1fr) 92px;
    grid-template-areas:
      "client actions"
      "meta actions";
    min-height: 56px;
    padding: 5px 8px 5px 12px;
    border-width: 0;
    border-bottom: 1px solid rgba(221, 229, 240, 0.9);
    border-radius: 0;
    box-shadow: none;
  }

  .journal-row:last-child {
    border-bottom: 0;
  }

  .journal-row:hover {
    transform: none;
    box-shadow: none;
  }

  .journal-id,
  .journal-status-pill {
    display: none;
  }

  .journal-client {
    grid-area: client;
    align-self: end;
    font-size: 14px;
    line-height: 18px;
  }

  .journal-mobile-meta {
    display: block;
    grid-area: meta;
    align-self: start;
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    line-height: 16px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .journal-date,
  .journal-post,
  .journal-vehicle {
    display: none;
  }

  .journal-actions {
    grid-area: actions;
    align-self: stretch;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
  }

  .journal-icon-btn,
  .journal-open-proxy {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
  }

  .journal-action-menu {
    top: calc(100% + 4px);
    min-width: min(188px, calc(100vw - 40px));
  }

  .journal-action-menu button {
    min-height: 44px;
  }

  .booking-mini-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-mini-actions .action-btn,
  .action-btn.mini-action {
    justify-content: center;
  }

  .client-proposed-panel,
  .client-time-choice-panel {
    padding: 11px;
    border-radius: 13px;
  }

  .client-proposed-head,
  .client-time-choice-head {
    gap: 8px;
  }

  .client-reschedule-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .client-reschedule-actions button,
  .client-time-choice-actions button {
    width: 100%;
  }

  .client-slot-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .offer-post-grid {
    grid-template-columns: 1fr;
  }

  .offer-slot-btn {
    min-height: 42px;
    padding: 8px 7px;
    font-size: 12px;
  }

  .time-offer-panel .slot-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-main-line {
    align-items: center;
  }

  .queue-main-line strong {
    font-size: 17px;
    line-height: 22px;
  }

  .queue-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-metrics {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 8px;
  }

  .queue-metrics .metric {
    min-height: 76px;
    padding: 10px 12px;
  }

  .queue-metrics .metric-value {
    margin-top: 4px;
    max-height: 44px;
    overflow: hidden;
    font-size: 18px;
    line-height: 22px;
  }

  .queue-list-card {
    margin-bottom: 18px;
  }

  .vehicle-row {
    grid-template-columns: 1fr;
  }

  .vehicle-row-actions {
    justify-content: flex-start;
  }

  .vehicle-section-head {
    align-items: center;
  }

  .calendar-grid {
    min-width: max(100%, calc(58px + var(--post-count) * 88px));
    grid-template-columns: 58px repeat(var(--post-count), minmax(82px, 1fr));
  }

  .calendar-detail .calendar-grid {
    min-width: max(100%, calc(62px + var(--post-count) * 220px));
    grid-template-columns: 62px repeat(var(--post-count), minmax(210px, 1fr));
  }

  .calendar-corner,
  .calendar-post-head {
    min-height: 42px;
    padding: 10px;
  }

  .calendar-time,
  .calendar-cell {
    min-height: 56px;
  }

  .calendar-detail .calendar-time,
  .calendar-detail .calendar-cell {
    min-height: 88px;
  }

  .calendar-time {
    padding: 10px 8px;
  }

  .calendar-cell {
    padding: 6px;
  }

  .calendar-booking {
    padding: 8px;
  }

  .calendar-booking.compact {
    grid-template-columns: 16px minmax(0, 1fr) auto;
    padding: 7px;
  }

  .calendar-booking.compact strong {
    font-size: 14px;
    line-height: 17px;
  }

  .calendar-booking-plate {
    font-size: 22px;
    line-height: 27px;
  }

  .desktop-wide {
    display: none;
  }

  .tablet-visible {
    display: inline-flex;
  }

  .booking-detail-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: min(88vh, 760px);
    padding: 18px;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
  }

  .admin-booking-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: min(90vh, 780px);
    padding: 18px;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
  }

  .admin-booking-drawer .admin-booking-grid {
    grid-template-columns: 1fr;
  }

  .admin-booking-drawer .admin-booking-column.wide {
    grid-column: auto;
  }

  .admin-booking-head-actions {
    width: 100%;
  }

  .admin-booking-head-actions button:first-child {
    flex: 1;
  }

  .booking-detail-head h2 {
    font-size: 28px;
    line-height: 34px;
  }

  .booking-detail-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-drawer-action {
    min-height: 54px;
  }

  .calendar-popover,
  .calendar-action-menu {
    right: 4px;
    width: min(300px, calc(100vw - 28px));
    max-height: 260px;
  }
}

@media (min-width: 700px) and (max-width: 980px) {
  .app-shell {
    padding-left: 88px;
  }

  .sidebar {
    display: flex;
    width: 88px;
    padding: 18px 10px;
    gap: 16px;
  }

  .sidebar .brand-lockup {
    display: grid;
    place-items: center;
    padding: 0 0 10px;
  }

  .sidebar .brand-lockup span:not(.brand-mark),
  .sidebar-footer .muted,
  .nav-label {
    display: none;
  }

  .side-nav {
    gap: 8px;
    padding-right: 0;
  }

  .nav-item {
    min-height: 52px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
    border-radius: 18px;
  }

  .sidebar-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .sidebar-nav-icon .nav-svg {
    width: 23px;
    height: 23px;
  }

  .sidebar-footer {
    padding-top: 12px;
  }

  .site-version-sidebar {
    text-align: center;
    font-size: 10px;
  }

  .sidebar-footer .btn-ghost {
    min-height: 44px;
    padding: 8px 6px;
    border-radius: 14px;
    font-size: 12px;
  }

  .main {
    padding: calc(20px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 24px 20px;
  }

  .bottom-nav,
  .bottom-more-backdrop,
  .bottom-more-panel {
    display: none;
  }
}

@media (max-width: 560px) {
  .calendar-attention-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .calendar-inline-actions {
    gap: 4px;
  }

  .calendar-mini-action {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .tablet-visible {
    display: none;
  }
}

/* Stage 2.6 Apple-style UI polish layer. */
:root {
  --navy: #07111f;
  --deep: #10213f;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --sky: #4ea3ff;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #0f172a;
  --ink: #0b1220;
  --muted: #64748b;
  --placeholder: #94a3b8;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.11);
  --shadow-sm: 0 12px 32px rgba(15, 23, 42, 0.07);
  --shadow-xs: 0 6px 18px rgba(15, 23, 42, 0.055);
}

html,
body {
  background:
    radial-gradient(circle at 78% -12%, rgba(37, 99, 235, 0.08), transparent 28rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 42%, #f3f6fb 100%);
}

button {
  border-radius: 18px;
  font-weight: 800;
  box-shadow: none;
}

button:disabled,
.action-btn:disabled,
.booking-drawer-action:disabled,
.calendar-mini-action:disabled {
  opacity: 1;
  border-color: rgba(148, 163, 184, 0.2);
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.btn-danger {
  background: #ef4444;
}

.btn-ghost {
  border: 1px solid transparent;
  color: #64748b;
}

.btn-icon {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  background: #fff;
  border-color: rgba(226, 232, 240, 0.95);
  color: #475569;
  box-shadow: var(--shadow-xs);
}

.sidebar {
  background:
    radial-gradient(circle at 28% 4%, rgba(59, 99, 246, 0.28), transparent 15rem),
    linear-gradient(180deg, #0a1425 0%, #06101d 100%);
  box-shadow: 18px 0 56px rgba(15, 23, 42, 0.16);
}

.brand-mark {
  background: linear-gradient(145deg, #6ea8ff, #3758f4 58%, #2532b8);
  box-shadow: 0 14px 30px rgba(59, 99, 246, 0.32);
}

.nav-item {
  border-radius: 18px;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg, #5273ff, #3157f3);
  box-shadow: 0 16px 36px rgba(49, 87, 243, 0.28);
}

.sidebar-nav-icon {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.main {
  padding: 30px 32px;
}

.topline {
  margin-bottom: 24px;
}

.topline-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.user-pill,
.card,
.item,
.calendar-control-card,
.calendar-grid-wrap,
.calendar-new-panel,
.admin-booking-drawer,
.client-edit-drawer,
.vehicle-edit-drawer,
.crud-panel,
.time-offer-panel,
.client-proposed-panel,
.client-time-choice-panel,
.history-panel {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 18px;
}

.item {
  padding: 15px;
}

.user-pill {
  min-height: 54px;
  padding: 9px 14px;
  backdrop-filter: blur(16px);
}

.connection-indicator,
.notification-bell {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  position: relative;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  box-shadow: var(--shadow-xs);
}

.notification-bell svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell span {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
}

.connection-dot {
  width: 11px;
  height: 11px;
}

.connection-indicator.synced {
  color: #16a34a;
  background: rgba(255, 255, 255, 0.92);
}

.connection-indicator.stale {
  color: #f59e0b;
  background: rgba(255, 255, 255, 0.92);
}

.connection-indicator.offline {
  color: #ef4444;
  background: rgba(255, 255, 255, 0.92);
}

.notification-summary {
  min-height: 36px;
  border-color: rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #eef4ff;
  box-shadow: var(--shadow-xs);
}

.segmented-tabs,
.calendar-layout-toggle,
.calendar-main-tabs {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), var(--shadow-xs);
}

.segmented-tabs button,
.calendar-layout-toggle button,
.calendar-main-tabs button {
  border-radius: 14px;
}

.segmented-tabs button.active,
.calendar-layout-toggle button.active,
.calendar-main-tabs button.active {
  background: linear-gradient(180deg, #f8fbff, #eaf1ff);
  color: var(--primary);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.calendar-control-card {
  padding: 18px;
  border-radius: 26px;
}

.calendar-grid-wrap {
  overflow-x: auto;
  border-radius: 26px;
}

.calendar-corner,
.calendar-post-head {
  background: rgba(248, 250, 252, 0.96);
}

.calendar-cell {
  background: rgba(255, 255, 255, 0.72);
}

.calendar-empty {
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.72);
}

.calendar-booking {
  min-height: 84px;
  border-radius: 18px;
  border-left-width: 0;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.calendar-booking.compact {
  min-height: 58px;
  border-radius: 17px;
  padding: 8px 10px;
}

.calendar-booking.compact.needs-action {
  min-height: 88px;
}

.calendar-booking.warning {
  background: linear-gradient(180deg, #fffaf0, #fff7e6);
  border-color: rgba(245, 158, 11, 0.3);
}

.calendar-booking.success {
  background: linear-gradient(180deg, #f7fff9, #eaf8ee);
  border-color: rgba(22, 163, 74, 0.24);
}

.calendar-booking.info {
  background: linear-gradient(180deg, #f7fbff, #eaf3ff);
  border-color: rgba(37, 99, 235, 0.22);
}

.calendar-booking.done {
  background: linear-gradient(180deg, #fbfcfe, #f1f5f9);
}

.calendar-booking.compact strong,
.calendar-booking-plate,
.queue-main-line strong {
  color: var(--ink);
  font-weight: 950;
}

.calendar-booking.compact strong {
  font-size: 16px;
  line-height: 19px;
}

.calendar-booking-plate {
  font-size: 30px;
  line-height: 34px;
}

.calendar-status-dot,
.calendar-car-mark,
.booking-detail-car span,
.booking-detail-row-icon {
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.calendar-status-pill,
.badge,
.booking-detail-status {
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.calendar-mini-action,
.action-btn.mini-action {
  border-radius: 14px;
}

.calendar-mini-action.primary,
.action-btn.mini-action:not(.danger):not(:disabled) {
  background: #eef4ff;
  color: var(--primary);
}

.calendar-mini-action.primary {
  background: linear-gradient(135deg, #5273ff, #2563eb);
  color: #fff;
}

.action-btn.mini-action.danger:not(:disabled),
.calendar-mini-action.danger:not(:disabled) {
  background: #fff1f2;
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.booking-list-item,
.client-bookings-card,
.queue-list-card {
  border-radius: 24px;
}

.booking-list-item,
.queue-item {
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-xs);
}

.primary-current-booking {
  background: linear-gradient(180deg, #ffffff, #f4fff7);
  border-color: rgba(22, 163, 74, 0.24);
}

.booking-detail-backdrop {
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(10px);
}

.booking-detail-drawer {
  width: min(520px, calc(100vw - 28px));
  gap: 18px;
  padding: 26px;
  background:
    radial-gradient(circle at 90% -6%, rgba(37, 99, 235, 0.08), transparent 19rem),
    #f8fafc;
  box-shadow: -28px 0 80px rgba(15, 23, 42, 0.22);
}

.booking-detail-hero {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.booking-detail-head h2 {
  font-size: 52px;
  line-height: 58px;
  font-weight: 950;
  letter-spacing: 0;
}

.booking-detail-car {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.booking-detail-car span {
  width: 44px;
  height: 44px;
}

.booking-detail-car strong {
  font-size: 21px;
  line-height: 28px;
}

.booking-detail-status {
  min-height: 46px;
  padding: 9px 15px;
  width: fit-content;
}

.booking-detail-status.success {
  color: #15803d;
  background: #eaf8ee;
  border-color: rgba(22, 163, 74, 0.2);
}

.booking-detail-status.warning {
  color: #b45309;
  background: #fff7e6;
  border-color: rgba(245, 158, 11, 0.25);
}

.booking-detail-status.info {
  color: #1d4ed8;
  background: #eaf3ff;
  border-color: rgba(37, 99, 235, 0.2);
}

.booking-detail-status-note {
  margin: -4px 0 0;
  padding: 13px 15px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  color: #475569;
}

.booking-detail-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.booking-drawer-action {
  min-height: 74px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-xs);
}

.booking-drawer-action:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.booking-drawer-action.danger:not(:disabled) {
  background: #fff7f7;
}

.booking-detail-info {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-xs);
}

.booking-detail-row {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.booking-detail-row + .booking-detail-row {
  border-top: 1px solid rgba(226, 232, 240, 0.86);
}

.booking-detail-row-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #123a78;
}

.booking-detail-row-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-detail-row-label {
  color: #64748b;
  font-size: 14px;
  line-height: 19px;
  font-weight: 750;
}

.booking-detail-row strong {
  font-size: 18px;
  line-height: 24px;
  text-align: right;
}

.time-offer-panel,
.client-proposed-panel,
.client-time-choice-panel,
.calendar-new-panel,
.admin-booking-drawer,
.client-edit-drawer,
.vehicle-edit-drawer {
  border-radius: 26px;
}

.bottom-nav {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -18px 46px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  border-radius: 20px;
}

.bottom-nav button.active {
  background: #eef4ff;
  color: var(--primary);
}

@media (max-width: 980px) {
  .main {
    padding: calc(18px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  }

  .topline {
    align-items: center;
  }

  .topline-actions {
    flex: 0 0 auto;
  }

  .connection-indicator,
  .notification-bell {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .booking-detail-drawer {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100dvh - 26px);
    padding: 18px;
    border-radius: 30px;
  }

  .booking-detail-head h2 {
    font-size: 42px;
    line-height: 48px;
  }

  .booking-detail-actions {
    grid-template-columns: repeat(4, minmax(74px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .booking-drawer-action {
    min-width: 74px;
  }
}

@media (max-width: 560px) {
  .topline {
    gap: 10px;
  }

  .user-pill {
    min-height: 48px;
    padding: 8px 10px;
  }

  .topline-actions {
    gap: 8px;
  }

  .connection-indicator,
  .notification-bell {
    width: 40px;
    height: 40px;
    min-height: 44px;
  }

  .calendar-booking.compact strong {
    font-size: 15px;
    line-height: 18px;
  }

  .calendar-booking-plate {
    font-size: 24px;
    line-height: 29px;
  }

  .booking-detail-hero {
    padding: 20px;
    border-radius: 28px;
  }

  .booking-detail-head h2 {
    font-size: 38px;
    line-height: 43px;
  }

  .booking-detail-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .booking-detail-row strong {
    grid-column: 2;
    text-align: left;
  }
}

/* Stage 2.6.1 compact density correction. */
:root {
  --shadow-lg: 0 18px 52px rgba(15, 23, 42, 0.1);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.065);
  --shadow-xs: 0 4px 14px rgba(15, 23, 42, 0.05);
}

button {
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 15px;
}

input,
select,
textarea {
  min-height: 40px;
}

.btn-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
}

.main {
  padding: 24px 26px;
}

.topline {
  margin-bottom: 18px;
}

.topline-actions {
  gap: 8px;
}

.user-pill {
  min-height: 46px;
  padding: 7px 12px;
}

.connection-indicator,
.notification-bell {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

.notification-bell svg {
  width: 20px;
  height: 20px;
}

.card {
  padding: 14px;
  border-radius: 20px;
}

.item {
  padding: 12px;
  border-radius: 18px;
}

.calendar-control-card {
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
}

.calendar-main-tabs {
  gap: 5px;
  padding: 3px;
  border-radius: 15px;
}

.calendar-main-tabs button {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 14px;
  gap: 7px;
}

.tab-icon {
  width: 17px;
  height: 17px;
}

.calendar-controls {
  display: grid;
  grid-template-columns: auto minmax(148px, 190px) auto minmax(150px, 210px) minmax(170px, 220px);
  gap: 8px;
  align-items: end;
}

.calendar-date-control,
.calendar-post-control {
  gap: 3px;
  font-size: 11px;
  line-height: 14px;
}

.calendar-date-control input,
.calendar-post-control select {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 13px;
}

.calendar-layout-toggle {
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
}

.calendar-layout-toggle button {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 11px;
  font-size: 12px;
}

.calendar-title-actions {
  gap: 8px;
}

.calendar-new-btn,
.calendar-attention-btn {
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 14px;
}

.calendar-grid-wrap {
  border-radius: 20px;
}

.calendar-corner,
.calendar-post-head,
.calendar-time,
.calendar-cell {
  padding: 7px 8px;
}

.calendar-detail .calendar-time,
.calendar-detail .calendar-cell {
  min-height: 90px;
}

.calendar-booking {
  min-height: 76px;
  gap: 4px;
  padding: 8px;
  border-radius: 15px;
}

.calendar-booking.compact {
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 14px;
}

.calendar-booking.compact.needs-action {
  min-height: 76px;
}

.calendar-booking-plate {
  font-size: 24px;
  line-height: 29px;
}

.calendar-booking.compact strong {
  font-size: 15px;
  line-height: 18px;
}

.calendar-booking-car {
  font-size: 13px;
  line-height: 17px;
}

.calendar-booking-meta,
.calendar-compact-main small {
  font-size: 11px;
  line-height: 14px;
}

.calendar-status-pill {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 10px;
}

.calendar-menu-btn {
  min-width: 28px;
  min-height: 28px;
  border-radius: 9px;
}

.calendar-inline-actions {
  gap: 4px;
}

.calendar-mini-action,
.action-btn.mini-action {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.booking-mini-actions {
  gap: 5px;
  margin-top: 5px;
}

.booking-detail-drawer {
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: min(470px, calc(100vw - 24px));
  max-height: calc(100dvh - 20px);
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  border-radius: 28px 0 0 28px;
  box-shadow: -18px 0 52px rgba(15, 23, 42, 0.18);
}

.booking-detail-hero {
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
}

.booking-detail-head h2 {
  font-size: 42px;
  line-height: 46px;
}

.booking-detail-head p {
  margin-bottom: 2px;
}

.booking-detail-car span {
  width: 36px;
  height: 36px;
}

.booking-detail-car strong {
  font-size: 17px;
  line-height: 23px;
}

.booking-detail-status {
  min-height: 36px;
  padding: 6px 11px;
}

.booking-detail-status-icon {
  width: 18px;
  height: 18px;
}

.booking-detail-status-note {
  margin: -2px 0 0;
  padding: 9px 11px;
  border-radius: 16px;
  font-size: 12px;
  line-height: 16px;
}

.booking-detail-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.booking-drawer-action {
  min-height: 54px;
  gap: 3px;
  padding: 6px 5px;
  border-radius: 16px;
  font-size: 11px;
  line-height: 13px;
}

.booking-drawer-action-icon {
  width: 18px;
  height: 18px;
}

.booking-detail-info {
  border-radius: 20px;
}

.booking-detail-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 11px 13px;
}

.booking-detail-row-icon {
  width: 34px;
  height: 34px;
}

.booking-detail-row-icon svg {
  width: 20px;
  height: 20px;
}

.booking-detail-row-label {
  font-size: 12px;
  line-height: 16px;
}

.booking-detail-row strong {
  font-size: 15px;
  line-height: 20px;
}

.time-offer-panel,
.client-proposed-panel,
.client-time-choice-panel,
.calendar-new-panel,
.admin-booking-drawer,
.client-edit-drawer,
.vehicle-edit-drawer {
  border-radius: 20px;
}

.time-offer-panel,
.history-panel {
  margin-top: 10px;
  padding-top: 10px;
}

.history-toggle {
  min-height: 32px;
  padding: 5px 0;
}

.history-list {
  gap: 6px;
}

.history-item {
  gap: 7px;
  font-size: 12px;
  line-height: 16px;
}

.history-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.78);
  color: var(--muted);
  text-align: center;
}

.history-empty-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
}

.history-empty-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-empty strong {
  color: var(--text);
  font-size: 13px;
  line-height: 17px;
}

.history-empty small {
  font-size: 12px;
  line-height: 16px;
}

.slot-btn {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 12px;
}

.date-chips {
  gap: 6px;
  margin: 7px 0;
}

.date-chips button {
  min-height: 34px;
  padding: 6px 10px;
}

.inline-message {
  padding: 7px 9px;
  border-radius: 10px;
}

.bottom-nav {
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding-top: 6px;
}

.bottom-nav button {
  min-height: 50px;
  border-radius: 16px;
}

@media (max-width: 1180px) {
  .calendar-controls {
    grid-template-columns: auto minmax(140px, 1fr) auto minmax(145px, 1fr);
  }

  .calendar-layout-toggle {
    grid-column: 1 / -1;
    width: min(260px, 100%);
    justify-self: end;
  }
}

@media (max-width: 980px) {
  .main {
    padding: calc(14px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(86px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  }

  .calendar-control-card {
    gap: 9px;
    padding: 10px;
  }

  .calendar-controls {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .calendar-post-control,
  .calendar-layout-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .booking-detail-drawer {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(760px, calc(100dvh - 18px));
    padding: 14px;
    border-radius: 24px;
  }

  .booking-detail-actions {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    overflow-x: auto;
  }

  .booking-drawer-action {
    min-width: 64px;
  }
}

@media (max-width: 560px) {
  button {
    min-height: 40px;
    padding: 7px 11px;
  }

  .calendar-main-tabs button {
    min-height: 36px;
    font-size: 13px;
  }

  .calendar-controls {
    gap: 7px;
  }

  .calendar-date-control input,
  .calendar-post-control select {
    min-height: 40px;
  }

  .calendar-layout-toggle button {
    min-height: 34px;
  }

  .booking-detail-head h2 {
    font-size: 34px;
    line-height: 39px;
  }

  .booking-detail-hero {
    padding: 14px;
    border-radius: 22px;
  }

  .booking-detail-row {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .booking-detail-row-icon {
    width: 32px;
    height: 32px;
  }

  .booking-detail-row strong {
    grid-column: 2;
    font-size: 15px;
    line-height: 20px;
    text-align: left;
  }

  .booking-drawer-action {
    min-height: 52px;
  }
}

/* Stage 2.6.2 final override: calendar density + stronger icon emphasis */
.visually-hidden {
  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;
}

.action-icon,
.tab-icon,
.badge-icon,
.journal-action-icon,
.booking-drawer-action-icon,
.calendar-status-icon,
.calendar-car-icon,
.history-icon {
  width: 1.18em;
  height: 1.18em;
}

.nav-svg {
  width: 21px;
  height: 21px;
}

.sidebar-nav-icon,
.bottom-nav-icon,
.connection-icon-wrap,
.calendar-attention-icon {
  display: inline-grid;
  place-items: center;
}

.sidebar-nav-icon .nav-svg,
.bottom-nav-icon .nav-svg {
  width: 22px;
  height: 22px;
}

.user-menu-role-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.user-menu-avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: #eef3ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
}

.user-menu-role-row strong {
  font-size: 15px;
  line-height: 20px;
}

.user-menu-role-row small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 750;
}

@media (min-width: 981px) {
  .user-menu-panel {
    display: none;
  }
}

.calendar-control-card {
  grid-template-columns: minmax(250px, 390px) minmax(96px, 126px);
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.calendar-main-tabs {
  grid-column: 1;
  gap: 5px;
  padding: 3px;
  max-width: 390px;
  border-radius: 17px;
}

.calendar-main-tabs button {
  min-height: 36px;
  padding: 6px 10px;
  gap: 7px;
  font-size: 13px;
  border-radius: 13px;
}

.calendar-main-tabs .tab-icon {
  width: 18px;
  height: 18px;
}

.calendar-layout-toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 104px;
  padding: 3px;
  gap: 3px;
  border-radius: 15px;
}

.calendar-layout-toggle button {
  min-height: 34px;
  padding: 5px;
  border-radius: 12px;
  font-size: 0;
}

.calendar-layout-toggle .nav-svg {
  width: 20px;
  height: 20px;
}

.calendar-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 38px minmax(145px, 178px) 38px minmax(170px, 230px);
  justify-content: start;
  align-items: end;
  gap: 7px;
}

.calendar-controls > .btn-icon {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
}

.calendar-date-control,
.calendar-post-control {
  gap: 2px;
  font-size: 10px;
  line-height: 12px;
}

.calendar-date-control input,
.calendar-post-control select {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 20px;
}

.calendar-toolbar {
  display: block;
  margin-bottom: 8px;
}

.calendar-toolbar > div:first-child,
.calendar-note {
  display: none;
}

.calendar-legend {
  align-items: center;
  gap: 8px 12px;
  padding: 0 2px 2px;
  font-size: 12px;
  line-height: 16px;
}

.calendar-legend span {
  gap: 5px;
}

.legend-dot {
  width: 12px;
  height: 12px;
}

.cancel-badge.sample {
  min-height: 22px;
  padding: 2px 7px;
}

.calendar-grid-wrap {
  border-radius: 18px;
}

.calendar-corner,
.calendar-post-head {
  min-height: 40px;
  padding: 8px 10px;
}

.calendar-time,
.calendar-cell {
  min-height: 54px;
  padding: 5px 6px;
}

.calendar-detail .calendar-time,
.calendar-detail .calendar-cell {
  min-height: 82px;
}

.calendar-empty {
  min-height: 38px;
}

.calendar-booking {
  min-height: 72px;
  gap: 4px;
  padding: 8px 9px;
  border-radius: 16px;
}

.calendar-booking.compact {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  min-height: 50px;
  padding: 6px 8px;
}

.calendar-booking.compact.needs-action {
  min-height: 72px;
}

.calendar-status-dot {
  width: 24px;
  height: 24px;
}

.calendar-status-dot .calendar-status-icon,
.calendar-status-pill.icon-only .calendar-status-icon {
  width: 18px;
  height: 18px;
}

.calendar-status-pill.icon-only {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.calendar-booking-car {
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.calendar-car-mark {
  width: 28px;
  height: 28px;
}

.calendar-car-icon {
  width: 19px;
  height: 19px;
}

.calendar-booking-plate {
  font-size: 27px;
  line-height: 31px;
}

.calendar-menu-btn {
  min-width: 30px;
  min-height: 30px;
  border-radius: 12px;
  font-size: 17px;
}

.calendar-mini-action,
.action-btn.mini-action {
  min-height: 30px;
  padding: 5px 8px;
}

.booking-drawer-action-icon {
  width: 24px;
  height: 24px;
}

.booking-drawer-action {
  gap: 7px;
}

.calendar-new-btn span,
.calendar-attention-btn span {
  width: 26px;
  height: 26px;
  font-size: 22px;
}

@media (max-width: 1180px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .calendar-main-tabs {
    max-width: none;
  }

  .calendar-layout-toggle {
    grid-column: 2;
    width: 104px;
  }
}

@media (max-width: 720px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) 96px;
    padding: 9px;
    border-radius: 18px;
  }

  .calendar-main-tabs button {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .calendar-layout-toggle {
    width: 96px;
  }

  .calendar-controls {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 6px;
  }

  .calendar-post-control {
    grid-column: 1 / -1;
  }

  .calendar-controls > .btn-icon {
    min-width: 36px;
    min-height: 36px;
  }

  .calendar-date-control input,
  .calendar-post-control select {
    min-height: 36px;
    font-size: 14px;
  }

  .calendar-legend {
    gap: 6px 9px;
    font-size: 11px;
  }

  .calendar-booking-plate {
    font-size: 25px;
    line-height: 29px;
  }
}


/* iOS PWA calendar filter layout fix */
.calendar-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(170px, 230px);
  align-items: end;
  justify-content: start;
  gap: 8px;
  max-width: 100%;
  overflow: visible;
}

.calendar-date-control,
.calendar-post-control {
  display: grid;
  grid-template-rows: auto auto;
  gap: 5px;
  min-width: 0;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.calendar-control-label,
.calendar-date-control > span,
.calendar-post-control > span {
  display: block;
  position: static;
  z-index: auto;
  min-height: 14px;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.calendar-date-field {
  display: grid;
  grid-template-columns: 38px minmax(145px, 178px) 38px;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.calendar-date-field > .btn-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
}

.calendar-date-input,
.calendar-post-control select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  line-height: 20px;
}

@media (max-width: 720px) {
  .calendar-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  .calendar-date-field {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 6px;
  }

  .calendar-date-field > .btn-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .calendar-date-input,
  .calendar-post-control select {
    min-height: 36px;
    font-size: 14px;
  }
}


/* Calendar controls unified responsive layout */
.calendar-control-card {
  overflow: visible;
}

.calendar-controls {
  grid-area: controls;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 284px) minmax(0, 288px);
  align-items: end;
  justify-content: start;
  gap: 10px 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.calendar-date-control,
.calendar-post-control {
  display: grid;
  grid-template-rows: 16px 48px;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.calendar-control-label,
.calendar-date-control > span,
.calendar-post-control > span {
  display: block;
  position: static;
  z-index: auto;
  height: 16px;
  min-height: 16px;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-date-field {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.calendar-date-field > .btn-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  align-self: center;
  padding: 0;
  border-radius: 16px;
  font-size: 24px;
  line-height: 1;
}

.calendar-date-input,
.calendar-post-control select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  line-height: 24px;
  font-weight: 900;
}

.calendar-date-input {
  text-align: center;
}

@media (max-width: 720px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 12px;
  }

  .calendar-layout-toggle {
    width: 104px;
    justify-self: start;
  }

  .calendar-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    justify-content: stretch;
  }

  .calendar-date-control,
  .calendar-post-control {
    grid-template-rows: 16px 48px;
    gap: 6px;
  }

  .calendar-date-field {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .calendar-control-card {
    padding: 12px;
  }

  .calendar-date-field {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .calendar-date-field > .btn-icon {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
  }

  .calendar-date-input,
  .calendar-post-control select {
    font-size: 17px;
  }
}


/* Calendar mobile controls fit pass */
.calendar-control-card {
  overflow: visible;
}

.calendar-main-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
  container-type: inline-size;
}

.calendar-main-tabs button {
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.calendar-main-tabs .tab-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.calendar-tab-text {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 310px) {
  .calendar-main-tabs button {
    padding: 0;
    gap: 0;
  }

  .calendar-tab-text {
    display: none;
  }
}

.calendar-controls {
  grid-area: controls;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 278px) minmax(0, 288px);
  align-items: end;
  justify-content: start;
  gap: 10px 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.calendar-date-control,
.calendar-post-control {
  display: grid;
  grid-template-rows: 18px 44px;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  color: #64748b;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.calendar-control-label,
.calendar-date-control > span,
.calendar-post-control > span {
  display: block;
  position: static;
  z-index: auto;
  height: 18px;
  min-height: 18px;
  margin: 0;
  overflow: visible;
  color: #64748b;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.calendar-date-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.calendar-date-field > .btn-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  align-self: center;
  padding: 0;
  border-radius: 15px;
  font-size: 22px;
  line-height: 1;
}

.calendar-date-input,
.calendar-post-control select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0 12px;
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  font-size: 17px;
  line-height: 22px;
  font-weight: 850;
}

.calendar-date-input {
  text-align: center;
}

@media (max-width: 720px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 12px;
  }

  .calendar-layout-toggle {
    width: 104px;
    justify-self: start;
  }

  .calendar-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    justify-content: stretch;
  }

  .calendar-date-control,
  .calendar-post-control {
    grid-template-rows: 18px 44px;
    gap: 5px;
  }

  .calendar-date-field {
    align-items: center;
  }

  .calendar-main-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-main-tabs button {
    min-height: 48px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .calendar-main-tabs button {
    padding: 0 6px;
    gap: 5px;
    font-size: 12px;
  }

  .calendar-date-field {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 7px;
  }

  .calendar-date-field > .btn-icon {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
  }
}

/* Calendar iOS native date shell */
:root {
  --calendar-control-height: 44px;
  --calendar-control-radius: 15px;
  --calendar-date-shell-offset-y: 5px;
}

.calendar-date-control,
.calendar-post-control {
  grid-template-rows: 17px var(--calendar-control-height);
  gap: 7px;
}

.calendar-control-label,
.calendar-date-control > span,
.calendar-post-control > span {
  height: 17px;
  min-height: 17px;
  color: #5f6f86;
  font-size: 12px;
  line-height: 17px;
  font-weight: 650;
  letter-spacing: 0;
}

.calendar-date-field {
  grid-template-columns: var(--calendar-control-height) minmax(0, 1fr) var(--calendar-control-height);
  grid-template-rows: var(--calendar-control-height);
  align-items: center;
  gap: 10px;
  height: var(--calendar-control-height);
  min-height: var(--calendar-control-height);
  max-height: var(--calendar-control-height);
}

.calendar-date-field > .btn-icon {
  width: var(--calendar-control-height);
  min-width: var(--calendar-control-height);
  max-width: var(--calendar-control-height);
  height: var(--calendar-control-height);
  min-height: var(--calendar-control-height);
  max-height: var(--calendar-control-height);
  border-radius: var(--calendar-control-radius);
  align-self: center;
}

.calendar-date-shell {
  position: relative;
  top: 0;
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--calendar-control-height);
  min-height: var(--calendar-control-height);
  max-height: var(--calendar-control-height);
  margin: 0;
  align-self: center;
}

.calendar-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--calendar-control-height);
  min-height: var(--calendar-control-height);
  max-height: var(--calendar-control-height);
  padding: 0 14px;
  border: 1px solid #d4dbe7;
  border-radius: var(--calendar-control-radius);
  background: #fff;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 22px;
  font-weight: 760;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.calendar-date-control .calendar-date-native {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--calendar-control-radius);
  opacity: 0.001;
  color: transparent;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.calendar-date-control .calendar-date-native::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.calendar-post-control select {
  height: var(--calendar-control-height);
  min-height: var(--calendar-control-height);
  max-height: var(--calendar-control-height);
  border-radius: var(--calendar-control-radius);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 760;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .calendar-main-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .calendar-main-tabs button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 8px;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .calendar-main-tabs .calendar-tab-text {
    display: none;
  }
}

@media (max-width: 380px) {
  :root {
    --calendar-control-height: 42px;
    --calendar-control-radius: 14px;
  }

  .calendar-main-tabs button {
    gap: 6px;
    padding: 0 6px;
  }

  .calendar-date-field {
    gap: 8px;
  }

  .calendar-date-display {
    padding: 0 10px;
    font-size: 16px;
    line-height: 21px;
  }
}

/* Calendar mobile width and height fix */
@media (max-width: 720px) {
  .calendar-control-card {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  .calendar-main-tabs {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .calendar-main-tabs button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .calendar-layout-toggle {
    grid-column: 1 / -1 !important;
    justify-self: start !important;
  }

  .calendar-controls {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}

@media (max-width: 430px) {
  :root {
    --calendar-control-height: 48px;
    --calendar-control-radius: 16px;
  }

  .calendar-date-field {
    grid-template-columns: var(--calendar-control-height) minmax(0, 1fr) var(--calendar-control-height) !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .calendar-date-field > .btn-icon,
  .calendar-date-field > .btn-icon.btn-secondary {
    width: var(--calendar-control-height) !important;
    min-width: var(--calendar-control-height) !important;
    max-width: var(--calendar-control-height) !important;
    height: var(--calendar-control-height) !important;
    min-height: var(--calendar-control-height) !important;
    max-height: var(--calendar-control-height) !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: var(--calendar-control-radius) !important;
    align-self: center !important;
    box-sizing: border-box !important;
  }

  .calendar-date-shell,
  .calendar-date-display,
  .calendar-date-native,
  .calendar-post-control select {
    height: var(--calendar-control-height) !important;
    min-height: var(--calendar-control-height) !important;
    max-height: var(--calendar-control-height) !important;
    border-radius: var(--calendar-control-radius) !important;
    box-sizing: border-box !important;
  }

  .calendar-date-shell {
    top: 0 !important;
    margin: 0 !important;
    align-self: center !important;
  }

  .calendar-date-display {
    padding: 0 12px !important;
    font-size: 17px !important;
    line-height: 22px !important;
  }
}

/* PWA service update screen */
.service-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.service-panel {
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid #e1e7f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

.service-panel h1 {
  margin: 20px 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.service-version-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

/* Calendar filter panel: iOS-style controls */
:root {
  --pbwash-system-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ios-blue: #2f6bff;
  --ios-control-border: #dbe3ef;
  --ios-control-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --ios-control-shadow-soft: 0 8px 18px rgba(47, 107, 255, 0.14);
}

body,
button,
input,
select,
textarea {
  font-family: var(--pbwash-system-font);
}

.calendar-control-card {
  grid-template-areas:
    "tabs toggle"
    "controls controls";
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 360px);
  gap: 22px 28px;
  padding: 26px 28px;
  border: 1px solid rgba(219, 227, 239, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.calendar-main-tabs.ios-segmented-control {
  grid-area: tabs;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 64px;
  padding: 6px;
  border: 1px solid var(--ios-control-border);
  border-radius: 24px;
  background: rgba(248, 250, 252, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--ios-control-shadow);
}

.calendar-main-tabs.ios-segmented-control button {
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: #657386;
  font-family: var(--pbwash-system-font);
  font-size: 16px;
  line-height: 20px;
  font-weight: 760;
  letter-spacing: 0;
  box-shadow: none;
}

.calendar-main-tabs.ios-segmented-control button.active {
  border-color: rgba(47, 107, 255, 0.34);
  background: rgba(47, 107, 255, 0.09);
  color: var(--ios-blue);
  box-shadow: 0 10px 24px rgba(47, 107, 255, 0.13);
}

.calendar-main-tabs.ios-segmented-control .tab-icon {
  width: 22px;
  height: 22px;
}

.calendar-layout-toggle.ios-calendar-switch {
  grid-area: toggle;
  justify-self: end;
  display: grid;
  grid-template-columns: minmax(82px, 1fr) 70px minmax(104px, 1fr);
  align-items: center;
  gap: 10px;
  width: min(100%, 360px);
  min-height: 64px;
  padding: 6px 14px;
  border: 1px solid var(--ios-control-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--ios-control-shadow);
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-label {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7484;
  font-family: var(--pbwash-system-font);
  font-size: 16px;
  line-height: 20px;
  font-weight: 650;
  letter-spacing: 0;
  box-shadow: none;
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-label.active {
  color: var(--ios-blue);
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-track {
  position: relative;
  width: 68px;
  height: 40px;
  min-width: 68px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ios-blue);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(47, 107, 255, 0.28);
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.22);
  transition: transform 0.18s ease;
}

.calendar-layout-toggle.ios-calendar-switch.is-compact .ios-switch-thumb {
  transform: translateX(28px);
}

.calendar-layout-toggle.ios-calendar-switch.is-detail .ios-switch-thumb {
  transform: translateX(0);
}

.calendar-controls {
  grid-area: controls;
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(320px, 1.1fr);
  align-items: end;
  gap: 18px 24px;
  width: 100%;
}

.calendar-date-control,
.calendar-post-control {
  grid-template-rows: 22px 54px;
  gap: 8px;
  font-family: var(--pbwash-system-font);
}

.calendar-control-label,
.calendar-date-control > span,
.calendar-post-control > span {
  height: 22px;
  min-height: 22px;
  color: #68758a;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  letter-spacing: 0;
}

.calendar-date-field {
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  grid-template-rows: 54px;
  gap: 14px;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
}

.calendar-date-field > .btn-icon,
.calendar-date-field > .btn-icon.btn-secondary {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  border: 1px solid var(--ios-control-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ios-blue);
  font-size: 28px;
  line-height: 1;
  box-shadow: var(--ios-control-shadow);
}

.calendar-date-shell,
.calendar-date-display,
.calendar-date-native,
.calendar-post-control select {
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  border-radius: 20px;
  font-family: var(--pbwash-system-font);
  box-sizing: border-box;
}

.calendar-date-shell {
  top: 0;
  margin: 0;
  align-self: center;
}

.calendar-date-display {
  justify-content: flex-start;
  padding: 0 22px;
  border: 1px solid var(--ios-control-border);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 21px;
  line-height: 26px;
  font-weight: 750;
  box-shadow: var(--ios-control-shadow);
}

.calendar-post-control select {
  padding: 0 48px 0 22px;
  border: 1px solid var(--ios-control-border);
  background-color: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 21px;
  line-height: 26px;
  font-weight: 750;
  box-shadow: var(--ios-control-shadow);
}

@media (max-width: 980px) {
  .calendar-control-card {
    grid-template-areas:
      "tabs"
      "toggle"
      "controls";
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
  }

  .calendar-layout-toggle.ios-calendar-switch {
    justify-self: stretch;
    width: 100%;
  }

  .calendar-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

@media (max-width: 430px) {
  .calendar-control-card {
    padding: 14px;
    border-radius: 22px;
  }

  .calendar-main-tabs.ios-segmented-control {
    min-height: 56px;
    border-radius: 21px;
  }

  .calendar-main-tabs.ios-segmented-control button {
    min-height: 44px;
    padding: 0 10px;
    gap: 7px;
    border-radius: 16px;
    font-size: 14px;
  }

  .calendar-layout-toggle.ios-calendar-switch {
    grid-template-columns: minmax(72px, 1fr) 62px minmax(96px, 1fr);
    min-height: 56px;
    padding: 6px 10px;
    border-radius: 21px;
  }

  .calendar-layout-toggle.ios-calendar-switch .ios-switch-label {
    font-size: 14px;
  }

  .calendar-layout-toggle.ios-calendar-switch .ios-switch-track {
    width: 60px;
    min-width: 60px;
    height: 36px;
    min-height: 36px;
  }

  .calendar-layout-toggle.ios-calendar-switch .ios-switch-thumb {
    width: 28px;
    height: 28px;
  }

  .calendar-layout-toggle.ios-calendar-switch.is-compact .ios-switch-thumb {
    transform: translateX(24px);
  }

  .calendar-control-label,
  .calendar-date-control > span,
  .calendar-post-control > span {
    font-size: 14px;
  }

  .calendar-date-field {
    grid-template-columns: 48px minmax(0, 1fr) 48px !important;
    grid-template-rows: 48px !important;
    gap: 10px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
  }

  .calendar-date-field > .btn-icon,
  .calendar-date-field > .btn-icon.btn-secondary,
  .calendar-date-shell,
  .calendar-date-display,
  .calendar-date-native,
  .calendar-post-control select {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-radius: 18px !important;
  }

  .calendar-date-display,
  .calendar-post-control select {
    padding-left: 16px !important;
    font-size: 17px !important;
    line-height: 22px !important;
  }
}

/* Calendar filter panel: compact scale pass */
.calendar-control-card {
  grid-template-columns: minmax(300px, 1fr) minmax(154px, 180px);
  gap: 14px 18px;
  padding: 16px 18px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.calendar-main-tabs.ios-segmented-control {
  min-height: 46px;
  padding: 4px;
  gap: 6px;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 7px 18px rgba(15, 23, 42, 0.06);
}

.calendar-main-tabs.ios-segmented-control button {
  min-height: 36px;
  padding: 0 12px;
  gap: 8px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 730;
}

.calendar-main-tabs.ios-segmented-control button.active {
  box-shadow: 0 7px 16px rgba(47, 107, 255, 0.12);
}

.calendar-main-tabs.ios-segmented-control .tab-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.calendar-main-tabs.ios-segmented-control .calendar-tab-text {
  display: inline;
}

.calendar-layout-toggle.ios-calendar-switch {
  grid-template-columns: 34px 48px 34px;
  gap: 7px;
  width: 150px;
  min-height: 46px;
  padding: 5px 8px;
  border-radius: 18px;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-label {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 34px;
  color: #6b7484;
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-icon .layout-toggle-svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-track {
  width: 48px;
  min-width: 48px;
  height: 28px;
  min-height: 28px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 5px 12px rgba(47, 107, 255, 0.22);
}

.calendar-layout-toggle.ios-calendar-switch .ios-switch-thumb {
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
}

.calendar-layout-toggle.ios-calendar-switch.is-compact .ios-switch-thumb {
  transform: translateX(20px);
}

.calendar-controls {
  grid-template-columns: minmax(238px, 0.9fr) minmax(250px, 1.1fr);
  gap: 12px 16px;
}

.calendar-date-control,
.calendar-post-control {
  grid-template-rows: 18px 44px;
  gap: 6px;
}

.calendar-control-label,
.calendar-date-control > span,
.calendar-post-control > span {
  height: 18px;
  min-height: 18px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.calendar-date-field {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: 44px;
  gap: 10px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
}

.calendar-date-field > .btn-icon,
.calendar-date-field > .btn-icon.btn-secondary,
.calendar-date-shell,
.calendar-date-display,
.calendar-date-native,
.calendar-post-control select {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  border-radius: 15px;
}

.calendar-date-field > .btn-icon,
.calendar-date-field > .btn-icon.btn-secondary {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  font-size: 23px;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

.calendar-date-display,
.calendar-post-control select {
  padding-left: 18px;
  font-size: 16px;
  line-height: 21px;
  font-weight: 760;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

.calendar-post-control select {
  padding-right: 42px;
}

@media (max-width: 980px) {
  .calendar-control-card {
    gap: 12px;
    padding: 14px;
  }

  .calendar-layout-toggle.ios-calendar-switch {
    justify-self: start;
    width: 150px;
  }
}

@media (max-width: 430px) {
  .calendar-control-card {
    padding: 12px;
    border-radius: 20px;
  }

  .calendar-main-tabs.ios-segmented-control {
    min-height: 44px;
  }

  .calendar-main-tabs.ios-segmented-control button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }

  .calendar-main-tabs.ios-segmented-control .tab-icon {
    width: 17px;
    height: 17px;
  }

  .calendar-layout-toggle.ios-calendar-switch {
    grid-template-columns: 32px 46px 32px;
    min-height: 44px;
    width: 142px;
    padding: 5px 7px;
  }

  .calendar-layout-toggle.ios-calendar-switch .ios-switch-track {
    width: 46px;
    min-width: 46px;
    height: 27px;
    min-height: 27px;
  }

  .calendar-layout-toggle.ios-calendar-switch .ios-switch-thumb {
    width: 21px;
    height: 21px;
  }

  .calendar-layout-toggle.ios-calendar-switch.is-compact .ios-switch-thumb {
    transform: translateX(19px);
  }

  .calendar-date-field {
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
    grid-template-rows: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }

  .calendar-date-field > .btn-icon,
  .calendar-date-field > .btn-icon.btn-secondary,
  .calendar-date-shell,
  .calendar-date-display,
  .calendar-date-native,
  .calendar-post-control select {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 14px !important;
  }

  .calendar-date-field > .btn-icon,
  .calendar-date-field > .btn-icon.btn-secondary {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }

  .calendar-date-display,
  .calendar-post-control select {
    padding-left: 14px !important;
    font-size: 15px !important;
    line-height: 20px !important;
  }
}

/* PBWASH global internal UI scale + hit target pass */
:root {
  --pbwash-control-height: 44px;
  --pbwash-control-radius: 14px;
  --pbwash-panel-radius: 22px;
  --pbwash-panel-padding: 16px;
  --pbwash-label-size: 13px;
  --pbwash-label-line: 18px;
  --pbwash-control-text: 15px;
  --pbwash-control-line: 20px;
  --pbwash-hit-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

body,
button,
input,
select,
textarea {
  font-family: var(--pbwash-system-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

button,
a.button-link,
.button-link,
[role="button"],
summary,
input,
select,
textarea,
.nav-item,
.bottom-nav button,
.tabbar button,
.tabs button,
.segmented-tabs button,
.date-chips button,
.offer-post-grid button,
.client-reschedule-actions button,
.actions button,
.btn-secondary,
.btn-primary,
.btn-danger,
.btn-ghost,
.btn-icon,
.action-icon-btn,
.journal-icon-btn,
.client-select-chip,
.btn-add-compact,
.calendar-booking-cell,
.calendar-slot-create,
.booking-drawer-action,
.service-radio-card,
.post-toggle,
.toggle-line {
  min-height: var(--pbwash-control-height);
  box-sizing: border-box;
}

button,
a.button-link,
.button-link,
[role="button"],
summary,
.nav-item,
.bottom-nav button,
.tabs button,
.segmented-tabs button,
.date-chips button,
.offer-post-grid button,
.actions button,
.client-reschedule-actions button,
.booking-drawer-action,
.service-radio-card,
.post-toggle,
.toggle-line {
  cursor: pointer;
}

button,
.button-link,
input,
select,
textarea {
  font-size: var(--pbwash-control-text);
  line-height: var(--pbwash-control-line);
}

label,
.calendar-control-label,
.field-label,
.form-label,
.muted,
.helper-text {
  letter-spacing: 0;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  min-height: var(--pbwash-control-height);
  border-radius: var(--pbwash-control-radius);
  font-size: var(--pbwash-control-text);
  line-height: var(--pbwash-control-line);
}

textarea {
  min-height: 88px;
}

.btn-icon,
.action-icon-btn,
.journal-icon-btn,
.client-select-chip,
.btn-add-compact,
.calendar-controls > .btn-icon,
.calendar-date-field > .btn-icon,
.calendar-date-field > .btn-icon.btn-secondary,
.modal button.btn-icon,
.drawer button.btn-icon,
.booking-detail-drawer button.btn-icon,
.admin-booking-drawer button.btn-icon,
.client-edit-drawer button.btn-icon,
.vehicle-edit-drawer button.btn-icon {
  width: var(--pbwash-control-height);
  min-width: var(--pbwash-control-height);
  max-width: var(--pbwash-control-height);
  height: var(--pbwash-control-height);
  min-height: var(--pbwash-control-height);
  max-height: var(--pbwash-control-height);
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: var(--pbwash-control-radius);
}

.btn-icon > *,
.action-icon-btn > *,
.journal-icon-btn > *,
.client-select-chip > *,
.nav-item > *,
.bottom-nav button > *,
.calendar-layout-toggle button > *,
.calendar-main-tabs button > * {
  pointer-events: none;
}

.nav-item {
  width: 100%;
  min-height: var(--pbwash-control-height);
  padding: 8px 10px;
  border-radius: 16px;
}

.sidebar-nav-icon,
.bottom-nav-icon,
.bottom-nav-icon-wrap {
  flex: 0 0 auto;
  pointer-events: none;
}

.bottom-nav button {
  min-height: 50px;
  padding: 6px 4px;
}

.topbar button,
.calendar-title-actions button,
.calendar-title-actions input[type="date"],
.user-menu button,
.notification-button {
  min-height: var(--pbwash-control-height);
  min-width: var(--pbwash-control-height);
}

.tabs button,
.segmented-tabs button,
.date-chips button,
.offer-post-grid button {
  min-height: var(--pbwash-control-height);
  padding: 0 14px;
  border-radius: var(--pbwash-control-radius);
  font-size: 14px;
}

.drawer-backdrop,
.admin-booking-backdrop,
.booking-detail-backdrop {
  pointer-events: auto;
}

.booking-detail-drawer,
.admin-booking-drawer,
.client-edit-drawer,
.vehicle-edit-drawer,
.modal,
.popover,
.calendar-popover {
  border-radius: var(--pbwash-panel-radius);
}

.booking-detail-drawer button,
.admin-booking-drawer button,
.client-edit-drawer button,
.vehicle-edit-drawer button,
.modal button,
.popover button,
.calendar-popover button {
  min-height: var(--pbwash-control-height);
}

.booking-drawer-action {
  min-height: 64px;
  border-radius: 16px;
}

.booking-drawer-action-icon {
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.post-toggle,
.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.post-toggle input,
.service-radio-card input {
  pointer-events: none;
}

.post-toggle span {
  min-width: 46px;
  width: 46px;
  height: 28px;
}

.post-toggle span::after {
  width: 22px;
  height: 22px;
}

.post-toggle input:checked + span::after {
  transform: translateX(18px);
}

.toggle-line input[type="checkbox"],
.toggle-line input[type="radio"] {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
}

.service-radio-card {
  min-height: 64px;
  border-radius: 16px;
}

.client-record,
.journal-item,
.service-admin-item,
.vehicle-card,
.booking-card,
.calendar-booking-card {
  border-radius: 16px;
}

.client-record.clickable,
.calendar-booking-cell,
.calendar-slot-create {
  cursor: pointer;
}

.calendar-booking-cell,
.calendar-slot-create {
  min-height: var(--pbwash-control-height);
  border-radius: var(--pbwash-control-radius);
}

.calendar-date-control .calendar-date-native {
  cursor: pointer;
  pointer-events: auto;
}

.calendar-date-shell {
  cursor: pointer;
}

@media (max-width: 430px) {
  :root {
    --pbwash-panel-padding: 12px;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  button,
  .button-link,
  .btn-icon,
  .action-icon-btn,
  .journal-icon-btn,
  .client-select-chip {
    min-height: var(--pbwash-control-height);
  }

  .nav-item {
    min-height: 46px;
  }
}

/* Preserve accepted Calendar filter panel scale from 06.26.04 */
.calendar-control-card .calendar-main-tabs.ios-segmented-control button {
  min-height: 36px;
}

.calendar-control-card .calendar-layout-toggle.ios-calendar-switch .ios-switch-label {
  min-height: 34px;
}

.calendar-control-card .calendar-layout-toggle.ios-calendar-switch .ios-switch-track {
  min-height: 28px;
}

@media (max-width: 430px) {
  .calendar-control-card .calendar-main-tabs.ios-segmented-control button {
    min-height: 34px;
  }

  .calendar-control-card .calendar-layout-toggle.ios-calendar-switch .ios-switch-label {
    min-height: 34px;
  }

  .calendar-control-card .calendar-layout-toggle.ios-calendar-switch .ios-switch-track {
    min-height: 27px;
  }
}

/* Calendar status legend follows compact filter-label typography. */
.calendar-legend {
  gap: 7px 12px;
  padding: 0 2px 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.calendar-legend span {
  gap: 5px;
  font-weight: 600;
}

.calendar-legend .legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

.calendar-legend .cancel-badge.sample {
  min-height: 20px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 650;
  line-height: 14px;
}

/* Calendar title date uses the same calm label typography. */
.calendar-title-actions .calendar-today-text {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
}

/* Calendar time column labels are centered inside every row cell. */
.calendar-time {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Empty calendar slots use half of the regular 54px row height on every status tab. */
.app-shell .main .calendar-section .calendar-time.calendar-time-empty,
.app-shell .main .calendar-section .calendar-cell.calendar-cell-empty {
  min-height: 27px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.app-shell .main .calendar-section .calendar-time.calendar-time-empty {
  line-height: 17px;
}

.app-shell .main .calendar-section .calendar-cell.calendar-cell-empty {
  display: flex;
  align-items: center;
}

.app-shell .main .calendar-section .calendar-cell.calendar-cell-empty > .calendar-empty {
  width: 100%;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  margin: 0;
}

/* PBWASH staff content compact scale follows the Calendar density. */
.app-shell .main .card:not(.calendar-control-card),
.app-shell .main .item,
.app-shell .main .crud-panel,
.app-shell .main .client-compact-section,
.app-shell .main .compact-item,
.app-shell .main .journal-row,
.app-shell .main .admin-booking-list-item,
.app-shell .main .service-admin-item {
  border-radius: 14px;
}

.app-shell .main .card:not(.calendar-control-card) {
  padding: 14px;
}

.app-shell .main .card h2,
.app-shell .main .crud-panel-head h2 {
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 750;
  line-height: 24px;
}

.app-shell .main .card h3,
.app-shell .main .admin-booking-create-box h3 {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 740;
  line-height: 22px;
}

.app-shell .main .card p,
.app-shell .main .item p,
.app-shell .main .crud-panel-head p,
.app-shell .main .compact-item p,
.app-shell .main .admin-booking-list-item p,
.app-shell .main .muted,
.app-shell .main .helper-text {
  font-size: 13px;
  line-height: 18px;
}

.app-shell .main .grid,
.app-shell .main .grid-2,
.app-shell .main .grid-3,
.app-shell .main .grid-4,
.app-shell .main .list,
.app-shell .main .compact-list,
.app-shell .main .journal-list,
.app-shell .main .booking-journal {
  gap: 10px;
}

.app-shell .main .item,
.app-shell .main .compact-item {
  padding: 10px 12px;
}

.app-shell .main .crud-panel {
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.app-shell .main .crud-panel-head {
  gap: 10px;
}

.app-shell .main .metric {
  min-height: 96px;
  padding: 14px;
}

.app-shell .main .metric-value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 780;
  line-height: 32px;
}

.app-shell .main .table th,
.app-shell .main .table td {
  padding: 9px 10px;
  font-size: 13px;
  line-height: 18px;
}

.app-shell .main .client-row {
  min-height: 50px;
  gap: 10px;
  padding: 8px 10px;
}

.app-shell .main .client-row strong,
.app-shell .main .client-col,
.app-shell .main .service-admin-title strong,
.app-shell .main .compact-item strong {
  font-size: 14px;
  line-height: 19px;
}

.app-shell .main .service-admin-item {
  gap: 10px;
  padding: 10px 12px;
}

.app-shell .main .journal-head,
.app-shell .main .journal-row {
  gap: 8px;
}

.app-shell .main .booking-journal.journal-compact-page,
.app-shell .main .journal-list {
  gap: 6px;
}

.app-shell .main .journal-row.journal-compact-row {
  min-height: 50px;
  padding: 6px 8px 6px 14px;
}

@media (max-width: 640px) {
  .app-shell .main .booking-journal.journal-compact-page,
  .app-shell .main .journal-list {
    gap: 0;
  }

  .app-shell .main .journal-row.journal-compact-row {
    min-height: 56px;
    padding: 5px 8px 5px 12px;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .app-shell .main .journal-head {
    display: grid;
  }

  .app-shell .main .journal-filter-row {
    grid-template-columns: minmax(220px, 1fr) minmax(230px, 300px);
  }

  .app-shell .main .booking-journal.journal-compact-page {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell .main .journal-row.journal-compact-row {
    grid-template-columns: 58px 132px 112px minmax(76px, 0.52fr) minmax(120px, 1fr) minmax(130px, 1fr) 92px;
    grid-template-areas: none;
    min-height: 52px;
    padding: 6px 8px 6px 12px;
    border: 1px solid #dde5f0;
    border-radius: 15px;
  }

  .app-shell .main .journal-id,
  .app-shell .main .journal-date,
  .app-shell .main .journal-post,
  .app-shell .main .journal-client,
  .app-shell .main .journal-vehicle {
    display: block;
    grid-area: auto;
    align-self: center;
  }

  .app-shell .main .journal-status-pill {
    display: inline-flex;
    grid-area: auto;
  }

  .app-shell .main .journal-mobile-meta {
    display: none;
  }

  .app-shell .main .journal-actions {
    grid-area: auto;
    align-self: center;
  }
}

@media (max-width: 430px) {
  .app-shell .main .card:not(.calendar-control-card),
  .app-shell .main .crud-panel {
    padding: 12px;
  }

  .app-shell .main .metric {
    min-height: 88px;
  }
}

.service-version-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f8fb;
}

.service-version-list dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.service-version-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 850;
}

.service-action {
  width: 100%;
}

.service-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 14px;
  line-height: 1.35;
}

.service-hint {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

/* Address Book CRM redesign */
.crm-address-page {
  display: grid;
  gap: 0;
  margin: -24px -24px 0;
  color: #141b2d;
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8fb 100%);
  min-height: calc(100vh - 36px);
}

.crm-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(213, 219, 230, 0.9);
  backdrop-filter: blur(16px);
}

.crm-brand,
.crm-top-actions,
.crm-expanded-person,
.crm-pagination-actions {
  display: flex;
  align-items: center;
}

.crm-brand {
  min-width: 0;
  gap: 18px;
  color: #10182b;
  font-size: 17px;
  line-height: 22px;
  font-weight: 900;
}

.crm-brand-mark,
.crm-user-chip {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2d73ff, #785df4);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(50, 103, 230, 0.22);
}

.crm-user-chip {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f1f4f9;
  color: #526072;
  box-shadow: none;
}

.crm-divider {
  width: 1px;
  height: 28px;
  background: #d9e0eb;
}

.crm-tab {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  position: relative;
  color: #2f6df6;
  font-size: 15px;
}

.crm-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  border-radius: 999px;
  background: #2f6df6;
}

.crm-top-actions {
  gap: 12px;
}

.crm-add-client-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid #dce3ef;
  border-radius: 9px;
  background: #fff;
  color: #2e3950;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(32, 44, 72, 0.05);
}

.crm-add-client-btn span {
  color: #2f6df6;
  font-size: 21px;
  line-height: 1;
}

.crm-address-content {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 28px 34px;
}

.crm-page-title h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #111827;
  font-size: 30px;
  line-height: 38px;
  letter-spacing: 0;
}

.crm-page-title h1 span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #657184;
  font-size: 13px;
  line-height: 16px;
  font-weight: 850;
}

.crm-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) auto auto auto auto minmax(170px, auto) auto;
  gap: 10px;
  align-items: center;
}

.crm-search-box {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
}

.crm-search-box input {
  min-width: 0;
  flex: 1;
  height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #1c2638;
  font-size: 14px;
  font-weight: 750;
  box-shadow: none;
}

.crm-search-box input::placeholder {
  color: #8a95a8;
}

.crm-search-box .action-svg,
.crm-filter-btn .action-svg {
  width: 17px;
  height: 17px;
  color: #637187;
}

.crm-status-filters {
  display: inline-flex;
  gap: 8px;
  min-width: max-content;
}

.crm-status-filters button,
.crm-filter-btn,
.crm-sort-select select,
.crm-page-size select {
  min-height: 38px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  color: #39445a;
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.crm-status-filters button {
  padding: 8px 14px;
}

.crm-status-filters button.active {
  border-color: #b9cdfd;
  background: #edf4ff;
  color: #1d5ff2;
}

.crm-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}

.crm-sort-dir-btn {
  min-width: 42px;
  padding-left: 12px;
  padding-right: 12px;
  color: #1d5ff2;
  font-size: 17px;
}

.crm-sort-select,
.crm-page-size {
  margin: 0;
}

.crm-sort-select select,
.crm-page-size select {
  width: 100%;
  padding: 0 34px 0 14px;
}

.crm-client-list {
  display: grid;
  gap: 16px;
}

.crm-client-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(24, 39, 75, 0.08);
}

.crm-client-card.expanded {
  border-color: #d4deec;
  box-shadow: 0 18px 44px rgba(24, 39, 75, 0.11);
}

.crm-client-card .client-directory-row {
  min-height: 74px;
  grid-template-columns: 34px 48px minmax(180px, 1.3fr) minmax(150px, 0.9fr) minmax(108px, auto) 38px;
  gap: 18px;
  padding: 14px 28px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.crm-client-card .client-directory-row:hover {
  background: #fbfdff;
}

.crm-client-index {
  color: #687996;
  font-size: 13px;
  font-weight: 900;
}

.crm-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(145deg, #f0eaff, #e8f0ff);
  color: #7358dc;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
}

.crm-avatar.large {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.crm-avatar.muted {
  background: #eef2f7;
  color: #768299;
}

.crm-avatar i {
  position: absolute;
  right: 3px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #21a85a;
}

.crm-avatar.muted i {
  background: #9aa5b5;
}

.crm-client-identity,
.crm-expanded-person div {
  min-width: 0;
}

.crm-client-identity strong,
.crm-client-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-client-identity strong {
  color: #141b2d;
  font-size: 16px;
  line-height: 21px;
  font-weight: 900;
}

.crm-client-identity small,
.crm-client-phone {
  color: #6b7890;
  font-size: 13px;
  line-height: 18px;
  font-weight: 750;
}

.crm-client-phone {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: max-content;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf8ef;
  color: #238846;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.crm-status-pill.archived {
  background: #f2f4f7;
  color: #6d7788;
}

.crm-status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.crm-client-card .client-row-more {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: transparent;
  color: #53617a;
  font-size: 22px;
}

.crm-client-card .client-expanded-card {
  display: grid;
  gap: 16px;
  padding: 0 28px 20px;
  border-top: 0;
  background: transparent;
}

.crm-expanded-shell {
  overflow: hidden;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.crm-expanded-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
}

.crm-expanded-person {
  gap: 16px;
}

.crm-expanded-person h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 25px;
  letter-spacing: 0;
}

.crm-expanded-person p {
  margin: 4px 0 8px;
  color: #6b7890;
  font-size: 14px;
  font-weight: 750;
}

.crm-expanded-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 0.8fr);
  border-top: 1px solid #e4e9f1;
}

.crm-profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.crm-profile-summary p {
  min-width: 0;
  min-height: 78px;
  padding: 18px 20px;
  border-right: 1px solid #e4e9f1;
  border-bottom: 1px solid #e4e9f1;
}

.crm-profile-summary p:nth-child(2n) {
  border-right: 0;
}

.crm-profile-summary p:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.crm-profile-summary span {
  color: #768299;
  font-size: 13px;
  font-weight: 800;
}

.crm-profile-summary strong {
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  line-height: 20px;
}

.crm-vehicle-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-left: 1px solid #e4e9f1;
}

.crm-vehicle-panel .vehicle-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.crm-vehicle-panel h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #111827;
  font-size: 15px;
  line-height: 20px;
}

.crm-vehicle-panel h3 span,
.crm-client-sections summary small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf1f7;
  color: #637187;
  font-size: 12px;
  font-weight: 900;
}

.crm-empty-vehicle {
  min-height: 128px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #f8fafd;
  color: #7a8699;
  text-align: center;
}

.crm-empty-vehicle .action-svg {
  width: 36px;
  height: 36px;
  color: #b5bfcd;
}

.crm-empty-vehicle p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.crm-client-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.crm-client-sections .client-compact-section {
  overflow: hidden;
  margin: 0;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.crm-client-sections summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.crm-client-sections .client-section-body {
  padding: 0 14px 14px;
}

.crm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid #dfe5ee;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.crm-pagination-actions {
  gap: 10px;
}

.crm-page-btn,
.crm-page-current {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #fff;
  color: #6b7890;
  font-size: 22px;
  font-weight: 800;
}

.crm-page-current {
  border-color: #2f6df6;
  color: #1d5ff2;
  font-size: 14px;
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.08);
}

.crm-page-btn:disabled {
  opacity: 0.42;
}

.crm-address-page .action-icon-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 999px;
  background: #f8fafd;
  border-color: #e0e7f1;
  color: #56647c;
}

.crm-address-page .action-icon-btn:hover {
  background: #eef4ff;
  color: #1d5ff2;
  border-color: #c7d7ff;
}

.crm-address-page .crm-bulk-toggle-btn .crm-bulk-basket-icon {
  width: 22px;
  height: 22px;
  max-width: none;
  display: block;
  object-fit: contain;
  transform: scale(2.05);
  transform-origin: center;
}

@media (max-width: 1180px) {
  .crm-filter-row {
    grid-template-columns: minmax(240px, 1fr) auto auto;
  }

  .crm-client-card .client-directory-row {
    grid-template-columns: 28px 46px minmax(150px, 1fr) minmax(130px, 0.8fr) 38px;
  }

  .crm-client-card .crm-status-pill {
    display: none;
  }
}

@media (max-width: 760px) {
  .crm-address-page {
    margin: -16px -16px 0;
  }

  .crm-topbar,
  .crm-address-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .crm-topbar,
  .crm-pagination,
  .crm-expanded-head {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-brand {
    gap: 12px;
  }

  .crm-filter-row {
    grid-template-columns: 1fr;
  }

  .crm-status-filters {
    flex-wrap: wrap;
    min-width: 0;
  }

  .crm-client-card .client-directory-row {
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 12px;
    padding: 14px;
  }

  .crm-client-index,
  .crm-client-phone,
  .crm-client-card .crm-status-pill {
    display: none;
  }

  .crm-expanded-grid,
  .crm-profile-summary,
  .crm-client-sections {
    grid-template-columns: 1fr;
  }

  .crm-profile-summary p,
  .crm-profile-summary p:nth-child(2n),
  .crm-profile-summary p:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #e4e9f1;
  }

  .crm-vehicle-panel {
    border-left: 0;
    border-top: 1px solid #e4e9f1;
  }

  .crm-client-card .client-expanded-card {
    padding: 0 14px 16px;
  }
}

/* Address Book card precision pass */
.crm-address-content {
  max-width: 1180px;
  gap: 16px;
}

.crm-client-list {
  gap: 14px;
}

.crm-client-card {
  border-color: #dfe6f0;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

.crm-client-card.expanded {
  border-color: #dfe6f0;
  box-shadow: none;
}

.crm-client-card .client-directory-row {
  min-height: 58px;
  grid-template-columns: 44px minmax(132px, 0.72fr) minmax(150px, 1fr) minmax(86px, auto) 28px;
  gap: 18px;
  padding: 8px 20px;
  cursor: pointer;
}

.crm-client-card.expanded .client-directory-row {
  min-height: 70px;
  padding: 10px 156px 10px 20px;
}

.crm-client-index {
  display: none;
}

.crm-client-card .crm-avatar {
  grid-column: 1;
  width: 38px;
  height: 38px;
  font-size: 14px;
  background: #eee9ff;
  color: #7659dc;
}

.crm-client-card:nth-child(3n) .crm-avatar {
  background: #e8f7ee;
  color: #239350;
}

.crm-avatar i {
  right: 0;
  bottom: 3px;
  width: 8px;
  height: 8px;
}

.crm-client-identity {
  grid-column: 2;
}

.crm-client-identity strong {
  font-size: 15px;
  line-height: 19px;
  font-weight: 850;
}

.crm-client-identity small {
  margin-top: 2px;
  font-size: 13px;
  line-height: 17px;
}

.crm-client-phone {
  grid-column: 3;
  justify-self: start;
  color: #6c7a92;
  font-size: 13px;
  font-weight: 750;
}

.crm-client-card .crm-status-pill {
  grid-column: 4;
  justify-self: end;
  min-height: 20px;
  padding: 3px 9px;
  gap: 6px;
  font-size: 11px;
  line-height: 14px;
}

.crm-client-card .crm-status-pill i {
  width: 6px;
  height: 6px;
}

.crm-client-card .client-row-more {
  grid-column: 5;
  justify-self: end;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  color: #51617a;
  font-size: 18px;
}

.crm-card-floating-actions {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-card-floating-actions .action-icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 12px;
  background: #fff;
}

.crm-client-card .client-expanded-card {
  gap: 14px;
  padding: 0 20px 18px;
}

.crm-expanded-shell {
  border-color: #e1e7f0;
  border-radius: 8px;
  background: #fff;
}

.crm-expanded-grid {
  grid-template-columns: minmax(360px, 1.42fr) minmax(280px, 0.88fr);
  border-top: 0;
}

.crm-profile-summary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 150px;
}

.crm-profile-summary p {
  min-height: 74px;
  padding: 18px 20px;
  border-color: #e6ebf2;
}

.crm-profile-summary span {
  font-size: 12px;
  line-height: 16px;
  font-weight: 780;
}

.crm-profile-summary strong {
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.crm-vehicle-panel {
  padding: 18px 20px 14px;
  border-left-color: #e6ebf2;
}

.crm-vehicle-panel h3 {
  font-size: 14px;
}

.crm-vehicle-panel h3 span,
.crm-client-sections summary small {
  min-width: 22px;
  height: 20px;
  font-size: 11px;
}

.crm-vehicle-panel .btn-add-compact {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 9px;
}

.crm-empty-vehicle {
  min-height: 96px;
  border-radius: 8px;
  background: #f8fafc;
}

.crm-empty-vehicle .action-svg {
  width: 30px;
  height: 30px;
}

.crm-client-sections {
  gap: 12px;
}

.crm-client-sections .client-compact-section {
  border-color: #e1e7f0;
  border-radius: 8px;
}

.crm-client-sections summary {
  min-height: 46px;
  padding: 10px 16px;
  font-size: 14px;
}

.crm-client-sections summary::after {
  content: "⌄";
  margin-left: auto;
  color: #53617a;
  font-size: 17px;
  font-weight: 900;
}

.crm-client-sections details[open] summary::after {
  content: "⌃";
}

.crm-client-sections summary::-webkit-details-marker {
  display: none;
}

.crm-client-sections summary::marker {
  content: "";
}

@media (max-width: 1180px) {
  .crm-client-card .client-directory-row {
    grid-template-columns: 44px minmax(132px, 1fr) minmax(130px, 0.9fr) minmax(80px, auto) 28px;
  }

  .crm-client-card .crm-status-pill {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  .crm-client-card .client-directory-row,
  .crm-client-card.expanded .client-directory-row {
    min-height: 64px;
    grid-template-columns: 40px minmax(0, 1fr) 28px;
    padding: 10px 14px;
  }

  .crm-client-phone,
  .crm-client-card .crm-status-pill {
    display: none;
  }

  .crm-card-floating-actions {
    position: static;
    justify-content: flex-end;
    padding: 0 14px 10px;
  }

  .crm-card-floating-actions .action-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .crm-expanded-grid {
    grid-template-columns: 1fr;
  }

  .crm-profile-summary {
    grid-template-columns: 1fr;
  }
}

/* Address Book final compact accordion pass */
.app-shell .main .crm-address-page {
  margin: -16px -16px 0;
  min-height: calc(100vh - 16px);
  background: #f6f8fb;
}

.app-shell .main .crm-topbar {
  min-height: 58px;
  padding: 10px 22px;
}

.app-shell .main .crm-brand {
  gap: 12px;
  font-size: 16px;
}

.app-shell .main .crm-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.app-shell .main .crm-tab.active::after {
  bottom: -12px;
}

.app-shell .main .crm-add-client-btn {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 12px;
}

.app-shell .main .crm-user-chip {
  width: 34px;
  height: 34px;
}

.app-shell .main .crm-address-content {
  max-width: none;
  padding: 18px 22px 28px;
  gap: 14px;
}

.app-shell .main .crm-page-title h1 {
  font-size: 24px;
  line-height: 30px;
}

.app-shell .main .crm-page-title h1 span {
  min-height: 22px;
  padding: 3px 9px;
  font-size: 12px;
}

.app-shell .main .crm-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.app-shell .main .crm-search-box {
  flex: 1 1 250px;
  min-height: 38px;
  border-radius: 12px;
}

.app-shell .main .crm-status-filters {
  flex: 0 0 auto;
  gap: 7px;
  min-width: 0;
}

.app-shell .main .crm-status-filters button,
.app-shell .main .crm-filter-btn,
.app-shell .main .crm-sort-select select,
.app-shell .main .crm-page-size select {
  min-height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

.app-shell .main .crm-filter-btn {
  flex: 0 1 auto;
  padding: 7px 12px;
}

.app-shell .main .crm-sort-select {
  flex: 0 0 160px;
}

.app-shell .main .crm-sort-dir-btn {
  flex: 0 0 44px;
  min-width: 44px;
  padding: 0;
}

.app-shell .main .crm-client-list {
  gap: 12px;
}

.app-shell .main .crm-client-card {
  border: 1px solid #dfe6f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.app-shell .main .crm-client-card.expanded {
  box-shadow: 0 8px 20px rgba(24, 39, 75, 0.06);
}

.app-shell .main .crm-client-card .client-directory-row,
.app-shell .main .crm-client-card.expanded .client-directory-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(150px, 1fr) minmax(132px, auto) auto 34px;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.app-shell .main .crm-client-card .client-directory-row:hover {
  background: #fbfdff;
}

.app-shell .main .crm-client-index {
  display: none;
}

.app-shell .main .crm-client-card .crm-avatar {
  grid-column: 1;
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.app-shell .main .crm-client-identity {
  grid-column: 2;
  min-width: 0;
}

.app-shell .main .crm-client-identity strong {
  font-size: 15px;
  line-height: 19px;
  font-weight: 850;
}

.app-shell .main .crm-client-identity small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 13px;
  line-height: 17px;
}

.app-shell .main .crm-row-number {
  color: #94a0b3;
  font-size: 11px;
  font-weight: 850;
}

.app-shell .main .crm-client-phone {
  grid-column: 3;
  justify-self: start;
  max-width: 190px;
  font-size: 13px;
}

.app-shell .main .crm-client-card .crm-status-pill {
  grid-column: 4;
  justify-self: end;
  min-height: 22px;
  padding: 3px 9px;
  font-size: 11px;
}

.app-shell .main .crm-client-card .client-row-more {
  grid-column: 5;
  justify-self: end;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 18px;
}

.app-shell .main .crm-client-card .client-expanded-card {
  padding: 0 16px 14px;
  gap: 12px;
}

.app-shell .main .crm-card-floating-actions {
  position: absolute;
  top: 16px;
  right: 56px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-shell .main .crm-card-floating-actions .action-icon-btn,
.app-shell .main .crm-action-menu summary.action-icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 12px;
  background: #fff;
  border-color: #dfe7f2;
  color: #506078;
  box-shadow: none;
}

.app-shell .main .crm-action-menu {
  position: relative;
}

.app-shell .main .crm-action-menu summary {
  list-style: none;
  cursor: pointer;
}

.app-shell .main .crm-action-menu summary::-webkit-details-marker {
  display: none;
}

.app-shell .main .crm-action-menu-popover {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 38px);
  gap: 6px;
  padding: 8px;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.app-shell .main .crm-expanded-shell {
  border-color: #e2e8f1;
  border-radius: 12px;
  background: #fff;
}

.app-shell .main .crm-expanded-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(230px, 0.85fr);
  border-top: 0;
}

.app-shell .main .crm-profile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 140px;
  margin: 0;
}

.app-shell .main .crm-profile-summary p {
  min-height: 68px;
  padding: 16px 18px;
  border-color: #e7edf5;
}

.app-shell .main .crm-profile-summary span {
  font-size: 12px;
  line-height: 16px;
}

.app-shell .main .crm-profile-summary strong {
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
}

.app-shell .main .crm-vehicle-panel {
  gap: 10px;
  padding: 16px 18px;
  border-left-color: #e7edf5;
}

.app-shell .main .crm-vehicle-panel h3 {
  font-size: 14px;
  line-height: 18px;
}

.app-shell .main .crm-vehicle-panel .btn-add-compact {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 10px;
}

.app-shell .main .crm-empty-vehicle {
  min-height: 94px;
  border-radius: 10px;
}

.app-shell .main .crm-client-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.app-shell .main .crm-client-sections .client-compact-section {
  border-radius: 12px;
}

.app-shell .main .crm-client-sections summary {
  min-height: 46px;
  padding: 10px 14px;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .app-shell .main .crm-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .app-shell .main .crm-search-box,
  .app-shell .main .crm-status-filters,
  .app-shell .main .crm-sort-select {
    grid-column: auto;
    width: 100%;
  }

  .app-shell .main .crm-status-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .app-shell .main .crm-client-card .client-directory-row,
  .app-shell .main .crm-client-card.expanded .client-directory-row {
    grid-template-columns: 42px minmax(120px, 1fr) minmax(118px, auto) auto 34px;
    gap: 12px;
    padding: 10px 14px;
  }

  .app-shell .main .crm-card-floating-actions {
    right: 50px;
  }

  .app-shell .main .crm-expanded-grid {
    grid-template-columns: 1fr;
  }

  .app-shell .main .crm-vehicle-panel {
    border-left: 0;
    border-top: 1px solid #e7edf5;
  }
}

@media (max-width: 700px) {
  .app-shell .main .crm-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell .main .crm-filter-row {
    grid-template-columns: 1fr;
  }

  .app-shell .main .crm-client-card .client-directory-row,
  .app-shell .main .crm-client-card.expanded .client-directory-row {
    min-height: 66px;
    grid-template-columns: 40px minmax(0, 1fr) 34px;
  }

  .app-shell .main .crm-client-phone,
  .app-shell .main .crm-client-card .crm-status-pill {
    display: none;
  }

  .app-shell .main .crm-card-floating-actions {
    position: static;
    justify-content: flex-end;
    padding: 0 14px 10px;
  }

  .app-shell .main .crm-card-floating-actions .action-icon-btn,
  .app-shell .main .crm-action-menu summary.action-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .app-shell .main .crm-profile-summary,
  .app-shell .main .crm-client-sections {
    grid-template-columns: 1fr;
  }

  .app-shell .main .crm-profile-summary p,
  .app-shell .main .crm-profile-summary p:nth-child(2n),
  .app-shell .main .crm-profile-summary p:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #e7edf5;
  }

  .app-shell .main .crm-pagination {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Address Book density correction */
.app-shell .main .crm-address-page {
  display: block;
  margin: -12px -12px 0;
  min-height: auto;
  background: var(--bg);
}

.app-shell .main .crm-topbar {
  min-height: 52px;
  height: 52px;
  flex-wrap: nowrap;
  padding: 8px 18px;
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.app-shell .main .crm-brand {
  gap: 10px;
  font-size: 15px;
  line-height: 20px;
}

.app-shell .main .crm-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.app-shell .main .crm-divider {
  height: 24px;
}

.app-shell .main .crm-tab.active::after {
  bottom: -9px;
}

.app-shell .main .crm-top-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.app-shell .main .crm-add-client-btn {
  min-height: 34px;
  height: 34px;
  padding: 6px 12px;
  border-color: var(--border);
  border-radius: 11px;
  color: var(--text);
  box-shadow: none;
}

.app-shell .main .crm-user-chip {
  width: 32px;
  height: 32px;
}

.app-shell .main .crm-address-content {
  display: flex;
  flex-direction: column;
  align-content: flex-start;
  justify-content: flex-start;
  height: auto;
  padding: 14px 18px 22px;
  gap: 10px;
}

.app-shell .main .crm-page-title {
  height: auto;
}

.app-shell .main .crm-page-title h1 {
  font-size: 22px;
  line-height: 28px;
}

.app-shell .main .crm-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.app-shell .main .crm-search-box {
  flex: 0 1 230px;
  min-height: 36px;
  height: 36px;
  border-color: var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.app-shell .main .crm-search-box input {
  height: 34px;
  min-height: 34px;
  font-size: 13px;
}

.app-shell .main .crm-status-filters {
  gap: 6px;
}

.app-shell .main .crm-status-filters button,
.app-shell .main .crm-filter-btn,
.app-shell .main .crm-sort-select select,
.app-shell .main .crm-page-size select {
  min-height: 34px;
  height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  border-color: var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  line-height: 16px;
  box-shadow: none;
}

.app-shell .main .crm-status-filters button {
  padding-left: 10px;
  padding-right: 10px;
}

.app-shell .main .crm-status-filters button.active {
  border-color: rgba(63, 99, 244, 0.38);
  background: rgba(63, 99, 244, 0.08);
  color: var(--primary);
}

.app-shell .main .crm-filter-btn {
  flex: 0 0 auto;
  padding-left: 9px;
  padding-right: 9px;
}

.app-shell .main .crm-sort-select {
  flex: 0 0 128px;
}

.app-shell .main .crm-sort-select select {
  padding-left: 12px;
  padding-right: 28px;
}

.app-shell .main .crm-sort-dir-btn {
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.app-shell .main .crm-client-list {
  gap: 8px;
}

.app-shell .main .crm-address-page #crmClientList > .muted {
  box-sizing: border-box;
  width: 100%;
  padding-left: 14px;
}

.app-shell .main .crm-client-card {
  border-color: var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
}

.app-shell .main .crm-client-card.expanded {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.app-shell .main .crm-client-card .client-directory-row,
.app-shell .main .crm-client-card.expanded .client-directory-row {
  min-height: 58px;
  grid-template-columns: 34px minmax(150px, 1fr) minmax(116px, auto) auto 28px;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 14px;
}

.app-shell .main .crm-client-card .crm-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.app-shell .main .crm-avatar i {
  right: -1px;
  bottom: 2px;
  width: 7px;
  height: 7px;
}

.app-shell .main .crm-client-identity strong {
  font-size: 14px;
  line-height: 18px;
}

.app-shell .main .crm-client-identity small {
  gap: 5px;
  margin-top: 1px;
  font-size: 12px;
  line-height: 16px;
}

.app-shell .main .crm-client-phone {
  max-width: 168px;
  font-size: 12px;
}

.app-shell .main .crm-client-card .crm-status-pill {
  min-height: 19px;
  padding: 2px 8px;
  gap: 5px;
  font-size: 10px;
  line-height: 14px;
}

.app-shell .main .crm-client-card .client-row-more {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  font-size: 16px;
}

.app-shell .main .crm-client-card .client-expanded-card {
  padding: 0 12px 12px;
  gap: 8px;
}

.app-shell .main .crm-card-floating-actions {
  top: 11px;
  right: 44px;
  gap: 6px;
}

.app-shell .main .crm-card-floating-actions .action-icon-btn,
.app-shell .main .crm-action-menu summary.action-icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-color: var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.app-shell .main .crm-action-menu-popover {
  top: 38px;
  grid-template-columns: repeat(3, 34px);
  gap: 5px;
  padding: 6px;
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.app-shell .main .crm-expanded-shell {
  border-color: var(--border);
  border-radius: 12px;
}

.app-shell .main .crm-expanded-grid {
  grid-template-columns: minmax(300px, 1.35fr) minmax(220px, 0.75fr);
}

.app-shell .main .crm-profile-summary {
  min-height: 112px;
}

.app-shell .main .crm-profile-summary p {
  min-height: 54px;
  padding: 11px 14px;
  border-color: var(--border);
}

.app-shell .main .crm-profile-summary span {
  font-size: 11px;
  line-height: 14px;
  color: var(--muted);
}

.app-shell .main .crm-profile-summary strong {
  margin-top: 2px;
  font-size: 13px;
  line-height: 17px;
  color: var(--text);
}

.app-shell .main .crm-vehicle-panel {
  gap: 8px;
  padding: 12px 14px;
  border-left-color: var(--border);
}

.app-shell .main .crm-vehicle-panel .vehicle-section-head {
  gap: 8px;
}

.app-shell .main .crm-vehicle-panel h3 {
  font-size: 13px;
  line-height: 17px;
}

.app-shell .main .crm-vehicle-panel h3 span,
.app-shell .main .crm-client-sections summary small {
  min-width: 20px;
  height: 18px;
  font-size: 10px;
}

.app-shell .main .crm-vehicle-panel .btn-add-compact {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-color: var(--border);
}

.app-shell .main .crm-empty-vehicle {
  min-height: 72px;
  padding: 10px;
  border-color: var(--border);
  background: var(--surface-soft, #f8faff);
}

.app-shell .main .crm-empty-vehicle .action-svg {
  width: 24px;
  height: 24px;
}

.app-shell .main .crm-empty-vehicle p {
  font-size: 12px;
}

.app-shell .main .crm-client-sections {
  gap: 8px;
}

.app-shell .main .crm-client-sections .client-compact-section {
  border-color: var(--border);
  border-radius: 11px;
}

.app-shell .main .crm-client-sections summary {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 18px;
}

.app-shell .main .crm-pagination {
  padding-top: 10px;
  font-size: 12px;
}

.app-shell .main .crm-page-btn,
.app-shell .main .crm-page-current {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-color: var(--border);
  border-radius: 10px;
}

@media (max-width: 1120px) {
  .app-shell .main .crm-filter-row {
    display: flex;
    flex-wrap: wrap;
  }

  .app-shell .main .crm-search-box {
    flex: 1 1 260px;
    width: auto;
  }

  .app-shell .main .crm-status-filters {
    display: flex;
    width: auto;
  }

  .app-shell .main .crm-sort-select {
    width: auto;
  }

  .app-shell .main .crm-sort-dir-btn {
    justify-self: auto;
  }

  .app-shell .main .crm-expanded-grid {
    grid-template-columns: minmax(260px, 1.15fr) minmax(210px, 0.85fr);
  }

  .app-shell .main .crm-vehicle-panel {
    border-left: 1px solid var(--border);
    border-top: 0;
  }
}

@media (max-width: 700px) {
  .app-shell .main .crm-address-page {
    margin: -10px -10px 0;
  }

  .app-shell .main .crm-topbar {
    height: auto;
    min-height: 52px;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
  }

  .app-shell .main .crm-brand {
    gap: 8px;
  }

  .app-shell .main .crm-brand strong,
  .app-shell .main .crm-divider,
  .app-shell .main .crm-tab {
    display: none;
  }

  .app-shell .main .crm-top-actions {
    margin-left: auto;
  }

  .app-shell .main .crm-add-client-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 0;
  }

  .app-shell .main .crm-add-client-btn span {
    font-size: 22px;
  }

  .app-shell .main .crm-address-content {
    padding: 12px 12px 18px;
    gap: 9px;
  }

  .app-shell .main .crm-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .app-shell .main .crm-search-box,
  .app-shell .main .crm-status-filters button,
  .app-shell .main .crm-filter-btn,
  .app-shell .main .crm-sort-select select,
  .app-shell .main .crm-page-size select {
    min-height: 44px;
    height: 44px;
  }

  .app-shell .main .crm-status-filters {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .app-shell .main .crm-search-box {
    grid-column: 1 / -1;
    width: 100%;
  }

  .app-shell .main .crm-filter-btn,
  .app-shell .main .crm-sort-select {
    width: 100%;
  }

  .app-shell .main .crm-sort-dir-btn {
    width: 44px;
    min-width: 44px;
    justify-self: start;
  }

  .app-shell .main .crm-client-card .client-directory-row,
  .app-shell .main .crm-client-card.expanded .client-directory-row {
    min-height: 58px;
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    gap: 9px;
    padding: 8px 10px;
  }

  .app-shell .main .crm-client-card .crm-avatar {
    width: 32px;
    height: 32px;
  }

  .app-shell .main .crm-card-floating-actions {
    position: static;
    justify-content: flex-end;
    padding: 0 10px 8px;
    gap: 6px;
  }

  .app-shell .main .crm-card-floating-actions .action-icon-btn,
  .app-shell .main .crm-action-menu summary.action-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .app-shell .main .crm-expanded-grid,
  .app-shell .main .crm-profile-summary,
  .app-shell .main .crm-client-sections {
    grid-template-columns: 1fr;
  }

  .app-shell .main .crm-profile-summary {
    min-height: 0;
  }

  .app-shell .main .crm-profile-summary p {
    min-height: 50px;
    padding: 9px 12px;
  }

  .app-shell .main .crm-vehicle-panel {
    padding: 10px 12px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .app-shell .main .crm-empty-vehicle {
    min-height: 60px;
  }

  .app-shell .main .crm-client-sections summary {
    min-height: 44px;
  }
}

/* Address Book expanded card polish */
.app-shell .main .crm-client-card .client-expanded-card {
  padding: 0 12px 10px;
  gap: 6px;
  background: transparent;
}

.app-shell .main .crm-card-floating-actions {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 34px;
  padding: 0 2px 4px;
  margin-top: -38px;
  margin-right: 38px;
  pointer-events: none;
}

.app-shell .main .crm-card-floating-actions > * {
  pointer-events: auto;
}

.app-shell .main .crm-card-floating-actions .action-icon-btn,
.app-shell .main .crm-action-menu summary.action-icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  box-shadow: none;
}

.app-shell .main .crm-expanded-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.app-shell .main .crm-expanded-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  align-items: stretch;
  gap: 0;
}

.app-shell .main .crm-profile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  min-height: 0;
  margin: 0;
  padding: 10px 12px;
  column-gap: 18px;
  row-gap: 6px;
}

.app-shell .main .crm-profile-summary p,
.app-shell .main .crm-profile-summary p:nth-child(2n),
.app-shell .main .crm-profile-summary p:nth-last-child(-n + 2) {
  display: grid;
  gap: 2px;
  min-height: 0;
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.app-shell .main .crm-profile-summary p:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.app-shell .main .crm-profile-summary span {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 760;
}

.app-shell .main .crm-profile-summary strong {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 17px;
  font-weight: 820;
}

.app-shell .main .crm-vehicle-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px 12px;
  border-left: 1px solid var(--border);
}

.app-shell .main .crm-vehicle-panel .vehicle-section-head {
  min-height: 30px;
  gap: 8px;
}

.app-shell .main .crm-vehicle-panel h3 {
  margin: 0;
  font-size: 13px;
  line-height: 17px;
  font-weight: 850;
}

.app-shell .main .crm-vehicle-panel h3 span,
.app-shell .main .crm-client-sections summary small {
  min-width: 19px;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
}

.app-shell .main .crm-vehicle-panel .btn-add-compact {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 10px;
}

.app-shell .main .crm-empty-vehicle {
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8faff;
}

.app-shell .main .crm-empty-vehicle .action-svg {
  width: 22px;
  height: 22px;
}

.app-shell .main .crm-empty-vehicle p {
  font-size: 12px;
  line-height: 16px;
}

.app-shell .main .crm-client-sections {
  gap: 8px;
}

.app-shell .main .crm-client-sections .client-compact-section {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.app-shell .main .crm-client-sections summary {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 18px;
}

@media (max-width: 1120px) {
  .app-shell .main .crm-card-floating-actions {
    margin-top: 0;
    margin-right: 0;
    padding: 0 2px 6px;
  }

  .app-shell .main .crm-expanded-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(210px, 0.9fr);
  }
}

@media (max-width: 700px) {
  .app-shell .main .crm-card-floating-actions {
    justify-content: flex-end;
    min-height: 44px;
    padding: 0 10px 6px;
  }

  .app-shell .main .crm-card-floating-actions .action-icon-btn,
  .app-shell .main .crm-action-menu summary.action-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .app-shell .main .crm-expanded-grid,
  .app-shell .main .crm-profile-summary,
  .app-shell .main .crm-client-sections {
    grid-template-columns: 1fr;
  }

  .app-shell .main .crm-profile-summary {
    padding: 8px 12px;
    row-gap: 2px;
  }

  .app-shell .main .crm-profile-summary p,
  .app-shell .main .crm-profile-summary p:nth-child(2n),
  .app-shell .main .crm-profile-summary p:nth-last-child(-n + 2) {
    min-height: 0;
    padding: 6px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  }

  .app-shell .main .crm-profile-summary p:last-child {
    border-bottom: 0;
  }

  .app-shell .main .crm-vehicle-panel {
    padding: 8px 12px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (min-width: 761px) {
  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row,
  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row:hover,
  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row:focus {
    grid-template-columns: 34px 24px minmax(0, 1fr) minmax(0, 1fr) 96px !important;
    grid-auto-rows: 28px !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 3px 10px !important;
    gap: 5px !important;
    align-items: center !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-index {
    height: 28px !important;
    padding-right: 8px !important;
    font-size: 13px !important;
    line-height: 16px !important;
    align-self: center !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-status-avatar,
  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-avatar {
    align-self: center !important;
    justify-self: center !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-status-avatar::after,
  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-avatar::after {
    display: none !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-status-avatar .status-avatar-svg {
    width: 19px !important;
    height: 19px !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-identity {
    height: 28px !important;
    padding-left: 4px !important;
    padding-right: 12px !important;
    align-items: center !important;
    align-self: center !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-identity strong {
    font-size: 13px !important;
    line-height: 16px !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .crm-client-phone {
    height: 28px !important;
    padding-left: 14px !important;
    font-size: 13px !important;
    line-height: 16px !important;
    align-items: center !important;
    align-self: center !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .client-row-more {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    place-self: center end !important;
  }

  .app-shell .main .crm-address-page #crmClientList.crm-client-list .crm-client-card .client-directory-row > .client-row-more .action-svg {
    width: 13px !important;
    height: 13px !important;
  }
}

/* Journal C/D final cascade guard. Keep this after legacy staff/address-book rules. */
.app-shell .main {
  overflow-x: clip;
}

.app-shell .main .journal-page-title,
.app-shell .main .journal-filter-row,
.app-shell .main .booking-journal.journal-compact-page,
.app-shell .main .journal-summary-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.app-shell .main .journal-page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  align-items: start;
  gap: 24px;
  margin: 0 0 16px;
}

.app-shell .main .journal-page-title h1 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  color: #0f172a;
}

.app-shell .main .journal-page-title .muted {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.app-shell .main .journal-count-pill {
  min-width: 28px;
  min-height: 28px;
  padding: 2px 9px;
  border-color: rgba(36, 107, 253, 0.18);
  border-radius: 14px;
  background: #eaf1ff;
  color: #246bfd;
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
}

.app-shell .main .journal-page-title .journal-segmented-filter {
  justify-self: end;
  width: min(430px, 100%);
}

.app-shell .main .journal-filter-row {
  display: grid;
  grid-template-columns: minmax(360px, 620px) 164px;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
}

.app-shell .main .journal-search-box,
.app-shell .main .journal-post-filter {
  min-height: 52px;
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.app-shell .main .journal-search-box {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.app-shell .main .journal-search-box input {
  min-height: 50px;
  font-size: 14px;
  line-height: 20px;
}

.app-shell .main .journal-post-filter {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
}

.app-shell .main .journal-post-filter select {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  outline: none;
}

.app-shell .main .journal-segmented-filter {
  min-height: 46px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
}

.app-shell .main .journal-segmented-filter button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.app-shell .main .journal-segmented-filter button.active {
  background: #eef4ff;
  color: #246bfd;
  font-weight: 700;
  box-shadow: none;
}

.app-shell .main .journal-head,
.app-shell .main .journal-row.journal-compact-row {
  grid-template-columns: 128px minmax(178px, 1.25fr) minmax(64px, 0.42fr) minmax(0, 0.9fr) 58px 72px;
  gap: 10px;
}

.app-shell .main .journal-head {
  display: grid;
  padding: 0 24px;
  color: #64748b;
  font-size: 13px;
  line-height: 17px;
  font-weight: 700;
}

.app-shell .main .journal-head > span {
  min-width: 0;
  justify-self: center;
  text-align: center;
}

.app-shell .main .journal-row.journal-compact-row {
  min-height: 64.6px;
  padding: 9px 12px;
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.app-shell .main .journal-row.journal-compact-row:hover {
  border-color: rgba(36, 107, 253, 0.24);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
  transform: none;
}

.app-shell .main .journal-row.journal-compact-row > .journal-post,
.app-shell .main .journal-row.journal-compact-row > .journal-client,
.app-shell .main .journal-row.journal-compact-row > .journal-service,
.app-shell .main .journal-row.journal-compact-row > .journal-duration,
.app-shell .main .journal-row.journal-compact-row > .journal-actions {
  position: relative;
  padding-left: 10px;
}

.app-shell .main .journal-row.journal-compact-row > .journal-actions {
  padding-left: 0;
}

.app-shell .main .journal-row.journal-compact-row > .journal-post::before,
.app-shell .main .journal-row.journal-compact-row > .journal-client::before,
.app-shell .main .journal-row.journal-compact-row > .journal-service::before,
.app-shell .main .journal-row.journal-compact-row > .journal-duration::before,
.app-shell .main .journal-row.journal-compact-row > .journal-actions::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: #e2e8f0;
}

.app-shell .main .journal-row.journal-compact-row > .journal-post {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.app-shell .main .journal-time-block,
.app-shell .main .journal-client,
.app-shell .main .journal-service {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.app-shell .main .journal-time-block {
  gap: 8px;
}

.app-shell .main .journal-time-block > span:last-child,
.app-shell .main .journal-client > span:last-child,
.app-shell .main .journal-service > span:last-child,
.app-shell .main .journal-post {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.app-shell .main .journal-time-block strong,
.app-shell .main .journal-client strong,
.app-shell .main .journal-service strong,
.app-shell .main .journal-post strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  line-height: 19px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .journal-time-block small,
.app-shell .main .journal-client small,
.app-shell .main .journal-service small,
.app-shell .main .journal-post small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 15px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .journal-post-meta {
  min-width: 0;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.app-shell .main .journal-post-status {
  width: auto;
  min-width: 30px;
  height: 18px;
  max-height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 7px;
}

.app-shell .main .journal-post-status .action-svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.3;
}

.app-shell .main .journal-post-status.work {
  border-color: rgba(22, 163, 74, 0.18);
  background: #dcfce7;
  color: #16a34a;
}

.app-shell .main .journal-post-status.waiting {
  border-color: rgba(245, 158, 11, 0.2);
  background: #fef3c7;
  color: #f59e0b;
}

.app-shell .main .journal-post-status.done {
  border-color: rgba(100, 116, 139, 0.16);
  background: #f1f5fb;
  color: #64748b;
}

.app-shell .main .journal-post-status.cancelled {
  border-color: rgba(239, 68, 68, 0.18);
  background: #fee2e2;
  color: #ef4444;
}

.app-shell .main .journal-row-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f1f5fb;
  color: #64748b;
}

.app-shell .main .journal-row-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell .main .journal-row-icon.service {
  background: #eef4ff;
  color: #246bfd;
}

.app-shell .main .journal-duration {
  color: #0f172a;
  font-size: 13px;
  line-height: 19px;
  font-weight: 650;
}

.app-shell .main .journal-status-pill {
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.app-shell .main .journal-status-pill.status-in_progress,
.app-shell .main .journal-status-pill.status-viewed_by_admin {
  border-color: rgba(36, 107, 253, 0.22);
  background: #eef4ff;
  color: #246bfd;
}

.app-shell .main .journal-status-pill.status-cancelled,
.app-shell .main .journal-status-pill.status-auto_cancelled,
.app-shell .main .journal-status-pill.status-no_show {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fee2e2;
  color: #ef4444;
}

.app-shell .main .journal-actions {
  gap: 0;
  justify-content: center;
  min-width: 0;
}

.app-shell .main .journal-icon-btn,
.app-shell .main .journal-open-proxy {
  position: static;
  right: auto;
  transform: none;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  border-color: #d9e2f1;
  border-radius: 12px;
  background: #f8fafc;
  color: #246bfd;
}

.app-shell .main .journal-open-proxy {
  background: #eef4ff;
}

.app-shell .main .journal-summary-panel {
  min-height: 82px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  margin-top: clamp(28px, 12vh, 220px);
  padding: 14px 18px;
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
}

.app-shell .main .journal-summary-card {
  min-height: 54px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 3px;
  padding: 0 18px;
  border-right: 1px solid #e2e8f0;
}

.app-shell .main .journal-summary-card:last-child {
  border-right: 0;
}

.app-shell .main .journal-summary-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #246bfd;
}

.app-shell .main .journal-summary-icon .action-svg {
  width: 20px;
  height: 20px;
}

.app-shell .main .journal-summary-card.work .journal-summary-icon {
  background: #e8f7ed;
  color: #16a34a;
}

.app-shell .main .journal-summary-card.waiting .journal-summary-icon {
  background: #fff3cf;
  color: #f59e0b;
}

.app-shell .main .journal-summary-card.done .journal-summary-icon {
  background: #f1f5f9;
  color: #64748b;
}

.app-shell .main .journal-summary-card.cancelled .journal-summary-icon {
  background: #fee2e2;
  color: #ef4444;
}

.app-shell .main .journal-summary-label {
  align-self: end;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.app-shell .main .journal-summary-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.app-shell .main .journal-summary-count {
  display: grid;
  gap: 1px;
}

.app-shell .main .journal-summary-card small,
.app-shell .main .journal-summary-card em {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-style: normal;
  font-weight: 400;
}

.app-shell .main .journal-summary-card strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 22px;
  font-weight: 700;
}

.app-shell .main .booking-detail-backdrop {
  background: rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(12px);
}

.app-shell .main .booking-detail-drawer {
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(217, 226, 241, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12);
}

.app-shell .main .booking-detail-hero {
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell .main .booking-detail-head h2 {
  color: #0f172a;
  font-size: 26px;
  line-height: 32px;
  font-weight: 750;
}

.app-shell .main .booking-detail-drawer button.btn-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 14px;
}

.app-shell .main .booking-detail-car {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.app-shell .main .booking-detail-car > span {
  width: 32px;
  height: 32px;
}

.app-shell .main .booking-detail-car strong {
  color: #334155;
  font-size: 16px;
  line-height: 22px;
  font-weight: 650;
}

.app-shell .main .booking-detail-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  gap: 7px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.app-shell .main .booking-detail-status.status-cancelled,
.app-shell .main .booking-detail-status.status-auto_cancelled,
.app-shell .main .booking-detail-status.status-no_show {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fee2e2;
  color: #ef4444;
}

.app-shell .main .booking-detail-status-note {
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 18px;
}

.app-shell .main .booking-quick-actions,
.app-shell .main .booking-detail-info,
.app-shell .main .drawer-history-panel {
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.app-shell .main .booking-quick-actions {
  display: grid;
  gap: 10px;
  padding: 12px 16px 14px;
}

.app-shell .main .booking-quick-actions h3,
.app-shell .main .booking-detail-info h3,
.app-shell .main .drawer-history-panel .history-toggle {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

.app-shell .main .booking-detail-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.app-shell .main .booking-drawer-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-color: rgba(148, 163, 184, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 24px rgba(15, 23, 42, 0.04);
}

.app-shell .main .booking-drawer-action.tone-success {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.82));
  color: #16a34a;
}

.app-shell .main .booking-drawer-action.tone-utility {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.84));
  color: #2563eb;
}

.app-shell .main .booking-drawer-action.tone-neutral {
  border-color: rgba(100, 116, 139, 0.38);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.84));
  color: #64748b;
}

.app-shell .main .booking-drawer-action.tone-danger-secondary {
  border-color: rgba(239, 68, 68, 0.36);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.82));
  color: #ef4444;
}

.app-shell .main .booking-drawer-action.tone-danger-primary,
.app-shell .main .booking-drawer-action.pending-delete {
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.94), rgba(255, 241, 242, 0.88));
  color: #ef4444;
}

.app-shell .main .booking-drawer-action:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 28px rgba(15, 23, 42, 0.07);
}

.app-shell .main .booking-drawer-action-icon {
  width: 18px;
  height: 18px;
}

.app-shell .main .booking-detail-info {
  gap: 0;
  overflow: hidden;
  padding-top: 0;
}

.app-shell .main .booking-detail-info h3 {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.app-shell .main .booking-detail-row {
  min-height: 50px;
  grid-template-columns: 32px 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
}

.app-shell .main .booking-detail-row:last-child {
  border-bottom: 0;
}

.app-shell .main .booking-detail-row-icon {
  width: 32px;
  height: 32px;
}

.app-shell .main .booking-detail-row-icon svg {
  width: 18px;
  height: 18px;
}

.app-shell .main .booking-detail-row-label {
  color: #64748b;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.app-shell .main .booking-detail-row strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 20px;
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .drawer-history-panel {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid #d9e2f1;
}

.app-shell .main .drawer-history-panel .history-toggle {
  width: 100%;
  min-height: 48px;
  justify-content: flex-start;
  padding: 0 16px;
}

.app-shell .main .drawer-history-panel .history-list {
  gap: 0;
  padding: 4px 16px 14px;
}

.app-shell .main .drawer-history-panel .history-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  font-size: 13px;
  line-height: 18px;
}

.app-shell .main .drawer-history-panel .history-icon {
  width: 22px;
  height: 22px;
}

.app-shell .main .drawer-history-panel .history-empty {
  min-height: 88px;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
}

@media (max-width: 980px) {
  .app-shell .main .journal-page-title {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .app-shell .main .journal-page-title .journal-segmented-filter {
    justify-self: stretch;
    width: 100%;
  }

  .app-shell .main .journal-filter-row {
    grid-template-columns: minmax(0, 1fr) 156px;
    gap: 10px;
  }

  .app-shell .main .journal-head,
  .app-shell .main .journal-row.journal-compact-row {
    grid-template-columns: 126px minmax(172px, 1.15fr) minmax(60px, 0.4fr) minmax(0, 0.85fr) 56px 70px;
    gap: 8px;
  }

  .app-shell .main .booking-detail-drawer {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(760px, calc(100dvh - 18px));
    padding: 16px;
    border-radius: 24px;
  }
}

@media (max-width: 720px) {
  .app-shell .main .journal-page-title h1 {
    font-size: 24px;
    line-height: 30px;
  }

  .app-shell .main .journal-segmented-filter {
    min-height: 44px;
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(116px, 1fr));
  }

  .app-shell .main .journal-segmented-filter button {
    min-height: 36px;
    font-size: 13px;
  }

  .app-shell .main .journal-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell .main .journal-search-box,
  .app-shell .main .journal-post-filter {
    min-height: 44px;
  }

  .app-shell .main .journal-head {
    display: none;
  }

  .app-shell .main .booking-journal.journal-compact-page {
    gap: 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell .main .journal-row.journal-compact-row {
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-areas:
      "time actions"
      "client actions"
      "meta actions";
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #d9e2f1;
    border-radius: 16px;
  }

  .app-shell .main .journal-row.journal-compact-row > .journal-post,
  .app-shell .main .journal-row.journal-compact-row > .journal-client,
  .app-shell .main .journal-row.journal-compact-row > .journal-service,
  .app-shell .main .journal-row.journal-compact-row > .journal-duration,
  .app-shell .main .journal-row.journal-compact-row > .journal-actions {
    padding-left: 0;
  }

  .app-shell .main .journal-row.journal-compact-row > .journal-post::before,
  .app-shell .main .journal-row.journal-compact-row > .journal-client::before,
  .app-shell .main .journal-row.journal-compact-row > .journal-service::before,
  .app-shell .main .journal-row.journal-compact-row > .journal-duration::before,
  .app-shell .main .journal-row.journal-compact-row > .journal-actions::before {
    display: none;
  }

  .app-shell .main .journal-time-block {
    grid-area: time;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .app-shell .main .journal-time-block .journal-row-icon,
  .app-shell .main .journal-service,
  .app-shell .main .journal-status-pill,
  .app-shell .main .journal-duration {
    display: none;
  }

  .app-shell .main .journal-client {
    grid-area: client;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .app-shell .main .journal-client .journal-row-icon,
  .app-shell .main .journal-post {
    display: none;
  }

  .app-shell .main .journal-mobile-meta {
    display: block;
    grid-area: meta;
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell .main .journal-actions {
    grid-area: actions;
    align-self: center;
  }

  .app-shell .main .journal-summary-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
    padding: 8px;
  }

  .app-shell .main .journal-summary-card {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px;
  }

  .app-shell .main .booking-detail-car {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .app-shell .main .booking-detail-status {
    grid-column: 1 / -1;
  }

  .app-shell .main .booking-detail-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell .main .booking-detail-row {
    grid-template-columns: 32px minmax(84px, auto) minmax(0, 1fr);
  }
}

/* Journal drawer text safety guard: dedupe-friendly layout, overflow and compact grid. */
.app-shell .main .journal-row.journal-compact-row,
.app-shell .main .journal-row.journal-compact-row *,
.app-shell .main .booking-detail-drawer,
.app-shell .main .booking-detail-drawer * {
  box-sizing: border-box;
}

.app-shell .main .journal-time-block,
.app-shell .main .journal-post,
.app-shell .main .journal-client,
.app-shell .main .journal-service,
.app-shell .main .journal-duration,
.app-shell .main .journal-status-pill {
  min-width: 0;
}

.app-shell .main .journal-status-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-head {
  align-items: flex-start;
}

.app-shell .main .booking-detail-head > div {
  min-width: 0;
}

.app-shell .main .booking-detail-head h2 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-car {
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr) max-content;
}

.app-shell .main .booking-detail-car.status-only {
  grid-template-columns: minmax(0, 1fr);
  justify-content: start;
}

.app-shell .main .booking-detail-car > span,
.app-shell .main .booking-detail-car strong {
  min-width: 0;
}

.app-shell .main .booking-detail-car strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-status {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.app-shell .main .booking-detail-status span {
  width: auto;
  height: auto;
  min-width: 0;
  display: inline;
  flex: 0 1 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  place-items: initial;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-status .booking-detail-status-icon,
.app-shell .main .booking-drawer-action-icon {
  flex: 0 0 auto;
}

.app-shell .main .booking-detail-status .booking-detail-status-icon {
  width: 1.05em;
  height: 1.05em;
  max-width: 1.05em;
  max-height: 1.05em;
  object-fit: contain;
}

.app-shell .main .booking-detail-drawer .booking-detail-car-icon {
  width: 80%;
  height: 80%;
}

.app-shell .main .booking-detail-drawer .booking-detail-car-icon,
.app-shell .main .booking-detail-drawer .booking-detail-row-icon svg,
.app-shell .main .booking-detail-drawer .drawer-history-panel .history-icon svg,
.app-shell .main .booking-detail-drawer .drawer-history-panel .history-icon img {
  width: 80%;
  height: 80%;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.app-shell .main .booking-drawer-action {
  min-height: 44px;
  min-width: 0;
  overflow: hidden;
}

.app-shell .main .booking-detail-drawer .booking-drawer-action-icon {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  max-height: 18px;
  object-fit: contain;
}

.app-shell .main .booking-drawer-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-row {
  min-width: 0;
}

.app-shell .main .booking-detail-row-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-row strong {
  max-width: 100%;
}

html body .app-shell .main .booking-detail-drawer .booking-drawer-action {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding-top: 4px;
  padding-bottom: 4px;
}

html body .app-shell .main .booking-detail-drawer .booking-drawer-action-icon {
  width: 20px !important;
  min-width: 0 !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 0 !important;
  max-height: 20px !important;
  aspect-ratio: 1;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

html body .app-shell .main .booking-detail-drawer .booking-drawer-action-icon .action-svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
}

html body .app-shell .main .booking-detail-drawer .booking-drawer-action-icon .booking-drawer-action-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.app-shell .main .booking-detail-row.comment-row {
  min-height: 56px;
  align-items: start;
  padding-top: 10px;
  padding-bottom: 10px;
}

.app-shell .main .booking-detail-row.comment-row .booking-detail-row-icon,
.app-shell .main .booking-detail-row.comment-row .booking-detail-row-label {
  margin-top: 2px;
}

.app-shell .main .booking-detail-row.comment-row strong {
  display: -webkit-box;
  overflow: hidden;
  text-align: right;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.app-shell .main .drawer-history-panel .history-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .app-shell .main .booking-detail-head h2 {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .app-shell .main .booking-detail-car {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .app-shell .main .booking-detail-car.status-only {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell .main .booking-detail-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .app-shell .main .booking-detail-row-label {
    min-width: 76px;
  }
}

/* Primary booking statuses use transparent PNG glyphs; their badge surface stays CSS-driven. */
.app-shell .main .journal-post-status-icon {
  width: 12px;
  height: 12px;
  display: block;
  object-fit: contain;
}

.app-shell .main .calendar-status-pill .calendar-status-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.app-shell .main .booking-detail-status .booking-detail-status-icon {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  display: block;
  object-fit: contain;
}

.app-shell .main .journal-summary-status-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

/* Status color is carried by the transparent PNG and soft CSS surface, without a visible frame. */
.app-shell .main .journal-post-status,
.app-shell .main .calendar-status-pill,
.app-shell .main .booking-detail-status {
  border: 0;
}

/* Statuses retain their color fill and icon, but never draw an outline or inset frame. */
.app-shell .main .journal-post-status,
.app-shell .main .journal-status-pill,
.app-shell .main .calendar-status-pill,
.app-shell .main .booking-detail-status,
.app-shell .main .badge {
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
}

@media (min-width: 721px) {
  .app-shell .main .booking-detail-drawer {
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: auto;
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 16px;
    border-radius: 24px;
  }
}

.app-shell .main .booking-detail-info h3 {
  padding: 11px 14px 9px;
}

.app-shell .main .booking-detail-row {
  min-height: 44px;
  grid-template-columns: 32px minmax(84px, 0.65fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
}

.app-shell .main .booking-detail-row strong {
  grid-column: auto;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .booking-detail-row-label {
  align-self: center;
  font-size: 14px;
  line-height: 18px;
}

.app-shell .main .booking-detail-row.comment-row {
  min-height: 52px;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.app-shell .main .booking-detail-row.comment-row strong {
  grid-column: auto;
  text-align: right;
}

.app-shell .main .journal-post-status.status-pending,
.app-shell .main .journal-post-status.status-pending_admin_confirmation,
.app-shell .main .journal-post-status.status-server_received,
.app-shell .main .journal-post-status.status-delivered,
.app-shell .main .journal-post-status.status-proposed,
.app-shell .main .journal-post-status.status-waiting_client_confirmation,
.app-shell .main .calendar-status-pill.status-pending,
.app-shell .main .calendar-status-pill.status-pending_admin_confirmation,
.app-shell .main .calendar-status-pill.status-server_received,
.app-shell .main .calendar-status-pill.status-delivered,
.app-shell .main .calendar-status-pill.status-proposed,
.app-shell .main .calendar-status-pill.status-waiting_client_confirmation,
.app-shell .main .booking-detail-status.status-pending,
.app-shell .main .booking-detail-status.status-pending_admin_confirmation,
.app-shell .main .booking-detail-status.status-server_received,
.app-shell .main .booking-detail-status.status-delivered,
.app-shell .main .booking-detail-status.status-proposed,
.app-shell .main .booking-detail-status.status-waiting_client_confirmation {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fff8eb;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.10);
}

.app-shell .main .journal-post-status.status-viewed_by_admin,
.app-shell .main .journal-post-status.status-in_progress,
.app-shell .main .calendar-status-pill.status-viewed_by_admin,
.app-shell .main .calendar-status-pill.status-in_progress,
.app-shell .main .booking-detail-status.status-viewed_by_admin,
.app-shell .main .booking-detail-status.status-in_progress {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10);
}

.app-shell .main .journal-post-status.status-confirmed,
.app-shell .main .journal-post-status.status-ready,
.app-shell .main .journal-post-status.status-completed,
.app-shell .main .calendar-status-pill.status-confirmed,
.app-shell .main .calendar-status-pill.status-ready,
.app-shell .main .calendar-status-pill.status-completed,
.app-shell .main .booking-detail-status.status-confirmed,
.app-shell .main .booking-detail-status.status-ready,
.app-shell .main .booking-detail-status.status-completed {
  border-color: rgba(34, 197, 94, 0.26);
  background: #effaf2;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.10);
}

.app-shell .main .journal-post-status.status-cancelled,
.app-shell .main .journal-post-status.status-auto_cancelled,
.app-shell .main .journal-post-status.status-no_show,
.app-shell .main .calendar-status-pill.status-cancelled,
.app-shell .main .calendar-status-pill.status-auto_cancelled,
.app-shell .main .calendar-status-pill.status-no_show,
.app-shell .main .booking-detail-status.status-cancelled,
.app-shell .main .booking-detail-status.status-auto_cancelled,
.app-shell .main .booking-detail-status.status-no_show {
  border-color: rgba(239, 68, 68, 0.24);
  background: #fff1f2;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.10);
}

/* Final status surface rule: color remains, but status controls never get a frame or glow. */
.app-shell .main .journal-post-status,
.app-shell .main .journal-status-pill,
.app-shell .main .calendar-status-pill,
.app-shell .main .calendar-status-dot,
.app-shell .main .booking-detail-status,
.app-shell .main .badge {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* One visual language for quick booking actions outside the shared drawer. */
.app-shell .main .booking-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.app-shell .main .booking-action-img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.app-shell .main .booking-action-button.tone-success:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.82));
  color: #16a34a;
}

.app-shell .main .booking-action-button.tone-utility:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.84));
  color: #2563eb;
}

.app-shell .main .booking-action-button.tone-neutral:not(:disabled) {
  border-color: rgba(100, 116, 139, 0.38);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.84));
  color: #64748b;
}

.app-shell .main .booking-action-button.tone-danger-secondary:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.36);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.82));
  color: #ef4444;
}

.app-shell .main .booking-action-button.tone-danger-primary:not(:disabled),
.app-shell .main .booking-action-button.pending-delete:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.94), rgba(255, 241, 242, 0.88));
  color: #ef4444;
}

/* Status label text is always plain text; only its parent may render a soft status surface. */
.app-shell .main .booking-detail-status > span,
.app-shell .main .journal-status-pill > span,
.app-shell .main .calendar-status-pill > span,
.app-shell .main .badge > span {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  text-decoration: none !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 transparent;
}

/* Approved admin scenes: three compact actions in one row. */
.app-shell .main .booking-action-scene-waiting-confirmation .booking-detail-actions,
.app-shell .main .booking-action-scene-confirmed .booking-detail-actions,
.app-shell .main .booking-action-scene-ready .booking-detail-actions,
.app-shell .main .booking-mini-actions.booking-action-scene-waiting-confirmation,
.app-shell .main .booking-mini-actions.booking-action-scene-confirmed,
.app-shell .main .booking-mini-actions.booking-action-scene-ready {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-shell .main .booking-action-scene-waiting-client .booking-detail-actions,
.app-shell .main .booking-mini-actions.booking-action-scene-waiting-client {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell .main .calendar-inline-actions.booking-action-scene-waiting-confirmation,
.app-shell .main .calendar-inline-actions.booking-action-scene-confirmed,
.app-shell .main .calendar-inline-actions.booking-action-scene-ready {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex-wrap: nowrap;
  container-type: inline-size;
}

.app-shell .main .calendar-inline-actions.booking-action-scene-waiting-client {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex-wrap: nowrap;
  container-type: inline-size;
}

.app-shell .main .calendar-inline-actions.booking-action-scene-waiting-confirmation .calendar-mini-action,
.app-shell .main .calendar-inline-actions.booking-action-scene-confirmed .calendar-mini-action,
.app-shell .main .calendar-inline-actions.booking-action-scene-ready .calendar-mini-action {
  min-width: 0;
  width: 100%;
}

.app-shell .main .calendar-inline-actions.booking-action-scene-waiting-client .calendar-mini-action {
  min-width: 0;
  width: 100%;
}

/* Keep calendar actions readable: labels give way to their named icons in narrow slots. */
@container (max-width: 390px) {
  .app-shell .main .calendar-inline-actions .calendar-mini-action {
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
  }

  .app-shell .main .calendar-inline-actions .booking-action-label {
    display: none;
  }
}

/* Journal rows form one grouped status list instead of separate cards. */
.app-shell .main .journal-list {
  display: grid;
  gap: 0;
  row-gap: 0 !important;
  column-gap: 0 !important;
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
}

.app-shell .main .journal-list > .journal-row.journal-compact-row {
  margin: 0 !important;
  border: 0;
  border-bottom: 1px solid rgba(217, 226, 241, 0.9);
  border-radius: 0;
  box-shadow: none;
}

.app-shell .main .journal-list > .journal-row.journal-compact-row:first-child {
  border-radius: 15px 15px 0 0;
}

.app-shell .main .journal-list > .journal-row.journal-compact-row:last-child {
  border-bottom: 0;
  border-radius: 0 0 15px 15px;
}

.app-shell .main .journal-list > .journal-row.journal-compact-row:hover {
  border-color: transparent;
  border-bottom-color: rgba(217, 226, 241, 0.9);
  box-shadow: none;
}

.app-shell .main .journal-list > .journal-row.status-pending,
.app-shell .main .journal-list > .journal-row.status-pending_admin_confirmation,
.app-shell .main .journal-list > .journal-row.status-server_received,
.app-shell .main .journal-list > .journal-row.status-delivered,
.app-shell .main .journal-list > .journal-row.status-proposed,
.app-shell .main .journal-list > .journal-row.status-waiting_client_confirmation {
  background: #fff8eb;
}

.app-shell .main .journal-list > .journal-row.status-viewed_by_admin,
.app-shell .main .journal-list > .journal-row.status-in_progress {
  background: #eff6ff;
}

.app-shell .main .journal-list > .journal-row.status-confirmed,
.app-shell .main .journal-list > .journal-row.status-ready,
.app-shell .main .journal-list > .journal-row.status-completed {
  background: #effaf2;
}

.app-shell .main .journal-list > .journal-row.status-cancelled,
.app-shell .main .journal-list > .journal-row.status-auto_cancelled,
.app-shell .main .journal-list > .journal-row.status-no_show {
  background: #fff1f2;
}

/* The journal status glyph is a primary row marker, not a tiny secondary badge. */
.app-shell .main .journal-post-status {
  width: 24px;
  min-width: 24px;
  height: 24px;
  max-height: 24px;
}

.app-shell .main .journal-post-status-icon {
  width: 24px;
  height: 24px;
}

.app-shell .main .journal-post-meta {
  width: 100%;
  height: 24px;
  overflow: visible;
  justify-self: stretch;
  justify-content: center;
  transform: translateY(5px);
}

.app-shell .main .journal-row.journal-compact-row > .journal-post,
.app-shell .main .journal-post-status,
.app-shell .main .journal-post-status-icon {
  overflow: visible;
}

/* The post column keeps its divider at the edge, while its content stays mathematically centered. */
.app-shell .main .journal-row.journal-compact-row > .journal-post {
  padding-left: 0;
  width: 100%;
  justify-self: stretch;
  justify-items: center;
  grid-template-rows: 19px 15px;
  align-content: center;
}

.app-shell .main .journal-post-meta {
  height: 15px;
  transform: translateX(-4px);
  align-items: center;
}

/* Journal status panel: the former lower summary and top filter are one control. */
.app-shell .main .journal-page-title {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.app-shell .main .journal-page-title .journal-segmented-filter {
  justify-self: stretch;
  width: 100%;
  min-height: 48px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
}

.app-shell .main .journal-segmented-filter .journal-filter-tab {
  min-width: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: 24px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 12px;
  color: #64748b;
  text-align: center;
}

.app-shell .main .journal-segmented-filter .journal-filter-tab + .journal-filter-tab {
  border-left: 0;
}

.app-shell .main .journal-segmented-filter .journal-filter-tab.filter-active.active {
  background: #eef4ff;
  color: #246bfd;
}

.app-shell .main .journal-segmented-filter .journal-filter-tab.filter-waiting.active {
  background: #fff8eb;
  color: #c56a00;
}

.app-shell .main .journal-segmented-filter .journal-filter-tab.filter-cancelled.active {
  background: #fff1f2;
  color: #e24555;
}

.app-shell .main .journal-filter-tab-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.app-shell .main .journal-filter-status-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.app-shell .main .journal-filter-tab-copy {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.app-shell .main .journal-filter-tab-copy small {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .main .journal-filter-tab-copy strong {
  color: currentColor;
  font-size: 14px;
  line-height: 16px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .app-shell .main .journal-page-title .journal-segmented-filter {
    min-height: 48px;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    padding: 4px;
  }

  .app-shell .main .journal-segmented-filter .journal-filter-tab {
    min-height: 40px;
    padding: 0 10px;
  }
}

/* Shared journal/calendar status tabs: compact but still 44px tap targets. */
.app-shell .main .booking-status-tab-panel {
  min-height: 52px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #d9e2f1;
  border-radius: 16px;
  background: #fff;
}

.app-shell .main .journal-page-title .booking-status-tab-panel {
  min-height: 52px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
}

.app-shell .main .booking-status-tab-panel .journal-filter-tab {
  min-height: 44px;
  grid-template-columns: 24px minmax(0, auto);
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-active.active {
  background: #eef4ff;
  color: #246bfd;
  box-shadow: inset 0 0 0 1px #72a0ff;
}

.app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-waiting.active {
  background: #fff8eb;
  color: #c56a00;
  box-shadow: inset 0 0 0 1px #f5c66f;
}

.app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-waiting.is-attention {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff7ea;
  border-color: rgba(245, 158, 11, 0.42);
  color: #ad650e;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

/* The highlight begins and ends outside the button, moving only left to right. */
.app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-waiting.is-attention::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -58%;
  width: 52%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.12) 24%, rgba(255, 226, 164, 0.88) 50%, rgba(255, 255, 255, 0.36) 67%, transparent 100%);
  transform: translateX(0) skewX(-16deg);
  animation: booking-waiting-tab-sweep 5s linear infinite;
}

.app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-waiting.is-attention > * {
  position: relative;
  z-index: 1;
}

@keyframes booking-waiting-tab-sweep {
  0% {
    opacity: 0;
    transform: translateX(0) skewX(-16deg);
  }

  5% {
    opacity: 1;
  }

  52% {
    opacity: 1;
    transform: translateX(315%) skewX(-16deg);
  }

  56%,
  100% {
    opacity: 0;
    transform: translateX(315%) skewX(-16deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-waiting.is-attention {
    background: #fff7ea;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.42);
  }

  .app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-waiting.is-attention::after {
    display: none;
  }
}

.app-shell .main .booking-status-tab-panel .journal-filter-tab.filter-cancelled.active {
  background: #fff1f2;
  color: #e24555;
  box-shadow: inset 0 0 0 1px #ffadb6;
}

.app-shell .main .calendar-control-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.app-shell .main .calendar-control-card .calendar-status-tabs {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.app-shell .main .journal-list > p.muted {
  min-height: 54px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 16px;
  text-align: center;
}

/* Calendar date navigation is one compact Apple-style control, not three cards. */
.app-shell .main .calendar-date-field {
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  grid-template-rows: 44px !important;
  gap: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.app-shell .main .calendar-date-field > .btn-icon,
.app-shell .main .calendar-date-field > .btn-icon.btn-secondary {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #246bfd;
}

.app-shell .main .calendar-date-field > .btn-icon:first-child {
  border-right: 1px solid #e2e8f0 !important;
}

.app-shell .main .calendar-date-field > .btn-icon:last-child {
  border-left: 1px solid #e2e8f0 !important;
}

.app-shell .main .calendar-date-field > .btn-icon:hover {
  background: #f5f8ff !important;
}

.app-shell .main .calendar-date-field .calendar-date-shell,
.app-shell .main .calendar-date-field .calendar-date-display,
.app-shell .main .calendar-date-field .calendar-date-native {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.app-shell .main .calendar-date-field .calendar-date-display {
  justify-content: center;
  padding: 0 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

/* Main sidebar menu PNG glyphs. The circle, hover and active state remain CSS-owned. */
.sidebar-nav-icon .main-menu-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

@media (min-width: 721px) and (max-width: 980px) {
  .sidebar-nav-icon .main-menu-icon {
    width: 23px;
    height: 23px;
  }
}

.app-shell .main .journal-date-control {
  width: min(310px, 100%);
  margin-top: 8px;
}

.app-shell .main .journal-date-field {
  width: 100%;
}

@media (max-width: 560px) {
  .app-shell .main .booking-status-tab-panel .journal-filter-tab {
    grid-template-columns: 24px auto;
    justify-content: center;
  }

  .app-shell .main .booking-status-tab-panel .journal-filter-tab-copy small {
    display: none;
  }
}

/* A saved booking comment is an attention item: show it in full when practical,
   then keep very long notes inside a focused, touch-scrollable region. */
.app-shell .main .booking-detail-row.comment-row {
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-areas:
    "comment-icon comment-label"
    "comment-icon comment-text";
  align-items: start;
  column-gap: 10px;
  row-gap: 3px;
  min-height: 0;
  padding: 10px 12px 12px;
  border-bottom-color: rgba(245, 158, 11, 0.26);
  background: #fff8eb;
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.68);
}

.app-shell .main .booking-detail-row.comment-row .booking-detail-row-icon {
  grid-area: comment-icon;
  align-self: start;
  margin-top: 0;
  background: #fff3cf;
  color: #ad650e;
}

.app-shell .main .booking-detail-row.comment-row .booking-detail-row-label {
  grid-area: comment-label;
  align-self: start;
  margin-top: 0;
  overflow: visible;
  color: #8a5a18;
  text-overflow: clip;
  white-space: normal;
}

.app-shell .main .booking-detail-row.comment-row .booking-detail-comment-text {
  grid-area: comment-text;
  display: block;
  width: 100%;
  max-width: none;
  max-height: clamp(120px, 24dvh, 180px);
  padding: 0 4px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: #0f172a;
  text-align: left;
  text-overflow: clip;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.app-shell .main .booking-detail-row.comment-row .booking-detail-comment-text:focus-visible {
  outline: 2px solid rgba(47, 107, 255, 0.48);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The drawer history action follows the PBWASH Compact Outline button pattern. */
.app-shell .main .drawer-history-panel .history-toggle.pb-compact-outline {
  width: auto;
  min-width: 44px;
  max-width: calc(100% - 24px);
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  justify-self: center;
  justify-content: center;
  margin: 12px 12px 4px;
  padding: 0 13px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}

/* Calendar booking cards: the time range lives in the row header, while the
   whole card remains the single action target in detail and compact modes. */
.app-shell .main .calendar-section .calendar-time.calendar-time-range {
  padding-right: 4px;
  padding-left: 4px;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.app-shell .main .calendar-section.calendar-detail .calendar-booking:not(.compact) {
  min-height: 0;
  gap: 3px;
  padding: 7px 10px;
}

.app-shell .main .calendar-section.calendar-detail .calendar-car-line {
  gap: 7px;
}

.app-shell .main .calendar-section.calendar-detail .calendar-car-mark {
  width: 26px;
  height: 26px;
}

.app-shell .main .calendar-section.calendar-detail .calendar-car-icon {
  width: 16px;
  height: 16px;
}

.app-shell .main .calendar-section.calendar-detail .calendar-booking-car {
  font-size: 16px;
  line-height: 20px;
}

.app-shell .main .calendar-section.calendar-detail .calendar-booking-plate {
  font-size: 24px;
  line-height: 27px;
}

.app-shell .main .calendar-section.calendar-detail .calendar-status-pill {
  min-height: 24px;
  margin-left: auto;
  padding: 3px 6px;
}

.app-shell .main .calendar-section .calendar-booking.compact {
  min-height: 42px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert {
  --calendar-alert-rgb: 37, 99, 235;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(var(--calendar-alert-rgb), 0.18),
    0 8px 22px rgba(var(--calendar-alert-rgb), 0.16);
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert.warning {
  --calendar-alert-rgb: 245, 158, 11;
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert.success {
  --calendar-alert-rgb: 34, 197, 94;
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert.info {
  --calendar-alert-rgb: 37, 99, 235;
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -55%;
  bottom: -55%;
  left: -75%;
  width: 58%;
  transform: skewX(-18deg);
  background: linear-gradient(
    90deg,
    rgba(var(--calendar-alert-rgb), 0),
    rgba(var(--calendar-alert-rgb), 0.08) 28%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(var(--calendar-alert-rgb), 0.16) 72%,
    rgba(var(--calendar-alert-rgb), 0)
  );
  pointer-events: none;
  animation: calendar-booking-light-sweep 2.8s ease-in-out infinite;
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert > :not(.calendar-status-stripe) {
  position: relative;
  z-index: 1;
}

.app-shell .main .calendar-section .calendar-booking.time-action-alert > .calendar-status-stripe {
  z-index: 1;
}

@keyframes calendar-booking-light-sweep {
  0%, 16% {
    left: -75%;
    opacity: 0;
  }
  28% {
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  84%, 100% {
    left: 125%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .main .calendar-section .calendar-booking.time-action-alert::after {
    animation: none;
    left: 22%;
    opacity: 0.42;
  }
}
