/* =========================================================
   ClubRRRR — מערכת העיצוב
   מודרנית, מינימליסטית, טורקיז.

   שלושה עקרונות:
   1. משטח מדבר לפני מסגרת — הפרדה נוצרת מרקע וממרווח, לא מקווים.
   2. צבע רק כשהוא מידע — מספר ניטרלי הוא שחור, לא טורקיז.
   3. אוויר במקום קישוט — מה שאפשר להוריד, מורידים.

   פונט: Heebo, ארוז מקומית ב-public/fonts (SIL OFL 1.1).
   ========================================================= */

@import url("/fonts/fonts.css");

:root {
  /* ---------- טורקיז — הצבע היחיד ---------- */
  --t-50:  #f0fdfa;
  --t-100: #ccfbf1;
  --t-200: #99f6e4;
  --t-300: #5eead4;
  --t-400: #2dd4bf;
  --t-500: #14b8a6;
  --t-600: #0d9488;   /* הראשי */
  --t-700: #0f766e;
  --t-800: #115e59;
  --t-900: #134e4a;

  --primary: var(--t-600);
  --primary-hover: var(--t-700);
  --primary-soft: var(--t-50);
  --primary-tint: var(--t-100);
  --on-primary: #ffffff;

  /* ---------- ניטרלים קרירים ---------- */
  --n-0:   #ffffff;
  --n-25:  #fcfdfd;
  --n-50:  #f8fafa;   /* קנבס */
  --n-100: #f1f5f5;
  --n-150: #e9eeef;
  --n-200: #dfe6e7;
  --n-400: #94a3a6;
  --n-500: #6b7a7d;
  --n-700: #3f4b4e;
  --n-900: #0f1a1c;   /* טקסט */

  --background: var(--n-50);
  --surface: var(--n-0);
  --surface-sunken: var(--n-100);
  --surface-hover: var(--n-50);

  --ink: var(--n-900);
  --ink-2: var(--n-700);
  --ink-3: var(--n-500);
  --ink-4: var(--n-400);

  --border: var(--n-150);
  --border-soft: var(--n-100);
  --border-input: var(--n-200);

  /* ---------- סמנטיקה ---------- */
  --ok: #0f8a5f;        --ok-soft: #e7f7ef;
  --warn: #b4740b;      --warn-soft: #fdf4e3;
  --danger: #c9453b;    --danger-soft: #fdeeec;
  --info: #2c7ab0;      --info-soft: #eaf4fb;
  --accent: #6366f1;    --accent-soft: #eef0fe;
  --wa: #0f8a5f;

  /* ---------- כינויים לתאימות ---------- */
  --panel: var(--surface);
  --panel-2: var(--surface-sunken);
  --line: var(--border);
  --bg: var(--background);
  --brand: var(--primary);
  --brand-2: var(--t-400);
  --brand-ink: var(--on-primary);
  --outline: var(--ink-3);
  --outline-variant: var(--border-input);
  --surface-lowest: var(--surface);
  --surface-low: var(--surface-sunken);
  --surface-high: var(--n-100);
  --surface-highest: var(--n-150);
  --on-surface: var(--ink);
  --on-surface-variant: var(--ink-2);
  --error: var(--danger);
  --error-container: var(--danger-soft);
  --on-error-container: #8f2f27;
  --ok-container: var(--ok-soft);
  --warn-container: var(--warn-soft);
  --info-container: var(--info-soft);
  --accent-container: var(--accent-soft);
  --danger-container: var(--danger-soft);
  --primary-container: var(--t-100);
  --on-primary-container: var(--t-800);
  --primary-bright: var(--t-400);
  --secondary-container: var(--t-50);
  --on-secondary-container: var(--t-800);
  --inverse-surface: var(--n-900);
  --inverse-on-surface: var(--n-50);

  /* ---------- צורות ---------- */
  --r-sm: 5px;
  --r: 8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --radius: var(--r-xl);
  --r-full: 9999px;

  /* ---------- עומק — מינימלי ---------- */
  --shadow-sm: 0 1px 2px rgba(15, 26, 28, .04);
  --shadow: 0 2px 8px rgba(15, 26, 28, .06);
  --shadow-md: 0 8px 24px rgba(15, 26, 28, .08);
  --shadow-lg: 0 24px 56px rgba(15, 26, 28, .16);
  --glow: 0 0 0 3px rgba(13, 148, 136, .14);

  /* ---------- מרווחים ---------- */
  --sidebar-w: 228px;
  --gutter: 14px;
  --card-padding: 18px;
  --page-margin: 24px;
}

* { box-sizing: border-box; }

