/* V5: Facility-scoped simulation (tenant + operator) */
:root{
  --bg:#0b0d12;

  --card: rgba(255,255,255,.04);
  --stroke: rgba(255,255,255,.10);
  --primary: rgba(110,231,255,.9);
  --font-scale: 1;
  --text:#eef2ff;
  --muted:#a6b0cf;
  --line:rgba(255,255,255,.08);
  --shadow:0 14px 40px rgba(0,0,0,.35);
  --radius:18px;
  --danger:#ff5b6a;
  --ok:#2ee59d;
  --warn:#ffd680;
  --pad:16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);

  /* Brand accents */
  --brand-a: rgba(110,231,255,.9);
  --brand-b: rgba(124,140,255,.9);
  --brand-a-soft: rgba(110,231,255,.22);
  --brand-b-soft: rgba(124,140,255,.20);
}

*{box-sizing:border-box;}
html,body{height:100%;}
:root{color-scheme: dark;}
body{
  margin:0;
  font-size: calc(16px * var(--font-scale));
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial;
  background: radial-gradient(1200px 800px at 40% -10%, var(--brand-b-soft), transparent 55%),
              radial-gradient(1000px 800px at 70% 10%, var(--brand-a-soft), transparent 50%),
              var(--bg);
  color:var(--text);
}
.app{min-height:100%; display:flex; flex-direction:column;}

.topbar{
  position:sticky; top:0; z-index:10;
  padding: calc(var(--safe-top) + 10px) var(--pad) 10px;
  background: linear-gradient(to bottom, rgba(11,13,18,.92), rgba(11,13,18,.70));
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  display:flex; justify-content:space-between; align-items:center; gap:12px;
}
.leftbar{display:flex; align-items:center; gap:12px;}
.rightbar{display:flex; align-items:center; gap:10px;}
.brand{display:flex; gap:12px; align-items:center;}
.logo{
  width:38px; height:38px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color:#0b0d12; font-weight:800; letter-spacing:.5px;
  box-shadow:0 12px 30px rgba(124,140,255,.25);
}
.brand-name{font-weight:750;}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px;}

.icon-btn{
  appearance:none; border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  border-radius:14px; padding:10px 12px;
  cursor:pointer; position:relative;
}
.pill-btn{
  appearance:none; border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  border-radius:999px; padding:8px 10px;
  cursor:pointer; font-weight:700; display:flex; align-items:center; gap:8px;
}
.pill-caret{opacity:.75; font-size:12px;}

.icon{font-size:18px;}
.badge{
  position:absolute; right:-6px; top:-6px;
  min-width:18px; height:18px; padding:0 6px;
  border-radius:999px; display:grid; place-items:center;
  background:var(--danger); font-size:11px; font-weight:700;
  border:2px solid rgba(11,13,18,.9);
}

.main{flex:1; padding:14px var(--pad) calc(22px + var(--safe-bot)) var(--pad); max-width:520px; width:100%; margin:0 auto;}
.screen{display:none;}
.screen.active{display:block;}
.hero h1{margin:6px 0 8px; letter-spacing:-.02em;}
.hero p{margin:0 0 14px;}
.section-title h2{margin:4px 0 4px; letter-spacing:-.02em;}
.muted{color:var(--muted);}
.tiny{font-size:12px;}

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
  margin:12px 0;
}
.card-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:10px;}
.card-title{font-weight:740;}

.row{display:flex; gap:12px; align-items:center;}
.split > *{flex:1;}
.field{display:flex; flex-direction:column; gap:6px; margin:10px 0;}
.field > span{font-size:12px; color:var(--muted);}
input,select{
  width:100%; padding:12px 12px;
  border-radius:14px; border:1px solid var(--stroke);
  background: var(--card);
  color:var(--text);
  outline:none;
}

.btn{
  width:100%;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-weight:650;
}
.btn:disabled{opacity:.55; cursor:not-allowed;}
.btn.small{padding:9px 10px; border-radius:14px; width:auto;}
.btn.primary{border-color: rgba(255,255,255,.10); background: linear-gradient(135deg, var(--brand-a-soft), var(--brand-b-soft));}
.btn.secondary{border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.04);}
.btn.ghost{background:transparent;}
.stack{display:grid; gap:10px;}

