/* YARDEN ASKAYO — design system */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #F2E9DF;
  --bg-deep: #EADFD2;
  --card: #FBF7F1;
  --ink: #4A3428;
  --brand: #7E4F3D;
  --brand-dark: #64392B;
  --brand-soft: #A9836F;
  --muted: #9B8574;
  --line: #E3D5C6;
  --accent2: #B98A6F;
  --success: #6E8B5E;
  --danger: #B3563E;
  --radius: 20px;
  --radius-sm: 14px;
  /* גבול רך — במקום קו קשיח, משטחים "צפים" על רקע */
  --line-soft: rgba(126, 79, 61, .10);
  --shadow-xs: 0 1px 2px rgba(74, 52, 40, .05), 0 1px 1px rgba(74, 52, 40, .03);
  --shadow: 0 1px 2px rgba(74, 52, 40, .04), 0 8px 22px -8px rgba(126, 79, 61, .16);
  --shadow-lg: 0 2px 6px rgba(74, 52, 40, .06), 0 26px 52px -18px rgba(100, 57, 43, .30);
  --ring: 0 0 0 4px rgba(126, 79, 61, .14);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Assistant', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  touch-action: manipulation;   /* מבטל זום בהקשה כפולה במובייל */
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* הילה עדינה בראש הדף — עומק בלי לשנות את הפלטה */
body {
  direction: rtl;
  background: radial-gradient(900px 420px at 50% -8%, rgba(255, 255, 255, .55), transparent 65%), var(--bg);
}

h1, h2, h3 { font-weight: 700; color: var(--brand-dark); letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; box-shadow: var(--ring);
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 110px;
  min-height: 100%;
}
.page.wide { max-width: 1080px; }

/* ---------- header ---------- */
.app-header {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 2px 12px; min-height: 62px;
}
.app-header .logo-img { height: 15px; display: block; }

/* ---------- avatar ---------- */
.avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--bg-deep); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.6rem; }