html, body {
  /* min-height ולא height: עם height:100% הגוף נעצר בגובה המסך,
     ותוכן ארוך יותר גולש אל מחוץ לו וחושף את הרקע שמאחוריו —
     פס בצבע אחר בתחתית הדף. */
  margin: 0; padding: 0; min-height: 100%;
  background: var(--background); color: var(--ink);
  font-family: "Heebo", "Assistant", "Segoe UI", system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.55;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
::selection { background: var(--t-200); color: var(--t-900); }

/* ===== התחברות ===== */
.login-screen {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--n-50);
}
.login-screen::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--t-50), transparent 70%);
}
.login-card {
  position: relative; width: min(360px, 92vw); background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 32px 28px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 12px;
}
.login-logo { font-size: 25px; font-weight: 700; color: var(--ink); text-align: center; letter-spacing: -.03em; }
.login-sub { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: -7px; margin-bottom: 6px; }
.login-stage { display: flex; flex-direction: column; gap: 12px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.login-error { color: var(--danger); font-size: 12.5px; min-height: 16px; }
.login-hint { text-align: center; font-size: 11.5px; color: var(--ink-4); }

/* בחירת לקוח — רק כשאותה כתובת רשומה אצל יותר מאחד */
.login-choose-title { font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: center; }
.login-tenants { display: flex; flex-direction: column; gap: 8px; }
.login-tenant {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  padding: 11px 13px; border: 1px solid var(--border-input); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.login-tenant:hover { border-color: var(--primary); background: var(--primary-soft); }
.login-tenant-mark {
  flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--t-800); font-size: 12px; font-weight: 700;
}
.login-tenant-logo { background: transparent; }
.login-tenant-logo img { width: 100%; height: 100%; object-fit: contain; }

/* אזור הלוגו במסך המיתוג — משבצת שקופה שמראה את הלוגו כפי שהוא,
   על רקע משבצות כדי ש-PNG שקוף לא ייראה כאילו הוא לבן */
.logo-drop {
  width: 150px; height: 76px; border: 1px dashed var(--border-input); border-radius: 12px;
  display: grid; place-items: center; overflow: hidden; padding: 8px;
  background: repeating-conic-gradient(var(--n-100) 0% 25%, var(--surface) 0% 50%) 50%/14px 14px;
}
.logo-drop img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ===== שלד ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); color: var(--ink-2);
  border-inline-start: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 18px 16px 16px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 12px; letter-spacing: .01em;
}
/* לוגו שהועלה: הריבוע נהיה שקוף והתמונה נכנסת בשלמותה.
   contain ולא cover — לוגו חתוך גרוע מלוגו קטן. */
.brand-mark-logo { background: transparent; padding: 0; }
.brand-mark-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }

.brand-name { color: var(--ink); font-weight: 700; font-size: 15.5px; line-height: 1.2; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: var(--ink-4); margin-top: 1px; }

.nav { display: flex; flex-direction: column; padding: 4px 10px 12px; gap: 1px; overflow-y: auto; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r);
  font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s;
}
.nav a::before { content: attr(data-icon); font-size: 12px; width: 15px; text-align: center; color: var(--ink-4); transition: color .15s; }
.nav a:hover { background: var(--n-50); color: var(--ink); }
.nav a:hover::before { color: var(--ink-3); }
.nav a.active { background: var(--primary-soft); color: var(--t-800); font-weight: 600; }
.nav a.active::before { color: var(--primary); }
.nav-badge {
  margin-inline-start: auto; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-full);
}
.nav-group {
  font-size: 10px; color: var(--ink-4); padding: 14px 10px 4px;
  letter-spacing: .06em; font-weight: 600; text-transform: none;
}

.sidebar-foot {
  padding: 12px 14px; border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 8px;
}
.user-name { color: var(--ink); font-size: 12.5px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--ink-4); }
.user-box { flex: 1; min-width: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: rgba(248, 250, 250, .82); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px var(--page-margin) 14px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 20px; line-height: 1.25; font-weight: 600; color: var(--ink); letter-spacing: -.03em; }
.topbar h1:focus { outline: none; }
.topbar h1:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.topbar-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.topbar-main { min-width: 0; }
.topbar-side { display: flex; align-items: flex-start; gap: 8px; }
.topbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== נתיב ניווט ===== */

.crumbs { min-width: 0; overflow: hidden; margin-top: 7px; }
.crumbs[hidden] { display: none; }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 5px; flex-wrap: nowrap;
  font-size: 11.5px; color: var(--ink-4); white-space: nowrap;
}
/* המפריד נשען על ::before של הפריט ולא על תו בתוכן, כדי שקורא מסך
   יקרא את שמות המסכים בלבד ולא סדרה של מפרידים.
   התו נבחר סימטרי בכוונה: תווי חץ כמו ‹ ו-› הם תווים "מראתיים" בבידי
   ומתהפכים אוטומטית בהקשר RTL, כך שהם מצביעים לכיוון ההפוך מהמכוון. */
