/* Manager pages (menu, login, cabinet, assortment): additions on top of
   prototype.css. Same tokens; light/dark theme comes from prototype.css. */

:root{--logo:url("/static/img/logo-phoenix-512.webp")}
.spin{background-image:url("/static/img/logo-phoenix-200.webp")}
[hidden]{display:none!important}

/* top bar: who is logged in + logout (replaces «Прототип · тестовые данные») */
.who{font-size:13px;color:#C9D5C4}
.top button.topback{border:0;cursor:pointer;font:inherit;font-weight:600;font-size:15px}

/* menu with three cards */
.mcards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1100px){.mcards.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:860px){.mcards.three{grid-template-columns:minmax(0,1fr)}}

/* login */
.login{padding-block:48px 64px}
.login .card-b{max-width:420px;margin:0 auto;padding:24px 22px;gap:14px}
.login h1{font-size:24px}
.login label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.login input{min-height:46px;border-radius:12px;border:1px solid var(--line2);background:var(--bg);padding:10px 12px;width:100%;font-size:16px}
.login .btn{min-height:46px;width:100%;font-size:16px}
.login .err{font-size:13px;color:var(--bad)}

/* cabinet: 8 filters instead of 7 */
.filters.f8{grid-template-columns:minmax(0,2fr) repeat(7,minmax(0,1fr))}
@media (max-width:1100px){.filters.f8{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:520px){.filters.f8{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}

/* detail card stays in view while scrolling the table (DESIGN.md §6) */
@media (min-width:1101px){#detail{position:sticky;top:76px;max-height:calc(100vh - 92px);overflow:auto}}

.detail .sec-t{font-size:12px;color:var(--muted);margin-bottom:6px}
.detail a{color:inherit}
.items{display:flex;flex-direction:column;gap:6px}
.item{display:grid;grid-template-columns:minmax(0,1fr) 78px 36px;gap:6px;align-items:center;font-size:14px}
.item small{display:block;color:var(--muted);font-size:12px}
.item input,.item-add select,.item-add input{min-height:36px;border-radius:10px;border:1px solid var(--line2);background:var(--bg);padding:4px 8px;width:100%;min-width:0;font-size:14px}
.item input{text-align:right;font-variant-numeric:tabular-nums}
.item .a-del{width:36px;height:36px}
.item-add{display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:6px}
.item-add .btn{grid-column:1/-1;min-height:36px}
.items-tot{font-size:14px;font-weight:700;text-align:right}
.hist{display:flex;flex-direction:column;gap:6px;font-size:13px}
.hist small{color:var(--muted)}
.detail .err{font-size:13px;color:var(--bad)}
td .more{color:var(--muted);font-size:12px}

/* phones: keep the top bar on one line as in the prototype —
   on inner pages logout stays reachable from the menu page */
@media (max-width:520px){.who{display:none}.top a.topback~#logout{display:none}}

/* assortment: wider switch column for «Поставка производится», two manager columns */
.arow,.colhead.a{grid-template-columns:210px minmax(0,2.2fr) minmax(0,1fr) 112px 104px 40px}
.rcols.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.asm-err{background:var(--bad-bg);border-radius:12px;padding:8px 12px}
@media (max-width:900px){.arow{grid-template-columns:repeat(3,minmax(0,1fr))}.rcols.two{grid-template-columns:minmax(0,1fr)}}
