/* app.css · EranSales M0 · תוספות המעטפת מעל DS v1.5 (ds.css אינו נערך)
   כל ערך צבע מהטוקנים. כאן: מסמך מלא, סרגל דביק, שער ההתחברות, מסך חסימה,
   באנר גלובלי, toast קבוע, המובייל האמיתי (המעטפת, הניווט התחתון, ה-sheets),
   ורכיב התקופה במובייל. אין style= בסימון (CSP style-src 'self'). */

html, body { height:100%; }
body { min-height:100vh; overflow-x:hidden; }
#app { min-height:100vh; }
a { color:inherit; }
.mobile-only { display:none; }
.mono { font-family:var(--mono); }

/* ── App Shell: המסמך כולו הוא ה-frame ── */
.frame { min-height:100vh; min-width:0; }
@media (min-width: 768px) {
  .frame { min-width:0; grid-template-columns:68px minmax(0,1fr); }
  .frame[data-side="pinned"] { grid-template-columns:232px minmax(0,1fr); }
  /* הסרגל נצמד מתחת לבאנר הגלובלי (אם מוצג); --es-banner נקבע מ-errors.js דרך CSSOM */
  .side { position:sticky; top:var(--es-banner, 0px); height:calc(100vh - var(--es-banner, 0px)); overflow:hidden; }
  /* peek (לא נעוץ, ריחוף): נשאר sticky בגובה החלון ורק מתרחב מעל התוכן; absolute+height:100% שלח את כפתורי התחתית
     (מצב בהיר, נעיצה) לתחתית העמוד הארוך ולא לתחתית המסך (ערן 15/10) */
  .frame[data-side="collapsed"] .side.peek { position:sticky; top:var(--es-banner, 0px); bottom:auto; height:calc(100vh - var(--es-banner, 0px)); }
  .frame[data-side="collapsed"] { position:relative; }
  .mshell { display:none; }
}

.profile .pname { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:ltr; unicode-bidi:isolate; }
.profile > button svg.i { width:14px; height:14px; color:var(--muted); }
.profile .menu button svg.i { width:14px; height:14px; }
.side .foot { display:grid; gap:2px; }
.side .foot button[aria-pressed="true"] { color:var(--pink-2); opacity:1; }
/* רוחב התוכן (21/10, חלופה ב׳ כשלב ראשון של הפריסה הגמישה): ממורכז ולא צמוד לסרגל; התקרה היא נקודת התחלה,
   לא ערך סופי (ערן). במק 14 (1512) התוכן כמעט לא משתנה: 1,444 זמינים מול תקרה של 1,440 קודם. */
:root { --main-max: 1680px; }
.main { max-width:var(--main-max); width:100%; margin-inline:auto; }

/* סולם הפריסה (21/10, שלב 2 של הפריסה הגמישה). רצועה אחת לפי רוחב התוכן, שהמעטפת כותבת ל-‎.frame[data-w]‎:
     phone (MOBILE_QUERY, ≤767 חלון) · narrow (תוכן < 960) · laptop (960–1439) · wide (≥ 1440, עד --main-max).
   כללים חדשים נכתבים על הרצועה ולא על media של רוחב החלון, כי רק הרצועה יודעת אם הסרגל נעוץ.
   ל-laptop ול-wide אין כרגע אף כלל: במק 14 (1512) המסך זהה לקודם בשני מצבי הסרגל.
   הרשתות המשותפות: ‎.strip4‎ יורדת לשתי עמודות ב-narrow (ב-860 התאים היו 177px והערכים נשברו בתוכם).
   ‎.hero3‎ נשארת בשלוש (225px ומעלה עד 768, קריא). ‎.hero‎ של הבית מטופלת ב-home.css ותעבור לרצועה בסבב הליטוש. */
.frame[data-w="narrow"] .strip4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.period-mount { position:relative; }
.empty .btn { margin-top:6px; text-decoration:none; }
.empty .mono { font-family:var(--mono); font-size:12.5px; direction:ltr; unicode-bidi:isolate; }
.two.z b { color:var(--faint); font-weight:500; font-size:26px; }
.tbl td .two.z b { font-size:inherit; }   /* 26 נועד לאריח מדד; בתא טבלה גודל הטבלה (ממצא העמלות 24/10) */
.tile .two small { min-height:12px; }

/* שורת מפתח בתצוגה המקדימה: טקסט קטן ומעומעם בתחתית, לא רכיב מוצר */
.devline { margin-top:auto; padding:8px 0 0; border-top:1px dashed var(--line); font-family:var(--mono); font-size:12.5px; color:var(--muted); direction:rtl; unicode-bidi:plaintext; }

