/* ============================================================
   מערכת ניהול משרד פרסום — מערכת עיצוב (Design System)
   RTL · עברית · סגנון אנרגטי-נקי
   צבעי מותג (כחול/צהוב/ירקרק) שמורים ללוגו ולאקסנטים.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* בסיס מערכת — נקי ומקצועי */
  --bg: #f4f6fa;
  --bg-subtle: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e8ef;
  --border-strong: #d3d8e3;

  /* טקסט */
  --text: #161b26;
  --text-2: #4b5466;
  --text-3: #8a93a6;

  /* מותג — לאקסנטים ולוגו בלבד */
  --brand-blue: #2563eb;
  --brand-blue-dark: #1e40af;
  --brand-yellow: #f7c948;
  --brand-green: #18b884;
  --brand-gradient: linear-gradient(120deg, #2563eb 0%, #18b884 55%, #f7c948 130%);

  /* פעולה ראשית */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #e8efff;

  /* צבעי סטטוס */
  --green: #18b884;
  --green-soft: #e3f7f0;
  --amber: #f59e0b;
  --amber-soft: #fef3da;
  --red: #ef4444;
  --red-soft: #fdeaea;
  --purple: #7c3aed;
  --purple-soft: #f0e9fe;
  --blue: #2563eb;
  --blue-soft: #e8efff;
  --gray-soft: #eef1f6;
  /* גוונים כהים אחידים לטקסט רווח/הפסד וגוון מידע (sky) — מקור אחד לכל המערכת */
  --green-dark: #0c7a59;
  --red-dark: #c0322a;
  --info: #0ea5e9;
  --info-soft: #e6f4fb;

  /* צללים */
  --shadow-sm: 0 1px 2px rgba(20, 27, 45, 0.06);
  --shadow: 0 4px 14px rgba(20, 27, 45, 0.07);
  --shadow-md: 0 8px 28px rgba(20, 27, 45, 0.10);
  --shadow-lg: 0 18px 50px rgba(20, 27, 45, 0.16);

  /* רדיוסים */
  --r-sm: 8px;
  --r: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  --sidebar-w: 256px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Heebo", "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: "Rubik", "Heebo", sans-serif; font-weight: 600; line-height: 1.25; color: var(--text); }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd3df; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b6bdcc; }

/* ============================================================
   לוגו
   ============================================================ */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand-gradient);
  display: grid; place-items: center;
  color: #fff; font-family: "Rubik", sans-serif; font-weight: 700; font-size: 20px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-family: "Rubik", sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.logo-text span { font-size: 11px; color: var(--text-3); }

/* ============================================================
   מסך התחברות
   ============================================================ */
.login-wrap {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 40px;
  background: radial-gradient(circle at 50% 0%, #1b2444 0%, #10152a 55%, #090c18 100%);
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(75px); opacity: .55; pointer-events: none; animation: loginOrbFloat 16s ease-in-out infinite; }
.orb-1 { width: 440px; height: 440px; background: #2563eb; top: -130px; inset-inline-end: -90px; }
.orb-2 { width: 380px; height: 380px; background: #18b884; bottom: -150px; inset-inline-start: -100px; animation-delay: -5s; animation-duration: 20s; }
.orb-3 { width: 300px; height: 300px; background: #f7c948; top: 42%; inset-inline-start: 36%; opacity: .3; animation-delay: -9s; animation-duration: 18s; }
@keyframes loginOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, -24px) scale(1.07); }
}
.login-shell {
  position: relative; z-index: 1; width: 100%; max-width: 980px;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 90px -25px rgba(4,7,18,.6), 0 0 0 1px rgba(255,255,255,.08);
  animation: loginShellIn .55s cubic-bezier(.16,1,.3,1);
}
@keyframes loginShellIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.login-aside {
  position: relative; overflow: hidden;
  background: var(--brand-gradient);
  color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
}
.login-aside-top { display: flex; flex-direction: column; gap: 26px; }
.login-quote {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px); border-radius: 14px; padding: 13px 16px;
  font-size: 14.5px; line-height: 1.5; color: #fff; font-weight: 500; max-width: 460px;
}
.login-quote svg { flex-shrink: 0; margin-top: 1px; opacity: .9; }
.login-brand-sm { display: none; align-items: center; gap: 10px; margin-bottom: 22px; font-family: "Rubik", sans-serif; font-size: 17px; font-weight: 700; }
.login-brand-sm .logo-mark { width: 34px; height: 34px; font-size: 14px; }
.login-aside::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 45%),
              radial-gradient(circle at 10% 90%, rgba(255,255,255,.14), transparent 40%);
}
.login-aside > * { position: relative; z-index: 1; }
.login-aside .logo-mark { background: rgba(255,255,255,.18); box-shadow: none; backdrop-filter: blur(4px); }
.login-aside .logo-text b, .login-aside .logo-text span { color: #fff; }
.login-hero h1 { color: #fff; font-size: 38px; line-height: 1.18; margin-bottom: 16px; }
.login-hero p { color: rgba(255,255,255,.86); font-size: 16px; max-width: 420px; }
.login-features { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.login-feature { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.92); font-size: 15px; }
.login-feature .ico { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.login-foot { color: rgba(255,255,255,.7); font-size: 13px; }

.login-main { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--text-2); margin-bottom: 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text); transition: .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 92px; }
select.input { cursor: pointer; }

.demo-pick { margin-top: 26px; }
.demo-pick .demo-title { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; display:flex; align-items:center; gap:8px; }
.demo-title::after { content:""; flex:1; height:1px; background: var(--border); }
.demo-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-user {
  display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface); transition: .15s; text-align: right;
}
.demo-user:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.demo-user .avatar { width: 32px; height: 32px; font-size: 13px; }
.demo-user .du-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.demo-user .du-info b { font-size: 13px; }
.demo-user .du-info span { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   Layout — מעטפת אפליקציה
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-head { padding: 18px 18px 14px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.nav-group-title { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .7px; padding: 16px 12px 7px; font-weight: 700; border-top: 1px solid var(--border); margin-top: 4px; }
.nav-group:first-child .nav-group-title { border-top: none; margin-top: 0; padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--text); font-size: 14.5px; font-weight: 500; margin-bottom: 3px; transition: .14s; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-hover); font-weight: 700; }
.nav-item.active::before { content:""; position:absolute; right:-12px; top:8px; bottom:8px; width:3px; border-radius:99px; background: var(--primary); }
.nav-item .nav-ico { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); transition: .14s; }
.nav-item:hover .nav-ico { background: var(--surface-3, var(--border)); color: var(--text); }
.nav-item.active .nav-ico { background: var(--primary); color: #fff; }
.nav-item .nav-badge { margin-inline-start: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); transition:.14s; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .ui { flex: 1; min-width: 0; line-height: 1.2; }
.user-chip .ui b { font-size: 13.5px; display: block; }
.user-chip .ui span { font-size: 11.5px; color: var(--text-3); }
.user-chip .logout { color: var(--text-3); width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; display: grid; place-items: center; }
.user-chip .logout:hover { background: var(--red-soft); color: var(--red); }

/* ---------- אזור ראשי ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px;
  padding: 0 26px; position: sticky; top: 0; z-index: 40;
}
.topbar .page-title { font-size: 18px; font-weight: 600; }
.topbar .page-sub { font-size: 13px; color: var(--text-3); }
.topbar-search {
  margin-inline-start: auto; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--r-full); width: 260px; color: var(--text-3);
}
.topbar-search input { border: none; background: transparent; outline: none; width: 100%; color: var(--text); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--text-2); position: relative; transition: .14s; }
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; left: 9px; width: 8px; height: 8px; background: var(--red); border-radius: 99px; border: 2px solid var(--surface); }

.content { padding: 26px; max-width: 1320px; width: 100%; margin: 0 auto; }

/* ============================================================
   רכיבים כלליים
   ============================================================ */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: #fff; flex-shrink: 0; font-family: "Rubik", sans-serif;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 52px; height: 52px; font-size: 19px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 16px; }
.card-head .ch-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }

.section-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.section-sub { color: var(--text-2); font-size: 14px; }

/* כפתורים */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid transparent;
  font-size: 14px; font-weight: 600; transition: .14s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.28); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-soft { background: var(--primary-soft); color: var(--primary-hover); }
