/* ── Sol App — Dual Theme ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

/* ── Default (SPA — Rose) ──────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:         #FDF8F9;
  --text:       #1C1C1E;
  --hint:       #8A8A8E;
  --link:       #BF5070;
  --btn:        #BF5070;
  --btn-text:   #FFFFFF;
  --section-bg: #F2E8EC;
  --card-bg:    #F8F2F4;
  --border:     rgba(0,0,0,.07);
  --btn-rgb:    191,80,112;

  /* Logo */
  --logo-src:   url('logo-spa.jpg');
  --header-bg:  rgba(248,242,244,.90);

  /* Semantic */
  --success:    #34C759;
  --danger:     #FF3B30;
  --warning:    #FF9F0A;
  --whatsapp:   #25D366;

  /* Shape */
  --radius:     14px;
  --radius-sm:  10px;
  --gap:        14px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,.06), 0 1px 6px rgba(0,0,0,.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-md:  0 4px 20px rgba(0,0,0,.10), 0 1px 6px rgba(0,0,0,.06);
}

/* ── LIGHT theme — Sky Blue ────────────────────────────────────────── */
body.theme-light {
  --bg:         #F5FAFD;
  --link:       #2EADD4;
  --btn:        #2EADD4;
  --section-bg: #E5F2F8;
  --card-bg:    #EEF6FB;
  --btn-rgb:    46,173,212;
  --logo-src:   url('logo-light.jpg');
  --header-bg:  rgba(238,246,251,.90);
}

/* ── AZURE theme — כחלת (ים כחול עמוק) ────────────────────────────── */
body.theme-azure {
  --bg:         #EAF0FF;
  --text:       #0A1A3A;
  --hint:       #5060A0;
  --link:       #003580;
  --btn:        #003580;
  --btn-text:   #FFFFFF;
  --section-bg: #C8D8FF;
  --card-bg:    #D8E4FF;
  --border:     rgba(0,50,130,.10);
  --btn-rgb:    0,53,128;
  --header-bg:  rgba(216,228,255,.93);
}

/* ── CORAL theme — שקיעה (שקיעה חמה) ──────────────────────────────── */
body.theme-coral {
  --bg:         #FFF9F7;
  --text:       #2D1E18;
  --hint:       #7D6259;
  --link:       #E84318;
  --btn:        #E84318;
  --btn-text:   #FFFFFF;
  --section-bg: #FFECE9;
  --card-bg:    #FFF2F0;
  --border:     rgba(180,40,0,.08);
  --btn-rgb:    232,67,24;
  --header-bg:  rgba(255,242,240,.93);
}