.crumbs li + li::before { content: '/'; margin-inline-end: 5px; color: var(--n-200); }
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs a { color: var(--ink-3); text-decoration: none; border-radius: 3px; padding: 1px 2px; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.crumbs a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.crumbs [aria-current="page"] { color: var(--ink-2); font-weight: 600; }
.crumbs li:last-child span { overflow: hidden; text-overflow: ellipsis; }

/* ===== דילוג לתוכן ===== */

.skip-link {
  position: fixed; top: -60px; inset-inline-start: 12px; z-index: 200;
  background: var(--primary); color: var(--on-primary);
  padding: 9px 16px; border-radius: 0 0 var(--r) var(--r);
  font-size: 13px; font-weight: 600; transition: top .15s;
}
.skip-link:focus { top: 0; }

.content:focus { outline: none; }

@media (max-width: 700px) {
  .crumbs li:not(:last-child):not(:first-child) { display: none; }
}
.content { padding: var(--gutter) var(--page-margin) 56px; }

/* פעמון */
.bell {
  position: relative; width: 32px; height: 32px; flex: none; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r);
  color: var(--ink-3); display: grid; place-items: center; transition: .15s; padding: 0;
}
.bell:hover { background: var(--surface); color: var(--ink); border-color: var(--border-input); }
.bell.has-urgent { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.bell svg { width: 16px; height: 16px; }
.bell-badge {
  position: absolute; top: -5px; inset-inline-start: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: var(--r-full);
  font-size: 9.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--background);
}

/* ===== כפתורים ===== */
.btn {
  border: 1px solid var(--border-input); background: var(--surface); color: var(--ink-2);
  padding: 6px 13px; border-radius: var(--r); cursor: pointer;
  font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s; white-space: nowrap;
}
.btn:hover { background: var(--n-50); border-color: var(--n-400); color: var(--ink); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { background: var(--surface); border-color: var(--border-input); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.btn-ghost:hover { background: var(--n-100); border-color: transparent; }
.btn-sm { padding: 4px 9px; font-size: 11.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; justify-content: center; padding: 10px; font-size: 13px; font-weight: 600; }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; font-weight: 600; }
.btn-wa:hover { background: #0c7350; border-color: #0c7350; color: #fff; }

/* ===== כרטיסים ===== */
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
}
.card-head {
  padding: 14px var(--card-padding) 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head h3 { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.card-body { padding: var(--card-padding); }
.card-body.tight { padding: 0; }
/* כותרת ותוכן הם רצף אחד — אין צורך בקו הפרדה או בריפוד כפול */
.card-head + .card-body { padding-top: 2px; }
.card-head + .card-body.tight { border-top: 1px solid var(--border-soft); }

.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 15px 17px;
  transition: border-color .15s, box-shadow .15s;
}
a.stat:hover { border-color: var(--t-200); box-shadow: var(--shadow-sm); }
.stat-label {
  font-size: 11.5px; color: var(--ink-3); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.stat-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.stat-value {
  font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -.04em;
  color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums;
}
.stat-foot { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }

/* ===== שעון הניסיון ===== */
.trial-bar {
  padding: 9px 22px; font-size: 12.5px; line-height: 1.5;
  background: var(--warn-soft); color: var(--warn);
  border-bottom: 1px solid var(--border);
}
.trial-bar.trial-over { background: var(--danger-soft); color: var(--danger); }

/* שורה שמעבר לתקופת הכיסוי — נראית, ואינה פעילה.
   אטומות ולא הסתרה: הלקוח צריך לראות בדיוק מה הוא מקבל בשדרוג. */
.row-locked > td { opacity: .45; }
.row-locked { background: repeating-linear-gradient(
  135deg, transparent, transparent 7px, var(--surface-sunken) 7px, var(--surface-sunken) 14px); }

/* ===== חבילות קרדיטים ===== */
.pkg {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 20px 18px 16px; text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.pkg:hover { border-color: var(--t-200); box-shadow: var(--shadow-sm); }
/* החבילה המומלצת בולטת במסגרת ולא ברקע — רקע צבעוני על שלוש
   חבילות זו לצד זו הופך את הבחירה לרועשת במקום ברורה */
.pkg-hot { border-color: var(--primary); }
.pkg-badge {
  position: absolute; top: -9px; inset-inline-start: 50%; transform: translateX(50%);
  background: var(--primary); color: var(--on-primary);
  font-size: 10.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  white-space: nowrap;
}
.pkg-credits {
  font-size: 30px; font-weight: 600; line-height: 1.1;
  letter-spacing: -.04em; color: var(--ink);
}
.pkg-unit { font-size: 12px; color: var(--ink-3); }
.pkg-price { font-size: 19px; font-weight: 600; color: var(--ink); margin-top: 10px; }
.pkg-per { font-size: 11px; color: var(--ink-4); margin-bottom: 14px; }

/* ===== טבלאות ===== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th {
  text-align: start; font-weight: 500; color: var(--ink-4); font-size: 11px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--n-25); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr.clickable { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-4); }
.nowrap { white-space: nowrap; }
.truncate { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== תגיות ===== */
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--r-sm);
  font-size: 11px; font-weight: 500;
  background: var(--n-100); color: var(--ink-2); white-space: nowrap;
}
.tag-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-info { background: var(--info-soft); color: var(--info); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-neutral { background: var(--n-100); color: var(--ink-3); }
.tag-primary { background: var(--primary-soft); color: var(--t-700); }

/* ===== טפסים ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
input[type=text], input[type=date], input[type=time], input[type=number], input[type=password],
input[type=email], input[type=tel], input[type=datetime-local], input[type=color], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-input); border-radius: var(--r);
  background: var(--surface); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
  /* הדפדפן מרנדר שדות תאריך, שעה, מספר, מייל וטלפון משמאל לימין גם
     במסמך RTL — וזה מה שגרם לטפסים להיראות הפוכים לעומת שאר המערכת.
     כאן מיישרים אותם חזרה לימין כמו כל שדה אחר. */
  direction: rtl; text-align: start;
}
/* בתוך שדה תאריך או שעה סדר הרכיבים עצמו נשאר לוגי (יום/חודש/שנה),
   רק היישור והאייקון עוברים לימין */
input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator {
  margin-inline-start: 0; margin-inline-end: auto;
}
/* מייל, כתובת וטלפון הם תוכן לטיני — הערך עצמו נשאר LTR, אבל השדה
   מיושר לימין כך שהטופס נקרא אחיד */
input[type=email], input[type=tel], input[type=url] { direction: ltr; text-align: right; }
input[type=email]::placeholder, input[type=tel]::placeholder, input[type=url]::placeholder { direction: rtl; }
input:hover, select:hover, textarea:hover { border-color: var(--n-400); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--glow); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
textarea { resize: vertical; min-height: 82px; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); }
.hint { font-size: 11.5px; color: var(--ink-4); line-height: 1.55; }

.toolbar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: var(--gutter); }
.toolbar select, .toolbar input { width: auto; min-width: 135px; padding: 6px 10px; }
.spacer { flex: 1; }

