
* { box-sizing: border-box; margin: 0; }
:root {
  --bg:#f6f8f8; --card:#fff; --line:#e5eae9; --inline:#b9cbc7;
  --ink:#1b2b29; --muted:#5f6f6c; --pri:#0f766e; --prisoft:#e3efec;
  --ok:#15803d; --oksoft:#e2f2e7; --dng:#b3382c; --dngsoft:#fbe9e7;
  --warn:#a16207; --warnsoft:#fdf0dd; --r:14px;
}
body { background:var(--bg); color:var(--ink); font-family:'Heebo',system-ui,sans-serif; direction:rtl; min-height:100vh; }
svg.i { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.hide { display:none !important; }

/* --- מסכי כניסה --- */
.gate { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:18px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:26px 22px 22px;
  width:100%; max-width:380px; text-align:center; box-shadow:0 10px 30px -18px rgba(15,118,110,.25); }
.logo-circle { width:78px; height:78px; border-radius:50%; background:#fff; border:2px solid #cfe0dc;
  margin:0 auto 12px; display:flex; align-items:center; justify-content:center; color:var(--pri); }
.logo-circle svg { width:44px; height:44px; stroke-width:1.4; }
.logo-circle.soft { background:var(--prisoft); border:none; }
/* ⚠️ visibility ולא display: המקום נשמר, ולכן הכרטיס אינו קופץ כשהלוגו נוחת. */
.logo-circle.is-pending { visibility:hidden; }
/* ⭐ לוגו מוסד — פס אופקי ולא עיגול, ולכן מחליף את המסגרת ולא יושב בתוכה. */
.brand-logo { width:100%; max-width:190px; height:auto; margin:0 auto 12px; display:block; }
.card h2 { font-size:23px; font-weight:800; color:var(--pri); margin-bottom:2px; }
.card .tag { font-size:13.5px; color:var(--muted); margin-bottom:14px; }
/* הכיתוב נצמד ללוגו; הברכה ("שלום, …") באה אחריו עם אוויר משלה. */
.card .tag { margin-top:-4px; }
.card h2 + .fld, .card h2 { margin-bottom:18px; }
.fld { margin-bottom:12px; display:flex; flex-direction:column; align-items:center; }
.box { display:flex; flex-direction:row; align-items:center; gap:9px; height:52px;
  border:1.5px solid var(--inline); border-radius:var(--r); padding:0 14px; background:var(--card); }
.box svg { color:var(--muted); }
.box input { border:none; outline:none; flex:1; font-size:16px; color:var(--ink); text-align:right;
  font-family:inherit; background:transparent; width:100%; }
.box.error { border-color:#DC2626; }
/* 🐞 כל שדה כניסה קיבל רוחב קשיח משלו (200/220px), ולכן הת.ז נראתה צרה
   מהטלפון בתוך כרטיס ממורכז. רוחב אחיד ומוגבל — ולא 100%, כדי שהשדות
   לא יימתחו לרוחב הכרטיס כולו במסך רחב. */
#g-phone .box { width:100%; max-width:260px; margin-inline:auto; }
/* ⚠️ הכפתור היה width:100% ולכן בלט מעבר לשדות שמעליו (260px). נגזר מאותו
   רוחב בדיוק, כדי שהעמודה תישאר ישרה גם אם רוחב השדות ישתנה. */
#g-phone .btn { display:block; width:100%; max-width:260px; margin-inline:auto; }
#g-phone .fld { display:flex; flex-direction:column; align-items:center; }
.fld .err { color:#DC2626; font-size:12px; margin-top:4px; }
.btn { height:50px; border-radius:var(--r); border:none; width:100%; background:var(--pri); color:#fff;
  font-size:16px; font-weight:700; font-family:inherit; cursor:pointer; margin-top:6px; }
.btn:disabled { opacity:.6; }
.voice-note { font-size:13px; color:var(--muted); margin-top:10px; }
.link { font-size:13px; color:var(--pri); font-weight:700; margin-top:14px; cursor:pointer; background:none; border:none; font-family:inherit; }
/* חזרה = פעולת נסיגה ולא הפעולה הראשית: אפור, לא בצבע המותג.
   ⚠️ הכרטיס הוא text-align:center ולא flex, ולכן היישור נעשה ב-display:block
   + margin אוטומטי בצד אחד. ב-RTL inline-start הוא **ימין** — כלומר
   margin-inline-end:auto הוא מה שדוחף את הכפתור ימינה. */
.link.back { color:var(--muted); font-weight:600; display:block;
  margin-inline-start:0; margin-inline-end:auto; padding:0; }
.sent-to { font-size:13.5px; color:var(--muted); line-height:1.6; margin-bottom:16px; }
.sent-to b { color:var(--ink); }
.code-label { font-size:13.5px; font-weight:600; margin-bottom:7px; display:block; }
.code-input { width:200px; height:52px; border:1.5px solid var(--inline); border-radius:var(--r);
  font-size:21px; font-weight:700; letter-spacing:6px; text-align:center; font-family:inherit; outline:none; }
.timer { font-size:12.5px; color:var(--muted); margin-top:14px; }
.timer b { font-variant-numeric:tabular-nums; color:var(--ink); }

/* --- האפליקציה --- */
.shell { max-width:560px; margin:0 auto; min-height:100vh; display:flex; flex-direction:column; background:var(--bg); }
.head { display:flex; align-items:center; justify-content:space-between; padding:14px 18px;
  background:var(--card); border-bottom:2px solid var(--pri); position:sticky; top:0; z-index:5; }
.head b { font-size:16px; font-weight:800; color:var(--pri); }
/* לוגו בכותרת — גובה קבוע, כדי שלא יקפיץ את הסרגל בזמן הטעינה. */
.head-logo { height:30px; width:auto; display:block; }
.head .bell { position:relative; color:var(--pri); cursor:pointer; background:none; border:none; }
.head .badge { position:absolute; top:-5px; left:-7px; background:var(--dng); color:#fff; border-radius:9px;
  min-width:17px; height:17px; font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; padding:0 3px; }
main { flex:1; padding:16px; }
.page-title { font-size:20px; font-weight:800; margin-bottom:14px; }
.sect { background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:14px 15px 12px; margin-bottom:13px; }
.sect h4 { font-size:15px; font-weight:800; color:var(--pri); margin-bottom:11px; }
.chips { display:flex; flex-wrap:wrap; gap:7px; }
.chip { padding:7px 14px; border-radius:18px; font-size:13px; font-weight:600; background:var(--prisoft);
  color:#35544e; cursor:pointer; border:none; font-family:inherit; }
.chip.on { background:var(--pri); color:#fff; }
.prog { display:flex; align-items:center; gap:10px; margin-top:13px; }
.prog .track { flex:1; height:6px; border-radius:3px; background:#dce9e5; overflow:hidden; }
.prog .fill { height:100%; background:var(--pri); border-radius:3px; }
.prog .num { font-size:12.5px; font-weight:700; color:var(--pri); font-variant-numeric:tabular-nums; }
.row { display:flex; align-items:center; gap:11px; min-height:46px; padding:8px 2px; border-bottom:1px solid #eef2f1; }
/* 🐞 שורת אישור — מחלקה משלה. הגרסה הראשונה שינתה את הכלל הגלובלי,
   ו-.row משמש גם בפרופיל ובתיק הרישום, שם הכלל מתח את **האייקון**
   במקום את הטקסט ודחף את הכפתורים החוצה. (בלי גרשי-כתר בהערה!)
   ⚠️ אין לשנות כללים גלובליים בשביל מסך אחד. */
.cert-row > :first-child { flex:1; }
.cert-row .btn-sm { width:auto; padding:0 16px; height:38px; font-size:14px; }
.cert-row .sub { font-size:12.5px; color:var(--muted); margin-top:2px; }
.row:last-child { border-bottom:none; }
.st { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.st svg { width:15px; height:15px; stroke-width:2.4; }
.st.ok { background:var(--oksoft); color:var(--ok); }
.st.no { background:var(--dngsoft); color:var(--dng); }
.row .tx { flex:1; }
.row .tt { font-size:13.5px; font-weight:600; }
.row .dt { font-size:11px; color:var(--muted); }
.act { font-size:12.5px; font-weight:700; color:var(--pri); display:flex; align-items:center; gap:4px;
  cursor:pointer; background:none; border:none; font-family:inherit; }
.act svg { width:14px; height:14px; stroke-width:2.2; }
.form-fld { margin-bottom:13px; }
.form-fld label { display:block; font-size:12.5px; font-weight:700; margin-bottom:6px; }
.form-fld input, .form-fld textarea { width:100%; border:1.5px solid var(--inline); border-radius:12px;
  padding:11px 12px; font-size:15px; font-family:inherit; color:var(--ink); outline:none; text-align:right; }
.form-fld input.narrow { width:220px; }
.form-fld textarea { min-height:96px; resize:vertical; }
.form-fld .err { color:#DC2626; font-size:12px; margin-top:4px; }
.btn-sm { height:44px; border-radius:12px; border:none; width:100%; background:var(--pri); color:#fff;
  font-size:14.5px; font-weight:700; font-family:inherit; cursor:pointer; }
.result-ok { color:var(--ok); font-size:14px; text-align:center; margin:8px 0; }
.result-err { color:var(--dng); font-size:14px; text-align:center; margin:8px 0; }
.msg-row { display:flex; gap:9px; padding:10px 2px; border-bottom:1px solid #eef2f1; align-items:flex-start; cursor:pointer; }
.msg-row:last-child { border-bottom:none; }
.msg-row .dot { width:8px; height:8px; border-radius:4px; margin-top:6px; flex-shrink:0; }
.msg-row .mt { font-size:14px; font-weight:600; }
.msg-row.unread .mt { font-weight:800; }
.msg-row .mb { font-size:12.5px; color:var(--muted); margin-top:2px; line-height:1.5; }
.msg-row .md { font-size:11px; color:var(--muted); margin-top:3px; }
.banner { background:var(--bg); border-right:4px solid var(--pri); border-radius:8px; padding:10px 12px; margin-bottom:9px; }
.banner .bt { font-size:14px; font-weight:700; }
.banner .bb { font-size:12.5px; color:var(--muted); margin-top:3px; line-height:1.5; }
.tabs { display:flex; background:var(--card); border-top:1px solid var(--line); padding:8px 6px 10px; gap:4px;
  position:sticky; bottom:0; }
.tab { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10.5px; font-weight:600;
  color:var(--muted); cursor:pointer; background:none; border:none; font-family:inherit; padding:0; }
.tab .pill { padding:5px 16px; border-radius:18px; display:flex; }
.tab.on { color:var(--pri); }
.tab.on .pill { background:var(--pri); color:#fff; }
.k { font-size:13px; color:var(--muted); width:64px; flex-shrink:0; }
.v { font-size:14px; font-weight:600; }
/* 🐞 ערכים "ברחו" לקצה השמאלי: .v הוא flex:1, ופריטים עם dir=ltr (ת.ז,
   טלפון, מייל) מתחילים משמאל בעוד שהעברית מתחילה מימין — יישור לא עקבי.
   text-align:right מצמיד את כולם לתווית, בלי לשנות את סדר הספרות. */
.row .v { text-align:right; }
.note { font-size:11.5px; color:var(--muted); margin-top:10px; line-height:1.6; }
.btn-outline { height:46px; border-radius:12px; border:1.5px solid var(--dng); color:var(--dng); width:100%;
  background:var(--card); font-size:14.5px; font-weight:700; font-family:inherit; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px; }
.empty { font-size:13px; color:var(--muted); text-align:center; padding:14px 0; }
.spin { text-align:center; color:var(--muted); padding:16px 0; font-size:13px; }