/* ── Theme SVG icons (כחלת sea icons) ──────────────────────────────── */
.ti-s {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.tab-icon .ti-s { display: block; margin: 0 auto; }

/* ── Reset & base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  position: relative;
}

/* ── Screens ─────────────────────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}
.screen.active { display: flex; }

/* ── Header ──────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 12px;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hotel-icon { font-size: 26px; }

/* ── Logo image ──────────────────────────────────────────────────── */
.hotel-logo {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
  background: var(--section-bg);
  padding: 3px 6px;
}

/* ── Header FAB (Today + Schedule) ──────────────────────────────── */
.today-fab-btn {
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: 22px;
  padding: 7px 14px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin-right: auto;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(var(--btn-rgb),.4);
  transition: opacity .15s, transform .1s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.today-fab-btn:active { opacity: .75; transform: scale(.96); }

/* Schedule FAB — + with label below */
.schedule-fab-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}
.schedule-fab-label {
  font-size: 9px;
  font-weight: 500;
  color: var(--btn-text);
  letter-spacing: .01em;
  opacity: .85;
  line-height: 1;
}

.hotel-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.header-date {
  font-size: 12px;
  color: var(--hint);
  margin-top: 1px;
}
.refresh-btn {
  margin-right: auto;
  background: none;
  border: none;
  font-size: 19px;
  color: var(--btn);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: opacity .15s;
}
.refresh-btn:active { opacity: .5; }

/* ── Content area ────────────────────────────────────────────────── */
.content-area {
  flex: 1;
  padding: 14px 16px 28px;
  overflow-y: auto;
}

/* ── Loading ─────────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  color: var(--hint);
  gap: 14px;
}
.spinner {
  width: 30px; height: 30px;
  border: 2.5px solid var(--section-bg);
  border-top-color: var(--btn);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section ─────────────────────────────────────────────────────── */
.section { margin-bottom: 20px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
  padding: 0 2px;
}
.section-count {
  background: var(--btn);
  color: var(--btn-text);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
}

/* ── Guest card (dashboard list) ─────────────────────────────────── */
.guest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: opacity .12s, transform .1s;
  border: none;
  width: 100%;
  text-align: right;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.guest-row:active { opacity: .65; transform: scale(.99); }

.guest-row-icon { font-size: 22px; flex-shrink: 0; }
.guest-row-info { flex: 1; }
.guest-row-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.guest-row-sub  { font-size: 12px; color: var(--hint); margin-top: 2px; }
.guest-row-arrow { color: var(--hint); font-size: 18px; flex-shrink: 0; opacity: .5; }

/* ── Source/OTA badges ───────────────────────────────────────────── */
.source-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 5px;
  letter-spacing: 0.3px;
  line-height: 1.4;
}
.src-booking { background: #003580; color: #fff; }
.src-airbnb  { background: #FF5A5F; color: #fff; }
.src-expedia { background: #FFB900; color: #1a1a1a; }
.src-agoda   { background: #EB0026; color: #fff; }
.src-direct  { background: #27ae60; color: #fff; }

/* source badge inside detail-nav title — slightly larger */
.detail-nav-title .source-badge {
  font-size: 11px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* ── Multi-room chips (in guest detail card) ─────────────────────── */
.rooms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
}
.room-chip {
  display: inline-block;
  background: var(--btn-bg, rgba(255,255,255,.08));
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.rooms-multi-row {
  align-items: flex-start;
  padding: 8px 0;
}
.rooms-multi-row .guest-detail-label { padding-top: 4px; }

/* ── Per-room guest counts (toggle button + section) ─────────────── */
.rooms-pax-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--hint);
  cursor: pointer;
  text-align: right;
}
.rooms-pax-btn:active { opacity: .65; }

.rooms-pax-section {
  padding: 4px 0 2px;
  border-bottom: 1px solid var(--border);
}
.room-pax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
  gap: 8px;
}
.room-pax-name {
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-pax-counts {
  color: var(--hint);
  font-size: 11px;
  text-align: left;
}

/* ── Note badge (on guest rows) ──────────────────────────────────── */
.note-badge {
  font-size: 13px;
  margin-right: 5px;
  vertical-align: middle;
  opacity: .8;
}

/* ── Notes inline (in guest detail card) ────────────────────────── */
.notes-inline {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.note-row {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.45;
}
.note-row:last-child { border-bottom: none; }
.note-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--hint);
  padding-top: 1px;
  min-width: 60px;
}
.note-staff .note-label { color: var(--btn); }
.note-text { flex: 1; color: var(--text); white-space: pre-line; }

/* ── Guest detail ────────────────────────────────────────────────── */
.guest-detail-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.guest-detail-name { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.guest-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.guest-detail-row:last-child { border-bottom: none; }
.guest-detail-label { color: var(--hint); }
.guest-detail-value { font-weight: 500; }

/* ── Arrival / departure date rows ───────────────────────────────── */
.date-label-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.date-val {
  font-weight: 600;
  font-size: 14px;
}
.date-arrival   { color: #5b9bd5; }
.date-departure { color: #e8904a; }

.balance-display {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.balance-label { font-size: 12px; color: var(--hint); margin-top: 3px; }

/* ── Action buttons grid ─────────────────────────────────────────── */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 16px;
}

.action-btn {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  padding: 16px 10px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  transition: opacity .12s, transform .1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
}
.action-btn:active { opacity: .55; transform: scale(.97); }
.action-btn.primary { background: var(--btn); color: var(--btn-text); box-shadow: 0 4px 14px rgba(var(--btn-rgb),.35); }
.action-btn.danger  { background: rgba(255,59,48,.1); color: var(--danger); }
.action-btn.cancel-btn { background: rgba(255,159,10,.1); color: var(--warning); }
.action-btn-icon  { font-size: 22px; }
.action-btn-label { font-size: 12px; font-weight: 600; }

/* ── Action form ─────────────────────────────────────────────────── */
.action-form-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 4px 0;
  letter-spacing: -.01em;
}

.form-section-title {
  font-size: 11px;
  color: var(--hint);
  font-weight: 700;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Service picker */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 10px;
}
.service-btn {
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 8px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  transition: all .14s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-xs);
}
.service-btn:active { opacity: .6; }
.service-btn.selected {
  border-color: var(--btn);
  background: rgba(var(--btn-rgb),.08);
  box-shadow: 0 2px 10px rgba(var(--btn-rgb),.2);
}
.service-icon  { font-size: 20px; }
.service-name  { font-size: 13px; font-weight: 600; }
.service-price { font-size: 12px; color: var(--hint); }

.charge-row-2 { display: flex; gap: 10px; margin-top: 2px; }
.charge-field { flex: 1; }
.charge-total {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--btn);
  margin: 4px 0 10px;
  letter-spacing: .01em;
}

/* Input */
.form-input {
  width: 100%;
  background: var(--card-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  text-align: right;
  box-shadow: var(--shadow-xs);
}
.form-input:focus {
  border-color: var(--btn);
  box-shadow: 0 0 0 3px rgba(var(--btn-rgb),.12);
}
.form-input::placeholder { color: var(--hint); }

/* Payment type toggle */
.payment-toggle {
  display: flex;
  background: var(--section-bg);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.toggle-btn {
  flex: 1;
  padding: 11px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--hint);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.toggle-btn.active {
  background: var(--btn);
  color: var(--btn-text);
  box-shadow: 0 2px 8px rgba(var(--btn-rgb),.3);
}

/* Confirm summary box */
.confirm-box {
  background: var(--section-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-label { color: var(--hint); }
.confirm-value { font-weight: 600; }

/* ── Search bar ──────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-bar .form-input { flex: 1; }
.search-btn {
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(var(--btn-rgb),.3);
}
.search-btn:active { opacity: .75; }

/* ── Hints ───────────────────────────────────────────────────────── */
.tap-hint {
  font-size: 12px;
  color: var(--hint);
  text-align: center;
  padding: 4px 0 12px;
}
.empty-day-hint {
  font-size: 13px;
  color: var(--hint);
  text-align: center;
  padding: 8px 0 14px;
}

/* ── Finance balance alert section ──────────────────────────────── */
.balance-alert-section {
  border: 2px solid #E84318;
  border-radius: 8px;
  padding: 8px 10px 4px;
  margin-bottom: 14px;
}
.balance-alert-title { color: #E84318; }
.balance-badge {
  display: inline-block;
  background: #E84318;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-right: 6px;
}

/* ── Error state ─────────────────────────────────────────────────── */
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--hint);
}
.error-icon { font-size: 40px; margin-bottom: 12px; }
.error-msg  { font-size: 15px; margin-bottom: 18px; color: var(--text); }
.retry-btn {
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius);
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(var(--btn-rgb),.3);
}

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 28px 0;
  color: var(--hint);
  font-size: 14px;
}

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28,28,30,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 11px 22px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  white-space: nowrap;
  transition: opacity .3s;
}
.toast.hidden  { opacity: 0; pointer-events: none; }
.toast.success { background: rgba(52,199,89,.9); }
.toast.error   { background: rgba(255,59,48,.9); }

/* ── Transactions list ───────────────────────────────────────────── */
.tx-list { margin-top: 4px; }
.tx-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.tx-row:last-child { border-bottom: none; }
.tx-info     { flex: 1; }
.tx-date     { color: var(--hint); font-size: 11px; }
.tx-name     { color: var(--text); font-weight: 500; }
.tx-amount   { font-weight: 700; }
.tx-amount.debit  { color: var(--danger); }
.tx-amount.credit { color: var(--success); }

/* ── Note textarea ───────────────────────────────────────────────── */
textarea.form-input { min-height: 100px; resize: vertical; }

/* ── Note form extras ────────────────────────────────────────────── */
.note-readonly-box {
  background: var(--section-bg);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}
.note-readonly-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--hint);
  margin-bottom: 5px;
}
.note-readonly-text {
  color: var(--text);
  white-space: pre-line;
  line-height: 1.45;
}
.note-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hint);
  margin-bottom: 6px;
}