/* ===== מודאל ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 26, 28, .4); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: 16px; width: min(700px, 96vw); max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.modal.wide { width: min(1020px, 97vw); }
.modal-head {
  padding: 16px var(--card-padding) 14px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.modal-body { padding: var(--card-padding); overflow-y: auto; }
.modal-foot {
  padding: 13px var(--card-padding); border-top: 1px solid var(--border-soft);
  display: flex; gap: 7px; justify-content: flex-start; align-items: center;
}

/* ===== התראות ===== */
/* ההודעות הצצות בצד ההתחלה — בעברית זה ימין, כמו כל שאר המערכת */
.toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--n-900); color: #fff;
  padding: 11px 16px; border-radius: var(--r-lg); font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-md); max-width: 360px; animation: slidein .2s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }

/* ===== לשוניות ===== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--gutter); flex-wrap: wrap; }
.tabs button {
  background: none; border: none; padding: 9px 13px; cursor: pointer; font-size: 13px;
  color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500;
  transition: color .15s, border-color .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ===== גאנט ===== */
.gantt { overflow-x: auto; padding-bottom: 8px; }
.gantt-inner { min-width: 720px; }
.gantt-row { display: grid; grid-template-columns: 196px 1fr; align-items: center; gap: 10px; padding: 2px 0; }
.gantt-label { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; height: 20px; background: var(--n-100); border-radius: var(--r-sm); }
.gantt-bar {
  position: absolute; top: 3px; height: 14px; border-radius: 4px; min-width: 6px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 600;
  cursor: pointer; overflow: hidden; white-space: nowrap; transition: filter .15s;
}
.gantt-bar:hover { filter: brightness(1.1); }
.gantt-months { display: grid; grid-template-columns: 196px 1fr; gap: 10px; margin-bottom: 6px; }
.gantt-scale { position: relative; height: 18px; border-bottom: 1px solid var(--border); }
.gantt-tick { position: absolute; font-size: 10.5px; color: var(--ink-4); transform: translateX(50%); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--danger); opacity: .5; }
.gantt-holiday { position: absolute; top: 0; bottom: 0; background: rgba(201, 69, 59, .06); }