.list{display:grid; gap:10px;}
.item{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; padding:12px 12px;
  border-radius:16px; border:1px solid var(--line);
  background: rgba(0,0,0,.12);
}
.item-left{display:flex; gap:10px; align-items:flex-start;}
.pip{width:10px; height:10px; border-radius:999px; margin-top:6px; background: rgba(255,255,255,.18);}
.item-title{font-weight:680;}
.item-sub{font-size:12px; color:var(--muted); margin-top:2px;}
.item-right{text-align:right; display:grid; gap:8px; justify-items:end;}

.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 10px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-weight:700; font-size:12px;
}
.pill.tiny{padding:6px 8px; font-size:11px;}
.pill.subtle{opacity:.85;}
.pill-row{display:flex; gap:10px; flex-wrap:wrap; margin-top:6px;}
.divider{height:1px; background:var(--line); margin:12px 0;}
.duration{display:flex; align-items:center; gap:10px;}
.chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:8px;}
.chip{
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
  background: rgba(255,255,255,.02);
  font-size:13px;
}
.chip.active{border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.06);}

.status-row{display:flex; gap:12px; align-items:center; margin-bottom:10px;}
.status-dot{
  width:14px; height:14px; border-radius:999px;
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 6px rgba(255,255,255,.03);
}

.kv{display:grid; gap:8px; margin:10px 0;}
.kv-row{display:flex; justify-content:space-between; align-items:center;}
.progress{height:10px; border-radius:999px; background: rgba(255,255,255,.06); border:1px solid var(--line); overflow:hidden; margin:10px 0 14px;}
.progress-bar{height:100%; background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); border-radius:999px;}
.toggles{display:grid; gap:10px;}
.toggle{display:flex; gap:10px; align-items:center; padding:10px 12px; border-radius:16px; border:1px solid var(--line); background: rgba(255,255,255,.02);}
.toggle input{width:18px; height:18px;}

/* Dashboard stats */
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:10px;}
.stat{
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius:16px;
  padding:12px;
}
.stat-value{font-size:22px; font-weight:820; letter-spacing:-.02em; margin-top:4px;}

/* Drawer */
.drawer{position:fixed; inset:0; z-index:30;}
.drawer-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.55);}
.drawer-panel{
  position:absolute; top:0; bottom:0; left:0; width:min(340px, 86vw);
  background: rgba(18,22,34,.98);
  border-right:1px solid var(--line);
  box-shadow: var(--shadow);
  padding: calc(var(--safe-top) + 10px) 12px 12px;
}
.drawer-head{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:6px 4px 10px;}
.drawer-title{font-weight:780;}
.drawer-user{display:flex; gap:10px; align-items:center; padding:10px 8px 12px; border-bottom:1px solid var(--line); margin-bottom:10px;}
.avatar{width:38px; height:38px; border-radius:14px; display:grid; place-items:center; background: rgba(255,255,255,.06); border:1px solid var(--line); font-weight:800;}
.user-name{font-weight:740;}
.drawer-nav{display:grid; gap:8px; padding:10px 4px;}
.drawer-link{
  text-align:left; border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  border-radius:14px; padding:12px 12px;
  cursor:pointer; font-weight:650;
}
.drawer-link.active{border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.06);}
.drawer-link.danger{border-color: rgba(255,91,106,.35); background: rgba(255,91,106,.10);}
.drawer-divider{height:1px; background:var(--line); margin:6px 0;}
.drawer-section{font-size:12px; color: var(--muted); margin: 6px 4px 0;}

