/* cleaning-app v4.0 — shared styles */
/* Font and palette match the existing calendar.html from cleaning-script */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 12px 16px 40px;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.5;
}

h1 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 700;
}

h2 {
  margin: 28px 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
}

h3 {
  margin: 24px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
}

.subtitle {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: #64748b;
}

/* Calendar navigation bar */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.cal-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-month-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.cal-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1.5rem;
  line-height: 1;
  color: #475569;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.cal-chevron:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.cal-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-jump-select {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  cursor: pointer;
}

.cal-today-btn {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  background: #f59e0b;
  color: #1a1a1a;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.12s;
}

.cal-today-btn:hover {
  background: #d97706;
}

/* Calendar outer container — matches generate_calendar.py */
.cal-outer {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #1e293b;
}

/* Legend row below calendar */
.legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* Tasks section */
.tasks-header {
  margin-top: 0;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

/* Clickable task card — min tap target 44px */
.task-card {
  display: block;
  min-height: 64px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.task-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.task-card.done {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.75;
  cursor: default;
}

.task-cabin {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.task-meta {
  font-size: 0.85rem;
  color: #64748b;
}

.task-done-at {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}

.done-header {
  color: #64748b;
}

.done-list .task-card {
  cursor: default;
}

/* Empty state */
.empty-state {
  color: #64748b;
  font-style: italic;
  margin: 12px 0;
  font-size: 0.9rem;
}

/* Checklist page */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: #475569;
  text-decoration: none;
  min-height: 44px;
  line-height: 44px;
}

.back-link:hover {
  color: #1e293b;
  text-decoration: underline;
}

.task-subheader {
  margin: 4px 0 24px;
  font-size: 0.9rem;
  color: #64748b;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist li {
  border-radius: 8px;
  overflow: hidden;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  min-height: 52px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.1s;
  width: 100%;
}

.checklist-item:hover {
  background: #f1f5f9;
}

.checklist-cb {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #16a34a;
}

.done-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  background: #16a34a;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.done-btn:hover {
  background: #15803d;
}

.done-btn:active {
  background: #166534;
}

/* Status page footer */
.site-footer {
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.footer-link {
  color: #94a3b8;
  text-decoration: none;
}

.footer-link:hover {
  color: #64748b;
  text-decoration: underline;
}

/* Maintenance section */
.maint-header {
  margin-top: 32px;
}

.maint-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.maint-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.maint-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.maint-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.maint-dot-on_track { background: #16a34a; }
.maint-dot-due_soon { background: #d97706; }
.maint-dot-overdue  { background: #dc2626; }

.maint-property {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}

.maint-task-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.maint-status {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.maint-status-on_track { color: #16a34a; }
.maint-status-due_soon { color: #d97706; }
.maint-status-overdue  { color: #dc2626; }

.maint-last-done {
  font-size: 0.78rem;
  color: #94a3b8;
}

.maint-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
}

.maint-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Maintenance confirmation dialog */
.maint-dialog {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 340px;
  width: calc(100vw - 48px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.maint-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.maint-dialog-msg {
  font-size: 0.95rem;
  color: #1e293b;
  margin: 0 0 20px;
  line-height: 1.5;
}

.maint-dialog-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.maint-dialog-cancel {
  min-height: 44px;
  padding: 10px 20px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.maint-dialog-cancel:hover {
  background: #e2e8f0;
}

.maint-dialog-confirm {
  min-height: 44px;
  padding: 10px 20px;
  background: #16a34a;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.maint-dialog-confirm:hover {
  background: #15803d;
}

/* Tab bar (operator pages: /status, /settings) */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}

.tab-link {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -2px;
  min-height: 44px;
  line-height: 28px;
  transition: color 0.12s, background 0.12s;
}

.tab-link:hover {
  color: #334155;
  background: #f1f5f9;
}

.tab-active {
  color: #1e293b;
  background: #fff;
  border-color: #e2e8f0;
  border-bottom-color: #fff;
}

.tab-link-logout {
  margin-left: auto;
  color: #94a3b8;
  font-weight: 400;
}

.tab-link-logout:hover {
  color: #64748b;
  background: transparent;
}

/* Flash messages */
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.flash-ok  { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Settings page */
.settings-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.settings-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.settings-key-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  flex-shrink: 0;
}

.settings-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.settings-input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  width: 180px;
}

.settings-input:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  background: #fff;
}

.settings-input-wide  { width: 320px; }
.settings-input-short { width: 80px; }
.settings-input-flex  { flex: 1; width: auto; min-width: 140px; }

.settings-select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  width: 200px;
}

.settings-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.settings-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 28px;
}

.settings-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.checklist-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.reorder-btn {
  display: block;
  width: 28px;
  height: 22px;
  padding: 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.6rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.reorder-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

.add-btn {
  min-height: 40px;
  padding: 8px 16px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.add-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.save-btn {
  min-height: 40px;
  padding: 8px 20px;
  background: #1e40af;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-left: auto;
}

.save-btn:hover {
  background: #1d4ed8;
}

.remove-btn {
  min-height: 36px;
  padding: 6px 14px;
  background: #fff;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #fecaca;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.15s;
}

.remove-btn:hover {
  background: #fee2e2;
}

.remove-btn-sm {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-left: 0;
}

/* ── Booking edit / cancel dialog ─────────────────────────── */

.booking-dialog {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px 24px;
  max-width: 480px;
  width: calc(100vw - 32px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  background: #fff;
}

.booking-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.ical-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.dialog-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px 10px;
  margin: 0 0 14px;
}

.dialog-legend {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  padding: 0 4px;
}

.dialog-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 10px;
}

.dialog-label:last-child {
  margin-bottom: 0;
}

.dialog-input {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  width: 100%;
  box-sizing: border-box;
}

.dialog-input:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  background: #fff;
}

.dialog-input-short {
  width: 100px;
}

.dialog-textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}

.dialog-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dialog-row .dialog-label {
  flex: 1;
  min-width: 120px;
}

.dialog-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 4px;
}

.dialog-cancel-msg {
  font-size: 0.9rem;
  color: #1e293b;
  line-height: 1.5;
  margin: 0 0 20px;
}

.dialog-btn-cancel {
  min-height: 44px;
  padding: 10px 20px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.dialog-btn-cancel:hover {
  background: #e2e8f0;
}

.dialog-btn-save {
  min-height: 44px;
  padding: 10px 24px;
  background: #1e40af;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.dialog-btn-save:hover {
  background: #1d4ed8;
}

.dialog-btn-save:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.date-conflict-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  font-size: 0.82rem;
}

.dialog-btn-danger {
  min-height: 44px;
  padding: 10px 24px;
  background: #dc2626;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.dialog-btn-danger:hover {
  background: #b91c1c;
}

/* ── Create booking mode buttons ──────────────────────────── */

.create-mode-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.create-mode-btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.create-mode-btn--active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}

.create-mode-btn:hover:not(.create-mode-btn--active) {
  border-color: #94a3b8;
  color: #334155;
}

.create-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

/* ── Home split layout ─────────────────────────────────────── */

.home-split {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 768px) {
  .home-split {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }
  .home-tasks-col {
    flex: 1;
    min-width: 0;
  }
  .home-activity-col {
    flex: 1;
    min-width: 0;
  }
}

/* ── Home panel card (shared by tasks and activity columns) ─── */

.home-panel {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

/* ── Activity feed ─────────────────────────────────────────── */

.activity-summary {
  margin: 20px 0 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.activity-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.activity-summary-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
}

.activity-see-all {
  font-size: 0.78rem;
  color: #3b82f6;
  text-decoration: none;
}

.activity-see-all:hover {
  text-decoration: underline;
}

.activity-empty {
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
  margin: 6px 0 0;
}

.activity-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #f1f5f9;
  font-size: 0.82rem;
  line-height: 1.4;
}

.activity-dot-sm {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-rel-time {
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
}

.activity-summary-text {
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Full activity page */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.activity-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.activity-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.activity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-type-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-abs-time {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: auto;
}

.activity-item-summary {
  font-size: 0.88rem;
  color: #1e293b;
  line-height: 1.4;
}

.activity-details-expander {
  margin-top: 8px;
}

.activity-details-toggle {
  font-size: 0.78rem;
  color: #3b82f6;
  cursor: pointer;
}

.activity-details-pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Activity event type colors */
.evt-green  { background: #16a34a; }
.evt-red    { background: #dc2626; }
.evt-amber  { background: #d97706; }
.evt-blue   { background: #2563eb; }
.evt-grey   { background: #94a3b8; }

.activity-type-green  { color: #16a34a; }
.activity-type-red    { color: #dc2626; }
.activity-type-amber  { color: #d97706; }
.activity-type-blue   { color: #2563eb; }
.activity-type-grey   { color: #64748b; }

/* ── Rebook alert ─────────────────────────────────────────── */

.bk-rebook-alert {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.bk-rebook-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 6px;
}

.bk-rebook-msg {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.5;
}

.bk-rebook-link {
  font-size: 0.82rem;
  color: #2563eb;
  text-decoration: none;
}

.bk-rebook-link:hover {
  text-decoration: underline;
}

.bk-rebook-badge {
  color: #d97706;
  font-size: 0.82rem;
  margin-left: 4px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  body {
    padding: 10px 12px 32px;
  }

  h1 {
    font-size: 1.15rem;
  }

  .task-cabin {
    font-size: 0.95rem;
  }

  /* Stack dialog rows vertically so date/time pairs don't squeeze */
  .dialog-row {
    flex-direction: column;
    gap: 0;
  }

  /* 16px prevents iOS auto-zoom on focus; tighter padding saves vertical space */
  input[type="date"].dialog-input,
  input[type="time"].dialog-input {
    font-size: 16px;
    padding: 6px 8px;
    min-height: 34px;
  }

  /* Cap date width — no need to span the full viewport */
  input[type="date"].dialog-input {
    max-width: 180px;
  }
}

/* ── Bookings tab ────────────────────────────────────────────── */

.bk-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.bk-search {
  flex: 1 1 200px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.88rem;
  background: #fff;
  color: #1e293b;
}

.bk-search:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.bk-select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.85rem;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
}

.bk-select:focus {
  outline: none;
  border-color: #3b82f6;
}

/* Split layout — stacked on mobile, side-by-side on desktop */
.bk-split {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 768px) {
  .bk-split {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .bk-list-col {
    flex: 0 0 33%;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
  }

  .bk-detail-col {
    flex: 1 1 0;
  }
}

/* Mobile: body.has-selection hides list, shows detail only */
@media (max-width: 767px) {
  body.has-selection .bk-list-col {
    display: none;
  }

  .bk-detail-col {
    display: none;
  }

  body.has-selection .bk-detail-col {
    display: block;
  }
}

/* Booking list items */
.bk-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.bk-item:last-of-type {
  border-bottom: none;
}

.bk-item:hover {
  background: #f8fafc;
}

.bk-item--selected {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding-left: 11px;
}

.bk-item--selected:hover {
  background: #dbeafe;
}

.bk-item--pending {
  border-left: 3px solid #f59e0b;
  padding-left: 11px;
}

.bk-item--cancelled {
  opacity: 0.55;
}

.bk-item--completed {
  opacity: 0.7;
}

.bk-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.bk-item-guest {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
}

.bk-item-prop {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1px;
}

.bk-item-dates {
  font-size: 0.8rem;
  color: #94a3b8;
}

.bk-item-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
}

.bk-item--cancelled .bk-item-badge {
  background: #fee2e2;
  color: #991b1b;
}

.bk-item--completed .bk-item-badge {
  background: #f1f5f9;
  color: #475569;
}

.bk-load-more {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 0.85rem;
  color: #3b82f6;
  text-decoration: none;
  border-top: 1px solid #e2e8f0;
}

.bk-load-more:hover {
  background: #f8fafc;
}

/* Source indicator dot */
.bk-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.bk-src-airbnb  { background: #FF5A5F; }
.bk-src-booking { background: #003580; }
.bk-src-vrbo    { background: #1B5EDE; }
.bk-src-smoobu  { background: #2563eb; }
.bk-src-direct  { background: #16a34a; }
.bk-src-website { background: #0891b2; }

/* Status badge */
.bk-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}

.bk-status-active             { background: #dcfce7; color: #166534; }
.bk-status-pending_modification,
.bk-status-pending_cancellation { background: #fef3c7; color: #92400e; }
.bk-status-cancelled          { background: #fee2e2; color: #991b1b; }
.bk-status-completed          { background: #f1f5f9; color: #475569; }

/* Booking detail pane */
.bk-back-link {
  display: none;
  font-size: 0.85rem;
  color: #3b82f6;
  text-decoration: none;
  margin-bottom: 12px;
}

@media (max-width: 767px) {
  .bk-back-link {
    display: inline-block;
  }
}

.bk-detail {
  padding: 4px 0 24px;
}

.bk-detail-empty {
  padding: 32px 0;
}

@media (min-width: 768px) {
  .bk-detail {
    padding: 4px 2px 24px;
  }
}

.bk-detail-header {
  margin-bottom: 16px;
}

.bk-detail-prop {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.bk-detail-guest {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.bk-detail-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #64748b;
}

/* Pending section in detail */
.bk-pending-section {
  background: #fff;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.bk-pending-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 6px;
}

.bk-pending-msg {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 10px;
}

.bk-pending-change {
  font-size: 0.82rem;
  color: #92400e;
  background: #fef3c7;
  border-radius: 4px;
  padding: 4px 8px;
  display: inline-block;
  margin-bottom: 6px;
}

.bk-pending-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Detail rows */
.bk-detail-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 16px;
  margin-bottom: 16px;
}

.bk-detail-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.bk-detail-row:last-child {
  border-bottom: none;
}

.bk-detail-row--notes {
  align-items: flex-start;
}

.bk-detail-lbl {
  flex: 0 0 110px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.82rem;
}

.bk-detail-val {
  color: #1e293b;
  flex: 1;
  word-break: break-word;
}

.bk-detail-val a {
  color: #2563eb;
  text-decoration: none;
}

.bk-detail-val a:hover {
  text-decoration: underline;
}

.bk-detail-notes {
  white-space: pre-wrap;
  font-size: 0.85rem;
}

.bk-detail-uid {
  font-family: monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  word-break: break-all;
}

/* Action buttons in detail pane */
.bk-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bk-action-edit {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.bk-action-edit:hover {
  background: #1d4ed8;
}

.bk-action-cancel {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.bk-action-cancel:hover {
  background: #fee2e2;
}

/* ── Conflict cards (v6.7) ──────────────────────────────────────────────────── */
.conflict-section {
  margin-bottom: 20px;
}
.conflict-card {
  background: #fff5f5;
  border: 2px solid #dc2626;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.conflict-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 8px;
}
.conflict-row {
  font-size: 0.88rem;
  color: #1e293b;
  margin-bottom: 4px;
}
.conflict-portal {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 4px;
}
.conflict-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}
.conflict-link:hover {
  text-decoration: underline;
}