/* ===== לוח שנה ===== */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
}
.cal-head { background: var(--surface); padding: 9px 6px; text-align: center; font-size: 11px; font-weight: 500; color: var(--ink-4); }
.cal-cell { background: var(--surface); min-height: 94px; padding: 6px; font-size: 11.5px; }
.cal-cell.other { background: var(--n-25); color: var(--ink-4); }
.cal-cell.blocked { background: #fdf7f6; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.cal-date { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.cal-num { font-weight: 600; font-size: 12.5px; }
.cal-heb { font-size: 9.5px; color: var(--ink-4); }
.cal-holiday {
  font-size: 10px; color: var(--danger); background: var(--danger-soft);
  border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; display: block;
}
.cal-ev {
  display: block; border-radius: 4px; padding: 2px 6px; margin-bottom: 2px;
  font-size: 10px; color: #fff; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-cell { min-height: 118px; }

/* ---------- הודעות בתא הלוח ---------- */
/* שונות מכוונת מהמפגשים: רקע רך וקו צד במקום גוש צבע מלא, כדי שהמפגש
   יישאר העוגן הוויזואלי של היום וההודעות ייקראו כמה שסביבו. */
.cal-msg {
  display: block; border-radius: 3px; padding: 1px 5px; margin-bottom: 1.5px;
  font-size: 9.5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-inline-start: 2px solid transparent; color: var(--ink-2);
}
.cal-msg:hover { filter: brightness(.97); text-decoration: underline; }
.cal-msg-time { font-variant-numeric: tabular-nums; color: var(--ink-4); margin-inline-end: 4px; }

.cal-msg.sent { background: var(--ok-soft); border-inline-start-color: var(--ok); }
.cal-msg.due { background: var(--warn-soft); border-inline-start-color: var(--warn); font-weight: 600; }
.cal-msg.future { background: var(--n-100); border-inline-start-color: var(--n-200); }
.cal-msg.skipped { background: transparent; border-inline-start-color: var(--n-200); opacity: .5; text-decoration: line-through; }

.cal-more {
  display: block; font-size: 9.5px; color: var(--primary); cursor: pointer;
  padding: 1px 5px; font-weight: 600;
}
.cal-more:hover { text-decoration: underline; }

.cal-legend { display: flex; align-items: center; gap: 14px; margin-bottom: 9px; min-height: 18px; }
.cal-legend-item { font-size: 11.5px; color: var(--ink-3); display: inline-flex; align-items: center; }

/* ===== רשימות ===== */
.empty { text-align: center; padding: 36px 20px; color: var(--ink-4); font-size: 13px; }
.list-item { padding: 11px var(--card-padding); border-bottom: 1px solid var(--border-soft); display: flex; gap: 11px; align-items: flex-start; transition: background .12s; }
.list-item:last-child { border-bottom: none; }
a.list-item:hover, .list-item[data-task]:hover, .list-item[style*="cursor"]:hover { background: var(--n-25); }
.list-item .grow { flex: 1; min-width: 0; }
.insight { display: flex; gap: 11px; padding: 11px var(--card-padding); border-bottom: 1px solid var(--border-soft); align-items: flex-start; transition: background .12s; }
.insight:last-child { border-bottom: none; }
.insight:hover { background: var(--n-25); }
.insight-mark { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: none; }
.insight-title { font-size: 12.5px; font-weight: 600; }
.insight-detail { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12.5px; }
.bar-name { width: 104px; flex: none; color: var(--ink-2); font-size: 12px; }
.bar-track { flex: 1; height: 6px; background: var(--n-100); border-radius: var(--r-full); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--r-full); background: var(--primary); transition: width .4s ease; }

/* תצוגת הודעה שהמשתמש כתב. plaintext קובע את כיוון כל שורה לפי התו
   החזק הראשון בה: שורה בעברית נקראת מימין לשמאל, ושורה שהיא קישור
   או מונח באנגלית נשארת משמאל לימין — בדיוק כמו שוואטסאפ מציג. */
.msg-preview {
  white-space: pre-wrap; background: var(--n-25); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); padding: 13px 15px; font-size: 12.5px; line-height: 1.7;
  unicode-bidi: plaintext; text-align: start;
}
.missing-field { background: #fdf0c4; border-radius: 3px; padding: 0 3px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--n-100); color: var(--ink-2);
  border: none; border-radius: var(--r-sm); padding: 3px 9px; font-size: 11.5px; cursor: pointer;
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--primary-soft); color: var(--t-700); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 12.5px; }
.kv dt { color: var(--ink-4); }
.section-title {
  font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--ink-4);
  margin: 18px 0 8px;
}
.warn-box {
  background: var(--warn-soft); border: none; border-inline-start: 2px solid var(--warn); color: #7d5208;
  padding: 11px 14px; border-radius: var(--r); font-size: 12.5px; margin-bottom: var(--gutter); line-height: 1.6;
}
.info-box {
  background: var(--primary-soft); border: none; border-inline-start: 2px solid var(--primary); color: var(--t-800);
  padding: 11px 14px; border-radius: var(--r); font-size: 12.5px; margin-bottom: var(--gutter); line-height: 1.6;
}

/* ===== נוכחות וצריכת תוכן ===== */
.att-grid { overflow-x: auto; }
.att-grid table { border-collapse: separate; border-spacing: 2px; font-size: 11.5px; }
.att-grid th, .att-grid td { border: none; padding: 5px 7px; text-align: center; border-radius: 4px; }
.att-grid th.name, .att-grid td.name { text-align: right; white-space: nowrap; position: sticky; inset-inline-end: 0; background: var(--surface); z-index: 1; }
.att-grid thead th { color: var(--ink-4); font-size: 10px; font-weight: 500; min-width: 40px; }
.att-cell { font-weight: 600; font-size: 11.5px; }
.att-present { background: var(--ok-soft); color: var(--ok); }
.att-absent { background: var(--danger-soft); color: var(--danger); }
.att-late { background: var(--warn-soft); color: var(--warn); }
.att-excused { background: var(--info-soft); color: var(--info); }
.att-none { color: var(--n-200); }