/* Segmented */
.seg{
  display:flex; gap:8px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius:16px;
  padding:6px;
  margin-bottom:12px;
}
.seg-btn{
  flex:1;
  border:1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius:12px;
  padding:10px 8px;
  cursor:pointer;
  font-weight:700;
}
.seg-btn.active{
  color: var(--text);
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

/* Modal */
.modal{position:fixed; inset:0; z-index:50;}
.modal-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.55);}
.modal-sheet{
  position:absolute; left:0; right:0; bottom:0; max-width:520px; margin:0 auto;
  border-top-left-radius:22px; border-top-right-radius:22px;
  border:1px solid var(--line);
  background: rgba(18,22,34,.96);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-head{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 14px 10px; border-bottom:1px solid var(--line);}
.modal-title{font-weight:760;}
.modal-body{padding:14px;}
.modal-actions{padding:0 14px 14px; display:grid; gap:10px;}

@media (min-width:800px){
  .drawer-panel{border-top-right-radius:18px; border-bottom-right-radius:18px; top:16px; bottom:16px; left:16px;}
}

/*
  Select dropdown visibility fix (native controls vary by OS/browser):
  Keep the opened list readable and theme-consistent.
*/
select{ background: rgba(255,255,255,.03); color: var(--text); border:1px solid var(--line); color-scheme: dark; }
select:focus{ outline:none; box-shadow: 0 0 0 4px var(--brand-a-soft); border-color: var(--stroke); }
option{ background-color: var(--bg); color: var(--text); }

/* High contrast toggle */
:root[data-contrast="high"]{
  --line: rgba(255,255,255,.16);
  --muted: #c7d0ef;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.20);
}


/* --- Theme profiles + editor readability --- */
.row.wrap{ flex-wrap:wrap; gap:10px; }
.slot-btn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  min-width: 120px;
}
.slot-btn .dot{
  width:10px; height:10px; border-radius:999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.slot-btn .tag{
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color: var(--muted);
}
.slot-btn.active{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110,231,255,.14);
}
.slot-btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(110,231,255,.18);
}
.screen[data-screen="settings"].force-light-editor{
  --text:#0b1220;
  --muted:#4b5563;
  --card: rgba(0,0,0,.03);
  --line: rgba(0,0,0,.12);
  --stroke: rgba(0,0,0,.16);
  background:#f6f7fb;
}
.screen[data-screen="settings"].force-light-editor .card{
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.10);
}
.screen[data-screen="settings"].force-light-editor .btn.ghost{
  background: rgba(0,0,0,.03);
}
.screen[data-screen="settings"].hi-contrast-editor{
  --line: rgba(0,0,0,.35);
  --stroke: rgba(0,0,0,.45);
}
.screen[data-screen="settings"].hi-contrast-editor .field input,
.screen[data-screen="settings"].hi-contrast-editor select{
  border-width: 2px;
}


/* === CS FOR01B3 LoginBypassContrastFix === */
select,
input,
textarea,
button {
  color: #f8fbff !important;
}
select option {
  color: #0f172a !important;
  background: #ffffff !important;
}
input::placeholder,
textarea::placeholder {
  color: rgba(230, 240, 255, 0.72) !important;
}
.cs-v10-live-auth-ok select,
.cs-v10-live-auth-ok input,
.cs-v10-live-auth-ok textarea {
  color: #f8fbff !important;
  -webkit-text-fill-color: #f8fbff !important;
  background-color: rgba(20, 32, 58, 0.92) !important;
  border-color: rgba(170, 200, 255, 0.35) !important;
}
.cs-v10-live-auth-ok button,
.cs-v10-live-auth-ok .btn,
.cs-v10-live-auth-ok [role="button"] {
  color: #ffffff !important;
}
#cs-v10-live-status {
  max-width: min(92vw, 420px);
}


/* === CS FOR01B4 AutoEnterApp === */
.cs-v10-live-auto-entered [data-screen="login"].active,
.cs-v10-live-auto-entered .screen[data-screen="login"].active {
  display: none !important;
}
#cs-v10-live-status {
  font-size: 15px !important;
  line-height: 1.3 !important;
}


/* === CS FOR01B5 DirectLiveEntryFix === */
.cs-v10-live-entered .screen[data-screen="login"].active {
  display: none !important;
}
.cs-v10-live-entered #cs-v10-live-status {
  outline: 2px solid rgba(110,231,255,.35);
}


/* === CS FOR01B6 ResourceSelectionFix === */
.chip.active,
.chip[aria-pressed="true"],
.cs-live-resource-chip.active {
  background: linear-gradient(135deg, rgba(110,231,255,.35), rgba(124,140,255,.38)) !important;
  color: #ffffff !important;
  border-color: rgba(170,230,255,.85) !important;
  box-shadow: 0 0 0 2px rgba(110,231,255,.22), 0 10px 26px rgba(0,0,0,.28) !important;
}
.cs-v10-selected-count {
  margin: 8px 0 10px !important;
  color: #e8f3ff !important;
  font-weight: 800 !important;
  font-size: 15px !important;
}


