/* dms-rent — עיצוב "לבן חד" | Version 2.22.30 · Designed and developed with Claude by Moshe Shpigel · mosheshpigel22@gmail.com */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f7f7f7;
  --hover: #fbf6f6;
  --border: #ececec;
  --border-strong: #dadada;
  --line: #161616;
  --text: #161616;
  --muted: #5f5f5f;
  --faint: #8a8a8a;
  --accent: #8e1a2a;          /* בורדו */
  --accent-strong: #6b111e;
  --accent-soft: #f8eef0;
  --ok: #2f6b37;      --ok-soft: #eaf3eb;
  --warn: #9a5a00;    --warn-soft: #fbf1e1;   /* "לטיפול" בכתום, כדי לא להתבלבל עם צבע המותג */
  --bad: #b3261e;     --bad-soft: #fbeceb;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --ease: cubic-bezier(.2,.7,.2,1);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'IBM Plex Sans Hebrew', system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.005em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; font-weight: 600; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----- מבנה: סרגל עליון ----- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 22px; padding: 0 28px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: 1.08rem; letter-spacing: .2px; white-space: nowrap; flex-shrink: 0; }
.brand svg { color: var(--accent); transition: transform .25s var(--ease); }
a.brand:hover { color: var(--text); }
a.brand:hover svg { transform: rotate(-6deg) scale(1.06); }
.nav { display: flex; align-items: stretch; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; align-self: stretch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: .93rem; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .2s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

.who { position: relative; flex-shrink: 0; }
.who-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; color: var(--accent); }
.who-btn:hover { border-color: var(--accent); }
.who-menu { display: none; position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; min-width: 200px; flex-direction: column; gap: 8px; z-index: 40; }
.who.open .who-menu { display: flex; animation: drop .16s var(--ease); }
.who-name { display: flex; flex-direction: column; font-weight: 500; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }

.main { padding: 36px 32px 48px; max-width: 1184px; width: 100%; margin: 0 auto; flex: 1; animation: enter .22s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin-inline-end: auto; }
.page-head h1 .h-count { color: var(--accent); font-weight: 600; margin-right: 10px; font-size: .8em; }
.footer { color: var(--faint); font-size: .75rem; padding: 24px 0 18px; direction: ltr; text-align: center; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.topbar .brand { margin-inline-end: auto; }
.portal { max-width: 860px; margin: 0 auto; padding: 28px 18px 40px; }

@media (max-width: 820px) {
  .appbar { padding: 0 14px; gap: 12px; }
  .brand span { display: none; }
  .main { padding: 22px 16px 32px; }
  h1 { font-size: 1.45rem; }
}

/* ----- טעינה ----- */
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--accent); }
.splash-name { color: var(--text); font-weight: 600; font-size: 1.15rem; letter-spacing: .3px; }
.splash .ring { transform-origin: 60px 60px; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.sk { height: 14px; border-radius: 4px; background: linear-gradient(90deg, #f2f2f2 0%, #fafafa 40%, #f2f2f2 80%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.sk-title { height: 26px; width: 220px; margin-bottom: 10px; }
.sk-row { height: 44px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading { color: var(--faint); padding: 30px; text-align: center; }

/* ----- רכיבים ----- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); padding: 7px 14px; border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; white-space: nowrap; transition: border-color .15s, color .15s, background .15s, transform .08s; }
.btn:hover { border-color: var(--text); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--soft); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 4px 10px; font-size: .82rem; }
.icon-btn { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 4px 8px; border-radius: var(--radius); }
.icon-btn:hover { background: var(--soft); color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin-inline-end: auto; font-size: .98rem; font-weight: 600; }
.card-body { padding: 14px 16px; }

/* חלוניות מספרים: קו עליון שחור, תאים מופרדים בקווים דקים */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line); margin-bottom: 24px; }
.stat { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-inline-start: 1px solid var(--border); padding: 18px 20px 20px;
  cursor: pointer; text-align: start; display: flex; flex-direction: column; gap: 4px; transition: background .18s; }
.stat:hover { background: var(--hover); }
.stat .v { font-size: 2.6rem; font-weight: 300; line-height: 1.1; color: var(--accent); }
.stat .l { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 8px; order: -1; }
.stat .l::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.stat.zero .v { color: #a8a8a8; }
.stat.zero .l::before { background: var(--ok); }
.stats.plain .stat { cursor: default; }
.stats.plain .stat .l::before { display: none; }
.stats.plain .stat .v { color: var(--text); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--border); }
.list li:first-child { border-top: none; }
.list li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li.click { cursor: pointer; transition: background .15s; }
.list li.click:hover { background: var(--hover); }
.empty { color: var(--muted); padding: 22px 16px; text-align: center; font-size: .92rem; }

table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: start; font-weight: 500; color: var(--muted); font-size: .8rem; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--hover); }
.tbl tfoot td { font-weight: 600; background: var(--soft); border-top: 1px solid var(--border); }
.tbl-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .78rem; background: var(--soft); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.acc { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 180px; max-width: 320px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 3px 12px; font-size: .84rem; cursor: pointer; color: var(--muted); transition: all .15s; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }

/* ----- טפסים ----- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: .83rem; color: var(--muted); }
.field.req label::after { content: ' *'; color: var(--accent); }
input[type=text], input[type=number], input[type=date], input[type=month], input[type=password], input[type=email], input[type=search], select, textarea {
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 8px 10px; background: var(--surface); width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 76px; resize: vertical; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .93rem; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ----- חלונית קופצת ----- */
.overlay { position: fixed; inset: 0; background: rgba(22,22,22,.28); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px; z-index: 50; overflow-y: auto; animation: fade .16s ease; }
.modal { background: var(--surface); border-radius: 8px; border-top: 2px solid var(--accent); box-shadow: 0 16px 56px rgba(0,0,0,.16); width: 100%; max-width: 560px; animation: rise .22s var(--ease); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 8px; }
.modal-head h3 { margin-inline-end: auto; font-size: 1.12rem; font-weight: 500; }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-start; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.99); } }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; }
.kv > div > span:first-child { display: block; font-size: .8rem; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.section-title h4 { margin-inline-end: auto; }
.sub { border: 1px solid var(--border); border-radius: var(--radius); }
details.more > summary { cursor: pointer; color: var(--muted); font-size: .88rem; list-style: none; }
details.more > summary::before { content: '◂ '; }
details.more[open] > summary::before { content: '▾ '; }

.steps { display: flex; flex-direction: column; gap: 8px; }
.progress { height: 4px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); transition: width .35s var(--ease); }
.progress.warn > div { background: var(--warn); }
.progress.bad > div { background: var(--bad); }

.perm-grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
.perm-grid th, .perm-grid td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.perm-grid th:first-child, .perm-grid td:first-child { text-align: start; }

.banner { padding: 11px 14px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-size: .92rem; }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }

/* ----- כניסה ----- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(var(--bg), var(--bg)) padding-box; }
.login .card { width: 100%; max-width: 360px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; border-top: 2px solid var(--accent); box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--accent); padding-bottom: 6px; }
.login-brand div { color: var(--text); font-weight: 600; font-size: 1.3rem; letter-spacing: .3px; }

/* ----- הודעות ----- */
.toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--text); color: #fff; padding: 10px 15px; border-radius: var(--radius); font-size: .9rem; box-shadow: var(--shadow); max-width: 360px; animation: slide .22s var(--ease); }
.toast.error { background: var(--bad); }
@keyframes slide { from { opacity: 0; transform: translateY(8px); } }

@media print {
  .appbar, .topbar, .no-print, .toolbar, .btn { display: none !important; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { border: none; }
}

/* ----- מתג, אשף, כפתורי פעולות ----- */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; transition: background .2s var(--ease); cursor: pointer; }
.switch .slider::before { content: ''; position: absolute; width: 16px; height: 16px; top: 3px; inset-inline-start: 3px; background: #fff; border-radius: 50%; transition: transform .25s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(-16px); }
[dir=ltr] .switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: .5; cursor: default; }

.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: 6px 16px; border-radius: 4px; cursor: pointer; color: var(--muted); font-size: .92rem; transition: all .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }

.wiz-steps { display: flex; gap: 4px; }
.wiz-steps div { flex: 1; height: 3px; border-radius: 99px; background: var(--border); transition: background .3s; }
.wiz-steps div.done { background: var(--accent); }
.wiz-steps div.cur { background: var(--accent); opacity: .4; }
.wiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wiz-head h4 { font-size: 1.05rem; font-weight: 500; }

.choice { display: flex; flex-direction: column; gap: 8px; }
.choice > label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; transition: border-color .15s; }
.choice > label:hover { border-color: var(--border-strong); }
.choice > label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }

.pick-list { max-height: 300px; overflow-y: auto; }
.pick-list li { cursor: pointer; transition: background .12s; }
.pick-list li:hover, .pick-list li.on { background: var(--accent-soft); }
.group-title { font-size: .8rem; color: var(--muted); padding: 8px 16px 4px; background: var(--soft); border-top: 1px solid var(--border); }