.att-picker { display: inline-flex; gap: 2px; }
.att-picker button {
  border: 1px solid var(--border); background: var(--surface); padding: 4px 10px; cursor: pointer;
  font-size: 11.5px; font-weight: 500; color: var(--ink-3); border-radius: var(--r-sm); transition: .15s;
}
.att-picker button:hover { background: var(--n-50); color: var(--ink); }
.att-picker button.on-present { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-picker button.on-absent { background: var(--danger); border-color: var(--danger); color: #fff; }
.att-picker button.on-late { background: var(--warn); border-color: var(--warn); color: #fff; }
.att-picker button.on-excused { background: var(--info); border-color: var(--info); color: #fff; }

/* ===== התראות ===== */
.notif {
  display: flex; gap: 11px; padding: 12px var(--card-padding); border-bottom: 1px solid var(--border-soft);
  align-items: flex-start; transition: background .12s;
}
.notif:last-child { border-bottom: none; }
.notif:hover { background: var(--n-25); }
.notif.unread { background: var(--primary-soft); }
.notif.unread:hover { background: var(--t-100); }
.notif-mark { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: none; }
.notif-title { font-size: 12.5px; font-weight: 600; }
.notif-body { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.55; }
.notif-meta { font-size: 10.5px; color: var(--ink-4); margin-top: 3px; }
.notif-actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

/* ===== מד התקדמות ===== */
.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring-text { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-pct { font-size: 25px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: -.03em; }
.ring-sub { font-size: 11px; color: var(--ink-4); margin-top: 3px; }

/* ===== ציר זמן ===== */
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 5px; top: 7px; bottom: 7px; width: 1.5px; background: var(--border); }
.tl-item { position: relative; padding: 9px 0; }
.tl-item::before {
  content: ''; position: absolute; inset-inline-start: -21px; top: 15px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--n-200);
}
.tl-item.past::before { background: var(--primary); border-color: var(--primary); }
.tl-item.today::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--t-100); }
.tl-item.next { background: var(--primary-soft); border-radius: var(--r-lg); padding: 13px 15px; margin: 6px 0; }

/* ===== דף ציבורי ===== */
.public-wrap { max-width: 640px; margin: 0 auto; padding: 40px 18px 60px; }
.public-head { text-align: center; margin-bottom: 24px; }
.public-logo { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }
.slot-card {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 13px 16px; margin-bottom: 9px;
  transition: border-color .15s, box-shadow .15s;
}
.slot-card:hover { border-color: var(--t-200); box-shadow: var(--shadow-sm); }
.slot-date {
  text-align: center; min-width: 52px; background: var(--primary-soft); color: var(--t-800);
  border-radius: var(--r); padding: 7px 5px;
}
.slot-day { font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.slot-mon { font-size: 10px; opacity: .8; margin-top: 2px; }

/* ===== רספונסיביות ===== */
@media (max-width: 1400px) { :root { --sidebar-w: 212px; } }
@media (max-width: 1024px) {
  :root { --page-margin: 16px; --card-padding: 15px; }
  .topbar h1 { font-size: 17px; }
}
@media (max-width: 860px) {
  :root { --page-margin: 12px; --gutter: 12px; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex: none; border-inline-start: none; border-bottom: 1px solid var(--border); }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .nav a { white-space: nowrap; }
  .nav-group { display: none; }
  .content { padding: 12px 12px 48px; }
  .topbar { padding: 14px 12px; flex-direction: column; align-items: stretch; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.cal-msg-tag { color: var(--ink-4); font-size: 9px; }

/* =========================================================
   יישור כיווניות — עברית מימין לשמאל בכל המערכת
   ========================================================= */

/* רשת ביטחון: גם אם תכונת ה-dir על התגית תאבד, הכיוון נשאר */
html, body { direction: rtl; }

/* טקסט שהמשתמש כתב — כיוון לפי תוכן השורה, כמו בוואטסאפ */
textarea, .plan-textarea, .plan-msg-preview, .log-body, .cal-msg,
.plan-msg-name, .gt-conf-name { unicode-bidi: plaintext; text-align: start; }

/* ערכים לטיניים שחייבים להישאר משמאל לימין גם בתוך משפט עברי:
   קישורים, מזהים וקוד. bdi מבודד אותם כך שלא יבלבלו את סדר המשפט. */
code, .mono, a[href^="http"] { unicode-bidi: isolate; }

/* מספרים, תאריכים ושעות — הספרות נקראות משמאל לימין בתוך תא שמיושר
   לימין. isolate מונע מהם למשוך אחריהם את שאר התא. */
.num, .nowrap.num, td.num, .gt-count, .plan-msg-time, .cal-msg-time { unicode-bidi: isolate; }

/* עמודות טבלה מיושרות לצד ההתחלה, שהוא ימין בעברית */
table.tbl td { text-align: start; }
.att-grid th.name, .att-grid td.name { text-align: start; }

/* ===== בדיקת מוכנות של אינטגרציה ===== */
.zoom-check { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.zoom-check-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 13px; font-size: 12.5px; border-bottom: 1px solid var(--border-soft);
}
.zoom-check-row:last-child { border-bottom: none; }
.zoom-check-row .muted { font-size: 11px; margin-top: 1px; }
.zoom-check-row code { font-size: 10.5px; background: var(--danger-soft); color: var(--danger); padding: 1px 6px; border-radius: 3px; }
.zoom-check-mark { font-weight: 700; flex: none; width: 14px; }
.zoom-check-row.ok .zoom-check-mark { color: var(--ok); }
.zoom-check-row.bad .zoom-check-mark { color: var(--danger); }
.zoom-check-row.bad { background: var(--danger-soft); }

/* ===== תבנית קבוצת וואטסאפ ===== */
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.chip.on {
  background: var(--primary); color: var(--on-primary); border-color: var(--primary);
}
.chip.on .muted { color: rgba(255, 255, 255, .75); }

.wa-icon-row { display: flex; align-items: center; gap: 8px; }
.wa-icon {
  width: 46px; height: 46px; border-radius: var(--r-full); flex: none; overflow: hidden;
  background: var(--surface-sunken); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 10px; color: var(--ink-4);
}
.wa-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wa-card [data-name-preview] { margin: 2px 0 12px; }
.wa-card [data-name-preview] b { unicode-bidi: plaintext; }
.hint.warn { color: var(--warn); }

/* ===== חיבור WhatsApp ===== */
.wa-connect { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.wa-qr {
  width: 190px; height: 190px; flex: none; border-radius: var(--r);
  border: 1px solid var(--border); background: #fff; padding: 6px;
}
.wa-steps { margin: 6px 0 4px; padding-inline-start: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }

.wa-groups { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-top: 10px; }
.wa-group-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; font-size: 12.5px; border-bottom: 1px solid var(--border-soft);
}
.wa-group-row:last-child { border-bottom: none; }
.wa-group-row .muted { font-size: 11px; margin-top: 1px; }
.wa-group-row b { unicode-bidi: plaintext; }
.wa-group-mark { flex: none; width: 14px; font-weight: 700; }
.wa-group-row.open .wa-group-mark { color: var(--ok); }
.wa-group-row.pending .wa-group-mark { color: var(--ink-4); }
.wa-group-row.pending { background: var(--surface-sunken); }

.wa-failed { font-size: 12.5px; line-height: 1.9; }
.wa-failed b { unicode-bidi: plaintext; }

/* ===== חברות יזמיות ===== */
.venture { border-bottom: 1px solid var(--border-soft); }
.venture:last-of-type { border-bottom: none; }
.venture-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px 5px; font-size: 13px;
}
.venture-head b { unicode-bidi: plaintext; }
.venture-head .hint { font-size: 11px; }
.venture-body { padding: 0 13px 10px; }
.venture-mentor { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.venture-mentor select { font-size: 12px; padding: 3px 6px; }
.venture-member {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; font-size: 12.5px; border-radius: var(--r-sm);
}
.venture-member:hover { background: var(--surface-hover); }
.venture-member input { margin: 0; }
.venture-actions {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-top: 1px solid var(--border); background: var(--surface-sunken);
}

/* ===== קבוצת הצוות ===== */
.staff-group-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.staff-group-row select { flex: 1; min-width: 200px; }

/* ===== מפת התוכנית כלשונית ===== */
.plan-embed-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 0 10px; font-size: 12px;
}

.plan-slot-edit { flex: none; opacity: 0; transition: opacity .12s; }
.plan-block-head:hover .plan-slot-edit { opacity: 1; }

/* ===== תזמון הודעה ===== */
.timing-mode { display: flex; gap: 16px; margin-bottom: 8px; }
.timing-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.timing-row[hidden] { display: none; }
.timing-row select { min-width: 150px; }
.timing-row input[type="time"] { width: 120px; }
.timing-adv { margin-top: 8px; }
.timing-adv summary {
  cursor: pointer; font-size: 11.5px; color: var(--ink-4);
  list-style: none; user-select: none;
}
.timing-adv summary::-webkit-details-marker { display: none; }
.timing-adv summary::before { content: '⌄ '; }
.timing-adv[open] summary::before { content: '⌃ '; }
.timing-adv summary:hover { color: var(--ink-2); }


/* ===== משימות העסק ===== */
.wb-board {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  align-items: start;
}
.wb-col {
  background: var(--surface-sunken); border-radius: var(--r-xl);
  padding: 10px; min-height: 90px;
}
.wb-col.orphan { background: var(--n-100); }
.wb-col-head {
  display: flex; align-items: center; gap: 7px;
  padding: 2px 4px 9px; font-size: 13px;
}
.wb-col-head b { color: var(--ink); }
.wb-col-head .muted { font-size: 11.5px; }
.wb-add {
  margin-inline-start: auto; border: 0; background: none; cursor: pointer;
  color: var(--ink-4); font-size: 17px; line-height: 1; padding: 0 4px;
}
.wb-add:hover { color: var(--primary); }
.wb-empty { color: var(--ink-4); font-size: 12px; padding: 8px 6px; }

.wb-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 10px 11px; margin-bottom: 7px;
  cursor: pointer; transition: border-color .13s, box-shadow .13s;
}
.wb-card:hover { border-color: var(--border-input); box-shadow: var(--shadow-sm); }
.wb-card.done { opacity: .55; }
.wb-card.done .wb-title { text-decoration: line-through; }
.wb-card-top { display: flex; align-items: flex-start; gap: 8px; }
.wb-card-top input { margin: 2px 0 0; flex: none; }
.wb-title { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink); unicode-bidi: plaintext; }
.wb-card-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 7px; padding-inline-start: 21px; font-size: 11.5px;
}
.wb-who { color: var(--ink-2); font-weight: 500; }
.wb-who.none, .wb-due.none { color: var(--ink-4); font-weight: 400; }
.wb-due { color: var(--ink-3); }
.wb-due.overdue { color: var(--danger); font-weight: 600; }
.wb-due.today { color: var(--warn); font-weight: 600; }
.wb-due.soon { color: var(--ink-2); }
.wb-meta { color: var(--ink-4); }