/* === CS FOR01B7 ReceiptSafetyFix === */
.cs-live-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 193, 7, .16);
  border: 1px solid rgba(255, 213, 79, .55);
  color: #ffe08a;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  letter-spacing: .04em;
  margin: 0 0 12px;
}
.cs-receipt-card {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(170, 210, 255, .20);
  border-radius: 18px;
  padding: 14px;
}
.cs-receipt-list {
  margin: 10px 0 0 18px;
  color: #f8fbff;
}
.cs-receipt-list li {
  margin: 6px 0;
}
#cs-live-booking-mode {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 99999;
  background: rgba(127, 29, 29, .94);
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
  padding: 9px 12px;
  font: 900 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 14px 36px rgba(0,0,0,.38);
}
button:disabled,
.btn:disabled {
  opacity: .55 !important;
  cursor: wait !important;
}


/* === CS FOR01B8 CleanReceiptScheduleNav === */
.cs-live-booking-created {
  opacity: .78;
  outline: 2px solid rgba(110,231,255,.24);
}
.cs-live-booking-created::before {
  content: "Booking created — use receipt actions below";
  display: block;
  color: #8ff0c8;
  font-weight: 900;
  margin: 0 0 10px;
}
#modalActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#modalActions .btn {
  flex: 1 1 180px;
}
.cs-receipt-card .kv-row strong {
  text-align: right;
}


/* === CS FOR01B9 MyScheduleLive === */
.cs-schedule-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.cs-schedule-tools .btn {
  flex: 1 1 150px;
}
.cs-schedule-live-note {
  color: #e8f3ff !important;
  font-weight: 800;
  margin: 4px 0 12px;
}
@media print {
  #wpadminbar,
  #drawer,
  #menuBtn,
  #notifBtn,
  #facilityPill,
  #cs-live-booking-mode,
  #cs-v10-live-status,
  .cs-schedule-tools {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .screen.active {
    display: block !important;
  }
}


/* === CS FOR01B10 ScheduleChronologyFormat === */
.cs-schedule-day {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid rgba(170, 210, 255, .18);
  border-radius: 18px;
  background: rgba(15, 23, 42, .54);
}
.cs-schedule-day h3 {
  margin: 0 0 12px;
  color: #f8fbff;
  font-size: 22px;
  line-height: 1.2;
}
.cs-schedule-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cs-schedule-row:first-of-type {
  border-top: 0;
}
.cs-schedule-item-name {
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.25;
}
.cs-schedule-time {
  color: #d9f2ff;
  font-weight: 900;
  font-size: 17px;
  white-space: nowrap;
}
.cs-schedule-meta {
  grid-column: 1 / -1;
  color: rgba(220,235,255,.72);
  font-size: 14px;
  font-weight: 700;
}
@media (max-width: 640px) {
  .cs-schedule-row {
    grid-template-columns: 1fr;
  }
  .cs-schedule-time {
    white-space: normal;
  }
}
@media print {
  .cs-schedule-day {
    border: 1px solid #bbb !important;
    background: #fff !important;
    color: #111 !important;
    break-inside: avoid;
  }
  .cs-schedule-day h3,
  .cs-schedule-item-name,
  .cs-schedule-time,
  .cs-schedule-meta {
    color: #111 !important;
  }
}


/* === CS FOR01B10.1 BoldScheduleItems === */
.cs-schedule-item-name,
#scheduleList .cs-schedule-item-name,
#scheduleList strong,
.cs-schedule-row strong {
  font-weight: 950 !important;
  color: #ffffff !important;
  letter-spacing: .01em !important;
}
.cs-schedule-time {
  font-weight: 800 !important;
}
@media print {
  .cs-schedule-item-name,
  #scheduleList .cs-schedule-item-name,
  #scheduleList strong,
  .cs-schedule-row strong {
    font-weight: 950 !important;
    color: #000 !important;
  }
  .cs-schedule-time {
    font-weight: 800 !important;
    color: #111 !important;
  }
}


/* === CS FOR01B11 PreConfirmReviewCard === */
.cs-preconfirm-card {
  background: rgba(15, 23, 42, .64);
  border: 1px solid rgba(170, 230, 255, .20);
  border-radius: 18px;
  padding: 16px;
}
.cs-preconfirm-status {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, .18);
  border: 1px solid rgba(110, 231, 183, .50);
  color: #9cf7d1;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 950;
  letter-spacing: .035em;
  margin-bottom: 12px;
}
.cs-preconfirm-card h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 950;
}
.cs-preconfirm-range {
  color: #d9f2ff;
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 14px;
}
.cs-preconfirm-items {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.cs-preconfirm-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cs-preconfirm-items li:first-child {
  border-top: 0;
}
.cs-preconfirm-items strong {
  color: #ffffff;
  font-weight: 950 !important;
  font-size: 19px;
}
.cs-preconfirm-items span {
  color: #d9f2ff;
  font-weight: 850;
  white-space: nowrap;
}
.cs-preconfirm-note {
  margin-top: 12px !important;
  color: #c9d8f0 !important;
  font-weight: 750;
}
.cs-preconfirm-kv {
  margin-top: 6px;
}
#reviewCard {
  scroll-margin-top: 90px;
}
@media (max-width: 640px) {
  .cs-preconfirm-items li {
    grid-template-columns: 1fr;
  }
  .cs-preconfirm-items span {
    white-space: normal;
  }
}
@media print {
  .cs-preconfirm-card,
  .cs-preconfirm-card h3,
  .cs-preconfirm-items strong,
  .cs-preconfirm-items span,
  .cs-preconfirm-range {
    color: #000 !important;
    background: #fff !important;
  }
}