/* logout button (left side) */
.user-box {
  position: absolute; left: 2px; top: 50%; transform: translateY(-50%); z-index: 55;
  display: flex; align-items: center; gap: 8px;
}
.hdr-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; padding: 0;
  border: 1px solid var(--line-soft); background: var(--card); cursor: pointer;
  box-shadow: var(--shadow-xs); transition: transform .15s var(--ease), box-shadow .15s;
}
.hdr-avatar:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.hdr-avatar .avatar { width: 100%; height: 100%; font-size: .95rem; }
@media (max-width: 600px) {
  .app-header .logo-img { height: 11px; }
  .user-box { gap: 5px; }
  .logout-btn, .hdr-avatar { width: 33px; height: 33px; }
  .logout-btn svg { width: 15px; height: 15px; }
}
.logout-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line-soft); cursor: pointer;
  color: var(--brand-dark); box-shadow: var(--shadow-xs); transition: background .15s, transform .12s;
}
.logout-btn:hover { background: #fff; }
.logout-btn:active { transform: scale(.94); }
.logout-btn svg { width: 18px; height: 18px; }

.section-title {
  font-size: 1.12rem; font-weight: 700; color: var(--brand-dark); margin: 24px 2px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 12px;
}
.card.flat { box-shadow: var(--shadow-xs); }

.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  border-radius: 999px; padding: 13px 22px;
  background: linear-gradient(180deg, #875846 0%, var(--brand) 55%, #76493B 100%); color: #FBF7F1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 20px -10px rgba(126, 79, 61, .6);
  transition: transform .12s var(--ease), box-shadow .2s, filter .2s, background .15s, opacity .15s;
  min-height: 48px;
}
.btn:hover { filter: brightness(1.04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 24px -10px rgba(126, 79, 61, .65); }
.btn:active { transform: scale(.97) translateY(1px); filter: none; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:disabled { opacity: .45; cursor: default; filter: none; box-shadow: none; }
.btn.ghost, .btn.soft, .btn.danger { background-image: none; box-shadow: none; }
.btn.ghost {
  background: rgba(255, 255, 255, .55); color: var(--brand);
  border: 1.5px solid var(--line);
}
.btn.ghost:hover { background: #fff; border-color: var(--brand-soft); }
.btn.soft { background: var(--bg-deep); color: var(--brand-dark); }
.btn.soft:hover { background: #E3D5C6; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid rgba(179, 86, 62, .55); }
.btn.danger:hover { background: rgba(179, 86, 62, .06); border-color: var(--danger); }
.btn.small { padding: 7px 14px; min-height: 34px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.icon-btn { padding: 10px; min-height: 42px; min-width: 42px; border-radius: 50%; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--brand-dark); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1.05rem; color: var(--ink);
  background: #FFFDFB; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #D4C2AF; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-soft); background: #fff; box-shadow: var(--ring);
}
.field .hint { font-size: .8rem; color: var(--muted); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: rgba(255, 255, 255, .72); color: var(--ink);
  border-radius: 999px; padding: 9px 16px; min-height: 42px; font-family: inherit;
  font-size: .95rem; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .12s var(--ease);
}
.chip:hover:not(:disabled):not(.selected) { border-color: var(--brand-soft); background: #fff; }
.chip:active:not(:disabled) { transform: scale(.97); }
.chip.selected {
  background: var(--brand); border-color: var(--brand); color: #FBF7F1;
  box-shadow: 0 8px 16px -8px rgba(126, 79, 61, .6);
}
.chip:disabled { opacity: .35; cursor: default; text-decoration: line-through; }

/* ---------- lists ---------- */
.list-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px;
  cursor: pointer; box-shadow: var(--shadow-xs);
  transition: background .15s, box-shadow .2s, transform .15s var(--ease);
}
.list-item:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .sub { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.price-tag { font-weight: 700; color: var(--brand); white-space: nowrap; }

.empty {
  text-align: center; color: var(--muted); padding: 34px 10px;
  font-size: .95rem;
}
.empty .big {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 12px;
  background: rgba(126, 79, 61, .07); display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
}

/* ---------- bottom nav ---------- */
/* ניווט תחתון "צף" — גלולה מזכוכית מעל התוכן */
.bottom-nav {
  position: fixed; bottom: calc(10px + env(safe-area-inset-bottom)); right: 12px; left: 12px; z-index: 40;
  background: rgba(251, 247, 241, .84); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .65); border-radius: 26px;
  box-shadow: var(--shadow-lg);
  display: flex; justify-content: space-around;
  padding: 5px 6px;
}
.bottom-nav button {
  flex: 1; max-width: 130px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: .72rem; font-weight: 600; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 5px;
  border-radius: 18px; position: relative; transition: color .15s;
}
.bottom-nav button .nav-ic {
  display: flex; padding: 4px 14px; border-radius: 14px;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.bottom-nav button svg { width: 23px; height: 23px; stroke: currentColor; }
.bottom-nav button.active { color: var(--brand); }
.bottom-nav button.active .nav-ic { background: rgba(126, 79, 61, .12); }
.bottom-nav button:active .nav-ic { transform: scale(.92); }
.nav-badge {
  position: absolute; top: 2px; inset-inline-end: 20%; box-shadow: 0 0 0 2px var(--card);
  background: var(--danger); color: #fff; font-size: .62rem;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- modal / sheet ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60; background: rgba(74, 52, 40, .38);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.modal-back.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--card); width: 100%; max-width: 560px;
  border-radius: 28px 28px 0 0; padding: 26px 18px calc(24px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
  transform: translateY(40px); transition: transform .32s var(--ease);
}
body.modal-open { overflow: hidden; }
/* ידית גרירה — מסמנת שזה גיליון שעולה מלמטה */
.modal::before {
  content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 4px; border-radius: 999px; background: var(--line);
}
.modal-back.open .modal { transform: none; }
.modal { position: relative; }
.modal h3 { margin-bottom: 14px; font-size: 1.15rem; padding-left: 40px; }
.modal-x {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg-deep); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
}
.modal-x svg { width: 15px; height: 15px; }
.modal-x:active { transform: scale(.92); }
.modal .modal-close { float: left; }
@media (min-width: 700px) {
  .modal-back { align-items: center; }
  .modal { border-radius: 24px; padding-top: 22px; transform: translateY(14px) scale(.98); }
  .modal::before { display: none; }
}

/* ---------- misc ---------- */
.tag {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 3px 10px; font-size: .75rem; font-weight: 700;
}
.tag.staff-c0 { background: #E9D8CB; color: var(--brand-dark); }
.tag.staff-c1 { background: #DDE3D3; color: #4C5F3D; }
.tag.staff-c2 { background: #E3D3DD; color: #5F3D51; }
.tag.staff-c3 { background: #D3DDE3; color: #3D515F; }
.tag.staff-c4 { background: #EFE4C8; color: #6B5A2E; }
.tag.staff-c5 { background: #E0D5EA; color: #4E3D5F; }
.tag.cancelled { background: #F0DBD3; color: var(--danger); }
.tag.done { background: #E3E8DC; color: var(--success); }
.tag.pay { background: var(--bg-deep); color: var(--brand-dark); }
.tag.pending { background: #F3E6C9; color: #8A6A2F; }

/* health declaration */
.decl-intro { white-space: pre-line; color: var(--muted); font-size: .9rem; margin: 6px 0 14px; text-align: center; }
.decl-questions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.decl-q {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  background: var(--bg); border-radius: 11px; padding: 9px 12px;
}
.decl-q-label { flex: 1; min-width: 55%; font-size: .9rem; }
.decl-yn { display: flex; gap: 6px; }
.decl-yn .chip { padding: 5px 14px; font-size: .85rem; }
.decl-detail { width: 100%; font-family: inherit; font-size: 1rem; padding: 8px 10px;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff; outline: none; }
.decl-note { font-size: .78rem; color: var(--muted); margin: 4px 0; }
.decl-consent-title { font-weight: 700; color: var(--brand-dark); margin: 16px 0 6px; }
.decl-consent { white-space: pre-line; font-size: .84rem; line-height: 1.65; color: var(--ink);
  background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; max-height: 34vh; overflow-y: auto; }
.decl-sig-label { font-weight: 700; color: var(--brand-dark); margin: 16px 0 8px; }
.sig-wrap { text-align: center; margin-bottom: 10px; }
.sig-wrap canvas {
  width: 100%; height: 150px; touch-action: none; cursor: crosshair;
  background: #fff; border: 1.5px dashed var(--brand-soft); border-radius: var(--radius-sm);
}
.sig-wrap .btn { margin-top: 8px; }

/* service info button + modal */
.info-btn {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line); background: var(--bg-deep); color: var(--brand-dark);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.info-btn svg { width: 16px; height: 16px; }
.info-btn-spacer { width: 30px; flex-shrink: 0; }
/* עמודת מחיר ברוחב קבוע — כל המחירים על אותו קו */
.svc-price { min-width: 72px; text-align: center; flex-shrink: 0; }
.sub .svc-chevron { display: inline-flex; vertical-align: middle; margin-inline-start: 2px; }
.sub .svc-chevron svg { width: 14px; height: 14px; }
.svc-desc {
  white-space: pre-line; color: var(--ink); font-size: .93rem; line-height: 1.7;
  background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px;
  max-height: 42vh; overflow-y: auto;
}

/* service add-ons (accordion) */
.service-group { margin-bottom: 8px; }
.svc-chevron {
  display: flex; align-items: center; color: var(--brand-soft); margin-inline-start: 2px;
}
.svc-chevron svg { width: 18px; height: 18px; transition: transform .18s; }
.svc-chevron.open svg { transform: rotate(180deg); }
.addon-panel {
  background: var(--bg-deep); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 12px 14px 14px; margin-top: -4px;
  animation: fadeIn .18s ease;
}
.addon-hint { font-size: .82rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 8px; }
.addon-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 11px;
  padding: 10px 12px; margin-bottom: 6px; font-size: .93rem;
}
.addon-row:has(input:checked) { border-color: var(--brand); background: #fff; }
.addon-row input[type="checkbox"] {
  width: 19px; height: 19px; accent-color: var(--brand); flex-shrink: 0;
}
.addon-row .addon-price { font-weight: 700; color: var(--brand); }

/* payment method selector (booking) */
.pay-option {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; cursor: pointer; transition: border-color .12s, background .12s;
}
.pay-option.selected { border-color: var(--brand); background: #fff; }
.pay-option .po-radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.pay-option.selected .po-radio { border-color: var(--brand); }
.pay-option.selected .po-radio::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
}
.pay-option .po-title { font-weight: 700; }
.pay-option .po-sub { font-size: .8rem; color: var(--muted); margin-top: 1px; }

/* payment sheet */
.pay-amount { text-align: center; font-size: 2rem; font-weight: 700; color: var(--brand-dark); margin: 8px 0 2px; }
.pay-phone {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-deep); border-radius: 14px; padding: 14px; margin: 14px 0;
  font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); direction: ltr;
}

.divider { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

.toast {
  position: fixed; bottom: 104px; right: 50%; transform: translateX(50%) translateY(10px);
  background: rgba(100, 57, 43, .94); backdrop-filter: blur(10px); color: #FBF7F1; padding: 12px 22px;
  border-radius: 999px; font-weight: 600; z-index: 90; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .22s ease; max-width: 90vw; text-align: center;
  font-size: .95rem;
}
.toast.show { opacity: 1; transform: translateX(50%); }

.segmented {
  display: flex; background: rgba(234, 223, 210, .75); border-radius: 999px; padding: 4px; gap: 2px;
  box-shadow: inset 0 1px 2px rgba(74, 52, 40, .06);
}
.segmented button {
  flex: 1; border: none; background: transparent; font-family: inherit;
  font-weight: 600; font-size: .9rem; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.segmented button.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow); }

.fab-wrap {
  position: fixed; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 45;
  right: 50%; transform: translateX(50%);
  display: flex; gap: 10px;
}
.fab {
  border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: .95rem;
  background: linear-gradient(180deg, #875846, var(--brand) 60%, #76493B); color: #FBF7F1; border-radius: 999px;
  padding: 13px 20px; box-shadow: 0 14px 28px -10px rgba(100, 57, 43, .6);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s;
}
.fab:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -10px rgba(100, 57, 43, .65); }
.fab:active { transform: scale(.97); }
.fab.secondary {
  background: rgba(251, 247, 241, .9); backdrop-filter: blur(12px); color: var(--brand);
  border: 1px solid rgba(126, 79, 61, .2); box-shadow: var(--shadow-lg);
}

/* מצב טעינה — נצנוץ עדין במקום טקסט יבש */
.skeleton {
  position: relative; color: var(--muted); text-align: center; padding: 26px; font-size: .9rem;
  border-radius: var(--radius-sm); overflow: hidden;
  background: linear-gradient(90deg, rgba(126, 79, 61, .04) 0%, rgba(126, 79, 61, .09) 50%, rgba(126, 79, 61, .04) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ===== סרגל התקדמות בקביעת תור ===== */
.book-progress { margin: 2px 0 16px; }
.bp-steps { display: flex; align-items: center; gap: 4px; }
.bp-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto;
  background: none; border: none; font-family: inherit; cursor: default; padding: 0 2px; color: var(--muted);
}
.bp-step.done { cursor: pointer; }
.bp-dot {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; background: var(--bg-deep); color: var(--muted);
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.bp-dot svg { width: 14px; height: 14px; }
.bp-step.cur .bp-dot { background: var(--brand); color: #FBF7F1; box-shadow: 0 6px 14px -6px rgba(126, 79, 61, .6); transform: scale(1.1); }
.bp-step.done .bp-dot { background: #DCEBDA; color: #47703F; }
.bp-step.cur .bp-lbl { color: var(--brand-dark); font-weight: 700; }
.bp-lbl { font-size: .7rem; font-weight: 600; }
.bp-line { flex: 1; height: 2px; background: var(--line); border-radius: 2px; margin-bottom: 18px; }
.bp-picks {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 10px;
  font-size: .82rem; color: var(--brand-dark); font-weight: 600;
}
.bp-pick { background: rgba(255, 255, 255, .7); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 10px; }
.bp-sep { color: var(--muted); font-weight: 400; }
.day-chip.is-today .dow { color: var(--brand); }
.day-chip.selected.is-today .dow { color: #FBF7F1; }

/* ===== ראשי תיבות ברשימת לקוחות ===== */
.avatar.cl-init { width: 40px; height: 40px; font-size: .82rem; letter-spacing: .02em; }
.avatar.cl-init.c0 { background: #E9D8CB; color: var(--brand-dark); }
.avatar.cl-init.c1 { background: #DDE3D3; color: #4C5F3D; }
.avatar.cl-init.c2 { background: #E3D3DD; color: #5F3D51; }
.avatar.cl-init.c3 { background: #D3DDE3; color: #3D515F; }
.avatar.cl-init.c4 { background: #EFE4C8; color: #6B5A2E; }
.avatar.cl-init.c5 { background: #E0D5EA; color: #4E3D5F; }

/* ---------- client picker (dropdown + quick create) ---------- */
.picker-dropdown {
  position: absolute; top: 100%; right: 0; left: 0; z-index: 70;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px;
  box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto;
  display: none; margin-top: 4px;
}
.picker-dropdown.open { display: block; animation: fadeIn .12s ease; }
.pd-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; font-size: .95rem;
}
.pd-item:hover { background: var(--bg-deep); }
.pd-item .pd-phone { color: var(--muted); font-size: .84rem; direction: ltr; }
.pd-item.pd-new { color: var(--brand); font-weight: 700; border-top: 1px solid var(--line); }
.pd-item.pd-new:only-child { border-top: none; }
.pd-empty { padding: 11px 14px; color: var(--muted); font-size: .88rem; }
.quick-client {
  background: var(--bg-deep); border-radius: 14px; padding: 14px; margin-top: 10px;
}
.quick-client .field input { background: #fff; }

/* ---------- datepicker ---------- */
.dp-input { cursor: pointer; background: #fff; }
.dp-overlay {
  position: fixed; inset: 0; z-index: 85; background: rgba(74, 52, 40, .45);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.dp-overlay.open { display: flex; animation: fadeIn .15s ease; }
.dp-card {
  background: #FDFBF7; border-radius: 26px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.7);
  padding: 16px; width: 100%; max-width: 360px;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-nav {
  width: 46px; height: 42px; border-radius: 14px; border: none; cursor: pointer;
  background: #F2EDE5; color: #6B6257; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}
.dp-nav svg { width: 19px; height: 19px; }
.dp-title {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 1.15rem; color: var(--ink); padding: 8px 14px; border-radius: 12px;
}
.dp-title:hover { background: #F2EDE5; }
.dp-grid.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-grid.months, .dp-grid.years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 0; }
.dp-dow { text-align: center; font-size: .8rem; color: #A99F92; font-weight: 700; padding: 8px 0 6px; }
.dp-cell {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 1.05rem; font-weight: 600; color: var(--ink); border-radius: 12px;
}
.dp-grid.days .dp-cell { aspect-ratio: 1; }
.dp-grid.months .dp-cell, .dp-grid.years .dp-cell { padding: 13px 4px; font-size: .95rem; }
.dp-cell:hover { background: #F2EDE5; }
.dp-cell.out { color: #BFB7AA; }
.dp-cell.sel { background: #C8813F; color: #3F2A1A; }
.dp-cell.now { color: #C8813F; }
.dp-today {
  width: 100%; margin-top: 12px; padding: 14px; border-radius: 999px;
  background: #F2EDE5; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 1rem; color: var(--ink);
}

/* view switching */
.view { display: none; }
.view.active { display: block; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view.active { animation-timing-function: var(--ease); animation-duration: .28s; }

/* studio card photo */
.studio-card { padding-top: 0; padding-left: 0; padding-right: 0; overflow: hidden; }
.studio-card .row { padding: 0 18px; }
.studio-card .row:last-child { padding-bottom: 4px; }
.studio-photo {
  width: 100%; max-height: 300px; object-fit: cover; display: block;
  margin-bottom: 14px;
}

/* info footer */
.biz-footer {
  text-align: center; color: var(--muted); font-size: .85rem;
  padding: 18px 0 8px;
}
.biz-footer .contact-row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

/* ===== אישור הגעה ===== */
.ta-conf {
  flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; margin-top: 2px;
}
.ta-conf.ok { background: #DCEBDA; color: #47703F; }
.ta-conf.no { background: #F3E6C9; color: #8A6D1F; }
.wk-conf { color: #47703F; font-weight: 700; }
.next-appt .conf-line { font-size: .88rem; margin-top: 10px; opacity: .95; }
.next-appt .conf-btn {
  margin-top: 12px; background: #FBF7F1; color: var(--brand-dark);
  width: 100%; font-size: .95rem;
}
.next-appt .conf-hint { font-size: .74rem; opacity: .8; margin-top: 7px; text-align: center; }
.conf-hint { font-size: .76rem; margin-top: 6px; }

/* ===== רשימת המתנה ===== */
.chip.wl { border-style: dashed; color: var(--muted); }
.chip.wl.mine {
  background: var(--bg-deep); border-style: solid; border-color: var(--brand-soft);
  color: var(--brand-dark); opacity: 1;
}
.wl-box {
  width: 100%; margin-top: 18px; background: var(--card);
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.wl-title { font-weight: 700; color: var(--brand-dark); font-size: .95rem; }
.wl-sub { font-size: .82rem; color: var(--muted); margin: 3px 0 10px; }

.wl-admin {
  background: var(--card); border: 1.5px dashed var(--brand-soft);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px;
}
.wl-admin-title { font-weight: 700; color: var(--brand-dark); font-size: .9rem; margin-bottom: 6px; }
.wl-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 0; font-size: .88rem; border-top: 1px solid var(--line);
}
.wl-row:first-of-type { border-top: none; }
.wl-row b { color: var(--brand-dark); }
.wl-row .grow { min-width: 0; }

/* desktop tweaks */
@media (min-width: 900px) {
  .page { padding-top: 26px; }
  .bottom-nav {
    top: 14px; bottom: auto; right: 50%; left: auto; transform: translateX(50%);
    width: max-content; max-width: calc(100vw - 32px); border-radius: 999px;
    justify-content: center; gap: 4px; padding: 6px 8px;
  }
  .bottom-nav button {
    flex-direction: row; font-size: .95rem; max-width: none; flex: none; padding: 8px 16px; gap: 7px;
    border-radius: 999px; transition: background .2s var(--ease), color .15s;
  }
  .bottom-nav button:hover { background: rgba(126, 79, 61, .06); }
  .bottom-nav button.active { background: rgba(126, 79, 61, .11); }
  .bottom-nav button .nav-ic { padding: 0; border-radius: 0; }
  .bottom-nav button.active .nav-ic { background: none; }
  .bottom-nav button svg { width: 19px; height: 19px; }
  .nav-badge { position: static; margin-inline-start: 2px; box-shadow: none; }
  .page { padding-top: 96px; }
  .fab-wrap { right: auto; left: 40px; transform: none; bottom: 40px; }
}

/* ===== אירועים אישיים ביומן (רק הצוות רואה) ===== */
.tl-appt.personal {
  background: #F6F1E8;
  border: 1.5px dashed var(--brand-soft);
  border-right: 4px solid var(--brand-soft);
}
.tl-appt.personal .ta-name { color: var(--brand-dark); }
.week-appt.personal {
  background: #F6F1E8;
  border: 1.5px dashed var(--brand-soft);
  border-right: 3px solid var(--brand-soft);
}
.month-cell .pedot { font-size: .55rem; line-height: 1; position: absolute; top: 4px; left: 5px; }
.tl-appt.personal { display: block; white-space: normal; }
.tl-appt.personal .pe-line1 { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; overflow: hidden; }
.tl-appt.personal .pe-start { font-size: 1.02rem; font-weight: 700; color: var(--brand-dark); }
.tl-appt.personal .pe-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.tl-appt.personal .pe-line2 { font-size: .72rem; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== staff service checkboxes + per-staff price ===== */
.svc-checks { display: flex; flex-direction: column; gap: 2px; }
.svc-check {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.svc-check:last-child { border-bottom: none; }
.svc-check-main { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; min-width: 0; }
.svc-check-main input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--brand); flex-shrink: 0; }
.svc-check-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-price-in { display: flex; align-items: center; gap: 3px; flex-shrink: 0; color: var(--muted); }
.svc-price-in input {
  width: 70px; text-align: center; font-family: inherit; font-size: 1rem;
  padding: 6px 6px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); outline: none;
}
.svc-price-in input:focus { border-color: var(--brand); }
.svc-price-in input:disabled { opacity: .4; background: var(--bg-deep); }
.svc-check.on { opacity: 1; }
.svc-check:not(.on) .svc-check-main span { color: var(--muted); }

/* ===== waitlist dedicated tab ===== */
.wl-intro { color: var(--muted); font-size: .88rem; margin: -4px 2px 8px; line-height: 1.5; }
.wl-card {
  background: var(--card); border: 1px solid var(--line); border-right: 4px solid var(--accent2, var(--brand-soft));
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
}
.wl-card-top { display: flex; align-items: baseline; gap: 8px; }
.wl-card-top .wl-time { font-size: 1.15rem; font-weight: 700; color: var(--brand-dark); flex-shrink: 0; }
.wl-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ===== תפריט תוספות מתקפל (ממשק מנהלת) ===== */
.addon-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font-family: inherit; font-size: .95rem; font-weight: 600; color: var(--brand-dark);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; text-align: start;
}
.addon-toggle:active { transform: scale(.995); }
.addon-toggle .addon-count { font-size: .82rem; font-weight: 600; color: var(--muted); }
.addon-toggle .addon-count.has { color: var(--brand); }
.addon-toggle .addon-chev { display: flex; transition: transform .18s; }
.addon-toggle .addon-chev svg { width: 18px; height: 18px; stroke: var(--brand-soft); }
.addon-toggle .addon-chev.open { transform: rotate(180deg); }
#ap-addons { margin-top: 6px; }

/* ===== הודעות מהסטודיו ===== */
.msg-card { border-right: 4px solid var(--line); border-radius: 16px; }
.msg-card.unread { border-right-color: var(--brand); background: #fff; }
.msg-title { font-weight: 700; font-size: 1.05rem; color: var(--brand-dark); margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; line-height: 1.6; }
.msg-media {
  display: block; width: 100%; max-height: 320px; object-fit: cover;
  border-radius: 12px; margin-top: 10px; background: var(--bg-deep);
}
.msg-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; font-size: .78rem; color: var(--muted);
}

/* ===== דשבורד סטטיסטיקה ===== */
.stat-filters { margin-bottom: 12px; }
.stat-range { text-align: center; color: var(--muted); font-size: .82rem; margin: -4px 0 14px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.stat-tile {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px;
  padding: 14px 12px; text-align: center; box-shadow: var(--shadow-xs);
}
.stat-tile.wide { grid-column: 1 / -1; }
.stat-tile .sv { font-size: 1.7rem; font-weight: 700; color: var(--brand-dark); line-height: 1.1; }
.stat-tile .sl { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.stat-tile.accent {
  background: linear-gradient(135deg, var(--brand), var(--accent2)); border-color: transparent;
  box-shadow: 0 14px 28px -14px rgba(100, 57, 43, .55);
}
.stat-tile.accent .sv, .stat-tile.accent .sl { color: #FBF7F1; }
.stat-tile.accent .sl { opacity: .85; }

.bar-row { margin-bottom: 14px; }
.bar-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.bar-head .bn { flex: 1; font-size: .88rem; font-weight: 600; color: var(--ink); }
.bar-head .bv { font-size: .95rem; font-weight: 700; color: var(--brand-dark); }
.bar-track { height: 9px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--brand); min-width: 4px; }
.bar-sub { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.stat-empty { text-align: center; color: var(--muted); padding: 26px 8px; }

/* ===== אין תורים פנויים — אפשרויות ללקוחה ===== */
.ns-panel {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 18px 16px; margin: 6px 0 4px; text-align: center;
}
.ns-title { font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 4px; }
.ns-sub { color: var(--muted); font-size: .88rem; margin-bottom: 16px; line-height: 1.5; }
.ns-actions { display: flex; flex-direction: column; gap: 9px; }
.ns-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font-family: inherit; font-size: .96rem; font-weight: 600; text-align: start;
  padding: 14px 16px; border-radius: 999px; cursor: pointer; border: 1.5px solid transparent;
  background: var(--bg-deep); color: var(--brand-dark); transition: transform .1s;
}
.ns-btn:active { transform: scale(.985); }
.ns-btn .ns-ic { font-size: 1.15rem; line-height: 1; }
.ns-btn.primary { background: var(--brand); color: #FBF7F1; }
.ns-btn.outline { background: var(--card); border-color: var(--brand-soft); }
.ns-or { color: var(--muted); font-size: .82rem; margin: 12px 0 10px; font-weight: 600; }
.ns-result { margin-top: 14px; text-align: start; }
.ns-result .list-item { margin-bottom: 6px; }
.day-chip .dwait {
  display: block; font-size: .58rem; font-weight: 700; color: #B3563E;
  background: #F7E2DC; border-radius: 6px; margin-top: 4px; padding: 1px 3px;
}
.day-chip.selected .dwait { background: rgba(255,255,255,.22); color: #FBF7F1; }

/* ===== חלון אישור פנימי ===== */
.confirm-modal { max-width: 340px; text-align: center; padding: 26px 22px 22px; }
.confirm-modal .cf-msg { font-size: 1.02rem; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.by-line { display: block; font-size: .72rem; color: var(--muted); margin-top: 3px; font-weight: 500; }
.req-card { border-right-color: #C9A227; background: #FFFCF5; }
.req-note { font-size: .86rem; color: var(--brand-dark); margin-top: 6px; font-style: italic; }

/* ===== "אורורה" עדינה (CSS בלבד, גרסה בהירה לפלטה) — משותפת למסך ההתחברות ולמסך בחירת הענף ===== */
.branch-entry {
  position: fixed; inset: 0; z-index: 58; overflow-x: hidden; overflow-y: auto;
  background: var(--bg); color: var(--ink);
  display: none; opacity: 0; transition: opacity .32s var(--ease);
}
.branch-entry.show { display: block; }
.branch-entry.in { opacity: 1; }
.branch-entry > * { position: relative; }
.be-aurora, .be-blob, .be-grid { pointer-events: none; }
/* שתי אלומות אור — שני הגוונים הבהירים של המותג, בשקיפות נמוכה */
.be-aurora {
  position: fixed; inset: -40%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg, var(--brand-soft) 70deg, transparent 140deg,
    var(--accent2) 230deg, transparent 300deg);
  filter: blur(60px); opacity: .26;
  animation: beSpin 60s linear infinite;
  will-change: transform;
}
/* שלושה כתמי אור מטושטשים — גוונים שכנים מהמותג */
.be-blob {
  position: fixed; border-radius: 50%;
  filter: blur(70px); opacity: .16;
  will-change: transform;
  animation: beDrift1 26s ease-in-out infinite alternate;
}
.be-blob.b1 { width: 560px; height: 560px; background: var(--brand); top: -180px; right: -140px; }
.be-blob.b2 { width: 460px; height: 460px; background: var(--accent2); bottom: -200px; left: -140px;
  opacity: .22; animation: beDrift2 32s ease-in-out infinite alternate; animation-delay: -9s; }
.be-blob.b3 { width: 340px; height: 340px; background: var(--brand-soft); top: 38%; left: 28%;
  opacity: .2; animation: beDrift3 21s ease-in-out infinite alternate; animation-delay: -14s; }
/* רשת דקה שנמוגה לקצוות */
.be-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .7;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
@keyframes beSpin { to { transform: rotate(360deg) } }
@keyframes beDrift1 {
  0% { transform: translate(0,0) scale(1) }           35% { transform: translate(-42vw,28vh) scale(1.15) }
  70% { transform: translate(-18vw,62vh) scale(.9) }  100% { transform: translate(-55vw,10vh) scale(1.05) }
}
@keyframes beDrift2 {
  0% { transform: translate(0,0) scale(1) }           30% { transform: translate(38vw,-30vh) scale(1.2) }
  65% { transform: translate(60vw,-8vh) scale(.95) }  100% { transform: translate(12vw,-55vh) scale(1.1) }
}
@keyframes beDrift3 {
  0% { transform: translate(0,0) scale(1) }  50% { transform: translate(30vw,-25vh) scale(1.3) }
  100% { transform: translate(-16vw,22vh) scale(.85) }
}
@media (prefers-reduced-motion: reduce) {
  .be-aurora, .be-blob { animation: none; }
}

.branch-entry .be-content {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px calc(40px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto;
  animation: fadeIn .5s var(--ease);
}
.be-logo { height: 18px; margin-bottom: 34px; opacity: .9; }
.be-title { font-size: 1.75rem; font-weight: 700; color: var(--brand-dark); text-align: center; letter-spacing: -.01em; }
.be-sub { color: var(--muted); font-size: .95rem; margin: 6px 0 30px; text-align: center; }
.be-cards { display: grid; grid-template-columns: 1fr; gap: 14px; width: 100%; max-width: 420px; }
@media (min-width: 640px) { .be-cards { grid-template-columns: 1fr 1fr; max-width: 720px; gap: 18px; } }
/* האיורים: קווי מתאר בגוון המותג — יושבים על משטח רך, בלי מסגרת */
.branch-art { display: block; width: auto; height: 100%; object-fit: contain; pointer-events: none; }
/* כרטיס בחירה — משטח כמעט אטום, כדי שהאור מאחור לא יפגע בקריאות */
.branch-card {
  display: flex; align-items: center; gap: 16px; text-align: start; width: 100%;
  font-family: inherit; cursor: pointer; color: var(--ink);
  background: rgba(251, 247, 241, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 24px; padding: 20px 20px;
  box-shadow: var(--shadow-lg);
  transition: transform .22s var(--ease), box-shadow .25s, border-color .2s;
}
@media (min-width: 640px) {
  .branch-card { flex-direction: column; text-align: center; padding: 30px 22px 28px; gap: 16px; }
}
.branch-card:hover { transform: translateY(-3px); border-color: var(--brand-soft); box-shadow: 0 30px 60px -22px rgba(100, 57, 43, .4), var(--shadow); }
.branch-card:active { transform: scale(.98); }
.branch-card:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow-lg); }
.branch-card .bc-icon {
  width: 84px; height: 84px; border-radius: 26px; flex-shrink: 0; padding: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .9), var(--bg-deep));
  box-shadow: inset 0 0 0 1px rgba(126, 79, 61, .08), 0 10px 22px -14px rgba(100, 57, 43, .5);
  transition: transform .25s var(--ease);
}
.branch-card:hover .bc-icon { transform: translateY(-2px) scale(1.04); }
@media (min-width: 640px) { .branch-card .bc-icon { width: 128px; height: 128px; border-radius: 34px; padding: 14px; } }
.branch-card .bc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.branch-card .bc-title { font-size: 1.2rem; font-weight: 700; color: var(--brand-dark); }
.branch-card .bc-sub { font-size: .86rem; color: var(--muted); line-height: 1.4; }
.branch-card .bc-arrow { color: var(--brand-soft); display: flex; }
.branch-card .bc-arrow svg { width: 22px; height: 22px; }
@media (min-width: 640px) { .branch-card .bc-arrow { display: none; } }
.branch-card.current { border-color: var(--brand); }
.branch-card .bc-now {
  font-size: .68rem; font-weight: 700; color: var(--brand); background: rgba(126, 79, 61, .1);
  border-radius: 999px; padding: 2px 9px; align-self: flex-start; margin-top: 2px;
}
@media (min-width: 640px) { .branch-card .bc-now { align-self: center; } }

/* תג הענף בכותרת — לחיצה מחזירה למסך הבחירה */
.branch-pill {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%); z-index: 55;
  display: inline-flex; align-items: center; gap: 6px; max-width: 46vw;
  font-family: inherit; font-size: .8rem; font-weight: 700; color: var(--brand-dark); cursor: pointer;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 7px 11px 7px 9px; box-shadow: var(--shadow-xs);
  transition: box-shadow .15s, transform .15s var(--ease), background .15s;
}
.branch-pill:hover { background: #fff; box-shadow: var(--shadow); }
.branch-pill:active { transform: translateY(-50%) scale(.96); }
.branch-pill .bp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.branch-pill.clinic .bp-dot { background: var(--brand-soft); }
.branch-pill .bp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch-pill svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--muted); }
.branch-pill.static { cursor: default; }
@media (max-width: 600px) { .branch-pill { font-size: .74rem; padding: 6px 9px 6px 8px; } }
.tag.branch { background: rgba(126, 79, 61, .1); color: var(--brand-dark); }

/* ===== מגע (טלפון / אייפד): אין "ריחוף" שנתקע אחרי הקשה — במקומו משוב לחיצה ברור ===== */
@media (hover: none) {
  html .list-item:hover, html .week-appt:hover, html .month-cell:hover, html .appt-card:hover, html .tl-appt:hover {
    transform: none; box-shadow: var(--shadow-xs); background: var(--card);
  }
  html .tl-appt:hover { background: #fff; }
  html .staff-card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line-soft); }
  html .branch-card:hover { transform: none; box-shadow: var(--shadow-lg); border-color: rgba(255, 255, 255, .8); }
  html .branch-card:hover .bc-icon { transform: none; }
  html .day-chip:hover:not(.selected) { background: rgba(255, 255, 255, .72); border-color: var(--line-soft); }
  html .chip:hover:not(.selected) { background: rgba(255, 255, 255, .72); border-color: var(--line); }
  html .btn:hover { filter: none; }
  html .btn.ghost:hover { background: rgba(255, 255, 255, .55); border-color: var(--line); }
  html .btn.soft:hover { background: var(--bg-deep); }
  html .fab:hover { transform: none; }
  html .hdr-avatar:hover, html .cal-toolbar .nav-arrow:hover { transform: none; box-shadow: var(--shadow-xs); }
  html .list-item:active, html .week-appt:active, html .month-cell:active, html .appt-card:active,
  html .staff-card:active, html .branch-card:active, html .tl-appt:active { transform: scale(.985); }
  html .btn:active, html .chip:active:not(:disabled) { transform: scale(.97); }
}

/* ===== תצוגת לקוחה למנהל ===== */
.preview-bar {
  position: fixed; bottom: calc(92px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 45;
  font-family: inherit; font-size: .8rem; color: #fff; background: rgba(74, 52, 40, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: none; border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-lg);
}
.preview-bar b { text-decoration: underline; text-underline-offset: 3px; }

/* ===== אי-הגעה ===== */
/* תור שלא התקיים — אדום ברור, כמו תור מבוטל */
.week-appt.noshow-appt, .tl-appt.noshow-appt {
  background: #F6D9D1 !important; border-color: rgba(179, 86, 62, .45) !important;
  border-right: 4px solid var(--danger) !important; color: #8E3A26;
}
.week-appt.noshow-appt .t, .tl-appt.noshow-appt .ta-time, .tl-appt.noshow-appt .ta-name { color: #8E3A26 !important; }
.week-appt.noshow-appt > div:not(.t), .tl-appt.noshow-appt .ta-svc { text-decoration: line-through; text-decoration-color: rgba(179, 86, 62, .5); }
.ns-tag {
  display: inline-block; font-size: .62rem; font-weight: 800; color: #fff; background: var(--danger);
  border-radius: 999px; padding: 1px 6px; vertical-align: middle; text-decoration: none;
}
.btn.ns-btn { background: var(--danger); color: #fff; box-shadow: 0 10px 20px -10px rgba(179, 86, 62, .7); background-image: none; }
.ns-fee { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.ns-fee.open { background: #fff; border: 1.5px solid var(--danger); color: var(--danger); }
.ns-fee.ok { background: #EDF4EA; color: #47703F; }
.noshow-box { background: #FBEDE8; border: 1.5px solid rgba(179, 86, 62, .35); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--danger); }

/* ===== מתג (toggle) ===== */
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #D9CBB8; transition: background .2s;
}
.switch span::before {
  content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .22s var(--ease);
}
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::before { transform: translateX(-20px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* ===== הודעות אוטומטיות ===== */
.auto-master {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; margin-bottom: 14px;
  background: #FBEDE8; border: 1.5px solid rgba(179, 86, 62, .3);
}
.auto-master.on { background: #EDF4EA; border-color: rgba(110, 139, 94, .35); }
.auto-master .am-title { font-weight: 800; color: var(--danger); }
.auto-master.on .am-title { color: #47703F; }
.auto-master .am-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.auto-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line);
}
.auto-row:last-child { border-bottom: none; }
.auto-row .grow, .auto-master .grow { flex: 1; min-width: 0; }
.auto-row .ar-name { font-weight: 700; color: var(--brand-dark); font-size: .95rem; }
.auto-row .ar-when { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.auto-row .ar-sample {
  border: none; background: none; font-family: inherit; font-size: .78rem; font-weight: 700;
  color: var(--brand); cursor: pointer; padding: 6px 4px; white-space: nowrap;
}
.consent-row { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--ink); cursor: pointer; line-height: 1.45; }
.consent-row input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; margin-top: 1px; }

/* ===== חגים וימים מיוחדים ביומן ===== */
.hol-chip {
  display: block; font-size: .64rem; font-weight: 700; line-height: 1.3;
  color: #7A5C2E; background: #FBF0D9; border: 1px solid #E8D5A8;
  border-radius: 7px; padding: 2px 5px; margin: 0 5px 5px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hol-chip.k-memorial { color: #5A5A5A; background: #EFEFEF; border-color: #DADADA; }
.hol-chip.day-banner {
  display: block; font-size: .9rem; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px;
}
.month-cell .holdot { position: absolute; top: 3px; right: 4px; font-size: .6rem; line-height: 1; }
.hol-warn {
  background: #FBF0D9; border: 1px solid #E8D5A8; color: #7A5C2E;
  border-radius: 10px; padding: 10px 12px; font-size: .85rem; margin-bottom: 12px;
}

/* ================= טפסי הסכמה — מרפאה (f.html) ================= */
.cf-body { min-height: 100%; }
.cf-top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(242, 233, 223, .82); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft); padding: calc(env(safe-area-inset-top) + 10px) 16px 0;
}
.cf-top-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.cf-logo { height: 13px; display: block; }
.cf-exit { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 12px 0 14px; margin-inline-end: -4px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line-soft); box-shadow: var(--shadow-xs);
  color: var(--brand-dark); font-weight: 700; font-size: .9rem; text-decoration: none; }
.cf-exit[hidden] { display: none; }
.cf-exit svg { width: 18px; height: 18px; }
.cf-exit:not([hidden]) ~ .cf-logo { margin-inline-end: auto; margin-inline-start: 10px; }
.cf-step { font-size: .88rem; font-weight: 700; color: var(--brand-dark); }
.cf-progress { max-width: 720px; margin: 10px auto 0; display: flex; gap: 4px; padding-bottom: 10px; }
.cf-progress:empty { padding-bottom: 0; margin-top: 0; }
.cf-progress span { flex: 1; height: 5px; border-radius: 999px; background: rgba(126, 79, 61, .13); transition: background .3s var(--ease); }
.cf-progress span.done { background: var(--success); }
.cf-progress span.cur { background: var(--brand); }

.cf-page { max-width: 720px; margin: 0 auto; padding: 16px 16px calc(150px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.cf-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-soft); padding: 18px; }
.cf-in { animation: cfIn .45s var(--ease) both; }
@keyframes cfIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cf-in { animation: none; } }

.cf-staff-note { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: .86rem; font-weight: 600;
  color: #6F5328; background: #F3E6C9; border-radius: 14px; padding: 10px 14px; }
.cf-staff-note svg { width: 18px; height: 18px; flex-shrink: 0; }

.cf-hero { text-align: center; padding: 26px 20px 20px; }
.cf-hero-art { width: 76px; height: 76px; object-fit: contain; margin: 0 auto 10px; display: block; }
.cf-hero h1 { font-size: 1.55rem; margin-bottom: 8px; }
.cf-hero p { color: var(--ink); opacity: .85; line-height: 1.6; }
.cf-list { list-style: none; margin: 18px 0 6px; display: flex; flex-direction: column; gap: 8px; text-align: right; }
.cf-list li { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 14px; padding: 12px 14px; }
.cf-list li b { display: block; font-weight: 600; }
.cf-list li small { color: var(--success); font-weight: 600; }
.cf-num { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--brand-dark); font-weight: 700; font-size: .9rem; border: 1px solid var(--line-soft); }
.cf-list li.done .cf-num { background: var(--success); color: #fff; border-color: transparent; }
.cf-num svg { width: 16px; height: 16px; }
.cf-meta { margin-top: 12px; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

.cf-h { font-size: 1.3rem; }
.cf-sub { color: var(--muted); font-size: .9rem; margin: 4px 0 16px; }
.cf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cf-grid3 { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 0 12px; }
@media (max-width: 520px) {
  .cf-grid2 { grid-template-columns: 1fr; }
  .cf-grid3 { grid-template-columns: 2fr 1fr; }
  .cf-grid3 > :last-child { grid-column: 1 / -1; }
}
.cf-field { margin-bottom: 12px; }
.cf-field input { width: 100%; min-height: 48px; }
.cf-field input[type="date"] { -webkit-appearance: none; appearance: none; text-align: right; }
.cf-opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
/* בטפסים אין אדום — הערות מילוי בגוון המותג, רגוע ולא מבהיל */
.cf-err { color: var(--brand); font-size: .84rem; font-weight: 600; min-height: 0; }
.cf-err:empty { display: none; }
.cf-field.bad input { border-color: var(--brand-soft); box-shadow: 0 0 0 3px rgba(126, 79, 61, .12); }

.cf-form-head { padding: 20px 18px; }
.cf-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--brand-soft); margin-bottom: 6px; }
.cf-title { font-size: 1.35rem; line-height: 1.35; }
.cf-intro { margin-top: 8px; line-height: 1.6; }
.cf-who { margin-top: 12px; display: inline-block; font-size: .85rem; color: var(--brand-dark); background: var(--bg); border-radius: 999px; padding: 5px 12px; }
.cf-signed-note { display: flex; align-items: center; gap: 10px; color: var(--success); font-weight: 600; }
.cf-signed-note svg { width: 20px; height: 20px; }

.cf-h3 { font-size: 1.05rem; margin-bottom: 8px; }
.cf-info p { line-height: 1.7; margin-bottom: 8px; font-size: .97rem; }
.cf-info p:last-child { margin-bottom: 0; }
.cf-ul, .cf-ol { padding-right: 20px; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; font-size: .97rem; }
.cf-ul li::marker { color: var(--brand-soft); }
.cf-ol li::marker { color: var(--brand); font-weight: 700; }
.cf-group { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.cf-group h4 { font-size: .95rem; color: var(--brand-dark); margin-bottom: 6px; }
.cf-note { font-size: .85rem; color: var(--muted); margin: -2px 0 8px; }

.cf-qs { padding: 16px 14px 8px; }
.cf-qs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.cf-count { font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.cf-count.full { color: var(--success); background: #E3E8DC; }
.cf-q { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 4px; border-top: 1px solid var(--line-soft); }
.cf-q.hide { display: none; }
.cf-q.sub { padding-right: 16px; border-right: 3px solid var(--line); }
.cf-q-text { flex: 1 1 240px; line-height: 1.55; font-size: .97rem; }
.cf-yn { display: flex; background: var(--bg); border-radius: 13px; padding: 3px; gap: 3px; flex-shrink: 0; margin-inline-start: auto; }
.cf-yn button {
  min-width: 64px; min-height: 44px; border: none; border-radius: 10px; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--brand-dark);
  transition: background .18s var(--ease), color .18s var(--ease), transform .12s;
}
.cf-yn button:active { transform: scale(.96); }
.cf-yn button.on.yes { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -8px rgba(126, 79, 61, .8); }
.cf-yn button.on.no { background: #fff; color: var(--brand-dark); box-shadow: inset 0 0 0 2px var(--brand-soft), var(--shadow-xs); }
@media (max-width: 520px) {
  .cf-yn { margin-inline-start: 0; width: 100%; max-width: 280px; }
  .cf-yn button { flex: 1; }
}
.cf-auto { width: 100%; font-size: .8rem; color: var(--success); font-weight: 600; margin-top: -2px; }
.cf-text .cf-auto { margin-top: 6px; }
.cf-more { width: 100%; display: none; }
.cf-more.show { display: block; animation: cfIn .25s var(--ease) both; }
.cf-more textarea, .cf-text textarea, .cf-text input {
  width: 100%; font-family: inherit; font-size: 1rem; line-height: 1.5; padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); outline: none; resize: vertical;
}
.cf-more textarea:focus, .cf-text textarea:focus, .cf-text input:focus { border-color: var(--brand-soft); box-shadow: var(--ring); }
.cf-q .cf-err { width: 100%; }
.cf-q.bad { background: rgba(185, 138, 111, .10); border-radius: 12px; }
.cf-q.bad .cf-yn { box-shadow: 0 0 0 2px rgba(126, 79, 61, .35); }

.cf-label { display: block; font-weight: 700; color: var(--brand-dark); margin-bottom: 8px; line-height: 1.5; }
.cf-text.bad textarea, .cf-text.bad input { border-color: var(--brand-soft); }

.cf-opt-card {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: right; cursor: pointer;
  font-family: inherit; font-size: .97rem; line-height: 1.55; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-top: 8px;
  transition: border-color .18s, background .18s;
}
.cf-opt-card.on { border-color: var(--brand); background: #FBF3EC; }
.cf-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand-soft); flex-shrink: 0; margin-top: 1px; position: relative; }
.cf-opt-card.on .cf-radio { border-color: var(--brand); }
.cf-opt-card.on .cf-radio::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--brand); }
.cf-choice.bad .cf-opt-card { border-color: var(--brand-soft); }

.cf-confirm { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; line-height: 1.55; flex-wrap: wrap; }
.cf-confirm input { position: absolute; opacity: 0; pointer-events: none; }
.cf-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--brand-soft); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: #fff; color: transparent; transition: background .15s, border-color .15s; }
.cf-box svg { width: 16px; height: 16px; }
.cf-confirm input:checked + .cf-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.cf-confirm input:focus-visible + .cf-box { box-shadow: var(--ring); }
.cf-confirm .grow { flex: 1; font-weight: 600; }
.cf-confirm.optional .grow { font-weight: 400; }
.cf-confirm .cf-err { width: 100%; padding-right: 38px; }
.cf-confirm.bad { box-shadow: 0 0 0 2px rgba(126, 79, 61, .35), var(--shadow); }

.cf-sign { border: 1.5px solid rgba(126, 79, 61, .22); }
.cf-sign[hidden] { display: none; }
.cf-scope-main { padding: 6px 0 2px; }
.cf-alt-link { display: inline-block; margin-top: 12px; background: none; border: none; padding: 6px 0; cursor: pointer;
  font-family: inherit; font-size: .82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.cf-alts[hidden] { display: none; }
.cf-alts { margin-top: 2px; }
.cf-scope.bad .cf-box { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(126, 79, 61, .15); }
.cf-closing { font-weight: 600; line-height: 1.6; margin-bottom: 12px; }
.cf-sign-head { display: flex; align-items: baseline; justify-content: space-between; }
.cf-date { font-size: .86rem; color: var(--muted); }
.cf-pad-wrap { position: relative; background: #fff; border: 1.5px dashed var(--brand-soft); border-radius: 16px; overflow: hidden; }
.cf-pad-wrap canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; position: relative; z-index: 1; }
@media (min-width: 700px) { .cf-pad-wrap canvas { height: 230px; } }
.cf-pad-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #C9B6A4; font-size: 1.05rem; pointer-events: none; transition: opacity .2s; }
.cf-pad-hint.gone { opacity: 0; }
.cf-pad-line { position: absolute; left: 22px; right: 22px; bottom: 38px; border-bottom: 1.5px solid #E8DCCF; pointer-events: none; }
.cf-sign-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; }
.cf-sign-actions .btn.ghost { margin-inline-start: auto; }
.cf-sign.bad .cf-pad-wrap { border-color: var(--brand); }

.cf-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px);
  background: rgba(251, 247, 241, .9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line-soft); }
.cf-bar[hidden] { display: none; }
.cf-bar-in { max-width: 720px; margin: 0 auto; }
.cf-bar-row { display: flex; gap: 10px; }
.cf-bar-row .btn { min-height: 52px; font-size: 1.02rem; }
.cf-bar-row .grow { flex: 1; }
.cf-bar-err { color: var(--brand); font-weight: 700; font-size: .88rem; text-align: center; }
.cf-bar-err:not(:empty) { margin-bottom: 8px; }

.cf-done { text-align: center; padding: 34px 22px; }
.cf-done h1 { font-size: 1.5rem; margin: 14px 0 6px; }
.cf-done p { line-height: 1.6; margin-bottom: 6px; }
.cf-done .btn { margin-top: 14px; }
.cf-done-mark { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  background: var(--success); color: #fff; box-shadow: 0 16px 30px -14px rgba(110, 139, 94, .9); font-size: 2rem;
  animation: cfPop .5s var(--ease) both; }
.cf-done-mark.muted { background: var(--bg-deep); box-shadow: none; }
.cf-done-mark svg { width: 38px; height: 38px; }
@keyframes cfPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----- תצוגת מסמך חתום (צוות) + הדפסה ----- */
.cf-toolbar { display: flex; align-items: center; gap: 10px; }
.cf-toolbar .grow { flex: 1; }
.cf-doc { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 26px 24px; color: #2E2019; font-size: .92rem; line-height: 1.6; }
.cf-doc h2 { font-size: 1.2rem; color: #2E2019; margin: 6px 0 2px; }
.cf-doc h3 { font-size: .98rem; color: #2E2019; margin: 14px 0 6px; }
.cf-doc-clinic { font-size: .76rem; color: #6B5A4E; border-bottom: 1px solid #E6DDD3; padding-bottom: 8px; }
.cf-doc-meta { font-size: .76rem; color: #8B7A6E; margin-bottom: 12px; }
.cf-doc-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; background: #FAF6F1; border-radius: 10px; padding: 10px 12px; }
.cf-doc-details span { display: block; font-size: .72rem; color: #8B7A6E; }
.cf-doc-details b { font-weight: 600; }
.cf-doc-intro { margin-top: 10px; }
.cf-doc p { margin-bottom: 6px; }
.cf-doc .cf-group { background: #FAF6F1; }
.cf-doc-qs { width: 100%; border-collapse: collapse; }
.cf-doc-qs td { border-bottom: 1px solid #EFE7DE; padding: 6px 4px; vertical-align: top; }
.cf-doc-qs td.ans { width: 52px; text-align: center; font-weight: 700; }
.cf-doc-qs tr.yes td { background: #F7EBD2; }
.cf-doc-more { font-size: .84rem; color: #64392B; font-weight: 600; }
.cf-doc-label { font-weight: 700; margin-top: 10px; }
.cf-doc-val { background: #FAF6F1; border-radius: 8px; padding: 6px 10px; white-space: pre-wrap; }
.cf-doc-opt { padding: 3px 0; color: #9B8C80; }
.cf-doc-opt.on { color: #2E2019; font-weight: 700; }
.cf-doc-check { margin: 8px 0; }
.cf-doc-check.on { font-weight: 600; }
.cf-doc-closing { font-weight: 700; margin-top: 12px; }
.cf-doc-sign { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 18px; }
.cf-doc-sign span { display: block; font-size: .74rem; color: #8B7A6E; }
.cf-doc-sign img { display: block; width: 220px; max-width: 100%; height: auto; border-bottom: 1.5px solid #CDBFB2; }
.cf-doc-when { font-size: .82rem; color: #6B5A4E; }
.cf-doc-doctor { margin-top: 16px; border-top: 1px dashed #D9CCBF; padding-top: 6px; }
.cf-doc-missing { color: var(--brand); font-weight: 700; margin-top: 6px; }
@media print {
  .cf-top, .cf-bar, .cf-toolbar, .toast { display: none !important; }
  html, body, .cf-body { background: #fff !important; }
  .cf-page { padding: 0; max-width: none; gap: 0; }
  .cf-doc { box-shadow: none; border-radius: 0; padding: 0 0 10mm; break-after: page; font-size: 10.5pt; }
  .cf-doc:last-child { break-after: auto; }
  .cf-doc-qs tr { break-inside: avoid; }
  .cf-doc-qs tr.yes td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ----- כרטיס לקוחה: טפסי מרפאה ----- */
.cs-set { background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.cs-set-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.cs-set-head b { color: var(--brand-dark); }
.cs-set-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.cs-forms { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cs-form { font-size: .8rem; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: #fff; color: var(--muted); border: 1px solid var(--line-soft); }
.cs-form.ok { color: var(--success); background: #EEF2E9; border-color: transparent; }
.cs-state { font-size: .86rem; font-weight: 700; }
.cs-state.ok { color: var(--success); }
.cs-state.wait { color: #8A6A2F; }
.cs-state.doc { color: var(--danger); }
.cs-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-actions .btn { flex: 1 1 auto; }
.cf-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); margin-bottom: 8px; cursor: pointer;
  border: 1.5px solid transparent; transition: border-color .15s, background .15s; }
.cf-pick.on { border-color: var(--brand); background: #FBF3EC; }
.cf-pick input { width: 22px; height: 22px; accent-color: var(--brand); flex-shrink: 0; }
.cf-pick .grow { flex: 1; min-width: 0; }
.cf-pick b { display: block; color: var(--brand-dark); }
.cf-pick small { color: var(--muted); font-size: .8rem; }
.cf-pick .tag { flex-shrink: 0; }
.cf-params { margin: -2px 0 10px; padding: 0 6px; }
.cf-params[hidden] { display: none; }
.cs-doc-pad { position: relative; background: #fff; border: 1.5px dashed var(--brand-soft); border-radius: 16px; overflow: hidden; }
.cs-doc-pad canvas { display: block; width: 100%; height: 190px; touch-action: none; }

/* ----- נורות אדומות + מצב טפסים בחלון התור ----- */
.rf-box { background: #FBEDE8; border: 1.5px solid rgba(179, 86, 62, .35); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.rf-title { font-weight: 700; color: #8E3B27; margin-bottom: 6px; }
.rf-title span { font-weight: 400; font-size: .8rem; color: var(--muted); margin-inline-start: 4px; }
.rf-box ul { padding-right: 18px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; line-height: 1.5; }
.rf-box li::marker { color: var(--danger); }
.rf-a { color: var(--danger); }
.rf-more { color: var(--brand-dark); font-weight: 600; font-size: .85rem; }
.rf-chip { display: inline-block; font-size: .8rem; font-weight: 700; color: #8E3B27; background: #FBEDE8; border-radius: 999px; padding: 3px 10px; margin: -2px 0 8px; }
.af-box { background: var(--bg); border-radius: 16px; padding: 12px; }
.af-box .rf-box { margin: 10px 0 0; }
.af-status { font-weight: 700; font-size: .92rem; }
.af-status.ok { color: var(--success); }
.af-status.wait { color: #8A6A2F; }
.af-status.none { color: var(--danger); }
.af-doc { color: var(--danger); font-weight: 600; }

/* ----- תיעוד טיפולים (תמונות) ----- */
.doc-card { background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.doc-head { display: flex; align-items: center; gap: 6px; }
.doc-head .grow { flex: 1; min-width: 0; }
.doc-head b { color: var(--brand-dark); }
.doc-head .sub { font-size: .8rem; color: var(--muted); }
.doc-head .icon-btn { min-width: 36px; min-height: 36px; padding: 6px; }
.doc-note { font-size: .88rem; margin-top: 6px; white-space: pre-wrap; }
.doc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin-top: 10px; }
.doc-thumb { aspect-ratio: 1; border: none; border-radius: 12px; background: var(--bg-deep) center / cover no-repeat; cursor: pointer; padding: 0; }
.doc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.doc-pick .btn { min-height: 56px; font-size: 1.02rem; cursor: pointer; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.doc-prev { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--bg-deep) center / cover no-repeat; }
.doc-prev button { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(46, 32, 25, .65); color: #fff; font-size: .8rem; }
.pv { position: fixed; inset: 0; z-index: 200; background: #120c09; display: flex; align-items: center; justify-content: center; }
.pv[hidden] { display: none; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.pv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; z-index: 2;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.pv-info { flex: 1; color: #fff; font-size: .9rem; text-align: center; }
.pv-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.1rem; cursor: pointer; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: none; border-radius: 14px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 2rem; cursor: pointer; z-index: 2; }
.pv-prev { right: 10px; }
.pv-next { left: 10px; }

/* ----- כרטיס מטופל ----- */
@media (min-width: 900px) { #modal-client .modal { max-width: 760px; } }
.pc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-left: 40px; }
.pc-av.avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.pc-head .grow { flex: 1; min-width: 0; }
.pc-name { font-size: 1.35rem; line-height: 1.25; }
.pc-meta { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.pc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pc-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line-soft); color: var(--brand-dark); font-family: inherit; font-weight: 600; font-size: .82rem; text-decoration: none; }
.pc-act span { font-size: 1.25rem; line-height: 1; height: 22px; display: flex; align-items: center; }
.pc-act svg { width: 22px; height: 22px; }
.pc-act:active { transform: scale(.97); }
.pc-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.pc-alerts:empty { display: none; }
.pc-alerts .rf-box { margin-bottom: 0; }
.pc-alert { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FBEDE8; color: #8E3B27;
  border-radius: 14px; padding: 10px 12px; font-weight: 600; font-size: .9rem; }
.pc-alert.wait { background: #F3E6C9; color: #6F5328; }
.pc-alert .btn { flex-shrink: 0; }
.pc-tabs { position: sticky; top: -26px; z-index: 3; display: flex; gap: 4px; background: var(--card); padding: 10px 0 8px; margin: 6px 0 10px;
  border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
@media (min-width: 900px) { .pc-tabs { top: -22px; } }
.pc-tabs button { flex: 1; white-space: nowrap; min-height: 42px; border: none; border-radius: 12px; background: transparent; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .92rem; color: var(--muted); padding: 0 10px; }
.pc-tabs button.on { background: var(--bg-deep); color: var(--brand-dark); }
.pc-n { font-size: .75rem; font-weight: 700; color: var(--brand-soft); }
.pc-panel[hidden] { display: none; }
.pc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.pc-stats div { background: var(--bg); border-radius: 14px; padding: 10px 4px; text-align: center; }
.pc-stats b { display: block; font-size: 1.05rem; color: var(--brand-dark); }
.pc-stats span { font-size: .72rem; color: var(--muted); }
.pc-stats .warn b { color: var(--danger); }
.pc-next { background: #EEF2E9; color: #4C5F3D; border-radius: 14px; padding: 10px 12px; font-size: .9rem; margin-bottom: 10px; }
.pc-card { background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.pc-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; color: var(--brand-dark); margin-bottom: 6px; }
.pc-card-h .btn svg { width: 14px; height: 14px; vertical-align: -2px; }
.pc-dls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; }
.pc-dl dt { font-size: .74rem; color: var(--muted); }
.pc-dl dd { font-weight: 600; font-size: .95rem; word-break: break-word; }
.pc-dl a { color: inherit; text-decoration: none; }
.pc-perm summary { cursor: pointer; font-weight: 700; color: var(--brand-dark); list-style-position: inside; }
.pc-perm[open] summary { margin-bottom: 8px; }
.pc-sub-h { font-weight: 700; color: var(--brand-dark); margin: 14px 2px 8px; }
.fs-table { display: flex; flex-direction: column; }
.fs-row { display: grid; grid-template-columns: 1.2fr 1.4fr auto; align-items: center; gap: 8px; padding: 9px 2px; border-top: 1px solid var(--line-soft);
  color: var(--ink); text-decoration: none; font-size: .9rem; }
.fs-row:first-child { border-top: none; }
.fs-name { font-weight: 600; }
.fs-date { color: var(--muted); font-size: .82rem; }
.fs-st { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; justify-self: end; }
.fs-st.ok { background: #E3E8DC; color: var(--success); }
.fs-st.flag { background: #FBEDE8; color: #8E3B27; }
.fs-st.none { background: #fff; color: var(--muted); }

/* ----- חלון תור: מצב צפייה ----- */
.av-card { background: var(--bg); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.av-client { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.av-client .grow { flex: 1; min-width: 0; }
.av-client b { font-size: 1.1rem; color: var(--brand-dark); }
.av-client .sub { font-size: .84rem; color: var(--muted); }
.av-client .tag { flex-shrink: 0; }
.av-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.av-grid dt { font-size: .74rem; color: var(--muted); }
.av-grid dd { font-weight: 600; font-size: .95rem; }
#ap-actions .stack { margin-top: 4px; }

/* כפתור כרטיס לקוחה על קוביית התור ביומן */
.cc-btn { width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .75); color: var(--brand-dark);
  box-shadow: var(--shadow-xs); }
.cc-btn svg { width: 16px; height: 16px; }
.tl-appt .cc-btn { order: 99; margin-inline-start: auto; width: 22px; height: 22px; margin-top: -1px; background: var(--bg); }
.tl-appt .cc-btn svg { width: 13px; height: 13px; }
.week-appt .cc-btn { position: absolute; top: 4px; left: 4px; z-index: 2; }
.week-appt { position: relative; }
.week-appt .cc-btn { width: 26px; height: 26px; }
.week-appt .cc-btn svg { width: 14px; height: 14px; }
@media (hover: hover) { .cc-btn:hover { background: #fff; } }