.contact-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .contact-row { grid-template-columns: 1fr 1fr; } }

/* לשונית פעולות: כפתורים שאפשר לגרור כדי לסדר */
.ops-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 14px; color: var(--faint); font-size: .85rem; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.op-btn { position: relative; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 18px 18px 16px; text-align: start; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; min-height: 124px; transition: border-color .15s, color .15s, transform .2s var(--ease), box-shadow .2s; }
.op-btn:hover { border-color: var(--accent); }
.op-btn:hover b { color: var(--accent); }
.op-btn .ico { color: var(--accent); margin-bottom: 4px; }
.op-btn b { font-size: 1.02rem; font-weight: 500; transition: color .15s; }
.op-btn span { color: var(--muted); font-size: .85rem; }
.op-btn .grip { position: absolute; top: 10px; inset-inline-end: 10px; color: #c4c4c4; cursor: grab; display: flex; }
.op-btn:hover .grip { color: var(--muted); }
.op-btn.dragging { opacity: .4; }
.op-btn.drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: scale(1.01); }

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.type-btn { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius); padding: 14px 10px; cursor: pointer; font-size: .95rem; text-align: center; transition: border-color .15s, color .15s; }
.type-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.type-btn:disabled { opacity: .55; cursor: default; background: var(--soft); }
.type-btn small { display: block; color: var(--muted); font-size: .75rem; margin-top: 3px; }

.stat .v.money { font-size: 1.6rem; }
.stat .sum { color: var(--muted); font-size: .85rem; }
.dash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-tiles .stat { min-height: 140px; justify-content: flex-start; }
@media (max-width: 900px) { .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ledger td.pos { color: var(--bad); }
.ledger td.neg { color: var(--ok); }

/* קופת תיקונים */
.fund-bal { font-size: 2rem; font-weight: 300; line-height: 1.1; }
.fund-bal.low { color: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .splash .ring { animation: spin 4s linear infinite !important; }
}

/* מספרים בכיוון שמאל-לימין, אבל מיושרים לימין כמו שאר הטקסט */
.stat .v, .tbl td.num, .fund-bal { text-align: right; }

/* ----- חיפוש כללי (2.22.08) ----- */
.gs { position: relative; flex-shrink: 0; width: 210px; transition: width .2s var(--ease); }
.gs:focus-within { width: 300px; }
.gs-ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); display: flex; pointer-events: none; }
.gs-input[type=search] { padding: 6px 34px 6px 12px; border-radius: 99px; background: var(--soft); border-color: transparent; font-size: .88rem; }
.gs-input[type=search]:focus { background: var(--surface); border-color: var(--accent); }
.gs-kbd { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font: inherit; font-size: .68rem; color: var(--faint);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; direction: ltr; pointer-events: none; background: var(--surface); }
.gs:focus-within .gs-kbd { display: none; }
.gs-panel { display: none; position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 380px; max-height: 70vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 45; padding: 6px 0; }
.gs.open .gs-panel { display: block; animation: drop .16s var(--ease); }
.gs-group { font-size: .74rem; color: var(--faint); padding: 8px 14px 3px; }
.gs-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none; text-align: start; padding: 7px 14px; cursor: pointer; }
.gs-item:hover, .gs-item.on { background: var(--accent-soft); }
.gs-label { font-weight: 500; }
.gs-sub { font-size: .8rem; color: var(--muted); }
.gs-empty { padding: 12px 14px; color: var(--muted); font-size: .88rem; }
@media (max-width: 1100px) { .gs { width: 150px; } .gs-kbd { display: none; } }
@media (max-width: 820px) { .gs { width: 40px; } .gs:focus-within { width: 220px; } .gs-input[type=search] { padding-inline-start: 30px; padding-inline-end: 6px; }
  .gs-input[type=search]::placeholder { color: transparent; } .gs-panel { width: min(340px, 92vw); } }

