/* ===== Electra VRF Portal ===== */
:root {
  --navy: #0a2a4d;
  --navy-2: #103a66;
  --blue: #0068b3;
  --blue-light: #e8f2fa;
  --accent: #e8542f;
  --bg: #f3f6fa;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #1c2b3a;
  --muted: #64748b;
  --ok: #15803d;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(10, 42, 77, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* ===== Login ===== */
#loginScreen { flex-direction: row; }
.login-side {
  width: 42%;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--blue) 130%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px;
  gap: 12px;
}
.login-side h2 { font-size: 30px; font-weight: 700; }
.login-side p { color: #b9cde3; }
.alaska-badge {
  background: #fff; border-radius: 20px; padding: 20px 28px 14px;
  display: inline-block; align-self: flex-start; margin-bottom: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.alaska-logo { width: 175px; max-width: 100%; display: block; }
.login-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.electra-word { height: 26px; width: auto; }
.electra-word.invert { filter: brightness(0) invert(1); }
.electra-word.tiny { height: 14px; margin-top: 3px; }
.vrf-tag {
  border: 1.5px solid rgba(255,255,255,.4); border-radius: 7px;
  padding: 2px 10px; font-weight: 800; font-size: 14px; color: #7fc0ee;
}
.side-alaska { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.side-name { font-weight: 800; font-size: 15px; }
.side-brand-logo {
  height: 20px; width: auto; max-width: 130px; object-fit: contain;
  background: #fff; border-radius: 6px; padding: 2px 7px; margin-top: 4px; display: block;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.logo-mark {
  width: 54px; height: 54px; border-radius: 14px;
  background: #fff; color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800;
}
.logo-mark.small { width: 38px; height: 38px; font-size: 21px; border-radius: 10px; background: var(--blue); color: #fff; }
.logo-text { font-size: 26px; font-weight: 800; letter-spacing: 1px; }
.logo-text span { color: #7fc0ee; font-weight: 400; }
.logo-text.small { font-size: 17px; color: #fff; }

.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card {
  width: 400px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 38px;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-card h1 { font-size: 24px; }
.muted { color: var(--muted); font-size: 14px; }

.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type="email"], input[type="text"], input[type="tel"], input[type="search"], input[type="number"], select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.checkbox-row { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.priority-link { display: block; text-align: center; text-decoration: none; }
.login-error {
  background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca;
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px; font-weight: 600;
}
.logout-btn {
  background: none; border: 1px solid rgba(255,255,255,.25); color: #9db8d4;
  border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; flex-shrink: 0;
}
.logout-btn:hover { color: #fff; border-color: #fff; }

/* ===== Buttons ===== */
.primary-btn {
  background: var(--blue); color: #fff; border: none; border-radius: 10px;
  padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.primary-btn:hover { background: #005694; }
.primary-btn:disabled { background: #b6c6d5; cursor: not-allowed; }
.primary-btn.wide { width: 100%; }
.ghost-btn {
  background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
.ghost-btn:hover { border-color: var(--blue); color: var(--blue); }
.link-btn { background: none; border: none; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.icon-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.danger-link { background: none; border: none; color: #b91c1c; font: inherit; cursor: pointer; font-size: 13px; }

/* ===== Shell ===== */
#appShell.active { display: flex; }
.sidebar {
  width: 250px; min-height: 100vh; background: var(--navy); color: #fff;
  padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.profile-box {
  display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,.07); padding: 12px; border-radius: 12px;
}
.profile-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.profile-name { font-weight: 700; }
.profile-email { font-size: 12px; color: #9db8d4; word-break: break-all; }

.brand-pill {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px; padding: 10px 14px; cursor: pointer;
  color: #fff; font: inherit; text-align: right; width: 100%;
}
.brand-pill:hover { background: rgba(255,255,255,.14); }
.brand-pill .pill-label { font-size: 11px; color: #9db8d4; }
.brand-pill strong { font-size: 15px; }
.brand-pill .pill-switch { font-size: 11px; color: #7fc0ee; font-weight: 600; }

.brands-hero h2 { font-size: 26px; color: var(--navy); }
.brands-hero p { color: var(--muted); margin-top: 4px; }
.brand-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
}
.brand-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; cursor: pointer; font: inherit; text-align: right;
  box-shadow: var(--shadow); transition: border-color .15s, transform .12s;
}
.brand-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.brand-card.active { border-color: var(--blue); background: var(--blue-light); }
.brand-card .bc-logo { height: 30px; width: auto; max-width: 100%; object-fit: contain; object-position: right; align-self: flex-start; margin-bottom: 4px; }
.brand-card .bc-name { font-size: 22px; font-weight: 800; color: var(--navy); }
.brand-card .bc-sub { font-size: 13px; color: var(--blue); font-weight: 600; }
.brand-card .bc-stats { font-size: 12.5px; color: var(--muted); }
.brand-card.priority-card {
  text-decoration: none;
  background: linear-gradient(140deg, #14532d 0%, #166534 70%, #22c55e 160%);
  border-color: #14532d;
}
.brand-card.priority-card .bc-icon { font-size: 26px; color: #bbf7d0; }
.brand-card.priority-card .bc-name { color: #fff; }
.brand-card.priority-card .bc-sub { color: #86efac; }
.brand-card.priority-card .bc-stats { color: #bbf7d0; }
.brand-card.ac-card { background: linear-gradient(140deg, var(--navy) 0%, var(--navy-2) 70%, var(--blue) 140%); border-color: var(--navy); }
.brand-card.ac-card .bc-icon { font-size: 26px; }
.brand-card.ac-card .bc-name { color: #fff; }
.brand-card.ac-card .bc-sub { color: #7fc0ee; }
.brand-card.ac-card .bc-stats { color: #9db8d4; }

.nav-tabs { display: flex; flex-direction: column; gap: 4px; }
.tab-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: #c3d4e6; text-align: right;
  padding: 11px 14px; border-radius: 10px; font: inherit; font-size: 15px; cursor: pointer;
}
.tab-btn .ico { width: 20px; text-align: center; }
.tab-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.tab-btn.active { background: var(--blue); color: #fff; font-weight: 600; }
.side-footer { margin-top: auto; font-size: 12px; color: #7e99b8; padding: 0 6px; line-height: 1.6; }

.main-area { flex: 1; padding: 28px 34px; max-width: 1200px; }
.view { display: none; flex-direction: column; gap: 20px; }
.view.active { display: flex; }

/* ===== Home ===== */
.hero-card {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-2) 60%, var(--blue) 140%);
  color: #fff; border-radius: var(--radius); padding: 34px;
  display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow);
}
.hero-title { font-size: 27px; font-weight: 800; }
.hero-sub { color: #b9cde3; margin-top: 6px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; }
.hero-actions .ghost-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.hero-badge {
  border: 2px solid rgba(255,255,255,.3); border-radius: 14px; padding: 16px 22px;
  font-weight: 800; font-size: 22px; text-align: center; color: #7fc0ee; line-height: 1.3;
}

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-value { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

.panel { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.panel h3 { font-size: 17px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.panel-head input[type="search"] { max-width: 300px; }

.recent-list, .history-list { display: flex; flex-direction: column; gap: 8px; }
.quote-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px;
  cursor: pointer; transition: border-color .15s, background .15s;
  background: #fff; text-align: right; font: inherit; width: 100%;
}
.quote-row:hover { border-color: var(--blue); background: var(--blue-light); }
.quote-row .q-main { display: flex; flex-direction: column; gap: 2px; }
.quote-row .q-title { font-weight: 700; }
.quote-row .q-sub { font-size: 13px; color: var(--muted); }
.quote-row .q-side { display: flex; align-items: center; gap: 14px; }
.quote-row .q-total { font-weight: 700; color: var(--navy); white-space: nowrap; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.badge.draft { background: #f1f5f9; color: #475569; }
.badge.sent { background: #fff7ed; color: #c2410c; }
.badge.approved { background: #f0fdf4; color: var(--ok); }
.empty-note { color: var(--muted); text-align: center; padding: 22px; }

/* ===== Quote builder ===== */
.quote-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow);
}
.quote-id { font-size: 20px; font-weight: 800; color: var(--navy); }
/* לוגו המותג במסך מחירון המזגנים — ברור ובגודל מכובד */
.ac-brand-logo {
  height: 52px; width: auto; max-width: 260px;
  object-fit: contain; display: block;
}
.ac-brand-name { font-size: 26px; font-weight: 800; color: var(--navy); }
.quote-meta { font-size: 13px; color: var(--muted); }
.quote-actions { display: flex; gap: 10px; }

.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* שדה טלפון עם כפתור וואטסאפ צמוד */
.phone-field { display: flex; gap: 6px; align-items: stretch; }
.phone-field input { flex: 1; min-width: 0; }
.wa-btn {
  flex: 0 0 auto; width: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: #25d366; color: #fff; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.wa-btn svg { width: 21px; height: 21px; fill: currentColor; }
.wa-btn:hover:not(:disabled) { background: #1eb855; }
.wa-btn:disabled { background: #e6e9ee; color: #9aa3af; cursor: not-allowed; }

.type-chips { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 7px 16px; border-radius: 99px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.group-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
}
.g-tile {
  display: flex; flex-direction: column; gap: 2px; justify-content: flex-start;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; padding: 8px 12px;
  font: inherit; text-align: right; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.g-tile:hover { border-color: var(--blue); background: var(--blue-light); }
.g-tile .g-type { font-size: 11px; font-weight: 700; color: var(--blue); }
.g-tile .g-name { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.g-tile .g-count { font-size: 12px; color: var(--muted); }
.g-tile.active { background: var(--navy); border-color: var(--navy); }
.g-tile.active .g-type { color: #7fc0ee; }
.g-tile.active .g-name { color: #fff; }
.g-tile.active .g-count { color: #9db8d4; }

.picker-results { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.picker-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  background: #fff; font: inherit; text-align: right; cursor: pointer; width: 100%;
}
.picker-item:hover { border-color: var(--blue); background: var(--blue-light); }
.picker-item .p-model { font-weight: 700; color: var(--navy); }
.picker-item .p-desc { font-size: 13px; color: var(--muted); }
.picker-item .p-price { font-weight: 700; white-space: nowrap; }
.picker-item .p-add { color: var(--blue); font-weight: 800; font-size: 18px; }

.table-wrap { overflow-x: auto; }
.lines-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines-table th {
  text-align: right; background: var(--blue-light); color: var(--navy);
  padding: 10px 10px; font-weight: 700; white-space: nowrap;
}
.lines-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines-table tbody tr:hover { background: #f8fafc; }
.lines-table tbody tr.no-stock td { background: #fee2e2; color: #b91c1c; }
.lines-table tbody tr.no-stock:hover td { background: #fecaca; }

/* מחירון מזגנים — שורות מתרחבות */
.ac-table .ac-row { cursor: pointer; }
.ac-warranty { font-size: 12px; color: #15803d; font-weight: 600; margin-top: 2px; }
.no-stock .ac-warranty { color: var(--muted); }
.ac-toggle {
  background: none; border: none; cursor: pointer; font-size: 12px;
  color: var(--blue); transition: transform .15s; pointer-events: none;
}
.ac-toggle.open { transform: rotate(180deg); }
.ac-detail-row { display: none; }
.ac-detail-row.open { display: table-row; }
.ac-detail-row td { background: var(--blue-light); }
.spec-grid { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 6px 4px; }
.spec-grid .spec { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.spec-grid .spec span { color: var(--muted); font-size: 11.5px; }
.spec-grid .spec strong { color: var(--navy); }

/* טבלת מפרט טכני בתוך המשולש */
.spec-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  background: #fff; border: 1px solid #dbe6f0; border-radius: 8px; overflow: hidden;
}
.spec-table tr:nth-child(even) { background: #f7fafd; }
.spec-table th {
  text-align: right; font-weight: 600; color: var(--muted);
  padding: 6px 12px; width: 45%; border-bottom: 1px solid #e8eef5; white-space: nowrap;
}
.spec-table td {
  padding: 6px 12px; color: var(--navy); font-weight: 700; border-bottom: 1px solid #e8eef5;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.spec-table .stock-inline { padding: 3px 8px; font-size: 12px; }
.spec-table .out-tag { color: #b91c1c; font-weight: 800; }
.spec-tables { display: flex; gap: 14px; align-items: flex-start; width: 100%; }
.spec-tables > .spec-table { flex: 1 1 300px; min-width: 260px; }
@media (max-width: 820px) { .spec-tables { flex-direction: column; } }

/* עריכת מחירון מזגנים */
#acAdminBar { display: flex; }
.ac-field { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.e-model { width: 240px; }
.e-price { width: 90px; text-align: center; }
.price-stock { display: flex; gap: 6px; align-items: center; }
.spec-grid .spec .ac-field { width: 150px; }
.modal-card.wide { width: 680px; }
#pasteArea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  font-family: monospace; font-size: 12.5px; direction: ltr; text-align: left; resize: vertical;
}
.paste-preview { max-height: 200px; overflow-y: auto; font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 3px; margin: 10px 0; }
.paste-sum { background: var(--blue-light); color: var(--navy); border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; }
.stock-map { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin: 12px 0; }
.stock-map label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stock-map select { min-width: 240px; }
#stockFile { width: 100%; padding: 10px; border: 1px dashed var(--blue); border-radius: 10px; background: #f8fbff; }

/* רכיבי דגם (מאייד/מעבה) בתוך המשולש */
.comp-badge {
  font-size: 11px; font-weight: 700; color: var(--blue);
  background: #fff; border: 1px solid #c7dcee; border-radius: 99px; padding: 1px 8px; white-space: nowrap;
}
.comp-list { width: 100%; margin-top: 8px; border-top: 1px dashed #c7dcee; padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.comp-title { font-size: 12px; font-weight: 700; color: var(--muted); }
.comp-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13px;
}
.comp-row .comp-sku { color: var(--muted); font-size: 12px; }
.comp-row strong { margin-inline-start: auto; color: var(--navy); }
.comp-row.comp-out { background: #fee2e2; border-color: #fecaca; }
.comp-out-tag { color: #b91c1c; font-weight: 700; font-size: 12px; }
/* בקרת כמות במחירון: + / ✓ כמות / − */
.add-cell { text-align: center; }
.qty-group { display: inline-flex; align-items: center; gap: 4px; }
.add-btn, .sub-btn {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--blue); background: #fff; color: var(--blue);
  font-size: 16px; font-weight: 800; line-height: 1; padding: 0; flex-shrink: 0;
}
.add-btn:hover { background: var(--blue); color: #fff; }
.sub-btn { border-color: #cbd5e1; color: var(--muted); }
.sub-btn:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.qty-badge {
  background: var(--ok); color: #fff; border-radius: 8px;
  font-size: 12.5px; font-weight: 800; padding: 4px 9px; white-space: nowrap;
}
.comp-row .qty-group { margin-inline-start: 6px; }
.supplier-link { width: 100%; margin-top: 8px; }
.supplier-link a {
  display: inline-block; background: #fff; border: 1px solid var(--blue); color: var(--blue);
  border-radius: 8px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.supplier-link a:hover { background: var(--blue); color: #fff; }
.danger-ghost { color: #b91c1c; }
.danger-ghost:hover { border-color: #b91c1c; color: #b91c1c; }

/* סרגל ההצעה הפעילה */
.quote-bar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 90;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--navy); color: #fff; padding: 12px 26px;
  box-shadow: 0 -6px 20px rgba(10,42,77,.25);
}
.quote-bar .qb-info { display: flex; flex-direction: column; gap: 2px; }
.quote-bar .qb-info span { font-size: 13px; color: #9db8d4; }
.quote-bar .qb-actions { display: flex; gap: 10px; }
.quote-bar .ghost-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }

.picker-item.no-stock-item { background: #fee2e2; border-color: #fecaca; }
.picker-item.no-stock-item:hover { background: #fecaca; }
.lines-table input.cell-input { width: 90px; padding: 6px 8px; border-radius: 8px; text-align: center; }
.lines-table .num { white-space: nowrap; font-weight: 600; }
.model-link { color: var(--blue); font-weight: 700; cursor: pointer; background: none; border: none; font: inherit; }

/* ===== מעגלים ===== */
.circuits-list { display: flex; flex-direction: column; gap: 14px; }
.circuit-card {
  border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.circuit-card:hover { border-color: #b9cfe2; }
.circuit-card.active { border-color: var(--blue); background: #fbfdff; cursor: default; }
.circuit-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.circuit-title { display: flex; align-items: flex-end; gap: 12px; }
.circuit-radio { color: var(--blue); font-size: 18px; padding-bottom: 8px; }
.circuit-title label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.circuit-title .c-name { width: 220px; padding: 7px 10px; }
.circuit-title .c-apt { width: 90px; padding: 7px 10px; text-align: center; }
.circuit-actions { display: flex; gap: 14px; align-items: center; }
.circuit-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot-boxes { display: flex; gap: 10px; flex-wrap: wrap; }
.diversity-box.small { padding: 8px 14px; flex-direction: row; align-items: center; gap: 10px; }
.diversity-box.btu-box { background: var(--blue-light); border-color: #c7dcee; }
.diversity-box.btu-box strong { color: var(--blue); }
.diversity-box.small strong { font-size: 17px; }
.circuit-sum { font-size: 15px; color: var(--navy); }
.active-circuit-tag { font-size: 13px; color: var(--blue); font-weight: 600; margin-inline-start: 8px; }

.totals-box { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.diversity-box {
  display: flex; flex-direction: column; gap: 4px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; font-size: 13px; color: var(--muted);
}
.diversity-box strong { font-size: 22px; color: var(--navy); }
.diversity-box.warn { background: #fef2f2; border-color: #fecaca; }
.diversity-box.warn strong { color: #b91c1c; }
.div-alert { color: #b91c1c; font-weight: 700; }
.totals-inner {
  margin-inline-start: auto; min-width: 300px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--blue-light); border-radius: 12px; padding: 16px 20px;
}
.totals-inner .t-row { display: flex; justify-content: space-between; gap: 30px; }
.totals-inner .t-row.grand { font-size: 18px; font-weight: 800; color: var(--navy); border-top: 1px solid #c7dcee; padding-top: 8px; margin-top: 4px; }
.totals-inner .vat-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ===== Catalog view ===== */
#view-catalog .lines-table td { font-size: 13.5px; }
.cat-link { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ===== Modal ===== */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(10,42,77,.5);
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #fff; border-radius: var(--radius); width: 520px; max-width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tech-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tech-body td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tech-body td:first-child { font-weight: 600; color: var(--muted); width: 55%; }

/* ===== Print ===== */
.print-only { display: none; }
@media print {
  #appShell, #loginScreen, .modal-backdrop { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  /* margin: 0 מעלים את כותרת/תחתית הדפדפן (תאריך, URL) — הריווח ניתן בתוך .pq */
  @page { size: A4; margin: 0; }
  .pq { padding: 12mm; }
}
.pq { font-size: 13px; color: #111; }
.pq-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--navy); padding-bottom: 10px; }
.pq-issuer { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pq-issuer img { height: 74px; width: auto; }
.pq-issuer-sub { font-size: 11px; color: #475569; }
.pq-side-block { text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pq-electra { height: 22px; width: auto; margin-bottom: 4px; }
.pq-brand-name { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.pq-brand-logo { height: 26px; width: auto; margin-bottom: 4px; }
.pq-title { text-align: center; font-size: 20px; font-weight: 800; margin: 14px 0; color: var(--navy); }
.pq-info { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 30px; margin-bottom: 14px; }
.pq-info div { padding: 2px 0; }
.pq table { width: 100%; border-collapse: collapse; }
.pq th { background: var(--navy); color: #fff; padding: 6px 8px; font-size: 12px; text-align: right; }
.pq td { border: 1px solid #cbd5e1; padding: 5px 8px; }
.pq-circuit { margin-top: 14px; break-inside: avoid; }
.pq-circuit-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--blue-light); color: var(--navy); font-weight: 800;
  padding: 6px 10px; border-radius: 6px 6px 0 0; font-size: 13px;
}
.pq-circuit-sum { text-align: left; padding: 5px 8px; font-size: 12.5px; background: #f8fafc; border: 1px solid #cbd5e1; border-top: none; }
.pq .pq-totals { margin-top: 12px; width: 45%; margin-inline-start: auto; }
.pq .pq-totals td { border: none; padding: 3px 8px; }
.pq .pq-totals .grand { font-weight: 800; font-size: 15px; border-top: 2px solid var(--navy); }
.pq-notes { margin-top: 18px; font-size: 11px; color: #475569; line-height: 1.7; }
.pq-warranty { font-size: 10px; color: #475569; margin-top: 1px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  #loginScreen { flex-direction: column; }
  .login-side { width: 100%; padding: 34px; }
  #appShell.active { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; min-height: 0; }
  .nav-tabs { flex-direction: row; overflow-x: auto; }
  .side-footer { display: none; }
  .main-area { padding: 18px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}

.wa-spin { display: inline-block; animation: wa-spin 1.1s linear infinite; font-size: 15px; }
@keyframes wa-spin { to { transform: rotate(360deg); } }

/* הודעה קצרה בפינה (במקום חלון קופץ) */
#toast {
  position: fixed; bottom: 24px; left: 24px; z-index: 9999;
  max-width: 420px; padding: 13px 18px; border-radius: 12px;
  background: var(--navy); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(10, 42, 77, .28);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.warn { background: #92400e; }
#toast.err  { background: #b91c1c; }

/* כפתור העתקת מק"ט */
.copy-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 6px; padding: 1px 6px; margin-inline-start: 4px;
  font-size: 12px; line-height: 1.4; cursor: pointer; vertical-align: middle;
}
.copy-btn:hover { color: var(--blue); border-color: var(--blue); }
.copy-btn.copied { color: #15803d; border-color: #15803d; }
.sku-cell { white-space: nowrap; }

/* ניהול קבוצות במצב עריכה */
.g-tile { position: relative; }
.g-tools { position: absolute; top: 6px; left: 8px; display: flex; gap: 6px; }
.g-tool {
  font-size: 13px; line-height: 1; padding: 3px 5px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line); cursor: pointer; color: var(--muted);
}
.g-tool:hover { color: var(--blue); border-color: var(--blue); }
.g-tool.g-del:hover { color: #b91c1c; border-color: #b91c1c; }
.g-tile.g-empty { border-style: dashed; opacity: .85; }
.g-tile.g-add-tile { border-style: dashed; color: var(--blue); background: var(--blue-light); }
.g-tile.g-add-tile .g-name { color: var(--blue); }

/* מסך היסטוריית מחיקות */
.hist-head {
  display: flex; align-items: center; gap: 14px; padding: 10px 4px;
  color: var(--navy); font-size: 15px;
}
.hist-row td { color: #6b7280; }
.hist-row .num { color: var(--text); }
.hist-meta { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }

/* היסטוריה מסודרת לפי תגים */
.hist-tag-row td {
  background: var(--blue-light); border-top: 2px solid var(--line);
  padding: 8px 12px !important;
}
.hist-tag { font-weight: 800; color: var(--navy); font-size: 14px; }
.hist-child td { background: #fafbff; }
.hist-child td:first-child { color: #94a3b8; text-align: center; }
/* תגית "סוף דגם" */
.eol-tag {
  display: inline-block; background: #7c2d12; color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-inline-start: 4px;
}

/* קישור ניהול בסרגל הצד — נראה כמו כפתור טאב רגיל */
a.admin-nav { text-decoration: none; display: flex; }

/* משולש פרטי דגם בתוך הצעת מחיר מזגנים */
.q-model { display: inline-flex; align-items: center; gap: 6px; }
/* כאן הכפתור עצמו לחיץ (בניגוד למחירון, שם השורה כולה לחיצה) */
.q-toggle { margin: 0; pointer-events: auto; }
.q-toggle.open { transform: rotate(180deg); }
.q-toggle-spacer { display: inline-block; width: 26px; }
.acq-detail-row { display: none; }
.acq-detail-row.open { display: table-row; }
.acq-detail-row td { background: var(--blue-light); }

/* ===== באנרים פרסומיים — מיקומים מוגדרים מראש ===== */
.banner-slot.banner-h { margin: 0 0 20px; }
.banner-slot.banner-h:last-child { margin: 20px 0 0; }   /* תחתון */
.banner-slot.banner-v { margin: 0; align-self: flex-start; position: sticky; top: 16px; order: 2; }

/* פריסה: באנר אנכי בצד שמאל + תוכן ראשי. ב-RTL הפריט הראשון נופל לימין,
   לכן order ממקם את הבאנר בצד שמאל (סוף ציר ה-flex) */
.ac-with-side { display: flex; gap: 20px; align-items: flex-start; }
.ac-with-side-main { flex: 1; min-width: 0; order: 1; }
@media (max-width: 820px) {
  .ac-with-side { flex-direction: column; }
  .banner-slot.banner-v { width: 100% !important; position: static; }
  .banner-slot.banner-v .banner-track { max-width: 100% !important; }
}

/* הקופסה מתכווצת לגודל התמונה (fit-content) וממורכזת — התמונה מוצגת במלואה בלי חיתוך ובלי פסים.
   המידה שנקבעת במנהל = תקרת רוחב/גובה לתמונה (max-width/max-height), התמונה שומרת על היחס שלה. */
.banner-track {
  position: relative; display: grid; justify-items: center;
  width: fit-content; max-width: 100%; margin-inline: auto;
  border-radius: 14px; overflow: hidden;
  background: var(--blue-light); border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(20, 40, 80, .06);
}
.banner-slide {
  grid-area: 1 / 1; display: block;
  opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.banner-slide.active { opacity: 1; pointer-events: auto; }
/* width/height:auto שומרים על היחס; max-width/max-height מוזרקים inline לכל מיקום */
.banner-slide img { width: auto; height: auto; max-width: 100%; display: block; }
.banner-dots { display: flex; gap: 6px; justify-content: center; margin-top: 9px; }
.banner-dot {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%;
  background: #cbd5e1; cursor: pointer; transition: all .25s ease;
}
.banner-dot.active { background: var(--blue); width: 22px; border-radius: 4px; }

/* ניהול באנרים במסך הניהול */
.banner-admin-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px;
}
.banner-admin-item img { width: 120px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.banner-admin-item .ba-fields { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.banner-admin-item .ba-fields input[type="text"] { width: 100%; }
.banner-admin-item .ba-ctrls { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.banner-admin-item.inactive { opacity: .5; }

/* שני מחירים בשורת המזגן — צרכן + מתקין (מיצובישי) */
.ac-2price { display: flex; flex-direction: column; line-height: 1.25; }
.ac-2price .pc { font-weight: 700; color: var(--navy); }
.ac-2price .pi { font-size: 12px; color: var(--ok); font-weight: 600; }