/* ── שער ההתחברות / טעינה / שגיאה ── */
.gate { min-height:100vh; display:grid; place-items:center; padding:24px 16px; background:var(--bg); }
.gate-card { width:min(420px, 100%); background:var(--s1); border:1px solid var(--line-2); border-radius:16px; box-shadow:var(--shadow-2); padding:24px 24px 22px; display:grid; gap:12px; }
.gate-card .brand { border-bottom:1px solid var(--line); padding:0 0 14px; margin-bottom:4px; }
.gate-card .brand .name { opacity:1; }
.gate-card h1 { margin:0; }
.gate-card p { margin:0; color:var(--muted); }
/* אימות דו-שלבי (ערן 27/10): שלב הקוד בכניסה + חלונית ההפעלה (auth/mfa-panel.js) */
.gate-card #mfaCode { font-size:22px; letter-spacing:.35em; text-align:center; font-variant-numeric:tabular-nums; }
.mfa-p { display:grid; gap:14px; }
.mfa-p p { margin:0; }
.mfa-state { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; border:1px solid var(--line-2); background:var(--s2); }
.mfa-state > svg { width:22px; height:22px; flex:none; }
.mfa-state > div { display:grid; gap:2px; }
.mfa-state.on { border-color:var(--ok-line); } .mfa-state.on > svg { color:var(--ok); }
.mfa-state.off > svg { color:var(--muted); }
.mfa-steps { margin:0; padding-inline-start:20px; display:grid; gap:6px; color:var(--ink-2); }
.mfa-qr { justify-self:center; background:#fff; padding:10px; border-radius:12px; line-height:0; }
.mfa-qr img { width:200px; height:200px; display:block; }
.mfa-secret summary { cursor:pointer; color:var(--muted); font-size:13px; }
.mfa-secret code { display:block; margin-top:8px; padding:8px 10px; border-radius:8px; background:var(--s2); font-family:var(--mono); font-size:13px; word-break:break-all; user-select:all; }
.mfa-p input[data-mfa="code"] { font-size:20px; letter-spacing:.3em; text-align:center; font-variant-numeric:tabular-nums; }
/* אפליקציית גיבוי (ערן 30/10, רשות) */
.mfa-apps { display:grid; gap:8px; }
.mfa-app { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:10px; border:1px solid var(--line); }
.mfa-app > div { display:grid; gap:2px; flex:1; }
.mfa-backup { display:grid; gap:8px; padding-top:4px; border-top:1px solid var(--line); }
.gate-card .fld .in { min-height:42px; }
.gate-card .fld .in svg.i { width:16px; height:16px; color:var(--muted); }
.gate-card .fld .in input { font-size:15px; }
.gate-card .btn.pri.lg { width:100%; margin-top:4px; }
.gate-card .row { display:flex; gap:8px; justify-content:flex-end; }
.gate-card .ib.sm { border:0; background:transparent; }
.fld.err[hidden] { display:none; }

/* ── מסך חסימה (fail-closed) ── */
body.blocked { display:grid; place-items:center; background:#3b0d12; color:#fff; padding:24px; font-family:var(--font); }
.blocked-card { max-width:640px; text-align:center; line-height:1.8; }
.blocked-card h1 { font-size:22px; margin:0 0 10px; }
.blocked-card code { display:inline-block; margin:8px 0; padding:2px 8px; border-radius:6px; background:rgba(255,255,255,.12); font-family:var(--mono); font-size:12.5px; }
.blocked-card .muted { opacity:.85; font-size:13.5px; }

/* ── באנר גלובלי ── */
.esbanner { position:sticky; top:0; z-index:950; display:flex; align-items:center; gap:12px; padding:9px 14px; font-size:13.5px; border-bottom:1px solid var(--line-2); background:var(--s3); color:var(--ink); }
.esbanner[hidden] { display:none; }
.esbanner [hidden] { display:none !important; }   /* כפתור הפעולה הריק: .btn של ה-DS (display:inline-flex) דרס את hidden (AUD-054) */
.esbanner[data-kind="err"] { background:var(--bad-bg); border-bottom-color:var(--bad-line); }
.esbanner[data-kind="warn"] { background:var(--warn-bg); border-bottom-color:var(--warn-line); }
.esbanner[data-kind="info"] { background:var(--note-bg); border-bottom-color:var(--blue-line); }
.esbanner .txt { flex:1; }
.esbanner .x { width:28px; height:28px; border-radius:7px; color:var(--muted); font-size:18px; }
.esbanner .x:hover { background:var(--row-hover); color:var(--ink); }

/* ── toast קבוע ── */
.toast.fixed { position:fixed; bottom:18px; inset-inline-start:50%; transform:translateX(50%); z-index:210; }
.toast.fixed[hidden] { display:none; }
body.is-mobile .toast.fixed { bottom:calc(104px + env(safe-area-inset-bottom)); }   /* כמו .bnav ו-.plus-c: בלי זה, באייפון עם פס הבית ההודעה ישבה על ה-"+" (AUD-118, Sales 27/10) */

/* ── רכיב התקופה: ההשלמות ── */
.period .mpick, .period .pp.range { inset-inline-end:0; inset-inline-start:auto; }
.period .pp.range { width:max-content; max-width:min(460px, 92vw); }
.rngf { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:6px 8px 8px; font-size:13px; color:var(--muted); }
.rngf label { display:inline-flex; align-items:center; gap:6px; }
.rngf input { width:118px; border:1px solid var(--line-2); border-radius:8px; padding:6px 8px; background:var(--bg); color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; direction:ltr; text-align:center; }
.rngf input:focus { outline:2px solid var(--pink); outline-offset:1px; }
.pp.range .fld.err { padding:0 8px 6px; }
.mpick .grid button:focus-visible, .period button:focus-visible { outline:2px solid var(--pink); outline-offset:1px; }

/* ── מובייל אמיתי (X-25): המעטפת, כותרת המסך, ניווט תחתון, sheets ── */
@media (max-width: 767px) {
  .mobile-only { display:initial; }
  .frame { display:block; min-width:0; }
  .side, .hdr { display:none; }
  .main { padding:12px 16px 120px; gap:12px; }
  .mshell { display:block; }
  .mhdr { padding:calc(12px + env(safe-area-inset-top)) 16px 12px; }
  .mhdr .avatar { width:38px; height:38px; }
  .mhdr .hi b { font-size:19px; }
  .trow h1, .ptitle h1 { display:none; }   /* הכותרת והתקופה בכותרת המסך */
  .trow { gap:8px; }
  .trow .period-mount { flex-basis:100%; }
  .tiles { grid-template-columns:1fr 1fr; gap:8px; }
  .tile .v, .two.z b { font-size:20px; }
  .bnav { position:fixed; bottom:0; inset-inline:0; height:calc(72px + env(safe-area-inset-bottom)); padding:8px 8px calc(10px + env(safe-area-inset-bottom)); display:grid; z-index:120; }
  .bnav button[aria-current="false"] { color:var(--bnav-ink); }
  .plus-c { position:fixed; bottom:calc(30px + env(safe-area-inset-bottom)); z-index:121; }
  .plus-c[aria-disabled="true"] { opacity:.45; filter:saturate(.5); cursor:not-allowed; }
  /* page.chrome = { bottomNav:false }: עמוד שמסתיר את הניווט התחתון ואת ה-"+" בזמן שהוא מורכב */
  .bnav[hidden], .plus-c[hidden] { display:none; }
  body.es-nobnav .main { padding-bottom:calc(24px + env(safe-area-inset-bottom)); }
  .mscrim { position:fixed; inset:0; background:var(--scrim); z-index:130; }
  .msheet.es-sheet { position:fixed; left:0; right:0; bottom:0; background:var(--s1); border-top:1px solid var(--line-2); border-radius:24px 24px 0 0; padding:10px 16px calc(28px + env(safe-area-inset-bottom)); z-index:131; box-shadow:var(--sheet-shadow); display:grid; gap:4px; max-height:78vh; overflow:auto; }
  .msheet.es-sheet .grab { width:40px; height:5px; border-radius:3px; background:var(--line-2); margin:0 auto 6px; }
  .msheet.es-sheet .sh { display:flex; align-items:center; justify-content:space-between; padding:2px 4px 8px; margin:0 -16px 4px; padding:8px 20px 10px; background:var(--s-acc); border-bottom:1px solid var(--s-acc-line); border-radius:24px 24px 0 0; }
  .msheet.es-sheet .sh b { font-size:16px; font-weight:600; }
  .msheet.es-sheet > button { text-align:start; padding:12px 8px; font-size:15px; color:var(--ink-2); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; min-height:48px; width:100%; }
  .msheet.es-sheet > button svg.i { width:17px; height:17px; }
  .msheet.es-sheet > button[aria-current="page"] { color:var(--pink-2); }
  .msheet.es-sheet > button.warn { color:var(--warn); border-bottom:0; }
  .msheet.es-sheet .lbl { font-size:12.5px; color:var(--faint); padding:10px 8px 2px; letter-spacing:.04em; }
  .msheet.es-sheet .sheet-body { position:static; width:auto; box-shadow:none; border:0; background:transparent; padding:4px 0 0; max-width:none; }
  .msheet.es-sheet .mpick .grid { gap:8px; }
  .msheet.es-sheet .mpick .grid button { padding:10px 4px 8px; font-size:14px; }
  .msheet.es-sheet .rngf input { width:132px; padding:9px 8px; font-size:15px; }
  /* רכיב התקופה במובייל: ארבעה מקטעים + שורת ‹ חודש › */
  .mperiod-wrap { display:grid; gap:8px; }
  .period.mobile { display:grid; grid-template-columns:repeat(4,1fr); width:100%; }
  .period.mobile button { padding:8px 4px; font-size:12.5px; justify-content:center; white-space:nowrap; }
  .mper2 { display:inline-flex; align-items:center; height:36px; border-radius:10px; border:1px solid var(--pink-line); background:var(--pink-bg); color:var(--pink-2); font-size:14px; font-weight:500; justify-self:start; }
  .mper2 button { display:grid; place-items:center; width:34px; height:100%; color:var(--pink-2); }
  .mper2 button svg.i { width:15px; height:15px; }
  .mper2 button[disabled] { color:var(--faint); }
  .mper2 .ml { width:auto; padding:0 6px; }
  .mper2 b { min-width:118px; text-align:center; font-weight:500; }
  .gate { padding:16px; }
  .esbanner { font-size:12.5px; }
}
