/* ==========================================================================
   ממשק ניהול קווי ימות המשיח — עיצוב
   עברית, RTL, מצב בהיר וכהה לפי העדפת המערכת.
   ========================================================================== */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --ink: #16202c;
  --ink-2: #5b6b7d;
  --ink-3: #667585;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --code-bg: #f7f9fc;
  --switch-off: #aab7c7;
  --switch-knob: #ffffff;
  --switch-border: #78879a;
  --brand: #1a63d8;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0fe;
  --ok: #16a34a;
  --ok-soft: #e7f7ed;
  --warn: #c2740a;
  --warn-soft: #fdf4e3;
  --danger: #c92a20;
  --danger-soft: #fdeceb;
  --shadow: 0 1px 2px rgba(16,32,48,.06), 0 8px 24px rgba(16,32,48,.07);
  --shadow-sm: 0 1px 2px rgba(16,32,48,.08);
  --r: 12px;
  --r-sm: 8px;
  --side-w: 216px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151c;
    --panel: #161e27;
    --panel-2: #1b2530;
    --ink: #e8eef5;
    --ink-2: #a5b4c4;
    --ink-3: #7d8b9b;
    --line: #263241;
    --line-2: #1f2a36;
    --code-bg: #0c1219;
    --switch-off: #3c4b5d;
    --switch-knob: #dfe7f0;
    --switch-border: #7b8ea6;
    --brand: #4d90f0;
    --brand-ink: #06121f;
    --brand-soft: #16283f;
    --ok: #35c26a;
    --ok-soft: #12291b;
    --warn: #e0a03c;
    --warn-soft: #2b2213;
    --danger: #f2695f;
    --danger-soft: #2e1715;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }

/* אומר לדפדפן באיזו ערכה אנחנו — בלי זה פקדי טופס שלא צבענו ידנית
   (textarea, select, פסי גלילה) מקבלים ברירת מחדל בהירה, ובמצב כהה
   יוצא טקסט בהיר על רקע לבן. */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans Hebrew", Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; }
a { color: var(--brand); }

/* ⚠️ צביעה גלובלית של כל פקד קלט, ולא רק של אלה שבתוך ‎.fld‎.
   תיבות עריכת ה-ini יושבות ישירות בתוך ‎.grp-body‎, ולכן בלי הכלל הזה
   הן נשארו עם רקע לבן של הדפדפן וטקסט בצבע הגוף — כלומר לבן על לבן
   במצב כהה, ובלתי קריא לגמרי. */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  max-width: 100%;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  border-color: var(--brand);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }

/* עורכי הקבצים עצמם — גופן רוחב־קבוע ורקע שמבדיל אותם משדה טופס רגיל */
textarea.code, #rawIni, #ivrIni {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.7;
  background: var(--code-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 2;
}

/* ---------------------------------------------------------------- כפתורים */
.btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: var(--r-sm); padding: 8px 14px; cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.big { width: 100%; padding: 12px; font-size: 16px; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  border: 0; background: transparent; color: var(--ink-2);
  width: 36px; height: 36px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }

/* ------------------------------------------------------------- התחברות */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 420px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px;
  box-shadow: var(--shadow);
}
.login-logo {
  width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 14px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 26px;
}
.login-card h1 { margin: 0 0 6px; font-size: 21px; text-align: center; }
.login-card .sub { margin: 0 0 20px; font-size: 13px; color: var(--ink-2); text-align: center; }

.tabs { display: flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tab {
  flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 7px;
  cursor: pointer; color: var(--ink-2); font-size: 14px;
}
.tab.active { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--panel-2);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand);
}
.field small { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); }

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.hint { display: block; font-size: 12px; color: var(--ink-3); margin: 0 0 16px 25px; }

.err {
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger);
  border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; margin-top: 14px;
}

.saved { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.saved-title { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.saved-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: right;
  border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r-sm);
  padding: 9px 12px; margin-bottom: 6px; cursor: pointer;
}
.saved-item:hover { border-color: var(--brand); }
.saved-item .x { margin-inline-start: auto; color: var(--ink-3); font-size: 16px; padding: 0 4px; }
.saved-item .x:hover { color: var(--danger); }

