/* Shifts & Chill — עיצוב משותף לממשק עובד ומנהל */
:root {
  --bg1: #f6f1ff;
  --bg2: #fdeff3;
  --card: #ffffff;
  --ink: #1f1b3a;
  --ink2: #4b4870;
  --muted: #8b88a8;
  --line: #ece8f7;
  --line2: #e0dbf2;
  --primary: #5b3fd6;
  --primary-2: #7c5cff;
  --primary-soft: #eee9ff;
  --ok: #10b981;
  --ok-soft: #dcfaf0;
  --warn: #f59e0b;
  --warn-soft: #fff4dc;
  --bad: #ef4444;
  --bad-soft: #ffe4e4;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 6px 24px rgba(76, 52, 160, .08), 0 1px 3px rgba(76, 52, 160, .06);
  --shadow-l: 0 20px 60px rgba(40, 20, 110, .22);

  /* צבעי משמרות */
  --teal: #14b8a6; --teal-soft: #dff7f3;
  --amber: #f5a524; --amber-soft: #fff4dd;
  --coral: #f2706b; --coral-soft: #ffe9e6;
  --violet: #6d4cf5; --violet-soft: #ece7ff;
  --sky: #0ea5e9; --sky-soft: #e0f3fd;
  --pink: #ec4899; --pink-soft: #fde7f3;
  --slate: #64748b; --slate-soft: #eef1f5;
  --green: #22c55e; --green-soft: #e3f9ea;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Rubik', 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg1) 0%, #fbf7ff 45%, var(--bg2) 100%) fixed;
  min-height: 100vh;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.mt2 { margin-top: 20px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 28px; height: 28px; }
svg.i.xl { width: 40px; height: 40px; }

/* ---------- כרטיסים וכפתורים ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-weight: 500;
  transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; box-shadow: 0 6px 18px rgba(91, 63, 214, .3); }
.btn.ghost { background: transparent; color: var(--ink2); }
.btn.ghost:hover { background: rgba(91, 63, 214, .06); }
.btn.white { background: #fff; color: var(--ink2); box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 1px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: #c62828; }
.btn.ok { background: var(--ok-soft); color: #047857; }
.btn.lg { padding: 14px 20px; font-size: 17px; border-radius: 16px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; gap: 5px; }
.btn.icon { padding: 8px; border-radius: 12px; }
.btn.block { width: 100%; }
.iconbtn { border: 0; background: transparent; padding: 6px; border-radius: 10px; cursor: pointer; color: var(--ink2); display: inline-flex; }
.iconbtn:hover { background: rgba(91, 63, 214, .08); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; background: var(--primary-soft); color: var(--primary); font-weight: 500; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: #047857; }
.chip.warn { background: var(--warn-soft); color: #b45309; }
.chip.bad { background: var(--bad-soft); color: #b91c1c; }
.chip.gray { background: #f1f0f7; color: var(--ink2); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }

input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input[type=time], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: #fcfbff; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
input[type=time], input[type=date], input.time24 { direction: ltr; text-align: right; }
input.time24 { max-width: 110px; font-variant-numeric: tabular-nums; }
table.tbl select { min-width: 84px; }
input[type=number] { direction: ltr; text-align: right; }
textarea { resize: vertical; min-height: 70px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink2); font-weight: 500; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.seg { display: inline-flex; background: #f1eefc; border-radius: 14px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 11px; cursor: pointer; color: var(--ink2); font-weight: 500; }
.seg button.on { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(60, 40, 140, .12); }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 13px; flex: none; box-shadow: 0 0 0 2px #fff; }
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }

/* ---------- טוסט ומודל ---------- */
#toasts { position: fixed; z-index: 100; inset-inline: 0; bottom: 90px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: #23203f; color: #fff; padding: 11px 18px; border-radius: 14px; box-shadow: var(--shadow-l); max-width: min(92vw, 480px); white-space: pre-line; animation: pop .2s ease-out; pointer-events: auto; font-size: 14px; }
.toast.ok { background: #065f46; }
.toast.bad { background: #991b1b; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.overlay { position: fixed; inset: 0; background: rgba(28, 18, 70, .35); backdrop-filter: blur(2px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 22px; box-shadow: var(--shadow-l); width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.wide { width: min(860px, 100%); }
.modal-head { padding: 16px 20px 8px; display: flex; align-items: center; gap: 10px; }
.modal-head h3 { font-size: 18px; flex: 1; }
.modal-body { padding: 8px 20px 16px; overflow: auto; }
.modal-foot { padding: 12px 20px 16px; display: flex; gap: 10px; justify-content: flex-start; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 640px) {
  .overlay.sheet { align-items: flex-end; padding: 0; }
  .overlay.sheet .modal { border-radius: 24px 24px 0 0; width: 100%; max-height: 88vh; animation: up .22s ease-out; }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } }
}

/* ---------- סמלי משמרת ---------- */
.shift-head { border-radius: 14px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; position: relative; }
.shift-head .nm { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.shift-head .hr { font-size: 10.5px; color: var(--ink2); direction: ltr; }
.c-teal { --c: var(--teal); --cs: var(--teal-soft); }
.c-amber { --c: var(--amber); --cs: var(--amber-soft); }
.c-coral { --c: var(--coral); --cs: var(--coral-soft); }
.c-violet { --c: var(--violet); --cs: var(--violet-soft); }
.c-sky { --c: var(--sky); --cs: var(--sky-soft); }
.c-pink { --c: var(--pink); --cs: var(--pink-soft); }
.c-slate { --c: var(--slate); --cs: var(--slate-soft); }
.c-green { --c: var(--green); --cs: var(--green-soft); }
.shift-head { background: var(--cs); }
.shift-head svg.i { color: var(--c); width: 26px; height: 26px; }
.shift-ico { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--cs); color: var(--c); flex: none; }

/* ---------- רשת אילוצים (עובד) ---------- */
.cgrid { display: grid; gap: 6px; align-items: stretch; }
.cgrid .dayc { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 2px; }
.cgrid .dayc b { font-size: 16px; }
.cgrid .dayc span { font-size: 11px; color: var(--muted); }
.cgrid .cell { background: #faf9fe; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.cgrid .cell.tap { cursor: pointer; }
.cgrid .cell.tap:hover { background: #f4f1ff; }
.cgrid .cell.off { background: repeating-linear-gradient(-45deg, #f6f5fa, #f6f5fa 6px, #fbfafd 6px, #fbfafd 12px); color: #c8c5d8; }
.cgrid .cell.vac { background: var(--sky-soft); color: var(--sky); font-size: 11px; }
.circle { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #d9d5ea; display: flex; align-items: center; justify-content: center; transition: transform .12s, background .12s; background: #fff; }
.cell.yes .circle { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 40%, transparent); }
.cell.low .circle { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.cell.low .circle::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); }
.cell .circle svg.i { width: 17px; height: 17px; stroke-width: 3; }
.cell .vlabel { font-size: 10px; margin-top: 3px; color: var(--ink2); font-weight: 500; line-height: 1.1; text-align: center; }
.cell.pressing .circle { transform: scale(1.18); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink2); }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-inline-end: 4px; }

/* ---------- באנר ---------- */
.hero { border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: center; overflow: hidden; position: relative; }
.hero.pink { background: linear-gradient(120deg, #ffeef3, #fde6f0 60%, #f6e9ff); }
.hero.beach { background: linear-gradient(120deg, #dff6fb, #e8f4ff 55%, #fff4e0); }
.hero.violet { background: linear-gradient(120deg, #efe9ff, #f6efff 60%, #ffeef5); }
.hero h2 { font-size: 19px; }
.hero p { margin: 4px 0 0; color: var(--ink2); font-size: 13.5px; line-height: 1.45; }
.hero .art { font-size: 46px; line-height: 1; flex: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.08)); }
.bignum { font-size: 40px; font-weight: 700; color: var(--teal); line-height: 1; }

/* ---------- ממשק עובד ---------- */
.eapp { max-width: 560px; margin: 0 auto; padding: 12px 14px 100px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 6px 2px 12px; }
.topbar h1 { font-size: 19px; flex: 1; }
.weeknav { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.weeknav .lbl { font-weight: 600; min-width: 170px; text-align: center; direction: ltr; }
.tabbar { position: fixed; bottom: 0; inset-inline: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
.tabbar button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); cursor: pointer; padding: 4px 12px; border-radius: 12px; position: relative; }
.tabbar button.on { color: var(--primary); }
.tabbar button.on svg.i { stroke-width: 2.4; }
.tabbar .badge { position: absolute; top: 0; inset-inline-end: 6px; }
.actions-bar { display: flex; gap: 10px; margin-top: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: 14px; padding: 10px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat b { font-size: 20px; color: var(--primary); }
.stat span { font-size: 12px; color: var(--ink2); }
.shift-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.shift-item + .shift-item { margin-top: 8px; }
.shift-item .day { width: 42px; text-align: center; flex: none; }
.shift-item .day b { display: block; font-size: 16px; }
.shift-item .day span { font-size: 11.5px; color: var(--muted); }
.shift-item.vac { background: linear-gradient(90deg, #eef4ff, #f4f0ff); }
.shift-item.off { opacity: .55; box-shadow: none; background: rgba(255,255,255,.6); }
.limits { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }

/* לוח שנה */
.cal { user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 0; }
.cal-grid .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-day { height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; cursor: pointer; font-size: 14px; }
.cal-day .n { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.cal-day.past { color: #c4c1d6; cursor: default; }
.cal-day.today .n { box-shadow: inset 0 0 0 2px var(--primary-2); }
.cal-day.inrange::before { content: ''; position: absolute; inset: 4px 0; background: var(--teal-soft); }
.cal-day.edge .n { background: var(--teal); color: #fff; font-weight: 600; }
.cal-day.rs::before { inset-inline-start: 50%; }
.cal-day.re::before { inset-inline-end: 50%; }
.cal-day.conflict .n { background: var(--bad-soft); color: #b91c1c; }
.cal-day.mine .n { background: var(--violet-soft); color: var(--violet); font-weight: 600; }
.cal-day.minepending .n { background: var(--warn-soft); color: #b45309; }
.cal-day.blackout .n { text-decoration: line-through; color: #bbb; }
.cal-day .dots { position: absolute; bottom: 1px; display: flex; gap: 2px; z-index: 2; }
.cal-day .dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.vac-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vac-item:last-child { border-bottom: 0; }
.status { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 500; }
.status.pending { background: var(--warn-soft); color: #b45309; }
.status.approved { background: var(--ok-soft); color: #047857; }
.status.rejected { background: var(--bad-soft); color: #b91c1c; }
.status.cancelled { background: #f1f0f7; color: var(--muted); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.notice { border-radius: 14px; padding: 10px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.notice.warn { background: var(--warn-soft); color: #92400e; }
.notice.bad { background: var(--bad-soft); color: #991b1b; }
.notice.ok { background: var(--ok-soft); color: #065f46; }
.notice.info { background: var(--primary-soft); color: var(--primary); }

/* מסך כניסה */
.login { max-width: 420px; margin: 8vh auto; padding: 16px; }
.login .logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; }
.logo-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-2), #b06bff); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(124, 92, 255, .35); }
.user-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.user-pick button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: start; }
.user-pick button:hover { border-color: var(--primary-2); }

/* דסקטופ — ממשק עובד */
@media (min-width: 900px) {
  .eapp { max-width: 1060px; padding-top: 18px; }
  .eapp.wide-grid .two { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
  .tabbar { position: sticky; top: 0; bottom: auto; justify-content: center; gap: 6px; border: 0; background: rgba(255,255,255,.75); border-radius: 18px; box-shadow: var(--shadow); margin: 0 auto 14px; max-width: 1060px; padding: 6px; }
  .tabbar button { flex-direction: row; font-size: 14px; gap: 8px; padding: 8px 18px; }
  .tabbar button.on { background: var(--primary-soft); }
  #toasts { bottom: 30px; }
  .cgrid .cell { min-height: 60px; }
}

/* ---------- ממשק מנהל ---------- */
.admin { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: rgba(255,255,255,.7); backdrop-filter: blur(10px); border-inline-end: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side .brand b { font-size: 16px; }
.side .brand small { display: block; color: var(--muted); font-size: 11.5px; }
.nav-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--ink2); font-weight: 500; text-align: start; width: 100%; }
.nav-btn:hover { background: rgba(91, 63, 214, .06); }
.nav-btn.on { background: var(--primary-soft); color: var(--primary); }
.nav-btn .badge { margin-inline-start: auto; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.main { padding: 18px 22px 40px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h2 { font-size: 22px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mobile-top { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 260px; z-index: 40; transform: translateX(110%); transition: transform .2s; background: #fff; box-shadow: var(--shadow-l); }
  .side.open { transform: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; position: sticky; top: 0; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); z-index: 20; }
  .main { padding: 12px; }
}

/* לוח שיבוץ */
.sched-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .sched-wrap { grid-template-columns: 1fr; } }
.sched-scroll { overflow-x: auto; border-radius: var(--radius); }
.sched { display: grid; gap: 6px; min-width: 640px; }
.sched .corner { display: flex; align-items: end; justify-content: center; padding-bottom: 6px; }
.sched .shift-head { cursor: pointer; padding: 10px 4px 8px; }
.sched .shift-head:hover { outline: 2px solid var(--c); }
.sched .shift-head .need { position: absolute; top: 5px; inset-inline-start: 7px; font-size: 10.5px; color: var(--ink2); }
.sched .dayh { background: #fff; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 2px; box-shadow: var(--shadow); }
.sched .dayh b { font-size: 17px; }
.sched .dayh span { font-size: 11.5px; color: var(--muted); }
.sched .dayh.weekend { background: #fbf8ff; }
.scell { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-height: 76px; display: flex; flex-direction: column; gap: 4px; position: relative; transition: box-shadow .12s, background .12s; }
.scell.off { background: repeating-linear-gradient(-45deg, #f3f1fa, #f3f1fa 6px, #faf9fd 6px, #faf9fd 12px); box-shadow: none; }
.scell.closed { background: #f4f3f8; box-shadow: none; }
.scell.short { box-shadow: inset 0 0 0 2px #ffd3d3, var(--shadow); }
.scell.full { box-shadow: inset 0 0 0 2px #c9f1e0, var(--shadow); }
.scell.drop-yes { background: #e3faef; box-shadow: inset 0 0 0 2px var(--ok); }
.scell.drop-low { background: #fff6e0; box-shadow: inset 0 0 0 2px var(--warn); }
.scell.drop-no { opacity: .45; }
.scell.drop-hover { transform: scale(1.02); }
.scell .meta { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); }
.scell .meta .hrs { direction: ltr; background: var(--cs); color: var(--ink2); padding: 1px 6px; border-radius: 6px; }
.scell .note { font-size: 11px; background: #fffbe8; color: #8a6200; border-radius: 8px; padding: 3px 6px; line-height: 1.3; }
.scell .addb { position: absolute; bottom: 5px; inset-inline-start: 5px; opacity: 0; transition: opacity .15s; }
.scell:hover .addb { opacity: 1; }
.pchip { display: flex; align-items: center; gap: 5px; background: #f6f4fd; border-radius: 10px; padding: 3px 5px 3px 4px; font-size: 12.5px; cursor: grab; position: relative; border: 1px solid transparent; }
.pchip:hover { border-color: var(--line2); }
.pchip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pchip .sub { font-size: 10px; color: var(--ink2); direction: ltr; }
.pchip .x { opacity: 0; border: 0; background: transparent; cursor: pointer; padding: 0 2px; color: var(--muted); line-height: 1; }
.pchip:hover .x { opacity: 1; }
.pchip.low { background: #fff6e2; }
.pchip.warn { background: #ffecec; }
.pchip.manual { background: #eef1f5; }
.pchip.guest { background: #f3ecff; }
.pchip .flag { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); flex: none; }
.cands { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; padding-top: 3px; border-top: 1px dashed var(--line2); }
.cand { font-size: 10.5px; padding: 2px 6px; border-radius: 7px; cursor: pointer; border: 0; background: var(--ok-soft); color: #047857; }
.cand.low { background: var(--warn-soft); color: #b45309; }
.cand.busy { background: #f1f0f7; color: #a5a2bd; text-decoration: line-through; }
.cand:hover { filter: brightness(.95); }

.roster { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.remp { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 12px; cursor: grab; user-select: none; }
.remp:hover { background: #f6f4fd; }
.remp .nm { flex: 1; font-size: 13.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remp .cnt { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 8px; background: #f1f0f7; color: var(--ink2); direction: ltr; }
.remp .cnt.ok { background: var(--ok-soft); color: #047857; }
.remp .cnt.over { background: var(--bad-soft); color: #b91c1c; }
.remp .cnt.under { background: var(--warn-soft); color: #b45309; }
.remp.sel { background: var(--primary-soft); }
.sub-h { font-size: 12px; color: var(--muted); font-weight: 600; margin: 12px 4px 4px; }
.report { font-size: 13px; }
.report li { margin: 3px 0; }

/* טבלאות */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.tbl th { text-align: start; font-weight: 600; color: var(--ink2); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fbfaff; position: sticky; top: 0; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:hover td { background: #fcfbff; }
.tbl-wrap { overflow: auto; }

/* מפת חום אילוצים */
.heat { display: grid; gap: 5px; min-width: 560px; }
.hcell { border-radius: 12px; padding: 6px; min-height: 58px; font-size: 11.5px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 3px; }
.hcell .num { font-weight: 700; font-size: 15px; }
.hcell.off { background: #f4f3f8; box-shadow: none; }
.hcell .names { color: var(--ink2); line-height: 1.35; }
.hcell .names .l { color: #b45309; }

/* גאנט חופשות */
.gantt { display: grid; font-size: 12px; min-width: 760px; }
.gantt .gh { text-align: center; padding: 4px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.gantt .gh.we { background: #faf8ff; }
.gantt .gh.td { color: var(--primary); font-weight: 700; }
.gantt .gn { padding: 6px 8px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; inset-inline-start: 0; background: #fff; z-index: 1; }
.gantt .gc { border-bottom: 1px solid var(--line); position: relative; height: 34px; }
.gantt .gc.we { background: #faf8ff; }
.gantt .bar { position: absolute; inset-block: 7px; inset-inline: 1px; border-radius: 0; }
.gantt .bar.s { border-start-start-radius: 8px; border-end-start-radius: 8px; inset-inline-start: 3px; }
.gantt .bar.e { border-start-end-radius: 8px; border-end-end-radius: 8px; inset-inline-end: 3px; }
.gantt .bar.pending { background: repeating-linear-gradient(-45deg, var(--warn), var(--warn) 4px, #ffd27a 4px, #ffd27a 8px) !important; }
.gantt .bar.conflict { box-shadow: 0 0 0 2px var(--bad); }

.req-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; gap: 12px; align-items: flex-start; }
.req-card + .req-card { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.copybox { display: flex; gap: 6px; }
.copybox input { direction: ltr; font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* הדפסה */
@media print {
  .side, .mobile-top, .roster, .toolbar, .addb, .cands, .x, .no-print, .tabbar { display: none !important; }
  .admin { display: block; }
  body { background: #fff; }
  .scell, .dayh { box-shadow: none !important; border: 1px solid #ddd; }
  .sched-wrap { display: block; }
  .main { padding: 0; }
}
div.ltr { display: block; text-align: right; }
