:root {
  /* Bundle 2.5 design tokens -- values taken from the Master Build Plan's
     Design System section (light mode), which itself sources PRD §13.
     Light theme only for now; dark-mode equivalents are documented in the
     same section but the toggle isn't built yet, so they aren't wired in
     here -- keeping that out means nobody's phone silently flips into an
     unreviewed dark render because its OS is set to dark mode. Every
     colour in component CSS routes through one of these tokens -- no
     hardcoded hex in a selector below. */
  --primary: #1E40AF;       /* --blue-hi */
  --primary-dark: #1E3A8A;  /* hover/gradient-end shade of --blue-hi; not in the spec's swatch list, kept in the same family */
  --accent: #2563EB;        /* --blue -- corrected to match the Dashboard spec's colour authority (PRD/STAYLEDGER_DASHBOARD_SPEC.md §10/§4: donut "Booked" + Booking.com portal dot), 19 Oct 2026, was #3B82F6 */
  --success: #16A34A;       /* --green */
  --warning: #D97706;       /* --amber */
  --danger: #DC2626;        /* --red */
  --alert: #EA580C;         /* --orange -- tight-turnaround alerts ONLY, never UI chrome */
  --bg: #F1F5F9;             /* corrected to match the Dashboard spec's colour authority (§10 "Page background"), 19 Oct 2026, was #F8FAFC */
  --bg-alt: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;          /* corrected to match the Dashboard spec's colour authority (PRD/STAYLEDGER_DASHBOARD_SPEC.md v1.0.1 §10, "Main text"), 24 Oct 2026, was #1E293B */
  --text-secondary: #475569; /* --text-2 -- matches spec §10 "Labels and tile labels" (#334155 / #475569) */
  --text-tertiary: #64748B;  /* new 24 Oct 2026, spec §10 "Secondary lines" (owner under property, dates, notes) */
  --pill-text: #1E293B;     /* new 24 Oct 2026, spec §10 "Status pill text" -- was --text's old value; kept as its own token now that --text has moved to #0F172A */
  --urgent: #B91C1C;        /* new 24 Oct 2026, spec §10 "Urgent text" -- status-pill-only red, distinct from --danger (#DC2626) which is the general destructive/alert red */
  --border: #E2E8F0;
  --border-mid: #CBD5E1;
  --text-on-brand: #FFFFFF;  /* contrast text on a filled brand-colour surface, kept distinct from --card even though same hex */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.10);

  /* Status tints -- same hex values the app already used, now named instead of
     repeated inline. green/amber/blue/red "tint" = soft card background,
     "tint-strong" = brighter badge-pill background. */
  --login-gradient-start: #EEF2FF;
  --hover-tint-blue: #F5F7FF;
  --green-tint: #F0FDF4;
  --green-tint-strong: #DCFCE7;
  --green-border: #BBF7D0;
  --green-dark-text: #15803D;
  --amber-tint: #FFFBEB;
  --amber-tint-strong: #FEF3C7;
  --amber-border: #FDE68A;
  --amber-border-strong: #FCD34D;
  --amber-dark-text: #B45309;
  --amber-dark-text-2: #92400E;
  --blue-tint: #EFF6FF;
  --blue-tint-strong: #E0F2FE;
  --blue-tint-mid: #DBEAFE;
  --blue-border: #BFDBFE;
  --red-tint: #FEF2F2;
  --red-border: #FCA5A5;
  --red-dark-text: #B91C1C;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3 { font-family: inherit; }

/* ================= Login screen ================= */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, var(--login-gradient-start) 0%, var(--bg) 45%);
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 40px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
}

