/* ערכת "ירוק יער + זהב". כל גוון שנושא טקסט נבדק מול 4.5:1 (WCAG AA):
   לבן על --brand 7.13 · לבן על --sidebar 14.75 · --ink על --bg 14.09 ·
   --muted 7.22 · --soft 5.59 · --accent 4.70 · --err 5.22.
   הזהב החי #FBBF24 שמור למשטחים בלבד (תגיות, גרפים) — כטקסט הוא 1.6:1
   ולכן --accent הוא זהב-חרדל כהה. */
:root{
  /* sidebar — deep forest */
  --sidebar:#0B2E1E; --sidebar-ink:#DCEFE3; --sidebar-muted:#B4D3C1; --sidebar-active:#166534;
  /* brand / accents — forest green + mustard gold */
  --brand:#166534; --brand-2:#1F7A42; --accent:#A16207; --gold:#FBBF24;
  /* surfaces — לבן. הרקע והכרטיס באותו גוון, ולכן קו הגבול חייב להיות
     מובחן מספיק כדי שהכרטיסים ימשיכו להיקרא כמשטחים נפרדים. */
  --bg:#ffffff; --card:#ffffff; --line:#D5E2DA; --line-2:#D5E2DA;
  /* ink — deep forest instead of charcoal, keeps 14:1 on the background */
  --ink:#0B2E1E; --muted:#3F5A4C; --soft:#4F6B5C;
  --ok:#166534; --err:#C53030; --warn:#8A5A06;
  --sbw:252px; --radius:14px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;font-size:17px}
body{margin:0;font-family:"Assistant","Segoe UI",Arial,Helvetica,sans-serif;background:var(--bg);
  color:var(--ink);line-height:1.6;font-size:1rem;font-weight:400;letter-spacing:.005em}
a{color:var(--accent);text-decoration:none}

/* ===== sidebar (full-height, anchored right) ===== */
.sidebar{position:fixed;top:0;right:0;bottom:0;width:var(--sbw);background:var(--sidebar);
  color:var(--sidebar-ink);display:flex;flex-direction:column;z-index:40}