/* === CS FOR01B12 MonthlyCalendarView === */
.cs-month-calendar {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid rgba(170, 210, 255, .18);
  border-radius: 18px;
  background: rgba(15, 23, 42, .54);
}
.cs-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.cs-month-head h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}
.cs-month-dow,
.cs-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 6px;
}
.cs-month-dow div {
  color: #d9f2ff;
  font-weight: 950;
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
.cs-month-cell {
  min-height: 108px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 8px;
  background: rgba(2, 6, 23, .34);
  overflow: hidden;
}
.cs-month-empty {
  opacity: .28;
}
.cs-month-daynum {
  color: #fff;
  font-weight: 950;
  font-size: 16px;
  margin-bottom: 6px;
}
.cs-month-booking {
  display: grid;
  gap: 2px;
  padding: 6px;
  margin: 5px 0;
  border-radius: 9px;
  background: rgba(110,231,255,.12);
  border: 1px solid rgba(110,231,255,.20);
}
.cs-month-booking strong {
  color: #fff !important;
  font-weight: 950 !important;
  font-size: 13px;
  line-height: 1.15;
}
.cs-month-booking span {
  color: #d9f2ff;
  font-weight: 850;
  font-size: 12px;
}
.cs-month-no-bookings {
  color: rgba(220,235,255,.35);
  font-weight: 800;
}
@media (max-width: 860px) {
  .cs-month-dow,
  .cs-month-grid {
    grid-template-columns: repeat(7, minmax(64px, 1fr));
    gap: 4px;
  }
  .cs-month-cell {
    min-height: 82px;
    padding: 5px;
  }
  .cs-month-booking strong,
  .cs-month-booking span {
    font-size: 10px;
  }
}
@media print {
  .cs-month-calendar {
    border: 1px solid #aaa !important;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
  .cs-month-head h3,
  .cs-month-dow div,
  .cs-month-daynum,
  .cs-month-booking strong,
  .cs-month-booking span,
  .cs-month-no-bookings {
    color: #000 !important;
  }
  .cs-month-dow div,
  .cs-month-cell,
  .cs-month-booking {
    background: #fff !important;
    border-color: #bbb !important;
  }
  .cs-month-dow,
  .cs-month-grid {
    grid-template-columns: repeat(7, 1fr) !important;
  }
}


/* === CS FOR01B12.1 MonthCalendarPopoverPolish === */
.cs-month-calendar,
.cs-month-cell,
.cs-month-booking,
#cs-month-popover {
  color: #f8fbff !important;
}
.cs-month-calendar {
  overflow-x: auto;
  padding: 18px !important;
}
.cs-month-cell {
  min-height: 126px !important;
  background: rgba(8, 15, 32, .78) !important;
  border-color: rgba(170, 210, 255, .22) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}
.cs-month-daynum {
  color: #ffffff !important;
  font-weight: 950 !important;
  font-size: 17px !important;
}
.cs-month-booking {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  border-radius: 10px !important;
  background: rgba(29, 78, 116, .74) !important;
  border: 1px solid rgba(125, 211, 252, .42) !important;
  padding: 7px !important;
  margin: 6px 0 !important;
  display: grid;
  gap: 3px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cs-month-booking:hover,
.cs-month-booking:focus {
  transform: translateY(-1px);
  border-color: rgba(186, 230, 253, .95) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.35), 0 0 0 2px rgba(125, 211, 252, .25);
  outline: none;
}
.cs-month-booking strong {
  color: #ffffff !important;
  font-weight: 950 !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  max-height: 2.4em;
  overflow: hidden;
}
.cs-month-booking span {
  color: #e0f7ff !important;
  font-weight: 900 !important;
  font-size: 12px !important;
}
.cs-month-no-bookings {
  color: rgba(226, 239, 255, .55) !important;
}
#cs-month-popover {
  display: none;
  position: absolute;
  z-index: 100000;
  width: min(340px, calc(100vw - 24px));
  background: rgba(9, 18, 38, .98);
  border: 1px solid rgba(186, 230, 253, .55);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.52), 0 0 0 1px rgba(255,255,255,.05);
}
#cs-month-popover.open {
  display: block;
}
.cs-month-pop-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.cs-month-pop-date {
  color: #bae6fd;
  font-weight: 900;
  font-size: 15px;
  padding-right: 36px;
  margin-bottom: 8px;
}
.cs-month-pop-resource {
  color: #ffffff;
  font-weight: 950;
  font-size: 22px;
  line-height: 1.15;
  margin-bottom: 8px;
}
.cs-month-pop-time {
  color: #e0f7ff;
  font-weight: 950;
  font-size: 20px;
  margin-bottom: 8px;
}
.cs-month-pop-meta {
  color: rgba(226,239,255,.78);
  font-weight: 800;
  margin-bottom: 14px;
}
.cs-month-pop-actions {
  display: flex;
  gap: 10px;
}
.cs-month-pop-actions .btn {
  flex: 1;
}
@media print {
  #cs-month-popover.open {
    display: block !important;
    position: static !important;
    width: auto !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    margin: 12px 0 !important;
  }
  .cs-month-pop-close,
  .cs-month-pop-actions {
    display: none !important;
  }
  .cs-month-pop-date,
  .cs-month-pop-resource,
  .cs-month-pop-time,
  .cs-month-pop-meta {
    color: #000 !important;
  }
}