.login-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--text-on-brand);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.login-card .tagline {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0 0 28px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: var(--text-on-brand);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, transform 0.05s;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  padding: 8px 14px;
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-secondary:hover { border-color: var(--primary); background: var(--hover-tint-blue); }

/* Two-click confirm pattern for destructive actions (Cancel, Delete) --
   first click arms it, a second click within the window confirms. Avoids
   native confirm() dialogs, which block Claude's own browser-automation
   testing of this app. */
.btn-confirm-armed {
  background: var(--danger) !important;
  color: var(--text-on-brand) !important;
  border-color: var(--danger) !important;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
}

/* ================= App shell ================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar -- spec v1.0.2 §1a. Approved for every screen, not just the
   Dashboard (Tushar, 24 Oct 2026): white, with a filled blue pill for the
   current page, replacing the earlier blue-gradient sidebar. */
.sidebar {
  width: 236px;
  background: #FFFFFF;
  color: var(--text);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  /* Stretches to the full page height (the flex row's height, set by
     whichever screen's content is tallest) so the white background runs
     all the way down, not just the first 100vh -- the nav itself stays
     pinned to the viewport via .sidebar-inner below. */
}

.sidebar-inner {
  width: 236px;
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  font-size: 17px;
  font-weight: 800;
  padding: 0 20px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
  color: #1E3A8A;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

#main-nav-cohost, #main-nav-owner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.nav-icon svg { display: block; }

.nav-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.nav-item.active {
  background: #1D4ED8;
  color: #fff;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar .user-box {
  margin-top: auto;
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
}

/* Settings gear, pinned above the user box (Navigation_Restructure_Spec.docx
   Step 1) -- structural placement only, same .nav-item look as everything
   else, no new styling introduced. */
.sidebar .user-box .nav-item-settings {
  margin: 0 -20px 12px;
  padding-left: 20px;
}

.sidebar .user-box .name { font-weight: 700; font-size: 13px; color: var(--text); }
.sidebar .user-box .role {
  color: var(--text-tertiary);
  font-size: 11px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar .user-box .btn-secondary {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text);
}
.sidebar .user-box .btn-secondary:hover { background: #E2E8F0; }

/* Sidebar folds to icons-only below 1240px (spec §11). The nav items keep
   their full click target; only the text label and the brand wordmark hide. */
@media (max-width: 1240px) {
  .sidebar, .sidebar-inner { width: 76px; }
  .sidebar .brand .brand-text { display: none; }
  .nav-item .nav-label { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .sidebar .user-box .name,
  .sidebar .user-box .role,
  .sidebar .user-box .nav-item-settings .nav-label,
  .sidebar .user-box .btn-secondary { display: none; }
}

.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
}

/* This wordmark is the mobile top bar's own brand mark (Bundle 2.5), named
   "mobile" because it's only meant to show once the sidebar's own logo is
   gone (<=700px) -- that hiding rule was never actually written, so it was
   showing on desktop too, as a second logo next to the sidebar's. Fixed
   24 Oct 2026 (spec v1.0.2 §1a: "no second logo"); its mobile appearance,
   defined later in the <=700px media query, is unaffected. */
.topbar-brand-mobile { display: none; }

/* Spec v1.0.2 §1a: "No extra top bar above the page on desktop" -- applies
   to the Dashboard specifically (its own header carries the property
   picker instead, see .dash-header-right below); every other screen keeps
   this top bar as before. `loadHomeDashboard()` toggles this body class. */
@media (min-width: 701px) {
  body.dash-active .topbar, body.myday-active .topbar { display: none; }
}

.property-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.property-switcher select {
  padding: 9px 32px 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: var(--card);
  min-width: 240px;
  cursor: pointer;
}

.inline-form {
  margin: 0 40px;
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.main {
  flex: 1;
  padding: 32px 40px 60px;
  max-width: 1100px;
  width: 100%;
}

.no-property-state {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-secondary);
}

.no-property-icon {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 12px;
}

.no-property-state h2 {
  color: var(--text);
  font-size: 18px;
  margin: 0 0 6px;
}

.view-header { margin-bottom: 24px; }

.page-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-secondary);
  margin: 0 0 28px;
  font-size: 14px;
}

.view-header .page-subtitle { margin-bottom: 0; }

.month-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.month-picker .btn-secondary {
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1;
}

.month-picker-label {
  font-size: 15px;
  font-weight: 700;
  min-width: 140px;
  text-align: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 16px;
}

.inline-panel {
  margin-bottom: 20px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ================= Tables ================= */

table.portals-table {
  width: 100%;
  border-collapse: collapse;
}

table.portals-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 10px;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}

table.portals-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

table.portals-table tbody tr {
  transition: background 0.1s;
}

table.portals-table tbody tr:hover {
  background: var(--bg);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge.active { background: var(--green-tint-strong); color: var(--success); }
.badge.inactive { background: var(--bg-alt); color: var(--text-secondary); }

/* Planning estimate, never real money -- deliberately understated so it's
   never mistaken for the real Commission column next to it. */
.projected-commission {
  font-style: italic;
  color: var(--text-secondary);
  font-weight: 400;
}

.markup-input {
  width: 70px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}

.add-portal-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: flex-end;
}

.add-portal-row .field { margin-bottom: 0; flex: 1; }

.empty-state {
  color: var(--text-secondary);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.loading-state {
  color: var(--text-secondary);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Module 3: mobile-first expense entry -- larger touch targets */
.mobile-field input,
.mobile-field select {
  padding: 13px 14px;
  font-size: 15px;
}

.btn-touch {
  padding: 13px 18px !important;
  font-size: 15px;
}

.receipt-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.receipt-link:hover { text-decoration: underline; }

/* ================= Query thread ================= */

.query-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.query-message {
  max-width: 75%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
}

.query-message.mine {
  align-self: flex-end;
  background: var(--primary);
  color: var(--text-on-brand);
  border-color: var(--primary);
}

.query-message.mine .meta { color: rgba(255,255,255,0.75); }
.query-message.theirs { align-self: flex-start; }

.query-message .meta {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

/* ================= KPI tiles (Owner Dashboard) ================= */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.kpi-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  border-top: 3px solid var(--border);
}

.kpi-accent-primary { border-top-color: var(--primary); }
.kpi-accent-success { border-top-color: var(--success); }
.kpi-accent-neutral { border-top-color: var(--text-secondary); }

.kpi-tile-warning {
  background: var(--amber-tint);
  border-color: var(--amber-border);
  border-top-color: var(--warning);
}

.kpi-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.kpi-tile-warning .kpi-value { color: var(--warning); }

.pending-invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
}

/* ================= Home Dashboard: property cards ================= */

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.property-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.property-card.priority-checkin { border-left-color: var(--success); background: var(--green-tint); }
.property-card.priority-checkout { border-left-color: var(--warning); background: var(--amber-tint); }

.property-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.property-card-owner {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.occupancy-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.occupancy-badge.vacant { background: var(--bg-alt); color: var(--text-secondary); }
.occupancy-badge.occupied { background: var(--blue-tint-strong); color: var(--primary-dark); }
.occupancy-badge.checkin_today { background: var(--green-tint-strong); color: var(--green-dark-text); }
.occupancy-badge.checkout_today { background: var(--amber-tint-strong); color: var(--amber-dark-text); }

.property-card-stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.property-card-stats .stat-label { color: var(--text-secondary); }
.property-card-stats .stat-value { font-weight: 700; color: var(--text); }

.property-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ================= Home Dashboard: activity + outstanding ================= */

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.activity-row:last-child { border-bottom: none; }

.activity-date {
  font-weight: 700;
  color: var(--text);
  width: 80px;
  flex-shrink: 0;
}

.activity-type-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.activity-type-badge.check_in { background: var(--green-tint-strong); color: var(--success); }
.activity-type-badge.check_out { background: var(--amber-tint-strong); color: var(--warning); }

.activity-guest { flex: 1; color: var(--text); }
.activity-property { color: var(--text-secondary); font-size: 12px; }

.outstanding-list { display: flex; flex-direction: column; gap: 10px; }

.outstanding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.outstanding-row .count {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.outstanding-row.zero .count { color: var(--text-secondary); }

/* ================= Home Dashboard: This Month's Activity (operational lens) ================= */

.activity-subhead {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 24px 0 12px;
}
.activity-subhead:first-of-type { margin-top: 4px; }

.occupancy-portfolio {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.occupancy-portfolio-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.occupancy-portfolio-track {
  flex: 1;
  height: 12px;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
}
.occupancy-portfolio-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 20px;
}

.occupancy-list { display: flex; flex-direction: column; gap: 10px; }
.occupancy-row {
  display: grid;
  grid-template-columns: 180px 1fr 90px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.occupancy-row-label { color: var(--text); font-weight: 600; }
.occupancy-bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
}
.occupancy-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 20px;
}
.occupancy-row-value { color: var(--text-secondary); text-align: right; white-space: nowrap; }

.activity-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.activity-stat {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.activity-stat-value { display: block; font-size: 24px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.activity-stat-label { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.commission-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.commission-tier {
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
}
.commission-tier-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.tier-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
}
.tier-estimate {
  background: var(--bg);
  border-style: dashed;
}
.tier-estimate .tier-tag { background: var(--bg-alt); color: var(--text-secondary); }
.tier-estimate .commission-tier-value { color: var(--text-secondary); font-style: italic; }
.tier-confirmed { background: var(--green-tint); border-color: var(--green-border); }
.tier-confirmed .tier-tag { background: var(--green-tint-strong); color: var(--success); }
.tier-paid { background: var(--blue-tint); border-color: var(--blue-border); }
.tier-paid .tier-tag { background: var(--blue-tint-mid); color: var(--primary); }
.commission-tier-value { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.commission-tier-note { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ================= Financial Summary: mini bar+line chart ================= */

.chart-wrap {
  display: grid;
  align-items: end;
  gap: 18px;
  height: 200px;
  padding: 10px 10px 0;
  position: relative;
}

.chart-line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  z-index: 1;
}

.chart-bar {
  width: 60%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.chart-bar-label {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.chart-bar-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.expense-breakdown-row {
  margin-bottom: 12px;
}

.expense-breakdown-row .exp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.expense-breakdown-row .exp-category { color: var(--text); font-weight: 600; }
.expense-breakdown-row .exp-amount { color: var(--text-secondary); }

.expense-breakdown-bar-track {
  background: var(--bg);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.expense-breakdown-bar-fill {
  background: var(--accent);
  height: 100%;
  border-radius: 20px;
}

/* ================= Expense multi-row entry grid ================= */

table.expense-grid { width: 100%; border-collapse: collapse; }
table.expense-grid th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 6px 6px 8px;
}
table.expense-grid td { padding: 4px 6px; vertical-align: top; }
table.expense-grid input[type="text"],
table.expense-grid input[type="date"],
table.expense-grid input[type="number"],
table.expense-grid select {
  width: 100%;
  min-width: 90px;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
}
table.expense-grid input[type="file"] { max-width: 150px; font-size: 12px; }
table.expense-grid tr.grid-row-error td { background: rgba(220, 38, 38, 0.05); }
table.expense-grid .grid-row-msg { color: var(--danger); font-size: 12px; margin-top: 4px; }
table.expense-grid .grid-remove {
  border: none; background: transparent; color: var(--text-secondary);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 8px;
}
table.expense-grid .grid-remove:hover { color: var(--danger); }

/* Phones: each row becomes a labelled card */
@media (max-width: 860px) {
  table.expense-grid thead { display: none; }
  table.expense-grid, table.expense-grid tbody, table.expense-grid tr, table.expense-grid td { display: block; width: 100%; }
  table.expense-grid tr {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 12px;
  }
  table.expense-grid td { padding: 6px 0; }
  table.expense-grid td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
  }
  table.expense-grid td.grid-remove-cell::before { content: none; }
  table.expense-grid input[type="file"] { max-width: none; }
  table.expense-grid input, table.expense-grid select { padding: 13px 12px; font-size: 15px; }
}

/* ================= Reconcile popup (opens right where you clicked) ================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 900;
}
#reconcile-panel:not([hidden]) {
  position: fixed;
  z-index: 901;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92vw);
  max-height: 90vh;
  overflow: auto;
  margin: 0;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

/* Reconcile popup: the booking's identity strip (portal first -- it decides which statement to open) */
.reconcile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px;
  padding: 12px 14px;
  margin: 0 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.reconcile-details .rd-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin-bottom: 2px; }
.reconcile-details .rd-value { font-size: 14px; font-weight: 600; }
.reconcile-details .rd-portal { color: var(--primary); font-size: 16px; }

/* Booking-number popup (same look as the reconcile popup) */
#ref-panel:not([hidden]) {
  position: fixed;
  z-index: 901;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92vw);
  margin: 0;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}
.ref-link {
  background: none; border: none; padding: 0; margin-top: 3px;
  color: var(--accent); font-size: 12px; cursor: pointer; text-decoration: underline;
}


/* ================= Bundle 1.5: availability calendar in the Log booking form ================= */
/* Portal colours follow Addendum v1.4 Section E: Airbnb = soft pink/rose, Booking.com = blue, Direct = green,
   Other = slate. Pink is a SOFT fill so it can never be mistaken for the red clash message. */
.avail-cal { --c-airbnb: #FBCFE8; --c-airbnb-ink: #831843; --c-booking: #BFDBFE; --c-booking-ink: #1E3A8A;
  --c-direct: #BBF7D0; --c-direct-ink: #14532D; --c-other: #E2E8F0; --c-other-ink: #334155;
  max-width: 440px; margin-top: 14px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.avail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.avail-nav { width: 40px; height: 40px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--text); }
.avail-nav:hover { border-color: var(--primary); }
.avail-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.avail-dow span { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-secondary); padding: 2px 0; }
.avail-day { position: relative; min-height: 44px; padding: 3px 2px 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.avail-day .dn { position: relative; z-index: 2; font-size: 11px; font-weight: 600; line-height: 1; padding-left: 2px; }
.avail-day .gn { position: relative; z-index: 2; font-size: 9px; line-height: 1.1; margin-top: 2px; padding-left: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.avail-day .lh, .avail-day .rh { position: absolute; top: 0; bottom: 0; z-index: 1; }
.avail-day .lh { left: 0; width: 50%; }
.avail-day .rh { right: 0; width: 50%; }
.avail-day.blank { border: none; background: transparent; cursor: default; min-height: 0; }
.avail-day.taken { cursor: not-allowed; }
.avail-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.avail-day.sel { outline: 2px dashed var(--primary-dark); outline-offset: -2px; }
.avail-day.in-range { background-image: linear-gradient(rgba(30,64,175,0.10), rgba(30,64,175,0.10)); } /* matches --primary #1E40AF, was derived from the old --primary #0EA5E9 */
.avail-day.p-airbnb .gn, .avail-day.pt-airbnb .gn { color: var(--c-airbnb-ink); }
.p-airbnb, .sw-airbnb, .lh.p-airbnb, .rh.p-airbnb { background: var(--c-airbnb); }
.p-booking, .sw-booking, .lh.p-booking, .rh.p-booking { background: var(--c-booking); }
.p-direct, .sw-direct, .lh.p-direct, .rh.p-direct { background: var(--c-direct); }
.p-other, .sw-other, .lh.p-other, .rh.p-other { background: var(--c-other); }
.avail-day.k-booking .gn { color: var(--c-booking-ink); }
.avail-day.k-airbnb .gn { color: var(--c-airbnb-ink); }
.avail-day.k-direct .gn { color: var(--c-direct-ink); }
.avail-day.k-other .gn { color: var(--c-other-ink); }
.avail-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.avail-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(15,23,42,0.12); }
.avail-legend .sw-today { background: var(--card); box-shadow: inset 0 0 0 2px var(--primary); }
.avail-hint { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
/* touch-action: none is required for the long-press-and-drag JS to reliably get pointermove events on a real
   finger touch -- without it the browser's native scroll gesture can win the race before our hold-timer/move
   threshold ever runs, so taps/short drags look fine in synthetic tests but real touch drag never fires. This
   does mean a swipe starting exactly on a day cell won't scroll the page; swiping from outside the grid still
   works normally. */
#avail-days { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.avail-empty { padding: 22px 8px; text-align: center; color: var(--text-secondary); }
.stay-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.stay-summary { margin-top: 0; font-weight: 600; font-size: 14px; }
.nights-chip { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--primary); color: var(--text-on-brand); font-weight: 700; font-size: 15px; white-space: nowrap; }
td.dates-cell { white-space: nowrap; }
td.nights-cell { text-align: center; font-weight: 600; }
.stay-summary.bad { color: var(--danger); }
.stay-note { margin-top: 6px; padding: 8px 12px; background: var(--amber-tint); border: 1px solid var(--amber-border-strong); color: var(--amber-dark-text-2); border-radius: 8px; font-size: 13px; }
.clash-msg { margin-top: 8px; padding: 9px 12px; background: var(--red-tint); border: 1px solid var(--red-border); color: var(--red-dark-text); border-radius: 8px; font-size: 13px; font-weight: 600; }
.clash-msg div + div { margin-top: 6px; }
.agreement-banner { margin-bottom: 16px; padding: 12px 14px; border-radius: 8px; font-size: 13px; }
.agreement-banner-pending { background: var(--amber-tint); border: 1px solid var(--amber-border-strong); color: var(--amber-dark-text-2); }
.agreement-banner-declined { background: var(--red-tint); border: 1px solid var(--red-border); color: var(--red-dark-text); }
.agreement-history-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.agreement-history-row:last-child { border-bottom: none; }
#create-booking-btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* Phones: the form's field rows stack, the calendar sits under them, no sideways scroll, 40px+ tap targets */
@media (max-width: 700px) {
  #add-booking-form .add-portal-row { flex-wrap: wrap; }
  #add-booking-form .add-portal-row .field { flex: 1 1 100%; margin-bottom: 4px; }
  #add-booking-form input, #add-booking-form select { min-height: 44px; font-size: 16px; }
  #add-booking-form { padding: 8px; }
  .avail-cal { max-width: none; padding: 4px; }
  .avail-grid { gap: 2px; }
  .avail-day { min-height: 46px; }
}

/* ================= Mobile phone layout (Bundle 2.5 "Mobile web app", Constitution §4) =================
   Superseded 2026-10-19: the Bundle 1.5 "compact strip" above (sidebar turned sideways at the top of the
   page) was a shrunk desktop, not a designed phone layout. Replaced with a bottom tab bar + "More" bottom
   sheet per the approved phone mockups. Desktop (>700px) is untouched -- .bottom-tabs and .more-sheet are
   display:none there, and the sidebar is display:none only below 700px. */
@media (max-width: 700px) {
  .app-shell { flex-direction: column; }
  .sidebar { display: none; }

  /* (2) Slim top bar: a small brand mark takes the sidebar's place inline with the property picker. */
  .topbar { padding: 10px 16px; position: sticky; flex-wrap: wrap; gap: 10px; }
  .topbar-brand-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
    letter-spacing: -0.01em;
  }
  .topbar-brand-mobile .brand-mark {
    width: 24px; height: 24px;
    border-radius: 7px;
    background: var(--primary);
    color: var(--text-on-brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
  }
  .property-switcher { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; max-width: 100%; }
  .property-switcher select { min-width: 0; width: 100%; flex: 1; max-width: 100%; }
  .property-switcher #add-property-btn { flex: 1 1 100%; }

  .main { padding: 16px 16px 84px; } /* bottom padding clears the fixed tab bar + iOS home indicator */
  .card { padding: 14px; }

  /* (3) KPI-style tiles: always 2 per row, never 1-per-row with empty space. */
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-tile { padding: 12px; }
  .kpi-value { font-size: 20px; }
  .commission-tiers,
  .activity-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Bottom tab bar ---- */
.bottom-tabs {
  display: none; /* shown only at <=700px below */
}

@media (max-width: 700px) {
  .bottom-tabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 500;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 4px 4px env(safe-area-inset-bottom, 4px);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
  }
  .bottom-tabs .nav-item,
  .bottom-tab-more {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 6px 2px;
    border: none;
    background: none;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
  }
  .bottom-tabs .nav-item.active,
  .bottom-tabs .bt-icon { color: inherit; }
  .bottom-tabs .nav-item.active { color: var(--primary); font-weight: 700; }
  .bt-icon { font-size: 18px; line-height: 1; }
  .bt-label { font-size: 10px; font-weight: 600; letter-spacing: 0.01em; }
}

/* ---- "More" bottom sheet ---- */
.more-sheet-backdrop {
  display: none;
}
.more-sheet {
  display: none;
}

@media (max-width: 700px) {
  .more-sheet-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 600;
  }
  .more-sheet:not([hidden]) {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 601;
    background: var(--card);
    border-radius: 16px 16px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.18);
  }
  .more-sheet-handle {
    width: 36px; height: 4px;
    border-radius: 999px;
    background: var(--border-mid);
    margin: 4px auto 14px;
  }
  .more-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .more-sheet-header .name { font-weight: 700; font-size: 14px; color: var(--text); }
  .more-sheet-header .role {
    font-size: 11px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px;
  }
  .more-sheet-close {
    border: none; background: var(--bg-alt); color: var(--text-secondary);
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 14px; cursor: pointer;
  }
  #more-sheet-nav-cohost,
  #more-sheet-nav-owner {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .more-sheet .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    padding: 12px 10px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
  }
  .more-sheet .nav-item:hover,
  .more-sheet .nav-item.active { background: var(--bg-alt); color: var(--primary); }
}

/* ===================================================================
   Co-host Dashboard -- Constitution v1.5 Sec.3.1 / PRD/STAYLEDGER_DASHBOARD_SPEC.md
   Section numbers in comments below match that spec file. Scope: co-host
   desktop/laptop (820px+); phone stays on the Bundle 2.5 mobile rules
   (spec Sec.0) and the owner view keeps its pre-v1.5 layout for now.
   =================================================================== */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Sec.2: header -- the month is the page title, no separate heading ---- */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dash-month-title { display: flex; align-items: center; gap: 10px; }
.dash-month-label {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}
.dash-month-nav {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
}
.dash-month-nav:hover { background: var(--bg-alt); }
#view-home .dash-business-today {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 4px 0 0;
}
.dash-header-right { display: flex; align-items: center; gap: 10px; }
/* Spec v1.0.2 follow-up: styled like the mockup's own control, not a plain
   browser <select> -- rounded white box, 40px tall, with its own label. */
