/* WOLF HR · ניהול לידים. הצבעים והגופן מהאתר של WOLF HR Solutions */
:root {
  --purple: #6A6EB4;
  --purple-dk: #4E5299;
  --purple-ink: #2B2D5C;
  --teal: #00AAAD;
  --teal-dk: #008A8D;
  --blue: #0090D6;
  --lav: #F5F2FF;
  --sky: #F2F6FD;
  --bg: #F7F6FC;
  --card: #FFFFFF;
  --ink: #23254A;
  --muted: #6E7194;
  --faint: #9A9CB8;
  --line: #E6E4F3;
  --line-2: #F0EEF8;
  --red: #C8414B;
  --red-bg: #FDECEE;
  --amber: #B26A00;
  --amber-bg: #FFF4E0;
  --green: #1E8A4C;
  --shadow: 0 1px 2px rgba(43, 45, 92, .06), 0 4px 16px rgba(43, 45, 92, .06);
  --shadow-lg: 0 12px 48px rgba(43, 45, 92, .22);
  --r: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.loading { min-height: 70vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- כותרת ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1440px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 40px; width: auto; display: block; }
.brand .ttl { border-inline-start: 1px solid var(--line); padding-inline-start: 14px; }
.brand h1 { margin: 0; font-size: 18px; font-weight: 700; color: var(--purple-ink); letter-spacing: -.01em; white-space: nowrap; }
.brand .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.top .grow { flex: 1; }
.who { font-size: 12px; color: var(--purple-dk); background: var(--lav); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line); background: #fff; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { border-color: #D3D0EA; background: #FCFBFF; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .fcard:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .nd:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 170, 173, .28); }
.btn.primary:hover { background: var(--teal-dk); border-color: var(--teal-dk); }
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.purple:hover { background: var(--purple-dk); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--lav); }
.btn.danger { color: var(--red); border-color: #F3CDD1; }
.btn.danger:hover { background: var(--red-bg); }
.btn.icon { width: 40px; padding: 0; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; z-index: 40; display: none;
}
.menu.open { display: block; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; text-align: start; }
.menu button:hover { background: var(--lav); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 4px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 22px 24px 60px; }

/* ---------- על הפרק: היום ---------- */
.focus { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fcard {
  text-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px;
  box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.fcard:hover { border-color: #D6D3EE; transform: translateY(-1px); }
.fcard .lbl { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.fcard .num { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--purple-ink); grid-row: span 2; }
.fcard .hint { font-size: 12px; color: var(--faint); }
.fcard.today .num { color: var(--teal-dk); }
.fcard.late .num { color: var(--red); }
.fcard.nodate .num { color: var(--amber); }
.fcard.week .num { color: var(--blue); }
.fcard.zero .num { color: #C9C8DA; }
.fcard.on { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(106, 110, 180, .16); }

/* ---------- חודשים וסינון ---------- */
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.months { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; flex: 1 1 420px; min-width: 0; }
.months::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.chip:hover { border-color: #D3D0EA; }
.chip .c { font-size: 12px; color: var(--muted); background: var(--line-2); border-radius: 99px; padding: 1px 7px; font-weight: 600; }
.chip.on { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip.on .c { background: rgba(255, 255, 255, .22); color: #fff; }
.chip.lens { background: var(--purple-ink); border-color: var(--purple-ink); color: #fff; }
.months.dim .chip:not(.lens) { opacity: .45; }

.tools { display: flex; gap: 8px; align-items: center; }
.search { position: relative; }
.search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { height: 38px; width: 230px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 36px 0 12px; }
.sel { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 10px; max-width: 190px; }

/* ---------- חודש ---------- */
.month { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.m-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px 12px; }
.m-head h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--purple-ink); }
.m-head .cnt { font-size: 13px; color: var(--muted); }
.m-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.m-stats span { font-size: 12px; border-radius: 99px; padding: 2px 9px; font-weight: 500; }
.m-bar { display: flex; height: 5px; margin: 0 20px 12px; border-radius: 99px; overflow: hidden; background: var(--line-2); gap: 2px; }
.m-bar i { display: block; height: 100%; }

.tbl-wrap { overflow-x: auto; border-top: 1px solid var(--line-2); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 9px 10px; background: #FBFAFE;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: relative; user-select: none;
}
.tbl th[data-sort] { cursor: pointer; }
.tbl th[data-sort]:hover { color: var(--purple-dk); }
.tbl th .ar { font-size: 10px; margin-inline-start: 3px; color: var(--purple); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: #FAF9FF; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .c-num { color: var(--faint); font-variant-numeric: tabular-nums; width: 44px; font-size: 13px; }
.tbl .c-first { font-weight: 600; }
.tbl .c-last { font-weight: 600; }
.tbl .c-phone { white-space: nowrap; }
.tbl .c-phone a, .tbl .c-mail a { color: var(--ink); }
.tbl .c-phone a:hover, .tbl .c-mail a:hover { color: var(--blue); text-decoration: underline; }
.tbl .c-mail { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .c-co { max-width: 170px; }
.tbl .c-role { max-width: 150px; color: var(--muted); }
.tbl .c-date { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl .c-src { white-space: nowrap; color: var(--muted); }
.tbl .c-notes { max-width: 240px; color: var(--muted); font-size: 13px; }
.tbl .c-notes div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tbl .c-next { white-space: nowrap; }
.dash { color: #CFCDE0; }

/* ---------- סטטוסים ---------- */
.st {
  appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; padding: 4px 11px 4px 28px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-opacity='.45' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 9px center;
}
.pill { display: inline-block; border-radius: 99px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.s-n1 { background-color: #FFF6E3; color: #8A5A00; }
.s-n2 { background-color: #FFEDCB; color: #8A5000; }
.s-n3 { background-color: #FFE0B0; color: #864400; }
.s-n4 { background-color: #FFD094; color: #773500; }
.s-wait { background-color: #E5F3FB; color: #0A6898; }
.s-set { background-color: #DCF4F4; color: #00777A; }
.s-after { background-color: #ECEBFA; color: #4E5299; }
.s-fu { background-color: #E8E0FA; color: #5A3EA6; }
.s-won { background-color: #DCF2E4; color: #1E7A43; }
.s-lost { background-color: #FBE5E7; color: #A8343E; }
.s-irr { background-color: #EEEEF3; color: #6C6F82; }
.b-n1 { background: #FFD37A; } .b-n2 { background: #FFC062; } .b-n3 { background: #FFAA45; } .b-n4 { background: #F38F2A; }
.b-wait { background: #6CC1EA; } .b-set { background: var(--teal); } .b-after { background: var(--purple); } .b-fu { background: #8B6FD6; }
.b-won { background: #2FA765; } .b-lost { background: #E06A73; } .b-irr { background: #C5C6D3; }

/* ---------- דייט הבא ---------- */
.nd {
  border: 1px solid transparent; background: none; border-radius: 9px; padding: 4px 8px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.nd:hover { border-color: var(--line); background: #fff; }
.nd svg.i { width: 15px; height: 15px; color: var(--faint); }
.nd.today { background: #DCF4F4; color: #00686B; font-weight: 600; }
.nd.today svg.i { color: #00686B; }
.nd.late { background: var(--red-bg); color: var(--red); font-weight: 600; }
.nd.late svg.i { color: var(--red); }
.nd.past { color: var(--faint); }
.nd.missing { color: var(--amber); font-size: 12.5px; }
.nd.missing svg.i { color: var(--amber); }
.nd.none { color: #C9C8DA; }

/* ---------- כרטיסים בנייד ---------- */
.cards { display: none; }
.card { padding: 13px 16px; border-top: 1px solid var(--line-2); display: grid; gap: 6px; cursor: pointer; }
.card:active { background: #FAF9FF; }
.card .r1 { display: flex; align-items: center; gap: 8px; }
.card .nm { font-weight: 600; font-size: 15.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .num { color: var(--faint); font-size: 12px; }
.card .r2 { color: var(--muted); font-size: 13.5px; }
.card .r3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .act { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--sky); color: var(--blue); flex: none; }
.card .act.wa { background: #E7F8EE; color: #179C52; }

.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); background: #fff; border: 1px dashed #D9D6EE; border-radius: 18px; }
.empty-state h3 { margin: 0 0 6px; color: var(--purple-ink); font-size: 19px; }
.empty-state p { margin: 0 0 18px; }
.empty-state .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- חלון ---------- */
.ovl {
  position: fixed; inset: 0; z-index: 60; background: rgba(35, 37, 74, .38); display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto; animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.dlg { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 680px; animation: pop .18s ease-out; }
.dlg.wide { max-width: 860px; }
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px 6px; }
.dlg-h h3 { margin: 0; font-size: 19px; color: var(--purple-ink); flex: 1; min-width: 0; }
.dlg-h .num { color: var(--faint); font-weight: 500; font-size: 15px; }
.dlg-b { padding: 10px 22px 6px; }
.dlg-f { display: flex; gap: 10px; align-items: center; padding: 14px 22px 20px; flex-wrap: wrap; }
.dlg-f .sp { flex: 1; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 14px; }
.quick a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--sky); color: var(--blue); font-size: 13.5px; font-weight: 500; }
.quick a.wa { background: #E7F8EE; color: #179C52; }
.quick a:hover { filter: brightness(.97); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fld { display: grid; gap: 5px; min-width: 0; }
.fld.full { grid-column: 1 / -1; }
.fld > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.fld input, .fld select, .fld textarea {
  height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.fld textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(106, 110, 180, .15); outline: none; }
.fld input[type=tel], .fld input[type=email] { direction: ltr; text-align: right; }
.next-box { background: var(--lav); border-radius: 14px; padding: 12px 14px; display: grid; gap: 9px; }
.next-box .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.next-box .row .fld { flex: 1 1 150px; }
.next-box .row .fld.t { flex: 0 1 130px; }
.next-box .q { display: flex; gap: 6px; flex-wrap: wrap; }
.next-box .q button { height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid #DCD7F4; background: #fff; font-size: 13px; color: var(--purple-dk); }
.next-box .q button:hover { border-color: var(--purple); }
.next-box .hint { font-size: 12.5px; color: var(--muted); }
.next-box .hint.warn { color: var(--amber); }

.hist { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.hist summary { cursor: pointer; color: var(--purple-dk); font-weight: 500; font-size: 14px; }
.hist ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.hist li { font-size: 13px; color: var(--muted); }
.hist li b { color: var(--ink); font-weight: 500; }
.hist .when { color: var(--faint); font-size: 12px; margin-inline-end: 6px; }
.meta { font-size: 12px; color: var(--faint); }

/* ---------- יומן, ייבוא, קישורים ---------- */
.steps { display: grid; gap: 12px; }
.prov { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.prov h4 { margin: 0; font-size: 15.5px; color: var(--purple-ink); display: flex; align-items: center; gap: 8px; }
.prov h4 .tag { font-size: 11.5px; font-weight: 600; color: var(--teal-dk); background: #DCF4F4; border-radius: 99px; padding: 1px 8px; }
.prov ol { margin: 0; padding-inline-start: 20px; color: var(--muted); font-size: 13.5px; display: grid; gap: 3px; }
.prov .row { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--lav); border-radius: 12px; padding: 8px 8px 8px 12px; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; font-size: 12.5px; color: var(--purple-dk); }
.note { font-size: 13px; color: var(--muted); background: var(--sky); border-radius: 12px; padding: 10px 14px; }
.lead-p { margin: 0 0 14px; color: var(--muted); }
.imp textarea { width: 100%; min-height: 150px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; direction: rtl; font-size: 13px; }
.imp .cols { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.imp .cols b { color: var(--purple-dk); font-weight: 500; }
.prev { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; max-height: 260px; }
.prev table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.prev th, .prev td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; text-align: start; }
.prev th { background: #FBFAFE; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
.prev td.bad { color: var(--red); }
.imp-sum { font-size: 13.5px; margin-top: 8px; color: var(--ink); }
.imp-sum .w { color: var(--amber); }

/* ---------- כניסה ---------- */
.gate { min-height: 86vh; display: grid; place-items: center; padding: 24px; }
.gate .box { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 34px 30px; max-width: 420px; text-align: center; }
.gate img { height: 64px; margin-bottom: 14px; }
.gate h2 { margin: 0 0 8px; color: var(--purple-ink); }
.gate p { margin: 0; color: var(--muted); }

#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--purple-ink); color: #fff; padding: 10px 14px 10px 18px;
  border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 90; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast.err { background: var(--red); }
#toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 8px; height: 30px; padding: 0 10px; font-weight: 600; }
#toast button:hover { background: rgba(255, 255, 255, .26); }

.foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 30px; }

/* ---------- מסכים צרים ---------- */
@media (max-width: 1180px) {
  .tbl .c-role, .tbl th.c-role, .tbl .c-src, .tbl th.c-src { display: none; }
}
@media (max-width: 980px) {
  .focus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search input { width: 180px; }
  .brand .sub { display: none; }
}
@media (max-width: 820px) {
  .top-in { padding: 8px 16px; gap: 10px; }
  .brand img { height: 32px; }
  .brand .ttl { padding-inline-start: 10px; }
  .brand h1 { font-size: 16px; }
  .who { display: none; }
  .top .btn .lbl { display: none; }
  .top .btn.primary .lbl { display: inline; }
  .wrap { padding: 16px 16px 50px; }
  .focus { gap: 10px; }
  .fcard { padding: 11px 13px; }
  .fcard .num { font-size: 25px; }
  .fcard .hint { display: none; }
  .tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .tbl-wrap { display: none; }
  .cards { display: block; }
  .m-head { padding: 14px 16px 10px; }
  .m-stats { margin-inline-start: 0; width: 100%; }
  .m-bar { margin: 0 16px 10px; }
  .grid { grid-template-columns: 1fr; }
  .ovl { padding: 0; align-items: flex-end; }
  .dlg { border-radius: 20px 20px 0 0; max-height: 94vh; overflow-y: auto; }
  .dlg-h { padding: 16px 18px 4px; position: sticky; top: 0; background: #fff; z-index: 1; }
  .dlg-b { padding: 8px 18px 4px; }
  .dlg-f { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line-2); }
}
@media (max-width: 420px) {
  .brand .ttl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
