/* אמא חזקה · booking — organic, calm, sage on warm paper. Mobile first, RTL. */
:root {
  --sage: #738275;
  --sage-deep: #5e6d60;
  --sage-ink: #2d332e;
  --sage-soft: #e7ece6;
  --sage-mist: #f1f4ef;
  --paper: #faf8f5;
  --card: #ffffff;
  --sand: #efe7da;
  --clay: #b8875f;
  --warn-bg: #fff6e5;
  --warn-ink: #7a5317;
  --err-bg: #fbeceb;
  --err-ink: #8f2f27;
  --ok-bg: #e9f2e7;
  --ink: #2d332e;
  --ink-soft: #5a605b;
  --line: rgba(45, 51, 46, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(45, 51, 46, 0.06), 0 8px 24px rgba(45, 51, 46, 0.06);
  --font: 'Heebo', 'Noto Sans Hebrew', system-ui, sans-serif;
  --display: 'Frank Ruhl Libre', 'Heebo', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 110% -10%, rgba(115, 130, 117, 0.16), transparent 60%),
    radial-gradient(900px 400px at -20% 0%, rgba(184, 135, 95, 0.10), transparent 60%),
    var(--paper);
  min-height: 100vh;
}
a { color: var(--sage-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.25; color: var(--sage-ink); }
h1 { font-size: 1.85rem; margin: 0.4rem 0 0.8rem; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
p { margin: 0.5rem 0; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }

/* header */
.top { padding: 18px 16px 6px; }
.top { display: flex; justify-content: center; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo { height: 78px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; border-inline-start: 1px solid var(--line); padding-inline-start: 14px; }
.brand-name { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--sage-deep); line-height: 1.2; }
.brand-sub { font-size: 0.85rem; color: var(--ink-soft); }
.admin .top { justify-content: flex-start; }
.wrap { max-width: 640px; margin: 0 auto; padding: 8px 16px 40px; animation: rise 0.45s ease both; }
.admin .wrap { max-width: 1000px; }
.foot { text-align: center; color: var(--ink-soft); font-size: 0.8rem; padding: 24px 16px 32px; }
@keyframes rise { from { transform: translateY(6px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .wrap { animation: none; } }

/* progress */
.progress { list-style: none; display: flex; gap: 4px; padding: 0 16px; margin: 8px auto 4px; max-width: 640px; overflow-x: auto; }
.progress li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 48px; color: var(--ink-soft); font-size: 0.72rem; position: relative; }
.progress li::after { content: ''; position: absolute; top: 13px; inset-inline-start: calc(50% + 15px); width: calc(100% - 26px); height: 2px; background: var(--line); }
.progress li:last-child::after { display: none; }
.progress .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: 0.78rem; z-index: 1; }
.progress li.done .dot { background: var(--sage); border-color: var(--sage); color: #fff; }
.progress li.done::after { background: var(--sage); }
.progress li.current .dot { border-color: var(--sage-deep); color: var(--sage-deep); box-shadow: 0 0 0 4px var(--sage-soft); }
.progress li.current { color: var(--sage-ink); font-weight: 700; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--sage-deep); color: #fff; border: 0; border-radius: 999px;
  padding: 14px 26px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  min-height: 52px; transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--sage-ink); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .slot:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(94, 109, 96, 0.45); outline-offset: 2px; }
.btn.big { width: 100%; font-size: 1.1rem; min-height: 58px; }
.btn.small { padding: 8px 16px; min-height: 40px; font-size: 0.92rem; }
.btn.ghost { background: transparent; color: var(--sage-deep); border: 1.5px solid var(--sage); }
.btn.ghost:hover { background: var(--sage-mist); }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--sage-deep); text-decoration: underline; font: inherit; cursor: pointer; }
.back { display: inline-block; margin: 4px 0 2px; text-decoration: none; font-size: 0.92rem; }

/* service cards */
.cards { display: grid; gap: 12px; }
.card {
  display: block; background: var(--card); border-radius: var(--radius); padding: 18px 18px 16px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow); border: 1px solid transparent;
  border-inline-start: 4px solid var(--sage); transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--sage-soft); border-inline-start-color: var(--sage-deep); }
.card-title { font-family: var(--display); font-size: 1.2rem; font-weight: 700; color: var(--sage-ink); }
.card-desc { color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; white-space: pre-line; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; color: var(--ink-soft); font-size: 0.92rem; }
.price { font-weight: 700; color: var(--sage-ink); font-size: 1.05rem; }
.card-cta { display: inline-block; margin-top: 8px; color: var(--sage-deep); font-weight: 700; font-size: 0.95rem; }

