:root {
  /* פלטה בהשראת הלוגו: כחול נייבי עמוק לפעולות עיקריות, נחושת-ברונזה כאקצנט
     משני, רקע בהיר קריר (במקום הקרם החם הקודם) - נגזר ישירות מדוגמת צבע
     שנלקחה מ-assets/logo-new.png */
  --primary: #0b3d8f;
  --primary-dark: #06254e;
  --primary-light: #e3eafa;
  --accent: #c97a3e;
  --accent-soft: #f8e8d8;
  --blob: #e7ecf5;
  --danger: #c14a3a;
  --warning: #d9a72b;
  --success: #2f8f52;
  --bg: #f4f6fa;
  --bg-2: #eceff6;
  --surface: #ffffff;
  --border: #dce2ee;
  --text: #16233d;
  --text-muted: #64708a;
  --radius: 16px;
  --shadow-color: rgba(10,20,45,.08);
  --danger-soft: #f7e2dd;
  --warning-soft: #faf0d8;
  --success-soft: #e3f0e6;
  /* גרסאות טקסט כהות יותר לשימוש כטקסט על רקע "soft" מאותו גוון - הצבעים הרגילים
     (--warning/--danger/--success/--accent) מיועדים בעיקר לרקעים מלאים/אייקונים ולא
     עוברים ניגודיות טקסט תקנית (WCAG AA, 4.5:1) כשמונחים כטקסט על ה-soft שלהם - סקירת
     נגישות (12.8.2026) מצאה את זה בתגיות (badge) ובתגית ה"scope" של כרטיסי הסטטיסטיקה. */
  --warning-text: #8a6410;
  --danger-text: #8f2e21;
  --success-text: #1f6b3a;
  --accent-text: #8a4a1e;
  /* תפריט הצד תמיד בהיר וחם (לבן עם גוון חום עדין) - זהות מותג קבועה, בלי קשר
     למצב בהיר/כהה של שאר המסך - שילוב יוקרתי של כחול נייבי (עיקרי) ונגיעות
     נחושת (מסגרת/הבלטה), במקום גוון רוז-גולד קודם שנראה עמום מדי */
  --sidebar-bg: #fbf7f3;
  --sidebar-text: #3d2513;
  --sidebar-text-muted: #7c6555;
  --sidebar-active-bg: linear-gradient(120deg, #2451c4 0%, #0b3d8f 55%, #9c6b3f 100%);
  --sidebar-border: #ecdfd4;
  --sidebar-hover-bg: rgba(11,61,143,.08);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #6e9ee8;
    --primary-dark: #a8c4f2;
    --primary-light: #1b2c4d;
    --accent: #e8ad78;
    --accent-soft: #3a2a1c;
    --blob: #1e2740;
    --danger: #e2796a;
    --warning: #e8be6a;
    --success: #5dbb7e;
    --bg: #0b0f1a;
    --bg-2: #10141f;
    --surface: #151a26;
    --border: #262c3d;
    --text: #e7ecf7;
    --text-muted: #9aa3b8;
    --shadow-color: rgba(0,0,0,.4);
    --danger-soft: #3a1f1e;
    --warning-soft: #3a2f15;
    --success-soft: #163326;
    /* במצב כהה הצבעים הרגילים כבר בהירים מספיק לניגודיות תקינה על ה-soft הכהה שלהם -
       אין צורך בגרסה כהה יותר, רק משתמשים באותם ערכים. */
    --warning-text: #e8be6a;
    --danger-text: #e2796a;
    --success-text: #5dbb7e;
    --accent-text: #e8ad78;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #6e9ee8;
  --primary-dark: #a8c4f2;
  --primary-light: #1b2c4d;
  --accent: #e8ad78;
  --accent-soft: #3a2a1c;
  --blob: #1e2740;
  --danger: #e2796a;
  --warning: #e8be6a;
  --success: #5dbb7e;
  --bg: #0b0f1a;
  --bg-2: #10141f;
  --surface: #151a26;
  --border: #262c3d;
  --text: #e7ecf7;
  --text-muted: #9aa3b8;
  --shadow-color: rgba(0,0,0,.4);
  --danger-soft: #3a1f1e;
  --warning-soft: #3a2f15;
  --success-soft: #163326;
  --warning-text: #e8be6a;
  --danger-text: #e2796a;
  --success-text: #5dbb7e;
  --accent-text: #e8ad78;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* בלי זה, כל הקשה על כפתור/קישור במגע (לא רק כאן - בכל האפליקציה) מציגה הבזק אפור-כחול
   שקוף-חלקית שמובנה בברירת המחדל של דפדפני מובייל (במיוחד WebKit/iOS) - ברגע שאחרי ההקשה
   נפתחת חלונית/מודל, ההבזק הזה חופף לאנימציית הפתיחה ונראה כמו "הבהוב" (יהונתן, 1.9.2026,
   על פתיחת פרטי חבילה בקטלוג - נשאר גם אחרי שתוקנו כל אנימציות ה-hover/pop הרלוונטיות,
   כי זה לא CSS שהאפליקציה כתבה בכלל, אלא UI-כרום מובנה של הדפדפן על הקשה). מצבי ':active'
   הרצויים כבר מוגדרים במפורש בכל מקום שצריך (לדוגמה .ops-chat-bubble:active).*/
html { -webkit-tap-highlight-color: transparent; }

/* עיצוב סרגל גלילה אחיד לכל אזורי הגלילה הפנימיים (סיידבר, מודלים, רשימות נגללות) -
   דק ועדין, מתכהה ב-hover, נגזר ממשתני הצבע הקיימים כדי להתאים אוטומטית ל-light/dark.
   לא על html/body - עמוד הרקע ממשיך לגלול מאחורי מודלים (ה-backdrop שקוף חלקית), וסרגל
   מותאם עם track שקוף שם היה מציץ מבעד לרקע הכהה ונראה כמו "חור" צף. */
*:not(html):not(body) { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*:not(html):not(body)::-webkit-scrollbar { width: 8px; height: 8px; }
*:not(html):not(body)::-webkit-scrollbar-track { background: transparent; }
*:not(html):not(body)::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
*:not(html):not(body)::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

[hidden] { display: none !important; }

/* body לבדו לא מספיק - בהרבה דפדפני מובייל האלמנט שבאמת גולל אופקית הוא html
   (documentElement), לא body. אם תוכן דינמי כלשהו (למשל שם לקוח/מוצר ארוך) יוצא
   רחב מהמסך, html גולל אופקית וחושף אלמנטים עם position:fixed בקצה - זה הבאג
   ה"קרוע" שדווח בנייד אחרי טעינת תוכן מחדש, גם בלי לגעת בתפריט הצדדי. */
html { overflow-x: hidden; max-width: 100%; }

body { transition: background-color .2s, color .2s; }

body {
  margin: 0;
  font-family: 'Assistant', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, var(--primary-light) 0%, transparent 60%),
    radial-gradient(700px 420px at -10% 110%, var(--accent-soft) 0%, transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ===== כפתורים ===== */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  transition: opacity .15s, transform .05s;
}
.btn:active { transform: scale(0.98); }
.btn .ic { width: 14px; height: 14px; vertical-align: -2px; flex-shrink: 0; }
/* פס נחושת בצד כל כפתור במערכת - אותו עיקרון הבליטה שכבר יש בכותרות עמוד/תפריט צד,
   מוחל עכשיו גם על כפתורים כדי שהמותג יהיה עקבי בכל מקום */
.btn { border-inline-start: 3px solid var(--accent); }
/* גוון קבוע ולא var(--primary)/var(--primary-dark) בכוונה - נגד דהייה במצב כהה (בדיוק
   כמו ההערה המקבילה ב-.cc-face/.sw-update-toast). "פלדה כחולה מוברשת" - נבחר מתוך
   סקיצה (design-lab-blue-buttons.html, 2.9.2026, 6 אפשרויות) אחרי שניסיון קודם עם
   קצה בהיר-חיוור (כמו הזהב) נפסל ("מזעזע" - חיוור בכחול קורא תינוקי, לא כמו קרם-שמפניה
   שעובד בזהב) - פחות רווי, יותר מאופק/מתכתי, קרוב לגוון שעון/תכשיט יוקרה. */
.btn-primary {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #4a6fa5 0%, #2c4d80 45%, #16294d 100%);
  color: #fff;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.18), 0 3px 10px rgba(22,41,77,.35);
}
.btn-primary:hover {
  opacity: .92;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.22), 0 4px 16px rgba(201,122,62,.35);
}
/* פס ברק עדין בהובר - אותו דפוס בדיוק כמו .icon-badge::after (יהונתן, 2.9.2026: "יותר
   יוקרתי... הנפשה עדינה"), לא אפקט חדש אלא שימוש חוזר במוסכמת ה"יוקרה" הקיימת. */
.btn-primary::after {
  content: ""; position: absolute; inset: -60% -20% auto auto; width: 220%; height: 220%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%);
  transform: translateX(-130%); transition: transform .55s ease; pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(25%); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
/* רקע אטום, לא שקוף - יהונתן, 2.9.2026: כפתורי "רפאים" מעל ה-watermark ברקע העמוד
   נראו מטושטשים/קשים לקריאה כשה-watermark העמוס מתחתיהם "בוקע" דרך הרקע השקוף. */
.btn-ghost { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
/* בורר ספק/חברה בטופס עסקה ישירה - היה טבעת בצבע המותג הייחודי של כל חברה (בנוסף ללוגו
   הצבעוני שכבר בפנים) - יהונתן (2.9.2026): "למה זה צבעוני... נראה קצת צעצועי, יש על כל
   כפתור את הלוגו של אותה חברה, נראה לי מספיק ברור" - הלוגו כבר מזהה, הבחירה מתבלטת
   בזהב האחיד של המותג במקום בצבע-לפי-מותג (אותו דפוס בדיוק כמו
   .packages-catalog-category-tab.active). border-inline-start:none מבטל את פס הנחושת
   הכללי של .btn - לא רלוונטי כאן, פיל נקי כמו טאבי הקטגוריה. */
.ds-company-btn, .ds-provider-btn {
  border-inline-start: none; background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border); transition: all .15s;
}
.ds-company-btn.active, .ds-provider-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.22), 0 3px 10px rgba(201,149,74,.35);
}
/* לשוניות סטטוס הרשמה בלקוחות - צ'יפ סינון קליל, לא כפתור פעולה מלא (ר' הערת יהונתן
   על עומס חזותי במסך לקוחות) - אותה פונקציונליות בדיוק, פחות "צעקני" כשלא פעיל */
.customer-registration-tab-btn { border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.customer-registration-tab-btn.btn-ghost { background: var(--bg-2); border-color: transparent; }
.customer-registration-tab-btn.btn-ghost:hover { background: var(--border); }

.bsd-bar { position: fixed; top: 16px; right: 16px; font-size: 12px; color: var(--text-muted); letter-spacing: .5px; z-index: 30; }

/* ===== מסך התחברות ===== */
/* היה גרדיאנט כחול-כהה מלא (#12469e עד כמעט שחור) עם שני "זוהרים" כתום/כחול - עוצב
   כמסך-פתיחה דרמטי, בזמן ששאר האפליקציה (סיידבר/אזור ראשי) תמיד בהיר עם כחול/זהב
   כנגיעות בלבד (כפתורים/אייקונים), לא כרקע מלא. יהונתן (1.9.2026, אחרי 2 ניסיונות
   קודמים שרק עידנו את אותו רקע כהה): "לעבור לרקע בהיר... כחול/זהב רק כנגיעות עדינות" -
   באמצעות var(--bg)/var(--sidebar-bg) הקיימים, כך שגם מצב כהה (data-theme) ממשיך
   לעבוד אוטומטית בלי קוד נוסף. ה"זוהרים" הוסרו לגמרי - הם עבדו רק על רקע כהה. */
.login-screen {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--sidebar-bg) 0%, var(--bg) 100%);
}
.login-screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url('../assets/logo-watermark.png');
  background-repeat: no-repeat; background-position: 108% 8%; background-size: 620px;
  opacity: .12;
}
@media (max-width: 720px) {
  .login-screen::before { background-position: 85% 4%; background-size: min(85vw, 460px); }
}
.login-screen .bsd-bar { color: var(--text-muted); z-index: 2; }
.login-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: 24px;
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  box-shadow: 0 20px 50px var(--shadow-color), 0 0 0 1px var(--border);
}
.login-card::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px;
  /* גוון זהב אחיד בלבד - היה מעבר כחול-לזהב (יהונתן, 1.9.2026: "לא אוהב... 2 צבעים
     שמתמזגים"), אותה גזירת גוונים בדיוק כמו .icon-badge-gold, לעקביות בשפה העיצובית. */
  background: linear-gradient(90deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%);
}
.brand { text-align: center; margin-bottom: 28px; }
.tagline { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 12px 0 0; }
.brand-logo {
  display: block; max-width: 220px; width: 100%; height: auto; margin: 0 auto;
  background: #fff; border-radius: 16px;
  box-shadow: 0 6px 20px var(--shadow-color), 0 0 0 1px rgba(201,122,62,.25);
}

.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-muted); }
.login-form label.remember-me-label { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; margin-top: -4px; }
.login-form input {
  padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px;
  background: var(--surface); color: var(--text);
}
.login-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.password-field-wrap { position: relative; display: flex; }
.password-field-wrap input { width: 100%; padding-inline-end: 40px; }
.password-toggle-btn {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 17px; padding: 6px 8px;
  color: var(--text-muted); line-height: 1; border-radius: 6px;
}
.password-toggle-btn:hover { color: var(--text); background: var(--primary-light); }
.error-msg { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.config-warning { margin-top: 18px; font-size: 12px; color: var(--warning); background: var(--warning-soft); padding: 10px 12px; border-radius: 8px; line-height: 1.6; }
.config-warning code { background: rgba(127,127,127,.15); padding: 1px 5px; border-radius: 4px; }
.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio-option { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.radio-option input { margin-top: 3px; }
.operator-check-result { background: var(--primary-light); padding: 18px 12px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--primary); }
.carrier-result-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.carrier-result-row { display: flex; align-items: center; gap: 10px; }
.carrier-result-name { font-size: 22px; font-weight: 800; color: var(--text); }

.operator-check-balance-low { color: var(--warning); font-weight: 600; }

.operator-check-history-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.operator-check-history-empty { color: var(--text-muted); font-size: 13px; margin: 0; }
.operator-check-history-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 6px; background: var(--primary-light); flex-wrap: wrap; }
.operator-check-history-row .history-phone { font-weight: 600; }
.operator-check-history-row .history-carrier { color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.operator-check-history-row .history-time { margin-inline-start: auto; color: var(--text-muted); font-size: 12px; }
.history-on-file { color: var(--text-muted); font-size: 12px; }
.history-row-clickable { cursor: pointer; }
.history-row-clickable:hover { background: var(--primary-light); }
.history-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.history-status-ok { background: var(--success-soft); color: var(--success-text); }
.history-status-mismatch { background: var(--warning-soft); color: var(--warning); }
.history-status-error { background: var(--danger-soft); color: var(--danger); }

/* ===== מעטפת אפליקציה: תפריט צד ימני ===== */
.app-shell { min-height: 100vh; display: flex; }

/* סמל הלוגו (בלי הכיתוב, רקע שקוף אמיתי) כרקע ברקע כל המערכת - מאחורי כל
   התוכן (z-index שלילי), לא מפריע לקריאות כי הכרטיסים/משטחים (var(--surface))
   אטומים ומכסים אותו; נראה בבירור ברווחים בין הכרטיסים ובשוליים */
.app-watermark {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url('../assets/logo-watermark.png');
  background-repeat: no-repeat; background-position: center 50%; background-size: min(72vw, 620px);
  opacity: .3;
}
:root[data-theme="dark"] .app-watermark { opacity: .38; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-watermark { opacity: .38; }
}
@media (max-width: 720px) {
  .app-watermark { background-size: min(90vw, 380px); background-position: center 42%; }
}
.side-nav {
  flex: none; width: 220px; display: flex; flex-direction: column; gap: 4px;
  background: var(--sidebar-bg); border-inline-end: 1px solid var(--sidebar-border);
  /* ריפוד תחתון + safe-area - יהונתן (2.9.2026): "תוריד קצת למטה את הגדרות המשתמש" -
     בלעדיו השורה האחרונה (הגדרות משתמש) יושבת צמוד ממש לקצה התחתון של המגירה בנייד,
     כמעט בלי מרווח נשימה (ולעיתים מתחת לפס המחוות של הטלפון). */
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0)); position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  /* overflow-x:hidden מפורש - יהונתן (2.9.2026): "תבטל את הגלילה לצדדים בתפריט". בלעדיו,
     לפי מפרט ה-CSS, overflow-y:auto לבד (בלי overflow-x מוצהר) גורם ל-overflow-x לחשב
     גם הוא ל-auto - וברייל המכווץ (65px) התוכן חורג ב-9px, מספיק כדי להראות סקרולבר
     אופקי מיותר. hidden פשוט קוצץ את החריגה הזעירה במקום לגלול אליה. */
  overflow-x: hidden;
}
.side-brand {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-bottom: 6px; margin-bottom: 0;
  border-bottom: 1px solid var(--sidebar-border);
}
.nav-rail-toggle {
  position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--sidebar-border); color: var(--sidebar-text-muted);
  cursor: pointer; box-shadow: 0 2px 6px var(--shadow-color); padding: 0;
}
.nav-rail-toggle .ic { width: 12px; height: 12px; transition: transform .15s; }

