/* base.css — טוקנים ורכיבים משותפים לאתר ולממשק הניהול */
:root{
  --bg:#F5F6FA; --surface:#FFFFFF; --surface-2:#F0F2F7; --ink:#0F172A; --ink-2:#334155; --muted:#64748B;
  --line:#E5E8EF; --line-2:#D6DAE4;
  --brand:#5046E5; --brand-hover:#4338CA; --brand-soft:#EEF0FF; --brand-ink:#3730A3; --teal:#14B8A6;
  --ok:#16A34A; --ok-soft:#ECFDF3; --bad:#DC2626; --bad-soft:#FEF2F2; --warn-soft:#FFF7E6; --warn-ink:#9A5B00;
  --sh-1:0 1px 2px rgba(15,23,42,.04),0 1px 3px rgba(15,23,42,.04);
  --sh-2:0 1px 2px rgba(15,23,42,.04),0 12px 32px -16px rgba(15,23,42,.18);
  --r:16px; --r-sm:10px;
  --font:'Rubik','Heebo','Segoe UI',Arial,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0A0E17; --surface:#111726; --surface-2:#161D2F; --ink:#E7EBF3; --ink-2:#C3CAD8; --muted:#8B95A9;
  --line:#1F2739; --line-2:#2A3449; --brand:#7C74F8; --brand-hover:#948DFA; --brand-soft:#1D1F44; --brand-ink:#B9B4FF;
  --ok:#4ADE80; --ok-soft:#10271A; --bad:#F87171; --bad-soft:#341616; --warn-soft:#33260F; --warn-ink:#F5C066;
  --sh-1:0 1px 2px rgba(0,0,0,.3); --sh-2:0 1px 2px rgba(0,0,0,.3),0 16px 40px -20px rgba(0,0,0,.6); color-scheme:dark;}}
:root[data-theme="dark"]{
  --bg:#0A0E17; --surface:#111726; --surface-2:#161D2F; --ink:#E7EBF3; --ink-2:#C3CAD8; --muted:#8B95A9;
  --line:#1F2739; --line-2:#2A3449; --brand:#7C74F8; --brand-hover:#948DFA; --brand-soft:#1D1F44; --brand-ink:#B9B4FF;
  --ok:#4ADE80; --ok-soft:#10271A; --bad:#F87171; --bad-soft:#341616; --warn-soft:#33260F; --warn-ink:#F5C066;
  --sh-1:0 1px 2px rgba(0,0,0,.3); --sh-2:0 1px 2px rgba(0,0,0,.3),0 16px 40px -20px rgba(0,0,0,.6); color-scheme:dark;}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--ink);font:16px/1.6 var(--font);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
a{color:inherit}
svg.i{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:8px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:42px;padding:0 18px;border-radius:11px;font-weight:600;font-size:15px;border:1px solid transparent;white-space:nowrap;text-decoration:none;transition:background .15s,border-color .15s,box-shadow .15s}
.btn-primary{background:var(--brand);color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08),inset 0 1px 0 rgba(255,255,255,.12)}
.btn-primary:hover{background:var(--brand-hover)}
.btn-ghost{background:var(--surface);border-color:var(--line-2);color:var(--ink)}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand)}
.btn-danger{background:var(--surface);border-color:var(--line-2);color:var(--bad)}
.btn-danger:hover{background:var(--bad-soft);border-color:var(--bad)}
.btn-lg{height:50px;padding:0 24px;font-size:16px;border-radius:13px}
.btn[disabled]{opacity:.55;pointer-events:none}
.ib{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;color:var(--muted);transition:background .12s,color .12s}
.ib:hover{background:var(--surface-2);color:var(--ink)}
.ib.bad:hover{background:var(--bad-soft);color:var(--bad)}

.in{width:100%;min-height:44px;border:1px solid var(--line-2);background:var(--surface);border-radius:11px;padding:10px 13px;font-size:15.5px;transition:border-color .15s,box-shadow .15s}
textarea.in{min-height:96px;resize:vertical;line-height:1.55}
.in:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 16%,transparent)}
.in[dir="ltr"]{text-align:left}
.in::placeholder{color:color-mix(in srgb,var(--muted) 75%,transparent)}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-1)}
.chip-tag{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;font-size:12.5px;font-weight:600;
  color:var(--c,var(--brand));background:color-mix(in srgb,var(--c,var(--brand)) 11%,transparent);white-space:nowrap}
.icon-tile{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;flex:none;
  color:var(--c,var(--brand));background:color-mix(in srgb,var(--c,var(--brand)) 12%,transparent)}
.icon-tile svg{width:22px;height:22px}

/* ── גרפים ── */
.ch-svg{display:block;overflow:visible}
.ch-grid{stroke:var(--line);stroke-width:1}
.ch-ax{fill:var(--muted);font-size:11px;font-family:var(--font)}
.ch-cursor{stroke:var(--line-2);stroke-width:1;stroke-dasharray:3 3}
.ch-dot{stroke:var(--surface);stroke-width:2}
.ch-tip{position:absolute;top:0;pointer-events:none;background:var(--ink);color:var(--bg);border-radius:10px;padding:8px 11px;font-size:12.5px;line-height:1.5;box-shadow:var(--sh-2);white-space:nowrap;z-index:5}
.ch-tip b{display:block;font-weight:600;margin-bottom:2px}
.ch-tip span{display:flex;align-items:center;gap:6px}
.ch-tip i{width:8px;height:8px;border-radius:50%;display:inline-block}
.ch-empty{color:var(--muted);font-size:14px;padding:18px 0;text-align:center}
.dn{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.dn-svg{width:150px;height:150px;flex:none}
.dn-track{fill:none;stroke:var(--surface-2);stroke-width:16}
.dn-num{font:700 26px var(--font);fill:var(--ink)}
.dn-lab{font:500 11px var(--font);fill:var(--muted)}
.dn-legend{list-style:none;flex:1;min-width:160px;display:flex;flex-direction:column;gap:7px}
.dn-legend li{display:flex;align-items:center;gap:9px;font-size:14px}
.dn-legend i{width:10px;height:10px;border-radius:3px;flex:none}
.dn-legend span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink-2)}
.dn-legend b{font-weight:600}
.hb{list-style:none;display:flex;flex-direction:column;gap:13px}
.hb-row{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin-bottom:6px}
.hb-l{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink-2);display:flex;align-items:center;gap:8px}
.hb-row b{font-weight:600}
.hb-track{height:8px;border-radius:99px;background:var(--surface-2);overflow:hidden}
.hb-fill{height:100%;border-radius:99px;min-width:4px;transition:width .6s ease}
.spark{display:block}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