.sidebar .brand{padding:26px 26px 16px;font-size:1.36rem;font-weight:700;letter-spacing:.4px}
.sidebar .brand a{color:#fff}
.sidebar .nav{flex:1;overflow-y:auto;padding:10px 14px}
.sidebar .nav a{display:flex;align-items:center;gap:12px;padding:13px 15px;border-radius:11px;
  color:var(--sidebar-muted);font-size:1.08rem;font-weight:500;margin-bottom:3px;
  transition:background .15s ease,color .15s ease}
/* ===== אייקוני קו (‎_icons.html) =====
   כל אמוג'י הגיע בגודל ובצבע משלו ממערכת ההפעלה, ולכן התפריט נראה
   לא-אחיד וצבעוני מדי. כאן כל האייקונים 20×20 בדיוק ויורשים את צבע הטקסט. */
svg.ic{width:23px;height:23px;flex:0 0 23px;display:block;
  fill:none;stroke:currentColor;stroke-width:1.65;
  stroke-linecap:round;stroke-linejoin:round}
.sidebar .nav a svg.ic{opacity:.9}
.sidebar .nav a.active svg.ic{opacity:1}
.sidebar .nav a:hover{background:rgba(255,255,255,.06);color:var(--sidebar-ink)}
.sidebar .nav a.active{background:var(--sidebar-active);color:#fff;font-weight:600}
.sidebar .nav a.active .ic{filter:none;opacity:1}
.sb-sep{height:1px;background:rgba(255,255,255,.09);margin:12px 16px}
/* שני הקישורים ישבו ברצף באותה שורה ונקראו כפריט אחד */
.sb-foot{padding:12px 16px;border-top:1px solid rgba(255,255,255,.08);
  display:flex;flex-direction:column;gap:2px}
.sb-foot a{display:flex;align-items:center;gap:10px;padding:11px 10px;border-radius:9px;
  color:var(--sidebar-muted);font-size:1.05rem}
.sb-foot a:hover{color:#fff;background:rgba(255,255,255,.07)}

/* ===== main area (fills remaining width) ===== */
.main{min-height:100vh;display:flex;flex-direction:column}
.main.has-sidebar{margin-right:var(--sbw)}
.topbar{display:flex;align-items:center;gap:16px;padding:16px 44px;border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.72);backdrop-filter:blur(8px);position:sticky;top:0;z-index:50}
/* z-index 50 (היה 20): הכותרת היא stacking context, ולכן רשימת בורר הלקוח (tsel-pop, 70)
   נחתכה מתחת לסרגל ההתאמות התחתון (#selBar, 40) — אלה 14/10/2026: "החיפוש של שם
   הלקוח לא נפתח טוב". נשאר מתחת לתפריט הצד במובייל (60) ולמסך הכהה שלו (55). */
.tenant-switch{margin-inline-end:auto}
.tenant-switch .tenant-name{font-size:1.8rem;font-weight:700;line-height:1.25;color:var(--ink)}
.tenant-switch select{font-size:1rem;font-weight:600;color:var(--ink);border:1px solid var(--line);
  border-radius:10px;background:#fff;padding:8px 12px;min-width:190px}
/* ===== בורר עוסק עם חיפוש ===== */
.tsel{position:relative}
/* שם העוסק הוא העוגן של המסך — הוא צריך להיקרא מרחוק ולתפוס רוחב אמיתי
   בכותרת (דרישת אלה, 03/08). הקופסה נמתחת עד ~55% מרוחב הכותרת. */
.tsel-btn{display:flex;align-items:center;gap:12px;font-family:inherit;font-size:1.12rem;font-weight:600;
  color:var(--ink);border:1px solid var(--line);border-radius:12px;background:#fff;
  padding:12px 20px;min-width:min(420px,48vw);max-width:min(680px,55vw);cursor:pointer;text-align:start;
  box-shadow:0 3px 12px rgba(11,46,30,.10);user-select:none}
.tsel-btn:hover{background:#f4f7f6;box-shadow:0 4px 16px rgba(11,46,30,.14)}
.tsel-btn:focus-visible{outline:2px solid var(--brand-2);outline-offset:2px}
.tsel-cur{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:1.8rem;font-weight:700;line-height:1.25;letter-spacing:-.01em}
.tsel-txt{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:start}
.tsel-txt .tsel-cur{flex:none;max-width:100%}
/* מספרי הזיהוי מתחת לשם — קריאים ממש, לא הערת שוליים. הם מוקלדים
   עשרות פעמים ביום לטפסים של רשות המסים ולכן צמוד להם כפתור העתקה. */
.tsel-idrow{display:flex;align-items:center;gap:8px;max-width:100%;min-width:0}
.tsel-ids{font-size:1.18rem;font-weight:500;color:var(--muted);white-space:nowrap;direction:rtl;
  overflow:hidden;text-overflow:ellipsis}
.tsel-copy{position:relative;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;width:30px;height:30px;padding:0;border:1px solid var(--line);border-radius:8px;
  background:#fff;color:var(--soft);cursor:pointer;transition:background .15s ease,color .15s ease}
.tsel-copy:hover{background:#eef4f1;color:var(--brand);border-color:var(--brand-2)}
.tsel-copy svg.ic{width:17px;height:17px;flex:0 0 17px}
.tsel-copy.copied{background:var(--brand);border-color:var(--brand);color:#fff}
/* חיווי ההעתקה חייב להיות מפורש — בלעדיו לא ברור אם הלחיצה נקלטה */
.tsel-copy.copied::after{content:"הועתק ✓";position:absolute;top:calc(100% + 6px);
  inset-inline-start:50%;transform:translateX(50%);background:var(--sidebar);color:#fff;
  padding:5px 10px;border-radius:7px;font-size:.8rem;font-weight:500;white-space:nowrap;z-index:80}
.tsel-caret{color:var(--soft);font-size:1.25rem;line-height:1}
/* בן-ישיר בלבד: אחרת הכלל הזה גובר גם על האייקון שבתוך כפתור ההעתקה */
.tsel-btn>svg.ic{width:22px;height:22px;flex:0 0 22px;color:var(--soft)}

/* ===== פס "כל הלקוחות" — מחליף את בורר הלקוח במסכים חוצי-לקוחות =====
   ירוק מלא ולא לבן, כדי שההבדל בין "לקוח אחד" ל"כולם" ייקלט במבט אחד
   ולא ייקרא בטעות כשם לקוח. */
.tsel-allpill{display:flex;align-items:center;gap:12px;border-radius:12px;
  padding:12px 20px;min-width:min(420px,48vw);max-width:min(680px,55vw);
  background:var(--brand);color:#fff;border:1px solid var(--brand);
  box-shadow:0 3px 12px rgba(11,46,30,.16);text-decoration:none}
.tsel-allpill:hover{background:var(--brand-2);border-color:var(--brand-2)}
.tsel-allpill svg.ic{width:24px;height:24px;flex:0 0 24px;opacity:.95}
.tsel-alltxt{display:flex;flex-direction:column;min-width:0}
.tsel-allcur{font-size:1.8rem;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:#fff}
.tsel-allsub{font-size:1.05rem;font-weight:400;color:#CFE7D9;white-space:nowrap}

/* ===== שני מצבי תצוגה (לקוח נוכחי / כל הלקוחות) ===== */
.scopetabs{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.scopetab{display:flex;align-items:center;gap:12px;flex:1 1 280px;max-width:420px;
  padding:14px 18px;border:1.5px solid var(--line);border-radius:14px;background:var(--card);
  color:var(--ink);text-decoration:none;transition:border-color .15s ease,background .15s ease}
.scopetab:hover{background:#f4f7f6;border-color:var(--brand-2)}
.scopetab svg.ic{width:24px;height:24px;flex:0 0 24px;color:var(--soft)}
.scopetab>span{display:flex;flex-direction:column;min-width:0;flex:1}
.scopetab b{font-size:1.15rem;font-weight:700}
.scopetab small{font-size:.92rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* המונה הוא הדבר שסורקים בעין, ולכן הוא גדול ולא תגית קטנה */
.scopenum{flex:0 0 auto;min-width:46px;text-align:center;font-size:1.5rem;font-weight:800;
  line-height:1.1;color:var(--ink)}
.scopetab.on{border-color:var(--brand);background:#EAF3ED;box-shadow:0 2px 10px rgba(11,46,30,.10)}
.scopetab.on svg.ic,.scopetab.on .scopenum{color:var(--brand)}
.scopetab.on small{color:var(--soft)}
/* לקוח שאין לו הנהח"ש חד-צידית — הטאב נשאר גלוי אך מובן שהוא ריק בכוונה */
.scopetab.off{opacity:.55}

/* ===== כרטיס לקוח ברשימה חוצת-לקוחות =====
   פס ירוק בקצה ושם גדול: כשגוללים בין כמה לקוחות צריך לדעת בכל רגע
   על תיק של מי מסתכלים, אחרת מסווגים הוצאה ללקוח הלא נכון. */
.grpcard{border-inline-start:5px solid var(--brand);padding-inline-start:26px}
.grphead{display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin:-6px -8px 10px;padding:10px 8px 12px;border-bottom:1px solid var(--line-2)}
.grpname{margin:0;font-size:1.5rem;font-weight:800;letter-spacing:-.01em;color:var(--brand)}
@media(max-width:600px){
  .grpcard{padding-inline-start:16px;border-inline-start-width:4px}
  .grpname{font-size:1.2rem}
}
@media(max-width:600px){
  .scopetab{flex:1 1 100%;max-width:none;padding:12px 14px}
  .scopetab b{font-size:1.05rem}
  .scopenum{font-size:1.3rem;min-width:38px}
  .tsel-allcur{font-size:1.15rem}
  .tsel-allsub{font-size:.9rem}
  .tsel-allpill{min-width:0;max-width:min(260px,62vw);padding:8px 12px;gap:8px}
  .tsel-allpill svg.ic{width:18px;height:18px;flex:0 0 18px}
}
.tsel-pop{display:none;position:absolute;top:calc(100% + 6px);inset-inline-start:0;z-index:70;
  width:min(340px,86vw);background:#fff;border:1px solid var(--line);border-radius:12px;
  box-shadow:0 10px 28px rgba(11,46,30,.18);padding:8px}
.tsel.open .tsel-pop{display:block}
.tsel-q{width:100%;font-size:1rem;padding:10px 12px;border:1px solid var(--line);border-radius:9px}
.tsel-list{max-height:min(52vh,340px);overflow-y:auto;margin-top:6px}
.tsel-opt{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 11px;border-radius:9px;color:var(--ink);font-size:1rem}
.tsel-opt:hover{background:#eef4f1}
.tsel-opt.on{background:var(--brand);color:#fff;font-weight:600}
.tsel-nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tsel-id{font-size:.84rem;color:var(--soft);direction:ltr;flex:0 0 auto}
.tsel-opt.on .tsel-id{color:#cfe3d6}
.tsel-none{display:none;padding:12px 11px;color:var(--muted);font-size:.94rem}
@media(max-width:600px){
  .tsel-btn{min-width:0;max-width:min(260px,62vw);font-size:1rem;padding:8px 12px;gap:8px}
  .tsel-cur{font-size:1.15rem}
  .tsel-ids{font-size:.95rem}
  .tsel-copy{width:26px;height:26px}
  .tsel-copy svg.ic{width:15px;height:15px;flex:0 0 15px}
  .tsel-btn>svg.ic{width:18px;height:18px;flex:0 0 18px}
  .tsel-caret{font-size:1rem}
}
.logout-top{display:inline-flex;align-items:center;gap:6px;color:var(--soft);
  border:1px solid var(--line);border-radius:999px;padding:5px 12px 5px 10px;font-size:.86rem}
.logout-top .lo-ic{font-size:1.05rem;line-height:1}
.logout-top:hover{color:var(--ink);background:#f4f7f6}
/* כפתור המגירה — נייד בלבד (ראי responsive) */
.menu-btn{display:none;background:none;border:0;padding:4px 2px;font-size:1.5rem;line-height:1;
  color:var(--ink);cursor:pointer}
.back-btn{display:inline-flex;align-items:center;justify-content:center;
  background:none;border:1px solid var(--line);border-radius:999px;
  width:38px;height:38px;padding:0;cursor:pointer;color:var(--ink);flex:0 0 38px}
.back-btn:hover{background:#f2f5f4}
.back-btn svg.ic{width:20px;height:20px;flex:0 0 20px}
.sb-overlay{display:none}
.container{flex:1;width:100%;padding:36px 44px 96px}

/* ===== typography ===== */
h1{font-size:1.95rem;font-weight:800;letter-spacing:-.01em;margin:.1em 0 .9em;color:var(--ink)}
h2{font-size:1.3rem;font-weight:700;color:var(--ink);margin:.2em 0 .5em}
.muted{color:var(--muted)}
.pos{color:var(--ok)}.neg{color:var(--err)}

/* ===== cards / layout ===== */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:28px 30px;margin-bottom:22px;box-shadow:0 2px 10px rgba(11,46,30,.10)}
.grid{display:grid;gap:20px}
.grid.stats{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:32px 24px}
.stat .num{font-size:2.8rem;font-weight:800;color:var(--ink);letter-spacing:-.015em;line-height:1.12}
.stat .lbl{color:var(--muted);font-size:1.05rem;margin-top:6px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:18px}

/* ===== tables (full width) ===== */
table{width:100%;border-collapse:collapse}
th,td{text-align:right;padding:15px 14px;border-bottom:1px solid var(--line-2);font-size:1.15rem;
  unicode-bidi:plaintext;vertical-align:middle}
td{font-weight:500;color:var(--ink)}
th{color:#2b3331;font-weight:700;letter-spacing:.02em}
tbody tr:hover{background:#f4f7f6}
/* סכומים: יישור לימין בתוך בידוד LTR. יישור לשמאל מיישר את הספרה
   הראשונה, ולכן 10.00 ו-9.00 יצאו עם נקודה עשרונית במקומות שונים —
   בטור סכומים זה בדיוק מה שמפריע לעין (אלה, 14/08/2026). */
td.amt,th.amt{direction:ltr;unicode-bidi:isolate;text-align:right;font-variant-numeric:tabular-nums}
td.amt{font-weight:600}
tfoot td,tr.total td,td.total{font-weight:700;color:var(--ink)}
th.qty,td.qty{text-align:center}

/* ===== forms =====
   סולם אחיד (המשוב של יוליה 07/08): תווית ‎.88 קטנה מעל קלט ‎1.02 —
   הערכים הם הכוכב, לא הכותרות. שלושה סוגי שדות, שלושה מראות:
   מקלידים = לבן · בוחרים = ירקרק עם חץ · מחושב/נעול = אפור בלי מסגרת. */
label{display:block;margin:.8em 0 .3em;color:var(--muted);font-size:.88rem;font-weight:600}
label .req{color:var(--err);font-weight:700}
label .opt{color:#7A8F81;font-weight:400}
input,select,textarea{width:100%;padding:11px 14px;border:1px solid #C9D8CD;border-radius:10px;
  font-size:1.02rem;font-family:inherit;background:#fff;color:var(--ink);transition:border-color .15s,box-shadow .15s}
select{background-color:#F1F7F3;border-color:#B9CFC0;cursor:pointer;font-weight:600;
  -webkit-appearance:none;appearance:none;padding-inline-start:32px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:left 10px center;background-size:15px}
input[readonly]{background:#EDF1EE;border-color:transparent;color:var(--muted);font-weight:600}
input[type=checkbox],input[type=radio]{width:auto;accent-color:var(--brand);cursor:pointer}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(22,101,52,.14)}
/* file inputs shouldn't stretch full-width (kept clean + separated from adjacent buttons) */
input[type=file]{width:auto;max-width:100%;padding:9px 12px;background:#fbfcfc;cursor:pointer}
/* iOS: הפקד הטבעי של תאריך/שעה מקבל רוחב פנימי משלו ומתעלם מ-width:100%,
   ולכן השדה בלט החוצה מול שאר השדות בטופס ("יוצא מהקו", 31/07/2026).
   appearance:none מבטל את הפקד הטבעי, min-width:0 מרשה לו להתכווץ.
   בורר התאריך של iOS ממשיך להיפתח כרגיל בלחיצה. */
input[type=date],input[type=time],input[type=datetime-local],input[type=month]{
  -webkit-appearance:none;appearance:none;min-width:0;max-width:100%;display:block}
/* ספארי בדף עברי (אלה 05/10/2026: "התאריך הופך — רשמת את השנה קודם", צבע טורקיז):
   ספארי מסדר את חלקי התאריך לפי כיוון הדף ⇒ 2026.10.05, וצובע אותם בצבע המערכת.
   סדר משמאל לימין בתוך העורך + צבע הטקסט הרגיל. בכרום אין שינוי נראה. */
input[type=date]::-webkit-datetime-edit,input[type=date]::-webkit-datetime-edit-fields-wrapper{direction:ltr;unicode-bidi:isolate}
input[type=date]::-webkit-datetime-edit-day-field,input[type=date]::-webkit-datetime-edit-month-field,
input[type=date]::-webkit-datetime-edit-year-field,input[type=date]::-webkit-datetime-edit-text{color:inherit;-webkit-text-fill-color:currentColor}
input[type=date]{-webkit-text-fill-color:currentColor}
/* inline validation errors — high contrast */
.field-err{display:none;background:#f8ece9;color:#b04a3a;border:1px solid #e6c3bc;border-radius:10px;
  padding:11px 15px;font-size:.98rem;font-weight:600;margin:10px 0;line-height:1.5}
.field-err.show{display:block}

/* ===== buttons (uniform, refined) ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--brand);
  color:#fff;border:1px solid var(--brand);border-radius:11px;padding:12px 24px;font-size:.98rem;
  font-weight:600;font-family:inherit;cursor:pointer;min-height:47px;line-height:1;
  transition:background .15s ease,border-color .15s ease,transform .05s ease}
.btn:hover{background:var(--brand-2);border-color:var(--brand-2)}
.btn:active{transform:translateY(1px)}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover{background:#f2f5f4;border-color:#d8dfdd}
.btn.block{display:flex;width:100%}
.btn-row{display:flex;gap:12px;flex-wrap:wrap}
/* "הפק וגבה באשראי" היה סגול — צבע זר לערכה. ירוק-כהה + כרטיס זהב:
   נשאר במותג ועדיין נבדל מכפתור ההפקה הרגיל. */
.btn.charge{background:var(--sidebar);border-color:var(--sidebar)}
.btn.charge:hover{background:#123C28;border-color:#123C28}
.btn.charge svg.ic{color:var(--gold)}
/* ===== תיקון "הכפתור הלא תקין" (אלה 30/08) =====
   שתי סיבות: (1) קישור-כפתור בתוך טבלה פיננסית ירש את צבע הקישורים
   (‎.fintbl a כחול) על רקע כהה — הטקסט לא נראה; (2) הוריאנטים
   small/secondary/danger שמסכי הכפולה משתמשים בהם לא היו מוגדרים כלל,
   וכל כפתור כזה יצא ענק וכהה. מוגדרים כאן פעם אחת לכל האפליקציה. */
a.btn,.fintbl a.btn,a.btn:visited{color:#fff;text-decoration:none}
.btn.small{padding:6px 14px;min-height:0;font-size:.88rem;border-radius:9px}
.btn.secondary,.fintbl a.btn.secondary,a.btn.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btn.secondary:hover{background:#f2f5f4;border-color:#d8dfdd}
.btn.danger,a.btn.danger{background:#8a2f23;border-color:#8a2f23;color:#fff}
.btn.danger:hover{background:#75261c;border-color:#75261c}
a.btn.ghost,.fintbl a.btn.ghost{color:var(--ink)}

/* ===== טופס מסמך — שלבים ממוספרים (מתווה 08/08/2026) =====
   המספור ב-CSS counter: שלב מוסתר (display:none, למשל "פרטי התשלום"
   כשהמסמך אינו קבלה) אינו נספר, ולכן המספרים תמיד רציפים. */
form.card-steps{counter-reset:fsec;padding:0;overflow:hidden}
.fsec{padding:18px 26px 22px;border-top:1px solid #E4ECE6;counter-increment:fsec}
form.card-steps>.fsec:first-of-type{border-top:0}
.fhead{display:flex;align-items:center;gap:10px;margin:0 0 4px}
.fhead::before{content:counter(fsec);flex:0 0 auto;width:24px;height:24px;border-radius:50%;
  background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;
  font-size:.8rem;font-weight:700}
.fhead h2{margin:0;font-size:1.05rem;font-weight:700}
.fhead .fhint{margin-inline-start:auto;font-size:.8rem;color:var(--soft);text-align:left}

/* כותרת חיה: שם המסך + מספר המסמך הבא בצ'יפ שקט */
.tophead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.tophead h1{margin:0}
.docnum{display:inline-flex;align-items:baseline;gap:7px;background:#F1F7F3;border:1px solid var(--line);
  border-radius:10px;padding:7px 14px;font-size:.88rem;color:var(--muted)}
.docnum b{font-size:1.02rem;color:var(--brand);direction:ltr;font-variant-numeric:tabular-nums}

/* סימון "הכנסה פטורה ממע"מ" — שורת צ'קבוקס מוקפת, לא טקסט צף */
.zv{display:flex;gap:9px;align-items:flex-start;background:#F1F7F3;border:1px solid #DCE8DF;
  border-radius:10px;padding:11px 14px;margin:12px 0 0;font-size:.88rem;font-weight:400;color:var(--ink);cursor:pointer}
.zv input{flex:0 0 auto;margin-top:2px;width:17px;height:17px}
.zv small{display:block;color:var(--soft);font-size:.8rem}

/* תיבת סיכום: שורות מע"מ שקטות, "סה"כ לתשלום" הוא הכוכב */
.totals{background:#F6FAF7;border:1px solid #DCE8DF;border-radius:12px;padding:4px 18px 6px;margin-top:6px}
.totals .list-row{padding:10px 4px;border-bottom:1px solid #E0EAE2;font-size:.88rem;color:var(--muted)}
.totals .list-row strong{direction:ltr;font-variant-numeric:tabular-nums;font-size:1.02rem;color:var(--ink)}
.totals .list-row.grand{border-bottom:0;border-top:2px solid var(--brand);margin-top:2px;padding-top:12px}
.totals .list-row.grand span{font-size:1.02rem;font-weight:700;color:var(--ink)}
.totals .list-row.grand strong{font-size:1.35rem;font-weight:800;color:var(--brand)}
.novat-badge{display:inline-flex;align-items:center;gap:6px;background:#FBF7EC;border:1px solid #EFE3C2;
  color:var(--warn);border-radius:999px;padding:3px 12px;font-size:.78rem;font-weight:700}
.novat-badge svg.ic{width:14px;height:14px;flex:0 0 14px}

/* כפתור הוספת שורה — מובלט (יוליה פספסה את הגרסה העדינה) */
.addbtn{display:inline-flex;align-items:center;gap:8px;background:#F1F7F3;color:var(--brand);
  border:1.5px dashed var(--brand);border-radius:10px;padding:11px 20px;font-size:.95rem;font-weight:700;
  font-family:inherit;cursor:pointer}
.addbtn:hover{background:#E6F1E9}
.addbtn svg.ic{width:17px;height:17px;flex:0 0 17px}

/* אופציית "ללא מע"מ" בבורר הסכומים — מוגשת שונה משתי אופציות החישוב:
   מופרדת בקו וצבועה בגוון הזהב של תגי הפטור (אלה 08/08, מהנייד) */
#priceMode .pm-zero{border-inline-start:1px solid #CBDDD0;padding-inline-start:16px;color:var(--warn)}
#priceMode .pm-zero b{color:var(--warn)}

/* ניכוי מס במקור — בתוך תיבת התשלום, שדה צר + פירוט חשבון (אלה 08/08) */
.whrow{display:flex;gap:16px;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;
  border-top:1px dashed #DCE8DF;margin-top:12px;padding-top:2px}
.whrow>div:first-child input{max-width:150px}
.paycalc{font-size:.88rem;font-weight:600;padding-bottom:11px}
/* styles-gallery action buttons — equal width, centered text, symmetric */
.gal-actions{display:flex;gap:10px}
.gal-actions>*{flex:1}
.gal-actions form{display:flex}
.gal-actions .btn{width:100%;min-width:90px;text-align:center}
.style-name{font-weight:600;font-size:1.08rem;color:var(--ink)}

/* ===== client dashboard (Finbot-style, Quiet Luxury) ===== */
.welcome{font-size:1.7rem;font-weight:700;color:var(--ink);margin:.1em 0 .7em}
.welcome small{display:block;font-size:1.02rem;font-weight:400;color:var(--muted);margin-top:6px}
/* כותרת מקטע — קו מפריד בין שליחת ההוצאות אלינו לבין הנפקת מסמכים */
.sec-head{margin:24px 0 12px;padding-top:18px;border-top:1px solid var(--line)}
.sec-head .sec-title{display:block;font-size:1.14rem;font-weight:700;color:var(--ink)}
.sec-head .sec-sub{display:block;font-size:.9rem;color:var(--muted);margin-top:3px;line-height:1.35}
.qa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin:20px 0 26px}
.qa{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:var(--brand);color:#fff;border-radius:16px;padding:30px 20px;min-height:128px;
  font-size:1.15rem;font-weight:600;text-align:center;transition:background .15s ease,transform .05s ease}
.qa:hover{background:var(--brand-2)}
.qa:active{transform:translateY(1px)}
.qa .qi{font-size:1.9rem;line-height:1}
.qa.alt{background:#fff;color:var(--ink);border:1px solid var(--line)}
.qa.alt:hover{background:#f4f7f6}
.panels{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:22px}
.metric{font-size:2.8rem;font-weight:800;color:var(--ink);letter-spacing:-.015em;line-height:1.12}
.metric.neg{color:var(--err)}
.metric-lbl{color:var(--muted);font-size:1.05rem;margin-top:6px}
.metric-sub{display:flex;justify-content:space-between;align-items:baseline;
  border-top:1px solid var(--line-2);margin-top:16px;padding-top:14px}
.metric-sub .v{font-size:1.25rem;font-weight:700;color:var(--ink)}
.chart{display:flex;align-items:flex-end;gap:8px;height:210px;padding:10px 2px 0}
.chart .bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%}
.chart .bar i{width:100%;max-width:38px;background:linear-gradient(180deg,#2F9E5B,#166534);
  border-radius:6px 6px 0 0;min-height:3px;display:block}
.chart .bar b{font-size:.72rem;color:var(--muted);margin-top:8px;font-weight:600}
@media(max-width:720px){.panels{grid-template-columns:1fr}}

/* ===== data tables (accountant tenants + customers) ===== */
.tenants-tbl,.cust-tbl{width:100%;border-collapse:collapse}
.tenants-tbl th,.tenants-tbl td,.cust-tbl th,.cust-tbl td{padding:16px 18px}
.tenants-tbl td.mono,.cust-tbl td.mono{font-variant-numeric:tabular-nums;direction:ltr;text-align:right;letter-spacing:.3px}
.tenants-tbl td.actions{text-align:left;white-space:nowrap}
.tenants-tbl td.actions .btn{padding:9px 16px;min-height:auto;font-size:1rem}
.cust-tbl td.actions{text-align:left;color:var(--soft);font-size:1.4rem}
.tenants-tbl tbody tr:hover,.cust-tbl tbody tr:hover{background:#f2f5f4}

/* ===== settings — premium logo upload zone + sections ===== */
.upload-zone{border:2px dashed #a3b0ac;border-radius:14px;padding:20px 22px;display:flex;align-items:center;
  gap:20px;cursor:pointer;background:#fbfcfc;transition:border-color .15s,background .15s;margin:.3em 0 .2em}
.upload-zone:hover,.upload-zone.drag{border-color:var(--accent);background:#eef5f4}
.uz-preview{width:90px;height:90px;border-radius:12px;background:#fff;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 auto}
.uz-preview img{max-width:100%;max-height:100%;object-fit:contain}
.uz-icon{font-size:2.1rem;color:var(--soft)}
.uz-text{font-size:1.1rem;line-height:1.5}
.uz-text strong{color:var(--accent)}
.settings-sec{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}
input.locked{background:#eceeed;color:#4a5351;cursor:not-allowed}

/* ===== badges (subtle) ===== */
.badge{display:inline-block;padding:3px 12px;border-radius:8px;font-size:.8rem;font-weight:500;
  background:#eef2f1;color:var(--muted);border:1px solid var(--line)}
.badge.approved{background:#eef4f0;color:var(--ok);border-color:#dde8e1}
.badge.pending{background:#f7f2e6;color:var(--warn);border-color:#ece0c6}
.badge.exempt{background:#f0f2f2;color:var(--muted);border-color:var(--line)}

/* ===== misc ===== */
.flash{padding:13px 18px;border-radius:11px;margin-bottom:16px;font-size:.95rem;border:1px solid transparent}
.flash.ok{background:#eef5f0;color:var(--ok);border-color:#dbe8e0}
.flash.error{background:#f8ece9;color:var(--err);border-color:#efd7d1}
/* הודעת הסבר (לא הצלחה ולא שגיאה) — למשל למה המסך נפתח בתצוגה אחרת */
.flash.info{background:#fdf6e7;color:var(--warn);border-color:#f0e2c4}
.list-row{display:flex;justify-content:space-between;align-items:center;padding:16px 6px;border-bottom:1px solid var(--line-2)}
.list-row:last-child{border-bottom:0}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px;flex-wrap:wrap}
/* 5 עמודות: פריט · תיאור (הגמיש — כאן כותבים חופשי) · כמות · מחיר · סה"כ.
   השורה נמתחת לכל הרוחב; הפריט והתיאור גדלים יחד ביחס 1:1.8 (אלה 09/08). */
.line-item{display:grid;grid-template-columns:minmax(120px,1fr) minmax(180px,1.8fr) 64px 104px 104px 44px;gap:10px;align-items:end;margin-bottom:12px}
.line-item input,.line-item select{min-width:0;width:100%}
.line-item .qty,.line-item .price,.line-item .lt{direction:ltr;text-align:center;font-size:.95rem;font-variant-numeric:tabular-nums}
/* תוויות רק בשורה הראשונה — השורות המשוכפלות יושבות צפוף כטבלה */
#lines .line-item+.line-item label{display:none}
/* חריג יחיד לכלל "בלי טקסט אפור בשדות" (אלה 12/10): בורר הפריט מציג "בחר פריט…" — הנחיה, לא דוגמה
   (אלה 20/10/2026, אייפון: "צריך להיות רשום בחר פריט") */
.line-item .combo-in::placeholder{color:#7f8f86!important;opacity:1!important}
/* חשבונית מעורבת: עמודת בורר מע"מ אחרי התיאור */
.line-item.mixed{grid-template-columns:minmax(120px,1fr) minmax(180px,1.6fr) 104px 64px 104px 104px 44px}
#lines .line-item+.line-item{margin-top:-2px}

/* ===== פעולות שורה במסמכי הכנסות — כפתורים קטנים עם תווית (בקשת אלה 16/08:
   אייקונים לבד לא היו ברורים, בטלפון גם אין טולטיפ) ===== */
td.rowact{white-space:nowrap}
.rowact .ract{display:inline-flex;align-items:center;justify-content:center;gap:5px;
  min-height:32px;border:1px solid var(--line);border-radius:8px;
  background:#fff;color:var(--soft);cursor:pointer;font-size:.8rem;
  vertical-align:middle;margin-inline-start:4px;text-decoration:none;
  padding:0 9px;white-space:nowrap}
.rowact .ract svg.ic{width:17px;height:17px;flex:0 0 17px}
.rowact .ract:hover{color:var(--brand);border-color:var(--brand);text-decoration:none}
/* צבע לפי סוג הפעולה — כדי לזהות אותה בלי לקרוא (בקשת אלה 16/08).
   כל גוון טקסט נבדק מול לבן ב-4.5:1 לפחות, כמו שאר הערכה. */
.rowact .ract.a-pdf{color:var(--muted)}
.rowact .ract.a-pdf:hover{color:var(--ink);border-color:var(--soft)}
.rowact .ract.a-rec{color:var(--brand);border-color:#BFDFCB;background:#F5FBF7}     /* כסף נכנס — ירוק */
.rowact .ract.a-rec:hover{border-color:var(--brand);background:#EAF5EE}
.rowact .ract.a-conv{color:var(--accent);border-color:#EBD9B4;background:#FDF8EF}   /* המרה — זהב */
.rowact .ract.a-conv:hover{color:var(--accent);border-color:var(--accent);background:#FAF0DE}
.rowact .ract.a-cancel{color:var(--err);border-color:#F0D2D2;background:#FDF6F6}    /* ביטול — אדום */
.rowact .ract.a-cancel:hover,.rowact form .ract:hover{color:var(--err);border-color:var(--err);background:#FBEBEB}
/* מצב, לא פעולה (קבלה שכבר הופקה / שיוך קיים) — תג ירוק מלא, שקט יותר */
.rowact .ract.done{background:#DCEFE3;border-color:#B6D9C4;color:#0F4C2A;font-weight:600}
.rowact .ract.done:hover{border-color:#0F4C2A;color:#0B3D21;background:#CFE8D8}

/* ===== תפריט "יצירת מסמך חדש" (בסגנון פינבוט) ===== */
.newdoc{position:relative}
.newdoc summary{list-style:none;cursor:pointer}
.newdoc summary::-webkit-details-marker{display:none}
.newdoc-menu{position:absolute;top:calc(100% + 6px);inset-inline-start:0;z-index:40;
  background:#fff;border:1px solid var(--line);border-radius:12px;
  box-shadow:0 8px 24px rgba(11,46,30,.12);min-width:190px;padding:6px;overflow:hidden}
.newdoc-menu a{display:block;padding:11px 16px;border-radius:8px;color:var(--ink);
  text-align:center;font-weight:500}
.newdoc-menu a:hover{background:#eef5f0;color:var(--brand);text-decoration:none}

/* ===== bottom nav (mobile only) ===== */
.bottomnav{display:none}
/* בזמן הקלדה הסרגל התחתון מוסתר — מונע לחיצה בטעות על + מעל המקלדת (05/08) */
body.kb-typing .bottomnav{display:none!important}
.bottomnav a{color:var(--muted);display:flex;flex-direction:column;align-items:center;font-size:1.3rem;flex:1}
.bottomnav a span{font-size:.68rem;margin-top:2px}
.bottomnav a.fab{background:var(--brand);color:#fff;width:54px;height:54px;border-radius:50%;
  justify-content:center;font-size:1.8rem;margin-top:-24px;box-shadow:0 4px 10px rgba(18,63,62,.35);flex:0 0 auto}

/* ===== responsive ===== */
@media(max-width:960px){
  /* התפריט הופך למגירה נשלפת במקום להיעלם — אחרת רוב המסכים בלתי נגישים בנייד */
  .sidebar{width:min(84vw,300px);z-index:60;transform:translateX(100%);
    transition:transform .22s ease;visibility:hidden}
  .sidebar.open{transform:none;visibility:visible;box-shadow:-8px 0 26px rgba(0,0,0,.3)}
  .sb-overlay{display:block;position:fixed;inset:0;z-index:55;background:rgba(0,0,0,.45);
    opacity:0;pointer-events:none;transition:opacity .22s ease}
  .sb-overlay.show{opacity:1;pointer-events:auto}
  .menu-btn{display:inline-flex}
  body.nav-open{overflow:hidden}
  .main.has-sidebar{margin-right:0}

  /* סרגלי הכלים של הדוחות מוגדרים nowrap כדי לשבת בשורה אחת במחשב.
     בנייד זה מתח את העמוד לרוחב ~1440px וגרר את כל התוכן הצידה. */
  .toolbar form{flex-wrap:wrap!important;white-space:normal!important}
  .toolbar h1,.toolbar h2{font-size:1.2rem}
  /* אחרי הגלישה לשורות, כפתורי הייצוא/שליחה תפסו מסך שלם לפני הנתונים.
     בגדלים האלה הם נכנסים בשתי שורות והדוח נראה מיד. */
  .toolbar form .btn{padding:7px 10px;font-size:.82rem}
  .toolbar form select{font-size:.86rem;padding:7px 8px}
  .toolbar form .seg a{padding:5px 9px;font-size:.82rem}
  .toolbar form .muted{font-size:.82rem}
  /* כפתורי הייצוא/שליחה מקופלים מאחורי "⋯ פעולות" (ראי base.html) */
  .tb-more{width:100%;order:9}
  .tb-more>summary{list-style:none;cursor:pointer;display:inline-block;
    padding:7px 12px;border:1px solid var(--line);border-radius:9px;
    background:#fff;font-size:.82rem;color:var(--ink)}
  .tb-more>summary::-webkit-details-marker{display:none}
  .tb-more[open]>summary{background:#eef4f3;font-weight:600}
  .tb-more-body{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}

  /* טבלאות רחבות בכרטיס: לגלול בתוך הכרטיס, לא לגרור את העמוד */
  .card>table,.card>.tblwrap{max-width:100%}
  .card>table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .topbar{padding:14px 18px}
  .container{padding:22px 16px 96px}
  .bottomnav{position:fixed;inset-inline:0;bottom:0;z-index:30;display:flex;justify-content:space-around;
    align-items:center;background:#fff;border-top:1px solid var(--line);
    padding:6px 4px;padding-bottom:max(6px,env(safe-area-inset-bottom))}
}
@media(max-width:600px){
  .row{grid-template-columns:1fr}
  /* בנייד: פריט ותיאור בשורה מלאה (מקום לכתוב), ומתחתם כמות/מחיר/סה"כ
     בשורה אחת של שלושה — לא 2+1 עם שדה בודד תלוש (אלה 08/08) */
  /* + עמודה צרה לכפתור המחיקה (X) באותה שורה — בלי העמודה הוא ירד לשורה משלו (אלה 20/10/2026, אייפון) */
  .line-item{grid-template-columns:1fr 1.2fr 1.2fr 44px}
  /* בנייד הכותרות מוצגות בכל שורה, לא רק בראשונה — בלי זה שורה נוספת היא תיבות ריקות בלי הסבר (אלה 20/10/2026) */
  #lines .line-item+.line-item label{display:block}
  .line-item .ln-pick{grid-column:1/-1}
  .line-item div:has(>input[name=description]){grid-column:1/-1}
  .line-item.mixed{grid-template-columns:1.1fr 1fr 1fr 1fr 44px}
  .card{padding:20px 18px}
  h1{font-size:1.35rem}
  /* כרטיסי מספר: ב-2.8rem "9,637 ₪" לא נכנס לחצי רוחב מסך והשקל ירד לשורה נפרדת.
     clamp מקטין לפי רוחב המסך במקום לשבור שורה — סכום ארוך מתכווץ ולא נחתך
     (בתוכנת הנהח"ש אסור לקצץ מספרים). nowrap מוודא שהשקל נשאר צמוד לסכום. */
  .stat{padding:18px 14px;min-width:0}
  .stat .num{font-size:clamp(1.1rem,5vw,1.75rem);letter-spacing:-.02em;white-space:nowrap}
  .stat .lbl{font-size:.9rem}
}

/* ===== שליחת חשבוניות והוצאות — הפעולה הראשית של הלקוח =====
   בהשראת פינבוט: העיגול עצמו הוא הכפתור, לא כרטיס מלבני עם עיגול קטן
   בתוכו. טבעת הזהב היא המקום היחיד שבו הזהב החי מופיע במסך, ולכן העין
   הולכת לשם ראשונה. */
.intake-btn{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;
  background:none;border:0;padding:6px 0 26px;margin:0;cursor:pointer;
  font-family:inherit;color:var(--ink)}
.intake-ring{display:flex;align-items:center;justify-content:center;
  width:152px;height:152px;border-radius:50%;
  background:radial-gradient(circle at 34% 28%,#1F7A42,#0B2E1E 74%);
  border:4px solid var(--gold);color:#fff;
  box-shadow:0 10px 26px rgba(11,46,30,.30);
  transition:transform .14s ease,box-shadow .14s ease}
.intake-btn:hover .intake-ring{transform:translateY(-2px);box-shadow:0 14px 32px rgba(11,46,30,.36)}
.intake-btn:active .intake-ring{transform:translateY(0) scale(.97)}
.intake-btn .intake-ic{display:flex}
.intake-btn .intake-ic svg.ic{width:56px;height:56px;flex:0 0 56px;stroke-width:1.35}
.intake-btn .intake-txt{font-size:1.16rem;font-weight:700;line-height:1.2}
.intake-btn .intake-sub{font-size:.88rem;color:var(--muted);line-height:1.35}
.intake-btn.busy{opacity:.6;pointer-events:none}
.intake-btn.busy .intake-ring{animation:intakePulse 1.1s ease-in-out infinite}
@keyframes intakePulse{0%,100%{transform:scale(1)}50%{transform:scale(.95)}}
/* תפריט צילום/קבצים — אנדרואיד בלבד (באייפון התפריט המובנה של המערכת) */
.intake-menu{display:flex;flex-direction:column;gap:8px;max-width:280px;margin:-12px auto 18px}
.intake-menu[hidden]{display:none}
.intake-menu button{display:flex;align-items:center;justify-content:center;gap:10px;
  padding:13px 16px;border-radius:14px;border:1px solid var(--line,#d9e2dc);background:#fff;
  font:inherit;font-size:1.05rem;font-weight:600;color:var(--ink);cursor:pointer}
.intake-menu button svg.ic{width:22px;height:22px}
/* בנייד minmax(200px) נותן עמודה אחת, וארבעת כרטיסי הפעולות נערמו ככתמים
   ירוקים בגובה 128px כל אחד — הם בלעו את המסך והתחרו בכפתור הראשי.
   שתי עמודות קומפקטיות מחזירות אותם למעמד של פעולות משניות. */
@media(max-width:600px){
  .welcome{font-size:1.32rem}
  .intake-ring{width:132px;height:132px;border-width:3px}
  .intake-btn .intake-ic svg.ic{width:48px;height:48px;flex:0 0 48px}
  .intake-btn{padding-bottom:20px}
  .welcome small{font-size:.95rem}
  .sec-head{margin:16px 0 10px;padding-top:14px}
  .sec-head .sec-title{font-size:1.05rem}
  .sec-head .sec-sub{font-size:.84rem}
  .qa-grid{grid-template-columns:1fr 1fr;gap:10px;margin:0 0 20px}
  .qa{padding:15px 8px;min-height:0;font-size:.92rem;gap:6px;border-radius:13px}
  .qa .qi{font-size:1.45rem}
}

.bottomnav svg.ic{width:23px;height:23px;flex:0 0 23px;margin-bottom:2px}
.bottomnav a.fab svg.ic{width:26px;height:26px;flex:0 0 26px;stroke-width:2.2;margin:0}
.qa svg.ic{width:27px;height:27px;flex:0 0 27px;stroke-width:1.6}
.sb-foot svg.ic{width:19px;height:19px;flex:0 0 19px}
.logout-top svg.ic{width:17px;height:17px;flex:0 0 17px}

/* אייקון בתוך כותרת או טקסט זורם — יישור לקו הבסיס ומרווח משלו */
h1 svg.ic,h2 svg.ic{display:inline-block;vertical-align:-4px;margin-inline-end:9px;width:23px;height:23px}
.btn svg.ic,.badge svg.ic,label svg.ic,strong svg.ic,td svg.ic{display:inline-block;vertical-align:-3px;width:18px;height:18px;flex:none}
label svg.ic,strong svg.ic{margin-inline-end:6px}
.badge svg.ic{width:15px;height:15px;vertical-align:-2px;margin-inline-end:4px}

/* ===== bookkeeping (books_*) — mobile table scroll ===== */
.tblwrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.tblwrap table{min-width:640px}
@media(max-width:600px){.grid.stats{grid-template-columns:1fr 1fr}}

/* ===== פורמליות פלט תקניות (נספח ה') — כותרת + סוף-פלט ===== */
.stat-header{border:1px solid var(--line);border-radius:10px;padding:12px 16px;margin:0 0 16px;background:#fafcfb}
.stat-header .sh-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.stat-header .sh-row+.sh-row{margin-top:6px;padding-top:6px;border-top:1px dashed var(--line)}
.stat-header .sh-biz b{font-size:1.05rem}
.stat-header .sh-biz .muted{margin-inline-start:8px;font-size:.85rem}
.stat-header .sh-sw{font-size:.8rem}
.stat-header .sh-title{font-weight:700;color:var(--brand)}
.stat-header .sh-meta{font-size:.8rem}
.stat-header .sh-page{margin-inline-start:10px}
.end-of-output{text-align:center;color:var(--muted);font-size:.8rem;letter-spacing:.5px;
  margin:22px 0 4px;padding-top:10px;border-top:1px solid var(--line);user-select:none}
@media print{
  @page{margin:14mm; @bottom-center{content:"עמוד " counter(page) " מתוך " counter(pages); font-size:9pt; color:#667}}
  .sidebar,.bottomnav,.topbar,.btn,.toolbar form,.toolbar .btn{display:none!important}
  .stat-header .sh-page{display:none}   /* בהדפסה: מספור העמודים האמיתי מגיע מתחתית העמוד */
  .stat-header{border-color:#000}
  .end-of-output{border-top-color:#000;color:#000}
  .card{break-inside:avoid}
}


/* ===== responsive tenants/customers/documents tables (mobile: stack rows so action buttons are always reachable) ===== */
@media(max-width:700px){
  .tenants-tbl thead,.cust-tbl thead,.docs-tbl thead{display:none}
  .tenants-tbl,.tenants-tbl tbody,.tenants-tbl tr,.tenants-tbl td,
  .cust-tbl,.cust-tbl tbody,.cust-tbl tr,.cust-tbl td,
  .docs-tbl,.docs-tbl tbody,.docs-tbl tr,.docs-tbl td{display:block;width:100%}
  .tenants-tbl tr,.cust-tbl tr,.docs-tbl tr{border-bottom:6px solid #eef2f1;padding:4px 0 2px}
  .tenants-tbl td,.cust-tbl td,.docs-tbl td{border:none;padding:5px 16px;text-align:right}
  .tenants-tbl td:first-child,.cust-tbl td:first-child,.docs-tbl td:first-child{padding-top:14px}
  /* בטבלת מסמכים מספר המסמך הוא המזהה שסורקים אליו — מודגש */
  .docs-tbl td:first-child{font-weight:700}
  .tenants-tbl td.actions,.cust-tbl td.actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;
    white-space:normal;padding:12px 16px 16px}
  .tenants-tbl td.actions .btn,.cust-tbl td.actions .btn{flex:0 0 auto;min-height:44px;
    display:inline-flex;align-items:center}
  /* פעולות מסמך בנייד: כפתורים עם תווית שנשברים לשורות, גדולים מספיק לאצבע */
  .docs-tbl td.rowact{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;
    white-space:normal;padding:10px 16px 14px}
  .docs-tbl td.rowact .ract{margin-inline-start:0;min-height:40px;font-size:.86rem;padding:0 12px}
}

/* ===== שורת פרטי תשלום בטופס מסמך — בנייד כל שדה בשורה משלו (אמצעי/סכום/תאריך) ===== */
@media(max-width:640px){
  .pay-row>div{grid-template-columns:1fr!important}
  .pay-row .pay-bank,.pay-row .pay-card{grid-template-columns:1fr 1fr!important}
  .pay-row button[title="מחק שורה"]{width:100%;min-height:44px}
}

/* ===== נייד: העמוד לא זז הצידה (דיווח יוליה 05/08, אפליקציית אנדרואיד) =====
   הגדלת גופן במערכת של הטלפון מנפחת שורות nowrap (כמו ע"מ + תיק מ"ה בכותרת
   הלקוח) מעבר לרוחב המסך והעמוד כולו נגרר. שתי הגנות: שורת המספרים נשברת
   לשורות, וכל גלישה אופקית שיורית נחסמת ברמת העמוד. */
@media(max-width:640px){
  .tenant-name{min-width:0}
  .tenant-name .tsel-ids{white-space:normal;line-height:1.3}
  html,body{overflow-x:clip}
  /* בורר לפני/כולל מע"מ: בנייד כל אפשרות בשורה שלמה, והרדיו נשאר צמוד לתחילת הטקסט */
  #priceMode{flex-direction:column;gap:10px}
  #priceMode label{align-items:flex-start}
  #priceMode label input{margin-top:3px!important}
  /* בעמודה — ההפרדה של "ללא מע"מ" עוברת מקו צד לקו עליון */
  #priceMode .pm-zero{border-inline-start:0;padding-inline-start:0;width:100%;
    border-top:1px dashed #CBDDD0;padding-top:10px}
  /* שלבי הטופס: ריפוד צר בנייד, וכותרת שלב שנשברת יפה */
  .fsec{padding:14px 16px 18px}
  .fhead{flex-wrap:wrap}
  .whrow>div:first-child input{max-width:none}
}

/* ===== fintbl: קו עיצובי אחיד לטבלאות נתונים פיננסיים (books_cards_index, 10/08/2026) =====
   zebra דרך class="alt" (loop.index בתבנית) — עמיד גם כששורת הכותרת בתוך אותה טבלה
   וגם אחרי סינון JS. מסך בלבד: תבניות PDF נטענות עם print_base בלי הקובץ הזה. */
.finwrap{max-width:920px;margin:0 auto}
table.fintbl{border-collapse:collapse;width:100%;font-size:.92rem}
.fintbl th,.fintbl td{padding:9px 10px;border-bottom:1px solid #eee;text-align:right}
.fintbl th{font-weight:700;background:#f9f9f9}
.fintbl tr.alt td{background:#f7f7f7}
.fintbl tr.frow td{transition:background .12s}
.fintbl tr.frow:hover td{background:#eaf2fb}
.fintbl tr.frow.clk{cursor:pointer}
.fintbl a{color:#1668c4;text-decoration:none}
.fintbl a:hover{text-decoration:underline}
.fintbl span.amt{font-weight:600;direction:ltr;unicode-bidi:isolate;display:inline-block}
.fintbl .neg{color:#d32f2f}
.fintbl td.amtcell{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fintbl .go{color:#9db4cc;margin-inline-start:8px;font-weight:700}
.fintbl tr.frow:hover .go{color:#1668c4}
/* zeb: זברה אוטומטית ב-nth-child — לטבלאות שממוינות ב-JS (השורות מוחלפות בסדרן,
   class קבוע היה מתערבב). לא לשימוש עם סינון display:none — שם משתמשים ב-alt. */
.fintbl.zeb tr:nth-child(even) td{background:#f7f7f7}
.fintbl.zeb tr.frow:hover td{background:#eaf2fb}
/* רו"ה במסך: הובר על שורות נתונים + שליליים באדום. ה-PDF מקבל את אותם
   כללים מהבלוק שבתבנית (print_base לא טוען את style.css). הזברה לשורות
   הנתונים מוגדרת בתבנית והובר גובר עליה בספציפיות. */
.pnl-grid tbody tr:not(.pnl-sec):not(.pnl-sub):not(.pnl-gross):not(.pnl-profit):hover td{background:#eaf2fb}
.pnl-grid .neg{color:#d32f2f}
/* על הרקע הכהה של שורת הרווח אדום לא קריא — לבן מלא */
.pnl-profit .neg{color:#fff}

/* ===== בורר עם חיפוש — טופס מסמך (משוב עדי סלומון 10/08/2026) =====
   ה-select המקורי מוסתר אך נשאר בטופס; שדה combo-in מסנן ופאנל combo-pan
   מציג את התוצאות. ההסתרה בלי display:none כדי שהטופס ימשיך לכלול אותו. */
.combo{position:relative;flex:1;min-width:0}
.combo select.combo-hidden{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;margin:0;padding:0;border:0}
.combo-pan{position:absolute;top:calc(100% + 4px);right:0;left:0;background:#fff;
  border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 26px rgba(11,46,30,.16);
  max-height:264px;overflow:auto;z-index:40}
.combo-it{padding:11px 14px;cursor:pointer;font-size:.95rem}
.combo-it:hover{background:#F1F7F3}
.combo-it.sel{background:#EAF3ED;font-weight:600}
.combo-it.newopt{color:var(--brand);font-weight:600;border-top:1px dashed var(--line)}
.combo-empty{padding:12px 14px;color:var(--soft);font-size:.88rem}

/* שורת טיוטה ברשימת המסמכים — עמומה ומובחנת: טיוטה אינה מסמך ואינה בספרים */
.fintbl tr.frow.isdraft td{background:#FAFAF8;color:#8a8f8c;font-style:italic}
.fintbl tr.frow.isdraft:hover td{background:#F2F4F1}
.fintbl tr.frow.isdraft .amt.draftamt{color:#9aa09c;font-weight:500}
.fintbl tr.frow.isdraft .badge{font-style:normal}
/* הזמנת עבודה / חשבונית עסקה: פתוחה (זהב) מול סגורה (ירוק) — גם במיובאות (קלי בן ציון 14/10/2026) */
.fintbl tr.frow.ord-open td{background:#FFF7E3}
.fintbl tr.frow.ord-open:hover td{background:#FBEFCF}
.fintbl tr.frow.ord-closed td{background:#EFF7F1}
.fintbl tr.frow.ord-closed:hover td{background:#E2F0E6}

/* ===== תור ההקלדה — "חשבוניות להקלדה" (עיצוב מחדש 14/08/2026) =====
   הקודם בזבז ~230px מגובה המסך על כותרת, שלושה כרטיסי-מצב בגובה 90px ושורת
   כפתורי סינון — כך שרק 3–4 שורות נתונים נראו בלי גלילה. כאן כל הבקרות
   יושבות בפס אחד דחוס, והשורות עצמן חד-שורתיות וצפופות. הנתון הכספי הוא
   הדבר הכבד בעין; הפעולות שקטות עד ריחוף על השורה. */
body.pg-queue .container,body.pg-dense .container{padding:18px 26px 64px}
body.pg-queue h1,body.pg-dense h1{margin:0}

.qbar{display:flex;flex-direction:column;gap:8px;padding-bottom:10px;margin-bottom:12px;
  border-bottom:1px solid var(--line)}
.qrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.qh1{font-size:1.32rem;font-weight:800;letter-spacing:-.01em;color:var(--ink)}
/* ה-KPI צמוד לכותרת ולא בכרטיס נפרד — "כמה ממתין ובאיזה סכום" הוא שורת
   מצב, לא מדד שצריך משטח משלו. */
.qkpi{display:inline-flex;align-items:center;gap:7px;font-size:.9rem;color:var(--muted);
  background:#F4F8F5;border:1px solid var(--line);border-radius:999px;padding:3px 12px}
.qkpi b{font-size:1.02rem;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums}
.qkpi .qsum{direction:ltr;font-variant-numeric:tabular-nums;font-weight:700;color:var(--ink)}
.qbar-end{margin-inline-start:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* בקרת מצב תצוגה — שלושה כרטיסים הפכו לבורר אחד. שם הלקוח הנוכחי לא אבד:
   הוא מופיע בכותרת העליונה, בכרטיס הקבוצה ובחלונית ההסבר של המקטע. */
.qseg{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;
  background:#F7FAF8}
.qseg a{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;font-size:.9rem;
  font-weight:600;color:var(--muted);border-inline-start:1px solid var(--line);white-space:nowrap}
.qseg a:first-child{border-inline-start:0}
.qseg a:hover{background:#EEF4F0;color:var(--ink);text-decoration:none}
.qseg a.on{background:var(--brand);color:#fff}
.qseg svg.ic{width:16px;height:16px;flex:0 0 16px}
.qseg .sn{font-size:.84rem;font-weight:800;font-variant-numeric:tabular-nums;
  background:rgba(11,46,30,.09);border-radius:999px;padding:1px 7px;min-width:22px;text-align:center}
.qseg a.on .sn{background:rgba(255,255,255,.22);color:#fff}
.qseg a.off{opacity:.5}

/* סינון קבוצה (מורשה/פטור) — היו כפתורים בגובה 47px, עכשיו תגיות סינון */
.chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border:1px solid var(--line);
  border-radius:999px;font-size:.86rem;font-weight:600;color:var(--muted);background:#fff}
.chip:hover{border-color:var(--brand-2);color:var(--ink);text-decoration:none}
.chip.on{background:#EAF3ED;border-color:var(--brand);color:var(--brand)}
.chip .cn{font-variant-numeric:tabular-nums;font-weight:700;color:var(--soft)}
.chip.on .cn{color:var(--brand)}
.qbar input[type=search],.qbar select{width:auto;min-height:0;padding:6px 11px;font-size:.88rem;
  border-radius:9px}
.qbar select{padding-inline-start:28px;background-size:13px}
.qbar .qlbl{font-size:.84rem;color:var(--soft)}
/* כפתור קטן — לפעולות שאינן ראשיות בפס ובכותרות הקבוצות */
.btn.sm{padding:6px 14px;min-height:0;font-size:.88rem;border-radius:9px}
.btn.sm svg.ic{width:16px;height:16px;flex:0 0 16px}

/* כרטיס לקוח: הפס הירוק נשאר (זיהוי הלקוח הוא ההגנה מפני סיווג לתיק הלא
   נכון) אבל דק, בלי 28px ריפוד, והטבלה צמודה לכותרת — כך רואים שהשורות
   שייכות ללקוח שמעליהן ולא כאזור נפרד. */
.qgrp{border:1px solid var(--line);border-inline-start:4px solid var(--brand);
  border-radius:12px;overflow:hidden;margin-bottom:12px;background:var(--card)}
.qgrp-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:7px 12px;
  background:#F4F8F5;border-bottom:1px solid var(--line)}
.qgrp-nm{margin:0;font-size:1.06rem;font-weight:800;letter-spacing:-.01em;color:var(--brand)}
.qgrp-id{font-size:.82rem;color:var(--soft);direction:ltr}
.qgrp-h .badge{font-size:.74rem;padding:2px 9px}
.qgrp-h .qgrp-n{font-size:.84rem;color:var(--muted);font-variant-numeric:tabular-nums}

/* יישור זהה בכל כרטיסי הלקוחות: בלי רוחב קבוע כל טבלה מדדה את עצמה
   לפי התוכן שלה, והעין איבדה את הטור בין לקוח ללקוח. */
.qtbl.ent{table-layout:fixed}
.qtbl.ent th:nth-child(1){width:78px}
.qtbl.ent th:nth-child(2){width:92px}
.qtbl.ent th:nth-child(3){width:156px}
.qtbl.ent th:nth-child(4){width:162px}
/* גם לעמודת הספק רוחב נקוב: בלעדיו היא בולעת את כל עודף הרוחב של המסך
   ונפער בור ריק בינה לבין התאריך. כשלכל העמודות יש רוחב, העודף מתחלק
   ביניהן יחסית והמעבר ספק→תאריך נשאר רציף. */
.qtbl.ent th:nth-child(5){width:230px}
.qtbl.ent th:nth-child(6),.qtbl.ent th:nth-child(7){width:96px}
.qtbl.ent th:nth-child(8){width:118px}
.qtbl.ent th:nth-child(9){width:102px}
.qtbl.ent th:nth-child(10){width:108px}
.qtbl.ent td{overflow:hidden;text-overflow:ellipsis}
/* תא הסטטוס נושא סמלים ולא טקסט — קטיעה שם הסתירה דגל חריגה */
.qtbl.ent td.q-st{overflow:visible;text-overflow:clip}

/* טבלת ההקלדה — שורה = שורה אחת. סדר הקריאה מימין לשמאל הוא סדר העבודה:
   סטטוס ← אסמכתא ← מס' חשבונית ← סוג ← ספק ← תאריכים ← סכום ומע"מ ← פעולה. */
table.qtbl{width:100%;border-collapse:collapse;font-size:.95rem}
.qtbl th,.qtbl td{padding:8px 14px;border-bottom:1px solid #EDF2EF;text-align:right;
  vertical-align:middle;font-size:inherit;line-height:1.45;unicode-bidi:plaintext}
/* אוויר בקצוות הכרטיס: העמודה הראשונה לא נצמדת לפס הירוק שבקצה */
.qtbl th:first-child,.qtbl td:first-child{padding-inline-start:16px}
.qtbl th:last-child,.qtbl td:last-child{padding-inline-end:16px}
.qtbl th{background:#FBFDFC;color:var(--soft);font-size:.8rem;font-weight:700;
  letter-spacing:.02em;white-space:nowrap;border-bottom:1px solid var(--line)}
.qtbl tbody tr:last-child td{border-bottom:0}
/* ריחוף: אפור בהיר ונייטרלי — מגדיר את השורה הפעילה בלי להתחרות
   בצבעי המותג ובלי לצבוע את הסכומים (אלה, 14/08/2026). */
.qtbl tbody tr:hover td{background:#F5F6F6}
/* מסמך שנשלח לשאלה ללקוח: כל השורה בכחלחל של חיווי המעטפה — סימון בתא
   הראשון לבדו לא נקלט בסריקת התור (אלה, 16/08/2026). */
.qtbl tbody tr.q-asked td{background:#EEF4FA}
.qtbl tbody tr.q-asked:hover td{background:#E3EDF8}
.qtbl td{font-weight:500;color:var(--ink)}
.qtbl .num{direction:ltr;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.qtbl .q-inv{font-weight:700}
.qtbl .q-ref{color:var(--soft);font-size:.87rem}
.qtbl .q-sup{font-weight:600;max-width:28ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qtbl .q-dt{direction:ltr;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;
  font-size:.91rem}
.qtbl .q-dt.sub{color:var(--soft);font-size:.85rem}
/* הסכום הוא הכובד היחיד בשורה */
.qtbl .q-amt{direction:ltr;unicode-bidi:isolate;text-align:right;font-variant-numeric:tabular-nums;
  font-weight:700;font-size:1.04rem;white-space:nowrap}
.qtbl .q-vat{direction:ltr;unicode-bidi:isolate;text-align:right;font-variant-numeric:tabular-nums;
  font-weight:500;color:var(--muted);white-space:nowrap}
.qtbl tfoot td{background:#FAFCFB;border-top:1px solid var(--line);border-bottom:0;
  font-size:.88rem;color:var(--muted)}
.qtbl tfoot .q-amt,.qtbl tfoot .q-vat{color:var(--ink);font-weight:700}
/* סטטוס: נקודה במקום תגית — התור כולו "ממתין", ולכן מה שצריך לבלוט הוא
   דגלי החריגה (חסר ח.פ ספק / סכום נעול / חסר מס' חשבונית), לא המובן מאליו. */
.qtbl td.q-st{width:1%;white-space:nowrap;padding-inline-end:4px}
.qdot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#D9A106;
  box-shadow:0 0 0 3px rgba(217,161,6,.16);vertical-align:middle}
.qflag{display:inline-flex;align-items:center;color:var(--warn);margin-inline-start:6px;
  vertical-align:middle}
.qflag svg.ic{width:15px;height:15px;flex:0 0 15px;stroke-width:1.9}
/* עטיפת flex לתא הסטטוס: הנקודה תמיד ראשונה (בקצה הימני) והדגלים אחריה —
   בלי זה סדר הסימנים השתנה בין שורות עם/בלי דגל והעמודה נראתה עקומה (אלה, 18/08). */
.q-stw{display:inline-flex;align-items:center;gap:6px;vertical-align:middle}
.q-stw .qflag{margin-inline-start:0}
.qtag{display:inline-block;padding:1px 8px;border-radius:7px;font-size:.75rem;font-weight:600;
  background:#F1F5F3;color:var(--soft);border:1px solid var(--line);white-space:nowrap}
.qtag.novat{background:#FBF4E4;color:var(--warn);border-color:#EEDFBE}
.qtag.manual{background:#EEF3F8;color:#3B5A78;border-color:#DAE4EE}
/* הקצאה = עובדה מהמסמך, ולכן היא התגית היחידה בצבע המותג */
.qtag.alloc{background:#EAF3ED;color:var(--brand);border-color:#CFE3D6}
.qtag.vat{background:#F1F5F3;color:var(--muted);border-color:var(--line)}
/* פעולת שורה: בלי מסגרת עד ריחוף — כדי שלא תתחרה בסכומים. התווית נשארת
   גלויה בכוונה (סמל בלבד כבר נכשל פעם במסכים אחרים). */
.qtbl td.q-act{width:1%;white-space:nowrap;text-align:left;padding-inline-start:4px}
.qbtn{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:8px;
  border:1px solid transparent;background:transparent;color:var(--soft);
  font-size:.86rem;font-weight:600;line-height:1;
  transition:background .12s ease,color .12s ease,border-color .12s ease}
.qbtn svg.ic{width:15px;height:15px;flex:0 0 15px}
/* על שורה פעילה הכפתור לובש גוון מותג רך — "מוכן ללחיצה", אך עדיין
   שקט מהסכומים; ריחוף ישיר עליו מעמיק את הגוון */
.qtbl tbody tr:hover .qbtn{background:#EAF3ED;color:var(--brand);border-color:#CFE3D6}
.qbtn:hover{background:#DCEBE1;color:var(--brand);border-color:#BFD9C9;text-decoration:none}
/* הסבר ארוך שנחוץ אך אינו נקרא כל יום — מקופל, כדי שלא יגזול חצי מסך */
.qnote{border:1px solid #F0E2C4;background:#FDF6E7;border-radius:10px;padding:8px 14px;
  font-size:.88rem;color:var(--warn);margin-bottom:12px}
.qnote>summary{cursor:pointer;font-weight:600;list-style:none}
.qnote>summary::-webkit-details-marker{display:none}
.qnote>summary::before{content:'\25B8  ';font-weight:700}
.qnote[open]>summary::before{content:'\25BE  '}
.qnote p{margin:8px 0 0;line-height:1.55}
.qempty{border:1px dashed var(--line);border-radius:12px;padding:18px;color:var(--muted);
  font-size:.95rem;text-align:center}
@media(max-width:700px){
  body.pg-queue .container,body.pg-dense .container{padding:14px 12px 84px}
  .qh1{font-size:1.12rem}
  /* בנייד שלושת המקטעים לא נכנסים בשורה אחת — גריד של שליש-שליש-שליש,
     בלי אייקון, כדי שהעמוד עצמו לא ייגלל לרוחב. */
  .qseg{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
  .qseg a{justify-content:center;padding:7px 6px;font-size:.8rem;text-align:center;min-width:0}
  .qseg a svg.ic{display:none}
  .qseg a>span:not(.sn){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .qbar-end{margin-inline-start:0}
  .qbar input[type=search]{flex:1;min-width:0}
  .qbar select{max-width:52vw}
  .qtbl.ent{min-width:760px}
}

/* ===== מסך על — ספרים: אותה שפה, טבלה של סכומים (14/08/2026) ===== */
/* שורת-משנה בתוך תא: שם העוסק בשורה אחת והפרטים מתחתיו קטן ואפור,
   בלי להפוך את השורה לשתי קומות מרווחות. */
.qsub{display:block;font-size:.76rem;color:var(--soft);font-weight:400;line-height:1.35}
.qsub.inline{display:inline;font-size:.74rem;margin-inline-start:4px}
.qtbl th .qsub{display:inline;font-weight:400}
.qtbl.ovw th:nth-child(2){width:82px}
.qtbl.ovw th:nth-child(3){width:96px}
.qtbl.ovw th:nth-child(4),.qtbl.ovw th:nth-child(5),.qtbl.ovw th:nth-child(6){width:132px}
.qtbl.ovw th:nth-child(7){width:128px}
.qtbl.ovw td.q-sup{max-width:none}
/* חוב למע"מ — הנתון היחיד שנצבע, כי הוא היחיד שדורש פעולה */
.qtbl .q-amt.due{color:var(--err)}
.qbtn.cnt b{font-size:.98rem;font-weight:800;color:var(--ink)}
.qfoot{margin:8px 2px 0;font-size:.78rem;color:var(--soft);line-height:1.5}

/* ===== כרטיס המסמך: יישור עשרוני של הסכומים (14/08/2026) =====
   ‎td.amt‎ הגלובלי מיושר לשמאל, ולכן 10.00 ו-1.80 מתחילים באותו מקום
   והנקודה העשרונית יוצאת במקומות שונים. בכסף משווים טורים, ולכן כאן
   היישור הוא לימין בתוך בידוד LTR — כל הספרות האחרונות בקו אחד. */
table.doc-lines td.amt,table.doc-lines th.amt{direction:ltr;unicode-bidi:isolate;
  text-align:right;font-variant-numeric:tabular-nums}
table.doc-lines td.qty,table.doc-lines th.qty{text-align:center;font-variant-numeric:tabular-nums}
/* סיכום המסמך יושב ב-tfoot של אותה טבלה, כדי שהסכומים ייפלו בדיוק מתחת
   לעמודת סה"כ של השורות (אלה, 17/09/2026). סימן המטבע בעמודה צרה משלו —
   אחרת הוא נכנס לתא הסכום ודוחף את הספרות מהטור. */
table.doc-lines td.cur,table.doc-lines th.cur{width:1%;white-space:nowrap;
  text-align:left;padding-inline-start:4px;padding-inline-end:0;
  color:var(--soft);font-weight:500}
/* עמודת התיאור בולעת את כל הרוחב העודף. בלי זה מנוע הטבלה מחלק את העודף
   לעמודה האחרונה — וסימן השקל נזרק לקצה השמאלי, רחוק מהמספר שהוא שייך לו
   (אלה, 17/09/2026). כך כל עמודות הכסף נשארות צמודות זו לזו. */
table.doc-lines td:first-child,table.doc-lines th:first-child{width:100%}
/* מלבן הסיכום — אותו מראה שהיה בכרטיס הנפרד (רקע אפור בהיר, פינות
   מעוגלות, מפרידים דקים), רק שעכשיו הוא tfoot של אותה טבלה ולכן הסכומים
   נשארים מתחת לעמודת סה"כ (אלה, 17/09/2026: "היה מלבן יפה בתוך המלבן").
   border-collapse:separate נדרש כדי שפינות מעוגלות ייראו בכלל; הגבולות
   בטבלה הם border-bottom בלבד, ולכן אין הכפלה ושורות המסמך לא משתנות. */
table.doc-lines{border-collapse:separate;border-spacing:0}
table.doc-lines tfoot tr.sp td{height:14px;padding:0;border:0;background:transparent}
table.doc-lines tfoot tr.t td{background:#f8fafa;border-bottom:1px solid #E0EAE2;
  padding:12px 14px;font-variant-numeric:tabular-nums}
table.doc-lines tfoot tr.t td.tl{text-align:right;font-weight:500;color:var(--muted)}
table.doc-lines tfoot tr.t td:first-child{border-inline-start:1px solid var(--line-2)}
table.doc-lines tfoot tr.t td:last-child{border-inline-end:1px solid var(--line-2)}
table.doc-lines tfoot tr.t1 td{border-top:1px solid var(--line-2)}
table.doc-lines tfoot tr.t1 td:first-child{border-start-start-radius:12px}
table.doc-lines tfoot tr.t1 td:last-child{border-start-end-radius:12px}
table.doc-lines tfoot tr.tlast td{border-bottom:1px solid var(--line-2)}
table.doc-lines tfoot tr.tlast td:first-child{border-end-start-radius:12px}
table.doc-lines tfoot tr.tlast td:last-child{border-end-end-radius:12px}

/* ===== נייד: כרטיסי מסמכי הכנסות (בהשראת פינבוט, אלה 07/09/2026) =====
   בדסקטופ הכרטיסים מוסתרים והטבלה נשארת; בנייד (≤700px) הטבלה מוסתרת
   (:has — נתמך iOS 15.4+; בדפדפן ישן שתי התצוגות יוצגו, לא נשבר כלום). */
.doc-cards{display:none}
@media(max-width:700px){
  .card:has(>.docs-tbl){display:none}
  .doc-cards{display:flex;flex-direction:column;gap:10px}
  .dcard{background:#F5F7F6;border:1px solid var(--line);border-radius:16px;overflow:hidden}
  .dcard.isdraft{opacity:.78}
  .dc-main{display:flex;align-items:stretch;padding:10px 14px 2px;cursor:pointer;gap:10px;line-height:1.35}
  .dc-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
  .dc-head{display:flex;align-items:baseline;gap:8px;color:var(--brand);font-weight:700;font-size:1rem;line-height:1.3}
  .dc-head .dc-type{flex:0 1 auto;min-width:0}
  .dc-head .dc-num{flex:none;padding-inline-start:10px;border-inline-start:1px solid var(--line);
    display:inline-flex;align-items:center;gap:4px}
  .dc-head .dc-num svg.ic{width:16px;height:16px;flex:none}
  .dc-head .dc-num{color:var(--soft);font-weight:500;font-variant-numeric:tabular-nums}
  .dc-head .dc-num .dc-n{direction:ltr;unicode-bidi:isolate}
  .dc-cust{font-size:.96rem;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dc-foot{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-top:0}
  .dc-date{font-size:.86rem;color:var(--muted);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
  .dc-amt{font-size:1.2rem;font-weight:800;color:var(--ink);letter-spacing:-.01em;white-space:nowrap;
    direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}
  .dc-amt.neg{color:var(--err)}
  .dc-amt.draftamt{color:var(--muted);font-weight:600}
  .dc-side{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;
    padding-inline-start:10px;border-inline-start:1px solid var(--line);min-width:60px}
  .dc-status{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;color:var(--muted);white-space:nowrap}
  .dc-dot{width:9px;height:9px;border-radius:50%;background:#9aa8b0;display:inline-block}
  .dc-status.closed .dc-dot{background:#22A55A}
  .dc-status.open .dc-dot{background:var(--gold)}
  .dc-status.draft .dc-dot{background:#E0A800}
  .dc-status.cancelled .dc-dot{background:var(--err)}
  .dc-status.reversal .dc-dot{background:#9aa8b0}
  .dc-pdf{display:flex;width:44px;height:44px;align-items:center;justify-content:center;border-radius:10px}
  .dc-pdf:active{background:#E6EEE9}
  .dc-pdf svg{width:34px;height:34px}
  .dc-edit{flex-direction:column;gap:0;height:auto;padding:2px 0}
  .dc-edit span{font-size:.72rem;color:#8a6100;line-height:1;margin-top:-4px}
  .dc-more>summary{list-style:none;display:flex;justify-content:center;padding:0 0 4px;cursor:pointer;color:var(--soft)}
  .dc-more>summary::-webkit-details-marker{display:none}
  .dc-more>summary svg{width:18px;height:18px;transition:transform .18s}
  .dc-more[open]>summary svg{transform:rotate(180deg)}
  .dc-detail{padding:4px 16px 16px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:10px;background:#fff}
  .dc-kv{display:flex;align-items:center;gap:10px;padding-top:10px;font-size:.9rem}
  /* פעולות: רשת של שתי עמודות בגובה אחיד; פריט אחרון בודד נמתח לכל הרוחב (אלה 07/09: "לא מסודרים יפה") */
  .dc-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;white-space:normal}
  .dc-actions>*{min-width:0}
  .dc-actions>*:last-child:nth-child(odd){grid-column:1/-1}
  /* הביטול (טופס) תמיד ברוחב מלא — בחשבונית מס/קבלה יש רק PDF+ביטול והתווית נחתכה (אלה 07/09);
     PDF שנשאר לבד בשורה גם הוא ברוחב מלא */
  .dc-actions>form{grid-column:1/-1}
  .dc-actions>.a-pdf:first-child:nth-last-child(2){grid-column:1/-1}
  .dc-actions form{display:block}
  .dc-actions .ract{margin-inline-start:0;width:100%;min-height:44px;font-size:.92rem;padding:0 10px;border-radius:10px;
    background:#fff;border:1px solid var(--line);color:var(--ink);font-weight:600}
  .dc-actions .ract svg.ic{color:var(--soft)}
  .dc-actions .ract.a-rec,.dc-actions .ract.a-conv{background:var(--brand);border-color:var(--brand);color:#fff}
  .dc-actions .ract.a-rec svg.ic,.dc-actions .ract.a-conv svg.ic{color:#fff}
  .dc-actions .ract.done{background:#fff;border-color:var(--line);color:var(--brand);font-weight:600}
  /* אדום רך בטון אחד מ---err (אלה 07/09: "טון אחד פחות"); לבן עליו 4.7:1 */
  .dc-actions .ract.a-cancel{background:#C74848;border-color:#C74848;color:#fff;font-weight:600}
  .dc-actions>.badge{justify-self:start;align-self:center}
  .dc-kv{flex-wrap:wrap}
  .dc-due{margin-inline-start:auto;color:var(--muted)}
  .dc-due b{color:var(--ink);font-variant-numeric:tabular-nums}
  /* שליחת העתק — שני כפתורים שווים, וואטסאפ ירוק ומייל כחול, על רקע עדין משלהם */
  .dc-send{padding:0}
  .dc-send-lbl{display:block;font-size:.8rem;color:var(--muted);margin-bottom:6px}
  .dc-send-btns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .dc-send-btns form{display:block;margin:0}
  .dc-sbtn{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:44px;
    border-radius:10px;font-family:inherit;font-size:.95rem;font-weight:600;cursor:pointer;text-decoration:none;
    border:1px solid transparent}
  .dc-sbtn svg{width:20px;height:20px;flex:none}
  .dc-sbtn{background:#fff;border-color:var(--line);color:var(--ink)}
  .dc-sbtn svg{color:var(--brand)}
  .dc-sbtn:active{background:#EEF4F0}
  .dc-open{display:flex;align-items:center;justify-content:center;min-height:40px;
    color:var(--brand);font-weight:600;font-size:.95rem}
  .dc-more>summary:focus{outline:none}
  .dc-more>summary:focus-visible{outline:2px solid var(--brand-2);outline-offset:-2px;border-radius:8px}
}

/* ===== דסקטופ: עמודת הפעולות במסמכי הכנסות — עמודות קבועות (אלה 07/09: "הפעולות לא מסודר")
   PDF תמיד ראשון מימין, אחריו הפעולה העיקרית (קבלה/המרה), אחריה תג מצב, ובסוף ביטול —
   כך אותו כפתור יושב באותו מקום בכל השורות. בנייד הטבלה מוסתרת (יש כרטיסים). */
@media(min-width:701px){
  .docs-tbl td.rowact{display:grid;direction:rtl;align-items:center;gap:6px;
    grid-template-columns:[pdf] 68px [act] minmax(122px,max-content) [done] auto [cancel] 74px;
    justify-content:start;white-space:nowrap}
  .docs-tbl td.rowact .ract{margin-inline-start:0}
  .docs-tbl td.rowact .a-pdf{grid-column:pdf}
  .docs-tbl td.rowact .a-rec,.docs-tbl td.rowact .a-conv{grid-column:act}
  .docs-tbl td.rowact .done{grid-column:done}
  .docs-tbl td.rowact form,.docs-tbl td.rowact>.badge{grid-column:cancel}
  .docs-tbl td.rowact form .ract{width:100%}
  /* תא בתצוגת grid אינו תא-טבלה, ולכן רקע השורה המסורגת/הריחוף חייב לשבת על ה-tr */
  .docs-tbl tr.alt{background:#f7f7f7}
  .docs-tbl tr.frow:hover{background:#eaf2fb}
  .docs-tbl tr.frow.isdraft{background:#FAFAF8}
  .docs-tbl tr.frow.isdraft:hover{background:#F2F4F1}
  .docs-tbl tr.frow.ord-open{background:#FFF7E3}
  .docs-tbl tr.frow.ord-open:hover{background:#FBEFCF}
  .docs-tbl tr.frow.ord-closed{background:#EFF7F1}
  .docs-tbl tr.frow.ord-closed:hover{background:#E2F0E6}
}

/* ===== נייד: בורר סוג מסמך במקום צ'יפים (אלה 07/09) ===== */
.doc-typesel{display:none}
@media(max-width:700px){
  .doc-typesel{display:block;margin-bottom:12px}
  .doc-typesel label{display:block;font-size:.95rem;color:var(--muted);margin-bottom:6px}
  .doc-typesel select{width:100%;font-size:1.05rem;padding:12px 14px;border:1px solid var(--line);
    border-radius:12px;background:#fff;color:var(--ink)}
  .doc-typesel+div>a.btn{display:none}
  .doc-typesel+div form{margin-inline-start:0;width:100%}
  .doc-typesel+div form input[type=search]{flex:1 1 auto;min-width:0}
}

/* ===== נייד: כותרת עליונה קומפקטית בסגנון פינבוט (אלה 07/09: "לסדר את השם למעלה") =====
   שם העוסק בגלולה מרכזית בשורה אחת, מספר הזיהוי קטן מתחתיו; כפתור "יציאה"
   מוסתר כאן כי הוא קיים בתפריט הצד. במחשב אין שינוי. */
@media(max-width:600px){
  .topbar{padding:8px 12px;gap:8px;min-height:60px}
  .tenant-switch{flex:1 1 auto;min-width:0;display:flex;justify-content:center;margin-inline-end:0}
  .tenant-switch .tenant-name{display:block;max-width:100%;min-width:0;text-align:center;
    font-size:1.02rem;font-weight:700;line-height:1.2;padding:6px 16px;border-radius:999px;
    background:#F1F5F3;border:1px solid var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tenant-switch .tenant-name .tsel-ids{font-size:.76rem;font-weight:500;line-height:1.2;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis}
  .tenant-switch .tenant-name .dbl-badge{vertical-align:middle}
  .tenant-switch .tsel-btn{max-width:100%;padding:6px 12px;border-radius:999px}
  .tenant-switch .tsel-cur{font-size:1.02rem}
  .tenant-switch .tsel-ids{font-size:.76rem}
  .topbar .logout-top{display:none}
}

/* ===== נייד: הבלוק העליון של מסמכי הכנסות דביק מתחת לכותרת (אלה 07/09) ===== */
@media(max-width:700px){
  .docs-sticky{position:sticky;top:60px;z-index:15;background:var(--bg);
    margin:-22px -16px 12px;padding:14px 16px 6px;border-bottom:1px solid var(--line);
    box-shadow:0 6px 14px -10px rgba(11,46,30,.25)}
  .docs-sticky .toolbar{margin-bottom:10px}
  .docs-sticky .doc-typesel{margin-bottom:8px}
  .docs-sticky .doc-typesel label{margin-bottom:4px}
  .docs-sticky .doc-typesel select{padding:9px 12px}
  .docs-sticky>div:last-of-type{margin-bottom:4px!important}
}

/* ===== דוחות בנייד — סידור בסגנון פינבוט (30/09/2026) =====
   רשימת דוחות (reports_hub.html): שורות לחיצה גדולות, קבוצה "ספרים" ואז "דוחות".
   בדוח עצמו בנייד: פירור ניווט "דוחות › שם הדוח", בורר תקופה דחוס בשתי שורות,
   וכפתורי הייצוא/הדפסה עוברים לשורת עיגולים בתחתית הדוח — כך שהמספר המרכזי
   נראה מיד אחרי בורר התקופה. במחשב ובהדפסה — ללא שינוי. */
.hub{max-width:640px;margin:0 auto}
.hub-h1{margin-bottom:.4em}
.hub-grp{font-size:.84rem;color:var(--muted);font-weight:700;margin:20px 6px 8px;letter-spacing:.02em}
.hub-list{display:flex;flex-direction:column;gap:8px}
.hub-list a{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);
  border-radius:14px;padding:15px 18px;color:var(--ink);font-weight:600;font-size:1.05rem;
  text-decoration:none;min-height:56px}
.hub-list a svg.ic{width:22px;height:22px;flex:0 0 22px;color:var(--brand)}
.hub-list a span{flex:1;min-width:0}
.hub-list a i{font-style:normal;color:#9db4cc;font-weight:700;font-size:1.2rem}
.hub-list a:hover{background:#f2f7f4;border-color:#cfe0d5;text-decoration:none}
.bottomnav a.active{color:var(--brand)}
.rpt-crumb,.rpt-actions,.adv-m{display:none}
@media(max-width:700px){
  .rpt-crumb{display:block;font-size:.86rem;color:var(--muted);margin:-8px 0 10px}
  .rpt-crumb a{color:var(--brand);font-weight:600}
  .rpt-crumb b{color:var(--ink);font-weight:700}
  .toolbar.rpt-tb{flex-direction:column;align-items:stretch;gap:8px;margin-bottom:10px}
  .toolbar.rpt-tb h1{font-size:1.3rem;margin:0}
  .toolbar.rpt-tb>div{width:100%}
  /* בורר תקופה (_period_picker): תווית ובורר בכל שורה, הבורר ממלא את הרוחב */
  .rpt-ctl{display:grid!important;grid-template-columns:auto 1fr;gap:8px 10px;align-items:center;width:100%}
  .rpt-ctl select{width:100%!important;min-width:0!important;font-size:1rem;padding:10px}
  .rpt-ctl label{font-size:.86rem!important}
  /* מה שעובר לתחתית הדוח */
  .rpt-tb .rpt-hide-m{display:none!important}
  .rpt-actions{display:flex;justify-content:center;gap:18px;margin:16px 0 4px;flex-wrap:wrap}
  .rpt-actions a,.rpt-actions button{display:inline-flex;flex-direction:column;align-items:center;gap:5px;
    color:var(--ink);font-size:.76rem;font-weight:600;text-decoration:none;background:none;border:0;
    padding:0;font-family:inherit;cursor:pointer;min-width:56px}
  .rpt-actions .ra{display:flex;align-items:center;justify-content:center;width:48px;height:48px;
    border-radius:50%;background:var(--brand);color:#fff;box-shadow:0 3px 8px rgba(11,46,30,.22)}
  .rpt-actions .ra.alt{background:#1a6a86}
  .rpt-actions .ra svg.ic{width:22px;height:22px;flex:0 0 22px;margin:0}
  /* רווח והפסד: שני המתגים ממלאים את השורה, הבוררים בשורה אחת, בלי "מחודש/עד" */
  .rpt-tb.pnl-tb form .seg{flex:1 1 calc(50% - 4px);display:flex}
  .rpt-tb.pnl-tb form .seg a{flex:1;text-align:center;padding:9px 4px!important;font-size:.88rem!important}
  .rpt-tb.pnl-tb form>.muted{display:none}
  .rpt-tb.pnl-tb form>select{flex:1 1 28%;min-width:0!important;width:auto;font-size:.95rem}
  /* דוחות הכנסות: טווח תאריכים בשתי עמודות והכפתור בשורה מלאה */
  .rpt-range{display:grid!important;grid-template-columns:1fr 1fr;gap:10px}
  .rpt-range>div{min-width:0}
  .rpt-range input[type=date]{width:100%;min-width:0}
  .rpt-range .btn{grid-column:1/-1}
  /* מקדמות: כרטיס סיכום לפני השובר — המקדמה לתשלום והנוסחה בשורה אחת */
  .adv-m{display:block;margin-bottom:12px}
  .adv-sum{background:#eaf3ee;border:1px solid #cddbd2;border-radius:16px;padding:16px;color:#0B2E1E}   /* ירוק האפליקציה במקום כחול (אלה 09/10/2026) */
  .adv-sum .lbl{font-size:.9rem;font-weight:600}
  .adv-sum .big{font-size:2rem;font-weight:800;direction:ltr;text-align:right;font-variant-numeric:tabular-nums;margin:2px 0 8px}
  .adv-f{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;font-size:.86rem;font-variant-numeric:tabular-nums}
  .adv-f span{background:rgba(255,255,255,.8);border-radius:999px;padding:3px 10px;color:var(--ink)}
  .adv-f em{font-style:normal;color:#5a6b7c;font-weight:700}
  .adv-due{margin-top:8px;font-size:.86rem;color:#a33;font-weight:700}
  .adv-bl{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid var(--line);
    border-radius:14px;padding:12px 16px;margin-top:8px;font-size:.95rem}
  .adv-bl b{font-variant-numeric:tabular-nums;direction:ltr}
}

/* ===== רוו"ה והכנסות לפי פריט בנייד — רשימות במקום גריד (30/09/2026) ===== */
.pnl-m,.ri-cards{display:none}
@media(max-width:700px){
  #pnlCard,.ri-tblcard,.ri-tb form>.muted{display:none}
  .pnl-m{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
  .pm-step{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:2px 4px;font-size:.92rem}
  .pm-step a{color:var(--brand);font-weight:700;text-decoration:none;white-space:nowrap}
  .pm-step b{color:var(--ink)}
  .pm-sec{background:#fff;border:1px solid var(--line);border-radius:14px;padding:4px 14px}
  .pm-h{font-weight:800;font-size:1.02rem;color:#0f2a1f;padding:10px 0 8px;border-bottom:2px solid #cfd8dd}
  .pm-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;border-bottom:1px solid #eef2f1;font-size:.95rem}
  .pm-row:last-child{border-bottom:0}
  .pm-row span{min-width:0;overflow-wrap:anywhere}
  .pm-row b{white-space:nowrap;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;font-weight:600}
  .pm-row.pm-tot{background:#eef4fb;margin:4px -14px 0;padding:10px 14px;border-top:1.5px solid #b9cbe0;border-bottom:0;border-radius:0 0 13px 13px;font-weight:800}
  .pm-key{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#0B2E1E;color:#fff;
    border-radius:14px;padding:13px 16px;font-weight:700;font-size:1.02rem}
  .pm-key.gross{background:#15503A}
  .pm-key b{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;font-size:1.15rem}
  .pm-key .neg,.pm-row .neg{color:#d32f2f}.pm-key .neg{color:#ffb4a8}
  .pm-key .zdash,.pm-row .zdash{color:#c3c9cf}.pm-key .zdash{color:#9fb5aa}
  .pm-adj summary{list-style:none;cursor:pointer;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;font-weight:700;display:flex;justify-content:space-between;gap:10px}
  .pm-adj summary::-webkit-details-marker{display:none}
  .pm-adj summary b{direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}
  .pm-adj[open] summary{border-radius:14px 14px 0 0}
  .pm-adj>.pm-sec,.pm-adj>.pm-key{margin-top:8px}
  /* הכנסות לפי פריט: כרטיס לכל פריט, כמו לקוחות/פריטים */
  .ri-tb form>select[name=item_id]{flex:1 1 100%;width:100%}
  .ri-cards{display:flex;flex-direction:column;gap:8px}
  .ri-cards .dc-main{padding:12px 14px}
  .ri-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
  .ri-name{font-weight:700;font-size:1.02rem;color:var(--ink);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ri-amt{flex:none;font-weight:800;font-size:1.05rem;color:var(--ink);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
  .ri-sub{display:flex;flex-wrap:wrap;gap:2px 12px;margin:4px 0 6px;font-size:.88rem;color:var(--muted)}
  .ri-cards .pctbar{margin:0}
  .ri-total{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#eef4fb;border:1px solid #b9cbe0;
    border-radius:14px;padding:12px 16px;font-weight:800}
  .ri-total b{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
}

/* ===== דף הבית של הלקוח בנייד — צבעוני כמו בפינבוט (אלה 30/09/2026) ===== */
.qa{position:relative}
.qa .qa-plus{position:absolute;top:8px;inset-inline-start:8px;width:22px;height:22px;border-radius:50%;
  background:var(--gold);color:#0B2E1E;font-weight:800;font-size:1rem;line-height:22px;text-align:center}
.qa .qa-n{font-size:.8rem;font-weight:500;opacity:.85;margin-top:-4px}
.recent-m{display:none}
@media(max-width:700px){
  .recent-m{display:block}
  .recent-m .doc-cards{display:flex;flex-direction:column;gap:8px}
  .panels .card.tile-dark{background:linear-gradient(135deg,#0B2E1E,#166534);border-color:transparent;color:#fff}
  .panels .card.tile-green{background:linear-gradient(135deg,#1F7A42,#7CC242);border-color:transparent;color:#fff}
  .panels .card.tile-gold{background:linear-gradient(135deg,#FBBF24,#F59E0B);border-color:transparent;color:#0B2E1E}
  .panels .card[class*="tile-"] h2,.panels .card[class*="tile-"] .metric,.panels .card[class*="tile-"] .metric.neg,
  .panels .card[class*="tile-"] .metric-lbl,.panels .card[class*="tile-"] .metric-sub .v,
  .panels .card[class*="tile-"] .muted,.panels .card[class*="tile-"] a{color:inherit}
  .panels .card[class*="tile-"] .metric-lbl,.panels .card[class*="tile-"] .muted{opacity:.85}
  .panels .card[class*="tile-"] .metric-sub{border-color:rgba(255,255,255,.35)}
  .panels .card.tile-gold .metric-sub{border-color:rgba(11,46,30,.25)}
  .panels .card[class*="tile-"] a{text-decoration:underline;text-underline-offset:3px}
}

/* לחיצה ארוכה באייפון על כפתור/אריח/ברכה פתחה את תפריט הבחירה של ספארי
   ("העתקה / תרגום / שיתוף") — אלה 30/09/2026: "מה זה? למה זה נפתח ככה?".
   רכיבי ממשק אינם טקסט לבחירה; טקסט של דוחות ומספרים נשאר ניתן להעתקה. */
@media(max-width:960px){
  /* לא על .topbar/.tsel: ב-iOS user-select:none על הורה עלול לבלוע הקשה על <summary>/div[role=button]
     (בורר העסק לא נפתח לאלה באייפון, 30/09 11:25) */
  .welcome,.intake-btn,.qa,.qa-grid,.bottomnav,.sidebar,.hub-list a,.dcard .dc-main,
  .sec-head,.btn,.rpt-actions,.pm-step,.menu-btn{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
}

/* תגובה מיידית ללחיצה בנייד (אלה 30/09/2026: "הכפתורים למטה לוקח להם זמן תגובה"):
   touch-action:manipulation מבטל כל השהיית זיהוי-הקשה-כפולה של הדפדפן, ומצב :active
   נותן משוב חזותי באותו רגע — לפני שהדף הבא הגיע מהרשת. */
.bottomnav a,.hub-list a,.qa,.dcard .dc-main,.btn,.rpt-actions a,.rpt-actions button,.menu-btn{touch-action:manipulation}
.bottomnav a:active{color:var(--brand);transform:scale(.92);transition:transform .05s}
.hub-list a:active,.dcard .dc-main:active{background:#eef5f0}
.qa:active{opacity:.85}

/* דוח הכנסות בנייד — רשימות במקום הטבלאות (30/09/2026) */
@media(max-width:700px){
  .rep-tblcard{display:none}
  .rep-m .pm-row span{display:flex;flex-direction:column;gap:2px}
  .rep-m .pm-row small{color:var(--muted);font-size:.8rem;font-variant-numeric:tabular-nums}
  .rep-m .pm-row.dim{opacity:.5}
  .rep-m .pm-row a{color:var(--brand);text-decoration:none;font-weight:600}
  .rep-m .pm-row b.neg{color:#d32f2f}
}

/* כפתור עזרה בסרגל העליון — נייד בלבד (30/09/2026) */
.help-top{display:none}
@media(max-width:960px){
  .help-top{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;
    border:2px solid var(--brand);background:#fff;color:var(--brand);font-weight:800;font-size:1.05rem;
    padding:0;margin-inline-start:6px;cursor:pointer;flex:none;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .help-top:active{background:#eef5f0}
}

/* דוח הכנסות: שנה / מחודש / עד — בנייד שלושה בוררים בשורה אחת, בלי תוויות (30/09/2026) */
.rp-f{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.rp-f select{width:auto;min-width:88px}
@media(max-width:700px){
  .rp-f{width:100%;flex-wrap:nowrap}
  .rp-f label{display:none}
  .rp-f select{flex:1 1 0;min-width:0;width:auto;font-size:.95rem;padding:10px 8px}
}

/* ===== דף הבית של הלקוח במחשב — גריד ברוחב מלא (אלה 13/10/2026, הדמיה בסגנון פינבוט).
   בנייד (≤960px) .dash הוא בלוק רגיל והכול נשאר כפי שאושר ב-30/09. ===== */
.tile-pnl{display:none}
.welcome .wdate{display:none}
.chart-legend{display:flex;gap:16px;font-size:.85rem;color:var(--muted);margin:0}
.chart-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-inline-end:6px;vertical-align:-1px}
.chart-legend .lg-inc{background:linear-gradient(180deg,#2F9E5B,#166534)}
.chart-legend .lg-exp{background:linear-gradient(180deg,#E07A5F,#B91C1C)}
.chart-pairs .bar .pair{display:flex;align-items:flex-end;gap:3px;height:100%;width:100%;justify-content:center}
.chart-pairs .bar .pair i{width:45%;max-width:22px;border-radius:5px 5px 0 0;display:block;min-height:2px}
.chart-pairs .bar .pair i.inc{background:linear-gradient(180deg,#2F9E5B,#166534)}
.chart-pairs .bar .pair i.exp{background:linear-gradient(180deg,#E07A5F,#B91C1C)}
/* ציר ערכים + קווי רשת מאחורי העמודות (ביקורת 13/10/2026) */
.chart-wrap{position:relative;padding-inline-end:52px}
.chart-wrap .chart{position:relative;z-index:1}
.chart-grid{position:absolute;inset:10px 0 30px 0;pointer-events:none}
.chart-grid span{position:absolute;right:0;left:52px;border-top:1px dashed #DCE4DF}
.chart-grid span em{position:absolute;left:-52px;top:-.6em;width:46px;text-align:right;direction:ltr;font-style:normal;font-size:.72rem;color:var(--muted);font-variant-numeric:tabular-nums}
.docs-tbl tbody tr:hover{background:#FAFAFA}
/* כרטיסיית ריחוף בגרפים — שורה תחת שורה (ביקורת 13/10/2026) */
.chart .bar{position:relative}
.chart .ctip{display:none;position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:5;
  min-width:150px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 10px;
  box-shadow:0 8px 22px rgba(0,0,0,.14);font-size:.82rem;color:var(--ink);text-align:right;direction:rtl;white-space:nowrap}
.chart .bar:hover .ctip{display:block}
.chart .ctip>b{display:block;margin-bottom:4px;font-size:.85rem}
.chart .ctip>span{display:flex;justify-content:space-between;gap:12px;padding:2px 0 2px 2px;border-right:3px solid transparent;padding-right:6px}
.chart .ctip>span em{font-style:normal;font-weight:700;font-variant-numeric:tabular-nums}
.chart .ctip .ct-inc{border-color:#2F9E5B}
.chart .ctip .ct-exp{border-color:#D9534F}
.chart .ctip .ct-net{border-top:1px solid var(--line);margin-top:3px;padding-top:4px;border-right-color:transparent}
.chart .ctip .ct-net.neg em{color:var(--err)}
.docs-tbl .badge{white-space:nowrap}
.docs-tbl td.amt.neg{color:var(--err)}
@media(min-width:961px){
  .dash{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;align-items:start}
  /* שורת הפתיחה (אלה 13/10/2026, סבב 3): ברכה + תאריך בימין, במרכז כפתור המצלמה
     העגול והגדול המוכר ("שליחת חשבוניות והוצאות", טקסט מתחתיו — כמו בנייד ובגרסה
     הראשונה), ומשמאל סרגל כפתורי יצירת מסמך מתוארים בגובה 46px */
  /* סבב 5 (ביקורת 13/10): שני אגפים — ימין: ברכה+תאריך והעיגול צמוד אליה כבלוק אחד;
     שמאל: כפתורי המסמך ברווחים אחידים. בלי אלמנט שצף במרכז. */
  /* סבב 7 (ביקורת 13/10): באנר עליון כהה כמו בפינבוט — הברכה והתאריך, ולצידם עיגול
     המצלמה הגדול עם הכיתוב; כפתורי המסמך בירוק מלא (השניים הראשיים) כמו במקור */
  .dash>.hero{grid-column:1/3;grid-row:1;display:flex;align-items:center;gap:30px;justify-content:space-between;
    background:linear-gradient(135deg,#0B2E1E,#166534);border-radius:var(--radius);padding:22px 28px;color:#fff;
    box-shadow:0 10px 26px rgba(11,46,30,.22);align-self:stretch}
  .dash .hero .welcome{margin:0;font-size:1.55rem;color:#fff}
  .dash .hero .welcome .wdate{display:block;font-size:.95rem;margin-top:4px;color:rgba(255,255,255,.75)}
  .dash>.sec-head{display:none}
  .dash .hero #intakeForm{margin:0;flex:none}
  .dash .hero .intake-btn{color:#fff}
  .dash .hero .intake-ring{box-shadow:0 10px 26px rgba(0,0,0,.35);background:radial-gradient(circle at 34% 28%,#2F9E5B,#0B2E1E 74%)}
  .dash .intake-btn{width:auto;padding:4px 0 14px;gap:10px}
  .dash .intake-ring{width:120px;height:120px}
  .dash .intake-btn .intake-ic svg.ic{width:46px;height:46px;flex:0 0 46px}
  .dash .intake-btn .intake-txt{font-size:1.08rem;white-space:nowrap}
  .dash .intake-btn .intake-sub{display:none}
  .dash .intake-btn.busy .intake-sub{display:block}
  .dash>.qa-grid{grid-column:3/5;grid-row:1;display:flex;flex-wrap:wrap;gap:10px;margin:0;align-self:center;align-content:center;justify-content:flex-end}
  .dash .chart .bar{position:relative}
  .dash .qa{flex-direction:row;min-height:48px;padding:10px 22px;border-radius:999px;font-size:1.02rem;gap:8px;font-weight:600;
    background:var(--brand);color:#fff;border:1px solid var(--brand);box-shadow:0 4px 12px rgba(11,46,30,.18)}
  .dash .qa:hover{background:var(--brand-2);border-color:var(--brand-2)}
  .dash .qa.alt{background:#fff;color:var(--ink);border-color:var(--line);box-shadow:none}
  .dash .qa.alt:hover{background:#f4f7f6;border-color:var(--brand-2)}
  .dash .qa svg.ic{width:21px;height:21px;flex:0 0 21px}
  .dash .qa .qa-plus{position:static;width:20px;height:20px;line-height:20px;font-size:.95rem}
  .dash .qa .qa-n{display:none}
  .dash>.panels{grid-column:span 4;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:0;align-items:stretch}
  .dash .panels .card{margin:0;padding:18px 20px 16px;display:flex;flex-direction:column}
  .dash .panels h2{font-size:.95rem;margin:0 0 8px;color:var(--muted);font-weight:600}
  .dash .panels .metric{font-size:2.15rem}
  .dash .panels .metric-lbl{font-size:.92rem;margin-top:2px;flex:1}
  .dash .panels .metric-sub{padding:7px 0 0;margin-top:7px}
  .dash .panels .metric-sub .v{font-size:1.05rem;white-space:nowrap}
  .dash .panels .metric-sub .muted small{font-size:.8em}
  .dash .panels .kpi-cust{display:none}
  .dash .panels .tile-gold .metric.neg{color:var(--ink)}
  .dash .tile-pnl{display:flex}
  .dash>.pnl-card,.dash>.cash-card{grid-column:span 2;margin:0;align-self:stretch}
  .dash>.pnl-card .metric{font-size:1.9rem}
  .dash .chart .bar i{max-width:34px}
  .dash>.recent-m{display:none}
  .dash>.recent-d{grid-column:span 4;margin:0}
}