/* לוגו מלא (סמל + שם + סלוגן בתוך התמונה עצמה) */
.brand-logo-wrap {
  display: inline-flex; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow-color), 0 0 0 1px var(--sidebar-border);
}
.brand-logo-img { display: block; width: 100%; height: auto; }
.side-brand-logo { width: 84px; }
/* גרסה צמודה למגירת הנייד בלבד - ר' ההערה ב-index.html וב-@media(max-width:720px) למטה */
.side-brand-logo-mobile { display: none; }
.side-nav .app-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { display: flex; flex-direction: column; }
.nav-group-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 12px 5px;
  background: transparent; border: none; color: var(--sidebar-text-muted);
  font-size: 11px; font-weight: 800; letter-spacing: .02em; cursor: pointer;
}
.nav-chev { width: 12px; height: 12px; margin-inline-start: auto; transition: transform .15s; flex: none; }
.nav-group.open .nav-chev { transform: rotate(180deg); }
.nav-group-body { display: flex; flex-direction: column; overflow: hidden; max-height: 0; transition: max-height .2s ease; }
.nav-group.open .nav-group-body { max-height: 400px; }

/* ===== עריכת תפריט בגרירה (design-lab-5.html, "סדר אותו בעצמך") ===== */
.nav-edit-toolbar {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; margin-bottom: 4px;
  background: var(--accent-soft); border-bottom: 1px solid var(--sidebar-border);
}
.nav-edit-hint { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--sidebar-text-muted); line-height: 1.5; }
.nav-edit-actions { display: flex; gap: 6px; }
.nav-edit-actions .btn { flex: 1; justify-content: center; }
.app-nav.editing .nav-group { border: 1px dashed var(--sidebar-border); border-radius: 8px; margin-bottom: 6px; padding-bottom: 4px; }
.app-nav.editing .nav-group-body { max-height: none !important; overflow: visible; }
.app-nav.editing .nav-group-head { cursor: grab; padding-inline-end: 6px; }
.nav-grip { width: 13px; height: 13px; flex: none; opacity: .5; cursor: grab; }
.nav-group-label[contenteditable] {
  cursor: text; border-radius: 4px; padding: 1px 4px; outline: none;
}
.nav-group-label[contenteditable]:focus { background: var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.nav-group-del {
  display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto;
  width: 20px; height: 20px; border-radius: 50%; border: none; background: transparent; color: var(--sidebar-text-muted); cursor: pointer;
}
.nav-group-del:hover { background: var(--danger-soft); color: var(--danger); }
.app-nav.editing .app-nav a { cursor: grab; }
.app-nav.editing .app-nav a[draggable]:active { opacity: .5; }
.nav-addgroup {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px dashed var(--sidebar-border); border-radius: 8px; padding: 10px;
  font-size: 12px; color: var(--sidebar-text-muted); margin-top: 4px; transition: border-color .15s, color .15s, background-color .15s;
}
.nav-addgroup.dragover { border-color: var(--accent); color: var(--accent-text, var(--text)); background: var(--accent-soft); }
.side-nav .app-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 15px; border-radius: 999px; color: var(--sidebar-text-muted); font-weight: 700;
  font-size: 12.5px; line-height: 1.25; border-inline-start: 3px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.ic {
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px;
}

/* ===== שפת הסמלים: עיגול זהב מוברש (כלים/פעולות), כחול (זהות), מתכת עמומה (לא פעיל) =====
   טבעת אור פנימית + מרקם + הבהוב-בריחוף. מכבים את כל התנועה למי שביקש פחות תנועה במערכת. */
.icon-badge {
  position: relative; display: grid; place-items: center; border-radius: 50%; flex: none;
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.22), 0 1px 3px rgba(0,0,0,.15);
  padding: 0; border: none; font: inherit;
}
.icon-badge .ic { width: 55%; height: 55%; position: relative; z-index: 1; }
.icon-badge::after {
  content: ""; position: absolute; inset: -60% -20% auto auto; width: 220%; height: 220%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.55) 50%, transparent 58%);
  transform: translateX(-130%); transition: transform .55s ease;
}
.icon-badge:hover::after { transform: translateX(25%); }
.icon-badge-gold { width: 32px; height: 32px; background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); color: #fff; }
.icon-badge-metal { width: 24px; height: 24px; background: linear-gradient(135deg,#d8d2c4 0%,#b7ae9a 60%,#948a75 100%); color: #5c5445; }
.icon-badge-blue { width: 32px; height: 32px; background: linear-gradient(135deg,#3f6fd8 0%,#0b3d8f 100%); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .icon-badge::after { transition: none; }
}

/* ===== קו זהב נמתח מתחת לכותרת עמוד, בכל כניסה למסך ===== */
.page-head h2 { position: relative; display: flex; align-items: center; gap: 12px; }
.page-head-icon { width: 34px; height: 34px; flex: none; }
.page-head h2::after {
  content: ""; position: absolute; inset-inline-start: 14px; bottom: -6px; height: 2px; width: 64px;
  background: linear-gradient(90deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%);
  animation: goldStretch .5s .1s ease-out backwards;
}
@keyframes goldStretch { from { width: 0 } to { width: 64px } }
@media (prefers-reduced-motion: reduce) {
  .page-head h2::after { animation: none; }
}

/* ===== בועת התפעול הצפה: נשימה איטית תמידית (זהב מוברש בולט יותר עם תנועה), וטבעת קשב חד-פעמית על הודעה חדשה ===== */
@media (prefers-reduced-motion: no-preference) {
  .ops-chat-bubble { animation: opsBreathe 3.2s ease-in-out infinite; }
}
@keyframes opsBreathe { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-3px) } }
.ops-chat-bubble.ping::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  animation: opsRing 1s ease-out 1 forwards;
}
@keyframes opsRing { from { transform: scale(1); opacity: .8 } to { transform: scale(1.7); opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .ops-chat-bubble, .ops-chat-bubble.ping::before { animation: none !important; }
}

/* ===== ספריית הנפשות משלימה (מ-design-lab-5.html, "שני הליקויים שדיווחת") - כל אחת
   מנפישה רק opacity/transform, תקרה של 12 שורות למניעת עומס, ומכבה עצמה תחת
   prefers-reduced-motion. שני האפקטים "רצועת ספקים"/"ברק זכוכית" שהוצגו שם כבאגים
   כבר תוקנו בפרודקשן אחרת (js/packagesCatalog.js + package-glass-shift למעלה) -
   בכוונה לא הוחזרו לגרסה המוצעת שם, כי הגרסה הנוכחית פתרה גם בעיית FPS אמיתית. ===== */

/* כניסה מדורגת רכה - לשורות רשימה בטעינה ראשונה (לקוחות/קווים/משימות) */
@keyframes list-row-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.stagger-in { animation: list-row-in .35s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(min(var(--i, 0), 12) * 45ms); }

/* כניסה מהצד - לרשימה שמתחלפת אחרי סינון/חיפוש, לא לטעינה ראשונה */
@keyframes list-row-in-side { from { opacity: 0; transform: translateX(var(--slide-from, 14px)); } to { opacity: 1; transform: none; } }
.stagger-in-side { animation: list-row-in-side .3s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(min(var(--i, 0), 12) * 40ms); }

@media (prefers-reduced-motion: reduce) {
  .stagger-in, .stagger-in-side { animation: none; }
}

/* ברק על מספר - מעבר זהב חד-פעמי על מספר משמעותי בכניסה למסך (עמלות/הכנסות) */
@keyframes number-shine-sweep { from { background-position: 200% 0; } to { background-position: -20% 0; } }
.number-shine {
  background-image: linear-gradient(100deg, currentColor 35%, var(--accent-bright, #e8c27a) 50%, currentColor 65%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .number-shine { animation: number-shine-sweep 1.3s ease-out 1; }
}

/* מספר שמתחדד - לערך שכבר ידוע בטעינה (למשל ספירת קווים פעילים) */
@keyframes number-blur-in { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.number-blur-in { animation: number-blur-in .5s ease-out backwards; }
@media (prefers-reduced-motion: reduce) {
  .number-shine, .number-blur-in { animation: none; filter: none; }
}

/* כרטיס שנפתח - הגדלה עדינה של 3% ברגע הלחיצה, לפני שנפתח חלון/מעבר */
@keyframes card-pop-once { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
.card-pop-once { animation: card-pop-once .22s ease; }
@media (prefers-reduced-motion: reduce) {
  .card-pop-once { animation: none; }
}

/* קפיצת מונה - כשמספר בתגית עולה (ר' js/utils.js bumpBadge) */
@keyframes badge-tick { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.badge-tick { animation: badge-tick .35s cubic-bezier(.3,1.4,.6,1); }
@media (prefers-reduced-motion: reduce) {
  .badge-tick { animation: none; }
}

/* קיפול פנימה - לפתיחת קבוצת ניווט בתפריט הצד בלבד (לא לתוכן, אפקט חזק מדי לשימוש תדיר) */
.nav-group-body { transform-origin: top; }
@media (prefers-reduced-motion: no-preference) {
  .nav-group.opening .nav-group-body { animation: nav-group-flip .3s ease-out; }
}
@keyframes nav-group-flip { from { transform: rotateX(-90deg); opacity: 0; } to { transform: rotateX(0); opacity: 1; } }

.side-nav .app-nav a:hover {
  background: var(--sidebar-hover-bg); color: var(--sidebar-text); border-inline-start-color: var(--accent);
}
/* גוון זהב אחיד (כמו icon-badge-gold) - היה גרדיאנט חום-כהה שונה ("חאקי", יהונתן 2.9.2026),
   לא תואם לזהב העשיר שכבר משמש בטאבי הקטגוריה/כרטיס אשראי/badges בכל שאר המערכת. */
.side-nav .app-nav a.active {
  background: linear-gradient(135deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%);
  color: #fff; border-inline-start-color: var(--accent);
  box-shadow: 0 2px 8px rgba(201,149,74,.35);
}
.side-nav .app-nav a.active .icon-badge {
  background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.side-spacer { flex: 1; min-height: 4px; }
.side-user { display: flex; flex-direction: column; gap: 10px; font-size: 12px; color: var(--sidebar-text-muted); }
.side-user .btn-sm { padding: 5px 9px; font-size: 12px; }

/* ===== כלי מערכת בתחתית התפריט: 3 קבוצות (תצוגה ומכשיר / נתונים / חשבון) במקום
   שורה אחת דחוסה של 7 כפתורים בלי היררכיה - כל קבוצה מופרדת בקו דק ===== */
.side-tool-groups { display: flex; flex-direction: column; gap: 8px; }
.side-tool-group {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--sidebar-border);
}
.side-tool-groups > .side-tool-group:first-child { padding-top: 0; border-top: none; }
.side-tool-btn { flex-shrink: 0; cursor: pointer; border: none; }

.notifications-btn {
  position: relative; background: transparent; border: none; color: var(--text);
  font-size: 18px; cursor: pointer; padding: 6px;
}
.notifications-btn-side {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; border: 1px solid var(--sidebar-border); border-radius: 999px;
  padding: 3px 14px; font-size: 12.5px; font-weight: 700; color: var(--sidebar-text);
  background: transparent; transition: border-color .15s, background-color .15s;
}
.notifications-btn-side:hover { border-color: var(--accent); background: var(--sidebar-hover-bg); }
/* ===== קיפול תפריט לרייל אייקונים - דסקטופ בלבד, לא נוגע בהתנהגות הנייד ===== */
@media (min-width: 769px) {
  .side-nav.rail { width: 76px; padding-inline: 10px; }
  .side-nav.rail .nav-rail-toggle .ic { transform: rotate(180deg); }
  .side-nav.rail .nav-group-head { display: none; }
  .side-nav.rail .nav-group-body { max-height: none; overflow: visible; display: flex; flex-direction: column; gap: 6px; }
  .side-nav.rail .nav-label, .side-nav.rail .user-email, .side-nav.rail #device-activator-btn, .side-nav.rail .user-menu-caption { display: none; }
  .side-nav.rail .app-nav a { justify-content: center; padding-inline: 0; padding-block: 4px; }
  .side-nav.rail .icon-badge { width: 32px !important; height: 32px !important; margin: 0 auto; }
  .side-nav.rail .side-tool-group { flex-wrap: wrap; justify-content: center; }
  .side-nav.rail #logout-btn { width: auto; padding: 6px 8px; }
  /* בלי כותרת קבוצה: כל קבוצה מקבלת "כרטיס" משלה עם רקע עדין, כדי שהעין תבחין בין הקבוצות
     בלי צורך בטקסט - והקבוצה עם המסך הפעיל מודגשת, כך שרואים מיד "איפה אני" גם מכווץ. */
  /* var(--sidebar-hover-bg) הוא tint שקוף ב-8% בלבד - נועד להבליט עדינות בהובר על שורה
     בודדת, אבל כרקע-קבוע לקבוצה שלמה הוא כמעט בלתי-נראה על גבי sidebar-bg הבהיר. התוצאה:
     רק הקבוצה הפעילה (עם ה-accent-soft הבולט) נראית כמו "כרטיס" אמיתי, וכל שאר הקבוצות
     נראות כמו עיגולים חופשיים בלי מסגרת - לא סימטרי (יהונתן, 1.9.2026: "מקופל זה לא
     סימטרי ולא מסודר"). מסגרת קבועה במקום רקע-כמעט-שקוף נותנת לכל קבוצה את אותה "כרטיס"
     ברור, בלי קשר אם היא פעילה.
  */
  .side-nav.rail .nav-group {
    padding: 8px 4px; margin-bottom: 6px; border-radius: var(--radius);
    border: 1px solid var(--sidebar-border);
  }
  .side-nav.rail .nav-group:last-child { margin-bottom: 0; }
  .side-nav.rail .nav-group:has(.active) { background: var(--accent-soft); border-color: transparent; }
  .side-nav.rail .app-nav a { position: relative; }
  .side-nav.rail .app-nav a .notifications-badge {
    position: absolute; top: 0; inset-inline-end: 18px; margin: 0; z-index: 1;
  }
}

/* ===== שורה עליונה: חיפוש, כלי בדיקה מהירים, התראות - הועברו מתחתית התפריט ===== */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
/* היה עם logo-new.png (הבאנר הרחב, 1448x1086) דחוס ל-34px - כמעט בלתי נראה (יהונתן,
   1.9.2026). הוחלף ל-logo-icon.png (הריבוע הצמוד שכבר משמש כ-favicon) וגדל מעט. */
.topbar-brand { width: 42px; height: 42px; padding: 3px; border-radius: 10px; flex: none; }
.topbar-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.topbar-btn:hover { background: var(--primary-light); color: var(--text); border-color: var(--primary); }
.topbar-icon-btn { position: relative; padding: 8px; }
.topbar-icon-btn .notifications-badge { position: absolute; top: 2px; left: 2px; }
.topbar-connector-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.side-user-actions .btn-ghost {
  background: transparent; color: var(--sidebar-text-muted); border-color: var(--sidebar-border);
}
.side-user-actions .btn-ghost:hover { background: var(--sidebar-hover-bg); color: var(--sidebar-text); border-color: var(--accent); }
#device-activator-btn {
  background: transparent; color: var(--sidebar-text-muted); border-color: var(--sidebar-border); font-size: 11.5px;
}
#device-activator-btn:hover { background: var(--sidebar-hover-bg); color: var(--sidebar-text); border-color: var(--accent); }
.notifications-badge {
  position: absolute; top: -4px; left: -4px; min-width: 17px; height: 17px; padding: 0 4px;
  /* צבע קבוע, לא var(--danger) - זה הופך לגוון בהיר במצב כהה ומקשה על קריאת המספר הלבן */
  border-radius: 999px; background: #c14a3a; color: #fff; font-size: 10.5px; font-weight: 800;
  /* inline-flex ולא flex - במקומות שדורסים position ל-static (למשל בתוך קישור ניווט),
     flex רגיל הוא block-level ומותח את התג לכל רוחב ההורה במקום להישאר עיגול קטן וצמוד */
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.notifications-btn-side .notifications-badge { position: static; margin-inline-start: 2px; }
.app-nav a .notifications-badge { position: static; margin-inline-start: 6px; }
/* כפתור-סמל קומפקטי בראש עמוד (למשל בקשות הנחה/הזמנות ספקים ב"חנות וניהול מלאי") -
   ריבועי יותר מכפתור טקסט רגיל, כדי שאייקון בודד לא ישב בתוך גלולה רחבה ומיותרת */
.icon-badge-btn { padding: 8px 14px; font-size: 17px; line-height: 1; }
/* "משימות לטיפול" הוא ספירת פריטים לטיפול, לא באמת "שגיאה/סכנה" - נחושת עדיפה על אדום חד */
#tasks-badge { background: #c97a3e; }
.notification-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notification-row:last-child { border-bottom: none; }
.notification-row:hover { background: var(--bg); }
.notification-row .msg { font-size: 13.5px; color: var(--text-muted); }
.notification-row .time { font-size: 11.5px; color: var(--text-muted); }
.notification-row.unread .msg { color: var(--text); font-weight: 700; }
.notification-row.unread .msg::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); margin-inline-end: 7px; vertical-align: middle;
}

.view-root { flex: 1; min-width: 0; padding: 26px 28px; max-width: 1100px; width: 100%; }
.view-root.wide { max-width: 1600px; }

/* ===== כרטיסים / פריסה כללית ===== */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.page-head h2 {
  margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em;
  padding-inline-start: 14px;
  border-inline-start: 4px solid var(--accent);
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }

/* ===== טבלה אחידה: פסים מתחלפים, כותרת דביקה, הדגשה בריחוף - ר' reportTableHtml ב-utils.js ===== */
.data-table { border-collapse: separate; border-spacing: 0; }
.data-table th, .data-table td {
  padding: 8px 12px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--bg-2); color: var(--text-muted);
  font-size: 12px; font-weight: 700;
}
.data-table tbody tr:nth-child(even) { background: var(--bg-2); }
.data-table tbody tr:hover { background: var(--primary-light); }
.section-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--text); }

/* עטיפה לטבלאות רחבות (מחירון/עמלות/דוחות וכו') - גלילה אופקית + רמז חזותי
   (צל עדין בקצה, בצבע --border כדי שיעבוד נכון גם בהיר וגם כהה) שיש עוד תוכן
   מוסתר - כדי שלא ייראה שעמודה (כמו "מחיר") נעלמה סתם במסך צר. טכניקת CSS
   טהורה (בלי JS): שני gradient של "מסכה" בצבע הרקע שנעים עם הגלילה עצמה
   (background-attachment: local) מבטלים את הצל בקצה שבו באמת אין עוד לגלול,
   ושני gradient של "צל" קבועים ביחס לקופסה (attachment: scroll) שנשארים
   גלויים כל עוד יש תוכן מוסתר באותו צד. */
.table-scroll {
  overflow-x: auto;
  background:
    linear-gradient(to right, var(--surface) 30%, transparent),
    linear-gradient(to left, var(--surface) 30%, transparent) 100% 0,
    linear-gradient(to right, var(--border), transparent),
    linear-gradient(to left, var(--border), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 10px 100%, 10px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* טבלאות מחירון/עמלות (js/pricelist.js) + טבלאות דוחות משותפות (reportTableHtml ב-
   js/utils.js, המשמשת גם את js/reports.js וגם את לשונית "מחירון מוצרים" ב-pricelist.js
   שלא בנתה טבלה משלה) - קריאות בנייד בלי גלילה אופקית: מתחת ל-720px כל שורה הופכת
   לכרטיס אנכי עם תווית לכל שדה, במקום טבלה רחבה שדורשת גלילה אופקית. */
@media (max-width: 720px) {
  .pricelist-table, .report-table-responsive { width: 100% !important; min-width: 0 !important; }
  .pricelist-table thead, .report-table-responsive thead { display: none; }
  .pricelist-table, .pricelist-table tbody, .pricelist-table tr, .pricelist-table td,
  .report-table-responsive, .report-table-responsive tbody, .report-table-responsive tr, .report-table-responsive td {
    display: block; width: 100%;
  }
  .pricelist-table tr, .report-table-responsive tr {
    margin-bottom: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 4px 10px;
    background: var(--surface);
  }
  .pricelist-table tbody tr:nth-child(even), .report-table-responsive tbody tr:nth-child(even) { background: var(--surface); } /* מבטל את הפסים הכהים-בהירים המתחלפים של .data-table - לא נחוץ בפריסת כרטיסים */
  .pricelist-table td, .report-table-responsive td {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 7px 2px; border-bottom: 1px dotted var(--border); white-space: normal !important;
    text-align: left;
  }
  .pricelist-table td:last-child, .report-table-responsive td:last-child { border-bottom: none; }
  .pricelist-table td[data-label]::before, .report-table-responsive td[data-label]::before {
    content: attr(data-label); font-weight: 700; color: var(--text-muted); font-size: 12px;
    flex-shrink: 0; text-align: right;
  }
  .pricelist-table td:not([data-label]), .pricelist-table td[data-label=""],
  .report-table-responsive td:not([data-label]), .report-table-responsive td[data-label=""] { justify-content: flex-end; }
}

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-bottom: 24px; }
.report-group-title {
  font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  margin: 28px 0 12px; padding-top: 18px; border-top: 1px solid var(--border);
}
.report-group-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.reports-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px,1fr)); gap: 16px; align-items: start; }
.stat-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat-card::after {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; height: 3px; width: 100%;
  /* גוון זהב אחיד בלבד - ר' ההערה המקבילה ב-.login-card::before */
  background: linear-gradient(90deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%); z-index: 1;
}
.stat-card .num { position: relative; z-index: 1; font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-card .label { position: relative; z-index: 1; font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-card .scope {
  position: relative; z-index: 1; display: inline-block; font-size: 10.5px; font-weight: 700;
  color: var(--accent-text); background: var(--accent-soft); border-radius: 20px; padding: 2px 8px; margin-top: 8px;
}
.stat-card-clickable { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.stat-card-clickable:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.stat-card-clickable.stat-card-active { border-color: var(--primary); background: var(--primary-light); }

/* ===== התראות ===== */
.alerts-list { display: flex; flex-direction: column; gap: 10px; }
.alert-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
}
.alert-severity { width: 8px; align-self: stretch; border-radius: 4px; background: var(--border); }
.alert-severity.warning { background: var(--warning); }
.alert-severity.danger { background: var(--danger); }
.alert-card.unread { background: var(--primary-light); border-color: var(--primary); }
.alert-card.unread .alert-severity { background: var(--primary); }
.alert-body { flex: 1; display: flex; align-items: center; gap: 8px; }
.alert-title { font-weight: 600; font-size: 14px; color: var(--text-muted); }
.alert-card.unread .alert-title { font-weight: 700; color: var(--text); }
.alert-unread-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: #fff; background: #0b3d8f;
  padding: 2px 8px; border-radius: 999px;
}
.alert-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.alert-date { font-size: 13px; font-weight: 700; white-space: nowrap; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

#activity-list { max-height: 380px; overflow-y: auto; }

.progress-show-more { text-align: center; margin-top: 12px; }
.pagination-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 16px; }
.pagination-bar .page-indicator { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

/* ===== שלד טעינה (skeleton) - במקום טקסט "טוען..." ===== */
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.skeleton { background: var(--border); border-radius: 6px; animation: skeleton-pulse 1.3s ease-in-out infinite; }
.skeleton-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px;
}
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; }
.skeleton-stat { padding: 16px; }