/* ------------------------------------------------------------- שלד */
#app { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; background: var(--panel); border-bottom: 1px solid var(--line);
  flex: 0 0 auto; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-ico {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; font-size: 17px; flex: 0 0 auto;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-txt strong { font-size: 15px; direction: ltr; text-align: right; }
.brand-txt small { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; }

.live {
  display: flex; align-items: center; gap: 7px; background: var(--ok-soft);
  border: 1px solid transparent; border-radius: 999px; padding: 5px 13px; font-size: 13px;
}
.live.hot { background: var(--brand-soft); }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70% { box-shadow: 0 0 0 9px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.live-n { font-weight: 700; font-size: 15px; }
.live-lbl { color: var(--ink-2); }
.units { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

.shell { display: flex; flex: 1; min-height: 0; }

.side {
  width: var(--side-w); flex: 0 0 auto; background: var(--panel);
  border-inline-end: 1px solid var(--line); padding: 12px 10px; overflow-y: auto;
}
.nav {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: right;
  border: 0; background: transparent; border-radius: var(--r-sm);
  padding: 10px 12px; cursor: pointer; color: var(--ink-2); margin-bottom: 2px;
}
.nav i { font-style: normal; width: 20px; text-align: center; font-size: 16px; }
.nav:hover { background: var(--line-2); color: var(--ink); }
.nav.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.main { flex: 1; min-width: 0; overflow-y: auto; padding: 22px; }

/* ------------------------------------------------------------- כרטיסים */
.page-h { margin: 0 0 4px; font-size: 22px; }
.page-sub { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.card > h3 {
  margin: 0; padding: 14px 18px; font-size: 15px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 8px;
}
.card > h3 .sp { margin-inline-start: auto; font-weight: 400; font-size: 13px; color: var(--ink-3); }
.card .body { padding: 18px; }
.card .body.tight { padding: 8px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.15; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--ink-2); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; direction: ltr; text-align: right; }
.kv dd.rtl { direction: rtl; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line-2); }
table.tbl th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: var(--panel-2); }
.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }

.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; opacity: .55; }

.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: var(--line-2); color: var(--ink-2);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

/* ------------------------------------------------------------- שלוחות */
.ext-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ext-layout { grid-template-columns: 1fr; } }

