/* כתרה של תורה – עיצוב המערכת. שלוש ערכות: parchment (מומלץ), night-gold, ivory */
:root, [data-theme="parchment"] {
  --bg: #F1E9CF; --bg2: #E9DEBE; --surface: #FBF7EA; --surface2: #F5EDD6;
  --ink: #3B2A1A; --muted: #6E5A3E; --soft: #8C7A5E; --line: #DCCDA6;
  --accent: #B08D57; --accent-ink: #FFFFFF; --accent-deep: #8A6A3A;
  --hero: #3B2A1A; --hero-ink: #F1E9CF; --hero-soft: #CDB88E;
  --ok: #4F7A4A; --ok-bg: #E3ECD5; --warn: #A2691C; --warn-bg: #F6E3C2; --bad: #9C3B2E; --bad-bg: #F4D9D2;
  --shadow: 0 6px 22px rgba(59,42,26,.10), 0 1px 3px rgba(59,42,26,.08);
  --logo: url(img/logo-light.png);
}
[data-theme="night-gold"] {
  --bg: #241910; --bg2: #2E2115; --surface: #33251A; --surface2: #3D2D20;
  --ink: #F1E9CF; --muted: #CDB88E; --soft: #A8936D; --line: #4C3A29;
  --accent: #C9A46A; --accent-ink: #241910; --accent-deep: #E0C08A;
  --hero: #3B2A1A; --hero-ink: #F1E9CF; --hero-soft: #CDB88E;
  --ok: #9CC48F; --ok-bg: #2F3B26; --warn: #E8B566; --warn-bg: #46331A; --bad: #E79482; --bad-bg: #4A2620;
  --shadow: 0 8px 26px rgba(0,0,0,.35);
  --logo: url(img/logo-dark.png);
}
[data-theme="ivory"] {
  --bg: #F6F4EF; --bg2: #ECE8DF; --surface: #FFFFFF; --surface2: #F8F6F1;
  --ink: #2A2118; --muted: #6E5A3E; --soft: #8F8473; --line: #E6E0D4;
  --accent: #B08D57; --accent-ink: #FFFFFF; --accent-deep: #8A6A3A;
  --hero: #FFFFFF; --hero-ink: #2A2118; --hero-soft: #8F8473;
  --ok: #3F7A45; --ok-bg: #E4F0E2; --warn: #9A6316; --warn-bg: #FBEBD0; --bad: #A23A2C; --bad-bg: #F8DED8;
  --shadow: 0 4px 18px rgba(42,33,24,.07), 0 1px 2px rgba(42,33,24,.06);
  --logo: url(img/logo-light.png);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 'Assistant', 'Segoe UI', Arial, sans-serif;
  min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, .serif { font-family: 'Noto Serif Hebrew', 'Frank Ruhl Libre', serif; font-weight: 700; margin: 0; line-height: 1.25; }
h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 18px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-deep); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); } .soft { color: var(--soft); font-size: 14px; }
.hidden { display: none !important; }

/* מבנה */
.app { max-width: 760px; margin: 0 auto; padding: 0 16px 120px; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0 10px; }
.top h1 { flex: 1; }
.top .back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.brandbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 4px; }
.logo { width: 150px; height: 58px; background: var(--logo) no-repeat right center / contain; }
.logo.big { width: 230px; height: 96px; background-position: center; margin: 0 auto; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); position: relative; }
.icon-btn .dot { position: absolute; top: 6px; left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 12px; line-height: 18px; font-weight: 700; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ניווט */
.nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.nav a { flex: 1; max-width: 120px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--soft); text-decoration: none; font-size: 13px; font-weight: 600; border-radius: 14px; position: relative; }
.nav a.on { color: var(--accent-deep); }
.nav a.on::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--accent); }
.nav .dot { position: absolute; top: 4px; left: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; }
@media (min-width: 1000px) {
  .nav { top: 0; bottom: 0; inset-inline: auto 0; right: 0; width: 210px; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 110px 12px 20px; border-top: 0; border-left: 1px solid var(--line); box-shadow: none; }
  .nav::before { content: ''; position: absolute; top: 22px; right: 22px; width: 160px; height: 64px; background: var(--logo) no-repeat center / contain; }
  .nav a { max-width: none; flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 16px; font-size: 16px; }
  .nav a.on { background: var(--surface2); }
  .nav a.on::before { top: 14px; right: 0; width: 3px; height: 28px; }
  .nav .dot { position: static; }
  body.has-nav .app { margin-right: max(230px, calc((100vw - 760px) / 2)); }
  .fab { left: 40px !important; }
}