/* ===== טבלת/רשימת לקוחות ===== */
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.search-bar input { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text); }
.search-bar select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text); }
.customer-list { display: flex; flex-direction: column; gap: 10px; }
.customer-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--surface);
  border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); border-radius: 14px; padding: 14px 16px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.customer-row:hover { border-color: var(--primary); border-inline-start-color: var(--accent); cursor: pointer; transform: translateY(-2px); box-shadow: 0 8px 20px var(--shadow-color); }
@media (prefers-reduced-motion: reduce) { .customer-row { transition: none; } .customer-row:hover { transform: none; } }
.customer-list.grid-view {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.customer-list.grid-view .customer-row {
  flex-direction: column; align-items: flex-start; text-align: start; gap: 8px;
}
.customer-list.grid-view .avatar { width: 48px; height: 48px; font-size: 17px; }
.customer-list.grid-view .customer-info { width: 100%; }
.customer-list.grid-view .pagination-bar { grid-column: 1 / -1; }
.product-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.customer-list.grid-view .product-thumb { width: 100%; height: 140px; border-radius: 10px; }
@media (max-width: 720px) {
  .customer-list.grid-view { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); color: #fff;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.avatar .ic { width: 20px; height: 20px; }
.customer-info { flex: 1 1 140px; min-width: 140px; }
.customer-name { font-weight: 700; font-size: 15px; }
.customer-meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--primary-light); color: var(--primary-dark);
  white-space: nowrap;
}
.badge .ic { width: 12px; height: 12px; }
.badge.warning { background: var(--warning-soft); color: var(--warning-text); }
.badge.danger { background: var(--danger-soft); color: var(--danger-text); }
.badge.muted { background: var(--border); color: var(--text-muted); }
.badge.success { background: var(--success-soft); color: var(--success-text); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }

/* ===== טפסים ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* כשאחרי הגריד יש שורת form-actions-sticky (יהונתן, 20.8.2026, ר' בדיקה עם Playwright) -
   ה-sticky צמוד ל-bottom:0 של .modal-content לאורך כל טווח הגלילה, לא רק בסופה, ויש לו
   background אטום - כלומר בכל נקודת גלילה הוא מכסה פיזית כל שדה שנמצא כרגע ב-~80px
   התחתונים של האזור הנראה. בלי padding-bottom שמור מראש בגריד, השדה שקורה להיות שם
   (למשל "עיר"/"אימייל" בגלילה 0, "הערות" בסוף) נחתך חלקית מתחת לכפתורים. 120px גדול
   מגובה הפוטר גם כשהוא נשבר לשתי שורות (מיזוג עם לקוח כפול וכו') - המרווח הנוסף בתחתית
   נראה רק בטפסים שבכלל גוללים, לא משפיע על טפסים קצרים בלי form-actions-sticky בעקבותיהם. */
.form-grid:has(+ .form-actions-sticky) { padding-bottom: 120px; }
.form-grid.full, .form-field.full { grid-column: 1 / -1; }
.tier-row-grid { grid-template-columns: 1fr 1fr auto; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; width: 100%;
  background: var(--surface); color: var(--text);
}
.form-field textarea { resize: vertical; min-height: 60px; }
.form-field textarea.readonly-textarea { background: var(--bg-2); color: var(--text-muted); cursor: default; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.autocomplete-wrap { position: relative; }
.autocomplete-menu {
  position: absolute; top: calc(100% + 4px); right: 0; left: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 28px var(--shadow-color); max-height: 260px; overflow-y: auto;
}
.autocomplete-item {
  padding: 10px 12px; font-size: 13.5px; line-height: 1.5; white-space: normal;
  cursor: pointer; border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--bg); }

.signature-canvas {
  width: 100%; height: 180px; border: 2px dashed var(--border); border-radius: 10px;
  background: #fff; cursor: crosshair; touch-action: none; display: block;
}

/* ===== מודאל ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,20,35,.5); display: flex;
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 100;
  animation: modalFadeIn .15s ease;
  /* בלי זה, גלילה בתוך המודל שמגיעה לקצה (למעלה/למטה) "משרשרת" (scroll chaining) החוצה
     לעמוד הרשימה מתחת ל-backdrop, וגורמת לו לגלול יחד עם המודל - התנהגות ברירת מחדל
     מוזרה של הדפדפן שקיימת בכל שני אלמנטים עם overflow:auto מקוננים זה בזה. */
  overscroll-behavior: contain;
}
.modal-content {
  background: var(--surface); border-radius: 20px; padding: 0; width: 100%; max-width: 720px;
  /* פס אקסנט בצד - אותה מוסכמה עיצובית שיש לכפתורים/כרטיסים בכל המערכת (ר' .btn,
     .card-accent וכו') */
  border-inline-start: 3px solid var(--accent);
  box-shadow: 0 20px 60px var(--shadow-color);
  animation: modalFadeIn .18s ease;
  /* .modal-content עצמו כבר לא גולל - זו רק המעטפת המעוצבת (רדיוס/צל/רקע) שמחזיקה
     כותרת קבועה + .modal-scroll-body גולל + פוטר קבוע כשלושה flex items אמיתיים
     (ר' restructureModalContent ב-app.js openModal, שמפרק כל HTML של מודל למבנה הזה
     אוטומטית). לפני זה .modal-content היה גם המעטפת המעוגלת וגם אלמנט הגלילה בו-זמנית,
     וזה בדיוק מה שיצר את שתי התקלות שהמבנה הזה פותר: (1) title-row/form-actions-sticky
     ניסו "להידבק" לקצה עם position:sticky+מרג'ין שלילי, אבל בפועל נשאר פס padding גולל
     דרכו - "רווח" שרואים בו תוכן שכבר אמור להיות מוסתר מאחורי הפס הדביק. (2) פס גלילה
     טבעי הוא ריבועי ולא יכול לכבד border-radius, אז הפינה בצד הגלילה יצאה מרובעת. עכשיו
     כש-.modal-content לא גולל, overflow:hidden עליו בטוח (שום דבר לא נחתך בטעות) וחותך
     את פס הגלילה של modal-scroll-body לצורת הפינות המעוגלות משני הצדדים באופן אחיד. */
  display: flex; flex-direction: column;
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
  overflow: hidden;
}
/* מודלים עם טבלת נתונים רחבה (כמו ייבוא מאקסל) - מנצלים את רוב רוחב המסך במקום
   שהטבלה תיחתך/תגלול אופקית בתוך מודל צר */
