/* ════════════════════════════════════════════════════════════════════════
   WareHousePro — бекофис. Палитра Crystal Light (от тестовата система), доразвита
   по Demo/02-bekofis.html. Всички цветове са токени тук — никъде цвят на ръка.
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --navy:   #0C4A6E;
    --sky-d:  #0369A1;
    --sky:    #0284C7;
    --sky-l:  #38BDF8;
    --pale:   #E0F2FE;
    --pale2:  #F0F9FF;

    --ink:    #0F172A;
    --ink2:   #475569;
    --ink3:   #94A3B8;

    --line:   rgba(2, 132, 199, .12);
    --line2:  rgba(2, 132, 199, .22);

    --ok:     #059669;  --ok-bg:    #D1FAE5;
    --warn:   #B45309;  --warn-bg:  #FEF3C7;
    --bad:    #DC2626;  --bad-bg:   #FEE2E2;
    --teal:   #0F766E;  --teal-bg:  #CCFBF1;
    --slate:  #334155;  --slate-bg: #E2E8F0;
    --orange: #C2410C;  --orange-bg: #FFEDD5;
    --recv-bg: #FFF7ED; --recv-line: #FED7AA;   /* мястото за приемане (показано) — много светло оранжево */
    --req-empty: #FFF1F2; --req-empty-line: #FECDD3;   /* задължително поле, празно — бледо розово */
    --req-filled: #F0FDF4; --req-filled-line: #BBF7D0; /* задължително поле, попълнено — бледо зелено */

    --sh:     0 4px 24px rgba(2, 132, 199, .08);
    --sh-lg:  0 18px 44px -18px rgba(12, 74, 110, .35);
    --mono:   'JetBrains Mono', ui-monospace, Consolas, monospace;
}

/* ── База ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #ffffff 0%, #D6EBF8 60%, #C2DFF4 100%) fixed;
    min-height: 100vh;
}
.boot  { min-height: 100vh; }
h1:focus { outline: none; }
.mono  { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.num   { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink3); }
.r     { text-align: right; }

/* ── Обвивка: меню вляво, горна лента, съдържание ───────────────────── */
.app  { display: flex; height: 100vh; overflow: hidden; }
.side {
    width: 272px; flex: none; display: flex; flex-direction: column;
    background: rgba(255, 255, 255, .9); border-right: 1px solid var(--line);
    box-shadow: 4px 0 32px rgba(2, 132, 199, .06); z-index: 100; transition: left .2s;
}
.logo { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; border-bottom: 1px solid var(--line); }
.logo .mk, .login-brand .mk {
    width: 40px; height: 40px; border-radius: 12px; color: #fff; display: grid; place-items: center; flex: none;
    background: linear-gradient(135deg, var(--navy), var(--sky)); box-shadow: 0 6px 14px -4px rgba(2, 132, 199, .6);
}
.logo strong { font-size: 15px; font-weight: 800; display: block; letter-spacing: -.01em; }
.logo span   { font-size: 11.5px; color: var(--ink3); }