.tree { padding: 6px; max-height: calc(100vh - 210px); overflow: auto; }
.tnode { border-radius: var(--r-sm); }
.trow {
  display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 14px;
}
.trow:hover { background: var(--line-2); }
.trow.sel { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.trow .tw { width: 16px; text-align: center; color: var(--ink-3); font-size: 11px; flex: 0 0 auto; }
.trow .tnum {
  min-width: 24px; text-align: center; font-weight: 600; direction: ltr;
  background: var(--line-2); border-radius: 5px; padding: 1px 5px; font-size: 12px; flex: 0 0 auto;
}
.trow.sel .tnum { background: var(--brand); color: var(--brand-ink); }
.trow .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.trow .tty { font-size: 11px; color: var(--ink-3); flex: 0 0 auto; }
.tkids { margin-inline-start: 15px; border-inline-start: 1px solid var(--line); padding-inline-start: 4px; }

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px,1fr)); gap: 10px; }
.type-card {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; cursor: pointer;
  background: var(--panel-2); text-align: right;
}
.type-card:hover { border-color: var(--brand); }
.type-card.sel { border-color: var(--brand); background: var(--brand-soft); }
.type-card .ico { font-size: 19px; }
.type-card .nm { font-weight: 600; font-size: 14px; margin-top: 4px; }
.type-card .ds { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* לוח המקשים של תפריט — מציג את מבנה השלוחות כמו שהמאזין חווה אותו */
.keypad {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
@media (max-width: 700px) { .keypad { grid-template-columns: repeat(3, 1fr); } }
.kp {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; text-align: right; cursor: pointer; min-height: 74px;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px;
  transition: border-color .12s, background .12s;
}
.kp:hover { border-color: var(--brand); background: var(--brand-soft); }
.kp .kd { font-size: 19px; font-weight: 700; line-height: 1.1; direction: ltr; }
.kp .kt {
  font-size: 11.5px; color: var(--ink-2); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kp .ki { position: absolute; inset-block-start: 8px; inset-inline-start: 9px; font-size: 13px; opacity: .65; }
.kp.empty { border-style: dashed; background: transparent; }
.kp.empty .kd { color: var(--ink-3); font-weight: 500; }
.kp.empty .kt { color: var(--ink-3); }
.kp.empty:hover { border-style: solid; }
.kp-nav {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 11px;
  font-size: 12.5px; color: var(--ink-2);
}

/* קבוצות שדות מתקפלות — כך יש הרבה אפשרויות בלי בלגן על המסך */
.grp { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; overflow: hidden; }
.grp > summary {
  padding: 11px 14px; cursor: pointer; background: var(--panel-2); font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px; list-style: none;
}
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
.grp[open] > summary::before { transform: rotate(-90deg); }
.grp > summary .cnt { margin-inline-start: auto; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.grp .grp-body { padding: 14px; border-top: 1px solid var(--line-2); }

.fld { margin-bottom: 15px; }
.fld:last-child { margin-bottom: 0; }
.fld > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.fld .desc { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.fld input[type=text], .fld input[type=number], .fld select, .fld textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--panel-2);
}
.fld textarea { min-height: 78px; resize: vertical; }
.fld .row { display: flex; gap: 8px; align-items: center; }
.fld .row > * { flex: 1; }
.fld .row > .btn { flex: 0 0 auto; }
.fld .raw { font-size: 11px; color: var(--ink-3); direction: ltr; text-align: right; margin-top: 4px; }
.fld.changed > label::after {
  content: "שונה"; margin-inline-start: 7px; font-size: 10px; font-weight: 600;
  background: var(--warn-soft); color: var(--warn); padding: 1px 6px; border-radius: 999px;
}

/* מתג הפעלה/כיבוי.
   ⚠️ המסילה חייבת להיות בצבע נפרד מרקע הכרטיס. כשהיא הייתה ב-var(--line)
   היא נבלעה ברקע במצב כהה, ומה שנראה על המסך היה עיגול לבן מרחף בלי הקשר. */
.switch {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  user-select: none; padding: 6px 9px; border-radius: var(--r-sm);
  border: 1px solid transparent;
}
.switch:hover { background: var(--line-2); border-color: var(--line); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .sw {
  width: 44px; height: 24px; border-radius: 999px;
  background: var(--switch-off); border: 1px solid var(--switch-border);
  position: relative; transition: background .15s, border-color .15s; flex: 0 0 auto;
}
.switch .sw::after {
  content: ""; position: absolute; inset-inline-start: 3px; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--switch-knob); transition: transform .15s;
  border: 1px solid rgba(0,0,0,.2);
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.switch input:checked + .sw { background: var(--brand); border-color: var(--brand); }
.switch input:checked + .sw::after { transform: translateX(-18px); background: #fff; }
.switch input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch .sw-lbl { font-size: 13.5px; color: var(--ink-2); }
.switch input:checked ~ .sw-lbl { color: var(--brand); font-weight: 600; }

.savebar {
  position: sticky; bottom: 0; margin: 0 -18px -18px; padding: 12px 18px;
  background: var(--panel); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  border-radius: 0 0 var(--r) var(--r);
}
.savebar .info { font-size: 13px; color: var(--ink-2); flex: 1; }

/* ------------------------------------------------------------- קבצים */
.fbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.crumbs { display: flex; align-items: center; gap: 3px; font-size: 13px; flex-wrap: wrap; direction: ltr; }
.crumbs button { border: 0; background: transparent; color: var(--brand); cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.crumbs button:hover { background: var(--brand-soft); }
.crumbs span { color: var(--ink-3); }

.frow { display: flex; align-items: center; gap: 11px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); }
.frow:hover { background: var(--panel-2); }
.frow .fico { font-size: 17px; width: 22px; text-align: center; }
.frow .fnm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fmeta { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.frow .acts { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.frow:hover .acts, .frow.touch .acts { opacity: 1; }

.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; color: var(--ink-3); margin: 14px 18px; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* ------------------------------------------------------------- הודעות */
.toasts { position: fixed; inset-block-end: 18px; inset-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast {
  background: var(--panel); border: 1px solid var(--line); border-inline-start: 4px solid var(--brand);
  border-radius: var(--r-sm); padding: 11px 15px; box-shadow: var(--shadow); font-size: 14px;
  max-width: 380px; animation: slidein .18s ease-out;
}
.toast.ok { border-inline-start-color: var(--ok); }
.toast.err { border-inline-start-color: var(--danger); }
.toast .t { font-weight: 600; }
.toast .d { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

.busy { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100; }
.busy-bar { height: 3px; background: var(--brand); animation: load 1.1s ease-in-out infinite; transform-origin: 100% 50%; }
@keyframes load { 0% { transform: scaleX(0); } 50% { transform: scaleX(.75); } 100% { transform: scaleX(1); opacity: .25; } }
.busy-txt {
  position: fixed; inset-block-start: 12px; inset-inline-end: 50%; transform: translateX(50%);
  background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 5px 13px; border-radius: 999px;
}

/* ------------------------------------------------------------- דיאלוג */
.modal-bg { position: fixed; inset: 0; background: rgba(10,18,28,.5); display: grid; place-items: center; z-index: 80; padding: 18px; }
.modal {
  background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow);
  width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column;
}
.modal h3 { margin: 0; padding: 15px 20px; border-bottom: 1px solid var(--line-2); font-size: 16px; }
.modal .mbody { padding: 20px; overflow: auto; }
.modal .mfoot { padding: 13px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 9px; justify-content: flex-start; }

/* ------------------------------------------------------------- נייד */
.menu-toggle { display: none; }
@media (max-width: 800px) {
  .menu-toggle { display: grid; }
  .side {
    position: fixed; inset-block: 49px 0; inset-inline-start: 0; z-index: 40;
    transform: translateX(100%); transition: transform .18s; box-shadow: var(--shadow);
  }
  .side.open { transform: none; }
  .main { padding: 16px 13px; }
  .live-lbl { display: none; }
  .units { display: none; }
}