.modal-content.wide { max-width: min(1400px, calc(100vw - 32px)); }
/* חצי גלילה אופקית לטבלה רחבה בתוך מודל (ר' excel-import-table-scroll) - קבועים
   במיקום אנכי אחד (אמצע הגובה של תיבת הטבלה) ולא זזים עם הגלילה האנכית, כך שנגישים
   מיד בלי לגלול קודם למטה כדי להגיע לפס הגלילה האופקי הרגיל. */
.excel-import-scroll-arrow {
  z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px var(--shadow-color);
  opacity: .85;
}
.excel-import-scroll-arrow:hover { opacity: 1; background: var(--bg); }
.modal-scroll-body {
  flex: 1; min-height: 0; overflow: auto; padding: 26px;
  overscroll-behavior: contain;
}
/* track אטום (לא שקוף כמו ברירת המחדל הגלובלית) - במודל יש פינות מעוגלות (border-radius
   על .modal-content, שחותך את הגלילה של האלמנט הזה) ופוטר "דביק" (ר' has-inline-sticky-footer
   למטה). עם track שקוף, "תפר" רינדור עדין בפינה המעוגלת חושף את מה שמתחת למודל (הרקע
   הכהה + הרשימה) - עם המראה הישן (עבה ואטום) של הדפדפן זה תמיד היה מוסתר. track באותו
   צבע רקע סוגר את הפינה. */
.modal-scroll-body { scrollbar-color: var(--border) var(--surface); }
.modal-scroll-body::-webkit-scrollbar-track { background: var(--surface); }
/* מודל עם form-actions-sticky שנשאר בתוך <form> (ר' restructureModalContent) - הפוטר
   ממשיך להיות sticky בתוך modal-scroll-body בדיוק כמו היום, אבל בלי padding-bottom
   על אב הגלילה שהיה משאיר את "הרווח" שדרכו רואים תוכן גולל מתחת לפוטר. */
.modal-scroll-body.has-inline-sticky-footer { padding-bottom: 0; }
/* כשמודל עוטף את התוכן ב-<form> (כדי לתפוס submit) - ה-form עצמו display:block כברירת
   מחדל, בלי גובה מפורש, מה שגורם ל-position:sticky של form-actions-sticky בתוכו לחשב
   טווח הידבקות שגוי. לתת ל-form flex-column פותר את זה - הילדים (form-grid/
   form-actions-sticky) הופכים ל-flex items רגילים עם גובה מחושב נכון. */
.modal-scroll-body form { display: flex; flex-direction: column; }
.modal-title-row {
  /* נשלף תמיד ע"י restructureModalContent להיות flex item ראשון וקבוע (לא גולל) -
     בלי sticky/z-index/will-change/מרג'ין שלילי בכלל, כי הוא כבר לא יושב בתוך אלמנט
     גולל שממנו צריך "להידבק" לקצה. */
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  background: var(--surface); padding: 26px 26px 18px;
}
.modal-title-row h3 { margin: 0; font-size: 19px; }
.close-x {
  background: none; border: none; font-size: 20px; color: var(--text-muted); padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  transition: background-color .12s, color .12s;
}
.close-x .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.close-x:hover { background: var(--bg-2); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .close-x { transition: none; } }
/* שורת כפתורים תחתונה "נדבקת" - אופט-אין (לא כל form-actions, כי המחלקה משמשת גם
   לשורות כפתורים באמצע תוכן, לא רק לפעולות הסיום של המודל) לטפסים ארוכים שבהם
   כדאי שכפתורי שמירה/מחיקה יישארו גלויים תמיד בלי לגלול עד הסוף.
   שני מקרים, לפי מה ש-restructureModalContent עשה: */
/* מקרה A: form-actions-sticky היה ילד ישיר של modal-content (בלי <form> עוטף) - נשלף
   להיות flex item קבוע (לא גולל) אחרי modal-scroll-body, בדיוק כמו modal-title-row. */
#modal-content > .form-actions-sticky {
  flex-shrink: 0; background: var(--surface); margin-top: 18px; padding: 14px 26px 26px;
}
/* מקרה B: form-actions-sticky נשאר בתוך <form>, בתוך modal-scroll-body - עדיין sticky
   (form עצמו לא גולל בנפרד, modal-scroll-body הוא אב הגלילה האמיתי), אבל עכשיו באמת
   צמוד לקצה כי modal-scroll-body.has-inline-sticky-footer בלי padding-bottom. */
.modal-scroll-body .form-actions-sticky {
  position: sticky; bottom: 0; z-index: 3;
  /* will-change מכריח קידום לשכבת קומפוזיציה נפרדת - בלעדיו, בזמן גלילה בפועל (לא
     אחרי שהיא נעצרת) תוכן הטופס יכול "להבהב"/להציץ לרגע מתחת לפס הדביק הזה. */
  will-change: transform; flex-shrink: 0;
  background: var(--surface); margin: 18px -26px 0; padding: 14px 26px 26px;
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScaleIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
/* בנייד .modal-content כמעט תמיד ממלא את כל המסך, ובדסקטופ זו תיבה ממורכזת - בשני
   המקרים transform (scale+translateY) על אלמנט עם DOM מורכב (טבלאות/רשתות/כרטיסי
   חבילה) שהדפדפן עוד לא צייר בכלל יכול "לדלג" פריימים ונראה כמו קפיצה/הבהוב במקום
   גדילה חלקה - יהונתן: קודם "רק במובייל... החלונית... קופצת" (1.9.2026), ואז אותה
   תופעה בדיוק גם בדסקטופ בחלונית פרטי חבילה (2.9.2026). היה מוגבל ל-mobile בלבד
   בטעות - opacity לבד זול הרבה יותר ל-compositing מ-transform, אז עכשיו על כל רוחב. */

/* ===== דיאלוג בחירה (במקום confirm()/alert() של הדפדפן) - יושב מעל מודל פתוח, z-index
   גבוה יותר מ-.modal-backdrop, ומשמש בעיקר לאזהרת "יציאה בלי שמירה" (ר' showChoiceDialog
   ו-confirmDiscardIfDirty ב-app.js) ===== */
.choice-dialog-backdrop {
  position: fixed; inset: 0; background: rgba(15,20,35,.55); display: flex;
  align-items: center; justify-content: center; padding: 16px; z-index: 200;
  animation: modalFadeIn .15s ease;
}
.choice-dialog-box {
  background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px var(--shadow-color);
  animation: modalScaleIn .18s ease;
}
.choice-dialog-message { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--text); }
.choice-dialog-actions { display: flex; flex-direction: column; gap: 8px; }
.choice-dialog-actions .btn { width: 100%; }

/* ===== דיאלוג בחירת יעד שליחה לתפעול (showTargetPickerDialog ב-utils.js) - יושב באותה
   קופסה של דיאלוג הבחירה, עם רשימת יעדים נבחרים ושורת הוספה ===== */
