/* דשבורד עסקי ללקוחות – איציק עוז ייעוץ עסקי. שחור, זהב ולבן, Heebo, מימין לשמאל */
:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --card: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --line: #e7e5df;
  --grid: #e1e0d9;
  --soft: #f8f7f4;
  --gold: #86622a;
  --gold-hi: #b48a3c;
  --gold-soft: #f7f0e2;
  --accent: #b48a3c;
  --good: #0ca30c;
  --good-ink: #006300;
  --good-soft: #e9f6e9;
  --warn: #fab219;
  --warn-ink: #7a4d00;
  --warn-soft: #fff4d9;
  --bad: #d03b3b;
  --bad-ink: #b42318;
  --bad-soft: #fdeceb;
  --manual: #2a78d6;
  --shadow: 0 1px 2px rgba(11, 11, 11, .04), 0 4px 16px rgba(11, 11, 11, .04);
  --r: 14px;
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.num { unicode-bidi: isolate; direction: ltr; display: inline-block; }
.hidden { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 15px; height: 15px; }

/* ---------- כפתורים ושדות ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 9px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--soft); border-color: #d6d3ca; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #2a2a28; }
.btn.gold { background: var(--gold-hi); color: #fff; border-color: var(--gold-hi); }
.btn.gold:hover { background: var(--gold); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(11, 11, 11, .05); }
.btn.danger { color: var(--bad-ink); }
.btn.danger:hover { background: var(--bad-soft); border-color: #f3c9c6; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.icon { padding: 7px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid #d9d6cd; background: #fff; border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(180, 138, 60, .18); }
.input.err { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(208, 59, 59, .12); }
.input.numin { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.manual { color: #1c5cab; background: #eef4fc; border-color: #d3e3f8; }
.tag.calc { color: var(--gold); background: var(--gold-soft); border-color: #ecdcbc; }

/* ---------- סטטוס: תמיד צבע + סמל + מילה ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 9px 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.chip.good { background: var(--good-soft); color: var(--good-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.bad { background: var(--bad-soft); color: var(--bad-ink); }
.chip.none { background: var(--soft); color: var(--ink-2); }

/* ---------- כותרת הדשבורד ---------- */
.topband { height: 5px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); }
.head { background: var(--card); border-bottom: 1px solid var(--line); }
.head .wrap { display: flex; align-items: center; gap: 18px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brandbox { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
  overflow: hidden; flex: none; }
.logo img { max-width: 86%; max-height: 86%; object-fit: contain; }
.logo.initials { background: var(--ink); color: #fff; font-weight: 800; font-size: 22px; border: 0; position: relative; }
.logo.initials::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--accent); }
.titles { min-width: 0; }
.titles h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.titles .sub { color: var(--ink-2); font-size: 14px; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.titles .sub .dot { width: 4px; height: 4px; border-radius: 50%; background: #c9c6bd; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.updated { display: flex; flex-direction: column; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; margin-inline-end: 6px; }
.updated b { color: var(--ink); font-weight: 700; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding: 10px 0 0; }
.crumb:hover { color: var(--ink); }
.template-note { background: var(--ink); color: #fff; font-size: 14px; }
.template-note .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.template-note b { color: #e3c88f; }
.template-note .btn { color: var(--ink); }

/* ---------- טאבים של חודשים ---------- */
.tabs { position: sticky; top: 0; z-index: 20; background: rgba(244, 243, 239, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-top: 8px; padding-bottom: 0; }
.tab { position: relative; border: 0; background: transparent; padding: 9px 14px 12px; font-weight: 600; font-size: 14px; color: var(--ink-2);
  white-space: nowrap; border-radius: 9px 9px 0 0; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); background: rgba(11, 11, 11, .04); }
.tab small { color: var(--muted); font-weight: 500; font-size: 12px; }
.tab.on { color: var(--ink); }
.tab.on::after { content: ''; position: absolute; inset: auto 10px 0 10px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tab .has { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tab.cmp { margin-inline-start: auto; }

/* ---------- גוף ---------- */
main { padding: 22px 0 60px; }
.summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.summary h2 { margin: 0; font-size: 20px; font-weight: 800; margin-inline-end: 6px; }
.summary .asof { color: var(--ink-2); font-size: 13.5px; margin-inline-end: 4px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-title h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--ink-2); }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.grid.charts { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow);
  position: relative; min-width: 0; display: flex; flex-direction: column; }
.card.hidden-in-dash { opacity: .55; border-style: dashed; }
.card h4 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.card .card-head { display: flex; align-items: flex-start; gap: 8px; }
.card .card-head h4 { flex: 1; }
.card .tools { display: none; gap: 2px; margin: -6px -8px 0 -6px; }
body.editing .card .tools { display: flex; }
.card .tools .btn { padding: 5px; border-radius: 7px; }
.metric .target { font-size: 13px; color: var(--ink-2); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.metric .target .carried { color: var(--muted); font-size: 12px; }
.metric .value { font-size: 34px; font-weight: 800; line-height: 1.1; margin-top: 12px; letter-spacing: -.02em; }
.metric .value.good { color: var(--good-ink); }
.metric .value.bad { color: var(--bad-ink); }
.metric .value.warn { color: #8a5a00; }
.metric .value.empty { color: #c3c2b7; }
.metric .desc { font-size: 13px; color: var(--ink-2); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 24px; }
.bar { height: 7px; border-radius: 99px; background: #efede7; margin-top: 12px; position: relative; overflow: visible; }
.bar > i { position: absolute; inset: 0 0 0 auto; border-radius: 99px; background: var(--accent); max-width: 100%; }
.bar.good > i { background: var(--good); }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }
.bar > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; opacity: .75; }
.bar-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 6px; gap: 8px; }
.parts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.parts span { font-size: 12.5px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; color: var(--ink-2); }
.parts b { color: var(--ink); font-weight: 700; }
.delta { font-size: 13px; font-weight: 600; margin-top: 10px; display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.delta .d { font-weight: 800; }
.delta .d.good { color: var(--good-ink); }
.delta .d.bad { color: var(--bad-ink); }
.delta .d.flat { color: var(--ink-2); }
.spark { margin-top: 10px; }
.spark svg { width: 100%; height: 56px; display: block; overflow: visible; }
.spark .lbls { display: flex; justify-content: space-between; direction: ltr; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.metric .card-foot { border-top: 1px solid #f0eee9; margin-top: 12px; }
.add-tile { border: 1.5px dashed #d3d0c6; border-radius: var(--r); background: transparent; display: none; place-items: center; min-height: 140px;
  color: var(--ink-2); font-weight: 700; gap: 8px; }
body.editing .add-tile { display: grid; }
.add-tile:hover { background: rgba(255, 255, 255, .6); border-color: var(--gold-hi); color: var(--ink); }

/* ימי עבודה */
.days .big { display: flex; gap: 22px; margin-top: 12px; align-items: flex-end; }
.days .big div { display: grid; }
.days .big b { font-size: 34px; font-weight: 800; line-height: 1; }
.days .big span { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.days .need { margin-top: 12px; font-size: 14px; font-weight: 700; }
.days .need.bad { color: var(--bad-ink); }
.days .need.good { color: var(--good-ink); }

/* תהליך, פגישה, על הפרק */
.focus-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; counter-reset: f; }
.focus-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.focus-list li::before { counter-increment: f; content: counter(f); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink);
  color: #fff; font-size: 12.5px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.empty-note { color: var(--muted); font-size: 13.5px; margin-top: 10px; line-height: 1.5; }
.meet .when { font-size: 26px; font-weight: 800; margin-top: 10px; line-height: 1.2; }
.meet .what { font-size: 14px; margin-top: 6px; }
.meet .where { font-size: 13px; color: var(--ink-2); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.prog .big { display: flex; gap: 22px; margin-top: 12px; }
.prog .big div { display: grid; }
.prog .big b { font-size: 30px; font-weight: 800; line-height: 1; }
.prog .big span { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.prog .pname { align-self: flex-start; display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: .08em; background: var(--ink); color: #e3c88f;
  padding: 2px 9px; border-radius: 6px; margin-top: 8px; }

/* גרפים */
.chart-card { padding-bottom: 14px; }
.chart-card .chart-box { position: relative; height: 260px; margin-top: 12px; }
.chart-card .chart-box.donut { height: 230px; }
.chart-card .center-lbl { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.chart-card .center-lbl b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.chart-card .center-lbl span { font-size: 12px; color: var(--ink-2); }
.chart-card .sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend i.line { height: 3px; border-radius: 2px; width: 16px; }
.legend i.dash { height: 0; width: 16px; border-top: 2px dashed var(--ink); border-radius: 0; background: none !important; }
.legend b { color: var(--ink); font-weight: 700; }
.funnel { display: grid; gap: 4px; margin-top: 14px; }
.funnel .stage { display: grid; grid-template-columns: min(30%, 170px) 1fr; gap: 10px; align-items: center; }
.funnel .stage .nm { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.funnel .stage .track { position: relative; height: 34px; }
.funnel .stage .fill { position: absolute; inset: 0 0 0 auto; border-radius: 4px; min-width: 2px; }
.funnel .stage .v { position: absolute; inset: 0 8px 0 auto; display: flex; align-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.funnel .stage .v.out { color: var(--ink); }
.funnel .conv { margin-inline-start: calc(min(30%, 170px) + 10px); font-size: 12px; color: var(--ink-2); padding: 0 4px 2px; display: flex; align-items: center; gap: 5px; }
.funnel .conv b { color: var(--ink); }
.tbl-wrap { overflow-x: auto; margin-top: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th, table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.tbl th { font-size: 12px; color: var(--ink-2); font-weight: 700; background: var(--soft); }
table.tbl td.n { font-variant-numeric: tabular-nums; }
table.tbl tr:hover td { background: #fbfaf7; }
.chart-empty { display: grid; place-items: center; text-align: center; height: 100%; color: var(--muted); font-size: 13.5px; padding: 20px; }

/* השוואת חודשים */
.cmp-card { padding: 0; overflow: hidden; }
.cmp-card .cmp-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cmp-card .cmp-head h4 { flex: 1; }
.cmp-scroll { overflow-x: auto; }
table.cmp { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
table.cmp th, table.cmp td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; }
table.cmp thead th { background: var(--soft); font-size: 12.5px; color: var(--ink-2); position: sticky; top: 0; }
table.cmp .mname { position: sticky; right: 0; background: var(--card); font-weight: 600; min-width: 190px; z-index: 1; border-left: 1px solid var(--line); }
table.cmp thead .mname { background: var(--soft); z-index: 2; }
table.cmp tr.grp td { background: #faf9f6; font-size: 12px; font-weight: 800; color: var(--ink-2); }
table.cmp td.n { font-variant-numeric: tabular-nums; }
table.cmp td .sd { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-start: 6px; vertical-align: middle; }
.sd.good { background: var(--good); } .sd.warn { background: var(--warn); } .sd.bad { background: var(--bad); }

/* באנר ריק */
.welcome { background: var(--ink); color: #fff; border-radius: var(--r); padding: 22px 24px; display: flex; gap: 18px; align-items: center;
  flex-wrap: wrap; margin-bottom: 8px; position: relative; overflow: hidden; }
.welcome::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--accent); }
.welcome h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.welcome p { margin: 0; color: #d8d6cf; font-size: 14px; max-width: 640px; }
.welcome .grow { min-width: 240px; }

/* ---------- מסך הבית ---------- */
.home-head { background: var(--ink); color: #fff; }
.home-head .wrap { padding-top: 26px; padding-bottom: 0; }
.home-head .brand { display: flex; align-items: center; gap: 14px; }
.oz { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(140deg, #d6b46e, #b48a3c 55%, #86622a); display: grid;
  place-items: center; font-weight: 800; color: #0b0b0b; font-size: 17px; letter-spacing: .04em; flex: none; }
.home-head h1 { margin: 0; font-size: 24px; font-weight: 800; }
.home-head .brand p { margin: 2px 0 0; color: #bdb9ae; font-size: 14px; }
.home-tabs { display: flex; gap: 4px; margin-top: 22px; }
.home-tabs button { border: 0; background: transparent; color: #bdb9ae; padding: 10px 16px 13px; font-weight: 700; font-size: 14.5px; position: relative;
  display: inline-flex; gap: 7px; align-items: center; }
.home-tabs button:hover { color: #fff; }
.home-tabs button.on { color: #fff; }
.home-tabs button.on::after { content: ''; position: absolute; inset: auto 12px 0 12px; height: 3px; background: #d6b46e; border-radius: 3px 3px 0 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 200px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 150px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; }
.client-card { gap: 0; }
.client-card .top { display: flex; gap: 12px; align-items: center; }
.client-card .logo { width: 52px; height: 52px; border-radius: 13px; font-size: 18px; }
.client-card h4 { font-size: 16px; }
.client-card .biz { font-size: 13px; color: var(--ink-2); }
.client-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.client-card .acts { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.client-card.archived { opacity: .6; }
.people { display: grid; gap: 10px; }
.person { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; }
.person .input { width: auto; }
.person .nm { flex: 1; min-width: 160px; }
.person .ph { width: 150px; }
.person .cnt { font-size: 12.5px; color: var(--ink-2); min-width: 70px; }

/* ---------- חלונות ---------- */
.overlay { position: fixed; inset: 0; background: rgba(11, 11, 11, .45); z-index: 100; display: flex; justify-content: center; align-items: flex-start;
  padding: 4vh 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 680px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); display: flex;
  flex-direction: column; animation: rise .18s ease; margin-bottom: 4vh; }
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 460px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 0; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; flex: 1; }
.modal-sub { padding: 4px 22px 0; color: var(--ink-2); font-size: 14px; }
.modal-tabs { display: flex; gap: 4px; padding: 14px 22px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.modal-tabs button { border: 0; background: transparent; padding: 8px 12px 11px; font-weight: 700; font-size: 14px; color: var(--ink-2); position: relative;
  white-space: nowrap; }
.modal-tabs button.on { color: var(--ink); }
.modal-tabs button.on::after { content: ''; position: absolute; inset: auto 8px 0 8px; height: 3px; background: var(--gold-hi); border-radius: 3px 3px 0 0; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; gap: 10px; align-items: center; padding: 14px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap;
  position: sticky; bottom: 0; background: var(--card); border-radius: 0 0 18px 18px; }
.modal-foot .note { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 160px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

/* הזנת נתונים */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin-bottom: 16px; }
.month-nav b { font-size: 16px; font-weight: 800; }
.period { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.period .lbl { font-weight: 700; font-size: 15px; }
.weeks { display: flex; gap: 6px; flex-wrap: wrap; }
.weeks button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 7px 12px; font-size: 13.5px; font-weight: 600;
  display: grid; text-align: center; line-height: 1.25; }
.weeks button small { font-weight: 500; color: var(--ink-2); font-size: 12px; }
.weeks button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.weeks button.on small { color: #d8d6cf; }
.weeks button .has { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-inline-start: 4px; vertical-align: middle; }
.days-strip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.days-strip button { border: 1px solid var(--line); background: var(--card); border-radius: 9px; min-width: 42px; padding: 5px 0; display: grid;
  text-align: center; font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.days-strip button small { font-size: 11px; color: var(--ink-2); font-weight: 500; }
.days-strip button.off { opacity: .5; }
.days-strip button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.days-strip button.on small { color: #d8d6cf; }
.days-strip button.has:not(.on) { border-color: var(--gold-hi); box-shadow: inset 0 -3px 0 var(--accent); }
.entry-group { margin-bottom: 18px; }
.entry-group h5 { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.entry-row { display: grid; grid-template-columns: 1fr 170px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0eee9; }
.entry-row .nm { font-weight: 600; font-size: 14.5px; }
.entry-row .nm small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.entry-row .hint { grid-column: 1 / -1; font-size: 12px; color: var(--warn-ink); background: var(--warn-soft); border-radius: 8px; padding: 5px 9px; margin-top: -2px; }
.entry-row .hint.info { color: var(--ink-2); background: var(--soft); }
.entry-note { font-size: 13px; color: var(--ink-2); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }
.unit-wrap { position: relative; }
.unit-wrap .u { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.unit-wrap .input { padding-left: 28px; }
.live { background: var(--gold-soft); border: 1px solid #ecdcbc; border-radius: 12px; padding: 12px 14px; margin-top: 4px; }
.live h5 { margin: 0 0 8px; font-size: 12.5px; color: var(--gold); font-weight: 800; display: flex; gap: 6px; align-items: center; }
.live .items { display: flex; flex-wrap: wrap; gap: 8px; }
.live .items span { background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; color: var(--ink-2); border: 1px solid #efe3c8; }
.live .items b { color: var(--ink); }

/* עריכת מדדים */
.ed-group { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.ed-group-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
.ed-group-head .input { font-weight: 800; background: transparent; border-color: transparent; padding: 6px 8px; }
.ed-group-head .input:hover { border-color: #d9d6cd; background: #fff; }
.ed-list { list-style: none; margin: 0; padding: 0; }
.ed-item { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-bottom: 1px solid #f0eee9; flex-wrap: wrap; }
.ed-item:last-child { border-bottom: 0; }
.ed-item .nm { flex: 1; min-width: 160px; }
.ed-item .nm b { font-weight: 700; font-size: 14.5px; }
.ed-item .nm small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.ed-item.off .nm b { color: var(--muted); }
.ed-item .moves { display: flex; flex-direction: column; }
.ed-item .moves .btn { padding: 0 4px; border: 0; background: transparent; color: var(--muted); }
.ed-item .moves .btn:hover { color: var(--ink); }
.ed-add { padding: 8px 12px 10px; }
.vis { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; background: #fff; color: var(--ink-2); }
.vis.on { color: var(--good-ink); border-color: #bfe3bf; background: var(--good-soft); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.radio-cards label { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; font-weight: 700;
  font-size: 14px; }
.radio-cards label small { font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.radio-cards label:has(input:checked) { border-color: var(--ink); background: var(--soft); box-shadow: inset 0 0 0 1px var(--ink); }
.radio-cards input { position: absolute; opacity: 0; pointer-events: none; }
.formula-box { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.formula-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.formula-row .op { font-size: 22px; font-weight: 800; width: 28px; text-align: center; }
.formula-row select { flex: 1; min-width: 150px; }
.chk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; padding: 2px; }
.chk-list label { display: flex; gap: 8px; align-items: center; font-size: 13.5px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px;
  background: #fff; cursor: pointer; }
.chk-list label .ord { margin-inline-start: auto; font-size: 11.5px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 6px; padding: 0 6px; }
.preview-line { font-size: 13.5px; margin-top: 10px; color: var(--ink-2); }
.preview-line b { color: var(--ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.swatches input[type=color] { width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: #fff; }
.pal-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.pal-opts button { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px; display: flex; gap: 3px; background: #fff; }
.pal-opts button i { width: 16px; height: 16px; border-radius: 4px; display: block; }
.pal-opts button.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.logo-edit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-edit .logo { width: 84px; height: 84px; border-radius: 18px; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 12px;
  flex-wrap: wrap; }
.linkbox code { flex: 1; direction: ltr; text-align: left; font-size: 13px; word-break: break-all; min-width: 200px; color: var(--ink-2); }
.doc-row { display: grid; grid-template-columns: 1.2fr 1.6fr 130px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.docs-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.docs-list a { display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; text-decoration: none; }
.docs-list a:hover { background: var(--soft); }
.docs-list .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex: none; }
.docs-list .t { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-list .dt { font-size: 12px; color: var(--muted); }
.help { font-size: 13px; color: var(--ink-2); background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.55; }

/* כניסה, טעינה, הודעות */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.gate .box { background: var(--card); border-radius: 20px; padding: 30px; max-width: 420px; width: 100%; text-align: center; }
.gate .oz { margin: 0 auto 14px; width: 56px; height: 56px; font-size: 20px; }
.gate h1 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.gate p { margin: 0 0 18px; color: var(--ink-2); font-size: 14.5px; }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--ink-2); font-weight: 600; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #e3e0d7; border-top-color: var(--gold-hi); animation: spin .8s linear infinite;
  margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 300; max-width: 92vw;
  display: flex; gap: 8px; align-items: center; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--bad-ink); }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 10px 0 30px; }
.foot b { color: var(--gold); font-weight: 700; }

@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .head .wrap { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .titles h1 { font-size: 21px; }
  .logo { width: 52px; height: 52px; border-radius: 13px; }
  .head-actions { width: 100%; }
  .head-actions .btn.primary { flex: 1; justify-content: center; }
  .updated { width: 100%; flex-direction: row; gap: 6px; flex-wrap: wrap; margin: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid.charts { grid-template-columns: 1fr; }
  .metric .value { font-size: 26px; }
  .card { padding: 14px; }
  .overlay { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; margin: 0; }
  .modal-foot { border-radius: 0; }
  .entry-row { grid-template-columns: 1fr 140px; }
  .doc-row { grid-template-columns: 1fr 1fr; }
  .tab.cmp { margin-inline-start: 0; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .stat { min-width: calc(50% - 5px); flex: 1; }
}
@media print {
  .tabs, .head-actions, .tools, .add-tile, #toast { display: none !important; }
  body { background: #fff; }
}