/* ----- ציר זמן בלוח הבקרה (2.22.08) ----- */
.tl-wrap { margin-top: 34px; }
.tl-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.tl-title { font-size: 1.9rem; font-weight: 300; line-height: 1.3; animation: enter .5s var(--ease) both; }
.tl-title b { font-weight: 500; }
.tl-ok { color: var(--ok); } .tl-bad { color: var(--bad); }
.tl-sub { color: var(--faint); font-size: .85rem; }
.tl-track { position: relative; height: 430px; margin-top: 6px; }
.tl-zone { position: absolute; top: 0; bottom: 0; background: linear-gradient(to left, rgba(179,38,30,.05), rgba(179,38,30,0)); border-inline-start: 0; }
.tl-zone span { position: absolute; bottom: 4px; right: 8px; font-size: .72rem; color: var(--bad); opacity: .8; }
.tl-base { position: absolute; right: 0; left: 0; top: 200px; height: 1px; background: var(--border); }
.tl-line { position: absolute; left: 0; top: 199px; height: 2px; background: linear-gradient(to left, var(--accent), rgba(142,26,42,.12)); transform-origin: right; animation: tlDraw 1.4s var(--ease) both; }
@keyframes tlDraw { from { transform: scaleX(0); } }
.tl-today { position: absolute; top: 184px; width: 2px; height: 32px; background: var(--text); transform: translateX(50%); }
.tl-today span { position: absolute; top: 36px; right: 50%; transform: translateX(50%); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.tl-month { position: absolute; top: 208px; transform: translateX(50%); font-size: .7rem; color: #a0a0a0; }
.tl-month::before { content: ''; display: block; width: 1px; height: 10px; background: #cfcfcf; margin: -8px auto 3px; }
.tl-ev { position: absolute; top: 0; height: 430px; width: 0; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; text-align: start; animation: tlPop .5s var(--ease) both; }
@keyframes tlPop { from { opacity: 0; transform: translateY(6px); } }
.tl-dot { position: absolute; right: 0; top: 200px; width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c); transform: translate(50%, -50%); transition: transform .2s; display: inline-block; flex-shrink: 0; }
.tl-dot.late { box-shadow: 0 0 0 1px var(--c), 0 0 0 5px rgba(179,38,30,.15); }
.tl-stem { position: absolute; right: 0; width: 1px; opacity: .35; }
.tl-card { position: absolute; right: -8px; width: 176px; padding: 6px 8px; border-radius: 6px; display: flex; flex-direction: column; gap: 1px; transition: background .15s; }
.tl-ev:hover .tl-card, .tl-ev:focus-visible .tl-card { background: var(--hover); }
.tl-ev:hover .tl-dot { transform: translate(50%, -50%) scale(1.35); }
.tl-k { font-size: .74rem; font-weight: 600; }
.tl-t { font-size: .88rem; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-s { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-list { display: none; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 10px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.tl-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
@media (max-width: 900px) { .tl-track { display: none; } .tl-list { display: block; } .tl-title { font-size: 1.4rem; } }
@media (prefers-reduced-motion: reduce) { .tl-line, .tl-ev, .tl-title { animation: none; } }

/* ----- הערות למפתח (2.22.30) ----- */
#dn-fab { position: fixed; bottom: 18px; left: 18px; z-index: 70; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; border-radius: 99px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; box-shadow: var(--shadow); transition: all .15s; }
#dn-fab:hover { color: var(--text); border-color: var(--bad); }
#dn-fab.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.dn-fab-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px rgba(179,38,30,.18); }
#dn-fab.on .dn-fab-dot { background: #fff; }
#dn-bar { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px;
  background: var(--text); color: #fff; border-radius: 99px; font-size: .85rem; box-shadow: var(--shadow); animation: drop .2s var(--ease); }
#dn-bar[hidden] { display: none; }
#dn-bar .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
#dn-bar .btn:hover { background: rgba(255,255,255,.22); }
#dn-layer { position: fixed; inset: 0; z-index: 65; pointer-events: none; }
.dn-dot { position: fixed; width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--bad); box-shadow: 0 0 0 1px rgba(179,38,30,.5), 0 1px 3px rgba(0,0,0,.25);
  pointer-events: auto; cursor: pointer; transition: transform .12s; animation: tlPop .25s var(--ease) both; }
.dn-dot:hover { transform: scale(1.5); }
.dn-hl { outline: 2px dashed var(--bad) !important; outline-offset: 2px; }
@media print { #dn-fab, #dn-bar, #dn-layer { display: none !important; } }

/* ----- עזרה ומדריך (2.22.30) ----- */
.help-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px;
  padding: 5px 12px; font: inherit; font-size: .86rem; cursor: pointer; flex-shrink: 0; transition: border-color .15s, color .15s; }
.help-btn:hover { border-color: var(--accent); color: var(--accent); }
.help-panel { position: fixed; top: var(--bar-h, 61px); bottom: 0; inset-inline-end: 0; width: min(420px, 100vw); background: var(--surface); border-inline-start: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 25; display: flex; flex-direction: column; transform: translateX(-105%); transition: transform .25s var(--ease); }
[dir=ltr] .help-panel { transform: translateX(105%); }
.help-panel.open, [dir=ltr] .help-panel.open { transform: none; }
.help-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 2px solid var(--accent); color: var(--accent); }
.help-head b { color: var(--text); flex: 1; }
.help-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.help-msg { max-width: 92%; padding: 10px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .92rem; line-height: 1.55; }
.help-msg p { margin: 0 0 6px; } .help-msg p:last-child { margin-bottom: 0; }
.help-msg ol, .help-msg ul { margin: 4px 0; padding-inline-start: 20px; }
.help-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-color: var(--accent); }
.help-msg.bot { align-self: flex-start; }
.help-msg.err { border-color: var(--bad); }
.help-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.help-sugg .chip { font-size: .8rem; }
.help-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.help-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.help-form textarea { flex: 1; resize: none; min-height: 44px; }
.help-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.help-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: helpDot 1s infinite ease-in-out; }
.help-typing span:nth-child(2) { animation-delay: .15s; } .help-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes helpDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.guide { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.guide-toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .85rem; }
.guide-toc a { color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.guide-toc a:hover { background: var(--soft); color: var(--accent); }
.guide-body { line-height: 1.65; min-width: 0; }
.guide-body h1 { font-size: 1.4rem; margin: 0 0 6px; }
.guide-body h2 { font-size: 1.15rem; margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--accent); scroll-margin-top: 80px; }
.guide-body h3 { font-size: 1rem; margin: 18px 0 6px; }
.guide-body table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: .88rem; display: block; overflow-x: auto; }
.guide-body th, .guide-body td { border: 1px solid var(--border); padding: 6px 9px; text-align: start; vertical-align: top; }
.guide-body th { background: var(--soft); font-weight: 600; }
.guide-body hr { display: none; }
.guide-body .guide-screen { color: var(--faint); font-size: .85rem; }
.guide-sec { scroll-margin-top: 80px; }
@media (max-width: 820px) { .guide { grid-template-columns: 1fr; } .guide-toc { position: static; max-height: 180px; } .help-btn span { display: none; } }
.login-lang { display: block; margin: 0 auto; background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; font-size: .85rem; }