/* ── Tab screens need space for tab bar ─────────────────────────── */
.tab-screen .content-area {
  padding-bottom: calc(28px + 68px);
}

/* ── Bottom tab bar ──────────────────────────────────────────────── */
.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hint);
  padding: 6px 0 4px;
  transition: color .15s;
}
.tab-item.active { color: var(--btn); }
.tab-icon  { font-size: 20px; line-height: 1; }
.tab-label { font-size: 10px; font-weight: 600; }

/* ── Confirmation modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  width: 100%;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 22px 18px 36px;
  box-shadow: 0 -4px 32px rgba(0,0,0,.12);
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
.modal-body { margin-bottom: 20px; }
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-btn {
  padding: 15px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.modal-cancel  { background: var(--section-bg); color: var(--hint); }
.modal-confirm { background: var(--btn); color: var(--btn-text); box-shadow: 0 4px 14px rgba(var(--btn-rgb),.3); }

.confirm-detail {
  background: var(--section-bg);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Bulk checkin button ─────────────────────────────────────────── */
.bulk-btn {
  display: block;
  width: 100%;
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius);
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
  text-align: center;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(var(--btn-rgb),.32);
}
.bulk-btn:active { opacity: .8; }

/* ── Month view button ───────────────────────────────────────────── */
.month-view-btn {
  display: block;
  width: 100%;
  background: var(--section-bg);
  color: var(--btn);
  border: 1.5px solid var(--btn);
  border-radius: var(--radius);
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin: 10px 0 18px;
  text-align: center;
  font-family: inherit;
}
.month-view-btn:active { opacity: .7; }