/* time picking */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 6px; }
.week-label { font-weight: 700; color: var(--sage-ink); }
.day { background: var(--card); border-radius: var(--radius); padding: 12px 14px 14px; margin: 10px 0; box-shadow: var(--shadow); }
.day h2 { margin: 0 0 8px; font-size: 1.05rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 0; }
.slot {
  font: inherit; font-weight: 700; font-size: 1.05rem; min-height: 48px; border-radius: 12px;
  border: 1.5px solid var(--sage); background: var(--sage-mist); color: var(--sage-ink); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.slot:hover { background: var(--sage-deep); color: #fff; border-color: var(--sage-deep); }

/* summary + hold */
.summary { background: var(--sand); border-radius: var(--radius); padding: 14px 16px; margin: 6px 0 4px; }
.summary-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.hold { font-size: 0.88rem; color: var(--clay); margin: 4px 0 10px; }
.hold::before { content: '⏳ '; }
.address { margin: 14px 0; }

/* forms */
.form { display: grid; gap: 16px; margin-top: 10px; }
.form.inline { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.form label, .q { display: grid; gap: 6px; font-weight: 500; }
input, textarea, select {
  font: inherit; font-size: 1rem; width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #9aa29c; }
textarea { resize: vertical; min-height: 84px; }
input.code { font-size: 1.6rem; letter-spacing: 8px; text-align: center; max-width: 240px; }
.err { color: var(--err-ink); font-size: 0.9rem; font-weight: 500; }
.has-err input, .has-err textarea { border-color: var(--err-ink); }
.has-err legend, .has-err .q-label { color: var(--err-ink); }
.req { color: var(--clay); }
fieldset.q { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.q legend { padding: 0; margin-bottom: 6px; font-weight: 500; }
.q-note { font-size: 0.88rem; color: var(--warn-ink); margin: -2px 0 6px; }
.q-label { white-space: pre-line; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choice { display: inline-flex !important; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-weight: 500 !important; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--sage-deep); }
.choice:has(input:checked) { border-color: var(--sage-deep); background: var(--sage-mist); }
.check { display: flex !important; align-items: flex-start; gap: 10px; grid-template-columns: none !important; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--sage-deep); }
.health .intro, .intro { white-space: pre-line; }
.cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.q-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.q-compact .q-label { font-weight: 500; }
.q-compact.has-err .q-label { color: var(--err-ink); }
.q-compact .choice { padding: 6px 14px; }

/* terms + signature */
.terms { background: var(--card); border-radius: var(--radius); padding: 6px 18px 14px; box-shadow: var(--shadow); max-height: 55vh; overflow-y: auto; font-size: 0.97rem; }
.terms h3 { font-size: 1.05rem; }
.terms ul { padding-inline-start: 20px; margin: 4px 0; }
.sig-wrap { display: grid; gap: 6px; }
.sig { width: 100%; height: 180px; background: #fff; border: 2px dashed var(--sage); border-radius: 14px; touch-action: none; cursor: crosshair; }
.sig.signed { border-style: solid; }
.sig-img { max-width: 320px; width: 100%; border-bottom: 1px solid var(--ink); }
.signed-box { margin-top: 18px; }

/* prep */
.prep { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 10px 16px; border-inline-start: 4px solid var(--clay); }

/* notices */
.notice { border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-weight: 500; }
.notice.info { background: var(--sage-mist); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.error { background: var(--err-bg); color: var(--err-ink); }
.notice.ok { background: var(--ok-bg); }

/* done */
.done-icon { width: 76px; height: 76px; margin: 14px auto 0; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; color: #fff; background: var(--sage-deep); box-shadow: 0 0 0 10px var(--sage-soft); animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes pop { from { transform: scale(0.6); } to { transform: none; } }
.sign { font-family: var(--display); font-size: 1.15rem; color: var(--sage-deep); margin-top: 18px; }

/* dev payment page */
.devpay { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; border: 2px dashed var(--clay); }
.devpay-tag { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; font-weight: 700; }
.devpay-sum { font-size: 2rem; font-weight: 700; margin: 6px 0; }

/* admin */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.admin-nav a { padding: 8px 14px; border-radius: 999px; background: var(--card); text-decoration: none; box-shadow: var(--shadow); font-weight: 500; font-size: 0.95rem; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.95rem; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--sage-mist); font-weight: 700; }
.row-attn td { background: var(--err-bg); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; background: var(--sage-mist); white-space: nowrap; }
.s-confirmed { background: var(--ok-bg); color: #2f5a35; }
.s-needs_attention { background: var(--err-bg); color: var(--err-ink); }
.s-pending_payment, .s-held { background: var(--warn-bg); color: var(--warn-ink); }
.s-expired, .s-cancelled { background: #eee; color: #777; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.answers { display: grid; gap: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.answers > div { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.answers dt { color: var(--ink-soft); font-size: 0.92rem; }
.answers dd { margin: 0; white-space: pre-line; }
.answers .flag { background: var(--warn-bg); }
.answers .flag dd { font-weight: 700; color: var(--warn-ink); }
@media (max-width: 640px) {
  /* On a phone every table row becomes a small card, so nothing runs off the screen. */
  .table { font-size: 0.92rem; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 10px; }
  .table td { border: 0; padding: 2px 0; }
  .table td:first-child { font-weight: 700; }
  .table tr.row-attn { outline: 2px solid var(--warn-ink); }
  .answers > div { grid-template-columns: 1fr; gap: 2px; }
}

@media print {
  .top, .foot, .noprint, .admin-nav { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .terms { max-height: none; overflow: visible; box-shadow: none; padding: 0; }
}
.weeknav .btn { white-space: nowrap; padding: 8px 12px; font-size: 0.88rem; }
.week-label { white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.terms.full { max-height: none; overflow: visible; }
.inline-form { display: inline; margin-inline-start: 6px; } .linkbtn.small { font-size: 0.85rem; }
.linkbtn.danger { color: #9b3b2f; }