.target-picker-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.target-picker-row {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--text);
}
.target-picker-row:hover { border-color: var(--accent); }
.target-picker-row.selected { border-color: var(--accent); background: var(--accent-soft); }
.target-picker-row input[type="radio"] { accent-color: var(--accent); margin: 0; flex: none; }
.target-picker-value { flex: 1; word-break: break-all; }
.target-picker-tag {
  flex: none; font-size: 11px; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.target-picker-del { flex: none; background: none; border: 0; cursor: pointer; font-size: 14px; opacity: .55; padding: 2px; }
.target-picker-del:hover { opacity: 1; }
.target-picker-empty { color: var(--text-muted); font-size: 13px; padding: 8px 2px; }
.target-picker-add { display: flex; gap: 8px; margin-top: 12px; }
.target-picker-add .target-picker-input {
  flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
}
.target-picker-add .btn { flex: none; }
.target-picker-error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.target-picker-footer { flex-direction: row; margin-top: 16px; }
.target-picker-footer .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== תצוגת כרטיס אשראי חי (בכל מקום שמזינים פרטי אשראי - ר' creditCardPreviewHtml/
   wireCreditCardPreview ב-js/directDeals.js) - ויזואלי בלבד, לא נשמר. מעוצב להיראות
   כמו כרטיס בנק אמיתי (שבב עם קווי מגע, סמל תשלום ללא מגע, הטבעה עדינה על המספר,
   ברק אלכסוני) - בלי לוגו רשת תשלום אמיתי (Visa/Mastercard וכו') כדי לא להתחזות
   לרשת ספציפית, זה כרטיס של לקוח אמיתי לא שלנו (יהונתן, 1.9.2026). ===== */
.cc-preview-wrap { display: flex; justify-content: center; margin: 6px 0 10px; perspective: 900px; grid-column: 1 / -1; }
.cc-preview { width: 100%; max-width: 320px; aspect-ratio: 1.586; position: relative; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.cc-preview.flipped { transform: rotateY(180deg); }
.cc-face {
  position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; overflow: hidden;
  padding: 16px 18px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  /* צבעים קבועים, לא var(--primary)/var(--accent) - באלה מתחלפים לגוונים בהירים
     במצב כהה (הם מיועדים לטקסט על רקע כהה, לא לשמש כרקע עצמו), מה שהופך את הטקסט
     הלבן מעל לבלתי קריא. */
  background: linear-gradient(135deg, #0b3d8f 0%, #c97a3e 100%);
}
/* ברק אלכסוני עדין - נותן תחושת משטח מבריק/מוגבה, לא צבע שטוח */
.cc-face::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.24) 0%, transparent 32%, transparent 68%, rgba(255,255,255,.08) 100%);
}
.cc-face.cc-back { transform: rotateY(180deg); justify-content: flex-start; padding: 0; }
.cc-face-top { display: flex; align-items: center; justify-content: space-between; }
/* שבב EMV - קווי מגע (רשת) על גבי גרדיאנט זהב, במקום מלבן זהב שטוח */
.cc-chip {
  width: 36px; height: 27px; border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.22) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 8.5px),
    linear-gradient(135deg,#f3e2ab 0%,#d4af65 50%,#b8933f 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.cc-contactless { width: 20px; height: 20px; color: rgba(255,255,255,.8); transform: rotate(90deg); }
.cc-number {
  font-family: 'Courier New', monospace; font-size: 19px; letter-spacing: 2px; direction: ltr; text-align: left;
  text-shadow: 0 1px 1px rgba(0,0,0,.35), 0 -1px 0 rgba(255,255,255,.12);
}
.cc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 11px; direction: ltr; text-align: left; }
.cc-field-block { display: flex; flex-direction: column; max-width: 65%; }
.cc-field-block-end { align-items: flex-end; max-width: 35%; }
.cc-field-label { font-size: 7.5px; letter-spacing: .08em; opacity: .75; margin-bottom: 3px; }
.cc-bottom .cc-holder { text-transform: uppercase; font-weight: 700; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-stripe { width: 100%; height: 38px; background: #1a1a1a; margin-top: 18px; }
.cc-cvv-row {
  margin: 18px 18px 0; background: repeating-linear-gradient(135deg, #f4f4f4 0 6px, #e8e8e8 6px 12px);
  color: #222; border-radius: 4px; padding: 8px 12px; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  font-family: 'Courier New', monospace; font-size: 14px; direction: ltr; letter-spacing: 2px;
}
.cc-cvv-row .cc-field-label { color: #666; opacity: 1; margin: 0; font-family: initial; letter-spacing: .04em; }

/* ===== לקוח: בני משפחה + קווים ===== */
.subsection { margin-top: 22px; }
.subsection-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.family-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.family-chip {
  display: flex; align-items: center; gap: 8px; background: var(--primary-light); color: var(--primary-dark);
  border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 13px; font-weight: 600;
}
.family-chip button { background: none; border: none; color: var(--primary-dark); font-size: 15px; opacity: .6; }
.family-chip button:hover { opacity: 1; }

.line-card {
  border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: var(--surface); transition: box-shadow .15s ease, border-color .15s ease;
}
.line-card:hover { border-color: var(--primary); box-shadow: 0 6px 16px var(--shadow-color); }
@media (prefers-reduced-motion: reduce) { .line-card { transition: none; } }
.line-main { flex: 1; min-width: 220px; }
.line-type { font-weight: 700; font-size: 14px; }
.line-details { font-size: 13px; color: var(--text-muted); margin-top: 3px; line-height: 1.6; }
.line-actions, .line-actions-icons { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; align-items: center; }

/* ===== פעולות קו: 3 עגולות זהב תמיד גלויות (הפעולות הכי נפוצות), השאר בתפריט "עוד" -
   צמצום מ-9 כפתורים גלויים ל-3, בלי לאבד אף פעולה. ר' הערת יהונתן על עומס. ===== */
.line-actions-primary { display: flex; gap: 6px; }
.line-icon-action { text-decoration: none; display: inline-flex; }
/* .icon-badge מסתמך על display:grid כדי ש-place-items:center ימרכז את ה-SVG בשני
   הצירים (ב-flex, justify-items לא חל בכלל - האייקון היה נדבק לקצה, כפי שיהונתן
   הבחין בכפתורי עריכה/חיוג בכרטיס הקו). מחזירים grid ספציפית לצירוף הזה, בלי לגעת
   ב-inline-flex הכללי של .line-icon-action (שעדיין נחוץ לקישור הוואטסאפ הגולמי). */
.icon-badge.line-icon-action { display: grid; }
.line-actions-more-wrap { position: relative; }
.line-more-toggle { border: none; cursor: pointer; }
/* position:fixed ממוקם ידנית לפי rect בכל פתיחה (ר' wireLinesSection ב-js/app.js),
   בדיוק כמו .user-menu - עם position:absolute הקודם, כרטיס עם פחות כפתורי כותרת דחף
   את ה"..." קרוב יותר לקצה המסך, וה-inset-inline-end:0 (שגדל שמאלה מה"..." קדימה)
   דחף את התפריט הרחק מחוץ לתחום (QA 31.8.2026: פריטי התפריט לא נגישים בנייד). */
/* z-index גבוה מהעיגול הצף הגלובלי (ops-chat-bubble, 90) -
   בלעדיו, כשתפריט "הגדרות משתמש" (שיושב גם הוא בפינה תחתונה) נפתח ומתרחב לכיוון אותה
   פינה, העיגול הצף מכסה חלק מהתפריט (בפועל בד"כ בדיוק את "התנתקות", הפריט התחתון) ובולם
   קליקים עליו למרות שהתפריט נראה פתוח לגמרי (יהונתן, 1.9.2026: "כפתור התנתקות לא נלחץ"). */
.line-more-menu {
  position: fixed; z-index: 95; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px var(--shadow-color); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(-6px) scale(.96); pointer-events: none; transform-origin: top right;
  transition: opacity .15s ease, transform .15s ease;
}
.line-more-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.line-more-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  border: none; background: transparent; text-align: start; width: 100%; font-family: inherit;
  font-size: 13px; color: var(--text); cursor: pointer; transition: background-color .12s;
}
.line-more-item .ic { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 2; opacity: .75; }
.line-more-item.danger { color: var(--danger); }
/* hover:hover - בלי זה, במכשירי מגע (בעיקר iOS Safari) הקשה ראשונה על פריט עם :hover
   לפעמים רק "מכניסה" למצב hover במקום להפעיל את הקליק, וצריך הקשה שנייה שתעבוד בפועל -
   בתפריט עם כמה פריטים (הגדרות משתמש) זה מרגיש כאילו "צריך ללחוץ כמה פעמים" (יהונתן,
   1.9.2026, על כפתור התנתקות - אותה בעיה בכל פריט בתפריט הזה, לא רק בו). */
@media (hover: hover) {
  .line-more-item:hover { background: var(--bg-2); }
  .line-more-item:hover .ic { opacity: 1; }
  .line-more-item.danger:hover { background: var(--danger-soft); }
}
.line-more-sep { height: 1px; background: var(--border); margin: 4px 2px; }
@media (prefers-reduced-motion: reduce) { .line-more-menu { transition: none; } }

/* ===== כרטיס קו/שירות בעמוד לקוח (sl- = "service line") - מתקפל, עם פס סטטוס עדין
   ומחיר בולט בכותרת. שם מחלקה נפרד מ-.line-card הכללי (המשמש עשרות שורות-רשימה
   פשוטות בכל האפליקציה) כדי לא להשפיע על אף מקום אחר. ===== */
.sl-card { border-radius: 14px; background: var(--surface); overflow: hidden; margin-bottom: 10px; box-shadow: 0 2px 8px var(--shadow-color); transition: box-shadow .15s ease; }
.sl-card:hover { box-shadow: 0 6px 16px var(--shadow-color); }
.sl-strip { height: 3px; opacity: .85; }
.sl-head { display: flex; align-items: center; gap: 8px 10px; padding: 11px 14px; cursor: pointer; flex-wrap: wrap; }
.sl-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; flex: 1 1 140px; min-width: 0; }
.sl-price { text-align: left; flex-shrink: 0; margin-inline-start: auto; }
.sl-price-main { font-weight: 800; font-size: 17px; color: var(--text); line-height: 1.1; }
.sl-price-sub { font-size: 11px; color: var(--text-muted); }
.sl-chev { font-size: 12px; color: var(--text-muted); transition: transform .2s ease; flex-shrink: 0; }
.sl-card.open .sl-chev { transform: rotate(180deg); }
.sl-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.sl-card.open .sl-body { max-height: 600px; }
@media (prefers-reduced-motion: reduce) { .sl-body, .sl-chev { transition: none; } }
.sl-body-inner { padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.sl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
@media (max-width: 480px) { .sl-grid { grid-template-columns: 1fr; } }
.sl-col-title { font-size: 11px; font-weight: 800; color: var(--accent-text); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 4px; }
.sl-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 3px 0; border-bottom: 1px dotted var(--border); }
.sl-row:last-child { border-bottom: none; }
.sl-row .lbl { color: var(--text-muted); flex-shrink: 0; }
.sl-row .val { font-weight: 600; text-align: left; }
.sl-row.meta { opacity: .72; }
.sl-row.meta .val { font-weight: 400; }
.sl-note { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
/* אותם 2-3 כפתורי זהב שהיו תמיד - רק פחות שכבות הצללה/ברק על משטח קטן וצפוף (בתוך
   sl-head), ומרווח נושם יותר, כדי שלא ייצרו "רעש" ויזואלי לצד הכותרת/מחיר. */
.sl-head .icon-badge { box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.sl-head .icon-badge::after { content: none; }
.sl-head .line-actions-icons { gap: 8px; }

/* ===== תפריט משתמש בתחתית התפריט: 8 פקדים נדירים (פעם בשבוע) שנפתחים בלחיצה על
   עיגול המשתמש במקום לתפוס מקום קבוע - נפתח כלפי מעלה כי העיגול יושב בתחתית התפריט ===== */
.user-menu-wrap { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; }
.user-menu-caption { font-size: 12px; font-weight: 700; color: var(--sidebar-text-muted); cursor: pointer; }
/* עיגול "הגדרות משתמש" בזהב מוברש עם נשימה עדינה קבועה - יהונתן ביקש שיתבלט בתחתית
   התפריט, לא רק כחול שקט כמו כל שאר עיגולי הזהות במערכת. */
#user-menu-toggle { background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); }
@media (prefers-reduced-motion: no-preference) {
  #user-menu-toggle { animation: opsBreathe 3.2s ease-in-out infinite; }
}
/* היה ממוקם ב-JS לפי rect של הכפתור בכל פתיחה (position:fixed נגד הקיצוץ האופקי של
   .side-nav ב-overflow:auto/רייל מקופל) - אבל בלי שום הגבלה לגבולות המסך, אז במצב רייל
   (במיוחד כשקבוצות הניווט גבוהות מהמסך והכפתור עצמו כמעט מחוץ לתצוגה) התפריט יכול לצאת
   "תלוי" באמצע המסך בלי חיבור ברור לא לתפריט הצד ולא למרכז (יהונתן, 2.9.2026: "בין
   לבין"). מרכוז קבוע במקום מיקום מחושב - פותר את כל מקרי הקצה האלה בבת אחת, ותמיד ברור:
   מרכז המסך, לא תלוי. */
/* left/right פיזיים בלבד בכוונה, לא inset-inline-* - עירוב שני הסוגים באותו כלל גרם
   ל-inset-inline-end:auto (המאוחר יותר בכלל) לדרוס בשקט את left:50% הפיזי במצב RTL,
   וזה בדיוק מה שהחזיר את התפריט למיקום "תלוי" הישן במקום למרכז המסך (התגלה ב-QA חי). */
/* מיצוב לפי bottom קבוע (לא top-אחוזים) - יהונתן (2.9.2026, אחרי ניסיון עם top:58%):
   "תוריד את החלונית עוד למטה שיהיה קצת מעלה הגדרות משתמש" - כלומר קרוב לכפתור עצמו
   (שתמיד יושב בתחתית תפריט הצד/המגירה, ר' .side-spacer{flex:1}), לא סתם "נמוך יותר
   במסך". bottom קבוע - בלי rect של הכפתור בכלל, אז בלי הבאגים הקודמים (rect מחוץ
   למסך/RTL) - נשאר קרוב לכפתור בכל גובה מסך. */
.user-menu { position: fixed; bottom: 100px; left: 50%; top: auto; right: auto; transform-origin: bottom center; transform: translateX(-50%) scale(.96); }
.user-menu.open { transform: translateX(-50%) scale(1); }
/* אצל מחבר-לידים .user-menu-wrap עובר פיזית ל-topbar (ר' showApp ב-js/app.js, ביטול
   הסרגל הצדדי) - המיצוב fixed+bottom למעלה מותאם לכפתור שיושב בתחתית תפריט הצד, ובתוך
   ה-topbar זה גרם לחלונית להיפתח תלויה באמצע העמוד בלי קשר לכפתור (יהונתן, 4.9.2026,
   נתפס תוך כדי בדיקה חיה). .user-menu-wrap כבר position:relative בכל מצב - אז absolute
   עם top:100% מספיק כדי שהחלונית תיפתח תמיד ממש מתחת לכפתור עצמו, לא משנה איפה הוא יושב. */
#topbar .user-menu { position: absolute; bottom: auto; top: calc(100% + 8px); left: auto; right: 0; transform-origin: top left; transform: scale(.96); }
#topbar .user-menu.open { transform: scale(1); }
/* מיקום מדויק ליד הכפתור בפועל בסרגל הצדדי (positionUserMenu ב-js/app.js, יהונתן
   4.9.2026 - "נסה להצמיד גם שם, בזהירות") - top/right/bottom/left כבר מוגדרים inline
   שם עם ערכים מחושבים, left:auto כאן רק מבטל את left:50% הקבוע כדי שלא יתנגש עם ה-right
   המחושב. transform בלי translateX(-50%) - המיקום כבר מדויק, אין צורך למרכז סביבו.
   כשהכפתור לא גלוי במלואו (מצב רייל שגולש) ה-JS לא מוסיף את המחלקה הזו בכלל, ואז
   .user-menu הרגיל (הממורכז הקבוע למעלה) חוזר להיות הבטוח-כברירת-מחדל. */
.user-menu.anchored { left: auto; transform-origin: bottom right; transform: scale(.96); }
.user-menu.anchored.open { transform: scale(1); }

/* אשכול כפתורי פעולה עם אייקון + תווית קצרה - כדי שהפעולה תהיה ברורה גם בלי hover
   (בנייד אין hover, ואייקון בודד כמו 📝 מול 🧾 קשה להבחין ביניהם). עוטף לשורות נוספות
   (flex-wrap) כשאין מקום, ולא גולש. */
.icon-btn-labeled {
  height: 32px; border-radius: 999px; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px; padding: 0 12px 0 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; color: var(--text); text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, border-color .15s, background-color .15s;
}
.icon-btn-labeled .icon-btn-glyph { font-size: 14.5px; line-height: 1; }
.icon-btn-labeled .ic.icon-btn-glyph { width: 14px; height: 14px; flex-shrink: 0; }
.icon-btn-labeled:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--sidebar-hover-bg, var(--bg)); box-shadow: 0 4px 12px var(--shadow-color); }
.icon-btn-labeled.danger { color: var(--danger); border-color: var(--danger-soft); }
.icon-btn-labeled.danger:hover { border-color: var(--danger); }

.quote-actions-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; width: 100%; margin-top: 10px; }
.quote-actions-row .btn { width: 100%; }

.mobile-topbar { display: none; }
.mobile-tabbar { display: none; }
.mobile-topbar-spacer { flex: 1; }
.mobile-topbar-brand { display: flex; align-items: center; position: absolute; right: 50%; top: 50%; transform: translate(50%, -50%); }
.mobile-topbar-icon.brand-logo-wrap { width: 72px; padding: 5px; border-radius: 12px; }
.mobile-bsd {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--text-muted); letter-spacing: .5px; white-space: nowrap;
}
.two-col-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.two-col-cards > .card { margin-bottom: 0; }
.mobile-menu-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  font-size: 19px; line-height: 1; padding: 7px 11px; color: var(--text);
}
.mobile-nav-backdrop { position: fixed; inset: 0; background: rgba(10,15,15,.45); z-index: 35; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .tier-row-grid { grid-template-columns: 1fr; }
  .two-col-cards { grid-template-columns: 1fr; }
  .app-shell { flex-direction: column; }

  .mobile-topbar {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 70px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 25;
  }
  .topbar { display: none; }
  .bsd-bar { display: none; }

  .side-nav {
    position: fixed; top: 0; bottom: 0; right: 0; left: auto; height: 100vh; height: 100dvh; width: 250px;
    transform: translateX(100%); transition: transform .22s ease; z-index: 40;
    border-inline-end: none; box-shadow: -10px 0 30px rgba(0,0,0,.18);
  }
  .side-nav.open { transform: translateX(0); }
  /* הלוגו "מתקפל" עם התפריט - .side-brand כבר בתוך .side-nav שמחליק פנימה/החוצה
     כמקשה אחת (transform על ההורה), אז מספיק להראות אותה שוב במקום להסתיר לגמרי
     (יהונתן, 1.9.2026); גרסה צמודה ייעודית (בלי הקווים/הגלים שבבאנר המלא) כי המגירה
     צרה (250px) - ר' logo-header.png. כפתור קיפול-לרייל לא רלוונטי במגירה שנפתחת/
     נסגרת במלואה, לא מצטמצמת לרצועה כמו בדסקטופ. */
  .side-nav .side-brand { display: flex; border-bottom-color: var(--sidebar-border); }
  .side-nav .side-brand-logo { display: none; }
  .side-nav .side-brand-logo-mobile { display: block; width: 150px; }
  .side-nav #nav-rail-toggle { display: none; }
  .side-user { flex-direction: column; align-items: stretch; }

  .view-root { padding: 18px 16px; }

  /* מתחת ל-16px, דפדפני מובייל (כרום/WebView) מבצעים זום אוטומטי בפוקוס על שדה קלט,
     ולעיתים לא מאפסים את הזום כשסוגרים מקלדת/חלון - זה גורם ל"קריעה" חזותית של העמוד
     (חלק מהתוכן נראה חתוך/מוזז). מכריחים 16px על כל שדות הקלט במובייל כדי למנוע את זה. */
  input, select, textarea { font-size: 16px !important; }

  /* כרטיס קו במובייל: ב-flex-row רגיל, .line-main עם min-width:220px קבוע יחד עם
     .line-actions (עם flex-shrink:0 - עכשיו עם עוד כפתור "חיוג") גדולים מדי ביחד
     לרוחב מסך צר - מחשוב ה-flex נותן ל-.line-actions את רוחב-התוכן-המקסימלי שלו לפני
     גלישה פנימית, מה שגורם לו/לכפתור האחרון (למשל "מחיקה") לגלוש מחוץ לגבולות הכרטיס
     במקום לגלוש שורה. פותרים ע"י מעבר לעמודה: הפרטים למעלה, שורת הכפתורים למטה
     ברוחב מלא (שם flex-wrap כבר עובד כרגיל בלי מגבלת רוחב-הורה). */
  .line-card { flex-direction: column; align-items: stretch; }
  .line-main { min-width: 0; }
  .line-actions, .line-actions-icons { flex-shrink: 1; width: 100%; }

  .ops-chat-panel { width: calc(100vw - 32px); max-width: 340px; }

  /* ===== שורת כלים גלובלית (בדיקת IVR/סיב/מפעיל) - בנייד בלבד, בדסקטופ הם כבר בשורת
     הכלים העליונה (topbar). היה קודם לחצן צף שנפתח למטה (28.8.2026) - יהונתן ביקש
     (1.9.2026) שיהיו גלויים תמיד מעל תוכן העמוד במקום מוסתרים מאחורי לחיצה נוספת.
     sticky צמוד ישר מתחת ל-mobile-topbar (שהיא עצמה sticky top:0, גובה מינ' 70px) -
     כך ששתי השורות נשארות קבועות יחד בגלילה, לא רק הראשונה. */
  /* היה overflow-x:auto (גלילה כדי לראות את הכפתור השלישי), ואז נוסה flex-wrap (יהונתן
     ביקש בלי גלילה) - אבל ברוב רוחבי המסך בפועל 3 הכפתורים לא נכנסו בשורה אחת במידות
     הקודמות וזה נפל לשורה שנייה (יהונתן, 2.9.2026: "למה זה נהיה ככה ולא שורה אחת").
     הפתרון: לא גלילה ולא שורה כפולה - להקטין קצת (10.5px, כמו .mobile-tabbar) ובעיקר
     flex:1 על כל כפתור (בדיוק כמו .mobile-tabbar למטה) כדי שהשלושה יימתחו וימלאו את
     כל רוחב השורה בשווה, ולא יצטופפו בצד אחד עם שטח ריק לידם (יהונתן: "קטן מידי,
     תתאים לשורה"). */
  .mobile-tools-row {
    display: flex; gap: 6px; flex-wrap: nowrap; align-items: center;
    padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 70px; z-index: 24;
  }
  .mobile-tools-row-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; min-width: 0;
    cursor: pointer; font-family: inherit;
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px;
    padding: 5px 8px; font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap;
  }
  /* 12.5px/22px נבדק בפועל (Playwright, רוחב 360px - הצר שנתמך) לפני שהועלה - עדיין
     נכנס בשורה אחת בנוחות, יהונתן: "תגדיל קצת את הכתב" אחרי שה-10.5px המקורי (זהה ל-
     .mobile-tabbar) הרגיש קטן מדי כאן. */
  .mobile-tools-row-btn .icon-badge { width: 22px; height: 22px; flex-shrink: 0; }

  /* ===== סרגל תחתון בנייד: חמישה יעדים באגודל (design-lab-5.html, "בנייד") - "עוד"
     פותח את אותה מגירת ☰ שכבר קיימת, לא מסך נפרד, כדי לא לכפול תחזוקה של הניווט. ===== */
  .mobile-tabbar {
    display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-tabbar a, .mobile-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 8px 2px 6px; background: none; border: none; color: var(--text-muted);
    font-size: 10.5px; font-weight: 700; text-decoration: none; position: relative;
  }
  .mobile-tabbar .ic { width: 20px; height: 20px; }
  .mobile-tabbar a.on { color: var(--accent-text); }
  .view-root { padding-bottom: calc(18px + 60px + env(safe-area-inset-bottom, 0)); }
}