/* ── Month date title ────────────────────────────────────────────── */
.month-date-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ── Date nav (schedule tab) ─────────────────────────────────────── */
.date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.date-nav-btn {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 0;
}
.nav-arrow { font-size: 15px; line-height: 1; }
.nav-hint  { font-size: 9px; color: var(--hint); opacity: .55; line-height: 1; }
.date-input {
  flex: 1;
  background: var(--card-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  text-align: center;
  outline: none;
  box-shadow: var(--shadow-xs);
}
.date-input:focus { border-color: var(--btn); }

.quick-dates {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.quick-date-btn {
  flex: 1;
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}
.quick-date-btn:active { opacity: .6; }

/* ── Rooms grid ──────────────────────────────────────────────────── */
.rooms-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--hint);
  margin-bottom: 14px;
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-left: 2px;
}
.legend-dot.room-occupied  { background: var(--btn); }
.legend-dot.room-arriving  { background: var(--warning); }
.legend-dot.room-leaving   { background: var(--danger); }
.legend-dot.room-empty-dot { background: var(--section-bg); border: 1px solid var(--hint); }

.rooms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.room-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 15px 10px;
  text-align: center;
  border: 2px solid transparent;
  cursor: default;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s;
}
.room-card.room-occupied { border-color: var(--btn); cursor: pointer; box-shadow: 0 2px 10px rgba(var(--btn-rgb),.2); }
.room-card.room-arriving { border-color: var(--warning); cursor: pointer; box-shadow: 0 2px 10px rgba(255,159,10,.2); }
.room-card.room-leaving  { border-color: var(--danger);  cursor: pointer; box-shadow: 0 2px 10px rgba(255,59,48,.15); }