/* כרטיסים */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); margin: 14px 0; }
.card h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card h3 .grow { flex: 1; }
.hero { background: var(--hero); color: var(--hero-ink); border: 0; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: auto -40px -60px auto; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(176,141,87,.35); }
.hero .soft, .hero .muted { color: var(--hero-soft); }
[data-theme="ivory"] .hero { border: 1px solid var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 4px; }
.section-title h2 { font-size: 19px; }
.link { background: none; border: 0; color: var(--accent-deep); font-weight: 700; cursor: pointer; padding: 10px 4px; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; text-align: start; }
.kpi b { display: block; font-family: 'Noto Serif Hebrew', serif; font-size: 27px; line-height: 1.2; margin-top: 2px; }
.kpi span { color: var(--muted); font-size: 14px; font-weight: 600; }
.kpi small { display: block; color: var(--soft); font-size: 13px; }
.kpi.dark { background: var(--hero); color: var(--hero-ink); border-color: transparent; }
.kpi.dark span, .kpi.dark small { color: var(--hero-soft); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; cursor: pointer; box-shadow: var(--shadow); text-align: start; width: 100%; }
.item .body { flex: 1; min-width: 0; }
.item .t { font-weight: 700; font-size: 17px; }
.item .s { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .end { text-align: left; font-size: 14px; }
.circle { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent-deep); display: grid; place-items: center; flex: none; background: var(--surface2); font-weight: 700; }
.circle.solid { background: var(--hero); color: var(--accent); border-color: var(--hero); }