.wb-file {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; margin-bottom: 5px; font-size: 12.5px;
  background: var(--surface-sunken); border-radius: var(--r);
}
.wb-file a { color: var(--primary); unicode-bidi: plaintext; }
.wb-file a:hover { text-decoration: underline; }

/* ===== לוח המשימות — פעולות מהירות ===== */
.wb-quick {
  width: 100%; box-sizing: border-box; margin-top: 4px;
  background: transparent; border: 1px dashed var(--border-input);
  border-radius: var(--r-lg); padding: 8px 10px;
  font-size: 12.5px; color: var(--ink);
}
.wb-quick::placeholder { color: var(--ink-4); }
.wb-quick:focus {
  outline: none; border-style: solid; border-color: var(--primary);
  background: var(--surface); box-shadow: var(--glow);
}
.wb-col-new { background: transparent; border: 1px dashed var(--border); }

.wb-state {
  flex: none; width: 19px; height: 19px; padding: 0; margin-top: 1px;
  border: 0; background: none; cursor: pointer;
  font-size: 14px; line-height: 1; color: var(--ink-4);
}
.wb-state:hover { color: var(--primary); }
.wb-card.s-in_progress { border-inline-start: 3px solid var(--warn); }
.wb-card.s-in_progress .wb-state { color: var(--warn); }
.wb-card.s-done { opacity: .5; }
.wb-card.s-done .wb-title { text-decoration: line-through; }
.wb-card.s-done .wb-state { color: var(--ok); }