/* ===== פאנל צ'אט תפעול צף (פינה שמאלית-תחתונה - פיזית, לא inset-inline, כי זה מכוון
   לצד הריק בפריסת RTL הזו, לא תלוי כיוון) - מרכז את כל התקשורת (עסקאות + תיקי קווים)
   לפי לקוח. z-index מתחת ל-.modal-backdrop (100) בכוונה - מודל פתוח אמור לכסות אותו,
   לא להתחרות איתו. עיצוב בועות-צ'אט (כמו וואטסאפ) - נבחר מתוך סקיצות ב-
   design-lab-opschat.html (יהונתן, 20.8.2026), עם משתני העיצוב הרגילים של האפליקציה. ===== */
/* דסקטופ בלבד - "display:none" בלי media query כאן היה מנצח תמיד את ה-flex שבתוך
   @media(max-width:720px) למטה (אותה ספציפיות, מגיע אחריו בסדר המקור) ומסתיר את
   השורה גם בנייד - בדיוק ההפך מהכוונה. QA (31.8.2026) מצא בעיה מקבילה עם הלחצן הצף הישן. */
@media (min-width: 721px) {
  .mobile-tools-row { display: none; }
}
.ops-chat-bubble {
  position: fixed; bottom: 20px; left: 20px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px var(--shadow-color), 0 0 0 1px rgba(255,255,255,.22) inset;
  transition: transform .15s, box-shadow .15s;
}
.ops-chat-bubble:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--shadow-color), 0 0 0 1px rgba(255,255,255,.08) inset; }
.ops-chat-bubble:active { transform: translateY(0) scale(.96); }
/* בנייד מרימים את הבועה מעל סרגל הטאבים התחתון (.mobile-tabbar, גובה 60px) כדי שלא
   תשבת מעליו ותחסום לחיצה על הטאב השמאלי ("עוד"). הכלל חייב לבוא אחרי הגדרת
   .ops-chat-bubble הבסיסית למעלה כדי לנצח אותה במפרט שווה. */
@media (max-width: 720px) {
  .ops-chat-bubble { bottom: calc(60px + env(safe-area-inset-bottom, 0) + 12px); }
}
.ops-chat-badge {
  position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}
.ops-chat-panel {
  position: fixed; bottom: 82px; left: 20px; z-index: 90;
  width: 320px; max-height: 64vh; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 20px 60px var(--shadow-color);
  display: flex; flex-direction: column; overflow: hidden;
}
.ops-chat-panel-head {
  display: flex; flex-direction: column; gap: 6px;
  padding: 13px 15px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--bg-2);
}
.ops-chat-channel-row { display: flex; justify-content: center; }
.ops-chat-panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* שלושת האיברים בשורה (שם/→הכל/✕) מיושרים לאותו מרכז אנכי (זה כבר היה נכון), אבל
   עם גובה-קופסה שונה מאוד זה מזה (שם 14.5px, כפתור עם padding ~21px, X בפונט 20px)
   - נראה "לא באותו גובה" למרות היישור. נותנים לשלושתם אותה קופסה מדויקת (24px, flex
   ממורכז בתוכה) כדי שהם ייראו כמו שורת כלים אחידה - יהונתן: "אותו גובה" (21.8.2026). */
.ops-chat-panel-head h4 {
  margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1;
  height: 24px; display: flex; align-items: center;
}
.ops-chat-panel-head-row .close-x,
.ops-chat-panel-head-row .ops-chat-back-btn {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  height: 24px; box-sizing: border-box;
}
.ops-chat-head-btns { display: flex; gap: 6px; align-items: center; }
.ops-chat-back-btn {
  font-family: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); border-radius: 20px; padding: 4px 11px; font-size: 11.5px; font-weight: 600;
}
/* overscroll-behavior:contain - בלי זה, כשמגיעים לקצה הגלילה בפאנל הגלילה "משתרשרת"
   לעמוד שמתחת (יהונתן: "הגלילה עובדת רק על המסך מתחת") - אותו תיקון בדיוק שכבר קיים
   במקומות אחרים באפליקציה עם גלילה בתוך שכבה צפה. */
.ops-chat-panel-body { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.ops-chat-empty { padding: 24px 14px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* --- תצוגת רשימת שיחות (לפי לקוח) --- */
.ops-chat-thread-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border);
}
.ops-chat-thread-row:hover { background: var(--bg-2); }
/* אווטאר עגול לכל שיחה - טבעת בצבע הערוץ (אותה שפה בדיוק כמו channel-tab-circle
   למעלה), כדי שברור מיד גם ויזואלית וגם לא רק מטקסט לאיזה ערוץ/חברה השיחה שייכת. */
.ops-chat-thread-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: var(--surface); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
}
.ops-chat-thread-avatar .provider-icon-chip {
  width: 100% !important; height: 100% !important; border-radius: 50% !important; border: none !important; box-shadow: none !important;
}
.ops-chat-thread-avatar.channel-simple { border-color: var(--accent); }
.ops-chat-thread-avatar.channel-top { border-color: var(--primary); }
.ops-chat-thread-avatar.channel-other { border-color: var(--success); }
.ops-chat-thread-avatar-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); color: #fff; font-weight: 800; font-size: 14px;
}
.ops-chat-thread-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ops-chat-thread-main .name { font-weight: 700; font-size: 13px; }
.lead-tag {
  font-size: 9px; font-weight: 700; color: var(--warning-text); background: var(--warning-soft);
  border-radius: 6px; padding: 1px 6px; margin-inline-start: 6px; vertical-align: middle;
}
.ops-chat-thread-main .deal-info { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; flex-wrap: wrap; }
.ops-chat-thread-main .deal-info .ic { width: 11px; height: 11px; }
/* אותה "משקל" ויזואלי כמו channel-badge לצידו - QA (31.8.2026) מצא שזו הייתה span
   חשוף בלי רקע/עיגול, נראית כטקסט חופשי ולא כצ'יפ ברור. */
.deal-info-chip {
  display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); color: var(--text-muted);
  border-radius: 6px; padding: 1px 7px;
}
/* תצוגת ההודעה האחרונה כ"בועת" צ'אט קלילה - כדי שיהיה ברור בעין שזו הודעה, לא עוד
   שורת מטא-דאטה כמו השורות מעליה. */
.ops-chat-thread-main .preview {
  font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--bg-2); border-radius: 10px; padding: 3px 9px; margin-top: 2px; display: inline-block; max-width: 100%;
}

/* --- תגי ערוץ-אספקה: 3 ערוצים נפרדים לגמרי מבחינה עסקית (סימפל / טופ תקשורת / הגוף
   השני, עדיין ללא שם סופי) - ר' js/constants.js DEAL_CHANNEL_* ו-[[smartsim_three_channel_split]]
   בזיכרון. משתמש בטוקני "soft bg + text" הקיימים כבר לתגיות בכל האפליקציה, לא צבעים חדשים. --- */
.channel-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 700;
  border-radius: 6px; padding-block: 1px; padding-inline: 1px 6px; flex-shrink: 0;
}
.channel-badge .provider-icon-chip { width: 14px !important; height: 14px !important; box-shadow: none !important; border-color: transparent !important; }
.channel-badge.channel-simple { background: var(--accent-soft); color: var(--accent-text); }
.channel-badge.channel-top { background: var(--primary-light); color: var(--primary); }
.channel-badge.channel-other { background: var(--success-soft); color: var(--success-text); }

/* --- גרסה בולטת של תגית הערוץ, לכותרת השרשור בלבד (לא ברשימה) - רקע מלא + טקסט לבן,
   גדולה יותר, מעל שם הלקוח - יהונתן ביקש "יותר ברור" (21.8.2026): גדול/בולט/מיקום ראשון. --- */
.channel-badge-lg {
  font-size: 12px; font-weight: 700; border-radius: 20px; padding-block: 4px; padding-inline: 4px 11px;
  gap: 6px;
}
.channel-badge-lg .provider-icon-chip { width: 20px !important; height: 20px !important; }
.channel-badge-lg.channel-simple { background: var(--accent); color: #fff; }
.channel-badge-lg.channel-top { background: var(--primary); color: #fff; }
.channel-badge-lg.channel-other { background: var(--success); color: #fff; }
.deal-info .channel-simple ~ span { color: var(--accent-text); }
.deal-info .channel-top ~ span { color: var(--primary); }
.deal-info .channel-other ~ span { color: var(--success-text); }

/* --- חוצץ ערוצים למעלה (מעל רשימת השיחות) - עיגולים גדולים עם לוגו, לא השבב הקטן
   שבכל שורה. סינון תצוגה בלבד (js/opsChat.js channelFilter), בלי קריאת API נוספת. --- */
.ops-chat-channel-tabs {
  display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border);
  overflow-x: auto; flex-shrink: 0;
}
.channel-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none;
  cursor: pointer; flex-shrink: 0; font-family: inherit; padding: 0;
}
.channel-tab-circle {
  position: relative; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--border); overflow: hidden;
  transition: border-color .15s, transform .1s;
}
/* ברק זכוכית עדין - בטוח כאן (בניגוד ל-.packages-catalog-provider-circle למעלה) כי
   העיגולים האלה סטטיים ולא בתוך שכבה שכבר זזה (מרקיע) - אין את קונפליקט ה-transform
   הכפול שגרם לריצוד שם. אותו מנגנון בדיוק (package-glass-shift, GPU-only, מופעל רק
   כשבשדה הראייה דרך observeShimmer) - ר' ההערה המלאה ליד .package-card::before. */
.channel-tab-circle::before {
  content: ""; position: absolute; top: -25%; bottom: -25%; left: 0; width: 42%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(110,140,180,.14) 34%, rgba(255,255,255,.5) 50%, rgba(110,140,180,.14) 66%, transparent);
  transform: translateX(-220%) skewX(-18deg);
  animation: package-glass-shift 11s ease-in-out infinite; animation-play-state: paused;
}
.channel-tab-circle.shimmer-on::before { animation-play-state: running; }
:root[data-theme="dark"] .channel-tab-circle::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.34) 50%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .channel-tab-circle::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.34) 50%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .channel-tab-circle::before { animation: none; } }
.channel-tab-circle.channel-tab-all { font-size: 12px; font-weight: 700; color: var(--text-muted); }
/* בלי ביטול הרקע הלבן של הצ'יפ (ר' providerIconHtml ב-js/utils.js): במצב בהיר העיגול
   לבן ממילא ולכן "שקוף" נראה זהה, אבל במצב כהה העיגול הוא var(--surface) הכהה - ולוגו
   בדיו כהה (סימפל/הוט) על רקע כהה פשוט נעלם (יהונתן, 25.8.2026: "לא הכל מוצג ונראה
   טוב וברור... רק במסך כהה"). הרקע הלבן הקבוע הוא בדיוק מה שנועד למנוע את זה. */
.channel-tab-circle .provider-icon-chip {
  width: 100% !important; height: 100% !important; border-radius: 50% !important;
  border: none !important; box-shadow: none !important;
}
.channel-tab-label { font-size: 9.5px; color: var(--text-muted); font-weight: 600; }
.channel-tab.active .channel-tab-label { font-weight: 700; }
.channel-tab.active .channel-tab-circle { transform: scale(1.08); }
.channel-tab:not(.channel-simple):not(.channel-top):not(.channel-other).active .channel-tab-circle { border-color: var(--text-muted); }
.channel-tab.channel-simple.active .channel-tab-circle { border-color: var(--accent); }
.channel-tab.channel-simple.active .channel-tab-label { color: var(--accent-text); }
.channel-tab.channel-top.active .channel-tab-circle { border-color: var(--primary); }
.channel-tab.channel-top.active .channel-tab-label { color: var(--primary); }
.channel-tab.channel-other.active .channel-tab-circle { border-color: var(--success); }
.channel-tab.channel-other.active .channel-tab-label { color: var(--success-text); }

.ops-chat-thread-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ops-chat-thread-side .time { font-size: 10.5px; color: var(--text-muted); }
.ops-chat-unread-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger);
  color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; line-height: 1;
}

/* --- תצוגת שרשור (בועות צ'אט): "mine" = פנימי מהצוות (ימין, כחול), "theirs" = תשובת
   תפעול במייל (שמאל, בהיר) - ר' ההערה ב-js/opsChat.js renderMsgRow. --- */
.ops-chat-thread-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.msg-row { display: flex; gap: 8px; max-width: 88%; }
.msg-row.mine { flex-direction: row-reverse; align-self: flex-end; }
.msg-row.theirs { align-self: flex-start; }
/* .msg-row .avatar - ממוקד לכוונה בלבד (לא .avatar גלובלי, ר' שורה 720 - זה בדיוק
   אותו שם class שמשמש ב-7 קבצים אחרים לאווטאר לקוח 40px/זהב; בלי ההיקף הזה הכללים
   כאן היו דורסים אותו בטעות לכל אווטאר לקוח באפליקציה ל-26px, בלי לגעת ברקע/צבע). */