/* === CS FOR01B12.3 CalendarRenderRescue ===
   Safe rescue from last known-good FOR01B12.1.
   CSS-only calendar fit polish. No drawer JS. No wall mode. No risky runtime hooks.
*/
#scheduleList,
.cs-month-calendar {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.cs-month-calendar {
  overflow-x: auto !important;
  padding: 12px !important;
}
.cs-month-dow,
.cs-month-grid {
  grid-template-columns: repeat(7, minmax(72px, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
}
.cs-month-dow div {
  min-width: 0 !important;
  padding: 7px 2px !important;
  font-size: clamp(12px, 1.5vw, 16px) !important;
}
.cs-month-cell {
  min-width: 0 !important;
  min-height: clamp(84px, 11vw, 122px) !important;
  padding: clamp(5px, .8vw, 8px) !important;
  border-radius: 10px !important;
}
.cs-month-daynum {
  font-size: clamp(13px, 1.7vw, 17px) !important;
  margin-bottom: 4px !important;
}
.cs-month-booking {
  padding: 5px !important;
  margin: 4px 0 !important;
  border-radius: 8px !important;
}
.cs-month-booking strong {
  font-size: clamp(10px, 1.15vw, 13px) !important;
  line-height: 1.1 !important;
}
.cs-month-booking span {
  font-size: clamp(9px, 1.05vw, 12px) !important;
  line-height: 1.1 !important;
}
@media (max-width: 760px) {
  .cs-month-calendar {
    overflow-x: auto !important;
  }
  .cs-month-dow,
  .cs-month-grid {
    min-width: 640px !important;
  }
}
@media print {
  @page {
    size: landscape;
    margin: 0.25in;
  }
  .cs-month-calendar {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
  }
  .cs-month-dow,
  .cs-month-grid {
    grid-template-columns: repeat(7, 1fr) !important;
    min-width: 0 !important;
    gap: 3px !important;
  }
  .cs-month-cell {
    min-height: 0.85in !important;
    padding: 4px !important;
  }
  .cs-month-booking strong {
    font-size: 8pt !important;
  }
  .cs-month-booking span {
    font-size: 7pt !important;
  }
}


/* === CS FOR01B12.4 DirectLandingBookRouteFix === */
.cs-b12-4-direct-book #cs-v10-live-status {
  outline: 2px solid rgba(110,231,255,.35);
}


/* === CS FOR01B12.5 ReceiptPreviewContrastFix ===
   Fix receipt/preview text that only showed when highlighted.
*/
#modal,
.modal,
.dialog,
[role="dialog"],
#bookingSummary,
#reviewCard,
.cs-receipt-card,
.cs-preconfirm-card {
  color: #f8fbff !important;
}

#modal h1,
#modal h2,
#modal h3,
#modal h4,
#modal p,
#modal div,
#modal span,
#modal li,
#modal strong,
#modal label,
#bookingSummary h1,
#bookingSummary h2,
#bookingSummary h3,
#bookingSummary h4,
#bookingSummary p,
#bookingSummary div,
#bookingSummary span,
#bookingSummary li,
#bookingSummary strong,
#reviewCard h1,
#reviewCard h2,
#reviewCard h3,
#reviewCard h4,
#reviewCard p,
#reviewCard div,
#reviewCard span,
#reviewCard li,
#reviewCard strong,
.cs-receipt-card h1,
.cs-receipt-card h2,
.cs-receipt-card h3,
.cs-receipt-card h4,
.cs-receipt-card p,
.cs-receipt-card div,
.cs-receipt-card span,
.cs-receipt-card li,
.cs-receipt-card strong,
.cs-preconfirm-card h1,
.cs-preconfirm-card h2,
.cs-preconfirm-card h3,
.cs-preconfirm-card h4,
.cs-preconfirm-card p,
.cs-preconfirm-card div,
.cs-preconfirm-card span,
.cs-preconfirm-card li,
.cs-preconfirm-card strong {
  color: #f8fbff !important;
  text-shadow: none !important;
}

.kv,
.kv-row,
.kv-row span,
.kv-row strong,
.cs-preconfirm-kv,
.cs-preconfirm-kv span,
.cs-preconfirm-kv strong,
.cs-receipt-card .kv,
.cs-receipt-card .kv-row,
.cs-receipt-card .kv-row span,
.cs-receipt-card .kv-row strong {
  color: #f8fbff !important;
}

.kv-row span,
.cs-receipt-card .kv-row span,
.cs-preconfirm-kv .kv-row span {
  color: #cfe4ff !important;
  font-weight: 850 !important;
}

.kv-row strong,
.cs-receipt-card .kv-row strong,
.cs-preconfirm-kv .kv-row strong {
  color: #ffffff !important;
  font-weight: 950 !important;
}

.cs-live-warning,
.cs-preconfirm-status {
  color: #ffe89b !important;
  background: rgba(120, 75, 0, .28) !important;
  border-color: rgba(255, 213, 79, .72) !important;
}

.cs-preconfirm-status {
  color: #a9f7d7 !important;
  background: rgba(6, 95, 70, .36) !important;
  border-color: rgba(110, 231, 183, .72) !important;
}

.cs-receipt-list,
.cs-receipt-list li,
.cs-receipt-list strong,
.cs-preconfirm-items,
.cs-preconfirm-items li,
.cs-preconfirm-items strong,
.cs-preconfirm-items span {
  color: #ffffff !important;
}

.cs-preconfirm-range,
.cs-schedule-time,
.cs-month-pop-time {
  color: #dff7ff !important;
  font-weight: 950 !important;
}

.muted,
#modal .muted,
#bookingSummary .muted,
#reviewCard .muted,
.cs-receipt-card .muted,
.cs-preconfirm-card .muted {
  color: #c9d8f0 !important;
}

#modalActions .btn,
#modalActions button,
#confirmMockBtn,
#csCopyReceiptBtn,
#csMakeAnotherBookingBtn,
#csViewScheduleBtn {
  color: #ffffff !important;
  font-weight: 950 !important;
}

/* Browser text-selection was making the invisible text show; this makes normal state readable. */
#modal ::selection,
#bookingSummary ::selection,
#reviewCard ::selection {
  color: #ffffff !important;
  background: rgba(59, 130, 246, .55) !important;
}