/* ----- אנגלית: שמאל-לימין ----- */
[dir=ltr] .gs-ico { right: auto; left: 12px; }
[dir=ltr] .gs-input[type=search] { padding: 6px 12px 6px 34px; }
[dir=ltr] .page-head h1 .h-count { margin-right: 0; margin-left: 10px; }
[dir=ltr] .stat .v, [dir=ltr] .tbl td.num, [dir=ltr] .fund-bal { text-align: left; }
[dir=ltr] .tl-zone { background: linear-gradient(to right, rgba(179,38,30,.05), rgba(179,38,30,0)); }
[dir=ltr] .tl-zone span { right: auto; left: 8px; }
[dir=ltr] .tl-line { left: auto; right: 0; background: linear-gradient(to right, var(--accent), rgba(142,26,42,.12)); transform-origin: left; }
[dir=ltr] .tl-today, [dir=ltr] .tl-month { transform: translateX(-50%); }
[dir=ltr] .tl-today span { right: auto; left: 50%; transform: translateX(-50%); }
[dir=ltr] .tl-dot, [dir=ltr] .tl-stem { right: auto; left: 0; }
[dir=ltr] .tl-dot { transform: translate(-50%, -50%); }
[dir=ltr] .tl-ev:hover .tl-dot { transform: translate(-50%, -50%) scale(1.35); }
[dir=ltr] .tl-card { right: auto; left: -8px; }
body.help-open #dn-fab, body.help-open #dn-bar { display: none; }
@media (min-width: 1180px) { body.help-open .main { margin-inline-end: 420px; width: calc(100% - 420px); transition: margin .25s var(--ease); } }
.help-note { margin-top: 10px; padding: 10px; border: 1px dashed var(--accent); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--soft); }
.help-note-h { font-weight: 600; color: var(--accent); font-size: .86rem; }
.help-note textarea { resize: vertical; }
.help-sent { color: var(--ok); font-weight: 500; margin: 8px 0 0; }
.lk-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.lk-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.lk-row { display: flex; gap: 8px; font-size: .88rem; } .lk-row span { color: var(--muted); min-width: 96px; } .lk-row b { font-weight: 500; }
.lk-sub { font-size: .82rem; color: var(--muted); padding-inline-start: 104px; margin-top: -2px; }
.lk-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.lk-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 6px; }
.lk-li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: .88rem; } .lk-li:last-child { border-bottom: 0; }
.lk-src { font-size: .72rem; color: var(--faint); margin-top: 8px; }
.lk-minis { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.lk-mini { text-align: start; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 5px 9px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--text); }
.lk-mini:hover { border-color: var(--accent); }
