/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --brand:      #6366f1;
  --brand-dark: #4f46e5;
  --brand-lt:   #eef2ff;
  --brand-mid:  #c7d2fe;

  --clean:    #3b82f6;  --clean-lt:  #dbeafe;  --clean-dk: #1d4ed8;
  --sport:    #22c55e;  --sport-lt:  #dcfce7;  --sport-dk: #15803d;
  --club:     #f59e0b;  --club-lt:   #fef3c7;  --club-dk:  #92400e;

  --bg:       #f0f4ff;
  --surface:  #ffffff;
  --surface2: #f8fafc;
  --border:   #e2e8f0;
  --border2:  #cbd5e1;
  --text:     #0f172a;
  --muted:    #64748b;
  --red:      #ef4444;
  --red-lt:   #fee2e2;
  --green:    #22c55e;
  --green-lt: #dcfce7;

  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 1px 6px rgba(0,0,0,.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 48px rgba(99,102,241,.20);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── Landing ─────────────────────────────────────────────────────────────── */
body.landing {
  background-color: #eef1ff;
  background-image:
    linear-gradient(rgba(99,102,241,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.07) 1px, transparent 1px);
  background-size: 52px 52px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 48px;
  gap: 22px;
}

/* ── Brand / Logo ────────────────────────────────────────────────────────── */
.brand {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.6px;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--brand);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { text-align: center; }

.hero-title {
  font-size: clamp(26px, 5.5vw, 44px);
  font-weight: 900;
  letter-spacing: -.9px;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.hero-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip-clean { background: var(--clean-lt);  color: var(--clean-dk); }
.chip-sport { background: var(--sport-lt);  color: var(--sport-dk); }
.chip-club  { background: var(--club-lt);   color: var(--club-dk); }

/* ── Auth card ───────────────────────────────────────────────────────────── */
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(99,102,241,.15);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 13px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
  border: none;
  color: var(--muted);
  transition: all .15s;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.auth-tab:hover:not(.active) { background: #f1f5f9; }

.auth-body { padding: 22px; }

/* ── Type selector (register form) ──────────────────────────────────────── */
.type-sel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.type-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 4px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.type-opt input[type=radio] { display: none; }
.type-opt-icon { font-size: 24px; line-height: 1; }
.type-opt-lbl  { font-size: 11px; font-weight: 700; color: var(--muted); }
.type-opt:hover { border-color: var(--border2); }
.type-opt.sel-clean { border-color: var(--clean); background: var(--clean-lt); }
.type-opt.sel-clean .type-opt-lbl { color: var(--clean-dk); }
.type-opt.sel-sport { border-color: var(--sport); background: var(--sport-lt); }
.type-opt.sel-sport .type-opt-lbl { color: var(--sport-dk); }
.type-opt.sel-club  { border-color: var(--club);  background: var(--club-lt); }
.type-opt.sel-club  .type-opt-lbl { color: var(--club-dk); }

/* ── Trust bar ───────────────────────────────────────────────────────────── */
.trust {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.trust span::before { content: "✓ "; color: var(--green); }

/* ── Form components ─────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-lt);
}
.input::placeholder { color: #94a3b8; }
.input[type=time] { width: 120px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 16px;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { background: var(--surface2); text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-w100 { width: 100%; display: flex; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface2); }

/* ── Flash messages ──────────────────────────────────────────────────────── */
.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.flash-ok  { background: var(--green-lt); color: #14532d; border: 1px solid #86efac; }
.flash-err { background: var(--red-lt);   color: #991b1b; border: 1px solid #fca5a5; }

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-logo {
  font-size: 17px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -.4px;
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-logo:hover { text-decoration: none; }
.topbar-sep { color: var(--border2); font-size: 18px; font-weight: 200; }
.topbar-org {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ── Type badges ─────────────────────────────────────────────────────────── */
.tbadge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.tbadge-cleaning { background: var(--clean-lt); color: var(--clean-dk); }
.tbadge-sport    { background: var(--sport-lt); color: var(--sport-dk); }
.tbadge-club     { background: var(--club-lt);  color: var(--club-dk); }

/* ── Page wrap ───────────────────────────────────────────────────────────── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── Dashboard greeting ──────────────────────────────────────────────────── */
.greeting {
  background: linear-gradient(135deg, var(--brand-lt), #dde3ff);
  border: 1px solid var(--brand-mid);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.greeting-name { font-size: 19px; font-weight: 800; color: var(--brand-dark); margin-bottom: 2px; }
.greeting-sub  { font-size: 13px; color: #4f46e5; }

/* ── Month calendar ──────────────────────────────────────────────────────── */
.cal-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cal-nav-title { font-size: 15px; font-weight: 800; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-dow {
  padding: 8px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.cal-dow.we { color: #94a3b8; }

.cal-day {
  min-height: 76px;
  padding: 8px 10px 6px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.cal-day:hover  { background: #f5f7ff; text-decoration: none; }
.cal-day.today  { background: var(--brand-lt); }
.cal-day.empty  { background: var(--surface2); cursor: default; pointer-events: none; }
.cal-day.we     { background: #fcfcfd; }

.cal-day-num {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}
.cal-day.today .cal-day-num { color: var(--brand); font-size: 14px; }

.cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
}
.cal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-dot-more {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  line-height: 7px;
}

/* ── Add event card ──────────────────────────────────────────────────────── */
.add-card {
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 0 4px var(--brand-lt);
}
.add-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.add-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
@media (max-width: 480px) { .add-grid { grid-template-columns: 1fr; } }

/* ── Event list ──────────────────────────────────────────────────────────── */
.ev-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ev-list-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.ev-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.ev-item:last-child { border-bottom: none; }
.ev-date {
  text-align: center;
  min-width: 38px;
  flex-shrink: 0;
}
.ev-date-d { font-size: 20px; font-weight: 800; color: var(--brand); line-height: 1; }
.ev-date-m { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ev-title { font-size: 14px; font-weight: 600; }
.ev-sub   { font-size: 12px; color: var(--muted); }
.ev-empty { padding: 36px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ── Coming-soon card ────────────────────────────────────────────────────── */
.coming-soon {
  background: var(--surface2);
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-top: 20px;
}
.coming-soon h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; color: var(--brand); }
.coming-soon p  { font-size: 13px; color: var(--muted); max-width: 360px; margin: 0 auto; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .landing-nav { padding: 12px 16px; }
  .hero-title  { font-size: 28px; }
  .topbar      { padding: 0 12px; }
  .topbar-org  { max-width: 120px; }
  .greeting    { padding: 16px; }
  .cal-day     { min-height: 56px; padding: 6px 4px; }
  .cal-day-num { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Kaleido – Phase 2 additions
   Cleaning calendar · Sport calendar · Club calendar · API admin
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Month-grid DOW header (sport & club views) ──────────────────────────── */
/* Alias for .cal-dow so sport/club templates use .cal-month-dow */
.cal-month-dow {
  padding: 8px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.cal-month-dow.we { color: #94a3b8; }

/* ── Event pill (month calendar) ─────────────────────────────────────────── */
.ev-pill {
  display: block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

/* ── Sport / Club quick-add form ─────────────────────────────────────────── */
.sport-form,
.club-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.form-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.form-row .field { margin: 0; flex: 1; min-width: 120px; }

/* ── Section header (members heading) ───────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 14px;
  font-weight: 800;
}

/* ── Member grid & cards ─────────────────────────────────────────────────── */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.member-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-role { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 1px; }

/* ── Filter bar (cleaning calendar top strip) ────────────────────────────── */
.filterbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.filterbar-right { margin-left: auto; flex-shrink: 0; }
.preset-group { display: flex; gap: 4px; flex-shrink: 0; }
.nav-group    { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.preset-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all .12s;
}
.preset-btn:hover { background: var(--surface2); color: var(--text); text-decoration: none; }
.preset-btn.active {
  background: var(--brand-lt);
  color: var(--brand);
  border-color: var(--brand-mid);
}

.filter-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 18px;
  color: var(--muted);
  text-decoration: none;
  transition: background .12s;
}
.nav-arrow:hover { background: var(--surface2); text-decoration: none; }
.nav-period-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* ── Today banner ────────────────────────────────────────────────────────── */
.today-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--clean-lt);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.today-banner-label {
  font-weight: 800;
  color: var(--clean-dk);
  flex-shrink: 0;
}
.today-banner-chip {
  background: #fff;
  border: 1px solid var(--clean);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--clean-dk);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.today-banner-arrow { opacity: .7; }

/* ── Booking-bar calendar table ──────────────────────────────────────────── */
.cal-wrap {
  /* cal-wrap already defined; extend for horizontal scroll in cleaning view */
  overflow-x: auto;
}
.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
  min-width: 600px;
}

/* Column widths */
.cal-table .th-apt,
.cal-table .td-apt { width: 110px; }

/* Header cells */
.th-apt {
  position: sticky;
  left: 0;
  z-index: 10;
  background: var(--surface);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.th-day {
  padding: 6px 2px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  min-width: 50px;
  background: var(--surface);
}
.th-day.is-today   { background: var(--brand-lt); }
.th-day.is-weekend { background: var(--surface2); }

.d-name {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.1;
}
.d-num {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.th-day.is-today .d-num { color: var(--brand); }
.d-count {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--clean-dk);
  margin-top: 1px;
}

/* Assign row */
.assign-row { background: #f8f9ff; }
.th-apt-assign {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #f8f9ff;
  border-bottom: 2px solid var(--border);
}
.th-assign {
  padding: 3px 2px;
  border-bottom: 2px solid var(--border);
  border-left: 1px solid var(--border);
  text-align: center;
}
.th-assign.is-today   { background: var(--brand-lt); }
.th-assign.is-weekend { background: var(--surface2); }

.assign-dd {
  width: 100%;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 1px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  max-width: 56px;
  text-align: center;
}
.assign-dd:focus { outline: 2px solid var(--brand); }

/* Body cells */
.td-apt {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.td-day {
  padding: 2px 2px;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  vertical-align: middle;
  min-height: 34px;
  height: 34px;
  position: relative;
}
.td-day.is-today   { background: rgba(99,102,241,.04); }
.td-day.is-weekend { background: var(--surface2); }

/* Booking bars */
.bar {
  height: 18px;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.bar-full {
  background: var(--clean);
  border-radius: 4px;
  margin: 0 1px;
  padding: 0 4px;
}
.bar-left {
  background: var(--clean);
  border-radius: 4px 0 0 4px;
  margin-left: 1px;
}
.bar-right {
  background: var(--clean);
  border-radius: 0 4px 4px 0;
  margin-right: 1px;
  padding: 0 3px;
}
.bar-left-bb {
  background: var(--clean);
  border-radius: 4px 0 0 4px;
  margin-left: 1px;
  width: 48%;
}
.bar-right-bb {
  background: #7dd3fc;
  border-radius: 0 4px 4px 0;
  margin-right: 1px;
  width: 48%;
  padding: 0 3px;
}
.bar-name {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--clean-dk);
  text-align: center;
  line-height: 1;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Legend */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.leg-bar {
  display: inline-block;
  width: 24px;
  height: 10px;
  background: var(--clean);
  border-radius: 3px;
}

/* ── API admin cards ─────────────────────────────────────────────────────── */
.api-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}
.api-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.api-card-body { padding: 20px; }

.api-provider-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.api-provider-name { font-size: 15px; font-weight: 800; }
.api-provider-sub  { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }

.api-sync-info {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Sync interval grid */
.interval-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 480px) { .interval-grid { grid-template-columns: repeat(2, 1fr); } }

.interval-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  transition: all .12s;
}
.interval-opt input[type=radio] { display: none; }
.interval-opt:hover { border-color: var(--brand-mid); color: var(--brand); background: var(--brand-lt); }
.interval-opt.sel  { border-color: var(--brand); background: var(--brand-lt); color: var(--brand); }
.interval-opt span { line-height: 1.2; }

/* ═══════════════════════════════════════════════════════════════════════════
   Kaleido – Phase 2b: multi-cal switcher, onboarding, settings, apartments
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Calendar switcher in topbar ─────────────────────────────────────────── */
.cal-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  flex-shrink: 0;
}
.cal-sw {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all .12s;
  white-space: nowrap;
}
.cal-sw:hover { background: var(--surface2); color: var(--text); text-decoration: none; }
.cal-sw-active {
  background: var(--brand-lt);
  color: var(--brand);
  border-color: var(--brand-mid);
}
.cal-sw-add {
  font-size: 16px;
  padding: 3px 8px;
  color: var(--muted);
  line-height: 1;
}
.cal-sw-add:hover { background: var(--surface2); color: var(--brand); }

/* ── Onboarding choice (cleaning empty state) ────────────────────────────── */
.onboarding-wrap {
  padding: 48px 24px 56px;
  text-align: center;
}
.onboarding-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.onboarding-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.onboarding-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
}
.onboarding-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.onboarding-card:hover {
  border-color: var(--brand-mid);
  box-shadow: 0 4px 20px rgba(99,102,241,.12);
}
.oc-icon  { font-size: 36px; line-height: 1; }
.oc-title { font-size: 15px; font-weight: 800; }
.oc-desc  { font-size: 12px; color: var(--muted); line-height: 1.6; flex: 1; }

/* ── Settings page ───────────────────────────────────────────────────────── */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  background: var(--surface2);
}
.settings-card-body { padding: 18px; }

/* Calendar type rows in settings */
.cal-type-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cal-type-row:last-child { border-bottom: none; }

.cal-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.cal-type-cleaning { background: var(--clean-lt); }
.cal-type-sport    { background: var(--sport-lt); }
.cal-type-club     { background: var(--club-lt); }

.cal-type-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cal-type-desc { font-size: 12px; color: var(--muted); }

.cal-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--muted);
  white-space: nowrap;
}
.cal-type-badge.active {
  background: var(--green-lt);
  color: #14532d;
}

/* ── Apartment management ────────────────────────────────────────────────── */
.apt-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.apt-row:last-child { border-bottom: none; }

.apt-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--clean-lt);
  color: var(--clean-dk);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.apt-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apt-meta { font-size: 11px; margin-top: 2px; }

.apt-badge-smoobu {
  background: var(--brand-lt);
  color: var(--brand);
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
}
.apt-badge-manual {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Kaleido – Phase 3: Einsatzplaner (planner calendar, persons, projects)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Planner color token ─────────────────────────────────────────────────── */
:root {
  --planner:    #8b5cf6;
  --planner-lt: #f5f3ff;
  --planner-mid:#c4b5fd;
  --cal-type-planner: var(--planner-lt);
}

/* ── Summary stat row ────────────────────────────────────────────────────── */
.planner-summary {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}
.planner-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  border-right: 1px solid var(--border);
  min-width: 80px;
  gap: 1px;
}
.planner-stat:last-child { border-right: none; }
.planner-stat-n {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.planner-stat span:last-child {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Excel grid wrapper ──────────────────────────────────────────────────── */
.excel-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.excel-table {
  border-collapse: collapse;
  table-layout: auto;
  min-width: 100%;
  font-size: 12px;
}
.excel-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 3px 3px;
  text-align: center;
  min-width: 32px;
  white-space: nowrap;
  font-weight: 600;
}
.excel-table thead th.today {
  background: var(--brand-lt);
  color: var(--brand);
}
.excel-table thead th.weekend {
  background: var(--surface2);
  color: var(--muted);
}
.excel-table td {
  border: 1px solid var(--border);
  vertical-align: top;
  padding: 2px 3px;
}
.excel-table td.today   { background: #fefce8; }
.excel-table td.weekend { background: var(--surface2); }

/* ── Sticky person column ────────────────────────────────────────────────── */
.sticky-person {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
  border-right: 2px solid var(--border) !important;
  min-width: 160px;
  max-width: 200px;
}
thead .sticky-person { z-index: 15; }

.person-cell {
  padding: 6px 8px !important;
  font-size: 12px;
  line-height: 1.4;
}
.person-qual {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

/* ── Day header ──────────────────────────────────────────────────────────── */
.d-num {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.d-name {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Plan cells ──────────────────────────────────────────────────────────── */
.plan-cell {
  min-width: 30px;
  min-height: 28px;
  padding: 2px 2px !important;
  vertical-align: top;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.plan-cell:hover { background: var(--brand-lt) !important; }

.clickable-cell.drag-selected {
  background: rgba(99,102,241,.18) !important;
  outline: 1.5px solid var(--brand);
  outline-offset: -1px;
}

/* ── Shift pills ─────────────────────────────────────────────────────────── */
.cell-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  margin: 1px auto;
  cursor: default;
}
.pill-day {
  background: #dbeafe;
  color: #1d4ed8;
}
.pill-night {
  background: #e0e7ff;
  color: #4338ca;
}
.pill-sick {
  background: #fee2e2;
  color: #dc2626;
}
.pill-vacation {
  background: #fef3c7;
  color: #b45309;
}
.pill-other {
  background: var(--surface2);
  color: var(--muted);
}

/* ── Legend ──────────────────────────────────────────────────────────────── */
.planner-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 18px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.planner-legend span { display: flex; align-items: center; gap: 5px; }

/* ── Modal backdrop + card ───────────────────────────────────────────────── */
.plan-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.plan-modal-backdrop[hidden] { display: none; }

.plan-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.plan-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.plan-modal-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.plan-modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.plan-modal-section-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ── Persons page ────────────────────────────────────────────────────────── */
.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.person-row:last-child { border-bottom: none; }

.person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--planner-lt);
  color: var(--planner);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--planner-mid);
}
.person-name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.person-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.abc-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}
.abc-a { background: #dcfce7; color: #15803d; }
.abc-b { background: #dbeafe; color: #1d4ed8; }
.abc-c { background: #fef3c7; color: #b45309; }

.qual-chip {
  display: inline-flex;
  align-items: center;
  background: var(--planner-lt);
  color: var(--planner);
  border: 1px solid var(--planner-mid);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Projects page ───────────────────────────────────────────────────────── */
.project-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.project-row:last-child { border-bottom: none; }

.project-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.project-name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.project-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--muted);
}
.status-badge.status-active  { background: #dcfce7; color: #15803d; }
.status-badge.status-paused  { background: #fef3c7; color: #b45309; }

/* ── Settings: planner type icon ─────────────────────────────────────────── */
.cal-type-planner { background: var(--planner-lt); }

/* ── Planner search filter bar ───────────────────────────────────────────── */
.planner-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.planner-search-input {
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
  width: 160px;
  outline: none;
  transition: border-color .12s;
}
.planner-search-input:focus { border-color: var(--brand); }

/* ═══════════════════════════════════════════════════════════════════════════
   Kaleido – Cleaning calendar v2: seamless Smoobu-style booking bars
   ═══════════════════════════════════════════════════════════════════════════ */

/* Override td-day: no padding, taller, relative for abs children */
.cal-table .td-day {
  padding: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  position: relative !important;
  overflow: hidden;
  vertical-align: top !important;
}

/* Month label in column header */
.d-month {
  display: block;
  font-size: 9px;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.1;
}
.d-count { color: var(--clean-dk); font-size: 10px; font-weight: 700; }

/* ── Booking bar base ─────────────────────────────────────────────────────── */
.bbar {
  position: absolute;
  top: 8px;
  height: 22px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Full: middle days of booking */
.bbar-full {
  left: 0; right: 0;
  border-radius: 0;
  padding: 0 8px;
}

/* Check-in day: right half, pill rounded on left */
.bbar-in {
  left: 50%; right: 0;
  border-radius: 11px 0 0 11px;
  padding: 0 4px 0 10px;
}

/* Check-out day: left half, pill rounded on right */
.bbar-out {
  left: 0; right: 50%;
  border-radius: 0 11px 11px 0;
}

/* ── Channel colors ───────────────────────────────────────────────────────── */
.ch-booking { background: #3b82f6; }
.ch-airbnb  { background: #f97316; }
.ch-fewo    { background: #8b5cf6; }
.ch-direct  { background: #22c55e; }
.ch-blocked { background: #9ca3af; }
.ch-other   { background: #6366f1; }

/* ── Bar text ─────────────────────────────────────────────────────────────── */
.bbar-icon {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255,255,255,.75);
  flex-shrink: 0;
  margin-right: 4px;
  font-style: normal;
}
.bbar-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

/* Cleaner label below bar */
.cal-table .cell-label {
  position: absolute !important;
  bottom: 1px;
  left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--clean-dk);
  z-index: 2;
  pointer-events: none;
}

/* Legend swatches */
.leg-bar.ch-booking { background: #3b82f6; }
.leg-bar.ch-airbnb  { background: #f97316; }
.leg-bar.ch-fewo    { background: #8b5cf6; }
.leg-bar.ch-direct  { background: #22c55e; }


/* ═══════════════════════════════════════════════════════════════════════════
   Sport calendar v2: teams, team filter, event team badge
   ═══════════════════════════════════════════════════════════════════════════ */

/* Event pill: team left border + team badge inside */
.ev-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.ev-team-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

/* Member chip (sport) */
.member-chip {
  display: inline-flex;
  align-items: center;
  background: var(--sport-lt);
  color: var(--sport-dk);
  border: 1px solid var(--sport);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* cal-month-grid other-month cells */
.cal-day.other-month {
  opacity: .35;
}
.cal-day.other-month .cal-day-num {
  color: var(--muted);
}
