/* MOVA supply module (31.10.2026): vendors + the invoice center. Built on admin.css (tokens, .t tables, .stb status cells, .chip, .seg). */
:root{--sup-ac:#e2621b;--sup-warn:#9a5b00;--sup-warn-bg:#fff4e0;--sup-bad:#c62f45;--sup-bad-bg:#fdecee;--sup-ok:#0a7d4a;--sup-ok-bg:#e3f4e9}

/* the area: orders from suppliers, vendors, invoices */
.sup-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:0 0 14px;border-bottom:1px solid var(--line)}
.sup-tabs a{padding:10px 16px;min-height:44px;display:inline-flex;align-items:center;color:var(--text-2);text-decoration:none;font-weight:500;border-bottom:3px solid transparent;margin-bottom:-1px}
.sup-tabs a:hover{color:var(--text);background:#eef0f3;border-radius:8px 8px 0 0}
.sup-tabs a[aria-current="page"]{color:var(--text);font-weight:700;border-bottom-color:var(--sup-ac)}
.sup-tabs .n{margin-inline-start:6px;font-size:12.5px;font-weight:700;background:var(--sup-bad);color:#fff;border-radius:999px;padding:1px 7px}

/* toolbar */
.sup-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:14px}
.sup-tools .grow{flex:1 1 auto}
.sup-tools .seg{flex:none}
.sup-more{border:1px dashed var(--line-2);background:#fff;border-radius:999px;min-height:38px;padding:6px 14px;cursor:pointer;font-size:14px}
.sup-more[aria-expanded="true"]{border-style:solid;border-color:var(--text)}
.sup-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:-4px 0 14px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:12px}
.sup-filters label{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--text-2)}
.sup-filters select{height:38px;border:1px solid var(--line-2);border-radius:8px;padding:0 10px;background:#fff;font:inherit;color:var(--text);max-width:220px}
.sup-filters .clr{border:0;background:none;color:var(--c-new);cursor:pointer;font-weight:600;min-height:38px;padding:0 8px}
.sup-pinned{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;background:#eaf2fd;border:1px solid #c9dcf7;color:#123a6b;border-radius:12px;padding:10px 14px;margin-bottom:14px;font-size:14.5px}
.sup-pinned button{margin-inline-start:auto}

/* cells */
.sup-name{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:5px 10px;min-width:0;text-align:start}
.sup-name b{font-weight:600;line-height:1.3}
.sup-name small,.sup-mini{font-size:12.5px;color:var(--muted);line-height:1.35}
.sup-cell{padding:6px 10px;font-size:14px;line-height:1.35}
.sup-cell small{display:block;font-size:12.5px;color:var(--muted)}
.sup-left{text-align:start!important}
.sup-btn{border:0;background:none;width:100%;min-height:46px;padding:5px 10px;cursor:pointer;text-align:inherit;font:inherit;color:inherit;display:flex;flex-direction:column;justify-content:center;gap:1px}
.sup-btn:hover{box-shadow:inset 0 0 0 1px var(--line-2)}
.sup-btn small{font-size:12.5px;color:var(--muted)}
.sup-miss{color:var(--sup-warn);font-weight:600}
.sup-amt{font-weight:600;font-variant-numeric:tabular-nums}
.sup-neg{color:var(--sup-ok)}
.sup-tag{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:1px 8px;font-size:12px;font-weight:600;background:#eef0f3;color:var(--text-2);white-space:nowrap}
.sup-tag.x{background:#efe7fb;color:#5a2c99}
.sup-tag.warn{background:var(--sup-warn-bg);color:var(--sup-warn)}
.sup-tag.bad{background:var(--sup-bad-bg);color:var(--sup-bad)}
.sup-tag.ok{background:var(--sup-ok-bg);color:var(--sup-ok)}
.sup-days{display:inline-flex;gap:2px;direction:rtl}
.sup-days i{font-style:normal;width:19px;height:19px;border-radius:5px;display:inline-grid;place-items:center;font-size:11.5px;background:#f0f2f4;color:#9aa3a0}
.sup-days i.on{background:#ffe7d6;color:#8a3a0b;font-weight:700}
.sup-link{color:var(--c-new);text-decoration:none;font-weight:500}
.sup-link:hover{text-decoration:underline}
.sup-off td{opacity:.55}
.sup-off td:first-child,.sup-off td:last-child{opacity:1}
.t td .stb.sm{height:36px;font-size:13.5px;border-radius:999px;width:auto;min-width:96px;margin:5px 8px;padding-block:0;padding-inline:14px 26px}
.sup-chk{width:44px}
.sup-chk input{width:18px;height:18px;cursor:pointer}
.sup-x{border:0;background:none;width:40px;height:46px;cursor:pointer;color:var(--muted);font-size:15px}
.sup-x[aria-expanded="true"]{color:var(--text);transform:rotate(90deg)}
.sup-x.warn{color:var(--sup-warn)}
.sup-doc{border:1px solid var(--line-2);background:#fff;border-radius:6px;width:34px;height:42px;margin:2px auto;display:grid;place-items:center;cursor:pointer;position:relative;font-size:10.5px;font-weight:700;color:var(--text-2);line-height:1.1;padding:0}
.sup-doc::before{content:"";position:absolute;inset-inline-end:-1px;top:-1px;border:6px solid transparent;border-top-color:var(--bg);border-inline-end-color:var(--bg)}
.sup-doc.none{border-style:dashed;color:var(--sup-warn);background:var(--sup-warn-bg)}
.sup-doc:hover{border-color:var(--text)}
.sup-inl{width:110px;height:36px;border:1px solid var(--focus);border-radius:6px;padding:0 8px;font:inherit;text-align:center}
.sup-acts{display:flex;gap:2px;justify-content:center}
.sup-ic{border:0;background:none;min-width:36px;height:36px;border-radius:8px;cursor:pointer;color:var(--muted);font-size:13px;padding:0 6px}
.sup-ic:hover{background:#eef0f3;color:var(--text)}
.t tr.sup-late td:first-child{box-shadow:inset 4px 0 0 var(--sup-bad)}

/* the expanded row: the lines of a document */
.sup-exp td{background:#fafbfc!important;height:auto;text-align:start;padding:0}
.sup-exp-in{padding:14px 16px 16px;display:grid;gap:12px}
.sup-lines{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;font-size:14px}
.sup-lines th{background:#f4f5f7;color:var(--muted);font-weight:500;font-size:12.5px;text-align:start;padding:7px 10px;white-space:nowrap}
.sup-lines td{padding:7px 10px;border-top:1px solid var(--line);text-align:start;height:auto;border-inline-start:0;background:#fff}
.sup-lines td.num,.sup-lines th.num{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
.sup-lines .up{color:var(--sup-bad);font-weight:700}
.sup-lines .rowbad td{background:var(--sup-bad-bg)}
.sup-m{border:1px solid var(--line-2);background:#fff;border-radius:999px;min-height:34px;padding:0 12px;cursor:pointer;font-size:13.5px;display:inline-flex;align-items:center;gap:6px;max-width:100%}
.sup-m.ok{border-color:#bfe3cc;background:var(--sup-ok-bg);color:var(--sup-ok)}
.sup-m.guess{border-color:#f0d5a3;background:var(--sup-warn-bg);color:var(--sup-warn)}
.sup-m.none{border-color:#f2c3ca;background:var(--sup-bad-bg);color:var(--sup-bad)}
.sup-exp-foot{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.sup-exp-foot p{margin:0;font-size:14px;color:var(--text-2)}
.sup-why{display:flex;flex-wrap:wrap;gap:6px}

/* bulk bar */
.sup-bulk{position:sticky;top:8px;z-index:20;display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:var(--ink);color:#fff;border-radius:14px;padding:10px 14px;margin-bottom:12px;box-shadow:0 10px 30px rgba(5,7,6,.25)}
.sup-bulk b{font-weight:700}
.sup-bulk .sum{color:#cbd3cf;font-variant-numeric:tabular-nums}
.sup-bulk .sp{flex:1 1 auto}
.sup-bulk button{border:0;border-radius:8px;min-height:38px;padding:0 14px;font-weight:600;cursor:pointer;background:#fff;color:var(--text)}
.sup-bulk button.p{background:var(--c-new);color:#fff}
.sup-bulk button.q{background:none;color:#cbd3cf}

/* insights */
.sup-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.sup-kpi{border:1px solid var(--line);background:#fff;border-radius:12px;padding:14px;text-align:start;cursor:pointer;display:flex;flex-direction:column;gap:2px;min-width:0;font:inherit;color:inherit}
.sup-kpi:hover{border-color:var(--text)}
.sup-kpi span{font-size:13.5px;color:var(--muted)}
.sup-kpi b{font-size:26px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.2}
.sup-kpi small{font-size:13px;color:var(--text-2)}
.sup-kpi.bad b{color:var(--sup-bad)}
.sup-kpi.warn b{color:var(--sup-warn)}
.sup-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:14px;margin-bottom:14px;align-items:start}
.sup-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}
.sup-card h2{margin:0 0 4px;font-size:17px;font-weight:700}
.sup-card>p{margin:0 0 12px;color:var(--muted);font-size:14px}
.sup-card .row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.sup-food{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;align-items:baseline}
.sup-food .big{font-size:34px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.1}
.sup-food .vs{font-size:14px;color:var(--text-2)}
.sup-meter{position:relative;height:12px;border-radius:999px;background:#eef0f3;margin:12px 0 6px;overflow:hidden}
.sup-meter i{position:absolute;inset-block:0;inset-inline-start:0;border-radius:999px;background:var(--c-ok)}
.sup-meter u{position:absolute;inset-block:-3px;width:3px;background:var(--text);text-decoration:none}
.sup-bars{display:grid;gap:6px}
.sup-bar{display:grid;grid-template-columns:minmax(110px,150px) 1fr auto;gap:10px;align-items:center;border:0;background:none;padding:4px 6px;border-radius:8px;cursor:pointer;text-align:start;font:inherit;color:inherit;min-height:36px}
.sup-bar:hover{background:#f4f5f7}
.sup-bar span{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sup-bar i{display:block;height:12px;border-radius:999px;background:var(--c);min-width:3px}
.sup-bar b{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.sup-chart{width:100%;height:auto;display:block;direction:ltr}
.sup-chart text{font-family:var(--font);font-size:12px;fill:var(--muted)}
.sup-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:var(--text-2);margin-top:6px}
.sup-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--c);margin-inline-end:5px;vertical-align:-1px}
.sup-finds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.sup-finds>.sup-find:last-child:nth-child(3n+1){grid-column:1/-1}
.sup-finds>.sup-find:last-child:nth-child(3n+2){grid-column:span 2}
.sup-find{background:#fff;border:1px solid var(--line);border-inline-start:5px solid var(--c,var(--sup-warn));border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:6px;min-width:0}
.sup-find h3{margin:0;font-size:15.5px;font-weight:700}
.sup-find p{margin:0;font-size:14px;color:var(--text-2)}
.sup-find ul{margin:0;padding:0;list-style:none;display:grid;gap:4px;font-size:14px}
.sup-find li{display:flex;justify-content:space-between;gap:10px}
.sup-find li span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.sup-find .acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.sup-find .btn{min-height:36px;padding:6px 12px;font-size:14px}
.sup-budget{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px;font-size:14px}
.sup-budget input{width:150px;height:38px;border:1px solid var(--line-2);border-radius:8px;padding:0 10px;font:inherit}

/* the line search: what we paid for an item */
.sup-ls{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:14px}
.sup-ls h2{margin:0 0 8px;font-size:16px}
.sup-ls-g{border-top:1px solid var(--line);padding:10px 0;display:grid;gap:6px}
.sup-ls-g:first-of-type{border-top:0}
.sup-ls-h{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline;font-size:14px}
.sup-ls-h b{font-size:15px}
.sup-ls table{width:100%;border-collapse:collapse;font-size:13.5px}
.sup-ls td,.sup-ls th{text-align:start;padding:4px 8px;border-top:1px solid #f0f2f4;white-space:nowrap}
.sup-ls th{color:var(--muted);font-weight:500}

/* suppliers tab + bank tab */
.sup-sum{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:14px;color:var(--text-2);margin:0 0 12px}
.sup-sum b{color:var(--text)}
.sup-cands{display:grid;gap:8px}
.sup-cand{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-size:14px}
.sup-cand .sc{font-weight:700;border-radius:999px;padding:1px 9px;font-size:12.5px;background:#eef0f3}
.sup-cand .sc.hi{background:var(--sup-ok-bg);color:var(--sup-ok)}
.sup-cand .sp{flex:1 1 auto}
.sup-msearch{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sup-msearch input{height:38px;border:1px solid var(--line-2);border-radius:8px;padding:0 10px;font:inherit;min-width:240px;flex:1 1 240px;max-width:420px}

/* dialogs */
.sup-dlg{position:fixed;inset:0;z-index:80;background:rgba(5,7,6,.45);display:grid;place-items:center;padding:16px}
.sup-dlg[hidden]{display:none}
.sup-dlg-in{background:#fff;border-radius:14px;max-width:520px;width:100%;padding:20px;display:grid;gap:12px;max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 20px 60px rgba(5,7,6,.3)}
.sup-dlg-in.wide{max-width:860px}
.sup-dlg-in h2{margin:0;font-size:21px}
.sup-dlg-in p{margin:0}
.sup-dlg-in label{display:grid;gap:4px;font-size:14px;color:var(--text-2)}
.sup-dlg-in input,.sup-dlg-in select,.sup-dlg-in textarea{height:42px;border:1px solid var(--line-2);border-radius:8px;padding:0 10px;font:inherit;background:#fff;color:var(--text);min-width:0;width:100%}
.sup-dlg-in textarea{height:auto;min-height:84px;padding:8px 10px;resize:vertical}
.sup-dlg-in input[dir="ltr"]{text-align:right}
.sup-dlg-in .hint{font-size:12.5px;color:var(--muted)}
.sup-dlg-in .err{color:var(--sup-bad);font-size:14px;font-weight:600}
.sup-dlg-in .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sup-dlg-in .kind{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sup-dlg-in .kind button{border:1px solid var(--line-2);background:#fff;border-radius:8px;min-height:42px;cursor:pointer;font:inherit}
.sup-dlg-in .kind button[aria-pressed="true"]{border-color:var(--text);background:var(--text);color:#fff;font-weight:600}
.sup-dlg-in .acts{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.sup-dlg-in .warnbox{background:var(--sup-warn-bg);color:#5c3700;border-radius:10px;padding:10px 12px;font-size:14px}
.sup-mail{background:#f7f8fa;border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:14px;white-space:pre-wrap;line-height:1.5}
.sup-mail b{display:block;margin-bottom:4px}
.sup-req{display:grid;gap:10px}
.sup-req-row{border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:8px}
.sup-req-h{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.sup-req-h b{font-size:16px}
.sup-req-row ul{margin:0;padding-inline-start:18px;font-size:14px;display:grid;gap:3px}
.sup-req-row .acts{justify-content:flex-start}
.sup-req-row .two input{height:38px}

/* the document itself, the way it came from the supplier */
.sup-paper{background:#fff;border:1px solid #d9dde2;border-radius:6px;padding:22px 24px;box-shadow:0 6px 24px rgba(5,7,6,.12);display:grid;gap:12px;color:#1d2420;position:relative;overflow:hidden}
.sup-paper::after{content:"נתוני הדגמה";position:absolute;inset-inline-end:-40px;top:22px;transform:rotate(-35deg);background:#fff1e6;color:#a65300;font-size:12px;font-weight:700;padding:3px 48px}
.sup-paper header{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;border-bottom:2px solid #1d2420;padding-bottom:10px}
.sup-paper header b{font-size:19px}
.sup-paper .meta{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 14px;font-size:14px}
.sup-paper .meta span{color:var(--muted);display:block;font-size:12.5px}
.sup-paper .tot{display:grid;justify-content:end;gap:3px;font-size:14.5px;text-align:end}
.sup-paper .tot b{font-size:18px}

@media (max-width:1100px){.sup-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sup-grid{grid-template-columns:minmax(0,1fr)}.sup-finds{grid-template-columns:repeat(2,minmax(0,1fr))}.sup-finds>.sup-find:last-child:nth-child(3n+1),.sup-finds>.sup-find:last-child:nth-child(3n+2){grid-column:auto}.sup-finds>.sup-find:last-child:nth-child(odd){grid-column:1/-1}}
@media (max-width:699px){.sup-finds{grid-template-columns:minmax(0,1fr)}.sup-finds>.sup-find:last-child:nth-child(odd){grid-column:auto}}
@media (max-width:699px){
  .sup-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .sup-tabs a{white-space:nowrap;padding:10px 12px}
  .sup-tools .search{flex:1 1 100%;max-width:none}
  .sup-kpi b{font-size:22px}
  .sup-food .big{font-size:28px}
  .sup-dlg-in .two{grid-template-columns:1fr}
  .sup-bar{grid-template-columns:minmax(90px,120px) 1fr auto}
  .sup-bulk{top:4px}
  .sup-filters select{max-width:100%;flex:1 1 140px}
  .t th.stick,.t td.stick{width:196px;max-width:196px} /* the frozen name column leaves room beside it on a phone: the next columns show without a swipe */
  .t .stick .cellin[data-f="n"]{min-width:0}
}
@media (prefers-reduced-motion:reduce){.sup-x{transition:none}}
.sup-telc{display:flex;align-items:center;min-width:148px}
.sup-who .cellin{height:32px}
.sup-who .cellin[data-f="contact"]{display:block;width:100%;font-weight:600}
.t .stick .cellin[data-f="n"]{min-width:128px}
.sup-ing{display:block;margin-top:2px;padding:2px 10px;background:none;border:0;font:inherit;font-size:13px;color:var(--c-new,#1d5fd1);text-align:start;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.sup-ing:hover{color:var(--ink,#111)}
/* the vendor tables: an address, a phone or "what they bring" is never cut inside its cell (the accounting column gives up the room) */
.t .cellin[data-f="mail"]{min-width:206px;font-size:13.5px}
.t .cellin[data-f="what"]{min-width:132px}
.sup-accc{width:176px;max-width:176px}
.sup-accc [dir="ltr"]{overflow-wrap:anywhere;font-size:13.5px}
.sup-telc .cellin{flex:1 1 auto;min-width:0}
.sup-need::placeholder{color:var(--sup-warn);font-weight:600;opacity:1}