.msg-row .avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; margin-top: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.msg-row .avatar.mine { background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); color: #fff; }
.msg-row .avatar.theirs { background: var(--bg-2); color: var(--text-muted); border: 1px solid var(--border); }
.msg-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg-row.mine .msg-col { align-items: flex-end; }
.msg-row.theirs .msg-col { align-items: flex-start; }
.msg-meta { font-size: 10px; color: var(--text-muted); padding: 0 2px; }
.bubble { padding: 8px 12px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; }
.msg-row.mine .bubble { background: linear-gradient(135deg,#f0d9a6 0%,#c9954a 45%,#8f6a2e 100%); color: #fff; border-radius: 14px 14px 3px 14px; }
.msg-row.theirs .bubble { background: var(--bg-2); color: var(--text); border-radius: 14px 14px 14px 3px; }
.email-chip {
  font-size: 10px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 2px 8px; width: fit-content; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.quote-toggle { font-size: 10.5px; color: var(--text-muted); width: fit-content; max-width: 100%; }
.quote-toggle summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 4px; }
.quote-toggle summary::-webkit-details-marker { display: none; }
.quote-toggle[open] summary .chev { transform: rotate(180deg); }
.quote-toggle .chev { transition: transform .15s; width: 10px; height: 10px; }
.quote-body {
  margin-top: 4px; padding: 8px 10px; background: var(--bg-2); border-radius: 8px; font-size: 11px;
  color: var(--text-muted); white-space: pre-wrap; line-height: 1.5; border-right: 2px solid var(--border);
}
.msg-open-link {
  font-size: 10.5px; color: var(--primary); border: 1px solid var(--primary); border-radius: 10px;
  padding: 3px 10px; width: fit-content; cursor: pointer; font-weight: 600; background: var(--primary-light);
}

/* --- תיבת תשובה בתחתית השרשור (js/directDeals.js sendOpsThreadReply) --- */
.ops-chat-reply-bar {
  display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg-2);
}
.ops-chat-reply-bar input {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 20px; padding: 8px 14px;
  font-size: 12.5px; background: var(--surface); color: var(--text); font-family: inherit;
}
.ops-chat-reply-bar input:focus { outline: none; border-color: var(--primary); }
/* אותו גוון קבוע כמו .btn-primary - ר' ההערה שם. גם אותו פס-ברק בהובר, לעקביות. */
.ops-chat-reply-send {
  position: relative; overflow: hidden;
  border: none; background: linear-gradient(135deg, #4a6fa5 0%, #2c4d80 45%, #16294d 100%);
  color: #fff; border-radius: 20px; padding: 8px 16px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.18);
  font-size: 12.5px; font-weight: 600; cursor: pointer; flex-shrink: 0; font-family: inherit;
}
.ops-chat-reply-send::after {
  content: ""; position: absolute; inset: -60% -20% auto auto; width: 220%; height: 220%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%);
  transform: translateX(-130%); transition: transform .55s ease; pointer-events: none;
}
.ops-chat-reply-send:hover::after { transform: translateX(25%); }
.ops-chat-reply-send:disabled { opacity: .6; cursor: default; }

/* ============ מסך "החבילות שלנו" (js/packagesCatalog.js) - קטלוג חבילות ללקוח, בהשראת
   סימפל-סייל מבנית בלבד (הצבעים/הפונט/הרדיוס כאן הם לגמרי של המערכת שלנו). עבר סבב
   סקיצה+אישור (design-lab-packages.html) לפני המימוש כאן - ר' [[smartsim...]] בזיכרון. ============ */
.packages-catalog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.packages-catalog-header p { margin: 4px 0 0 18px; color: var(--text-muted); font-size: 13.5px; }

/* --- שורת עיגולי ספקים - רצה ברצף אינסופי אוטומטי (מונע ב-JS עם requestAnimationFrame,
   לא CSS animation - ר' setupMarqueeInteraction ב-js/packagesCatalog.js), בלי תלות במצב
   הסינון הנוכחי. אפשר גם לגרור ידנית בעכבר/מגע (יהונתן, 21.8.2026: "שאוכל להזיז את זה
   ידנית... שירוץ כמו מעגל שלא יהיה מצב שלא מוצג כלום") - הרשימה מוכפלת פעמיים ברקע
   ומתאפסת בצורה חלקה (modulo) כל אימת שהיא עוברת רוחב עותק אחד, לכל כיוון, כך שתמיד
   יש תוכן גלוי משני הצדדים - אין רגע של "ריק". לחיצה על עיגול (בלי גרירה) עדיין מסננת. --- */
.packages-catalog-marquee {
  position: relative;
  overflow: hidden; margin-bottom: 22px; cursor: grab; touch-action: pan-y;
  /* רצועה מעוצבת ולא רק רקע אטום (יהונתן, 25.8.2026: "תעשה את זה רק שיהיה מעוצב,
     אולי אפילו במסגרת פס יפה כזה"). הרקע האטום נחוץ תפקודית - ה-watermark המצויר
     מתחת לעיגולים הנעים נקרא לעין כרעד - וכאן הוא גם מקבל צורה: משטח מוגבה עם מסגרת,
     פינות מעוגלות, וקו הדגשה בגרדיאנט נייבי-נחושת בקצה העליון, כמו פס הצבע שעל
     כרטיסי החבילות. */
  /* גוון זהב אחיד בלבד - ר' ההערה המקבילה ב-.login-card::before */
  background:
    linear-gradient(to left, #f0d9a6, #c9954a 45%, #8f6a2e) top / 100% 3px no-repeat,
    var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--shadow-color);
  padding-top: 3px;
}
/* דעיכה בקצוות בשתי שכבות גרדיאנט, ולא ב-mask-image (יהונתן, 25.8.2026: "קצת מרצד
   שזה זז"). מסכה על מכל שהתוכן שבתוכו נע מאלצת את הדפדפן לרסטר מחדש את כל השטח
   הממוסך בכל פריים - וזה בדיוק הריצוד. שתי שכבות סטטיות מעל הרצועה מרוכבות פעם אחת
   ולא נוגעות בכלל בלולאת האנימציה. */
.packages-catalog-marquee::before,
.packages-catalog-marquee::after {
  content: ""; position: absolute; top: 3px; bottom: 0; width: 42px; z-index: 3; pointer-events: none;
}
.packages-catalog-marquee::before { right: 0; background: linear-gradient(to left, var(--bg-2), transparent); border-radius: 0 15px 15px 0; }
.packages-catalog-marquee::after { left: 0; background: linear-gradient(to right, var(--bg-2), transparent); border-radius: 15px 0 0 15px; }
.packages-catalog-marquee.dragging { cursor: grabbing; }
/* backface-visibility + translateZ מקבעים את הרצועה כשכבה נפרדת בכרטיס המסך, כך
   שתזוזה בשברי פיקסל מוחלקת ע"י ה-GPU במקום לצייר מחדש טקסט ולוגואים בכל פריים. */
.packages-catalog-marquee-track {
  display: flex; gap: 22px; width: max-content; padding: 4px 2px 10px;
  will-change: transform; backface-visibility: hidden; transform: translateZ(0);
}
/* מונע גרירת תמונה/בחירת טקסט מקומית שמפריעה לגרירה של השורה כולה - אבל לא על הכפתור
   עצמו, כדי שלחיצה (בלי גרירה) עדיין תגיע לאירוע ה-click שלו */
.packages-catalog-provider-btn * { pointer-events: none; }
.packages-catalog-provider-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: none;
  cursor: pointer; flex-shrink: 0; font-family: inherit; padding: 0; width: 76px;
}
.packages-catalog-provider-circle {
  position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 3px 10px var(--shadow-color); transition: border-color .15s, transform .15s;
}
/* פס הזכוכית הוא רצועה צרה שמוסעת ב-transform בלבד - ר' ההערה ליד package-glass-shift.
   במצב בהיר לבן-על-לבן כמעט בלתי-נראה (--surface לבן מלא), אז הפס האפור-כחלחל העדין הוא
   מה שנותן שם ניגודיות; במצב כהה לבן על כהה כבר בולט מספיק לבדו. */
/* נוסה שוב פעמיים (25.8, 28.8.2026) עם ניסיונות בידוד שונים (IntersectionObserver,
   אחר כך גם will-change+translateZ על ה-::before) - שני הניסיונות חזרו על אותו ריצוד
   בפועל בנייד. הסיבה האמיתית, שנמצאה רק אחרי קריאת setupMarqueeInteraction למעלה:
   השורה הזו לא זזה רק בגרירה - יש לולאת requestAnimationFrame שרצה תמיד (גלילה
   אוטומטית איטית), כל עוד לא נוגעים בה. כלומר ה-transform של האב משתנה בכל פריים,
   ללא הפסקה, לא רק בזמן מגע - וזה שונה מהותית מכרטיסי החבילות (אב סטטי, שם
   ה-IntersectionObserver באמת הספיק). הוספת עוד אנימציית transform עצמאית על כל
   עיגול גלוי (4-6 בו-זמנית) בתוך אב שכבר משתנה כל פריים = צירוף טרנספורמציות מתמיד,
   כל פריים, לנצח - לא רק עומס רגעי בזמן גרירה. זה לא ניתן לפתרון ע"י בידוד שכבה
   בלבד; שני ניסיונות זהו את זה אמפירית. אין כאן יותר ברק זכוכית - סופית, אלא אם
   מישהו ימצא דרך אחרת (לא transform-based) לתת תחושת "חיות" לעיגולים האלה. */
.packages-catalog-provider-circle .provider-icon-chip { width: 100% !important; height: 100% !important; border-radius: 50% !important; border: none !important; box-shadow: none !important; }
/* יהונתן, 1.9.2026: "כשעוברים עם העכבר תעשה שיבלטו" - scale(1.06) לבד היה עדין מדי
   להבחין בו בפועל; מוסיף גם מסגרת+זוהר כמו .active, רק בעכבר אמיתי (לא במגע). */
@media (hover: hover) {
  .packages-catalog-provider-btn:hover .packages-catalog-provider-circle {
    transform: scale(1.1); border-color: #c9954a; box-shadow: 0 6px 18px rgba(201,149,74,.3);
  }
}
.packages-catalog-provider-btn.active .packages-catalog-provider-circle { border-color: var(--accent); transform: scale(1.08); box-shadow: 0 4px 16px rgba(201,122,62,.35); }
.packages-catalog-provider-label { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.packages-catalog-provider-btn.active .packages-catalog-provider-label { color: var(--accent-text); }

/* --- טאבים ראשיים לפי קטגוריה - פס צבע שונה לכל אחת (--cat-* ב-:root) לזיהוי מהיר.
   שורה גוללת אופקית אחת ולא רשת שנשברת לכמה שורות (יהונתן, 1.9.2026: "שיקח פחות מקום...
   שיהיה ברור ויוקרתי") - אותו דפוס בדיוק כמו .packages-catalog-channel-tabs מתחת, כדי
   שהעמוד יראה עקבי ולא יתפוס 3 שורות גובה במובייל על 6 קטגוריות בלבד. --- */
.packages-catalog-category-tabs { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; }
/* עיצוב מחדש (יהונתן, 1.9.2026: "נראה לי צעצועי וילדותי... יותר יוקרתי") - היה מילוי
   פסטל שונה לכל קטגוריה גם במנוחה, הרבה גוונים בוהקים זה לצד זה. עבר סבב סקיצה
   (design-lab-category-tabs.html, 3 גרסאות) ואושר גרסה C: פיל לבן אחיד תמיד, רק
   האייקון הקטן צבעוני לפי קטגוריה (עדיין אפשר להבחין מהר בלי "קשת בענן" של רקעים),
   הנבחר מתמלא בגרדיאנט הזהב האחיד של המותג (כמו icon-badge-gold) במקום צבע ייחודי. */
.packages-catalog-category-tab {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 700;
  font-size: 14.5px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; font-family: inherit; transition: all .15s; flex-shrink: 0; white-space: nowrap;
}
.packages-catalog-category-tab .ico { font-size: 17px; display: inline-flex; }
.packages-catalog-category-tab .ico .ic { width: 17px; height: 17px; }
.packages-catalog-category-tab[data-cat="cellular"] .ico { color: var(--primary); }
.packages-catalog-category-tab[data-cat="home_internet"] .ico { color: var(--accent-text); }
.packages-catalog-category-tab[data-cat="tv"] .ico { color: var(--success-text); }
.packages-catalog-category-tab[data-cat="electricity"] .ico { color: var(--warning-text); }
.packages-catalog-category-tab[data-cat="home_phone"] .ico { color: var(--text-muted); }
.packages-catalog-category-tab[data-cat="promo"] .ico { color: var(--danger-text); }
.packages-catalog-category-tab:not(.active):hover { border-color: #c9954a; box-shadow: 0 3px 8px var(--shadow-color); transform: translateY(-1px); }
/* גימור מבריק (inset highlight) כמו icon-badge-gold - יהונתן (2.9.2026): "לא עם סיומת
   מושלמת" - הפיל הזהוב היה מילוי גרדיאנט שטוח בלי אור פנימי, נראה "מת" ליד העיגולים
   המבריקים (icon-badge-gold) שכן מקבלים את הטבעת הפנימית הזו. */
.packages-catalog-category-tab.active {
  color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.22), 0 3px 10px rgba(201,149,74,.35);
  background: linear-gradient(135deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%);
}
.packages-catalog-category-tab.active .ico { color: #fff; }

/* "תנאי התוכנית והסכם התקשרות" בחלונית פרטי החבילה - קישור בלבד, ה-PDF נטען רק בלחיצה */
.package-agreement-link {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2);
  text-decoration: none; color: var(--text); transition: border-color .15s, background .15s;
}
.package-agreement-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.package-agreement-ico { font-size: 20px; flex-shrink: 0; }
.package-agreement-link small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* --- טאבים משניים לפי ערוץ - עוטף את .channel-tab/.channel-tab-circle הקיימים
   (נבנו במקור לפאנל התקשורת התפעולי, ר' .ops-chat-channel-tabs) --- */
.packages-catalog-channel-tabs { display: flex; gap: 14px; padding: 8px 2px 16px; overflow-x: auto; }
.packages-catalog-channel-tabs .channel-tab-label { font-size: 13px; font-weight: 800; color: var(--text); }

/* --- תת-סינון בתוך קטגוריה: כשר/רגיל/5G בסלולר (לפי plan_type חופשי), סיבים/נחושת
   באינטרנט (connection_type), TV בלבד/טריפל בטלוויזיה (טאב "טלוויזיה" מכיל גם tv וגם
   triple יחד - ר' categoryMatches ב-js/packagesCatalog.js) --- */
.packages-catalog-subfilter-tabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.packages-catalog-subfilter-tab {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; font-family: inherit; transition: all .12s;
}
/* גוון זהב אחיד (כמו icon-badge-gold/טאבי הקטגוריה) - היה var(--accent) שטוח, כתום יותר
   ולא תואם (יהונתן, 2.9.2026: "קצת כתום, תעשה שיהיה אחיד"). */
.packages-catalog-subfilter-tab.active {
  background: linear-gradient(135deg, #f0d9a6 0%, #c9954a 45%, #8f6a2e 100%); color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.22), 0 2px 6px rgba(201,149,74,.3);
}

/* --- תגיות 5G/כשר - "מדליית זהב" יוקרתית (יהונתן, 21.8.2026: "יותר יוקרתי"), מתואמות
   לגמרי לגוון הזהב של עיגולי האייקונים ולכפתור - לא עוד גרדיאנט טכנולוגי סגול-ורוד. --- */
.package-tag-5g, .package-tag-kosher {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: #4a3410;
  background: linear-gradient(135deg, #f6e2b8 0%, #e8c27a 45%, #c99a4e 100%); border-radius: 999px;
  padding: 3px 9px 3px 7px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.6);
}
.package-tag-5g svg, .package-tag-kosher svg { filter: drop-shadow(0 1px 0 rgba(255,255,255,.4)); flex-shrink: 0; }

/* חותמת ועדת הרבנים לענייני תקשורת - מחליפה את המילה "מאושר" (יהונתן, 26.8.2026).
   הקובץ JPEG על רקע לבן, ולכן החיתוך העגול הכרחי: בלעדיו מופיע ריבוע לבן סביב
   החותמת, שבמצב כהה בולט כמו טלאי. הטבעת הדקה מפרידה בין הלבן של החותמת לרקע
   הכרטיס במצב בהיר, שבו שניהם לבנים. */
/* 46px ולא 34: בגודל הקטן הכיתוב בתוך החותמת ("ועדת הרבנים לענייני תקשורת") נמרח
   לכתם אפור ואי אפשר לזהות אותה כלל - נבדק בפרודקשן (26.8.2026). */
.package-tag-kosher-seal {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.16);
}
@media (prefers-color-scheme: dark) {
  .package-tag-kosher-seal { box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 1px 4px rgba(0,0,0,.5); }
}
body.dark .package-tag-kosher-seal { box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 1px 4px rgba(0,0,0,.5); }

/* --- שורת "הכי פופולריות" - חישוב אוטומטי לפי מכירות בפועל (לא סימון ידני), ר'
   api.listRecentLineSalesForPopularity --- */
.packages-catalog-popular-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin: 4px 0 12px; }
.packages-catalog-popular-title .fire { font-size: 18px; }
.packages-catalog-popular-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 26px; }
.packages-catalog-popular-row .package-card { min-width: 260px; flex-shrink: 0; }

/* ============ כרטיס חבילה - "כרטיסייה" עם קו מחורר (הבחירה הסופית מתוך גלריית העיצוב,
   ר' [[smartsim_packages_catalog_screen]]) - כניסה בקפיצה אלסטית, הובר בהרמה, וברק זכוכית
   קבוע שרץ ברקע כל הזמן (לא רק בהובר) עם עיכוב שונה לכל כרטיס כדי שלא כולם יהבהבו יחד. ============ */