.dash-property-field { display: flex; flex-direction: column; gap: 6px; }
.dash-property-field label { font-size: 12px; font-weight: 600; color: var(--text-tertiary); }
.dash-header-right select#property-select,
.dash-property-field select#property-select {
  height: 40px; min-width: 220px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; padding: 0 32px 0 14px; font-size: 14px; font-weight: 600;
  color: var(--text); font-family: inherit; cursor: pointer; box-shadow: var(--shadow-sm);
}

/* ---- Sec.3: the four tiles, two per row ---- */
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.dash-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
/* v1.1: icon and label sit on one line (header row), not icon-above-label. */
.dash-tile-header { display: flex; align-items: center; gap: 10px; }
.dash-tile-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex: none;
}
.dash-tile-receivables .dash-tile-icon { background: #DBEAFE; color: #1E40AF; }
.dash-tile-projected .dash-tile-icon { background: #DCFCE7; color: #15803D; }
.dash-tile-occupancy .dash-tile-icon { background: #EDE9FE; color: #5B21B6; }
.dash-tile-expenses .dash-tile-icon { background: #FEF9C3; color: #854D0E; }
.dash-tile-topay .dash-tile-icon { background: #FEE2E2; color: #B91C1C; }
.dash-tile-nextinvoice .dash-tile-icon { background: #DBEAFE; color: #1E40AF; }
.dash-tile-bookingincome .dash-tile-icon { background: #DCFCE7; color: #15803D; }
.dash-tile-label { font-size: 16px; font-weight: 600; color: #334155; }
/* Tile body: figure/explain/chip on the left, a real-size trend chart
   (~170x64, spec v1.1) beside it on the right -- not a tiny corner sparkline. */
.dash-tile-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.dash-tile-main { min-width: 0; }
.dash-tile-value {
  font-size: 36px; font-weight: 800; color: var(--text); line-height: 1.1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dash-tile-explain { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.dash-tile-trend-wrap { flex: none; width: 170px; text-align: center; }
.dash-tile-trend { width: 170px; height: 64px; display: block; }
.dash-tile-receivables .dash-tile-trend { color: #1E40AF; }
.dash-tile-projected .dash-tile-trend { color: #15803D; }
.dash-tile-occupancy .dash-tile-trend { color: #5B21B6; }
.dash-tile-expenses .dash-tile-trend { color: #854D0E; }
.dash-tile-topay .dash-tile-trend { color: #B91C1C; }
.dash-tile-nextinvoice .dash-tile-trend { color: #1E40AF; }
.dash-tile-bookingincome .dash-tile-trend { color: #15803D; }
.dash-tile-trend-label { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.dash-tile-chip {
  display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; background: var(--bg-alt); color: var(--text-secondary);
  white-space: nowrap;
}
.dash-chip-red { background: #FEE2E2; color: var(--urgent); }
.dash-chip-green { background: var(--green-tint-strong); color: var(--green-dark-text); }
.dash-chip-grey { background: var(--bg-alt); color: var(--text-tertiary); }

/* ---- Sec.4: Availability this month + Still free to sell ---- */
.dash-section { margin-bottom: 20px; }
.dash-avail-layout { display: grid; grid-template-columns: 60% 40%; gap: 24px; align-items: start; margin-top: 14px; }
/* Spec v1.0.2 §4.1: the legend sits beside the donut (never under it) above
   760px; only the phone/narrow breakpoint stacks them. */
.dash-avail-chart { display: flex; flex-direction: row; align-items: center; gap: 24px; }
.dash-donut-wrap { position: relative; width: 260px; height: 260px; }
.dash-donut { width: 100%; height: 100%; }
.dash-donut-centre {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.dash-donut-pct { font-size: 48px; font-weight: 800; color: var(--text); line-height: 1; }
.dash-donut-pct-label { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.dash-avail-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.dash-legend-row { display: flex; align-items: flex-start; gap: 10px; color: var(--text); }
.dash-legend-row strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; }
.dash-legend-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 8px; flex: none; }
.dash-dot-booked { background: #2563EB; }
.dash-dot-free { background: #16A34A; }
.dash-dot-passed { background: #CBD5E1; }
.dash-dot-red { background: var(--urgent); }
.dash-dot-gold { background: #CA8A04; }
.dash-dot-green { background: #16A34A; }
.dash-dot-grey { background: #94A3B8; }
.dash-dot-reconciled { background: var(--accent); }
.dash-dot-projected-outline { background: transparent; border: 2px dashed var(--accent); }
.dash-legend-sub { font-size: 17px; color: var(--text-tertiary); margin-top: 2px; }

.dash-avail-sell { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dash-sell-top { background: #F0FDF4; padding: 16px 18px; }
.dash-sell-top-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--text); gap: 10px; }
.dash-sell-window { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }
.dash-sell-figure { font-size: 50px; font-weight: 800; color: #15803D; line-height: 1.1; margin-top: 6px; white-space: nowrap; }
.dash-sell-note { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.dash-sell-bottom { background: #166534; color: #fff; padding: 16px 18px; }
.dash-sell-bottom-label { font-size: 14px; font-weight: 600; }
.dash-sell-bottom-figure { font-size: 40px; font-weight: 800; line-height: 1.1; margin-top: 4px; white-space: nowrap; }
.dash-sell-bar-track { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.25); margin-top: 12px; overflow: hidden; display: flex; }
.dash-sell-bar-fill { background: #fff; height: 100%; }
.dash-sell-bar-track::after { content: ""; flex: 1; background: repeating-linear-gradient(45deg, rgba(255,255,255,0.45) 0 4px, transparent 4px 8px); }
.dash-sell-bar-labels { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; gap: 10px; }
.dash-sell-bar-labels span:last-child { text-align: right; }

.dash-avail-divider { border-top: 1px solid var(--border); margin: 20px 0 14px; }
.dash-byproperty-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.dash-byproperty-head h2, .dash-byproperty-head span#dash-byproperty-heading { font-size: 16px; font-weight: 700; color: var(--text); }
.dash-byproperty-hint { font-size: 12px; color: var(--text-tertiary); }
.dash-byproperty-toggle { padding: 4px 12px; font-size: 12px; }
.dash-byproperty-rows { display: flex; flex-direction: column; gap: 8px; }
.dash-byproperty-row { display: grid; grid-template-columns: 180px 1fr 260px; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.dash-byproperty-name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-byproperty-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-alt); }
.dash-byproperty-figs { color: var(--text-secondary); white-space: nowrap; text-align: right; }
.dash-byproperty-figs strong { color: var(--success); }

/* ---- Shared summary-strip + list patterns (Sec.5/6/7) ---- */
/* Spec v1.0.2 §1: every section header (4-9) gets a 40px coloured icon
   tile beside a 22px title, with the explanation line under the title.
   Only the summary strip is tinted -- the section card itself stays
   white, even for Property watchlist (was wrongly tinted before). */
.dash-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.dash-section-head-link { justify-content: space-between; }
.dash-section-head-left { display: flex; align-items: flex-start; gap: 12px; }
.dash-section-head-text h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); }
.dash-section-explain { margin: 2px 0 0; font-size: 14px; color: var(--text-tertiary); }
.dash-section-icon-tile {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #DBEAFE; color: #1E40AF;
}
.dash-icon-tile-blue { background: #DBEAFE; color: #1E40AF; }
.dash-icon-tile-red { background: #FEE2E2; color: #DC2626; }
.dash-icon-tile-indigo { background: #E0E7FF; color: #4F46E5; }
.dash-icon-tile-gold { background: #FEF9C3; color: #854D0E; }
.dash-icon-tile-violet { background: #EDE9FE; color: #5B21B6; }
.dash-icon-tile-green { background: #DCFCE7; color: #15803D; }
.dash-section-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }

/* Summary strip, "Option B" (spec v1.1): four separate tinted blocks
   sitting directly on the white card -- no outer tinted panel, no split
   bar (both removed from v1.0.2's design). */
.dash-strip-b {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 12px 0 16px;
}
.dash-strip-block {
  border-radius: 12px; padding: 14px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.dash-strip-figure { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.dash-strip-label { font-size: 14px; font-weight: 600; color: #334155; }
.dash-strip-detail { font-size: 13px; color: var(--text-tertiary); }

.dash-list-head {
  display: grid; gap: 10px; padding: 0 12px 8px; font-size: 12px; font-weight: 700;
  color: var(--text-tertiary); text-transform: none;
}
.dash-wl-cols { grid-template-columns: 2fr 1.1fr 1.2fr 1.1fr 1.6fr; }
.dash-rec-cols { grid-template-columns: 1.8fr 1.4fr 1.1fr 0.8fr 1fr 1.1fr; }
.dash-bk-cols { grid-template-columns: 1.6fr 1.6fr 1fr 0.6fr 1fr 1fr; }
.dash-list-row {
  display: grid; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 8px; font-size: 15px; color: var(--text); background: var(--card);
}
.dash-row-overdue { background: #FFFBFB; }
.dash-row-property { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dash-row-property > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dash-row-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; white-space: nowrap; }
.dash-urgent-text { color: var(--urgent); font-weight: 600; }
.dash-badge-square, .dash-badge-round {
  width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: #FEF9C3; color: #854D0E;
}
.dash-badge-square { border-radius: 8px; }
.dash-badge-round { border-radius: 50%; background: #EDE9FE; color: #5B21B6; }
.dash-mini-bar { display: inline-block; width: 60px; height: 6px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.dash-mini-bar div { height: 100%; background: #CA8A04; }
.dash-portal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }

.dash-pill {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--pill-text); white-space: nowrap;
}
.dash-flag-red { border-color: #FCA5A5; color: var(--urgent); }
.dash-flag-gold { border-color: #FDE68A; }
.dash-flag-green { border-color: #BBF7D0; }
.dash-flag-violet { border-color: #DDD6FE; }

.dash-list-totals { font-size: 13px; color: var(--text-tertiary); padding: 6px 12px 0; }
.dash-show-all { margin: 4px 0 0; font-size: 13px; padding: 7px 14px; }

/* ---- Sec.8: How your bookings come in ---- */
.dash-howin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 14px 0 18px; }
.dash-howin-stat { display: flex; flex-direction: column; gap: 4px; }
.dash-howin-value { font-size: 28px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.dash-howin-label { font-size: 13px; color: var(--text-tertiary); }
.dash-portal-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--bg-alt); margin-bottom: 10px; }
.dash-portal-mix { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text); }
.dash-portal-mix-row { display: flex; align-items: center; }

/* ---- Sec.9: Commission by month ---- */
.dash-cbm-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 10px; height: 180px; margin-top: 14px; }
.dash-cbm-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.dash-cbm-value { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.dash-cbm-bar { width: 60%; min-height: 4px; border-radius: 6px 6px 0 0; }
.dash-cbm-bar-reconciled { background: var(--accent); }
.dash-cbm-bar-projected { background: #BFDBFE; border: 2px dashed var(--accent); }
.dash-cbm-label { font-size: 12px; color: var(--text-tertiary); }
.dash-cbm-legend { display: flex; gap: 18px; font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.dash-cbm-legend span { display: flex; align-items: center; gap: 6px; }

/* ---- Sec.11: screen-width rules ---- */
@media (max-width: 1380px) {
  .dash-donut-wrap { width: 260px; height: 260px; }
}
@media (max-width: 1240px) {
  .dash-avail-layout { grid-template-columns: 1fr; }
  .dash-donut-wrap { width: 300px; height: 300px; }
  /* The trend line moves under the text instead of squeezing it (spec
     Sec.3 rule), rather than disappearing. */
  .dash-tile-body { flex-direction: column; align-items: stretch; }
  .dash-tile-trend-wrap { width: 100%; text-align: left; }
  .dash-tile-trend { width: 100%; height: 56px; }
}
@media (max-width: 1100px) {
  .dash-strip-b { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .dash-byproperty-row { grid-template-columns: 1fr; gap: 6px; }
  .dash-byproperty-figs { text-align: left; }
}
@media (max-width: 960px) {
  /* Only the list itself scrolls sideways (spec Sec.11: "never the
     page") -- the section header and summary strip above it stay put. */
  .dash-scroll-wrap { overflow-x: auto; }
  .dash-wl-cols, .dash-rec-cols, .dash-bk-cols { min-width: 760px; }
}
@media (max-width: 760px) {
  /* v1.1: tiles stay 2x2 all the way down (not 1-per-row) -- the "2x2"
     rule in spec Sec.3/11 is deliberate, so a narrow laptop/tablet window
     never gets a single dangling tile. */
  .dash-donut-wrap { width: 240px; height: 240px; }
  .dash-avail-chart { flex-direction: column; }
  .dash-avail-legend { width: 100%; }
}

/* ===================================================================
   My Day (Bundle 3) -- PRD/STAYLEDGER_MYDAY_SPEC.md v1.1, approved 26 Oct
   2026. Frame, sidebar, fonts and colours are the Dashboard's own (spec
   Sec.3) -- reuses .dash-header / .dash-section-head / .dash-strip-b etc.
   directly; only what's genuinely new to this screen gets its own class.
   =================================================================== */
.dash-icon-tile-red { background: #FEE2E2; color: #B91C1C; }

/* Sec.3.1: Back button, above the title. */
.myday-back-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-secondary); padding: 0 0 10px; margin: 0;
}
.myday-back-btn:hover { color: var(--text); }
.myday-back-btn svg { width: 15px; height: 15px; }

/* Header controls sit as their OWN .dash-header flex child (not nested in
   .dash-header-right, which the Dashboard's phone rule hides outright) --
   on phone only the property field moves to the top bar; the segmented
   control stays on the page, restyled full width (see the phone block). */
.myday-header-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Sec.3.1: Yesterday / Today / Tomorrow / This week, on a grey track. */
.myday-seg { display: inline-flex; background: #E2E8F0; border-radius: 10px; padding: 3px; gap: 2px; }
.myday-seg-btn {
  padding: 8px 14px; border: none; background: transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; white-space: nowrap;
}
.myday-seg-btn.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.myday-seg-short { display: none; }

/* Sec.3.2 v1.2: "Today at a glance" -- hero card, Needs you today, Money.
   Appendix B (28 Oct 2026, Option A): replaces the six equal count blocks. */
.myday-hero {
  display: flex; gap: 28px; padding: 28px; border-radius: 18px; color: #fff; margin-bottom: 20px;
  background: linear-gradient(120deg, #1E3A8A 0%, #1D4ED8 55%, #3B82F6 100%);
}
.myday-hero-left { flex: 0 0 330px; min-width: 0; }
.myday-hero-next-label { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 600; }
.myday-hero-next-headline { font-size: 22px; font-weight: 800; margin-top: 4px; line-height: 1.25; }
.myday-hero-next-subline { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 3px; }
.myday-hero-numbers { display: flex; gap: 10px; margin-top: 18px; }
.myday-hero-number-box {
  flex: 1; min-width: 0; background: #fff; border-radius: 12px; padding: 12px 10px;
  box-shadow: var(--shadow-md); text-align: center;
}
.myday-hero-number-figure { font-size: 32px; font-weight: 800; line-height: 1.1; }
.myday-hero-number-label { font-size: 12px; font-weight: 700; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.myday-hero-marker-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.myday-hero-marker-sq { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.myday-hero-right { flex: 1; min-width: 0; }
.myday-hero-tl-label { font-size: 13px; color: rgba(255,255,255,0.85); font-weight: 600; margin-bottom: 18px; }
.myday-hero-tl-wrap { position: relative; height: 84px; }
.myday-hero-tl-track { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: rgba(255,255,255,0.35); }
.myday-hero-tl-tick { position: absolute; top: 25px; width: 1px; background: rgba(255,255,255,0.3); }
.myday-hero-tl-tick.hour { height: 12px; background: rgba(255,255,255,0.5); }
.myday-hero-tl-tick.half { height: 6px; }
.myday-hero-tl-dot {
  position: absolute; top: 24px; width: 12px; height: 12px; border-radius: 50%;
  transform: translateX(-50%); box-shadow: 0 0 0 2px #fff;
}
.myday-hero-tl-dot.departure { background: #EF4444; }
.myday-hero-tl-dot.arrival { background: #22C55E; }
.myday-hero-tl-now-line { position: absolute; top: 14px; bottom: 14px; width: 2px; background: #fff; transform: translateX(-50%); }
.myday-hero-tl-now-label { position: absolute; top: -2px; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; }
.myday-hero-tl-labels { position: absolute; left: 0; right: 0; top: 46px; height: 16px; }
.myday-hero-tl-labels span { position: absolute; transform: translateX(-50%); font-size: 12px; color: rgba(255,255,255,0.75); white-space: nowrap; }
.myday-hero-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,0.85); margin-top: 10px; }
.myday-hero-legend .myday-hero-marker-dot, .myday-hero-legend .myday-hero-marker-sq { margin-right: 5px; }
.myday-hero-now-marker { display: inline-block; width: 2px; height: 11px; border-radius: 1px; background: #fff; margin-right: 6px; vertical-align: middle; flex: none; }

.myday-glance-card-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; color: var(--text); }
.myday-glance-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border);
  cursor: pointer; border-radius: 8px;
}
.myday-glance-row:last-child { border-bottom: none; }
.myday-glance-row:hover { background: var(--bg-alt); }
.myday-glance-sq {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 15px; font-weight: 800;
}
.myday-glance-sq.red { background: #FEF2F2; color: var(--urgent); }
.myday-glance-sq.gold { background: #FEFCE8; color: #A16207; }
.myday-glance-sq.green { background: var(--green-tint); color: var(--green-dark-text); }
.myday-glance-text { flex: 1; min-width: 0; }
.myday-glance-title { font-size: 14px; font-weight: 700; color: var(--text); }
.myday-glance-detail { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.myday-glance-chev { flex: none; color: var(--text-tertiary); font-size: 18px; }
.myday-glance-all-set { display: flex; align-items: center; gap: 10px; color: var(--green-dark-text); font-weight: 700; font-size: 14px; padding: 6px 2px; }
.myday-glance-empty { color: var(--text-tertiary); font-size: 14px; padding: 6px 2px; }
.myday-glance-highlight { background: #FEF3C7 !important; }

@media (max-width: 1240px) {
  .myday-hero { flex-direction: column; }
  .myday-hero-left { flex: none; width: 100%; }
}
@media (max-width: 700px) {
  .myday-hero { padding: 20px; gap: 18px; }
  .myday-hero-next-headline { font-size: 18px; }
  .myday-hero-number-figure { font-size: 26px; }
  .myday-hero-numbers { gap: 8px; }
  .myday-hero-tl-labels span.myday-hero-tl-label-alt { display: none; }
}

/* Shared legend (Sec.3.3/3.5) + bordered-card rows (change #13: every
   desktop row is a bordered card, not a plain list line).
   Cleaning plan accents recoloured violet -> indigo #4F46E5 (Tushar, 28 Oct
   2026), to match the hero's indigo "cleanings" number -- class names below
   keep saying "violet" (cheaper than renaming the class + its one JS
   reader), only the colour value changed. */
.myday-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-tertiary); margin: 10px 0 14px; align-items: center; }
.myday-legend-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.myday-legend-blue { background: #DC2626; } /* class name is historical: "guest leaves" is red, matching the hero (Tushar, 3 Nov 2026) */
.myday-legend-green { background: #15803D; }
.myday-legend-dotted-violet {
  background-image: linear-gradient(to right, #4F46E5 50%, transparent 50%); background-size: 6px 3px; background-repeat: repeat-x;
}
.myday-legend-swatch { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.myday-legend-window { background: #FEF3C7; }
.myday-legend-ci { background: #16A34A; }
.myday-legend-co { background: #2563EB; }

.myday-rows { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.myday-row {
  display: flex; align-items: flex-start; gap: 14px; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px; min-width: 0;
}
.myday-row-time { font-size: 18px; font-weight: 700; flex: none; width: 56px; }
.myday-row-time.leaving { color: #DC2626; }
.myday-row-time.arriving { color: #15803D; }
.myday-row-main { flex: 1; min-width: 0; }
.myday-row-guest { font-size: 15px; font-weight: 600; color: var(--text); }
.myday-row-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.myday-row-sub .myday-portal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: var(--text-tertiary); vertical-align: middle; }
.myday-row-note { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.myday-row-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 8px; }
.myday-change-link { font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; white-space: nowrap; }
.myday-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--bg-alt); color: var(--text-secondary); white-space: nowrap; flex: none; }
.myday-pill-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.myday-pill-gold .myday-pill-dot { background: #D97706; }
.myday-pill-red { color: var(--urgent); }
.myday-pill-red .myday-pill-dot { background: var(--urgent); }
.myday-empty-note { margin: 4px 0 0; }

/* "Time not set" rows: gold label + a real time box + Set time button. */
.myday-time-not-set-label {
  display: inline-block; background: #FEF3C7; color: #A16207; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 8px; text-align: center; flex: none; width: 56px;
}
.myday-time-input-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: nowrap; max-width: 100%; }
.myday-time-input { height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; font-size: 14px; flex: 0 1 auto; width: 110px; min-width: 110px; font-family: inherit; }
.myday-set-time-btn { height: 40px; width: auto; padding: 0 16px; flex: none; }

/* Sec.3.4: Next two days. */
.myday-upcoming-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .myday-upcoming-cols { grid-template-columns: 1fr; } }
.myday-upcoming-day-label { font-size: 13px; font-weight: 700; color: var(--text-tertiary); margin-bottom: 8px; }
.myday-upcoming-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.myday-upcoming-row:last-child { border-bottom: none; }
.myday-upcoming-row > div:last-child { flex: none; max-width: 100%; }
.myday-upcoming-guest { font-size: 14px; font-weight: 600; color: var(--text); }
.myday-upcoming-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.myday-upcoming-time { font-size: 16px; font-weight: 700; color: #15803D; }

/* Sec.3.5: Cleaning plan. */
.myday-cleaner-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.myday-cleaner-pill { font-size: 12px; font-weight: 600; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.myday-cleaner-pill .myday-pill-dot { background: #4F46E5; }
.myday-cleaner-pill.not-assigned { color: var(--urgent); font-weight: 700; }
.myday-cleaner-pill.not-assigned .myday-pill-dot { background: var(--urgent); }

.myday-cleaning-row {
  display: grid; grid-template-columns: 210px 1fr 180px 172px; gap: 18px; align-items: center;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px;
}
@media (min-width: 1241px) and (max-width: 1480px) {
  .myday-cleaning-row { grid-template-columns: 170px 1fr 160px 160px; gap: 12px; }
}
/* Below 1240px (spec Sec.3.5: "the bar moves under the text"): name+reason
   and ready-by share a top row, the bar runs full width under them, the
   cleaner picker last -- named areas so this doesn't depend on source
   order the way a plain "order:2" once did (that pushed the bar to the
   very bottom at phone width instead of its proper middle position). */
@media (max-width: 1240px) {
  .myday-cleaning-row {
    grid-template-columns: 1fr auto; grid-template-areas: "name ready" "bar bar" "cleaner cleaner";
    gap: 10px 14px; align-items: start;
  }
  .myday-cleaning-name-block { grid-area: name; }
  .myday-co-bar-wrap { grid-area: bar; }
  .myday-ready-by-wrap { grid-area: ready; text-align: right; }
  .myday-cleaning-cleaner-wrap { grid-area: cleaner; }
}
/* Phone only: every piece full width, in this exact order (Tushar, 26 Oct review) --
   name/out/reason, then "Ready by HH:MM" on one line, then window+status, then the
   bar, then the cleaner picker. Named areas so order doesn't depend on source order. */
@media (max-width: 700px) {
  .myday-cleaning-row {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "ready" "bar" "cleaner";
  }
  .myday-ready-by-wrap { text-align: left; }
  .myday-ready-by-top { display: flex; align-items: baseline; gap: 8px; }
  .myday-ready-by-label { display: inline; }
  .myday-co-figure { display: inline; }
}
.myday-co-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.myday-co-line { font-size: 13px; margin: 2px 0; }
.myday-co-line-out { color: #DC2626; }
.myday-co-reason { font-size: 13px; margin-top: 2px; }
.myday-co-reason.green { color: #15803D; }
.myday-co-reason.violet { color: #4F46E5; }
.myday-co-bar-wrap { position: relative; }
.myday-co-bar { position: relative; height: 34px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.myday-co-bar-window { position: absolute; top: 0; bottom: 0; }
.myday-co-bar-window.level-red { background: #FEE2E2; }
.myday-co-bar-window.level-gold { background: #FEF3C7; }
.myday-co-bar-window.level-green { background: #DCFCE7; }
.myday-co-bar-tomorrow {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: #15803D;
}
.myday-co-bar-mark { position: absolute; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; }
.myday-co-bar-mark.dep { background: #DC2626; }
.myday-co-bar-mark.arr { background: #15803D; }
.myday-co-bar-mark.cutoff { background-image: linear-gradient(to bottom, #4F46E5 50%, transparent 50%); background-size: 3px 6px; background-repeat: repeat-y; width: 2px; }
.myday-co-bar-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-tertiary); }
.myday-ready-by-top { display: block; }
.myday-ready-by-label { display: block; font-size: 13px; color: var(--text-tertiary); }
.myday-ready-by-note { font-size: 13px; color: #64748B; margin-top: 2px; }
.myday-co-figure { display: block; font-size: 22px; font-weight: 800; }
.myday-co-figure.level-red { color: var(--urgent); }
.myday-co-figure.level-gold { color: #A16207; }
.myday-co-figure.level-green { color: var(--success); }
.myday-co-figure-line { font-size: 13px; margin-top: 2px; color: var(--text-secondary); }
.myday-cleaner-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; }
.myday-cleaner-select {
  width: 100%; min-width: 172px; height: 40px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 10px; font-size: 13px; font-family: inherit; background: #fff; color: var(--text);
}
.myday-cleaner-select.not-assigned { background: #FEE2E2; color: var(--urgent); border-color: #FCA5A5; font-weight: 600; }
.myday-footnote-wrap { margin: 14px 0 0; }
.myday-footnote { font-size: 12px; color: var(--text-tertiary); margin: 0; }
.myday-footnote-toggle {
  font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: none;
  cursor: pointer; padding: 0; margin-top: 6px; text-decoration: underline;
}
.myday-footnote-detail { margin-top: 8px; }

/* Sec.3.4/3.6: two-column card layout, side by side above 1240px. */
.myday-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.myday-two-col.myday-two-col-single { grid-template-columns: 1fr; }
.myday-two-col > .card { min-width: 0; }
@media (max-width: 1240px) {
  .myday-two-col { grid-template-columns: 1fr; }
}

/* Sec.3.6: ready-to-invoice banner -- solid green button, not underlined. */
.myday-ready-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--green-tint-strong, #DCFCE7); border: 1px solid #BBF7D0; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 20px;
}
.myday-ready-text { display: flex; align-items: center; gap: 14px; }
.myday-ready-icon { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #15803D; display: flex; align-items: center; justify-content: center; flex: none; }
.myday-ready-headline { font-size: 16px; font-weight: 700; color: var(--green-dark-text, #15803D); }
.myday-ready-detail { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.myday-ready-btn { background: #15803D; border-color: #15803D; color: #fff; text-decoration: none !important; }
.myday-ready-btn:hover { background: #166534; }

/* Sec.3.7: reconciliation age pills -- 1-2d gold, 3-5d red dot, 6+d red dot+text. */
.myday-age-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.myday-age-pill .myday-pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.myday-age-gold { background: #FEF3C7; color: #A16207; }
.myday-age-gold .myday-pill-dot { background: #D97706; }
.myday-age-red-dot { background: var(--bg-alt); color: var(--text-secondary); }
.myday-age-red-dot .myday-pill-dot { background: var(--urgent); }
.myday-age-red { background: #FEE2E2; color: var(--urgent); }
.myday-age-red .myday-pill-dot { background: var(--urgent); }
.myday-reconcile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
.myday-reconcile-main { flex: 1; min-width: 0; }
.myday-reconcile-guest { font-size: 15px; font-weight: 600; color: var(--text); }
.myday-reconcile-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.myday-reconcile-right { display: flex; align-items: center; gap: 12px; flex: none; }

/* Sec.3.7: This week bar chart. */
.myday-week-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; margin: 24px 0 6px; }
.myday-week-day { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.myday-week-day.is-today { background: var(--bg-alt); border-radius: 8px; }
.myday-week-bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; flex: 1; width: 100%; justify-content: center; }
.myday-week-bar { width: 10px; border-radius: 3px 3px 0 0; position: relative; }
.myday-week-bar.ci { background: #16A34A; }
.myday-week-bar.co { background: #2563EB; }
.myday-week-bar-fig { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.myday-week-day-label { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }
.myday-week-day.is-today .myday-week-day-label { color: var(--text); font-weight: 700; }
.myday-week-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-tertiary); }

/* Sec.3.8: quick actions. */
.myday-quick-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.myday-quick-actions-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.myday-quick-actions-btns a { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.myday-quick-actions-btns button { display: inline-flex; align-items: center; gap: 6px; }
.myday-quick-actions-btns button svg { width: 15px; height: 15px; }

/* "This week" date view: per-day grouped lists, and the week chart goes
   full width (stacked single-column with To reconcile instead of sharing
   a row), spec Sec.3.7. */
.myday-week-day-group { margin-bottom: 20px; }
.myday-week-day-group h3 { font-size: 16px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.myday-reconcile-week-row.myday-week-row-stack { grid-template-columns: 1fr; }
.myday-reconcile-week-row.myday-week-row-stack #myday-reconcile-card { order: 2; }
.myday-reconcile-week-row.myday-week-row-stack #myday-week-card { order: 1; }

/* Phone-only twin chip text (spec v1.1 Sec.14): short version hidden by
   default, swapped in below 700px. See renderDashTiles() in app.js. */
.dash-chip-short { display: none; }

/* ===================================================================
   Sec.14: Phone layout of the Dashboard (<=700px) -- spec v1.1, approved
   25 Oct 2026. Reference: PRD/Dashboard_v1.1_reference/3_phone.png.
   =================================================================== */
.dash-cards { display: none; }
@media (max-width: 700px) {
  /* Top bar: logo + property picker only -- "+ New property" removed from
     the Dashboard specifically (it still shows on every other phone
     screen, unchanged). The picker itself is the topbar's own select,
     per placePropertyPicker() in app.js -- .dash-header-right stays empty
     and hidden here, not duplicated. */
  body.dash-active #add-property-btn { display: none; }
  .dash-header-right { display: none; }

  /* Header: smaller title, "your business today" line dropped. */
  .dash-month-label { font-size: 24px; }
  #view-home .dash-business-today { display: none; }

  /* Tiles: 2x2 (unchanged from 760px), no trend line, no explanation
     line, chip text shortens via the twin-span swap above. */
  /* Grid items default to min-width:auto (content-based), not 0 -- the
     same class of bug as the Commission-by-month columns above. A long
     nowrap chip ("+349% vs September") was inflating the tile's min
     content size past half the 360px grid, pushing the whole row past
     the viewport even with max-width/ellipsis on the chip itself, since
     that only works once the container's own width is actually
     constrained. */
  .dash-tile { padding: 14px; min-width: 0; }
  .dash-tile-icon { width: 22px; height: 22px; font-size: 11px; }
  .dash-tile-label { font-size: 13px; }
  .dash-tile-value { font-size: 22px; }
  .dash-tile-explain { display: none; }
  .dash-tile-trend-wrap { display: none; }
  .dash-tile-body { margin-top: 6px; }
  .dash-chip-full { display: none; }
  .dash-chip-short { display: inline; }
  /* Occupancy and Projected commission have no full/short twin-span (only
     Receivables does) -- their chip text length varies with real data
     ("+349% vs September"), so truncate with an ellipsis at tile width
     instead of letting it push the tile past the viewport (25 Oct 2026,
     found when the Projected-commission chip started rendering real
     percentages for the first time). */
  .dash-tile-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  /* Summary strips: 2x2, smaller figures. */
  .dash-strip-b { grid-template-columns: repeat(2, 1fr); }
  .dash-strip-figure { font-size: 20px; }
  .dash-strip-label { font-size: 12px; }

  /* Lists -> cards: no sideways scrolling anywhere. */
  .dash-scroll-wrap { overflow-x: visible; }
  .dash-wl-cols, .dash-rec-cols, .dash-bk-cols { min-width: 0; }
  .dash-list-head { display: none; }
  .dash-list-row { display: none; }
  .dash-cards { display: flex; flex-direction: column; gap: 8px; }
  .dash-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  }
  .dash-card-top { display: flex; align-items: flex-start; gap: 10px; }
  .dash-card-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; color: var(--text); }
  .dash-card-top > .dash-pill { flex: none; }
  .dash-card-pill-wrap { flex: none; text-align: right; }
  .dash-card-next-step { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
  .dash-card-divider { border-top: 1px solid var(--border); margin: 10px 0; }
  .dash-card-figs { display: flex; justify-content: space-between; gap: 8px; }
  .dash-card-figs > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .dash-card-fig-label { font-size: 12px; color: var(--text-tertiary); }
  .dash-card-fig-value { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* By property: the existing row layout becomes a card -- same markup,
     spec Sec.14 asks for no structural change here, just card styling. */
  .dash-byproperty-row {
    border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 8px;
  }

  /* How your bookings come in: stays a 3-column row, smaller figures. */
  .dash-howin-value { font-size: 20px; }

  /* Commission by month: only the last two months' value labels, so six
     narrow columns don't collide. */
  .dash-cbm-col:not(:nth-last-child(-n+2)) .dash-cbm-value { display: none; }
  .dash-cbm-chart { gap: 4px; }
  .dash-cbm-label { font-size: 11px; }
  .dash-cbm-value { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* ===================================================================
   My Day phone layout (<=700px) -- spec Sec.5, follows the Dashboard's
   own Sec.14 rules (slim top bar, cards, no sideways scrolling).
   =================================================================== */
@media (max-width: 700px) {
  body.myday-active #add-property-btn { display: none; }
  /* Only the property field moves to the top bar (same slot as the
     Dashboard's); the segmented control stays on the page, full width. */
  body.myday-active .dash-property-field { display: none; }
  .myday-back-btn-top-wrap { display: none; } /* top bar's own back arrow takes over, see JS */
  .myday-header-controls { width: 100%; }
  .myday-seg { width: 100%; }
  .myday-seg-btn { flex: 1; padding: 8px 4px; }
  .myday-seg-full { display: none; }
  .myday-seg-short { display: inline; }

  /* Sec.5: Cleaning plan card -- the >=1240px breakpoint already lays this
     out as name+reason / ready-by on top, bar full width, cleaner picker
     last (named grid areas); phone only needs to drop the bar's hour
     labels and guarantee the picker's 172px minimum. */
  .myday-co-bar-labels { display: none; }
  .myday-cleaner-select { min-width: 172px; }

  .myday-row { padding: 10px; }

  /* Sec.3.6: full-width button. */
  .myday-ready-banner { flex-direction: column; align-items: stretch; }
  .myday-ready-btn { width: 100%; text-align: center; }

  /* Sec.3.7: reconciliation cards (first 3 by default, see renderMyDayReconcile). */
  .myday-reconcile-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .myday-reconcile-right { width: 100%; justify-content: space-between; }

  /* This week chart scales to width (flex already does this; just
     tighten the bar gap so 7 columns fit at 360px). */
  .myday-week-chart { gap: 4px; height: 110px; margin-top: 22px; }
  .myday-week-bars { gap: 2px; }
  .myday-week-bar { width: 8px; }
  .myday-week-bar-fig { font-size: 10px; }

  .myday-quick-actions-row { flex-direction: column; align-items: stretch; }
  .myday-quick-actions-btns { flex-direction: column; }
  .myday-quick-actions-btns a, .myday-quick-actions-btns button { width: 100%; }
  .myday-upcoming-cols { grid-template-columns: 1fr; }
}


/* ===================================================================
   Owner Dashboard v1.0 -- PRD/STAYLEDGER_OWNER_DASHBOARD_SPEC.md.
   Reuses the co-host Dashboard's tiles (.dash-tile*), section header
   (.dash-section-head), summary strip (.dash-strip-b), donut, sparkline,
   list row/head (.dash-list-row/.dash-list-head/.dash-cards) and the
   My Day status-pill pattern (.myday-pill/.myday-pill-dot) throughout --
   only genuinely new pieces (fee box, cost chart, expense cards, the
   owner-only column widths) get their own classes below.
   =================================================================== */

.owner-dash-badge { font-size: 13px; font-weight: 600; color: #15803D; white-space: nowrap; }

/* ---- Sec.3.3: Availability (no commission-if-sold panel, no by-property) ---- */
.owner-avail-sell { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.owner-sell-extra { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text); }
.owner-sell-extra-label { color: var(--text-tertiary); }

/* ---- Sec.3.4: Running costs ---- */
.owner-feebox {
  background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 10px; padding: 12px 16px;
  font-size: 14px; color: var(--text); margin-bottom: 16px; line-height: 1.5;
}
.owner-costs-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin: 20px 0; }
@media (max-width: 1100px) { .owner-costs-layout { grid-template-columns: 1fr; } }
.owner-subheading { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.owner-costs-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-tertiary); margin-bottom: 10px; }
.owner-costs-legend span { display: flex; align-items: center; gap: 5px; }
.owner-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.owner-costs-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 10px; height: 180px; }
.owner-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.owner-bar-fig { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
/* Owner Dashboard review (28 Oct 2026, item 6): the track's own grey
   background used to show through above the stacked segments on every
   bar, making a quiet month look like a solid grey column rather than a
   short coloured one -- removed, so only the real expense segments show. */
.owner-bar-track { width: 60%; min-width: 16px; height: 100%; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; }
.owner-bar-seg { width: 100%; }
.owner-bar-label { font-size: 12px; color: var(--text-tertiary); }
.owner-bar-col.is-current .owner-bar-label { font-weight: 700; color: var(--text); }
/* The current month is still accumulating, not a finished total like the
   other 5 -- lightened so it visibly reads as "in progress". */
.owner-bar-col.is-current .owner-bar-seg { opacity: 0.55; }
.owner-bar-col.is-current .owner-bar-fig { color: var(--text-secondary); }

.owner-heads-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.owner-heads-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.owner-heads-table td:first-child { display: flex; align-items: center; gap: 6px; white-space: normal; }
.owner-heads-table td:not(:first-child) { text-align: right; }
.owner-heads-col-labels td { font-size: 12px; color: var(--text-tertiary); font-weight: 700; border-bottom: none; padding-bottom: 4px; }
.owner-heads-col-labels td:first-child { visibility: hidden; }
.owner-heads-total td { font-weight: 800; border-bottom: none; border-top: 2px solid var(--border); padding-top: 10px; }

.owner-expense-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; background: var(--card);
}
.owner-expense-title { font-size: 15px; font-weight: 600; color: var(--text); }
.owner-expense-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.owner-expense-amount { font-size: 15px; font-weight: 700; color: var(--text); text-align: right; flex: none; }
.owner-expense-note { font-size: 12px; font-weight: 400; color: var(--text-tertiary); margin-top: 2px; }
.owner-expense-amount .receipt-link { display: block; font-size: 13px; font-weight: 600; margin-top: 4px; }

.owner-footnote { font-size: 13px; color: var(--text-tertiary); margin: 14px 0 0; }

/* ---- Sec.3.5: Your account ---- */
.owner-acct-cols { grid-template-columns: 0.8fr 1.8fr 1fr 1.4fr 1fr; }
.owner-acct-item-label { font-size: 15px; font-weight: 600; color: var(--text); }
.owner-acct-breakdown { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.owner-acct-amount { font-weight: 700; color: var(--text); }
.owner-acct-doc { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: underline; }
.owner-acct-doc-disabled { font-size: 13px; color: var(--text-tertiary); }

/* ---- Sec.3.6: Bookings at your property ---- */
.owner-bk-cols { grid-template-columns: 1.6fr 1.3fr 0.6fr 1.2fr 1.2fr; }
.owner-bk-guest { font-size: 15px; font-weight: 600; color: var(--text); }
.owner-bk-portal { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; display: flex; align-items: center; }
.owner-bk-commission-amount { font-weight: 700; color: var(--text); }
.owner-bk-commission-label { font-size: 12px; color: var(--text-tertiary); }

/* ---- Phone cards shared by Account and Bookings (simplified vs. the
   co-host Dashboard's badge+3-figure card -- a single property's own
   screen doesn't need the owner/property identification those carry). ---- */
.owner-row-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 8px; background: var(--card); }
.owner-row-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.owner-row-card-top strong { font-size: 15px; color: var(--text); }
.owner-row-card-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 6px; }
.owner-row-card-amount { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 6px; }

@media (max-width: 960px) {
  .owner-acct-cols, .owner-bk-cols { min-width: 760px; }
}

/* ---- Phone (<=700px): tiles already 2x2 via the shared .dash-tiles rule;
   Running costs chart/table stack, with the table losing its last-month
   column (spec Sec.4). ---- */
@media (max-width: 700px) {
  .owner-costs-layout { grid-template-columns: 1fr; gap: 20px; }
  .owner-heads-table .owner-lastmonth-col { display: none; }
}


/* ================= Accounts build (Tushar, 1 Nov 2026) =================
   Signed-out pages, Change password, invites, Users page. Same tokens, cards,
   fields and buttons as the rest of the app; nothing below 12px. */

.auth-card[hidden] { display: none; }
.auth-links { margin-top: 18px; text-align: center; }
.auth-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }
.auth-ok {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--green-tint);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  color: var(--green-dark-text);
  font-size: 13px;
  font-weight: 600;
}
.pw-rules { margin-top: 6px; font-size: 12px; color: var(--text-tertiary); }
.login-card .field input[readonly] { background: var(--bg); color: var(--text-secondary); }

/* + New property: the "invite a new owner" fields sit under the row */
.inline-form { flex-wrap: wrap; }
.invite-fields { flex: 1 1 100%; display: flex; gap: 10px; flex-wrap: wrap; }
.invite-fields .field { margin-bottom: 0; flex: 1 1 180px; }
.invite-fields-error { flex: 1 1 100%; margin-top: 0; }

/* Status pills for invites/users -- own class so the 11px .badge is left alone */
.acct-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.acct-pill.ok { background: var(--green-tint-strong); color: var(--success); }
.acct-pill.wait { background: var(--amber-tint-strong); color: var(--amber-dark-text); }
.acct-pill.off { background: var(--bg-alt); color: var(--text-secondary); }
.acct-pill.bad { background: var(--red-tint); color: var(--red-dark-text); }

.acct-row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.acct-owner-line { font-size: 14px; margin: 0 0 4px; }
.acct-owner-line strong { font-weight: 700; }
.acct-muted { font-size: 13px; color: var(--text-secondary); margin: 0; }
.acct-invite-form { margin-top: 14px; }

/* Users page */
.table-scroll { overflow-x: auto; }
table.acct-table th { font-size: 12px; }
table.acct-table td { font-size: 14px; vertical-align: middle; }
.acct-tenant-card h2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.acct-tenant-card h2 .acct-muted { font-weight: 500; }
.acct-user-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-user-actions .btn-secondary { padding: 7px 12px; font-size: 13px; }
.acct-reason-row td { background: var(--bg); }
.acct-reason { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acct-reason input { flex: 1 1 220px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; }
.acct-danger { color: var(--danger) !important; border-color: var(--danger) !important; }

#bottom-tabs-admin .bt-label { font-size: 12px; }

@media (max-width: 700px) {
  .login-card { padding: 32px 24px; }
  .inline-form { margin: 12px 16px 0; }
  .inline-form .field, .inline-form .btn-primary { flex: 1 1 100%; }
  #view-admin-users .add-portal-row,
  #owner-account-card .add-portal-row { flex-wrap: wrap; }
  #view-admin-users .add-portal-row .field,
  #owner-account-card .add-portal-row .field { flex: 1 1 100%; margin-bottom: 4px; }
  #view-admin-users input, #owner-account-card input, #settings-password-card input,
  .auth-card input { min-height: 44px; font-size: 16px; }
  #settings-password-card .add-portal-row { flex-wrap: wrap; }
  #settings-password-card .add-portal-row .field { flex: 1 1 100%; margin-bottom: 4px; }
  /* Users table -> stacked rows on phone */
  table.acct-stack thead { display: none; }
  table.acct-stack, table.acct-stack tbody, table.acct-stack tr, table.acct-stack td { display: block; width: 100%; }
  table.acct-stack tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  table.acct-stack td { border: none; padding: 3px 0; }
  .acct-user-actions .btn-secondary, .acct-row-actions .btn-secondary, .acct-row-actions .btn-primary { min-height: 40px; }
}

/* Show / hide password: eye button inside the field (every password input) */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; max-height: 100%;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--text-secondary); border-radius: var(--radius-sm);
}
.pw-toggle:hover { color: var(--primary); }
.pw-toggle:focus-visible { outline: 3px solid rgba(59,130,246,0.35); outline-offset: -3px; color: var(--primary); }
.pw-toggle svg { display: block; }

/* Toast: one-line confirmations and "saved, but the email could not be sent" warnings */
.acct-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--green-border);
  background: var(--green-tint);
  color: var(--green-dark-text);
}
.acct-toast.warn { background: var(--amber-tint); border-color: var(--amber-border-strong); color: var(--amber-dark-text-2); }

/* Empty states (3 Nov 2026): an owner with no linked property sees only the welcome -- no picker, no create action;
   a co-host with none keeps "+ New property" but not the (empty) dropdown. */
.no-property-state h2 { font-size: 22px; }
.no-property-state p { font-size: 15px; max-width: 560px; margin: 0 auto 18px; line-height: 1.5; }
.no-property-btn { width: auto; padding: 12px 22px; font-size: 15px; }
.no-property-note { font-size: 14px; color: var(--text-secondary); margin: 18px auto 0; }
body.no-properties.role-owner .property-switcher { display: none; }
body.no-properties.role-cohost #property-select { display: none; }

/* Super-admin has no properties: no property picker, no empty top bar on desktop */
.role-admin .property-switcher { display: none; }
@media (min-width: 701px) { .role-admin .topbar { display: none; } }

/* Phone fixes found by scripts/accounts_width_check.js (1 Nov 2026): Pricing Setup and Settings had never been
   checked at phone width. Wide tables scroll inside their card; form rows wrap; flex children may shrink. */
@media (max-width: 700px) {
  #pricing-table, #cleaners-table, #portals-table, #forensics-table, #scenario-table { display: block; overflow-x: auto; max-width: 100%; }
  #owner-billing-card .add-portal-row,
  #agreement-form-row { flex-wrap: wrap; }
  #owner-billing-card .add-portal-row .field,
  #agreement-form-row .field { flex: 1 1 100%; min-width: 0; margin-bottom: 4px; }
  #owner-billing-card input, #agreement-form-row input { min-height: 44px; font-size: 16px; }
  .inline-form .field { min-width: 0; }
  .inline-form select, .inline-form input { max-width: 100%; }
}
@media (max-width: 700px) {
  #property-times-card .add-portal-row { flex-wrap: wrap; }
  #property-times-card .add-portal-row .field { flex: 1 1 140px; min-width: 0; }
  #property-times-card input[type="time"], #property-times-card input[type="number"] { min-height: 44px; font-size: 16px; }
}
@media (max-width: 700px) {
  #invoices-table, #invoice-line-items-table { display: block; overflow-x: auto; max-width: 100%; }
  #commission-summary-card .add-portal-row { flex-wrap: wrap; }
  #commission-summary-card .add-portal-row .field { flex: 1 1 140px; min-width: 0; }
  #commission-summary-card input[type="date"] { min-height: 44px; font-size: 16px; }
}

/* Users page: "Show test businesses" switch (off by default) */
.acct-toolbar { flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.acct-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.acct-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct-switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--border-mid); transition: background 0.15s; flex: none; }
.acct-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.15s; }
.acct-switch input:checked + .acct-switch-track { background: var(--primary); }
.acct-switch input:checked + .acct-switch-track::after { transform: translateX(18px); }
.acct-switch input:focus-visible + .acct-switch-track { outline: 3px solid rgba(59,130,246,0.35); outline-offset: 2px; }

/* Invoicing summary tables (the awaiting-reconciliation one gained a Reconcile column, 3 Nov 2026) */
@media (max-width: 700px) {
  #summary-pending-table, #summary-reconciled-table, #summary-expenses-table, #summary-totals-table { display: block; overflow-x: auto; max-width: 100%; }
  .summary-reconcile-btn { min-height: 40px; white-space: nowrap; }
}

/* Booking edit panel (17 Nov 2026): roomy two/three-column grid instead of the cramped inline row */
.eb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; align-items: end; }
.eb-grid .field input, .eb-grid .field select { width: 100%; box-sizing: border-box; }
.eb-grid[hidden], .eb-grid .field[hidden] { display: none; }