.wb-who, .wb-due-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 11.5px;
}
.wb-who { color: var(--ink-2); font-weight: 500; }
.wb-who:hover, .wb-due-btn:hover { text-decoration: underline; }

.wb-pop {
  position: fixed; z-index: 60; min-width: 150px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
}
.wb-pop button {
  display: block; width: 100%; text-align: start;
  border: 0; background: none; cursor: pointer;
  padding: 7px 10px; border-radius: var(--r); font-size: 12.5px; color: var(--ink);
}
.wb-pop button:hover { background: var(--surface-sunken); }
.wb-pop button.on { color: var(--primary); font-weight: 600; }

/* אזור מסוכן בתחתית חלון עריכה — מופרד בקו כדי שלא ייראה
   כהמשך הטופס, ובלי צבע רקע כדי שלא ימשוך את העין לשם. */
.amb-danger {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.amb-danger-note { flex: 1; min-width: 220px; font-size: 12.5px; color: var(--ink-4); line-height: 1.55; }
.amb-danger-acts { display: flex; gap: 6px; }

/* הודעת גרסה — יושבת מעל הכול, כי כל מה שמתחתיה עלול להיות שגוי */
.build-notice {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font-size: 13px;
}
.build-notice .btn { padding: 4px 10px; }
.build-notice .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }

/* ---------- שידור לשגרירים ---------- */
/* בועה בסגנון וואטסאפ: מי שכותב הודעה צריך לראות אותה כמו שהיא
   תתקבל, לא כטקסט בתיבה. */
.bc-bubble {
  max-width: 460px;
  margin-bottom: 10px;
  padding: 10px 13px;
  border-radius: 12px 12px 12px 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
}
.bc-bubble-to { font-size: 11.5px; color: var(--ink-4); margin-bottom: 6px; }
.bc-bubble-text { font-size: 14px; line-height: 1.65; white-space: normal; }
.bc-test { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-test .input { max-width: 180px; }

/* ---------- אשף החלפת מספר וואטסאפ ---------- */
.rec-steps {
  display: flex; gap: 6px; flex-wrap: wrap;
  list-style: none; margin: 0 0 18px; padding: 0;
}
.rec-steps li {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-4);
  padding: 5px 10px 5px 6px; border-radius: 999px;
  background: var(--surface-sunken); border: 1px solid transparent;
}
.rec-steps li.on { color: var(--ink); border-color: var(--primary); background: var(--primary-soft); }
.rec-steps li.done { color: var(--ok); }
.rec-n {
  width: 19px; height: 19px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
}
.rec-steps li.on .rec-n { background: var(--primary); color: #fff; border-color: var(--primary); }
.rec-steps li.done .rec-n { background: var(--ok); color: #fff; border-color: var(--ok); }

/* נקודת מצב בצ׳קליסט — צורה נושאת מידע, לא רק צבע */
.rec-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-inline-end: 8px; }
.rec-dot.ok { background: var(--ok); }
.rec-dot.wait { background: var(--warn); }
.rec-dot.out { background: var(--danger); }

.ok-box {
  background: var(--ok-soft); border: 1px solid var(--ok-soft);
  border-inline-start: 3px solid var(--ok);
  color: var(--ink-2); border-radius: var(--r); padding: 10px 12px; font-size: 13.5px;
}