.nav { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ni {
    display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 11px;
    font-size: 13.5px; font-weight: 600; color: var(--ink2); cursor: pointer; text-decoration: none; user-select: none;
}
.ni:hover { background: var(--pale2); color: var(--ink); }
.ni .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.ni .ic .mud-icon-root { font-size: 17px; }
.ni .ch { margin-left: auto; color: var(--ink3); display: flex; }
.ni .ch .mud-icon-root { font-size: 18px; }
.ni.on { background: linear-gradient(135deg, var(--sky), var(--sky-d)); color: #fff; box-shadow: 0 8px 16px -8px rgba(2, 132, 199, .8); }
.ni.on .ic { background: rgba(255, 255, 255, .18) !important; color: #fff !important; }
.ni.open { color: var(--ink); }
.sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 25px; padding-left: 14px; border-left: 2px solid var(--line2); }
.sub a { font-size: 13px; color: var(--ink2); font-weight: 500; padding: 7px 10px; border-radius: 9px; text-decoration: none; }
.sub a:hover { background: var(--pale2); color: var(--ink); }
.sub a.on { background: var(--pale); color: var(--sky-d); font-weight: 700; }
.lab { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); padding: 14px 12px 4px; }

.me { margin: 10px; padding: 12px; border-radius: 14px; background: var(--pale2); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.me .av {
    width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; flex: none;
    background: linear-gradient(135deg, var(--sky-l), var(--sky-d));
}
.me strong { font-size: 13px; display: block; }
.me span   { font-size: 11.5px; color: var(--ink3); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.top {
    height: 64px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 24px; position: relative; z-index: 50;
    background: rgba(255, 255, 255, .86); border-bottom: 1px solid var(--line); box-shadow: 0 2px 16px rgba(2, 132, 199, .05);
}
.burger { display: none; border: 0; background: none; color: var(--ink2); cursor: pointer; padding: 6px; }
.wh {
    display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--line2); background: #fff; font: inherit; color: inherit; text-align: left; max-width: 340px;
}
.wh:hover { border-color: var(--sky); }
.wh .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--pale); color: var(--sky-d); display: grid; place-items: center; flex: none; }
.wh .t { display: flex; flex-direction: column; min-width: 0; }
.wh small  { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.wh strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh .chev  { color: var(--ink3); font-size: 18px; }
/* Името на страницата — в свободното място между склада и дясната част; дълго име не застъпва чиповете. */
.ttl { flex: 1; min-width: 0; padding: 0 16px; text-align: center; font-size: 16px; font-weight: 800; letter-spacing: -.01em; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.st {
    display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; text-decoration: none;
    background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink2);
}
.st i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.st .mud-icon-root { font-size: 17px; }
.st.alert { background: var(--bad-bg); border-color: #FECACA; color: var(--bad); }
button.st { font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pb {
    display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer; font: inherit;
    background: #FFFBEB; border: 1px solid #FDE68A; color: var(--warn); font-size: 13px; font-weight: 700;
}
.pb:hover { background: var(--warn-bg); }
.pb .mud-icon-root { font-size: 17px; }
.menu-user strong { display: block; font-size: 13px; color: var(--ink); }
.menu-user span   { font-size: 12px; color: var(--ink3); }

.content { flex: 1; overflow-y: auto; padding: 24px 28px 32px; display: flex; flex-direction: column; gap: 18px; }
/* Картите не се свиват: карта с overflow (таблица в .tblwrap) иначе става „един ред с лента“ на нисък екран — превърта страницата. */
.content > * { flex-shrink: 0; }

/* ── Общи елементи ───────────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh); }
.ch   { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }
.c-ok   { background: var(--ok-bg);   color: var(--ok); }
.c-warn { background: var(--warn-bg); color: var(--warn); }
.c-bad  { background: var(--bad-bg);  color: var(--bad); }
.c-sky  { background: var(--pale);    color: var(--sky-d); }
.c-gray { background: #F1F5F9;        color: #64748B; }
.c-teal { background: var(--teal-bg); color: var(--teal); }
.c-orange { background: var(--orange-bg); color: var(--orange); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.checks { display: flex; flex-wrap: wrap; gap: 0 18px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 16px; color: var(--ink2); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--pale); color: var(--sky-d); display: grid; place-items: center; margin-bottom: 4px; }
.empty .ic .mud-icon-root { font-size: 28px; }
.empty strong { font-size: 16px; color: var(--ink); }
.empty span   { font-size: 13.5px; max-width: 52ch; line-height: 1.5; }

.phead { display: flex; align-items: center; gap: 12px; }
.phead .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.phead .tt { display: flex; align-items: center; gap: 10px; }
.phead h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.phead .t span { font-size: 13.5px; color: var(--ink2); }
.phead .acts { margin-left: auto; display: flex; gap: 10px; flex-shrink: 0; }
.phead .acts .mud-button-root { white-space: nowrap; }

.filters { padding: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters .grow { flex: 1 1 280px; }
.filters .fpick { flex: 0 1 280px; }
.filters .fsel { flex: 0 0 220px; }
.filters .mud-input-control { margin: 0 !important; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--pale2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); padding: 7px 12px; border-radius: 9px; }
.seg button.on { background: #fff; color: var(--sky-d); box-shadow: 0 2px 8px rgba(2, 132, 199, .12); }

.tblwrap { padding: 6px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
    font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); text-align: left;
    padding: 10px 12px; background: var(--pale2); border-bottom: 1px solid var(--line);
}
.tbl th:first-child { border-radius: 10px 0 0 0; }
.tbl th:last-child  { border-radius: 0 10px 0 0; }
.tbl td { font-size: 13px; padding: 0 12px; height: 46px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.wrap { white-space: normal; padding: 8px 12px; line-height: 1.45; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--pale2); }
.tbl.click tbody tr { cursor: pointer; }
.tbl tr.off td { color: var(--ink3); }
.bincode { font-weight: 700; color: var(--navy); font-size: 14px; }

/* ── Дърво (складови места: зона → вид → място) ─────────────────────────
   Линиите излизат от средата на иконата на родителя; последното дете ги спира на своя ред. */
.tree { padding: 6px; }
.tz { border-radius: 14px; }
.tz + .tz { margin-top: 2px; }
.tz.off .tt b, .tz.off .tt small { color: var(--ink3); }
.trow { display: flex; align-items: center; gap: 8px; border-radius: 12px; cursor: pointer; user-select: none; }
.trow:hover { background: var(--pale2); }
.trow .chev { color: var(--ink3); font-size: 20px; flex: none; transition: transform .15s ease; }
.trow.open .chev { transform: rotate(90deg); color: var(--sky-d); }
.trow .tacts { margin-left: auto; display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.trow:hover .tacts { opacity: 1; }
.trow.lvl1 { padding: 9px 12px 9px 10px; min-height: 58px; }
.trow.lvl1 .tico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.trow.lvl1 .tico .mud-icon-root { font-size: 20px; }
.trow.lvl1 .tt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.trow.lvl1 .tt b { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.trow.lvl1 .tt small { font-size: 12px; color: var(--ink2); }
.trow.lvl1 .tmeta { display: flex; gap: 6px; margin-left: auto; }
.trow.lvl1 .tmeta + .tacts { margin-left: 8px; }
.trow.lvl2 { padding: 6px 12px 6px 6px; min-height: 40px; font-size: 13.5px; }
.trow.lvl2 b { font-weight: 700; color: var(--slate); }
.trow.lvl2 .kico { color: var(--sky); font-size: 19px; flex: none; }
.trow.lvl2 .cnt { font-size: 11.5px; font-weight: 700; color: var(--sky-d); background: var(--pale); border-radius: 999px; padding: 2px 9px; }

.tkids { margin-left: 55px; padding-bottom: 4px; }               /* линията — под средата на иконата на зоната */
.tkids.leaves { margin-left: 43px; padding-bottom: 6px; }        /* … и на иконата на вида */
.tnode { position: relative; padding-left: 20px; --mid: 20px; }
.tnode::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px solid var(--line2); }
.tnode:last-child::before { bottom: auto; height: var(--mid); }
.tnode::after { content: ""; position: absolute; left: 0; top: var(--mid); width: 14px; border-top: 1.5px solid var(--line2); }
.tnode.tleaf { --mid: 17px; }
.tnode.tempty { --mid: 18px; padding-top: 9px; padding-bottom: 9px; font-size: 13px; color: var(--ink3); }

.tleaf { display: grid; grid-template-columns: minmax(120px, 160px) minmax(110px, 150px) 1fr auto auto; align-items: center; gap: 12px;
         min-height: 34px; padding-right: 8px; border-radius: 9px; font-size: 12.5px; }
.tleaf:hover { background: var(--pale2); }
.tleaf .bincode { font-size: 13px; }
.tleaf .chips { flex-wrap: nowrap; }
.tleaf .mud-icon-button { opacity: .55; }
.tleaf:hover .mud-icon-button { opacity: 1; }
.tleaf.off .bincode, .tleaf.off .mono { color: var(--ink3); }
.ml-2 { margin-left: 8px; }

.who { display: flex; align-items: center; gap: 10px; }
.who > i {
    width: 30px; height: 30px; border-radius: 50%; background: var(--pale); color: var(--sky-d); font-style: normal;
    font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none;
}
.who > span { display: flex; flex-direction: column; }
.who small { font-size: 11.5px; color: var(--ink3); }

/* ── Таблици с две нива текст, палети, срокове ─────────────────────── */
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.two { display: flex; flex-direction: column; gap: 1px; }
.two small { font-size: 11.5px; color: var(--ink3); font-weight: 500; }
.hucode { font-size: 15px; font-weight: 800; color: var(--navy); letter-spacing: .02em; }
.exp-warn { color: var(--warn); font-weight: 700; }
.exp-bad  { color: var(--bad);  font-weight: 700; }
.route { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
.route .mud-icon-root { color: var(--ink3); }
.route b { color: var(--navy); }
.tblnote { padding: 10px 12px; font-size: 12.5px; color: var(--ink3); }
.filters .fdate { flex: 0 1 270px; }
.seg.sm { padding: 3px; }
.seg.sm button { padding: 4px 10px; font-size: 12px; }
.kpiclick { cursor: pointer; border-radius: 16px; transition: box-shadow .15s; }
.kpiclick:hover .kpi { border-color: var(--line2); }
.kpiclick.on .kpi { border-color: var(--sky-l); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25), var(--sh); }
.addrow { display: flex; align-items: center; gap: 10px; }
.addrow .grow { flex: 1; }

/* ── Карта на палет / партида ───────────────────────────────────────── */
.huhead { display: flex; align-items: center; gap: 14px; }
.hubig {
    font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: .01em; padding: 6px 14px; border-radius: 14px;
    background: var(--pale2); border: 1px solid var(--line2); white-space: nowrap;
}
.huhead .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink2); }
.huhead .t .mono { font-size: 12px; color: var(--ink3); }
.huhead .t b.mono { font-size: 13.5px; color: var(--navy); font-weight: 800; overflow-wrap: anywhere; }

.tl { display: flex; flex-direction: column; position: relative; }
.tl::before { content: ""; position: absolute; left: 14px; top: 14px; bottom: 14px; width: 2px; background: var(--line2); }
.tli { display: flex; gap: 12px; padding: 6px 0; position: relative; }
.tli .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 3px #fff; }
.tli .dot .mud-icon-root { font-size: 16px; }
.tli .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 4px; }
.tli strong { font-size: 13.5px; }
.tli span { font-size: 12px; color: var(--ink3); }
.tli em { font-style: normal; font-size: 12.5px; color: var(--ink2); }
.tl-empty { padding: 6px 0; font-size: 13px; }

.qsgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qs {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: inherit; text-align: left;
    background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.qs i { width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.qs .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qs strong { font-size: 13.5px; }
.qs small { font-size: 11.5px; color: var(--ink3); }
.qs:hover { background: var(--pale2); }
.qs.on { border-color: var(--sky); background: var(--pale2); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); }
.qs.cur { opacity: .5; cursor: default; }

/* ── Етикети и печат ────────────────────────────────────────────────── */
.labelprev { padding: 14px; border-radius: 14px; background: repeating-linear-gradient(45deg, #F1F5F9, #F1F5F9 8px, #F8FAFC 8px, #F8FAFC 16px); border: 1px solid var(--line); display: flex; justify-content: center; }
.labelprev svg { width: 100%; max-width: 420px; height: auto; display: block; border-radius: 6px; box-shadow: 0 6px 18px -6px rgba(15, 23, 42, .35); }
.tplcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.tplcard { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.tplhead { display: flex; align-items: center; gap: 10px; }
.tplhead .t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tplhead strong { font-size: 15px; }
.tplhead .t span { font-size: 12.5px; color: var(--ink3); }
.tplfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.tpl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tpledit, .tplside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tplrow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 120px; gap: 10px; }
.zplsrc textarea { font-family: var(--mono) !important; font-size: 12.5px !important; line-height: 1.55 !important; }
.vars { display: grid; grid-template-columns: 1fr; gap: 4px; max-height: 220px; overflow-y: auto; }
.var { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--ink2); }
.var code { font-family: var(--mono); font-size: 12px; color: var(--sky-d); background: var(--pale2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.vers { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.ver { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--pale2); border: 1px solid var(--line); font-size: 12.5px; }
.ver span { color: var(--ink3); }
.ver em { font-style: normal; color: var(--ink2); }
.errline { display: block; color: var(--bad); font-size: 11.5px; margin-top: 3px; }
.zpldetails summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--sky-d); }
.zpldetails pre { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #0F172A; color: #E2E8F0; font-size: 11.5px; max-height: 260px; overflow: auto; }

/* ── Напредък (палети по документ и задача) ──────────────────────────── */
.progcell { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.pbar { height: 8px; border-radius: 999px; background: var(--pale); overflow: hidden; display: flex; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #34D399); }
.pbar b { display: block; height: 100%; background: var(--warn-bg); box-shadow: inset 0 0 0 1px #FCD34D; }
.progcell small { font-size: 11.5px; color: var(--ink3); }

/* ── Помощ: бутон „?“, страничен панел и самостоятелни страници (/pomosht/…) ── */
.helpbtn {
    width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; cursor: pointer;
    border: 1.5px solid var(--line2); background: #fff; color: var(--sky-d); font: 800 13px/1 'Inter', sans-serif;
    text-decoration: none; vertical-align: middle; padding: 0; transition: background .15s, border-color .15s;
}
.helpbtn:hover { background: var(--pale); border-color: var(--sky); }
/* Помощта е над диалозите (MudBlazor 1400) — „?“ има и в диалог на цял екран (3D склад); под съобщенията (1500). */
.helpveil { position: fixed; inset: 0; background: rgba(12, 74, 110, .18); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1450; }
.helpveil.on { opacity: 1; pointer-events: auto; }
.helpdrawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 1451; display: flex; flex-direction: column;
    background: #fff; box-shadow: -18px 0 48px -20px rgba(12, 74, 110, .45); transform: translateX(105%); transition: transform .25s ease;
}
.helpdrawer.on { transform: none; }
.helphead { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.helpic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 18px; background: linear-gradient(135deg, var(--navy), var(--sky)); }
.helphead .t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.helphead small { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.helphead strong { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.helplink { color: var(--ink2); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.helplink:hover { background: var(--pale2); color: var(--sky-d); }
.helpbody { flex: 1; overflow-y: auto; padding: 4px 22px 22px; }
.helpfoot { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.helpfoot a, .helpnav a { color: var(--sky-d); font-weight: 700; text-decoration: none; }

.helpdoc { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.helpdoc h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 16px 0 6px; text-wrap: balance; }
.helpdoc h2 { font-size: 17px; font-weight: 800; margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.helpdoc h3 { font-size: 14.5px; font-weight: 800; margin: 16px 0 4px; color: var(--navy); }
.helpdoc p { margin: 6px 0; }
.helpdoc ul, .helpdoc ol { margin: 6px 0; padding-left: 22px; }
.helpdoc li { margin: 3px 0; }
.helpdoc strong { color: var(--navy); }
.helpdoc code { font-family: var(--mono); font-size: 12.5px; background: var(--pale2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.helpdoc blockquote { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: #7C2D12; border: 0; }
.helpdoc blockquote p { margin: 0; }
.helpdoc table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13.5px; }
.helpdoc th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sky); background: var(--pale2); padding: 8px 10px; }
.helpdoc td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.helpdoc img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--sh); margin: 8px 0; }
.helpdoc a { color: var(--sky-d); font-weight: 600; }
.helppage { min-height: 100vh; padding: 24px max(16px, env(safe-area-inset-left, 0px)) 40px max(16px, env(safe-area-inset-right, 0px)); }
.helppage .helpdoc { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh); padding: 8px 28px 24px; }
.helppage.terminal .helpdoc { font-size: 17px; border-radius: 0; border: 0; box-shadow: none; padding: 0 4px 20px; }
.helppage.terminal { padding: 8px 14px 24px; background: #fff; }
.helpnav { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.login-card h1 { display: flex; align-items: center; gap: 10px; }

/* ── Табло ──────────────────────────────────────────────────────────── */
.hello h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.hello p  { margin: 4px 0 0; font-size: 14px; color: var(--ink2); }
.hello p::first-letter { text-transform: uppercase; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.kpi .h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink2); }
.kpi .h .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.kpi .h .ic .mud-icon-root { font-size: 19px; }
.kpi .v { display: flex; align-items: baseline; gap: 8px; }
.kpi .v b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1; }
.kpi .v span { font-size: 14px; font-weight: 600; color: var(--ink3); }
.kpi .f { display: flex; gap: 6px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel .ph { display: flex; align-items: center; justify-content: space-between; }
.issues { display: flex; flex-direction: column; }
.is { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.is + .is { border-top: 1px solid var(--line); }
.is .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.is .ic.warn { background: var(--warn-bg); color: var(--warn); }
.is .ic.bad  { background: var(--bad-bg);  color: var(--bad); }
.is .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.is strong { font-size: 13.5px; }
.is span   { font-size: 12px; color: var(--ink3); }

/* ── Складова структура (три колони) ────────────────────────────────── */
.cols3 { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.col { padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.colh { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.row:hover { background: var(--pale2); }
.row.sel { background: var(--pale); box-shadow: inset 3px 0 0 var(--sky); }
.row.off { opacity: .55; }
.row .code { font-size: 12px; font-weight: 700; color: var(--navy); background: var(--pale2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; flex: none; }
.row .t { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.row .t strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t span   { font-size: 12px; color: var(--ink3); }

/* ── Роли и права ───────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.roleic { width: 32px; height: 32px; border-radius: 10px; background: var(--pale); color: var(--sky-d); display: grid; place-items: center; flex: none; }
.roleic.admin { background: var(--navy); color: #fff; }
.matrix { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.mh { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mh h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.mh span { font-size: 13px; color: var(--ink2); }
.mh .acts { display: flex; gap: 10px; flex: none; }
.area { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.areah { grid-column: 1 / -1; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); padding-top: 4px; }
.perm { display: flex; align-items: center; gap: 4px; padding: 4px 12px 4px 2px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.perm.on { background: var(--pale2); border-color: var(--line2); }
.perm .t { display: flex; flex-direction: column; gap: 1px; }
.perm strong { font-size: 13px; font-weight: 600; }
.perm .t span { font-size: 11px; color: var(--ink3); }

/* ── Диалози ─────────────────────────────────────────────────────────── */
.picker { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow-y: auto; }
.pick-row {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    border: 0; background: none; cursor: pointer; font: inherit; text-align: left; color: var(--ink);
}
.pick-row:hover { background: var(--pale2); }
.pick-row .code  { font-size: 12px; font-weight: 700; color: var(--navy); }
.pick-row .name  { font-size: 14px; font-weight: 600; }
.pick-row .extra { font-size: 12px; color: var(--ink3); }
.pickfield { cursor: pointer; position: relative; }
.pickfield input { cursor: pointer; }
.pickfield.clearable input { padding-right: 34px; }
.pickfield .pickclear { position: absolute; top: 6px; right: 38px; }
.pickfield .pickclear .mud-icon-button { padding: 4px; color: var(--ink3); }
.pickfield .pickclear .mud-icon-button:hover { color: var(--bad); background: var(--pale2); }
/* Мястото за приемане, където се показва (картата, рампата в списъка и в документа) — светлооранжево */
.kv div.recv { background: var(--recv-bg); border: 1px solid var(--recv-line); border-radius: 8px; padding: 4px 8px; }
.recvtag { background: var(--recv-bg); border: 1px solid var(--recv-line); border-radius: 6px; padding: 0 6px; }

/* Задължителните полета в диалозите: празно — бледо розово, попълнено — бледо зелено. MudBlazor маркира задължителното с
   mud-input-required, а полето със стойност — с mud-shrink (етикетът е горе), затова правилото важи за всички диалози само.
   Рамката е с !important, защото и общото правило по-долу е; полето с грешка остава с червената рамка на MudBlazor. */
.mud-dialog .mud-input-control.mud-input-required .mud-input-outlined:not(.mud-shrink) { background: var(--req-empty); }
.mud-dialog .mud-input-control.mud-input-required .mud-input-outlined.mud-shrink { background: var(--req-filled); }
.mud-dialog .mud-input-control.mud-input-required .mud-input-outlined:not(.mud-shrink):not(.mud-input-error) .mud-input-outlined-border { border-color: var(--req-empty-line) !important; }
.mud-dialog .mud-input-control.mud-input-required .mud-input-outlined.mud-shrink:not(.mud-input-error) .mud-input-outlined-border { border-color: var(--req-filled-line) !important; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* „Годна до“ с отметката „Безсрочно“ под нея (ExpiryDatePicker) — една клетка в .pair. */
.expiryfield { display: flex; flex-direction: column; min-width: 0; }
.expiryfield .mud-checkbox { margin-top: -2px; }
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* Широк прозорец с три колони (складовата разписка и редът ѝ): всяка колона е група; отдолу — бележката и обобщението. */
.dlg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; align-items: start; }
.dlgcol { display: flex; flex-direction: column; gap: 12px; }
.dlgfoot { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px 24px; align-items: start; }
@media (max-width: 960px) { .dlg3, .dlgfoot { grid-template-columns: minmax(0, 1fr); } }
.preview { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--pale2); border: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.preview .mono, .preview b { color: var(--navy); font-weight: 700; }
/* Каре с обяснение: иконата вляво, текстът до нея (не под нея). */
.preview.note { flex-wrap: nowrap; align-items: flex-start; line-height: 1.45; }
.preview.note > .mud-icon-root { flex: none; margin-top: 1px; color: var(--sky-d); }
.preview.note > span { flex: 1; min-width: 0; }
.sec { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sech { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.rolerow { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--pale2); border: 1px solid var(--line); font-size: 13.5px; color: var(--sky-d); }
.rolerow span { flex: 1; color: var(--ink); }
.rolerow.click { cursor: pointer; transition: background .15s; }
.rolerow.click:hover { background: var(--pale); }
.lnk { color: var(--sky-d); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.lnk:hover { color: var(--navy); }
.tbl tr.dim td { opacity: .5; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reason {
    display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; cursor: pointer; font: inherit; text-align: left;
    background: #F8FBFE; border: 1px solid var(--line); color: var(--ink);
}
.reason .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--pale); color: var(--sky-d); display: grid; place-items: center; flex: none; }
.reason strong { font-size: 13.5px; }
.reason.on { border-color: var(--sky); background: var(--pale2); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); }
.autonote { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ink3); }
.autonote .mud-icon-root { font-size: 16px; }

.pd { display: flex; flex-direction: column; gap: 14px; }
.pdh { display: flex; align-items: center; gap: 10px; }
.pdh h3 { margin: 0; flex: 1; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.kv div { display: flex; flex-direction: column; gap: 2px; }
.kv small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); }
.kv b { font-size: 13.5px; }
/* Главата в широк прозорец (складовата разписка) — четири колони на един ред, а не дълъг списък. */
.kv.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .kv.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Едно число с надпис до поле (например „Сега в наличността“ до новото количество). */
.kv1 { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; }
.kv1 small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); }
.kv1 b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.pdnote { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }
.pdcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pdlist { padding: 10px 12px; border-radius: 12px; background: var(--pale2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; font-size: 12px; }
.pdlist.err { background: #FEF2F2; border-color: #FECACA; color: var(--bad); }
.pdshot img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.pdres { font-size: 13px; color: var(--ink2); padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); }

/* ── Изнасяне и портали ─────────────────────────────────────────────── */
.cardh { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding: 16px 18px 10px; flex-wrap: wrap; }
.cardh .mud-button-root { white-space: nowrap; }
.cardh h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--navy); }
.cardh small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink3); max-width: 720px; }
.t-bad { color: var(--bad); font-weight: 700; }
.mt1 { margin-top: 6px; }
.plate { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1.5px solid var(--navy); background: #fff; font-weight: 800; color: var(--navy); letter-spacing: .04em; }
/* Порталите по маршрута: номер (или отметка), име, кога е минат. */
.stops { display: flex; flex-wrap: wrap; gap: 10px; }
.stop { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--pale2); border: 1px dashed var(--line2); }
.stop .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #fff; color: var(--sky-d); border: 1px solid var(--line2); flex: none; }
.stop .t { display: flex; flex-direction: column; }
.stop .t b { font-size: 13.5px; color: var(--navy); }
.stop .t small { font-size: 11.5px; color: var(--ink3); }
.stop.done { background: var(--ok-bg); border: 1px solid #A7F3D0; }
.stop.done .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.stop.done .n .mud-icon-root { font-size: 16px; }
/* Готов A4 документ в диалога. */
.docview { height: min(78vh, 980px); border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: var(--pale2); }
.docview iframe { width: 100%; height: 100%; border: 0; display: block; }
.dochint { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--ink3); }

/* ── Вход ───────────────────────────────────────────────────────────── */
.login {
    position: relative;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px;
    background: linear-gradient(160deg, var(--navy) 0%, var(--sky) 62%, var(--sky-l) 100%);
}
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; padding: 30px 28px 28px; box-shadow: 0 30px 60px -20px rgba(12, 74, 110, .6); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand strong { font-size: 16px; font-weight: 800; display: block; }
.login-brand span   { font-size: 12px; color: var(--ink3); }
.login-card h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-card p  { margin: 4px 0 20px; font-size: 14px; color: var(--ink2); }
.login-error { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; margin-bottom: 14px; }
.login-btn { height: 52px; }
.login-foot { color: #E0F2FE; font-size: 13px; }
.login-ver  { position: absolute; right: 20px; bottom: 14px; color: rgba(224, 242, 254, .8); font-size: 12px; font-variant-numeric: tabular-nums; }
.login-rfid { display:block; text-align:center; margin-top:8px; color:rgba(255,255,255,.7); }
.login-rfid.connected { color:#81C784; font-size:14px; display:flex; align-items:center; justify-content:center; gap:4px; animation:rfid-pulse 2s infinite; }
@keyframes rfid-pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── MudBlazor в стила на Crystal Light ─────────────────────────────── */
.mud-button-root.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--sky), var(--sky-d)) !important; box-shadow: 0 8px 16px -8px rgba(2, 132, 199, .8) !important;
}
.mud-button-root.mud-button-filled.mud-button-filled-primary.mud-button-disabled,
.mud-button-root.mud-button-filled.mud-button-filled-primary:disabled {
    background: var(--pale) !important; color: var(--ink3) !important; box-shadow: none !important;
}
.mud-button-root { text-transform: none !important; font-weight: 700 !important; letter-spacing: 0 !important; }
.mud-button-filled, .mud-button-outlined { border-radius: 11px !important; }
.mud-dialog { border-radius: 20px !important; box-shadow: var(--sh-lg) !important; }
.mud-dialog .mud-dialog-title { padding: 18px 24px 8px; }
.mud-dialog .mud-dialog-title .mud-typography { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.mud-dialog .mud-dialog-actions { padding: 12px 24px 18px; gap: 6px; }
/* Прозорците се отварят веднага — без вградената анимация на MudBlazor (изскачане от половин размер и избледняващ фон).
   Анимацията оставяше на прозореца transform и той беше отправната точка на бутона ×; без нея това е position: relative —
   иначе × се мести в ъгъла на екрана, извън прозореца. */
.mud-dialog { animation: none !important; position: relative; }
/* Прозорец с наш × (DialogTitle — прави същото като „Затвори“): вграденият × на MudBlazor само отказва, затова се скрива. */
.mud-dialog-title:has(> .dlg-close) > .mud-button-close:not(.dlg-close) { display: none; }
.mud-overlay.mud-overlay-dialog .mud-overlay-scrim { animation: none !important; }
.mud-input-outlined-border { border-radius: 11px !important; border-color: var(--line2) !important; }
.mud-snackbar { border-radius: 14px !important; }

/* ── Инвентаризация: обобщението на разликите (плочките филтрират таблицата) ── */
.invsum { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.invt {
    display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; cursor: pointer;
    padding: 11px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(2, 132, 199, .06); transition: box-shadow .15s, border-color .15s;
}
.invt small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); }
.invt b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.invt:hover { border-color: var(--sky); }
.invt.on { border-color: var(--sky); background: var(--pale2); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); }

/* Само цветът на текста по тон (числа, разлики) — без фона на чиповете. */
.tn-ok   { color: var(--ok); }
.tn-warn { color: var(--warn); }
.tn-bad  { color: var(--bad); }
.tn-sky  { color: var(--sky-d); }
.tn-teal { color: var(--teal); }
.tn-gray { color: #64748B; }

/* ── По-тесни екрани ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .kpis  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid2, .cols3, .split, .tpl { grid-template-columns: minmax(0, 1fr); }
    .st span, .ttl { display: none; }
}
@media (max-width: 860px) {
    .tplrow { grid-template-columns: 1fr 1fr; }
    .tplrow > :first-child { grid-column: 1 / -1; }
    .side { position: fixed; left: -280px; top: 0; bottom: 0; }
    .side.open { left: 0; }
    .burger { display: block; }
    .content { padding: 16px; }
    .pb { padding: 0 10px; }
}

/* ── Карта на склада (модул 4) ─────────────────────────────────────────── */
.maplegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink2); }
.maplegend span { display: inline-flex; align-items: center; gap: 6px; }
.maplegend .mbin { cursor: default; }
.mapzone { padding: 14px 16px; margin-bottom: 14px; }
.mapzhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--ink2); }
.mapzhead b { color: var(--ink); }
.mapzhead .grow { flex: 1; }
.maprows { display: flex; flex-direction: column; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.maprow { display: flex; align-items: flex-end; gap: 4px; }
.maprowlbl { width: 26px; flex: 0 0 26px; font-weight: 800; color: var(--sky-d); align-self: center; }
.maprack { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.maprackno { font-size: 10px; color: var(--ink3); margin-top: 2px; }
.mbin { display: block; width: 26px; height: 14px; border-radius: 3px; border: 1px solid var(--line2); background: #fff; padding: 0; cursor: pointer; position: relative; }
.mbin.none { visibility: hidden; cursor: default; }
.mbin.s1 { background: var(--ok-bg);     border-color: var(--ok); }
.mbin.s2 { background: var(--orange-bg); border-color: var(--orange); }
.mbin.s3 { background: var(--warn-bg);   border-color: var(--warn); }
.mbin.s4 { background: var(--bad-bg);    border-color: var(--bad); }
.mbin.res::after, .mtile.res::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--sky-d); }
.mbin.cnt, .mtile.cnt { outline: 2px solid var(--teal); outline-offset: 1px; }
.mbin.off, .mtile.off { opacity: .35; }
.mbin.hit, .mtile.hit { outline: 2px solid var(--sky-d); outline-offset: 1px; box-shadow: 0 0 0 4px var(--pale); }
.mbin.dim, .mtile.dim { opacity: .25; }
.mbin:not(.none):hover { transform: scale(1.15); }
.maptiles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mtile { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line2); background: #fff;
         font-size: 12px; cursor: pointer; position: relative; color: var(--ink); }
.mtile small { font-weight: 800; }
.mtile.s1 { background: var(--ok-bg);     border-color: var(--ok); }
.mtile.s2 { background: var(--orange-bg); border-color: var(--orange); }
.mtile.s3 { background: var(--warn-bg);   border-color: var(--warn); }
.mtile.s4 { background: var(--bad-bg);    border-color: var(--bad); }

/* ── Справки с FastReport (ReportView) ──────────────────────────────────────
   Страниците на сив фон, както в преглед за печат; лентата на FastReport е отгоре и остава при превъртане. */
.repview {
    height: calc(100vh - 290px); min-height: 440px; overflow: auto;
    background: #525659; border-radius: 16px; box-shadow: var(--sh);
}
.repview > div[class$="-container"] { background: transparent !important; min-width: 100%; width: max-content; }
.repview .fr-toolbar { margin: 0 auto; border-radius: 0 0 12px 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.repview .fr-webreport-body, .repview .fr-webreport-report { background: transparent; width: auto !important; }
.repview .frpage-container { padding: 22px 22px 6px; gap: 22px; }
.repview .frpage-container > div { box-shadow: 0 12px 32px rgba(0, 0, 0, .35); border-radius: 2px; }

/* 3D изгледът на склада (Store3dView върху wwwroot/store3d.js) — тъмен фон, за да се вижда светещото място */
.s3 { position: relative; width: 100%; height: 100%; min-height: 320px; border-radius: 14px; overflow: hidden;
      background: #0B2540; box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .18); }
.s3 canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; outline: none; }
.s3.placing canvas { cursor: crosshair; }
.s3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.s3-label { position: absolute; left: 0; top: 0; padding: 3px 9px; border-radius: 8px; white-space: nowrap;
            font: 700 12px var(--mono); color: #fff; background: rgba(15, 23, 42, .8); border: 1px solid rgba(255, 255, 255, .28); }
.s3-label.glow { background: #fff; color: var(--ink); border-color: #fff; box-shadow: inset 5px 0 0 var(--gc, transparent), 0 0 18px rgba(255, 255, 255, .75); }
/* Със съдържанието: артикулите и под всеки „количество · опаковки“ (без кода на мястото) */
.s3-label.rich { max-width: 320px; padding: 6px 10px 7px; line-height: 1.3; border-radius: 10px; }
.s3-label.compact { padding: 3px 9px; border-radius: 8px; }
.s3-label.compact span:not(:first-child) { display: none; }
.s3-label.stock { background: rgba(15, 23, 42, .72); }
.s3-label span { display: block; overflow: hidden; text-overflow: ellipsis; }
.s3-label .a { font: 600 12px 'Inter', -apple-system, 'Segoe UI', sans-serif; color: #fff; }
.s3-label .d { font: 500 11px var(--mono); color: rgba(255, 255, 255, .7); }
.s3-label .d + .a { margin-top: 4px; }
.s3-label .m { margin-top: 3px; font: 600 11px 'Inter', -apple-system, 'Segoe UI', sans-serif; color: rgba(255, 255, 255, .6); }
.s3-label.glow .a { color: var(--ink); }
.s3-label.glow .d, .s3-label.glow .m { color: var(--ink2); }
/* „Оцвети по“ — последният ред: стойността на режима с точка в цвета на мястото */
.s3-label .p { margin-top: 5px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .18); font: 600 11px 'Inter', -apple-system, 'Segoe UI', sans-serif; color: #fff; }
.s3-label .p::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--pc); }
.s3-label.glow .p { color: var(--ink); border-top-color: var(--line); }
/* „Съдържание на местата“ — горе вдясно върху изгледа */
.s3checks { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.s3check { display: flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 10px;
           border: 1px solid rgba(255, 255, 255, .22); background: rgba(15, 23, 42, .55); color: #fff; backdrop-filter: blur(6px);
           font: 600 13px 'Inter', -apple-system, 'Segoe UI', sans-serif; cursor: pointer; }
.s3check:hover { background: rgba(2, 132, 199, .7); }
.s3check.on .mud-icon-root { color: #38BDF8; }
.model3d { height: 360px; }
/* „База“ (BazaView върху wwwroot/campus3d.js): кодовете над сградите, подсказката под мишката, групите в списъка */
.s3-label.c3code { padding: 2px 7px; border-radius: 7px; font-size: 11px; background: rgba(15, 23, 42, .62); border-color: rgba(255, 255, 255, .2); }
.s3-label.c3tip { pointer-events: none; z-index: 2; white-space: pre; font: 600 12.5px/1.45 'Inter', -apple-system, 'Segoe UI', sans-serif; background: rgba(15, 23, 42, .88); }
.s3item.c3group { margin-top: 6px; padding: 6px 10px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); background: var(--pale2); }
.s3item.c3group:first-child { margin-top: 0; }
.s3item.c3group.on { background: var(--pale); }
.c3card .sech { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--navy); }
.c3hint { font-size: 12px; }
.c3warn { padding: 8px 10px; border-radius: 9px; font-size: 12.5px; line-height: 1.4; color: var(--ink); background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn); }

/* 3D складът (Store3dDialog) — изгледът и страничният панел */
.s3title { display: flex; align-items: center; gap: 10px; }
.s3title .grow { flex: 1; }
.s3mode { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--pale2); border: 1px solid var(--line); }
.s3mode button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font: 700 13px inherit; color: var(--ink2); cursor: pointer; }
.s3mode button.on { background: linear-gradient(135deg, var(--sky), var(--sky-d)); color: #fff; box-shadow: 0 6px 14px -6px rgba(2, 132, 199, .8); }
.s3dlg { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; height: calc(100vh - 150px); }
.s3dlg.page { flex: 1 1 0; height: auto; min-height: 520px; }   /* страницата: цялата височина под горната лента */
.s3head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.s3head .grow { flex: 1; }
.s3tabs { flex: none; }
.s3tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; }
.s3side .sec.s3tab { min-height: 260px; }
.s3tab .s3list { flex: 1; min-height: 0; max-height: none; }
.s3tab .s3item .two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s3legend { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 12px; padding-left: 8px; border-left: 2px solid var(--line); }
.s3more { padding: 6px 10px; font-size: 12.5px; }
.s3item.static { cursor: default; }
.s3item.static:hover { background: transparent; }
.s3item .grow { flex: 1; min-width: 0; }
.s3sw { flex: none; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .25); }
.s3main { position: relative; min-height: 0; }
.s3tools { position: absolute; left: 12px; top: 12px; right: 236px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; pointer-events: none; }
.s3tools > * { pointer-events: auto; }
.s3tools button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
                  border: 1px solid rgba(255, 255, 255, .22); background: rgba(15, 23, 42, .55); color: #fff; backdrop-filter: blur(6px); }
.s3tools button:hover { background: rgba(2, 132, 199, .7); }
/* „Оцвети по“ — до бутоните на изгледа; легендата със степените — долу вляво */
.s3paint { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 2px; border-radius: 11px;
           border: 1px solid rgba(255, 255, 255, .22); background: rgba(15, 23, 42, .55); backdrop-filter: blur(6px); }
.s3paint .lbl { padding: 0 6px 0 8px; font: 600 12px 'Inter', -apple-system, 'Segoe UI', sans-serif; color: rgba(255, 255, 255, .65); }
.s3tools .s3paint button { width: auto; height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; backdrop-filter: none;
                           font: 600 12.5px 'Inter', -apple-system, 'Segoe UI', sans-serif; }
.s3tools .s3paint button:hover { background: rgba(255, 255, 255, .12); }
.s3tools .s3paint button.on { background: linear-gradient(135deg, var(--sky), var(--sky-d)); box-shadow: 0 6px 14px -6px rgba(2, 132, 199, .9); }
.s3key { position: absolute; left: 12px; bottom: 12px; width: 280px; display: flex; flex-direction: column; gap: 1px; padding: 10px 8px 8px;
         border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(15, 23, 42, .74); backdrop-filter: blur(8px);
         color: #fff; font: 500 12.5px 'Inter', -apple-system, 'Segoe UI', sans-serif; }
.s3keyh { display: flex; flex-direction: column; gap: 2px; padding: 0 6px 7px; margin-bottom: 3px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.s3keyh b { font-size: 13.5px; }
.s3keyh span { font-size: 11.5px; line-height: 1.35; color: rgba(255, 255, 255, .65); }
.s3keyrow { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border: 0; border-radius: 8px; background: transparent;
            color: inherit; font: inherit; text-align: left; cursor: pointer; }
.s3keyrow:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.s3keyrow:disabled { opacity: .38; cursor: default; }
.s3keyrow .grow { flex: 1; }
.s3keyrow b { font-variant-numeric: tabular-nums; }
.s3sw.pulse { animation: s3pulse 1.6s ease-in-out infinite; }
@keyframes s3pulse { 50% { opacity: .35; } }
.s3note { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: 80%; text-align: center;
          padding: 8px 14px; border-radius: 10px; font-size: 13px; color: #fff; background: rgba(15, 23, 42, .72); backdrop-filter: blur(6px); }
.s3side { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.s3side .sec.grow { flex: 1; min-height: 180px; }
.s3side .sec > .mud-input-control { flex: none; }
.s3xyz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.s3row2 { display: flex; align-items: center; gap: 2px; }
.s3list { overflow-y: auto; max-height: 340px; display: flex; flex-direction: column; gap: 2px; }
.s3item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.s3item:hover { background: var(--pale2); }
.s3item.on { background: var(--pale); box-shadow: inset 3px 0 0 var(--sky); }
.s3item .dirty { color: var(--orange); font-size: 11px; }
.s3glow { padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--navy); background: var(--pale); }
.sech .b3d .mud-button-root { text-transform: none; letter-spacing: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line2); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--sky), 0 4px 10px -4px rgba(2, 132, 199, .8); }
/* Картонът на служителя (EmployeeDialog): заглавие, зачислени потребители, история на версиите */
.emphead { display: flex; align-items: center; gap: 12px; }
.emphead > i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; font-style: normal; font-weight: 800;
               color: #fff; background: linear-gradient(135deg, #DB2777, #BE185D); box-shadow: 0 8px 18px -8px rgba(190, 24, 93, .7); }
.emphead > div { display: flex; flex-direction: column; }
.emphead b { font-size: 16px; }
.emphead span { color: var(--ink3); font-size: 12.5px; }
.emphead .grow { flex: 1; }
.useremp { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--pale2); border: 1px solid var(--line); }
.useremp > i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-style: normal; font-weight: 800;
               color: #fff; background: linear-gradient(135deg, #DB2777, #BE185D); }
.useremp > div { display: flex; flex-direction: column; }
.useremp span { color: var(--ink3); font-size: 12.5px; }
.emplink { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); }
.emplink .grow { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.emplink small { font-size: 12px; color: var(--ink2); }
.emplink.off { opacity: .6; background: var(--pale2); }
.empver { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.empver:last-child { border-bottom: 0; }
.empver > b { flex: none; width: 34px; color: #BE185D; }
.empver .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.empver small { font-size: 12px; color: var(--ink2); }
.empver s { color: var(--ink3); }

.login-error.login-info { background: var(--pale); color: var(--sky-d); border-color: rgba(2, 132, 199, .25); }

/* Диалогът за избор: търсенето и „Нов“ на един ред */
.pickhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pickhead .grow { flex: 1; }

/* Групиране в таблица (Движения → По партиди): редът на групата се разгъва, движенията под него са по-светли */
.tblbar { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; }
.tblbar .grow { flex: 1; }
.tbl tr.grp { cursor: pointer; background: var(--pale2); }
.tbl tr.grp:hover { background: var(--pale); }
.tbl tr.grp.open { box-shadow: inset 3px 0 0 var(--sky); }
.tbl tr.grp b .mud-icon-root { vertical-align: middle; color: var(--sky-d); }
.tbl tr.grpitem td { font-size: 12.5px; background: #fff; }
.tbl tr.grpitem td:first-child { padding-left: 32px; }

/* Прикачени файлове (AttachmentsPanel, AttachFilesDialog) */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border-radius: 14px; cursor: pointer;
            text-align: center; border: 2px dashed var(--line2); background: var(--pale2); color: var(--ink2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--sky); background: var(--pale); }
.dropzone .mud-icon-root { font-size: 36px; color: var(--sky); }
.dropzone b { color: var(--ink); }
.dropzone span { font-size: 12.5px; color: var(--ink3); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.attpicked, .attbatch { display: flex; flex-direction: column; gap: 2px; }
.attbatch { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); }
.atthead { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; font-size: 12.5px; }
.attdesc { color: var(--ink); font-size: 13px; white-space: pre-line; }
.attrow { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 8px; font-size: 13px; }
.attrow:hover { background: var(--pale2); }
.attrow .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attrow.off { opacity: .6; }
.attrow .mud-icon-root { color: var(--sky-d); }
.attname { display: block; border: 0; background: none; padding: 0; text-align: left; font: inherit; font-weight: 600; color: var(--sky-d); cursor: pointer; }
.attname:hover { text-decoration: underline; }
.attcount { display: inline-flex; align-items: center; gap: 2px; }

/* Иконката „3D“ до място в таблиците (Bin3dButton) */
.b3d { display: inline-flex; vertical-align: middle; margin: -6px 0 -6px 2px; }
.b3d .mud-icon-button { padding: 3px; }
.b3d .mud-icon-root { font-size: 18px; }
@media (max-width: 900px) {
    .s3dlg, .s3dlg.page { grid-template-columns: minmax(0, 1fr); height: auto; }
    .s3main { height: 60vh; }
}

/* Поле за избор с бутон до него (например „Място“ и „3D“ в инвентаризацията) */
.pickwith { display: flex; gap: 8px; align-items: flex-start; }
.pickwith .pickfield { flex: 1; min-width: 0; }
.pickwith > .mud-button-root { margin-top: 6px; height: 40px; flex: none; }

/* „About“ (AboutDialog върху wwwroot/about3d.js) — цялото е тъмната сцена */
.about-dlg { border-radius: 18px !important; overflow: hidden; }
.about-dlg .mud-dialog-content { padding: 0 !important; margin: 0 !important; }
.about3d { position: relative; height: 360px; background: #0B2540; }
.about3d-stage { position: absolute; inset: 0; }
.about3d-stage canvas { display: block; width: 100%; height: 100%; }
.about3d-copy { position: absolute; right: 26px; bottom: 20px; color: rgba(224, 242, 254, .72); font-size: 13px; letter-spacing: .06em; }
.about3d-close { position: absolute; top: 10px; right: 10px; }
.about3d-close .mud-icon-button { color: rgba(224, 242, 254, .8); }
.about3d-close .mud-icon-button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
@media (max-width: 600px) { .about3d { height: 260px; } }

/* Артикули: материалите от SKLAD, които чакат мярка на WHP */

/* Двоен номер на СР: двете разписки една до друга; на WHP — синя черта */
.dupgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dupcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-x: auto; }
.dupcard.whp { border-left: 4px solid var(--sky); }
.duph { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dupnav { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.duplist { margin: 6px 0; padding-left: 18px; }
.dupfix { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .dupgrid { grid-template-columns: 1fr; } }

/* ── Складови разписки: списъкът ──────────────────────────────────────── */
.rbar { padding: 10px 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rbar .grow { flex: 1 1 300px; }
.rbar .mud-input-control { margin: 0 !important; }
.seg.lg button { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 14px; }
.seg button em { font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--ink2); }
.seg button.on em { background: var(--pale); color: var(--sky-d); }
.seg button .dot { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; display: block; }
.monthnav { display: flex; align-items: center; gap: 2px; height: 42px; padding: 0 4px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; }
.monthnav b { min-width: 140px; text-align: center; font-size: 14px; }
.rtbl th, .rtbl td { padding-left: 10px; padding-right: 10px; }
.rtbl td { height: auto; padding-top: 11px; padding-bottom: 11px; vertical-align: top; }
.rtbl td.go { vertical-align: middle; }
.rtbl td.sup { min-width: 160px; }
.rtbl .two small { white-space: nowrap; }
.rtbl tr.open td { background: #FFFBEB; }
.rtbl tr.open td:first-child { box-shadow: inset 4px 0 0 #F59E0B; }
.rtbl tr.draft td:first-child { box-shadow: inset 4px 0 0 var(--ink3); }
.rtbl tr.old td { color: var(--ink2); }
.rtbl td.go { width: 24px; padding-left: 2px; padding-right: 8px; color: var(--ink3); }
.rtbl .progcell { min-width: 130px; }
.atbl th, .atbl td { padding-left: 10px; padding-right: 10px; }
.atbl td { height: auto; padding-top: 10px; padding-bottom: 10px; vertical-align: top; }
.atbl td.go { vertical-align: middle; width: 24px; color: var(--ink3); }
.atbl td small.mono { font-size: 11.5px; color: var(--ink2); }
.atbl td small.bn { display: block; white-space: nowrap; }
.actv { color: var(--ok); }
.glist { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 18px; align-items: baseline; min-width: 220px; }
.glist .gn { font-weight: 600; }
.glist .gq { font-weight: 700; text-align: right; white-space: nowrap; }
.rno { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--navy); }
.rno.none { font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink3); }
.how { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.how .mud-icon-root { font-size: 17px; color: var(--sky-d); }
.how.muted, .how.muted .mud-icon-root { color: var(--ink3); }
.tblfoot { display: flex; gap: 24px; flex-wrap: wrap; padding: 12px 16px 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.tblfoot b { color: var(--ink); }

/* ── Складови разписки: разписката и редът ───────────────────────────── */
.mud-dialog-actions .grow { flex: 1; }
.rhead { display: flex; align-items: center; gap: 16px; padding-right: 44px; }
.rbig { min-width: 92px; height: 56px; padding: 0 14px; border-radius: 14px; background: var(--pale2); border: 1px solid var(--line2);
        display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.rwho { flex: 1; min-width: 0; }
.rwho small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.rwho h3 { margin: 3px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rwho p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink2); font-weight: 500; }
.rsteps { display: flex; align-items: center; gap: 6px; flex: none; }
.rst { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink3); }
.rst i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800;
         border: 2px solid var(--line2); background: #fff; color: var(--ink3); }
.rst small { display: block; font-size: 11px; font-weight: 600; color: var(--ink3); }
.rst.now { color: var(--sky-d); }
.rst.now i { border-color: var(--sky); background: var(--sky); color: #fff; box-shadow: 0 0 0 4px var(--pale); }
.rst.done { color: var(--ok); }
.rst.done i { border-color: var(--ok); background: var(--ok); color: #fff; }
.rsline { width: 36px; height: 2px; border-radius: 2px; background: var(--line2); }
.rsline.done { background: var(--ok); }

.rdoc { display: flex; flex-direction: column; gap: 12px; }
.rdoc .sech { gap: 12px; justify-content: flex-start; }
.rform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.rform .mud-input-control { margin: 0 !important; }
.rform .span2 { grid-column: span 2; }
.rform .span4 { grid-column: 1 / -1; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); background: #fff; border: 1px solid var(--line);
         border-radius: 14px; overflow: hidden; }
.facts div { background: #fff; padding: 9px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
             box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.facts small { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink3); }
.facts b { font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.facts div.recv { background: var(--recv-bg); }
.facts div.recv b { font-family: var(--mono); color: var(--orange); }
.facts div.warn b { color: var(--warn); }

.rprog { display: flex; align-items: center; gap: 22px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.rprog .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.rprog .big small { font-size: 14px; font-weight: 600; color: var(--ink2); letter-spacing: 0; }
.rprog .mid { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.rprog .wide { height: 12px; border-radius: 99px; background: var(--pale); display: flex; overflow: hidden; }
.rprog .wide i { display: block; height: 100%; }
.rprog .legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink2); }
.rprog .legend span { display: flex; align-items: center; gap: 6px; }
.rprog .legend i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.rprog .g { background: var(--ok); }
.rprog .a { background: #F59E0B; }
.rprog .w { background: var(--pale); border: 1px solid var(--line2); }
.rprog .worker { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.rprog .worker .mud-icon-root { color: var(--sky-d); font-size: 26px; }
.rprog .worker b { display: block; font-size: 14px; }
.rprog .worker span { font-size: 12px; color: var(--ink2); }
.rhint { font-size: 12.5px; color: var(--ink3); line-height: 1.45; }

.tblwrap.flat { padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.rlines td { height: auto; padding-top: 9px; padding-bottom: 9px; vertical-align: top; }
.rlines td.kn { max-width: 230px; }
.rlines td.kn small { white-space: normal; }
.rlines tr.hurow td { padding-top: 0; background: #FBFDFF; }
.rlines tr:has(+ tr.hurow) td { border-bottom: none; }
.hutiles { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.tile { display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
        font-size: 12.5px; color: var(--ink2); }
.tile b { font-size: 13px; color: var(--navy); }
.tile .tp { font-family: var(--mono); font-weight: 700; }
.tile.done { border-color: #A7F3D0; background: #F0FDF7; }
.tile.done .tp { color: var(--ok); }
.tile.ramp { border-color: var(--recv-line); background: var(--recv-bg); }
.tile.ramp .tp { color: var(--orange); }
.tile.wait { border-style: dashed; border-color: var(--line2); }
.tile.wait .tp { font-family: inherit; font-weight: 600; color: var(--ink3); }
.tile.off { opacity: .55; }
.tile.off .tp { font-family: inherit; }
.addline { width: 100%; height: 46px; border: 2px dashed var(--line2); border-radius: 12px; background: var(--pale2); color: var(--sky-d); cursor: pointer;
           display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 700; }
.addline:hover { background: var(--pale); }

.howto { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.howto .opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line2); background: #fff; }
.howto .oi { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.howto .oi .mud-icon-root { font-size: 24px; }
.howto .t .oi { background: var(--pale); color: var(--sky-d); }
.howto .n .oi { background: var(--ok-bg); color: var(--ok); }
.howto .ot { flex: 1; min-width: 0; }
.howto .ot b { display: block; font-size: 15px; }
.howto .ot span { display: block; margin-top: 3px; font-size: 13px; color: var(--ink2); line-height: 1.45; }

.matcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--req-filled-line); background: var(--req-filled); }
.matcard.bad { border-color: #FDE68A; background: var(--warn-bg); }
.matcard .mi { width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--ok); display: grid; place-items: center; flex: none; }
.matcard .mt { flex: 1; min-width: 0; }
.matcard .mt b { display: block; font-size: 16px; }
.matcard .mt span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink2); }
.calc { display: flex; flex-direction: column; gap: 1px; padding: 5px 12px; min-height: 40px; border-radius: 10px; background: var(--pale2); border: 1px solid var(--line); }
.calc small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.calc b { font-size: 14px; }
.calc span { font-size: 12px; color: var(--ink2); }
.verdict { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink2); padding-left: 8px; }
.verdict b { color: var(--ink); }

@media (max-width: 1100px) {
    .rform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .howto { grid-template-columns: 1fr; }
    .rhead { flex-wrap: wrap; }
}

/* ── Връзката със сървъра и грешка в програмата (наши вместо английските на Blazor, App.razor) ──────── */
/* MudBlazor стилизира същите два елемента (непрозрачен фон, главни букви, червена лента) — тук надделява нашият вид. */
#components-reconnect-modal { display: none; position: fixed; inset: 0; z-index: 20000 !important; align-items: center; justify-content: center;
                              background-color: rgba(12, 74, 110, .28) !important; backdrop-filter: blur(2px); }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected, #components-reconnect-modal.components-reconnect-resume-failed,
#components-reconnect-modal.components-reconnect-paused { display: flex; }
.reconn-card { width: min(500px, calc(100vw - 32px)); padding: 22px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
               box-shadow: var(--sh-lg); font-family: Inter, system-ui, sans-serif; color: var(--ink); }
.reconn-state { display: none; gap: 16px; align-items: flex-start; }
.components-reconnect-show .r-wait, .components-reconnect-failed .r-failed, .components-reconnect-paused .r-paused,
.components-reconnect-rejected .r-reload, .components-reconnect-resume-failed .r-reload { display: flex; }
.reconn-icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--pale); color: var(--sky-d); }
.reconn-icon.bad { background: var(--bad-bg); color: var(--bad); }
.reconn-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reconn-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--sky); animation: reconn-spin .9s linear infinite; }
@keyframes reconn-spin { to { transform: rotate(360deg); } }
.reconn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.reconn-text b { font-size: 17px; font-weight: 800; }
.reconn-text span { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.reconn-text small { font-size: 12.5px; color: var(--ink3); }
.r-next { display: none; }
.components-reconnect-retrying .r-next { display: block; }
#components-reconnect-modal .reconn-btn, #blazor-error-ui .reconn-btn {
    margin: 6px 0 0 !important; height: 38px; min-width: 0; padding: 0 18px; border: none; border-radius: 10px; background: var(--sky); color: #fff;
    cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0; line-height: 1; text-transform: none; text-decoration: none; flex: none;
}
#components-reconnect-modal .reconn-btn:hover, #blazor-error-ui .reconn-btn:hover { background: var(--sky-d); }
#components-reconnect-modal .reconn-btn:disabled { opacity: .6; cursor: default; }
#blazor-error-ui { display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20001; width: min(760px, calc(100vw - 32px));
                   padding: 0; background: transparent; color: var(--ink); box-shadow: none; }
.errbar { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid #FECACA;
          box-shadow: var(--sh-lg); font-family: Inter, system-ui, sans-serif; color: var(--ink); }
#blazor-error-ui .errbar .reconn-btn { margin: 0 !important; }
#blazor-error-ui .errbar-x { position: static; width: 34px; height: 34px; flex: none; border: none; border-radius: 10px; background: transparent; color: var(--ink3);
                             font-size: 22px; cursor: pointer; }
#blazor-error-ui .errbar-x:hover { background: var(--pale2); color: var(--ink); }

/* ── Система → Достъп ───────────────────────────────────────────────────── */
.acc-gate { max-width: 440px; margin: 24px auto; padding: 28px 28px 24px; display: flex; flex-direction: column; }
.acc-gate h2 { margin: 12px 0 6px; font-size: 19px; }
.acc-gate p { margin: 0 0 18px; color: var(--ink2); font-size: 13.5px; line-height: 1.5; }
.acc-gate-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--pale); color: var(--sky-d); }
.acc-gate-ic .mud-icon-root { font-size: 26px; }
.acc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.acc-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acc-sec { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; background: #fff; }
.acc-sec .areah { padding: 0 0 8px; }
.kv.one { grid-template-columns: 1fr; gap: 8px; }
.kv.one b { overflow-wrap: anywhere; }
.acc-ua { margin-top: 12px; display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: var(--pale2); }
.acc-ua small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); flex: none; }
.acc-ua span { font-size: 12.5px; overflow-wrap: anywhere; }
.acc-h { margin: 16px 0 6px; }
.acc-none { padding: 6px 2px; }
.acc-more { padding: 10px 14px; font-size: 12.5px; }
.tbl tr.sel td { background: var(--pale); }
@media (max-width: 1400px) { .acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── KIP: редове с планове, характеристики, стъпки (PlanRowsEditor, DeviceKindDialog, ChecklistDialog) ── */
.planrow { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--pale2); display: flex; flex-direction: column; gap: 8px; }
.planrow .pr-main, .planrow .pr-sub, .editrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.planrow .pr-sub > .pickfield { flex: 1; min-width: 180px; }
.editrow { border-bottom: 1px dashed var(--line); padding: 6px 0; }
.editrow > .grow, .editrow > .pickfield { flex: 1; min-width: 160px; }
.devhead { display: flex; gap: 14px; align-items: center; }
.devhead .bc { font-size: 22px; font-weight: 800; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 4px 14px; font-size: 13.5px; }
.kv > span:nth-child(odd) { color: var(--ink3); }
.doclist .rolerow a { color: var(--sky-d); font-weight: 600; text-decoration: none; cursor: pointer; }
/* Много филтри в заглавието — пренасят се на нов ред, описанието не се смачква. */
.phead { flex-wrap: wrap; }
.phead .t { flex: 1 1 320px; }
.phead .acts { flex-wrap: wrap; align-items: center; flex-shrink: 1; justify-content: flex-end; }