.btn-soft:hover { background: #dbe6ff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* תגיות / Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge .bdot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.badge-green { background: var(--green-soft); color: var(--green-dark); }
.badge-amber { background: var(--amber-soft); color: #b06f00; }
.badge-red { background: var(--red-soft); color: #c0322a; }
.badge-purple { background: var(--purple-soft); color: #6326c4; }
.badge-blue { background: var(--blue-soft); color: var(--brand-blue-dark); }
.badge-gray { background: var(--gray-soft); color: var(--text-2); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.chip-active { background: var(--blue-soft); border-color: var(--brand-blue); color: var(--brand-blue-dark); font-weight: 600; }
.status-row:hover { background: var(--surface-2); border-radius: 8px; margin-inline: -8px; padding-inline: 8px; }
.chip .cdot { width: 8px; height: 8px; border-radius: 99px; }

/* טבלאות */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl thead th { text-align: right; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.tbl tbody tr { transition: .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.tbl .muted { color: var(--text-3); }
.row-link { cursor: pointer; }
.kpi-click { cursor: pointer; }
.kpi-click:hover { border-color: var(--brand-blue); }
/* צ'יפ לקוח קומפקטי בשורת קמפיין */
.client-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: var(--r-full); font-size: 11.5px; font-weight: 600; background: var(--blue-soft); color: var(--brand-blue-dark); white-space: nowrap; }
/* צ'יפים לבחירה מרובה (צפי עבודה) */
.pick-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pick-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--r-full); font-size: 13px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: all .14s ease; }
.pick-chip:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.pick-chip.active { background: var(--blue-soft); border-color: var(--brand-blue); color: var(--brand-blue-dark); font-weight: 600; }

/* ---- כפתור חזרה חכם וגלובלי (טופ-בר) ---- */
.back-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 16px; border: 1px solid var(--border); border-radius: var(--r-full); background: linear-gradient(135deg, var(--surface), var(--surface-2)); cursor: pointer; font-family: inherit; font-size: 12.5px; color: var(--text-2); box-shadow: var(--shadow-sm); transition: all .18s ease; flex: none; }
.back-pill .bp-ico { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 99px; background: var(--blue-soft); color: var(--brand-blue); transition: transform .18s ease; }
.back-pill .bp-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: start; }
.back-pill .bp-txt b { font-size: 11.5px; color: var(--brand-blue-dark); max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-pill:hover { border-color: var(--brand-blue); box-shadow: 0 4px 14px -6px rgba(37,99,235,.35); transform: translateY(-1px); }
.back-pill:hover .bp-ico { transform: translateX(3px); }
@media (max-width: 640px) { .back-pill .bp-txt { display: none; } .back-pill { padding: 0 10px; } }

/* ---- נגישות: פוקוס מקלדת ברור לכל רכיב אינטראקטיבי ---- */
:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .back-pill:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }

/* ---- מובייל: טבלאות רחבות — עמודה ראשונה צמודה + גלילה נוחה ---- */
@media (max-width: 900px) {
  .table-wrap { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .table-wrap .tbl th:first-child, .table-wrap .tbl td:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; box-shadow: -6px 0 8px -6px rgba(0,0,0,.12) inset; }
  .table-wrap .tbl thead th:first-child { z-index: 2; }
}

/* ---- מצבי טעינה (דפוס לקראת גרסת השרת): ספינר בכפתור + skeleton ---- */
.btn.is-loading { pointer-events: none; opacity: .75; position: relative; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-start-color: transparent; border-radius: 99px; display: inline-block; margin-inline-start: 6px; animation: btnspin .7s linear infinite; }
@keyframes btnspin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--gray-soft) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-radius: 8px; min-height: 14px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- פס Undo למחיקות ---- */
.undo-bar { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); display: flex; align-items: center; gap: 12px; background: var(--text, #1c2333); color: #fff; padding: 10px 18px; border-radius: var(--r-full); box-shadow: 0 10px 30px -8px rgba(0,0,0,.4); z-index: 300; font-size: 13px; animation: undoIn .25s ease; }
.undo-bar svg { opacity: .7; }
.undo-btn { background: none; border: none; color: #7eb3ff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.undo-btn:hover { background: rgba(255,255,255,.12); }
@keyframes undoIn { from { opacity: 0; transform: translateX(50%) translateY(12px); } to { opacity: 1; transform: translateX(50%) translateY(0); } }

/* ---- הדפסה / ייצוא PDF ---- */
@media print {
  .sidebar, .topbar, .undo-bar, .dropdown, .back-pill, .toast-wrap, .modal-overlay,
  .btn, .ch-actions, .month-tabs, .icon-btn, .crumbs, .tabs { display: none !important; }
  .app, .main, .content { display: block !important; height: auto !important; overflow: visible !important; }
  .content { padding: 0 !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  .kpi { box-shadow: none !important; border: 1px solid #ccc !important; }
  a[onclick] { text-decoration: none; color: inherit; }
}

/* ---- אקורדיון קטגוריות ספקים ---- */
.sup-cat { border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; }
.sup-cat-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; background: var(--surface-2); border: 0; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.sup-cat-head:hover { background: var(--primary-soft); }
.sup-cat-chev { display: inline-flex; transition: transform .18s; color: var(--text-3, #9aa3b2); }
.sup-cat.open .sup-cat-chev { transform: rotate(90deg); }
.sup-cat .table-wrap { border-top: 1px solid var(--border); }

/* ---- קופסת סיכום AI ---- */
.ai-summary-box { background: linear-gradient(135deg, var(--purple-soft), var(--surface)); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; }
/* טבלה עם קווי הפרדה ברורים בין שורות */
.tbl-rows tbody tr { border-bottom: 1px solid var(--border); }
.tbl-rows tbody tr:hover { background: var(--primary-soft); }
.tbl-rows tbody tr:last-child { border-bottom: 0; }
.tbl-rows td { padding-top: 13px; padding-bottom: 13px; }
/* שם לקוח בולט בשורת קמפיין */
.br-opener { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--brand-blue-dark); }
.br-opener svg { color: var(--brand-blue); }
.br-client { display: inline-flex; align-items: center; gap: 3px; margin-inline-end: 10px; }
.br-client svg { color: var(--text-2); }
.camp-client-line { margin-bottom: 3px; }
.camp-client-name { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand-blue-dark); background: var(--blue-soft); padding: 3px 10px; border-radius: var(--r-full); }
/* אשף צפי עבודה — רשומות */
.fcw-entries { display: flex; flex-direction: column; gap: 8px; }
.fcw-entry { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.fcw-loads { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.fcw-load-badge { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
/* הרשאות תפקידים — כרטיסים */
.perm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.perm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.perm-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.perm-caps { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 7px; }
.perm-cap { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.perm-cap.on { color: var(--text); }
.perm-cap.on svg { color: var(--green); flex: none; }
.perm-cap.off { color: var(--text-3, #9aa3b2); }
.perm-cap.off svg { color: var(--red); flex: none; opacity: .7; }

/* מטריצת הרשאות ניתנת לעריכה */
.perm-matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.perm-matrix th, .perm-matrix td { padding: 10px 8px; border-bottom: 1px solid var(--border); }
.perm-matrix thead th { background: var(--surface-2); position: sticky; top: 0; }
.perm-matrix tbody tr:hover td { background: var(--surface-2); }
.perm-cell { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; transition: transform .08s, box-shadow .12s; }
.perm-cell.on { background: var(--green-soft, #e6f6ed); color: var(--green); }
.perm-cell.off { background: var(--surface-2); color: var(--text-3, #9aa3b2); }
.perm-cell.editable { cursor: pointer; }
.perm-cell.editable:hover { box-shadow: 0 0 0 2px var(--brand-blue); transform: translateY(-1px); }
.perm-cell.locked { opacity: .85; cursor: not-allowed; box-shadow: inset 0 0 0 1px var(--border); }

/* גריד KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi .kpi-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.kpi .kpi-val { font-family: "Rubik", sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.kpi .kpi-label { color: var(--text-2); font-size: 13.5px; margin-top: 6px; }
.kpi .kpi-trend { font-size: 12.5px; font-weight: 600; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.kpi .kpi-trend.up { color: var(--green-dark); }
.kpi .kpi-trend.down { color: #c0322a; }

/* Progress */
.progress { height: 8px; background: var(--bg-subtle); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .4s; }
.progress.green > span { background: var(--green); }
.progress.amber > span { background: var(--amber); }
.progress.red > span { background: var(--red); }

/* פריסות עזר */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mb-4{margin-bottom:4px}.mb-16{margin-bottom:16px}.mb-18{margin-bottom:18px}.mb-20{margin-bottom:20px}.mb-24{margin-bottom:24px}
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.cell-strong { font-weight: 600; }

/* כרטיס לקוח/קמפיין */
.entity-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-sm); transition: .16s; cursor: pointer; }
.entity-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.entity-card .ec-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.entity-card .ec-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-family: "Rubik"; font-weight: 700; font-size: 18px; color: #fff; flex-shrink: 0; }
.entity-card .ec-meta { flex: 1; min-width: 0; }
.entity-card .ec-meta b { font-size: 15.5px; display: block; }
.entity-card .ec-meta span { font-size: 12.5px; color: var(--text-3); }
.entity-card .ec-stats { display: flex; gap: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.entity-card .ec-stat b { font-family: "Rubik"; font-size: 16px; display: block; }
.entity-card .ec-stat span { font-size: 11.5px; color: var(--text-3); }
.entity-card .ec-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Inline search */
.search-inline { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 12px; min-width: 280px; flex: 1; max-width: 420px; transition: .16s; }
.search-inline:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--blue-soft); }
.search-inline input { border: none; background: none; box-shadow: none; padding: 10px 0; flex: 1; }
.search-inline input:focus { box-shadow: none; }

/* Breadcrumb */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { opacity: .5; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--bg-subtle); padding: 4px; border-radius: var(--r); width: fit-content; }
.tab { padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: .14s; border: none; background: transparent; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

/* כרטיסיות עמוד קמפיין — בולטות ונקיות יותר */
.camp-tabs { gap: 6px; padding: 5px; background: var(--surface-2); border: 1px solid var(--border); width: 100%; flex-wrap: wrap; }
.camp-tabs .tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; color: var(--text-2); }
.camp-tabs .tab svg { opacity: .75; }
.camp-tabs .tab:hover:not(.active) { background: var(--surface); color: var(--text); }
.camp-tabs .tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.camp-tabs .tab.active svg { opacity: 1; }

/* בורר דחיפות מהיר */
.pri-select { height: 26px; border-radius: var(--r-full); border: 1.5px solid var(--border); padding: 0 26px 0 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='3' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat left 8px center; appearance: none; transition: .14s; }
.pri-select:hover { border-color: var(--border-strong); }
.pri-select.pri-urgent { background-color: var(--red-soft); color: #c0322a; border-color: #f3b6b1; }
.pri-select.pri-normal { background-color: var(--blue-soft); color: var(--brand-blue-dark); border-color: #b9cdf8; }
.pri-select.pri-low { background-color: var(--gray-soft); color: var(--text-2); }

/* תגית נעילת רצף */
.lock-chip { background: var(--amber-soft); border-color: #f3d999; color: #946100; }
.task-card.locked { opacity: .88; border-inline-start-color: var(--amber) !important; background: var(--surface-2); }
.seq-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--bg-subtle); color: var(--text-2); font-size: 12px; font-weight: 700; font-family: "Rubik"; flex-shrink: 0; }
.task-num { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-family: monospace; cursor: pointer; display: inline-block; }
.task-num:hover { background: var(--blue-soft); color: var(--brand-blue); }
.subtask-row td { background: var(--surface-2); }
.subtask-row .task-num { font-size: 11.5px; }
.seq-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seq-flow .seq-arrow { color: var(--text-3); }
.seq-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 500; border: 1.5px solid var(--border); background: var(--surface); }
.seq-step.done { background: var(--green-soft); border-color: #a6e6d2; color: var(--green-dark); }
.seq-step.active { background: var(--blue-soft); border-color: #b9cdf8; color: var(--brand-blue-dark); }
.seq-step.locked { opacity: .7; }
.seq-stage-group { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: var(--r-full); border: 1.5px dashed transparent; }
.seq-stage-group:has(.seq-parallel-plus) { border-color: #b9cdf8; background: var(--blue-soft); }
.seq-parallel-plus { font-weight: 700; color: var(--brand-blue-dark); padding: 0 2px; }

/* Timer */
.timer-box { display: flex; align-items: center; gap: 10px; }
.timer-time { font-family: "Rubik"; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; }
.timer-btn { width: 38px; height: 38px; border-radius: 50%; border: none; display: grid; place-items: center; color: #fff; transition:.14s; }
.timer-btn.play { background: var(--green); }
.timer-btn.stop { background: var(--red); }
.timer-btn:hover { transform: scale(1.06); }
.timer-running { color: var(--green); }

/* Task employee card */
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-sm); border-inline-start: 4px solid var(--border-strong); margin-bottom: 14px; }
.task-card.pri-urgent { border-inline-start-color: var(--red); }
.task-card .tc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.task-card .tc-client { font-size: 12.5px; color: var(--text-3); }
.task-card .tc-title { font-size: 16px; font-weight: 600; }
.task-card .tc-foot { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,27,45,.45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 24px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { max-width: 820px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 18px; }
.modal-head .x { margin-inline-start: auto; width: 34px; height: 34px; border-radius: 9px; border: none; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; }
.modal-head .x:hover { background: var(--red-soft); color: var(--red); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-start; background: var(--surface-2); }

/* Dropdown notifications */
.dropdown { position: absolute; top: calc(100% + 10px); left: 0; width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop .15s; }
.dropdown-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; }
.notif-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); transition: .12s; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--primary-soft); }
.notif-item .ni-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.notif-item .ni-body p { font-size: 13.5px; line-height: 1.4; }
.notif-item .ni-body time { font-size: 11.5px; color: var(--text-3); }

/* Empty state */
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty .em-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 16px; color: var(--text-3); }
.empty h4 { color: var(--text-2); margin-bottom: 4px; }

/* פיננסי — חבוי/גלוי */
.cost-tag { color: var(--text-3); font-size: 11px; }
.profit-pos { color: var(--green-dark); font-weight: 600; }
.profit-neg { color: var(--red-dark); font-weight: 600; }
.locked-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--amber-soft); border: 1px solid #f5d486; border-radius: var(--r); color: #946100; font-size: 13.5px; margin-bottom: 16px; }
.materials-box { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: var(--green-soft); border: 1px solid #b7e0c4; border-radius: var(--r); color: var(--text-2); font-size: 13.5px; line-height: 1.6; }

/* Mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 38px; border-radius: 8px 8px 0 0; background: var(--brand-gradient); transition: height .5s; min-height: 4px; }
.bar.alt { background: linear-gradient(180deg, #93b4ff, #c7d7ff); }
.bar-col .bl { font-size: 11.5px; color: var(--text-3); }
.bar-col .bv { font-size: 12px; font-weight: 600; }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; left: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--text); color: #fff; padding: 13px 18px; border-radius: var(--r); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 14px; animation: slideup .25s; max-width: 360px; }
@keyframes slideup { from { transform: translateY(20px); opacity: 0; } }
.toast.success { background: var(--green-dark); }
.toast.info { background: var(--text); }

/* Avatar stack */
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--surface); margin-inline-start: -8px; }
.avatar-stack .avatar:first-child { margin-inline-start: 0; }

/* ============================================================
   רספונסיב
   ============================================================ */
.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; right: 0; top: 0; z-index: 90; width: 270px; transform: translateX(100%); transition: transform .22s; }
  .app.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(20,27,45,.4); z-index: 80; }
  .menu-toggle { display: grid; }
  .topbar-search { display: none; }
  .login-wrap { padding: 20px; }
  .login-shell { grid-template-columns: 1fr; border-radius: 20px; }
  .login-aside { display: none; }
  .login-brand-sm { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .demo-users { grid-template-columns: 1fr; }
  .content { padding: 18px; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
}

/* ============================================================
   תוספות: משימות אישיות, סימון תשלום, ליטוש עיצוב קל
   ============================================================ */
/* כפתורי סימון סטטוס (תשלום/גביה) — נראים כתגית לחיצה */
.pay-toggle { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; transition: transform .12s ease; }
.pay-toggle:hover { transform: translateY(-1px); filter: brightness(.97); }
.pay-toggle:active { transform: translateY(0); }

/* משימות אישיות */
.ptask { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); transition: border-color .15s ease, background .15s ease; }
.ptask:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ptask.done .ptask-text { text-decoration: line-through; color: var(--text-3); }
.ptask-text { font-size: 14px; }
.ptask-check { display: inline-flex; cursor: pointer; }
.ptask-check input { display: none; }
.ptask-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-strong); display: inline-grid; place-items: center; color: #fff; transition: all .15s ease; }
.ptask-check input:checked + .ptask-box { background: var(--brand-green); border-color: var(--brand-green); }
.ptask-overdue { border-color: #f3c0c0; background: var(--red-soft); }

/* ווידג'ט ההתראות המוקטן בדשבורד */
.sys-alert-widget .card-pad { padding-bottom: 10px; }
.sys-alert-widget:hover { box-shadow: 0 8px 24px -12px rgba(22,27,38,.22); }

/* גביה — שורה ללקוח עם פתיחה/סגירה */
.coll-client-row { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; margin-bottom: 4px; }
.coll-client-row:hover { background: var(--surface-2); border-color: var(--border); }
.coll-client-detail { padding: 4px 10px 16px; }

/* דף קמפיין — הפרדה חזותית בין בלוק העבודה (בריפים/משימות) לבלוק הכספים/בריף המדיה */
.camp-section-block { border: 1px solid var(--border); border-radius: 14px; padding: 16px 16px 4px; margin-bottom: 16px; background: var(--surface); }
.camp-section-work { background: var(--surface); }
.camp-section-block .camp-money-title { color: var(--purple); }
.camp-tabs-money { background: var(--purple-soft, #f3ecfb); border-radius: 10px; padding: 4px; }
.camp-tabs-money .tab { color: var(--purple); }
.camp-tabs-money .tab.active { background: var(--purple); color: #fff; }
.camp-tab-content-money { border: 1px solid var(--purple); border-radius: 14px; padding: 16px; background: var(--purple-soft); }

/* בריף מדיה — באנר סיכום כספי עליון (סה"כ לחיוב / נטו ספק / רווח / אחוז רווחיות) */
.money-summary-banner { display: flex; gap: 24px; flex-wrap: wrap; background: linear-gradient(135deg, var(--green-soft), #eaf7f0); border: 1px solid #a6e6d2; border-radius: 14px; padding: 16px 22px; }
.msb-stat { min-width: 110px; }
.msb-label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.msb-val { font-size: 20px; font-family: "Rubik"; }
.msb-profit .msb-val { color: var(--green-dark); }

/* כרטיס כניסה לבריף המדיה (בדף הקמפיין) */
.media-brief-cta { display: flex; align-items: center; gap: 14px; cursor: pointer; margin-bottom: 24px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--purple); background: var(--purple-soft); transition: box-shadow .16s ease, transform .16s ease; }
.media-brief-cta:hover { box-shadow: 0 8px 24px -12px rgba(124,58,237,.3); transform: translateY(-1px); }
.media-brief-cta .mbc-ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--purple); color: #fff; flex-shrink: 0; }

/* 2 קוביות בדף הקמפיין (מדיה + עבודה ותוצרים) */
.camp-cubes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
@media (max-width: 860px) { .camp-cubes { grid-template-columns: 1fr; } }
.camp-cube { border-radius: 16px; border: 1px solid var(--border); background: #fff; padding: 18px 20px; }
.camp-cube-media { cursor: pointer; border-color: var(--purple); background: var(--purple-soft); transition: box-shadow .16s ease, transform .16s ease; }
.camp-cube-media:hover { box-shadow: 0 8px 24px -12px rgba(124,58,237,.3); transform: translateY(-1px); }
.camp-cube-head { display: flex; align-items: center; gap: 12px; }
.camp-cube-head .mbc-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--purple); color: #fff; flex-shrink: 0; }
.camp-cube-stats { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }

/* טבלת תמחור קלילה — טבלה אחת עם מפרידי קטגוריה/ספק ושורות צפופות */
.pricing-tbl { font-size: 13px; }
.pricing-tbl th { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: none; padding: 6px 12px; }
.pricing-tbl td { padding: 3px 12px; line-height: 1.25; border-bottom: 1px solid var(--border); }
.pricing-tbl .line-row:hover { background: var(--surface-2); }
.pricing-tbl .line-desc { color: var(--text-2); }
/* מפריד קטגוריה — רצועה דקה ועדינה */
.pricing-tbl .grp-cat td { background: var(--purple-soft); padding: 5px 12px; border-bottom: none; }
.grp-cat-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: #6326c4; }
.grp-cat-sum { float: left; font-weight: 700; font-size: 12.5px; color: #6326c4; }
/* מפריד ספק — שורה דקה מאוד */
.pricing-tbl .grp-sup td { padding: 2px 12px 2px 22px; background: transparent; border-bottom: none; }
.grp-sup-name { font-size: 12px; font-weight: 600; color: var(--text-2); }
.grp-add { float: left; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--brand-blue); background: none; border: none; padding: 1px 4px; border-radius: 6px; }
.grp-add:hover { background: var(--primary-soft); }
.pricing-tbl .line-del { width: 28px; text-align: center; }
.row-del-btn { width: 22px; height: 22px; display: inline-grid; place-items: center; border: none; background: none; color: var(--text-3); border-radius: 6px; opacity: 0; transition: .12s; }
.pricing-tbl .line-row:hover .row-del-btn { opacity: 1; }
.row-del-btn:hover { background: var(--red-soft); color: var(--red); }
.pricing-tbl .pricing-total td { padding: 9px 12px; font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: none; background: var(--surface-2); }
/* בעמודות עריכה — שדה מספר קומפקטי יותר בתוך שורה צפופה */
.pricing-tbl .cell-num-edit { height: 25px; width: 70px; }

/* כותרת עמוד אחידה (מסכי ניהול) */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .page-title { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.page-head .page-sub { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
a.lnk { color: var(--brand-blue); cursor: pointer; }
a.lnk:hover { text-decoration: underline; }

/* טבלה צפופה — שורות נמוכות כדי שייכנסו 15+ שורות במסך */
.tbl-compact th, .tbl-compact td { padding-top: 5px; padding-bottom: 5px; line-height: 1.3; }
.cell-num-edit {
  width: 78px; height: 28px; padding: 2px 6px; text-align: left; direction: ltr;
  border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text);
  font-family: inherit; transition: .12s;
}
.cell-num-edit:hover { border-color: var(--border-strong); background: var(--surface-2); }
.cell-num-edit:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }

/* בורר Inline קטן (העברת משימה / מיקור חוץ בניהול טראפיק) */
.mini-select {
  max-width: 150px; height: 30px; padding: 0 8px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12.5px; cursor: pointer;
}
.mini-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mini-select.is-out { border-color: var(--purple); background: var(--purple-soft); color: #6326c4; font-weight: 600; }

/* גרף עומס אופקי (ניהול טראפיק) */
/* רשימת עומס קומפקטית (במקום טבלה רחבה) */
.wl-list { display: flex; flex-direction: column; }
.wl-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.wl-item:last-child { border-bottom: 0; }
.wl-item:hover { background: var(--primary-soft); border-radius: 8px; }
.wl-name-c { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wl-name-c b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.wl-stats { display: flex; align-items: baseline; gap: 5px; font-size: 12px; white-space: nowrap; }
.wl-open-num { font-weight: 700; font-size: 15px; color: var(--text); }
.wl-chart { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.wl-row { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 28px; align-items: center; gap: 10px; }
.wl-name { min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-track { min-width: 0; height: 16px; background: var(--gray-soft); border-radius: 999px; overflow: hidden; }
.wl-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.wl-fill.wl-low { background: var(--green); }
.wl-fill.wl-high { background: var(--amber); }
.wl-fill.wl-critical { background: var(--red); }
.wl-count { font-size: 13px; font-weight: 700; text-align: left; }

/* כרטיסי חריגות (סיכום חודשי) */
.exc-card { margin-bottom: 0; }
.exc-list { display: flex; flex-direction: column; gap: 8px; }
.exc-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); }
.exc-item.row-link:hover { background: var(--primary-soft); }

/* ליטוש קל: צללית רכה ומעבר עדין לכרטיסים ו-KPI */
.kpi { transition: transform .16s ease, box-shadow .16s ease; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgba(22,27,38,.18); }
.card { transition: box-shadow .16s ease; }
.btn { transition: transform .1s ease, filter .12s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.logo-mark { background: var(--brand-gradient); }

/* ============================================================
   קבצי קמפיין (כרטיסי חומרים)
   ============================================================ */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.file-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .16s ease, border-color .16s ease; }
.file-card:hover { box-shadow: 0 8px 24px -14px rgba(22,27,38,.2); }
.file-card.approval-approved { border-inline-start: 4px solid var(--green); }
.file-card.approval-rejected { border-inline-start: 4px solid var(--red); }
.file-card.approval-pending { border-inline-start: 4px solid var(--amber); }
.fc-top { display: flex; gap: 12px; align-items: flex-start; }
.fc-name { font-weight: 600; font-size: 13.5px; word-break: break-all; line-height: 1.4; }
.fc-meta { font-size: 12px; color: var(--text-3); }
.fc-note { font-size: 12.5px; background: var(--green-soft); color: var(--green-dark); border-radius: 8px; padding: 7px 10px; display: flex; gap: 6px; align-items: center; }
.fc-note.rejected { background: var(--red-soft); color: #a11; }
.fc-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); margin-top: auto; }

/* ============================================================
   לוח משימות אנכי (לפי סטטוס, מלמעלה למטה)
   ============================================================ */
.board-group { margin-bottom: 22px; }
.board-group-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface-2); border-radius: 10px; margin-bottom: 10px; font-size: 14.5px; }
.board-rows { display: flex; flex-direction: column; gap: 8px; }
.board-row { display: grid; grid-template-columns: 110px 2fr 1fr 1.2fr 1fr auto auto; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; cursor: pointer; transition: border-color .14s ease, box-shadow .14s ease, transform .1s ease; }
.board-row:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px -12px rgba(22,27,38,.22); }
.board-row:active { transform: translateY(1px); }
.board-row.pri-urgent { border-inline-start: 3px solid var(--red); }
.board-row.locked { opacity: .82; background: var(--surface-2); }
.br-title { font-weight: 600; font-size: 13.5px; }
.br-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.br-time { font-size: 12.5px; white-space: nowrap; display: flex; flex-direction: column; gap: 3px; }
.br-time > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.br-opened { font-size: 11px; color: var(--text-3); }
@media (max-width: 900px) {
  .board-row { grid-template-columns: 90px 1fr auto; }
  .board-row .br-dept, .board-row .br-emp, .board-row .br-pri, .board-row .br-time { display: none; }
}

/* ============================================================
   תוספות סבב 8: חיפוש, התראות חכמות, ציר זמן, יומן, הרשאות, מגמה
   ============================================================ */
/* התראות חכמות בדשבורד הנהלה */
.sys-alert { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); cursor: pointer; transition: .14s; border: 1px solid transparent; }
.sys-alert:hover { background: var(--surface-2); border-color: var(--border); }
.sys-alert .sa-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.sys-alert.sev-high .sa-ico { background: var(--red-soft); color: var(--red); }
.sys-alert.sev-med .sa-ico { background: var(--amber-soft); color: var(--amber); }

/* תוצאות חיפוש גלובלי */
.search-res { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); cursor: pointer; transition: .14s; }
.search-res:last-child { border-bottom: none; }
.search-res:hover { background: var(--surface-2); border-radius: var(--r-sm); padding-inline: 10px; }
.search-res > div:nth-child(2) { flex: 1; min-width: 0; }
.search-res b { font-size: 14px; }

/* ציר זמן (Gantt פשוט) */
.gantt { display: flex; flex-direction: column; gap: 10px; }
.gantt-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 12px; }
.gantt-label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.gantt-track { position: relative; height: 30px; background: var(--surface-2); border-radius: 8px; }
.gantt-bar { position: absolute; top: 3px; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-sm); }
.gantt-bar.active { background: var(--brand-blue); }
.gantt-bar.done { background: var(--green); }
.gantt-bar.locked { background: var(--text-3); }
.gantt-axis { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-3); }

/* יומן פעילות (timeline) */
.timeline { padding: 18px; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 16px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.tl-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; z-index: 1; }
.tl-body { flex: 1; min-width: 0; }
.tl-body p { font-size: 13.5px; margin-bottom: 2px; }

/* מסך משימה — כותרת, סרגל פעולה, לשוניות */
.task-hero { overflow: hidden; }
.task-hero-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.task-action-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--border); color: var(--text-2); font-size: 11px; font-weight: 700;
}
.tab.active .tab-count { background: var(--primary-soft); color: var(--primary); }
.tl-dot { width: 12px; height: 12px; border-radius: 999px; margin-inline-start: 11px; margin-top: 5px; flex-shrink: 0; z-index: 1; }
.revision-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-inline-start: 3px solid var(--red); border-radius: var(--r-sm); }
.rev-num { width: 24px; height: 24px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }

/* רשת פרטי מידע (כרטיס לקוח וכו') */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
@media (max-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } }

/* כרטיסי אנשי קשר (בעלים / איש קשר / מנהל תיק) */
.contacts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .contacts-grid { grid-template-columns: 1fr; } }
.person-card { display: flex; gap: 11px; padding: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.person-card .pc-body { min-width: 0; flex: 1; }
.person-card .pc-body b { font-size: 13.5px; display: block; margin: 1px 0 4px; }
.pc-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.pc-line svg { flex-shrink: 0; }

/* צפי עבודה — בורר חודשים וכרטיס צפי */
.month-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.month-tab { position: relative; height: 40px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: .14s; }
.month-tab:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.month-tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-hover); }
.month-tab .mt-dot { position: absolute; top: 7px; inset-inline-end: 9px; width: 7px; height: 7px; border-radius: 99px; background: var(--green); }
.month-tab.active .mt-dot { background: var(--primary); }
@media (max-width: 760px) { .month-tabs { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .month-tabs { grid-template-columns: repeat(3, 1fr); } }
.forecast-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; }
.forecast-section-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; }
.forecast-section-title svg { color: var(--text-3); }
.dept-load-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dept-load-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
@media (max-width: 560px) { .dept-load-grid { grid-template-columns: 1fr; } }