.room-card-icon  { font-size: 24px; margin-bottom: 5px; }
.room-card-name  { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.room-guest-name { font-size: 11px; color: var(--text); margin-bottom: 2px;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card-status { font-size: 11px; color: var(--hint); }
.room-card.room-occupied .room-card-status { color: var(--btn); }
.room-card.room-arriving .room-card-status { color: var(--warning); }
.room-card.room-leaving  .room-card-status { color: var(--danger); }

/* ── Balance display: has outstanding balance ────────────────────── */
.balance-display.has-balance { background: rgba(255,59,48,.06); }
.balance-display.has-balance .balance-amount { color: var(--danger); }

/* ── WhatsApp action button ──────────────────────────────────────── */
.action-btn.whatsapp { background: rgba(37,211,102,.1); color: var(--whatsapp); }

/* ── Finance hint ────────────────────────────────────────────────── */
.finance-hint {
  font-size: 13px;
  color: var(--hint);
  text-align: center;
  padding: 0 0 14px;
}

/* ── WhatsApp template picker ────────────────────────────────────── */
.wa-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.wa-phone-label { font-size: 20px; flex-shrink: 0; }
.wa-phone-input { flex: 1; }

.wa-templates {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.wa-tmpl-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 15px;
  cursor: pointer;
  text-align: right;
  color: var(--text);
  transition: all .12s;
  width: 100%;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}
.wa-tmpl-btn:active { opacity: .7; }
.wa-tmpl-btn.selected { border-color: var(--whatsapp); background: rgba(37,211,102,.08); }
.wa-tmpl-label   { font-size: 15px; font-weight: 600; }
.wa-tmpl-preview { font-size: 12px; color: var(--hint); }

/* ── Detail screen nav bar ───────────────────────────────────────── */
.detail-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 15px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}
.back-btn {
  background: var(--section-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.back-btn:active { opacity: .6; }
.back-btn-home {
  background: var(--section-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--hint);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.back-btn-home:active { opacity: .6; }
.detail-nav-title {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  letter-spacing: -.01em;
}
.res-num-badge {
  display: inline-block;
  margin-right: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary, #888);
  vertical-align: middle;
}

/* ── Balance breakdown ───────────────────────────────────────────── */
.balance-breakdown {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.balance-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
  color: var(--hint);
}
.bal-debit  { color: var(--danger); font-weight: 600; }
.bal-credit { color: var(--success); font-weight: 600; }

/* ── Week summary ────────────────────────────────────────────────── */
.loading-week {
  font-size: 12px;
  color: var(--hint);
  text-align: center;
  padding: 8px;
}
.week-list { margin-top: 4px; }
.week-row {
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px;
}
.week-row:last-child { border-bottom: none; }
.week-row:active { background: var(--section-bg); }
.week-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.week-day   { font-weight: 600; min-width: 70px; }
.week-date  { font-weight: 400; color: var(--hint); font-size: 12px; }
.week-counts { color: var(--text); }
.week-empty .week-counts { color: var(--hint); }
.week-free  { font-style: italic; }
.week-rooms {
  font-size: 11px;
  color: var(--hint);
  margin-top: 3px;
  padding-right: 2px;
}

/* ── Admin screen ────────────────────────────────────────────────── */
.admin-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-xs);
}
.admin-user-info { flex: 1; }
.admin-user-name { font-size: 15px; font-weight: 600; }
.admin-user-id {
  font-size: 11px;
  color: var(--hint);
  margin-top: 2px;
  font-family: monospace;
  direction: ltr;
  text-align: right;
}
.role-select {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.admin-delete-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: opacity .12s;
}
.admin-delete-btn:active { opacity: .5; }
.admin-add-form { display: flex; flex-direction: column; gap: 9px; }
.admin-roles-legend { margin-top: 4px; }
.admin-legend-row {
  font-size: 13px;
  color: var(--hint);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.admin-legend-row:last-child { border-bottom: none; }
.admin-legend-row strong { color: var(--text); }

/* ── App version label ───────────────────────────────────────────── */
.app-version-label {
  text-align: center;
  font-size: 12px;
  color: var(--hint);
  padding: 16px 0 8px;
  opacity: 0.6;
}

/* ── Admin room picker ───────────────────────────────────────────── */
.admin-user-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.admin-user-card .admin-user-row {
  background: transparent;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: none;
}
.admin-rooms-toggle {
  width: 100%;
  background: rgba(0,0,0,.025);
  border: none;
  border-top: 1px solid var(--border);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}
.admin-rooms-toggle:active { opacity: .6; }
.admin-room-picker {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.admin-room-picker.hidden { display: none; }
.room-checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.room-check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.room-check-label:active { opacity: .6; }
.room-check { accent-color: var(--btn); width: 16px; height: 16px; cursor: pointer; }
.admin-room-footer { display: flex; gap: 8px; }
.admin-room-all-btn {
  flex: 1;
  background: var(--section-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  font-family: inherit;
}
.admin-room-all-btn:active { opacity: .6; }

/* ── FAB — הזמנה חדשה ────────────────────────────────────────────── */
.fab-add {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-text);
  font-size: 30px;
  line-height: 1;
  border: none;
  box-shadow: 0 4px 18px rgba(var(--btn-rgb),.45);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
}
.fab-add.hidden { display: none; }
.fab-add:active { opacity: .8; transform: scale(.95); }

/* ── Theme switcher ──────────────────────────────────────────────── */
.theme-picker {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.theme-card {
  flex: 1;
  border: 2.5px solid transparent;
  border-radius: var(--radius);
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  background: var(--card-bg);
  box-shadow: var(--shadow-xs);
  transition: all .15s;
}
.theme-card.active {
  border-color: var(--btn);
  box-shadow: 0 2px 12px rgba(var(--btn-rgb),.25);
}
.theme-card:active { opacity: .75; }
.theme-card-logo {
  width: 72px;
  height: auto;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--section-bg);
  padding: 4px 6px;
  object-fit: contain;
}
.theme-card-name { font-size: 13px; font-weight: 700; color: var(--text); }
.theme-card-sub  { font-size: 11px; color: var(--hint); margin-top: 2px; }

/* ── Add to Home Screen button ───────────────────────────────────── */
.add-home-btn {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--btn);
  border: 1.5px solid var(--btn);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
}
.add-home-btn:active { opacity: .7; }

/* ── New reservation form ────────────────────────────────────────── */
.newres-form { padding: 0 2px; }
.newres-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.newres-dates .form-input {
  border: 2px solid var(--section-bg);
  background: var(--bg);
}
.newres-dates .form-input:focus {
  border-color: var(--btn);
  background: var(--bg);
}
.newres-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: var(--gap);
  box-shadow: var(--shadow-xs);
}
.nr-price-display {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--btn);
}
.nr-price-display .price-detail {
  font-size: 12px;
  color: var(--hint);
  margin-right: 6px;
  font-weight: 400;
}
.price-edit-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  opacity: .7;
}
.guest-count-row {
  display: flex;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.guest-count-item {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--hint);
  box-shadow: var(--shadow-xs);
}
.counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.counter-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(var(--btn-rgb),.3);
}
.counter-btn:active { opacity: .7; }
.counter-row span { font-size: 18px; font-weight: 700; color: var(--text); min-width: 22px; }
.breakfast-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 8px;
}
.breakfast-toggle input { margin-top: 2px; accent-color: var(--btn); width: 18px; height: 18px; flex-shrink: 0; }
.nr-breakfast-info {
  font-size: 13px;
  color: var(--btn);
  background: rgba(var(--btn-rgb),.08);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  margin-bottom: var(--gap);
}