.bar { height: 8px; border-radius: 6px; background: var(--bg2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 6px; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--surface2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.tag.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.tag.gold { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; margin: 8px 0; }
.search input { border: 0; outline: 0; background: none; height: 50px; flex: 1; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; color: var(--muted); }
.chip.on { background: var(--hero); color: var(--hero-ink); border-color: var(--hero); }
[data-theme="ivory"] .chip.on { background: var(--ink); color: #fff; }
.chip em { font-style: normal; opacity: .7; margin-inline-start: 4px; }

.tabs { display: flex; background: var(--bg2); border-radius: 14px; padding: 4px; margin: 10px 0; }
.tabs button { flex: 1; min-height: 44px; border: 0; background: none; border-radius: 11px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.btn { min-height: 50px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.dark { background: var(--hero); color: var(--hero-ink); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.bad { background: none; color: var(--bad); border: 1px solid var(--bad); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btns .btn { flex: 1 1 140px; }

.fab { position: fixed; left: 20px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 31; height: 58px; padding: 0 22px; border-radius: 29px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; box-shadow: 0 10px 26px rgba(138,106,58,.45); display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* שורות נתונים */
.rows { display: flex; flex-direction: column; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row span { color: var(--muted); }
.row b { text-align: left; }
.row.total { font-size: 18px; }
.gap-box { border-radius: 14px; padding: 12px 14px; margin-top: 10px; font-weight: 600; }
.gap-box.owe { background: var(--warn-bg); color: var(--warn); }
.gap-box.even { background: var(--ok-bg); color: var(--ok); }
.gap-box.ahead { background: var(--surface2); color: var(--muted); }

/* שלבים */
.stepper { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.step { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 14px; }
.step::before { content: ''; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step .dotc { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; font-size: 14px; font-weight: 700; color: var(--soft); z-index: 1; }
.step.done .dotc { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.done::before { background: var(--accent); }
.step.cur .dotc { border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 0 0 5px rgba(176,141,87,.22); }
.step .lbl { padding-top: 4px; font-weight: 600; }
.step.cur .lbl { font-weight: 800; }
.step .lbl small { display: block; font-weight: 400; color: var(--soft); font-size: 14px; }
button.step { border: 0; background: none; width: 100%; text-align: start; cursor: pointer; color: inherit; }
.stage-line { display: flex; gap: 4px; margin-top: 10px; }
.stage-line i { flex: 1; height: 6px; border-radius: 4px; background: var(--bg2); }
.stage-line i.on { background: var(--accent); }

/* טבעת התקדמות */
.ringwrap { display: flex; align-items: center; gap: 18px; }
.ring { width: 128px; height: 128px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .c b { font-family: 'Noto Serif Hebrew', serif; font-size: 30px; line-height: 1; }
.ring .c small { font-size: 13px; color: var(--soft); }
.hero .ring .c small { color: var(--hero-soft); }

/* תמונות */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--bg2); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .cap { position: absolute; bottom: 0; inset-inline: 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 12px; padding: 14px 6px 4px; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20,14,8,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: #F1E9CF; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 12px; }
.lightbox .close { position: absolute; top: 16px; left: 16px; }

/* עדכונים */
.update { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 10px 0; background: var(--surface2); }
.update .head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.update .gallery { margin-top: 10px; }

/* מסך ריק */
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .circle { margin: 0 auto 10px; width: 64px; height: 64px; }

/* טופס */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(30,20,10,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 92vh; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: up .22s ease; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet header { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.sheet header h2 { flex: 1; }
.sheet .scroll { overflow-y: auto; padding: 4px 18px 18px; }
.sheet footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 24px 24px; display: flex; gap: 10px; }
.sheet footer .btn { flex: 1; }
.field { margin: 14px 0; }
.field > label { display: block; font-weight: 700; margin-bottom: 6px; }
.field > label em { color: var(--bad); font-style: normal; }
.field .hint { font-size: 14px; color: var(--soft); margin-top: 4px; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px 14px; outline: 0; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,141,87,.2); }
.field.err input, .field.err select { border-color: var(--bad); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.opts button.on { background: var(--hero); color: var(--hero-ink); border-color: var(--hero); }
[data-theme="ivory"] .opts button.on { background: var(--ink); color: #fff; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.photos-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos-in .ph { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: var(--bg2); }
.photos-in .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos-in .ph button { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.photos-in label.add { aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--accent); display: grid; place-items: center; text-align: center; color: var(--accent-deep); cursor: pointer; font-size: 13px; font-weight: 700; background: var(--surface); }
.photos-in input { display: none; }

.toast { position: fixed; bottom: calc(150px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 800; cursor: pointer; min-height: 36px; }

/* מזל טוב */
.mazal { text-align: center; padding: 26px 18px; background: radial-gradient(circle at 50% 0%, rgba(176,141,87,.45), transparent 70%), var(--hero); color: var(--hero-ink); }
.mazal h2 { font-size: 34px; color: var(--accent); margin: 6px 0; }
.mazal .crown { width: 64px; height: 64px; margin: 0 auto; color: var(--accent); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.lang { display: flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--surface); }
.lang button { border: 0; background: none; min-height: 40px; padding: 0 14px; font-weight: 700; cursor: pointer; color: var(--muted); }
.lang button.on { background: var(--accent); color: var(--accent-ink); }
.ribbon { background: var(--warn-bg); color: var(--warn); padding: 10px 16px; font-size: 14px; text-align: center; font-weight: 600; }
.demo-bar { background: var(--hero); color: var(--hero-ink); font-size: 14px; padding: 8px 16px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.demo-bar a { color: var(--accent); font-weight: 700; }
.foot { text-align: center; color: var(--soft); font-size: 14px; margin: 30px 0 10px; }
html[dir="ltr"] .row b, html[dir="ltr"] .item .end { text-align: right; }

/* כשהאחסון מוסיף תגית בתחתית המסך, התפריט עולה מעליה */
body.nl-badge .nav { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
body.nl-badge .fab { bottom: calc(150px + env(safe-area-inset-bottom)); }
body.nl-badge .app { padding-bottom: 190px; }
body.nl-badge .toast { bottom: calc(215px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) { body.nl-badge .nav { padding-bottom: 80px; } body.nl-badge .fab { bottom: 96px; } }

/* התקדמות בכל השלבים */
.pbars { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.pbar .pl { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 15px; }
.pbar .pl b { display: inline-flex; align-items: center; gap: 6px; }
.pbar .pl b .i { width: 18px; height: 18px; color: var(--ok); }
.pbar .pl span { color: var(--muted); font-size: 14px; }
.pbar .bar { display: flex; margin-top: 6px; height: 10px; }
.pbar .bar i { border-radius: 0; flex: none; }
.pbar .bar i:first-child { border-radius: 6px 0 0 6px; }
html[dir="rtl"] .pbar .bar i:first-child { border-radius: 0 6px 6px 0; }
.pbar .bar i.at { background: repeating-linear-gradient(-45deg, var(--accent) 0 5px, transparent 5px 9px); opacity: .7; }
.pbar.full .bar i { background: var(--ok); border-radius: 6px; }
.pbar.idle .pl b { color: var(--soft); font-weight: 600; }
.pbar small { display: block; margin-top: 3px; font-size: 13px; }
.minibars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: 8px; }
.minibars i { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; display: block; }
.minibars b { display: block; height: 100%; background: var(--accent); }

/* יומן העבודה */
.tl { list-style: none; margin: 6px 0 0; padding: 0; }
.tl li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl li::before { content: ''; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); border: 1.5px solid var(--accent); color: var(--accent-deep); display: grid; place-items: center; flex: none; }
.tl-dot .i { width: 16px; height: 16px; }
.tl small { color: var(--soft); font-size: 13px; }
.tl p { margin: 2px 0 0; }

/* סרטון בתוך ריבוע */
.gallery video, .photos-in video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gallery .play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.gallery .play .i { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; fill: #fff; }
.gallery.big { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery.big button { border-radius: 6px; }
@media (min-width: 700px) { .gallery.big { grid-template-columns: repeat(5, 1fr); } }

/* גלריה מלאה */
body.noscroll { overflow: hidden; }
.lbx { position: fixed; inset: 0; z-index: 120; background: #0d0905; color: #F1E9CF; display: flex; flex-direction: column; touch-action: none; user-select: none; }
.lbx-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; position: relative; z-index: 2; }
.lbx-count { font-size: 15px; opacity: .85; }
.lbx-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lbx-btn.dark { background: var(--surface2); color: var(--ink); border: 1px solid var(--line); }
.lbx-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.lbx-stage img, .lbx-stage video { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; will-change: transform; }
.lbx-stage video { touch-action: auto; }
.lbx-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lbx-nav.prev { inset-inline-start: 12px; }
.lbx-nav.next { inset-inline-end: 12px; }
html[dir="ltr"] .lbx-nav .i { transform: scaleX(-1); }
@media (pointer: coarse) { .lbx-nav { display: none; } }
.lbx-cap { text-align: center; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); font-size: 15px; opacity: .85; min-height: 20px; }
.gscreen { position: fixed; inset: 0; z-index: 110; background: var(--bg); display: flex; flex-direction: column; }
.gs-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gs-top h2 { flex: 1; margin: 0; }
.gs-body { overflow-y: auto; padding: 8px 16px 40px; }
.gs-date { font-size: 15px; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
button.pbar.tap { display: block; width: 100%; text-align: start; background: none; border: 1px solid transparent; border-radius: 14px; padding: 8px 10px; margin: -4px -10px; width: calc(100% + 20px); cursor: pointer; color: inherit; font: inherit; }
button.pbar.tap:hover, button.pbar.tap:focus-visible { background: var(--surface2); border-color: var(--line); }
.pbar .pgo { color: var(--accent-deep); display: inline-grid; margin-inline-start: 6px; }
.pbar .pgo .i { width: 16px; height: 16px; }
.pbar .pl .pn { margin-inline-start: auto; color: var(--muted); font-size: 14px; }

/* ---------- בקשות מהסופר ---------- */
.req-sum { font-family: 'Noto Serif Hebrew', serif; font-size: 24px; font-weight: 700; line-height: 1.2; }
.card.req.private { border-style: dashed; }
.actgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.act { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); cursor: pointer; font: inherit; min-height: 120px; }
.act .i { width: 28px; height: 28px; color: var(--accent); margin-bottom: 4px; }
.act b { font-size: 17px; line-height: 1.3; }
.act small { color: var(--soft); font-size: 14px; line-height: 1.35; }
.act:active { transform: scale(.98); }
details.fold summary { cursor: pointer; font-weight: 700; color: var(--muted); list-style-position: inside; }
details.fold[open] summary { margin-bottom: 6px; }
details.fold .card { box-shadow: none; }

/* ---------- דיווחי תשלום מהלקוח ---------- */
.section-sub { font-weight: 700; color: var(--muted); margin: 14px 0 2px; font-size: 15px; }
.pay-end { display: inline-flex; align-items: center; gap: 10px; }
.pay-end .link { font-size: 14px; }
.creq-row span:first-child { color: var(--muted); }
.row.payrow { border-left: 0; border-right: 0; border-top: 0; background: none; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.row.payrow b { display: inline-flex; align-items: center; gap: 8px; }
.pedit .i { width: 16px; height: 16px; color: var(--accent); }
.row.payrow:hover { background: var(--surface2); }

/* ---------- מה עושים היום? ---------- */
.todo-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 6px; }
.todo { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-inline-start: 5px solid var(--line); border-radius: 16px; padding: 14px 14px; box-shadow: var(--shadow); }
.todo.l3 { border-inline-start-color: var(--bad); }
.todo.l2 { border-inline-start-color: var(--warn); }
.todo.l1 { border-inline-start-color: var(--ok); }
.todo-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); }
.todo.l3 .todo-ic { background: var(--bad-bg); color: var(--bad); }
.todo.l2 .todo-ic { background: var(--warn-bg); color: var(--warn); }
.todo.l1 .todo-ic { background: var(--ok-bg); color: var(--ok); }
.todo .body { flex: 1; min-width: 0; }
.todo-lvl { font-size: 13px; font-weight: 700; color: var(--soft); }
.todo.l3 .todo-lvl { color: var(--bad); }
.todo.l2 .todo-lvl { color: var(--warn); }
.todo .t { font-weight: 700; font-size: 17px; line-height: 1.35; }
.todo .s { color: var(--muted); font-size: 15px; margin-top: 2px; }
.todo .btns { margin-top: 8px; }

/* ---------- התראות ---------- */
.top .icon-btn { flex: none; }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif { display: flex; gap: 12px; align-items: flex-start; text-align: start; width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.notif .body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.notif .body span { color: var(--muted, var(--ink)); line-height: 1.5; }
.notif .body small { color: var(--soft); font-size: 14px; }
.notif.new { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.notif:not(.new) { opacity: .78; }
.notif .todo-ic { flex: none; }
.ntogs { display: flex; flex-direction: column; gap: 8px; }
.toggle .grow { display: flex; flex-direction: column; gap: 2px; }
.toggle small { font-size: 14px; }
.timerow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.timerow label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.timerow input { min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.ntypes { display: flex; flex-direction: column; }
.ntype { padding: 12px 0; border-top: 1px solid var(--line); }
.ntype:first-child { border-top: 0; padding-top: 0; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nt-text { margin-top: 6px; font-size: 15px; line-height: 1.5; }
.nt-text .link { white-space: nowrap; }
.opts.sm button { min-height: 38px; padding: 0 12px; font-size: 15px; }
.nh { margin: 14px 0 8px; font-size: 16px; }
.card.nlink { display: block; width: 100%; text-align: start; cursor: pointer; font: inherit; color: inherit; }
.card.nlink .soft { display: block; margin-top: 4px; }
.toggle input { flex: none; }

/* ---------- מסך הבית הנקי ---------- */
details.fold > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '▾'; color: var(--soft); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
.glance { margin: 26px 0 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; }
.glance[open] { padding-bottom: 12px; }
.glance .row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; text-align: start; }
.glance .row:first-child { border-top: 0; }
.empty.calm { padding: 22px 16px; }

/* משימה בשורה אחת שנפתחת בלחיצה */
details.todo { display: block; padding: 0; }
details.todo > summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 60px; cursor: pointer; list-style: none; }
details.todo > summary::-webkit-details-marker { display: none; }
details.todo .todo-ic { width: 36px; height: 36px; }
details.todo .t { flex: 1; min-width: 0; font-size: 16px; }
details.todo .chev { flex: none; color: var(--soft); display: grid; transform: rotate(-90deg); transition: transform .2s; }
details.todo[open] .chev { transform: rotate(90deg); }
details.todo .more { padding: 0 14px 14px 14px; padding-inline-start: 62px; }
details.todo .more .s { margin-top: 0; }
.todo-list { gap: 8px; }

/* לוח עברי בטפסים */
.hdate .hrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; font-size: 15px; color: var(--ink-soft, inherit); min-height: 24px; }
.hdate .hrow .link { font-size: 15px; white-space: nowrap; }
.hdate .hsel { display: grid; grid-template-columns: 1fr 1.5fr 1.2fr; gap: 8px; margin-top: 8px; }
.hdate .hsel select { min-width: 0; }

/* פתיחה מלכותית במסך הלקוח */
.royal { margin: 0 -16px 18px; padding: 16px 24px 30px; text-align: center; color: #F1E9CF; border-radius: 0 0 28px 28px;
  background: radial-gradient(80% 45% at 50% 22%, rgba(214,176,112,.32), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(176,141,87,.16), transparent 70%), linear-gradient(175deg, #4A3522, #2E2015 60%, #22170E);
  box-shadow: 0 12px 30px rgba(43,30,19,.25); }
.royal .rtop { display: flex; justify-content: flex-start; }
.royal .lang { background: transparent; border-color: rgba(214,176,112,.5); }
.royal .lang button { color: #D6B070; min-height: 34px; font-size: 14px; }
.royal .lang button.on { background: rgba(214,176,112,.22); color: #F3DDA8; }
.royal .crest { width: 176px; height: 150px; margin: 10px auto 20px; display: grid; place-items: center;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='176' height='150'%3E%3Cpath d='M16 .75H160L175.25 16V134L160 149.25H16L.75 134V16Z' fill='none' stroke='%23C9A46A' stroke-opacity='.85' stroke-width='1.5'/%3E%3Cpath d='M20 6H156L170 20V130L156 144H20L6 130V20Z' fill='none' stroke='%23C9A46A' stroke-opacity='.45'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.royal .crest i { width: 136px; height: 118px; background: url(img/logo-dark.png) no-repeat center / contain; }
.royal .hello { color: #D9C391; font-size: 17px; }
.royal .ded { font: 700 27px/1.45 'Noto Serif Hebrew', serif; margin: 8px auto 4px; max-width: 520px; text-wrap: balance;
  background: linear-gradient(180deg, #F3DDA8, #C9A46A 60%, #A9864F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.royal .divider { display: flex; align-items: center; gap: 10px; margin: 16px auto; width: 70%; max-width: 320px; }
.royal .divider::before, .royal .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #B08D57); }
.royal .divider::after { background: linear-gradient(270deg, transparent, #B08D57); }
.royal .divider i { width: 8px; height: 8px; background: #B08D57; transform: rotate(45deg); }
.royal .meta { color: #E6D6AE; font-size: 16px; }
.royal .meta b { color: #D6B070; }
.royal .rring { width: 150px; height: 150px; margin: 22px auto 6px; position: relative; }
.royal .rring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.royal .rring .c { position: absolute; inset: 0; display: grid; place-content: center; }
.royal .rring .c b { font: 700 36px 'Noto Serif Hebrew', serif; color: #F3DDA8; line-height: 1; }
.royal .rring .c small { color: #CDB88E; font-size: 13px; margin-top: 4px; }
.royal .stage { display: inline-block; margin-top: 12px; border: 1px solid rgba(214,176,112,.55); border-radius: 30px; padding: 6px 18px; color: #D6B070; font-weight: 700; }
.royal .rbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 360px; margin: 22px auto 0; min-height: 50px; border: 0; border-radius: 30px; cursor: pointer;
  background: linear-gradient(180deg, #D6B070, #A9864F); color: #2B1E13; font-weight: 800; font-size: 17px; }
.royal .rbtn .i { width: 20px; height: 20px; }