/* כותרת-משנה מפרידה בתוך טפסים */
.form-divider { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.form-divider svg { color: var(--text-3); }

/* תיבת הערות פנימיות */
.client-note-box { display: flex; gap: 10px; background: var(--amber-soft); border: 1px solid #f0d9a8; border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.client-note-box > svg { color: var(--amber); flex-shrink: 0; margin-top: 2px; }

/* מטריצת הרשאות */
.perm-tbl td, .perm-tbl th { white-space: nowrap; }
.perm-yes { color: var(--green); display: inline-flex; }
.perm-no { color: var(--text-3); opacity: .5; display: inline-flex; }

/* גרף מגמת רווחיות */
.trend-chart { display: flex; align-items: flex-end; gap: 14px; height: 140px; padding-top: 10px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.trend-bar { width: 100%; max-width: 48px; background: linear-gradient(180deg, var(--purple) 0%, #a78bfa 100%); border-radius: 7px 7px 0 0; min-height: 6px; transition: .2s; }
.trend-col:hover .trend-bar { filter: brightness(1.08); }
.trend-lbl { font-size: 11px; color: var(--text-3); }

/* רשימת קמפיינים — שורת סיכום */
.camp-row { cursor: pointer; transition: .14s; }
.camp-row:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }
.camp-metrics { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.cm-metric { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.cm-metric b { font-family: "Rubik"; }

/* דשבורד חיצוני לשיתוף עם הלקוח */
.ext-dash { min-height: 100vh; background: var(--gray-soft); padding: 32px 16px; }
.ext-dash-inner { max-width: 880px; margin: 0 auto; }

/* קוביות KPI לחיצות בדשבורד */
.kpi-clickable { cursor: pointer; transition: .14s; }
.kpi-clickable:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); }
.kpi-detail-list { display: flex; flex-direction: column; }
.kpi-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border); cursor: pointer; }
.kpi-detail-row:last-child { border-bottom: none; }
.kpi-detail-row:hover { background: var(--gray-soft); }

/* ---- טקסט עשיר בתיאור משימה ---- */
.rich-text { line-height: 1.75; overflow-wrap: anywhere; }
.rich-text p { margin: 0 0 4px; }
.rich-text ul, .rich-text ol { margin: 4px 0 8px; padding-inline-start: 22px; }
.rich-text li { margin-bottom: 3px; }
.rich-text b { font-weight: 800; color: var(--text); }
.rich-text .rt-gap { height: 10px; }
.rich-text.rt-lg { font-size: 15.5px; color: var(--text); }
.rt-clamp .rich-text { max-height: 4.6em; overflow: hidden; }
.task-desc-card { background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--brand-blue) 25%, transparent); border-inline-start: 4px solid var(--brand-blue); border-radius: 12px; padding: 16px 18px; }
.task-desc-card .tdc-head { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--brand-blue); margin-bottom: 10px; }
.rich-editor { display: flex; flex-direction: column; gap: 6px; }
.re-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.re-btn { min-width: 32px; height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.re-btn:hover { background: var(--surface-2); }
.re-hint { font-size: 11.5px; color: var(--text-2); margin-inline-start: 6px; }
.re-emoji-wrap { position: relative; }
.re-emoji { position: absolute; top: 34px; inset-inline-start: 0; z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: grid; grid-template-columns: repeat(9, 30px); gap: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.re-emoji[hidden] { display: none; }
.re-emoji button { border: 0; background: none; font-size: 18px; cursor: pointer; border-radius: 6px; height: 30px; }
.re-emoji button:hover { background: var(--surface-2); }
.re-area { height: auto; min-height: 130px; max-height: 50vh; padding: 12px 14px; overflow-y: auto; resize: vertical; line-height: 1.7; white-space: normal; cursor: text; }
.re-full-btn { margin-inline-start: auto; font-size: 12.5px; padding: 0 10px; }
/* מצב מסך מלא לכתיבה נוחה */
.rich-editor.re-full { position: fixed; inset: 3vh 3vw; z-index: 3000; background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.rich-editor.re-full .re-area { flex: 1; max-height: none; min-height: 0; resize: none; font-size: 15.5px; }
.re-backdrop { position: fixed; inset: 0; z-index: 2999; background: rgba(15,23,42,.55); }
.re-area:empty::before { content: attr(data-placeholder); color: var(--text-2); }
@media (max-width: 600px) { .re-emoji { grid-template-columns: repeat(6, 30px); } .re-hint { display: none; } }

/* ---- כסף: פרויקט/בריף מדיה ---- */
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 18px; }
.m-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-field > label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.m-req { color: var(--amber); margin-inline-end: 3px; }
.m-read { min-height: 38px; display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 13.5px; }
.input.m-inline { height: 36px; padding: 0 10px; font-size: 13px; }
textarea.input.m-inline.m-desc { height: auto; min-height: 40px; padding: 6px 8px; resize: vertical; line-height: 1.45; min-width: 190px; }
.m-low { color: var(--red) !important; font-weight: 700; }
.m-row-low td { background: color-mix(in srgb, var(--red) 6%, transparent); }
.m-row-sel td { background: color-mix(in srgb, var(--brand-blue) 9%, transparent); }
.m-usage { margin-top: 14px; }
.m-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.m-bar-fill { height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.m-bar-fill.warn { background: var(--amber); }
.m-bar-fill.over { background: var(--red); }
.m-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: var(--blue-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13px; }
.m-bulk.is-off { opacity: .45; pointer-events: none; }
.card-head .m-bulk { background: none; border: 0; padding: 0; }
.m-upd { font-size: 11.5px; color: var(--amber); margin-top: 3px; }
.m-lines td { vertical-align: middle; }
.modal.wide.modal-xl, .modal.modal-xl { width: min(1280px, 96vw); max-width: 96vw; }
@media (max-width: 600px) { .m-grid { grid-template-columns: 1fr; } }

/* ---- טבלת תמחור ברורה: קיבוץ לפי ספק, צד לקוח / צד ספק ---- */
.m-pricing { border-collapse: separate; border-spacing: 0; }
.m-pricing th, .m-pricing td { padding: 9px 10px; vertical-align: middle; }
.m-pricing .m-band th { font-size: 11px; font-weight: 700; padding: 6px 10px; border-bottom: 0; text-align: center; }
.m-band-client { background: var(--blue-soft); color: var(--brand-blue); border-radius: 8px 8px 0 0; }
.m-band-supplier { background: var(--purple-soft); color: var(--purple); border-radius: 8px 8px 0 0; }
.m-pricing td.m-c, .m-pricing th.m-c { background: color-mix(in srgb, var(--brand-blue) 4%, transparent); }
.m-pricing td.m-s, .m-pricing th.m-s { background: color-mix(in srgb, var(--purple) 5%, transparent); }
.m-pricing .m-line td { border-bottom: 1px solid var(--border); }
.m-pricing .m-line:hover td { background: var(--surface-2); }
.m-pricing .m-noprint .m-desc-cell { opacity: .6; }
.m-pricing .m-noprint .m-desc-cell::after { content: "לא בתדפיס"; font-size: 10.5px; color: var(--text-2); display: block; }
.m-no { width: 34px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: center; }
.m-chk { width: 30px; text-align: center; }
.m-sup td { background: var(--surface-2); border-top: 2px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 12px !important; }
.m-sup-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-sup-name { font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.m-sup-sum { font-size: 12.5px; color: var(--text-2); padding-inline-start: 10px; border-inline-start: 1px solid var(--border); }
.m-total td { font-weight: 800; border-top: 2px solid var(--text); background: var(--surface-2); }
/* תאים לעריכה: נראים כטקסט, מסגרת רק בריחוף/פוקוס */
.m-cell { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; font: inherit; color: inherit; width: 100%; text-align: inherit; }
.m-cell:hover { border-color: var(--border); background: var(--surface); }
.m-cell:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
.num .m-cell { text-align: left; direction: ltr; }
textarea.m-cell-desc { resize: none; overflow: hidden; min-height: 30px; line-height: 1.45; font-weight: 600; }
.m-date .m-cell { width: 118px; font-size: 12px; }
.m-pricing th, .m-pricing td { white-space: nowrap; }
.m-pricing td.m-desc-cell { white-space: normal; min-width: 190px; max-width: 320px; }
.m-ceiling-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); font-size: 13.5px; }

/* ============================================================
   מובייל — התאמה מלאה (טלפון)
   ============================================================ */
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .content { padding: 12px 12px 90px; }
  /* שדות בגודל 16px — מונע זום אוטומטי באייפון בזמן כתיבה */
  input, select, textarea, .input, .m-cell { font-size: 16px !important; }
  .input { height: 46px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .page-head, .between { flex-wrap: wrap; gap: 10px; }
  .page-head > div:last-child { width: 100%; }
  .page-title { font-size: 20px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex: none; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-val { font-size: 20px; }
  .money-summary-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .search-inline { width: 100%; }

  /* ---- טבלאות → כרטיסים ---- */
  .table-wrap { overflow: visible !important; }
  .table-wrap .tbl th:first-child, .table-wrap .tbl td:first-child { position: static !important; box-shadow: none !important; }
  .table-wrap table, .table-wrap tbody, .table-wrap tfoot, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap table { min-width: 0 !important; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr, .table-wrap tfoot tr {
    border: 1px solid var(--border); border-radius: 12px; margin: 0 0 10px; padding: 8px 12px;
    background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  .table-wrap tfoot tr { background: var(--surface-2); font-weight: 800; }
  .table-wrap td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 7px 0 !important; border: 0 !important; border-bottom: 1px dashed var(--border) !important;
    text-align: start !important; white-space: normal !important; background: none !important; min-height: 0;
  }
  .table-wrap tr td:last-child { border-bottom: 0 !important; }
  .table-wrap td[data-label]:not([data-label=""])::before {
    content: attr(data-label); flex: none; max-width: 45%; font-size: 12px; font-weight: 600; color: var(--text-2); text-align: start;
  }
  .table-wrap td > * { max-width: 100%; }
  .table-wrap td.m-empty { display: none; }
  .table-wrap td .input, .table-wrap td select, .table-wrap td textarea { max-width: 60%; }
  /* שורת כותרת קבוצה (ספק/קטגוריה) */
  .table-wrap tr.m-span-row { border: 0; background: none; box-shadow: none; padding: 10px 2px 4px; margin: 6px 0 4px; }
  .table-wrap tr.m-span-row td { border: 0 !important; display: block; padding: 0 !important; }
  .table-wrap .tbl-rows tbody tr { cursor: pointer; }
  /* תמחור בריף מדיה */
  .m-pricing .m-sup td { background: var(--surface-2) !important; border-radius: 10px; padding: 10px 12px !important; }
  .m-pricing tbody tr.m-line { border-inline-start: 4px solid var(--brand-blue); }
  .m-pricing td.m-desc-cell { max-width: none; display: block; }
  .m-pricing td.m-desc-cell::before { display: block; margin-bottom: 4px; }
  .m-pricing td.m-c, .m-pricing td.m-s { background: none !important; }
  .m-sup-sum { border: 0; padding: 0; width: 100%; }
  .m-bulk { position: sticky; top: 0; z-index: 5; }
  .m-grid { grid-template-columns: 1fr 1fr; }
  .m-grid .m-field:has(textarea) { grid-column: 1 / -1; }

  /* ---- חלונות קופצים: מסך מלא ---- */
  .modal-overlay { padding: 0 !important; align-items: stretch !important; }
  .modal, .modal.wide, .modal.modal-xl, .modal.wide.modal-xl { width: 100vw !important; max-width: 100vw !important; height: 100dvh; max-height: 100dvh; border-radius: 0 !important; display: flex; flex-direction: column; margin: 0; }
  .modal-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal-foot { position: sticky; bottom: 0; flex-wrap: wrap; gap: 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1 1 auto; }
  .rich-editor.re-full { inset: 0; border-radius: 0; }
  .re-area { max-height: 40vh; }

  /* ---- לוח משימות ---- */
  .board-row { display: grid !important; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px !important; }
  .board-row > div { min-width: 0; }
  .board-row .br-main { grid-column: 1 / -1; }
  .board-row .br-act { grid-column: 1 / -1; }
  .board-row .br-act .btn { width: 100%; }
  /* במובייל מציגים שוב מחלקה / עובד / דחיפות / זמן — בשורה מסודרת בתוך הכרטיס */
  .board-row .br-dept, .board-row .br-emp, .board-row .br-pri, .board-row .br-time { display: flex !important; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
  .board-row .br-time { flex-direction: row; gap: 10px; }
  .board-group-head { flex-wrap: wrap; }

  /* כלליים */
  .undo-bar { inset-inline-start: 12px; inset-inline-end: 12px; transform: none; bottom: calc(12px + env(safe-area-inset-bottom)); }
  @keyframes undoIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .toast, .toasts { inset-inline: 12px !important; }
  .info-grid, .contacts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .m-grid { grid-template-columns: 1fr; }
  .money-summary-banner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .table-wrap td { flex-wrap: wrap; overflow-wrap: anywhere; }
  .table-wrap td .flex, .table-wrap td > div { flex-wrap: wrap; }
  .table-wrap td[data-label=""] { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .tabs { max-width: 100%; width: 100%; box-sizing: border-box; }
  #content, .content { min-width: 0; max-width: 100vw; }
  /* כותרת דף משימה: עמודה אחת במקום טור צר */
  .task-hero-head { flex-wrap: wrap; gap: 10px; }
  .task-hero-head > div[style*="flex:1"] { flex: 1 1 calc(100% - 60px) !important; min-width: 0; }
  .task-hero-head > .btn { flex: 1 1 auto; }
  .task-hero-head h2 { font-size: 19px !important; }
}
@media (max-width: 640px) {
  /* פריטי גריד/פלקס לא מתרחבים מעבר לרוחב המסך */
  .grid-2 > *, .grid-3 > *, .camp-cubes > *, .camp-cube, .card, .card-pad { min-width: 0; }
  .camp-cube .tabs, .camp-tabs { max-width: 100%; }
  .tc-foot, .tc-foot .flex, .card-pad > .flex, .card-head > .flex, .ch-actions { flex-wrap: wrap; }
  .tc-foot .btn { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .coll-client-row { flex-wrap: wrap; gap: 8px 12px; border-color: var(--border); }
  .coll-client-row > * { min-width: 0; }
  .coll-client-row > div[style*="flex:1"], .coll-client-row > div[style*="flex: 1"] { flex: 1 1 60% !important; }
}

/* ---- מסך טעינה (במקום הבהוב של מסך הדמו) ---- */
.splash { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg, #f4f6fb); }
.splash-mark { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; color: #fff; font-weight: 800; }
.splash-name { font-family: Rubik, Heebo, sans-serif; font-weight: 700; font-size: 18px; color: var(--text); }
.splash-dots { display: flex; gap: 6px; }
.splash-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--brand-blue, #2563eb); opacity: .3; animation: splashDot 1s infinite ease-in-out; }
.splash-dots span:nth-child(2) { animation-delay: .15s; } .splash-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes splashDot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* מונה משימות פתוחות בתפריט ובלוח */
.nav-count { margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--brand-blue, #2563eb); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-count + .nav-badge { margin-inline-start: 4px; }
.open-count-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--blue-soft); color: var(--brand-blue-dark, #1e40af); font-size: 15px; }
.open-count-banner b { font-size: 18px; }

/* ---- ממתינות לאישורי ---- */
.nav-badge-lg { min-width: 22px; height: 22px; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 25%, transparent); }
.approvals-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; cursor: pointer; box-shadow: 0 10px 24px -12px rgba(239,68,68,.6); }
.approvals-banner b { font-size: 16px; }
.approvals-list { display: flex; flex-direction: column; gap: 10px; }
.approval-card { border-inline-start: 4px solid var(--purple); }
.approval-card.is-late { border-inline-start-color: var(--red); }
.approval-actions { flex-wrap: wrap; }
@media (max-width: 640px) { .approval-actions { width: 100%; } .approval-actions .btn { flex: 1 1 30%; min-width: 0; padding-inline: 8px; } .approval-card .between > div { min-width: 0; } }
.appr-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.appr-chip { padding: 5px 12px; border-radius: 99px; background: var(--blue-soft); color: var(--brand-blue); font-size: 13px; cursor: pointer; }
.appr-chip.has-late { background: var(--red-soft); color: var(--red); }
.appr-group { margin-bottom: 18px; scroll-margin-top: 80px; }
.appr-group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-size: 15px; }
.ptc-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.ptc-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; min-height: 52px; }
.ptc-item:hover { border-color: var(--brand-blue); background: var(--blue-soft); }
.ptc-general { border-style: dashed; }
@media (max-width: 640px) { .ptc-list { max-height: none; } }
.finish-studio { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.finish-studio input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.audit-day-head { cursor: pointer; user-select: none; }
.audit-caret { transition: transform .2s; display: inline-flex; color: var(--text-2); transform: rotate(0deg); }
.audit-day.is-open .audit-caret { transform: rotate(-90deg); }
.audit-day:not(.is-open) .card-head { border-bottom: 0; }

/* ---- קבצים ותוצרים / תגובות ---- */
.att-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; border: 2px dashed var(--border-strong); border-radius: 14px; cursor: pointer; color: var(--text-2); text-align: center; }
.att-drop.over, .att-drop:hover { border-color: var(--brand-blue); background: var(--blue-soft); color: var(--brand-blue); }
.att-drop-sm { flex-direction: row; justify-content: center; padding: 12px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.att-grid-sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.att-tile { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.att-tile.is-deliverable { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); }
.att-thumb { width: 52px; height: 52px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--text-2); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-meta { flex: 1; min-width: 0; }
.att-name { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comments { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-body { background: var(--surface-2); border-radius: 4px 14px 14px 14px; padding: 8px 12px; max-width: 85%; line-height: 1.55; overflow-wrap: anywhere; }
.comment.mine .comment-body { background: var(--blue-soft); }
.comment-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 2px; }
.mention { color: var(--brand-blue); font-weight: 700; }
.comment-box { position: relative; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.comment-box textarea { min-height: 70px; }
.mention-list { position: absolute; bottom: 100%; inset-inline-start: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12); padding: 4px; display: flex; flex-direction: column; min-width: 220px; }
.mention-list[hidden] { display: none; }
.mention-list button { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit; text-align: start; }
.mention-list button:hover { background: var(--surface-2); }
@media (max-width: 640px) { .att-grid, .att-grid-sm { grid-template-columns: 1fr; } .comment-body { max-width: 100%; } }
.usage-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.usage-bar > span { width: 130px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-err { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.perf-bottleneck ul { margin: 0; padding-inline-start: 18px; line-height: 1.9; }
.imp-summary { padding: 12px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--brand-blue-dark, #1e40af); font-weight: 600; }
@media (max-width: 640px) { .usage-bar > span { width: 90px; } }
.locked-banner { flex-wrap: wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .locked-banner { white-space: normal; } }

/* ---------- תפריט מקובץ להנהלה (קבוצות נפתחות) ---------- */
.nav-acc { display: flex; flex-direction: column; gap: 4px; }
.nav-acc-group { border-radius: 12px; transition: background .18s; }
.nav-acc-group.open { background: var(--surface-2); }
.nav-acc-head { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--text-2); transition: background .15s, color .15s; }
.nav-acc-head:hover { background: var(--surface-2); color: var(--text); }
.nav-acc-head:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.nav-acc-group.open .nav-acc-head, .nav-acc-group.has-active .nav-acc-head { color: var(--text); }
.nav-acc-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); flex-shrink: 0; }
.nav-acc-group.has-active .nav-acc-ico { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.nav-acc-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-acc-count { font-size: 11px; font-weight: 600; color: var(--text-3); }
.nav-acc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.nav-acc-group.open .nav-acc-dot { display: none; }
.nav-acc-chev { display: grid; place-items: center; color: var(--text-3); transform: rotate(180deg); transition: transform .2s ease; }
.nav-acc-group.open .nav-acc-chev { transform: rotate(90deg); }
.nav-acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-acc-group.open .nav-acc-body { grid-template-rows: 1fr; }
.nav-acc-inner { overflow: hidden; padding: 0 6px; }
.nav-acc-group.open .nav-acc-inner { padding-bottom: 6px; }
.nav-acc .nav-item { margin-inline-start: 8px; }
.nav-acc .nav-item.active::before { right: -14px; }
@media (prefers-reduced-motion: reduce) { .nav-acc-body, .nav-acc-chev { transition: none; } }

/* ---------- הודעות במסך הכניסה + קוד מייל ---------- */
.login-msg { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: var(--amber-soft); color: var(--text); border: 1px solid var(--border); }
.login-msg.is-error { background: var(--red-soft); color: #a11; border-color: #f3c0c0; }
.login-msg svg { flex-shrink: 0; margin-top: 2px; }
.otp-input { font-size: 26px; letter-spacing: 10px; text-align: center; font-weight: 700; height: 56px; }

/* ---------- קיבוץ לפי לקוח (קמפיינים / פרויקטי מדיה) ---------- */
.cg-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cg-search { position: relative; flex: 1 1 240px; max-width: 380px; }
.cg-search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.cg-search .input { padding-inline-start: 36px; width: 100%; }
.cg-meta { font-size: 12.5px; margin-inline-end: auto; }
.cg-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.cg-head { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.cg-head:hover { background: var(--surface-2); }
.cg-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cg-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 13px; flex-shrink: 0; }
.cg-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cg-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-name .muted { font-size: 12px; }
.cg-extra { font-size: 12.5px; white-space: nowrap; }
.cg-count { font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.cg-chev { color: var(--text-3); display: grid; transform: rotate(180deg); transition: transform .2s; }
.cg-group.open .cg-chev { transform: rotate(90deg); }
.cg-group.open .cg-head { border-bottom: 1px solid var(--border); }
.cg-body { padding: 12px; background: var(--bg, var(--surface-2)); }
.cg-body .camp-row { margin-bottom: 10px; }
.cg-body .camp-row:last-child { margin-bottom: 0; }
.cg-body .table-wrap { background: var(--surface); border-radius: var(--r-sm); border: 1px solid var(--border); }
@media (max-width: 640px) {
  .cg-head { padding: 11px 12px; gap: 10px; }
  .cg-extra { display: none; }
  .cg-body { padding: 8px; }
  .cg-search { max-width: none; flex-basis: 100%; }
  .cg-meta { margin-inline-end: auto; }
}

/* ---------- ספקים: קטגוריה → ספק → פריטים ---------- */
.sup-list { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.sup-row { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.sup-row.open { box-shadow: var(--shadow-sm); border-color: var(--primary-soft); }
.sup-row-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.sup-row-head:hover { background: var(--surface-2); }
.sup-row.open .sup-cat-chev { transform: rotate(90deg); }
.sup-row-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sup-row-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row-name .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row-range { font-size: 12.5px; white-space: nowrap; }
.sup-row-body { border-top: 1px solid var(--border); background: var(--surface-2); }
.sup-row-body .table-wrap { background: var(--surface); }
.sup-items tr.sup-old { opacity: .55; }
.sup-row-actions { display: flex; justify-content: flex-end; padding: 6px 10px; }
@media (max-width: 640px) {
  .sup-row-range { display: none; }
  .sup-list { padding: 6px 4px 8px; }
}

/* לוגו = רענון וחזרה למסך הראשי */
.logo-home { cursor: pointer; border-radius: 12px; transition: opacity .15s; }
.logo-home:hover { opacity: .85; }
.logo-home:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* X למחיקת קובץ/תוצר — תמיד גלוי (גם במובייל, בלי hover) */
.att-tile { position: relative; }
.att-x { flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; transition: .12s; }
.att-x:hover, .att-x:focus-visible { background: var(--red-soft); color: var(--red); border-color: #f3c0c0; }
.fs-picked { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.fs-picked:empty { display: none; }
.fs-picked-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.fs-picked-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* ---------- הצעות מחיר ---------- */
.prop-head { flex-wrap: wrap; gap: 12px; }
.prop-brand { text-align: center; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 3px solid #0e1236; }
.prop-logo { width: 260px; max-width: 70%; height: auto; display: block; margin: 0 auto 10px; border-radius: 6px; }
.prop-brand-meta { display: flex; justify-content: space-between; font-size: 13px; }
.prop-ta { resize: vertical; min-height: 64px; line-height: 1.6; }
.prop-closing { font-size: 13px; }
.prop-lines .input { min-width: 0; width: 100%; }
.prop-lines td { vertical-align: middle; }
.prop-totals { display: flex; flex-direction: column; gap: 4px; width: min(340px, 100%); margin: 12px 16px 16px auto; margin-inline-start: auto; }
.prop-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; font-size: 14px; }
.prop-totals .prop-grand { background: #0e1236; color: #fff; border-radius: 10px; font-size: 15.5px; }
@media (max-width: 640px) {
  .prop-logo { width: 200px; }
  .prop-totals { margin: 12px 0 0; width: 100%; }
}
.prop-produce { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 20px 0 8px; padding: 18px; border: 2px dashed var(--border); border-radius: var(--r-md); background: var(--surface); }
.prop-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.prop-preview-bottom { margin: 16px 0 6px; }
.prop-paper { background: #fff; max-width: 860px; margin: 0 auto; padding: 36px 40px; border-radius: 10px; box-shadow: 0 6px 28px rgba(14,18,54,.12); border: 1px solid var(--border); overflow-x: auto; }
@media (max-width: 640px) { .prop-paper { padding: 18px 14px; } .prop-paper .prop-doc .tot { width: 100%; } .prop-paper .prop-doc .top img { width: 220px; } }
.prop-pdf-curtain { position: fixed; inset: 0; z-index: 9999; background: rgba(255,255,255,.96); display: grid; place-items: center; }
.prop-pdf-curtain > div { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }

/* ---- שיוך עובד מהיר ברשימות ---- */
.asg-select { max-width: 170px; min-width: 120px; }
/* ---- ראש מחלקה: חלונית סטודיו בצד ---- */
.head-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.head-layout .hl-side { position: sticky; top: 76px; margin-top: 28px; }
.head-layout .hl-side.hl-side-top { margin-top: 0; }
.studio-panel .card-pad { max-height: calc(100vh - 170px); overflow-y: auto; }
.sp-group { margin-bottom: 12px; }
.sp-group-title { font-weight: 700; font-size: 13px; padding: 4px 10px; margin-bottom: 6px; background: var(--surface-2); border-radius: 8px; }
.sp-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 8px; }
.sp-row:hover { background: var(--blue-soft); }
.sp-main { flex: 1; min-width: 0; }
.sp-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-asg .asg-select { max-width: 130px; min-width: 100px; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.st-item { font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.sp-chev { display: none; }
@media (max-width: 1100px) {
  .head-layout { grid-template-columns: minmax(0, 1fr); }
  .head-layout .hl-side { position: static; margin-top: 8px; order: -1; }
  .studio-panel .card-pad { max-height: none; }
  .studio-panel .sp-head { cursor: pointer; }
  .studio-panel .sp-chev { display: grid; margin-inline-start: auto; color: var(--text-3); transform: rotate(180deg); transition: transform .2s; }
  .studio-panel.sp-open .sp-chev { transform: rotate(90deg); }
  .studio-panel:not(.sp-open) .card-pad { display: none; }
}
@media (max-width: 640px) { .st-grid { grid-template-columns: minmax(0, 1fr); } .sp-asg .asg-select { max-width: 110px; } }
/* ---- התאמות באנרים: אתר = שורה נפתחת ---- */
.bn-site .cg-extra { white-space: normal; max-width: 46%; text-align: end; }
.bn-body { background: var(--surface); }
.bn-body-top { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.bn-body .table-wrap { border: 0; border-radius: 0; }
@media (max-width: 640px) { .bn-body-top { padding: 8px 12px; } }
/* ---- גרירת קבצים למשימה מכל מקום במסך ---- */
body.drag-files::after { content: "שחררו כדי לצרף את הקבצים"; position: fixed; inset: 10px; z-index: 10000; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; border: 3px dashed var(--brand-blue); border-radius: 18px; background: rgba(37, 99, 235, .1); color: var(--brand-blue); font-size: 20px; font-weight: 800; pointer-events: none; }
/* ---- תגיות שלב ברצף / תת-משימה — כדי ששלב הבא או תת-משימה לא ייראו כמשימה סגורה ש"חזרה" ---- */
.stage-chip { background: var(--blue-soft); border-color: #c9d8fb; color: var(--brand-blue); font-size: 11.5px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.sub-chip { background: var(--purple-soft); border-color: #dccdf7; color: var(--purple); font-size: 11.5px; font-weight: 600; cursor: pointer; vertical-align: middle; white-space: nowrap; }
.sub-chip:hover { border-color: var(--purple); }
.sub-chip.sub-of-closed { background: #f3ecff; border: 1.5px solid var(--purple); }
.board-row.is-sub { border-inline-start: 4px solid var(--purple); }
.sub-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid #dccdf7; background: var(--purple-soft); color: var(--text); cursor: pointer; flex-wrap: wrap; }
.sub-banner.of-closed { border-color: var(--purple); }
.sub-banner-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--purple); flex-shrink: 0; }
.subs-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* ---- לוח לפי מחלקה → לפי עובד ---- */
.emp-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; padding: 0 4px; }
.emp-sum-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.emp-sum-chip b { color: var(--text); }
.emp-sum-chip.is-none { background: var(--amber-soft); border-color: #f3d999; color: #946100; }
.emp-group { margin: 0 0 12px; padding-inline-start: 12px; border-inline-start: 2px solid var(--border); }
.emp-group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 4px 8px; font-size: 13.5px; }
.emp-none-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--amber-soft); color: #946100; }
/* ---- הנהלה: מעקב קופי-קריאייטיב וסטודיו ---- */
.mt-head { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mt-col .card-head { gap: 10px; flex-wrap: wrap; }
.mt-col .card-head h3 { display: flex; align-items: center; gap: 8px; }
.mt-total { margin-inline-start: auto; font-size: 13px; color: var(--text-2); }
.mt-total b { font-size: 20px; color: var(--text); }
.mt-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mt-cat { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1.5px solid var(--border); border-top: 4px solid var(--c); background: var(--surface); text-align: center; }
.mt-cat b { font-size: 20px; color: var(--c); }
.mt-cat span { font-size: 11.5px; color: var(--text-2); }
.mt-cat:hover, .mt-cat.active { background: var(--surface-2); border-color: var(--c); }
.mt-cat:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.mt-emps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mt-list { margin-top: 10px; max-height: 340px; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 6px; }
@media (max-width: 900px) { .mt-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .mt-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* כותרת מסך במובייל: אזור הכפתורים/לשוניות לא רחב מהמסך (לשוניות נגללות לרוחב בתוכו) */
@media (max-width: 640px) { .ph-actions { max-width: 100%; min-width: 0; } }
/* ============ PPC — קמפיינים ממומנים (סטודיו טכנולוגי) ============ */
.ppc-q { border: 1.5px solid #c9d8fb; background: var(--blue-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.ppc-q-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; color: var(--brand-blue); margin-bottom: 4px; }
.ppc-yn { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ppc-yn-opt { flex: 1 1 180px; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; }
.ppc-yn-opt:has(input:checked) { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.ppc-plats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ppc-plat { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); }
.ppc-plat.on { border-color: var(--brand-blue); background: var(--blue-soft); }
.ppc-plat-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ppc-plat-budget { display: none; align-items: center; gap: 4px; }
.ppc-plat.on .ppc-plat-budget { display: flex; }
.ppc-plat-budget .input { width: 96px; padding: 6px 8px; }
.ppc-sum-line { font-size: 12.5px; margin-top: 8px; color: var(--text-2); }
.ppc-sum-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); margin-bottom: 14px; flex-wrap: wrap; color: var(--text); }
.ppc-sum-card > svg { color: var(--brand-blue); flex-shrink: 0; }
.ppc-sum-card.warn { border-color: #f3d999; background: var(--amber-soft); }
.ppc-sum-card.warn > svg { color: #946100; }
.ppc-sum-card.on { border-color: #c9d8fb; background: var(--blue-soft); }
.ppc-chip { background: var(--blue-soft); border-color: #c9d8fb; color: var(--brand-blue); font-size: 11.5px; font-weight: 600; }
.ppc-task-card { border: 1.5px solid #c9d8fb; background: linear-gradient(180deg, var(--blue-soft), var(--surface) 70%); border-radius: 16px; padding: 14px 16px; }
.ppc-tc-head { display: flex; align-items: center; gap: 10px; color: var(--brand-blue); flex-wrap: wrap; }
.ppc-tc-name { font-size: 17px; color: var(--text); }
.ppc-tc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; margin-top: 12px; font-size: 13.5px; }
.ppc-tc-grid .muted { font-size: 12px; display: block; }
.ppc-tc-notes { margin-top: 10px; font-size: 13px; color: var(--text-2); white-space: pre-line; }
.ppc-state { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.ppc-state.pending { background: var(--amber-soft); color: #946100; }
.ppc-state.active { background: var(--green-soft); color: var(--green-dark); }
.ppc-state.ended { background: var(--gray-soft); color: var(--text-2); }
.ppc-link-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ppc-link-row > span { flex: 0 0 150px; font-size: 13px; font-weight: 600; }
.ppc-link-row .input { flex: 1; min-width: 0; }
.ppc-confirm { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.ppc-kpis .ppc-kpi-ok .kpi-val { color: var(--green); }
.ppc-kpis .ppc-kpi-bad .kpi-val { color: var(--red); }
.ppc-alerts { border-color: #f3c0c0; }
.ppc-alerts .card-head h3 { color: var(--red); display: flex; align-items: center; gap: 8px; }
.ppc-alert-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.ppc-alert-row:last-child { border-bottom: 0; }
.ppc-alert-row > svg { color: var(--red); flex-shrink: 0; }
.ppc-alert-row.missed > svg { color: #946100; }
.ppc-list { display: flex; flex-direction: column; gap: 12px; }
.ppc-card { padding: 0; overflow: hidden; }
.ppc-card.ppc-ended { opacity: .92; }
.ppc-head { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ppc-name { font-weight: 800; font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ppc-name > svg { color: var(--brand-blue); }
.ppc-head-side { display: flex; gap: 10px; }
.ppc-budget, .ppc-comp { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; min-width: 76px; }
.ppc-budget b, .ppc-comp b { font-size: 16px; }
.ppc-comp.ok b { color: var(--green); } .ppc-comp.mid b { color: #b07500; } .ppc-comp.bad b { color: var(--red); }
.ppc-pending-note { padding: 10px 16px; background: var(--amber-soft); color: #946100; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ppc-plat-rows { padding: 4px 16px; }
.ppc-plat-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(220px, auto); align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ppc-plat-row:last-child { border-bottom: 0; }
.ppc-pr-today { justify-self: end; text-align: end; }
.ppc-strip { display: flex; gap: 4px; }
.ppc-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.ppc-dot.done { background: var(--green); border-color: var(--green); }
.ppc-dot.miss { background: var(--red); border-color: var(--red); }
.ppc-dot.today { background: var(--surface); border: 2px dashed #e0a800; }
.ppc-dot.na { opacity: .45; }
.ppc-done-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); font-size: 12.5px; font-weight: 600; flex-wrap: wrap; }
.ppc-mini { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 7px; font-size: 11.5px; color: var(--green-dark); background: rgba(255, 255, 255, .6); }
.ppc-mini:hover { background: #fff; }
.ppc-mini:focus-visible { outline: 2px solid var(--primary); }
.ppc-note { font-size: 12px; margin-top: 3px; max-width: 280px; }
.ppc-wait { font-size: 12.5px; color: var(--text-2); }
.ppc-wait.late { color: var(--red); font-weight: 700; }
.btn-danger-soft { background: var(--red-soft); color: var(--red); border: 1px solid #f3c0c0; }
.btn-danger-soft:hover { background: #fde2e2; }
.ppc-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface-2); flex-wrap: wrap; }
.ppc-owner { max-width: 170px; padding: 5px 8px; }
.ppc-ext-row { font-size: 12.5px; padding: 4px 0; color: var(--text-2); }
.ppc-h-ok { color: var(--green-dark); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ppc-h-miss { color: var(--red); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ppc-today .card-head h3 { display: flex; align-items: center; gap: 8px; color: var(--brand-blue); }
.ppc-left { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: #946100; }
.ppc-all-done { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--green); }
.ppc-today-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ppc-today-name { flex: 1 1 200px; min-width: 0; }
.ppc-today-plats { display: flex; flex-direction: column; gap: 6px; flex: 2 1 300px; }
.ppc-today-plat { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
@media (max-width: 760px) {
  .ppc-plat-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ppc-pr-today { grid-column: 1 / -1; justify-self: stretch; text-align: start; }
  .ppc-pr-today .ppc-do { width: 100%; justify-content: center; }
  .ppc-head-side { width: 100%; }
  .ppc-link-row { flex-wrap: wrap; }
  .ppc-link-row > span { flex-basis: 100%; }
}
/* ---- משימה שהוחזרה לתיקון: בקשת התיקון בולטת ומעוצבת ---- */
.fix-box { margin-top: 8px; border: 1.5px solid #f3c0c0; background: var(--red-soft); border-radius: 12px; padding: 10px 14px; color: var(--text); }
.fix-box-full { border-width: 2px; padding: 14px 18px; }
.fix-box-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--red); font-size: 14px; }
.fix-box-head .muted { font-size: 12px; font-weight: 400; }
.fix-box-label { font-size: 12px; color: var(--text-2); margin: 6px 0 2px; }
.rich-text.rt-fix, .rich-text.rt-rev { font-size: 14px; line-height: 1.65; }
.rich-text.rt-fix p, .rich-text.rt-rev p { margin: 0 0 2px; }