/* ═══════════════════════════════════════════════════════════════════
   SCHEDULE — View toggle (Day / Grid) + Grid View (rooms × days)
   Added for A38 Sprint 3 — rooms×days occupancy grid
═══════════════════════════════════════════════════════════════════ */
.schedule-view-toggle {
  display: flex; gap: 8px;
  margin: 8px 12px;
}
.view-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--hint);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.view-toggle-btn.active {
  background: var(--btn);
  color: var(--btn-text);
  border-color: var(--btn);
}
.view-toggle-btn:active { opacity: 0.7; }

.grid-days-toggle {
  display: flex; gap: 6px;
  margin: 0 12px 10px;
}
.days-btn {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--hint);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.days-btn.active {
  background: var(--btn);
  color: var(--btn-text);
  border-color: var(--btn);
}
.days-btn:active { opacity: 0.7; }

.grid-legend {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 12px;
  font-size: 11px;
  background: var(--section-bg);
  border-radius: 8px;
  margin: 0 12px 10px;
}
.legend-chip {
  display: inline-flex; align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  border: 1px solid transparent;
}

.grid-scroll {
  overflow-x: auto;
  padding: 0 12px 16px;
  -webkit-overflow-scrolling: touch;
  direction: rtl;
}
.grid-table {
  display: grid;
  gap: 2px;
  min-width: 100%;
  font-size: 13px;
}

.grid-room-cell {
  padding: 6px 8px;
  background: var(--section-bg);
  border-radius: 4px;
  position: sticky; right: 0; z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex; align-items: center;
  font-weight: 500;
  font-size: 12px;
}
.grid-room-header {
  background: var(--hint);
  color: var(--bg);
  font-weight: 700;
  justify-content: center;
}

.grid-date-cell {
  padding: 4px 2px;
  text-align: center;
  background: var(--section-bg);
  border-radius: 4px;
  min-height: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.grid-date-day { font-weight: 700; font-size: 13px; line-height: 1.1; }
.grid-date-dm  { font-size: 10px; color: var(--hint); line-height: 1.1; }

.grid-cell {
  padding: 4px 2px;
  text-align: center;
  border-radius: 4px;
  min-height: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.15s;
  cursor: default;
}
.grid-cell[onclick] { cursor: pointer; }
.grid-cell[onclick]:active { opacity: 0.6; }

.grid-cell-emoji { font-size: 13px; line-height: 1; display: inline-flex; }
.grid-cell-guest {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

/* Status colors — unified single color for any occupied state.
   Check-out is treated as empty (guest gone = room available); see
   loadScheduleGrid JS logic that maps 'check-out' → 'empty' visually. */
.cell-occupied,
.cell-checkin,
.cell-midstay,
.cell-sameday  { background: #cce7ff; color: #003d7a; }
.cell-empty,
.cell-checkout { background: #f5f5f5; color: #999999; }