/* ── KIP: 3D изглед (Site3dView, site3d.js) ── */
.s3-pick { min-width: 260px; }
.s3-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 12px; height: calc(100vh - 210px); min-height: 480px; }
.s3-host { position: relative; overflow: hidden; padding: 0; }
.s3-canvas { position: absolute; inset: 0; }
.s3-canvas canvas { display: block; }
.s3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.s3-label { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; padding: 2px 7px; border-radius: 8px; font: 700 11.5px/1.3 "JetBrains Mono", monospace;
            color: #fff; background: rgba(15, 23, 42, .78); border: 1px solid rgba(255, 255, 255, .25); white-space: nowrap; }
.s3-label.s3-bad { background: #B91C1C; } .s3-label.s3-warn { background: #B45309; } .s3-label.s3-due { background: #0369A1; }
.s3-label.s3-ok { background: rgba(4, 120, 87, .85); } .s3-label.s3-none { background: rgba(71, 85, 105, .85); }
.s3-label.s3-flash { outline: 3px solid #FDE047; }
.s3-info { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #E0F2FE; pointer-events: none; }
.s3-info a { pointer-events: auto; cursor: pointer; text-decoration: underline; }
.s3-placing { background: #FDE047; color: #0F172A; padding: 2px 8px; border-radius: 8px; pointer-events: auto; }
.s3-legend { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #E0F2FE; }
.s3-legend i, .s3-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; flex: none; }
.s3-side { padding: 10px; overflow-y: auto; }
.s3-row { display: flex; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.s3-row:hover { background: var(--pale2); }
.s3-dot.s3-bad { background: #DC2626; } .s3-dot.s3-warn { background: #F59E0B; } .s3-dot.s3-due { background: #0284C7; }
.s3-dot.s3-ok { background: #10B981; } .s3-dot.s3-none { background: #94A3B8; }
@media (max-width: 900px) { .s3-wrap { grid-template-columns: 1fr; height: auto; } .s3-host { height: 60vh; } }

/* ── KIP: дървовидни таблици (Видове уреди по специалност, Уреди по специалност → място) ── */
.tbl tr.grp td { background: var(--pale2); font-weight: 700; cursor: pointer; user-select: none; }
.tbl tr.grp td .ch { display: inline-flex; vertical-align: middle; color: var(--sky-d); }
.tbl tr.grp td .cnt { margin-left: 8px; font-weight: 600; color: var(--ink3); font-size: 12px; }
.tbl tr.grp.lvl0 td { background: var(--pale); color: var(--navy); }

.s3-label.s3-glow { background: #FDE047 !important; color: #0F172A; outline: 2px solid #fff; z-index: 2; font-size: 13px; }
.s3-dialog { height: calc(100vh - 210px); min-height: 420px; position: relative; border-radius: 14px; overflow: hidden; }
.mud-dialog:has(.s3-dialog) { width: 96vw; max-width: 96vw !important; }
.dev3d { display: inline-flex; vertical-align: middle; margin-left: 4px; }

/* Диалози с раздели (MudTabs): постоянна височина 70% от екрана — не растат и не се свиват при смяна на раздела. */
.tabdlg { height: 70vh; overflow-y: auto; }

/* ── KIP: календар (KalendarView) ── */
.cal-nav { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; flex-wrap: wrap; }
.cal-month { font-size: 18px; text-transform: capitalize; min-width: 170px; text-align: center; }
.cal-legend { font-size: 12px; color: var(--ink2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-legend i, .cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; flex: none; }
.cal-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; padding: 0; overflow: hidden; background: var(--line); }
.cal-dow { background: var(--pale2); text-align: center; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--ink3); padding: 6px 0; }
.cal-day { background: #fff; min-height: 104px; padding: 4px 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-day:hover { background: var(--pale2); }
.cal-day.out { background: #FAFBFC; color: var(--ink3); }
.cal-day.today .cal-num { background: var(--sky); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-day.sel { outline: 2px solid var(--sky); outline-offset: -2px; }
.cal-num { font-weight: 800; font-size: 13px; }
.cal-pill { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 0 6px; border-radius: 8px; margin-right: 3px; color: #fff; }
.cal-item { font: 700 11px/1.35 "JetBrains Mono", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; padding-left: 4px; }
.cal-item span { font-family: Inter, sans-serif; font-weight: 500; color: var(--ink2); }
.cal-more { font-size: 11px; color: var(--ink3); }
.cal-side { padding: 10px; max-height: 760px; overflow-y: auto; }
.t-done { background: #10B981; border-color: #10B981; } .t-plan { background: #0284C7; border-color: #0284C7; }
.t-wait { background: #F59E0B; border-color: #F59E0B; } .t-bad { background: #DC2626; border-color: #DC2626; }
.t-future { background: #94A3B8; border-color: #94A3B8; }
.cal-item.t-done, .cal-item.t-plan, .cal-item.t-wait, .cal-item.t-bad, .cal-item.t-future { background: none; }
@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } .cal-day { min-height: 70px; } .cal-item { display: none; } }

/* ── Курсове на маршрут, раздели в избора, склад ── */
.startrow { gap: 10px; align-items: center; }
.startrow .days { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.daybtn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 7px; font-size: 12px; cursor: pointer; color: var(--ink2); }
.daybtn.on { background: var(--pale); border-color: var(--sky-d); color: var(--sky-d); font-weight: 600; }
.pick-sec { position: sticky; top: 0; z-index: 1; background: #f4f7fb; color: var(--ink2); font-size: 12px; font-weight: 700; text-transform: uppercase;
            letter-spacing: .04em; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.store-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.store-tab { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 16px; cursor: pointer; min-width: 170px; text-align: left; }
.store-tab b { display: block; font-size: 22px; }
.store-tab.on { border-color: var(--sky-d); box-shadow: 0 0 0 2px var(--pale); }

/* СПЕШНО — аларма на таблото */
.alarm { display: flex; align-items: center; gap: 16px; background: #DC2626; color: #fff; border-radius: 16px; padding: 18px 22px; margin: 0 0 16px;
         box-shadow: 0 6px 24px rgba(220, 38, 38, .35); animation: alarm-pulse 1.6s ease-in-out infinite; }
.alarm .alarm-ico { font-size: 44px; }
.alarm .alarm-body { flex: 1; font-size: 16px; }
.alarm .alarm-title { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.alarm .alarm-meta { opacity: .85; font-size: 13px; margin-top: 2px; }
@keyframes alarm-pulse { 0%, 100% { box-shadow: 0 6px 24px rgba(220, 38, 38, .35); } 50% { box-shadow: 0 6px 36px rgba(220, 38, 38, .8); } }

/* Таблото — ред „Внимание“ */
.watch { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 0 0 16px; }
@media (max-width: 1100px) { .watch { grid-template-columns: 1fr; } }
.watch-card { padding: 14px 16px; }
.watch-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.watch-ok { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 14px; }
.watch-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px solid var(--line, #eef2f7); font-size: 14px; cursor: pointer; }
.watch-row:hover { background: #f6f9fc; }
.watch-row.bad { color: var(--bad); cursor: default; }

/* Екранът за вход — сваляне на мобилното приложение */
.login-app { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 16px auto 0; width: 100%; max-width: 400px; }
.login-app .muted { font-size: 12px; }