.packages-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
@keyframes package-card-bounce-in { 0% { opacity: 0; transform: translateY(-30px); } 55% { opacity: 1; transform: translateY(6px); } 75% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
/* ההנפשה מופעלת רק על כרטיסים/עיגולים שנמצאים בפועל בשדה הראייה (ר. IntersectionObserver
   ב-js/packagesCatalog.js). נמדד בפרודקשן: 86 אלמנטים מנפישים במקביל הורידו את הדף
   ל-90ms לפריים (11 FPS) והם שגרמו לריצוד; עם ההגבלה חוזרים ל-16.7ms (60 FPS).

/* מונע ב-transform בלבד, ולא ב-background-position כמו קודם (יהונתן, 25.8.2026: "ההנפשה
   של הזכוכית במצב כהה תקועה ככה" + צילום מסך של פס קפוא). background-position לא מואץ
   בכרטיס המסך - הדפדפן חייב לצייר מחדש גרדיאנט ברוחב 250% בכל פריים, וכשזה קורה על ~90
   אלמנטים במקביל (64 כרטיסים + 27 עיגולים) דפדפן נייד פשוט מפסיק לעדכן אותם והפס נראה
   קפוא. transform רץ על ה-GPU בלי ציור מחדש בכלל. הרצועה מתחילה ומסתיימת הרחק מחוץ
   לאלמנט, אז ההתחלה מחדש בלתי-נראית - וה-skew נותן את המראה האלכסוני בלי תזוזה אנכית
   (יהונתן: "רק שתונפש לצד... לא לרדת למטה כאילו יורד מסך"). */
@keyframes package-glass-shift {
  0%   { transform: translateX(-220%) skewX(-18deg); }
  100% { transform: translateX(320%) skewX(-18deg); }
}
.package-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; cursor: pointer;
  animation: package-card-bounce-in .7s cubic-bezier(.28,.84,.42,1) backwards; animation-delay: calc(min(var(--i, 0), 10) * 40ms);
  transition: box-shadow .3s ease, transform .3s ease;
}
.package-card::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; height: 4px; width: 100%; background: var(--cat-color, var(--primary)); z-index: 1; }
.package-card::before {
  content: ""; position: absolute; top: -25%; bottom: -25%; left: 0; width: 42%;
  z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(110,140,180,.14) 34%, rgba(255,255,255,.5) 50%, rgba(110,140,180,.14) 66%, transparent);
  transform: translateX(-220%) skewX(-18deg);
  animation: package-glass-shift 11s ease-in-out infinite;
  animation-delay: var(--shimmer-delay, 0s);
  animation-play-state: paused;
}
:root[data-theme="dark"] .package-card::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.34) 50%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .package-card::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.34) 50%, transparent); }
}
/* הרמה+צל בהעברת עכבר (יהונתן, 1.9.2026, לפי דוגמת עיצוב "הרמה + צל") - רק בעכבר אמיתי
   (@media hover:hover) כמו כל :hover אחר במסך הזה, כדי לא ליצור "צריך ללחוץ פעמיים" במגע. */
@media (hover: hover) {
  .package-card:hover { box-shadow: 0 16px 34px var(--shadow-color); transform: translateY(-5px); }
}
.package-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 18px 18px 0; }
.package-card-logo { width: 40px; height: 40px; flex-shrink: 0; }
.package-card-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.package-channel-chip { font-size: 9.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.package-channel-chip.channel-simple { background: var(--accent-soft); color: var(--accent-text); }
.package-channel-chip.channel-top { background: var(--primary-light); color: var(--primary); }
.package-channel-chip.channel-other { background: var(--success-soft); color: var(--success-text); }
.package-card-name { font-weight: 800; font-size: 16px; text-align: center; margin: 12px 0 2px; padding: 0 16px; }
.package-card-price { text-align: center; font-size: 27px; font-weight: 800; color: var(--cat-color, var(--primary)); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.package-card-price small { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
/* קו "כרטיסייה" מחורר עם שני חצאי-עיגול בקצוות, כמו ניתוק של כרטיס טיסה/כניסה */
.package-perf { position: relative; height: 0; border-top: 2px dashed var(--border); margin: 0 18px; }
.package-perf::before, .package-perf::after { content: ""; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); }
.package-perf::before { inset-inline-start: -27px; }
.package-perf::after { inset-inline-end: -27px; }
.package-card-specs { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 10px; padding: 18px 12px; }
.package-spec { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.package-spec .ic { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #e8c27a, #c99a4e); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.package-spec b { font-size: 15px; font-weight: 800; }
.package-spec span { font-size: 9.5px; color: var(--text-muted); font-weight: 700; }
.package-card-btn-wrap { padding: 4px 18px 18px; }
.package-card-btn {
  width: 100%; position: relative; overflow: hidden; background: transparent;
  border: 1.5px solid var(--accent); color: var(--accent-text); border-radius: 999px; padding: 11px; font-size: 13.5px; font-weight: 700;
}
.package-card-btn span { position: relative; z-index: 1; transition: color .3s; }
.package-card-btn::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.4,0,.2,1); }
/* hover:hover (לא רק עכבר אמיתי, יש דפדפנים שמריצים גם על מגע) - בלי זה הקשה במסך
   מגע מפעילה :hover (יהונתן, 31.8.2026: "מהבהב... קופץ פעמיים" בפתיחת "פרטים נוספים") -
   שקע הזהב מתחיל להתמלא (.35s) בדיוק כשהחלונית נפתחת עליו (עוד אנימציה, מהירה יותר),
   ואז נשאר "תקוע" ממולא כי במגע אין המשך-מעבר-עכבר שיפעיל :hover-out כשהחלונית נסגרת -
   שני מעברים חופפים בלתי-קשורים על אותו כפתור נראים כמו הבהוב/קפיצה כפולה. */
@media (hover: hover) {
  .package-card-btn:hover::before { transform: scaleX(1); }
  .package-card-btn:hover span { color: #fff; }
}

/* --- כלי נציג בראש הכרטיס: השוואה + שליחה בוואטסאפ (יהונתן, 27.8.2026) - שורה דקה
   ושקטה מעל תוכן הכרטיס, לא צובעת אותו כדי שהכרטיס עצמו יישאר נקי כשמראים אותו ללקוח.
   נעלמת כליל במצב "הצג ללקוח" - ר' .pkgcat-customer-mode. --- */
.package-card-tools { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0; }
.package-card-compare { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.package-card-compare input { width: auto; margin: 0; cursor: pointer; }
/* הלוגו (עיגול+פרטים) מגיע שלם מ-whatsappIconHtml() - לא עוד עיגול-רקע כאן שסביבו,
   כי אז הפרטים הדקים של הלוגו מצטמצמים לשטח קטן מדי בתוך עיגול גדול מסביב ונראים
   מטושטשים (יהונתן, 31.8.2026: "לא קריא ולא ברור"). */
.package-card-whatsapp {
  width: 26px; height: 26px; border: none; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: transform .12s;
}
.package-card-whatsapp:hover { transform: scale(1.08); }
/* package-channel-chip נוסף (יהונתן, 2.9.2026: "לא מסתיר את הערוץ שרשום על כל חבילה
   בנפרד") - תג הערוץ שיושב על כרטיס בודד (בנוסף לטאבי הסינון שכבר הוסתרו) נשכח קודם. */
.pkgcat-customer-mode .package-card-tools,
.pkgcat-customer-mode .packages-catalog-channel-tabs,
.pkgcat-customer-mode .package-channel-chip,
.pkgcat-customer-mode #pkgcat-compare-bar { display: none !important; }

/* --- שורת "נבחרו להשוואה" - צפה בראש המסך (מתחת לכותרת) כשיש לפחות בחירה אחת -
   יהונתן ביקש להעלות מתחתית העמוד למעלה כדי שתהיה גלויה מיד בלי לגלול. --- */
.pkgcat-compare-bar {
  position: sticky; top: 12px; z-index: 5; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 8px 24px var(--shadow-color); font-size: 13.5px; font-weight: 700;
}
.package-compare-table th, .package-compare-table td { text-align: center; vertical-align: top; }
.package-compare-table thead th { font-size: 12.5px; }

/* --- חלונית פרטי חבילה - נפתחת דרך openModal() הקיים, ר' js/app.js --- */
.package-modal-head { display: flex; align-items: center; gap: 12px; }
.package-modal-head .package-card-logo { width: 52px; height: 52px; }
.package-tier-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.package-tier-table th, .package-tier-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.package-tier-table th { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.package-tier-table tr.best td { font-weight: 800; color: var(--accent-text); }
/* 2 עמודות קבועות ולא auto-fill עם minmax רחב - בחלון צר (מודל בנייד, ~280px) auto-fill
   עם 160px היה נופל לעמודה אחת, וכל פרט (כולל ערכים קצרים כמו "עלות סים: ₪0.00") תפס
   שורה מלאה (יהונתן, 28.8.2026: "לא צריך שכל פרט יקח שורה"). */
.package-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 16px; margin-top: 6px; }
.package-spec-item { font-size: 13px; }
.package-spec-item .k { color: var(--text-muted); font-size: 11.5px; display: block; margin-bottom: 2px; }
.package-spec-item .v { font-weight: 700; }

/* --- קיצור-דרך בדף הבית (js/dashboard.js) - כרטיס בולט שמוביל למסך --- */
.packages-catalog-dashboard-tile {
  display: flex; align-items: center; gap: 14px; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.packages-catalog-dashboard-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow-color); }

/* ===== צמצום טבלאות ארוכות (ר' applyTableCollapse ב-js/utils.js) ===== */
tr.row-collapsed { display: none; }
.table-collapse-cell { text-align: center; padding: 8px 6px !important; background: var(--bg-2); }
.table-collapse-btn {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 18px; font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.table-collapse-btn:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

/* מופעל ע"י IntersectionObserver (js/packagesCatalog.js) רק על מה שנראה בפועל */
.package-card.shimmer-on::before { animation-play-state: running; }
/* מכבד העדפת מערכת להפחתת תנועה */
@media (prefers-reduced-motion: reduce) {
  .package-card::before, .packages-catalog-provider-circle::before { animation: none; }
}

/* הודעת "עלתה גרסה חדשה" - מחליפה רענון אוטומטי כפוי (ר' רישום ה-SW ב-js/app.js), כדי
   שלא תישבר טופס באמצע מילוי. היה עיצוב "כדור" קטן בפינה - התברר בפועל (1.9.2026, סבב
   בדיקות ארוך) שקל מאוד לפספס אותו: כמה פעמים יהונתן חשב שתיקון לא עלה כי לא לחץ בדיוק
   על הכפתור הקטן הזה. פס מלא-רוחב למעלה, בגובה עין, קשה הרבה יותר לפספס בטעות. */
.sw-update-toast {
  position: fixed; top: 0; inset-inline: 0; z-index: 9999; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 16px; border: none; cursor: pointer;
  /* גרדיאנט חד-גוני (נייבי בלבד) - היה קודם מעבר כחול-לזהב, יהונתן לא אהב את הצבעים
     המתמזגים (1.9.2026); אחר כך נייבי שטוח אחיד - יהונתן ביקש (1.9.2026, המשך אותה
     שיחה) "שלא יהיה כפתור כחול אחיד כהה מלא... שיהיה לזה איזה עיצוב". גוני נייבי קבועים
     (לא var(--primary)/var(--primary-dark)) בכוונה - אלה הופכים לתכלת בהיר במצב כהה
     (מיועדים לטקסט על רקע כהה, לא לשמש כרקע עצמו) ומאבדים ניגודיות מול הטקסט הלבן,
     בדיוק כמו ההערה המקבילה ב-.cc-face. */
  background: linear-gradient(135deg, #0b3d8f 0%, #06254e 100%); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.sw-update-toast:hover { filter: brightness(1.15); }
/* ברק חד-פעמי (לא לופ) שעובר בזמן ההופעה - מושך תשומת לב בלי להטריד לאורך זמן,
   בהתאם לתפקיד ההודעה (להיתפס מיד, לא לרצד לנצח). */
.sw-update-toast::after {
  content: ""; position: absolute; inset-block: 0; left: 0; width: 55%; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  transform: translateX(-160%); animation: sw-toast-shimmer 1.4s ease-out .4s 1;
}
@keyframes sw-toast-shimmer { to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  .sw-update-toast::after { animation: none; }
}

/* צמצום רשימות כרטיסים (לוח הבקרה) - ר' applyListCollapse ב-js/utils.js */
.alerts-list > .row-collapsed { display: none; }
.list-collapse-btn { display: block; width: 100%; margin-top: 8px; }

/* דוח ההפרשים של סנכרון סימפל (js/catalogSync.js) */
.cs-diff-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: 12.5px;
}
.cs-diff-chip .k { color: var(--text-muted); font-weight: 700; }
.cs-diff-chip .old { text-decoration: line-through; color: var(--text-muted); }
.cs-diff-chip .arrow { color: var(--accent); }
.cs-diff-chip .new { font-weight: 700; color: var(--success-text); }

/* בורר מדרגות עמלה לפי ספק (js/pricelist.js renderCommissionTierPicker) */
.tier-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.tier-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 12px; border-radius: 10px; cursor: pointer; font-family: inherit;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); text-align: right;
  transition: border-color .12s, background .12s;
}
.tier-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.tier-chip.active { border-color: var(--accent); background: var(--accent-soft); }
.tier-chip strong { font-size: 13px; }
.tier-chip span { font-size: 11.5px; color: var(--text-muted); }

/* ============ מסך סקירת עמלות (js/commissionReview.js) ============ */
.cr-lead { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; max-width: 70ch; }
.cr-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cr-bar-sp { flex: 1 1 auto; }
.cr-stat span { display: block; font-size: 12px; color: var(--text-muted); }
.cr-stat strong { font-size: 20px; font-weight: 800; }
.cr-modes { display: flex; gap: 6px; }
.cr-prov { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; font-size: 13px; }
.cr-row { margin-bottom: 10px; padding: 12px 14px; }
.cr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cr-name { font-size: 15px; }
.cr-kind { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--text-muted); }
.cr-prices { font-size: 12px; color: var(--text-muted); }
.cr-cur { margin-inline-start: auto; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); }
.cr-cur-empty { background: rgba(217, 119, 6, .14); color: #b45309; }
.cr-cur-ok { background: rgba(22, 163, 74, .14); color: #15803d; }
.cr-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-pick { flex: 1 1 300px; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; font-size: 13px; }
.cr-sug { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.cr-num { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
.cr-num input { width: 78px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .cr-cur-empty { background: rgba(217, 119, 6, .22); color: #fbbf24; }
  .cr-cur-ok { background: rgba(22, 163, 74, .22); color: #4ade80; }
  .cr-sug { background: rgba(96, 165, 250, .18); color: #93c5fd; }
}
body.dark .cr-cur-empty { background: rgba(217, 119, 6, .22); color: #fbbf24; }
body.dark .cr-cur-ok { background: rgba(22, 163, 74, .22); color: #4ade80; }
body.dark .cr-sug { background: rgba(96, 165, 250, .18); color: #93c5fd; }
@media (max-width: 640px) {
  .cr-cur { margin-inline-start: 0; }
  .cr-pick { flex: 1 1 100%; }
}

/* --- זיהוי לקוח קיים לפי ת.ז בטופס עסקה (js/directDeals.js) --- */
.ds-found {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px;
  padding: 8px 10px; border-radius: 9px; font-size: 12.5px; line-height: 1.5;
  background: rgba(37, 99, 235, .09); border: 1px solid rgba(37, 99, 235, .25);
}
.ds-found-actions { display: flex; gap: 6px; margin-inline-start: auto; }
.ds-found .btn-sm { padding: 4px 10px; font-size: 12px; }
.ds-found-done { background: rgba(22, 163, 74, .10); border-color: rgba(22, 163, 74, .3); font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .ds-found { background: rgba(96, 165, 250, .13); border-color: rgba(96, 165, 250, .3); }
  .ds-found-done { background: rgba(74, 222, 128, .13); border-color: rgba(74, 222, 128, .32); }
}
body.dark .ds-found { background: rgba(96, 165, 250, .13); border-color: rgba(96, 165, 250, .3); }
body.dark .ds-found-done { background: rgba(74, 222, 128, .13); border-color: rgba(74, 222, 128, .32); }

/* --- בורר ספק עם לוגו בטופס הוספת חבילה (js/pricelist.js) --- */
.provider-pick-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.provider-pick {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.provider-pick:hover { border-color: var(--accent); }
.provider-pick.active {
  border-color: var(--accent); background: var(--accent-soft, rgba(201,122,62,.12));
  box-shadow: 0 1px 5px rgba(201,122,62,.28);
}
.provider-pick img { border-radius: 50%; background: #fff; flex-shrink: 0; }
.channel-note {
  display: flex; align-items: center; gap: 8px; margin-top: 9px;
  font-size: 12.5px; color: var(--text-muted);
}
.channel-note img { border-radius: 50%; background: #fff; }
