/* ייעוץ בקליק – מערכת עיצוב
   צבעי המותג (נבחרו בידי בעלת האתר) + גוונים נלווים לטקסט ולרקע */
:root {
  --sage: #42644F;        /* ירוק מרווה כהה */
  --sage-light: #B5CBB8;  /* ירוק מרווה בהיר */
  --lilac: #D8C8E7;       /* לילך – המרחב של אורית */
  --cream: #F4ECDD;       /* שמנת – המרחב של טלי, רשימת הכיבוד */
  --rose: #EBCDD5;        /* ורוד עתיק – מטפלים */
  --sky: #CEDFE8;         /* תכלת מעושן */
  --teal: #C9E4DF;        /* טורקיז עדין – המרחב של אושרה */
  --beige: #E8DCC6;       /* בז׳ – טפסים */
  --slate: #CBD5DF;       /* כחול־אפור – קב״סים */

  --paper: #FBF8F2;
  --surface: #FFFFFF;
  --ink: #1F3328;         /* טקסט ראשי – ירוק כהה מאוד במקום שחור */
  --ink-soft: #52635A;
  --line: #E4DCCD;
  --sage-deep: #2F4A3A;
  --danger: #A33A3A;

  --font-body: 'Assistant', 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
  --font-head: 'Rubik', 'Assistant', 'Arial Hebrew', Arial, sans-serif;

  --r-lg: 24px;   /* משטחים */
  --r-md: 16px;   /* שדות וכרטיסים קטנים */
  --r-pill: 999px;
  --pad: clamp(16px, 4vw, 28px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 .8em; }
a { color: var(--sage); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.ico { flex: none; }
.muted { color: var(--ink-soft); }
.fine { color: var(--ink-soft); font-size: .92rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
bdi[dir=ltr] { unicode-bidi: isolate; }

:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--sage); color: #fff; padding: 10px 16px; border-radius: var(--r-md); z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- טעינה ---------- */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink-soft); }
.boot img { animation: breathe 1.6s ease-in-out infinite; border-radius: 18px; }
@keyframes breathe { 50% { transform: scale(.94); opacity: .75; } }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--sage-light); }
.btn-primary { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-deep); border-color: var(--sage-deep); }
.btn-quiet { background: transparent; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-google { width: 100%; background: #fff; }
.link { background: none; border: 0; padding: 6px 2px; color: var(--sage); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- טפסים ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-weight: 600; }
.field small { color: var(--ink-soft); }
.field input {
  min-height: 50px; padding: 10px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: #fff; width: 100%;
}
.field input:focus { border-color: var(--sage); outline: none; box-shadow: 0 0 0 3px rgba(66,100,79,.18); }
.form-error { background: #FBEDED; color: var(--danger); border-radius: var(--r-md); padding: 10px 14px; font-weight: 600; }

.choice { border: 0; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-item input { position: absolute; opacity: 0; }
.choice-box {
  display: grid; justify-items: center; gap: 6px; padding: 18px 10px; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; position: relative;
}
.choice-box .ico:last-child { position: absolute; top: 8px; inset-inline-end: 8px; opacity: 0; color: var(--sage); }
.choice-item input:checked + .choice-box { border-color: var(--sage); background: #F1F6F2; }
.choice-item input:checked + .choice-box .ico:last-child { opacity: 1; }
.choice-item input:focus-visible + .choice-box { outline: 3px solid var(--sage); outline-offset: 2px; }

.switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 28px; border-radius: 99px; background: #D9D3C7; position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--sage); }
.switch input:checked + .track::after { inset-inline-start: 21px; }
.switch input:focus-visible + .track { outline: 3px solid var(--sage); outline-offset: 2px; }

/* ---------- מסכי כניסה ---------- */
.auth { min-height: 100dvh; padding-bottom: 32px; }
.auth-hero {
  background: var(--sage); color: var(--cream); text-align: center;
  padding: calc(env(safe-area-inset-top) + 44px) var(--pad) 92px;
  border-radius: 0 0 50% 50% / 0 0 56px 56px;
}
.auth-hero.compact { padding-bottom: 76px; }
.auth-hero .logo-lg { margin: 0 auto 14px; box-shadow: 0 0 0 6px rgba(244,236,221,.14); }
.auth-title { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.6rem); margin: 0; color: #fff; }
.auth-slogan { color: var(--sage-light); font-size: 1.1rem; margin: 4px 0 0; }
.auth-card {
  position: relative; max-width: 440px; margin: -56px auto 0; background: var(--surface);
  border-radius: var(--r-lg); padding: 26px var(--pad); border: 1px solid var(--line);
  margin-inline: max(16px, calc((100% - 440px) / 2));
}
.auth-card h2 { font-size: 1.35rem; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); margin: 18px 0; font-size: .95rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; }
.auth-foot { text-align: center; margin-top: 18px; }

.logo-lg { display: block; width: 76px; height: 76px; border-radius: 20px; overflow: hidden; }
.logo-lg svg, .logo-md svg { width: 100%; height: 100%; }
.logo-md { display: block; width: 56px; height: 56px; border-radius: 15px; overflow: hidden; flex: none; }

/* ---------- מסך היכרות ---------- */
.welcome { min-height: 100dvh; background: linear-gradient(180deg, var(--cream) 0, var(--paper) 340px); padding: calc(env(safe-area-inset-top) + 40px) var(--pad) 40px; }
.welcome-inner { max-width: 480px; margin: 0 auto; }
.welcome h1 { margin-top: 18px; }
.lead { font-size: 1.1rem; color: var(--ink-soft); }
.feature-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 4px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list .ico { color: var(--sage); margin-top: 2px; }
.feature-list strong { display: block; font-family: var(--font-head); font-weight: 600; }
.feature-list span { color: var(--ink-soft); }
.install-hint { display: flex; gap: 10px; align-items: center; background: var(--sky); color: var(--ink); padding: 12px 14px; border-radius: var(--r-md); text-decoration: none; margin-bottom: 18px; }

/* ---------- מעטפת האתר ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
  background: rgba(251,248,242,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.topnav { display: none; gap: 4px; margin-inline-start: 18px; }
.topnav a { padding: 8px 14px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.topnav a[aria-current=page] { background: #E9F0EA; color: var(--sage-deep); }
.top-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.icon-btn:hover { background: #EFEAE0; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lilac); color: var(--ink); font-family: var(--font-head); font-weight: 600; text-decoration: none; font-size: .95rem;
}
.avatar-lg { width: 76px; height: 76px; font-size: 1.6rem; flex: none; }

main#main { outline: none; }
.page { max-width: 1040px; margin: 0 auto; padding: 22px var(--pad) calc(var(--nav-h) + 36px + env(safe-area-inset-bottom)); }
.page.narrow { max-width: 640px; }
.solo { min-height: 100dvh; display: grid; place-items: center; padding: var(--pad); }

.bottomnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a { min-height: var(--nav-h); display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.bottomnav a[aria-current=page] { color: var(--sage); }
.bottomnav a[aria-current=page] .ico { stroke-width: 2.2; }

@media (min-width: 900px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  .page { padding-bottom: 48px; }
}

/* ---------- משטחים ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px var(--pad); margin-bottom: 16px; }
.panel h2 { display: flex; align-items: center; gap: 8px; }
.panel.center { text-align: center; max-width: 440px; display: grid; justify-items: center; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.notice { background: var(--cream); border-radius: var(--r-md); padding: 14px 18px; margin: 18px 0; border-inline-start: 4px solid var(--sage-light); }
.notice strong { font-family: var(--font-head); font-weight: 600; }
.notice p { margin: 4px 0 0; color: var(--ink-soft); }
.notice.ok { background: #E9F0EA; }

.empty { text-align: center; max-width: 460px; margin: 40px auto; display: grid; justify-items: center; }
.empty-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: #E9F0EA; color: var(--sage); margin-bottom: 14px; }

/* ---------- דף הבית ---------- */
.hello { padding: 6px 0 4px; }
.hello-time { color: var(--ink-soft); font-weight: 600; margin: 0; }
.hello h1 { margin: 2px 0 10px; }
.group-chip { display: inline-flex; align-items: center; gap: 6px; background: #E9F0EA; color: var(--sage-deep); padding: 4px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: .92rem; margin: 0; }
.group-chip.role { background: var(--lilac); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: grid; gap: 14px; align-content: space-between; min-height: 116px; padding: 18px;
  border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
}
.tile .ico { color: var(--sage-deep); }
.tone-sage { background: #E3ECE4; }
.tone-rose { background: #F6E6EA; }
.tone-sky { background: #E4EEF3; }
.tile:hover { filter: brightness(.98); }

/* ---------- פרופיל ---------- */
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 0; }

/* ---------- התקנה ---------- */
.install-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.install-head h1 { margin: 0; }
.steps { padding-inline-start: 22px; margin: 0; }
.steps li { margin-bottom: 8px; }
.steps .ico { display: inline; vertical-align: -3px; }

/* ---------- הודעה קופצת ---------- */
#toast {
  position: fixed; inset-inline: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: 420px; margin: 0 auto; background: var(--sage-deep); color: #fff; padding: 12px 18px; border-radius: var(--r-md);
  font-weight: 600; text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: none; }

.noscript { padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.panel.center .logo-lg { margin-bottom: 16px; }
.avatar-hero { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.auth-hero .logo-lg { border: 3px solid var(--cream); }