@media print {
  #modal,
  .modal,
  [role="dialog"],
  #bookingSummary,
  #reviewCard,
  .cs-receipt-card,
  .cs-preconfirm-card,
  .kv-row span,
  .kv-row strong,
  .cs-receipt-card *,
  .cs-preconfirm-card * {
    color: #000000 !important;
    text-shadow: none !important;
  }
}


/* === CS FOR01B12.7 PersistentBookRouteGuard === */
.cs-b12-7-book-guard #cs-v10-live-status {
  outline: 2px solid rgba(110,231,255,.55);
}


/* === CS FOR01B14 PhasedResourceTimeBlocks === */
.cs-resource-time-blocks {
  margin: 14px 0 6px;
  padding: 14px;
  border: 1px solid rgba(170, 210, 255, .20);
  border-radius: 18px;
  background: rgba(15, 23, 42, .62);
}
.cs-phase-empty {
  color: #c9d8f0;
  font-weight: 800;
}
.cs-phase-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.cs-phase-head strong {
  display: block;
  color: #ffffff;
  font-weight: 950;
  font-size: 18px;
}
.cs-phase-head span {
  display: block;
  color: #cfe4ff;
  font-weight: 800;
  margin-top: 4px;
}
.cs-phase-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cs-phase-actions .btn {
  padding: 8px 10px;
  min-height: 34px;
  font-size: 12px;
}
.cs-phase-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,.09);
}
.cs-phase-row:first-of-type {
  border-top: 0;
}
.cs-phase-name strong {
  display: block;
  color: #ffffff !important;
  font-weight: 950 !important;
  font-size: 17px;
  line-height: 1.2;
}
.cs-phase-name span {
  color: #c9d8f0;
  font-weight: 800;
  font-size: 13px;
}
.cs-phase-row label {
  color: #d9f2ff;
  font-weight: 900;
  display: grid;
  gap: 5px;
}
.cs-phase-row input[type="time"] {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(170,210,255,.28);
  background: rgba(255,255,255,.07);
  color: #ffffff !important;
  font-weight: 950;
  padding: 8px 10px;
}
.cs-phase-bad {
  outline: 2px solid rgba(248, 113, 113, .75);
  border-radius: 12px;
}
.cs-phase-review .cs-preconfirm-items li,
.cs-phase-receipt-list li {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 8px 14px;
  align-items: start;
}
.cs-phase-review .cs-preconfirm-items li span,
.cs-phase-receipt-list li span {
  color: #dff7ff !important;
  font-weight: 950 !important;
  white-space: nowrap;
}
.cs-phase-receipt-list li em {
  grid-column: 1 / -1;
  color: #c9d8f0 !important;
  font-style: normal;
  font-weight: 800;
}
@media (max-width: 720px) {
  .cs-phase-head,
  .cs-phase-row,
  .cs-phase-review .cs-preconfirm-items li,
  .cs-phase-receipt-list li {
    grid-template-columns: 1fr;
    display: grid;
  }
  .cs-phase-actions {
    justify-content: stretch;
  }
  .cs-phase-actions .btn {
    flex: 1;
  }
  .cs-phase-review .cs-preconfirm-items li span,
  .cs-phase-receipt-list li span {
    white-space: normal;
  }
}
@media print {
  .cs-resource-time-blocks,
  .cs-phase-row,
  .cs-phase-name strong,
  .cs-phase-name span,
  .cs-phase-row label,
  .cs-phase-row input[type="time"],
  .cs-phase-review .cs-preconfirm-items li span,
  .cs-phase-receipt-list li span,
  .cs-phase-receipt-list li em {
    color: #000 !important;
    background: #fff !important;
  }
}


/* === CS FOR01B14.1 PhasedComposePayloadFix === */
.cs-resource-time-blocks::after {
  content: "Phased booking mode";
  display: inline-flex;
  margin-top: 10px;
  color: #9cf7d1;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
