/* LabStock — общий стиль. Шрифт Inter (SIL OFL 1.1) хранится локально в /fonts */
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/inter-cyrillic-wght-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/inter-latin-wght-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

  :root{
    --sidebar:#f4f4f5; --line:#e5e7eb; --ink:#18181b; --ink2:#3f3f46; --muted:#71717a;
    --link:#2563eb; --green:#16a34a; --green-bg:#ecfdf3;
  }
  *{box-sizing:border-box;margin:0}
  body{font-family:Inter,"SF Pro Text",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:#fff;-webkit-font-smoothing:antialiased}
  .app{display:flex;min-height:100vh}

  /* ---------- Sidebar ---------- */
  aside{width:222px;flex-shrink:0;background:var(--sidebar);border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
  .brand{padding:14px 14px 16px;border-bottom:1px solid var(--line)}
  .brand-row{display:flex;align-items:center;gap:11px}
  .logo{width:37px;height:37px;border-radius:9px;background:linear-gradient(180deg,#e0f2fe,#bae6fd);display:grid;place-items:center;box-shadow:0 1px 2px rgba(0,0,0,.06)}
  .brand h1{font-size:17px;font-weight:700;letter-spacing:-.01em;flex:1}
  .collapse{color:var(--ink2);display:grid;place-items:center}
  .branch{display:flex;align-items:center;gap:6px;margin-top:9px;font-size:9.5px;color:var(--ink2)}
  nav{padding:12px 10px;display:flex;flex-direction:column;gap:6px}
  nav a{display:flex;align-items:center;gap:11px;padding:8px 11px;border-radius:7px;color:var(--ink2);text-decoration:none;font-size:14.5px;font-weight:500}
  nav a svg{width:17px;height:17px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  nav a:hover{background:#ececee}
  nav a.active{background:var(--green-bg);color:var(--green);font-weight:600}
  .me{margin-top:auto;border-top:1px solid var(--line);padding:11px 14px;display:flex;align-items:center;gap:9px}
  .ava{width:27px;height:27px;border-radius:50%;background:#e8f5ee;color:#16a34a;font-size:10.5px;font-weight:700;display:grid;place-items:center;position:relative}
  .ava b{position:absolute;top:-8px;right:-7px;background:#ef4444;color:#fff;font-size:8.5px;font-weight:700;min-width:16px;height:16px;border-radius:8px;display:grid;place-items:center;border:2px solid var(--sidebar);padding:0 3px}
  .me .n{font-size:11px;font-weight:600} .me .r{font-size:9.5px;color:var(--muted)}
  .me .chev{margin-left:auto;color:var(--muted)}

  /* ---------- Main ---------- */
  main{flex:1;min-width:0;background:#fff}
  .topbar{height:41px;border-bottom:1px solid var(--line);background:#f4f4f5;display:flex;align-items:center;padding:0 21px;font-size:12.5px;font-weight:600}
  .content{padding:28px 28px 40px;max-width:none}
  .actions{display:flex;gap:10px;margin-bottom:28px}
  .gbtn{display:inline-flex;align-items:center;gap:9px;height:34px;padding:0 14px;border:0;border-radius:5px;color:#fff;font:500 15px Inter,sans-serif;cursor:pointer;
        background:linear-gradient(90deg,#3b6ff5 0%,#7c4dfa 70%,#a83ef2 100%);box-shadow:0 4px 12px rgba(99,102,241,.28)}
  .gbtn svg{width:14px;height:14px;stroke:#fff;stroke-width:2;fill:none;stroke-linecap:round}

  .kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:28px}
  .kpi{border-radius:16px;padding:20px;color:#fff;min-height:147px;position:relative;box-shadow:0 10px 24px -8px rgba(79,70,229,.45)}
  .kpi.k1{background:linear-gradient(135deg,#3b82f6 0%,#6d4cf0 100%)}
  .kpi.k2{background:linear-gradient(135deg,#6366f1 0%,#3b82f6 100%)}
  .kpi.k3{background:linear-gradient(135deg,#2563eb 0%,#4f46e5 100%)}
  .kpi.k4{background:linear-gradient(135deg,#4f46e5 0%,#1d4ed8 100%)}
  .kpi .ic{width:41px;height:41px;border-radius:10px;background:rgba(255,255,255,.2);display:grid;place-items:center}
  .kpi .ic svg{width:21px;height:21px;stroke:#fff;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .kpi .badge{position:absolute;top:31px;right:20px;background:rgba(255,255,255,.2);border-radius:999px;padding:4px 9px;font-size:10.5px;font-weight:600;display:flex;align-items:center;gap:5px}
  .kpi .badge svg{width:11px;height:11px;stroke:#fff;fill:none;stroke-width:2}
  .kpi .num{font-size:26px;font-weight:800;margin-top:18px;letter-spacing:-.01em;line-height:1.1}
  .kpi .lbl{font-size:12px;font-weight:500;margin-top:5px;opacity:.95}

  .card{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.04)}
  .card-h{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 21px}
  .card-h h2{font-size:16px;font-weight:700;letter-spacing:-.01em;display:flex;align-items:center;gap:9px}
  .card-h h2 svg{width:18px;height:18px;stroke:var(--link);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .card-h p{font-size:12px;color:var(--muted);margin-top:4px}
  .more{color:var(--link);font-size:12.5px;font-weight:500;text-decoration:none;display:flex;align-items:center;gap:6px;white-space:nowrap}
  .more svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
  .progress{margin-bottom:28px}
  .tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;padding:0 21px 21px}
  .tile{border-radius:12px;padding:14px 10px 15px;text-align:center}
  .tile svg{width:19px;height:19px;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .tile .num{font-size:21px;font-weight:800;margin-top:7px}
  .tile .lbl{font-size:11px;color:var(--ink2);margin-top:3px}
  .t-blue{background:#eaf3fd} .t-blue svg{stroke:#3b82f6}
  .t-yellow{background:#fffbeb} .t-yellow svg{stroke:#f59e0b}
  .t-green{background:#ecfdf5} .t-green svg{stroke:#10b981}
  .t-red{background:#fdecec} .t-red svg{stroke:#ef4444}

  .two{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:28px}
  .two .card-h{border-bottom:1px solid var(--line);align-items:center;padding:16px 21px}
  .row{display:flex;justify-content:space-between;align-items:center;padding:13px 14px;border-bottom:1px solid #f0f0f2}
  .row:last-child{border-bottom:0}
  .row .t{font-size:13.5px;font-weight:500;max-width:270px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .row .s{font-size:10.5px;color:var(--muted);margin-top:3px}
  .row .r{text-align:right}
  .row .amt{font-size:13.5px;font-weight:600}
  .pill{white-space:nowrap;display:inline-block;margin-top:5px;padding:2px 7px;border-radius:4px;font-size:10.5px;font-weight:500}
  .p-green{background:#dcfce7;color:#16a34a} .p-red{background:#fde8e8;color:#dc2626}
  .p-yellow{background:#fef3c7;color:#b45309} .p-blue{background:#e0f2fe;color:#0284c7;border-radius:999px;padding:3px 8px}
  .wh{display:flex;align-items:center;gap:11px}
  .wh .av{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#3b82f6);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;flex-shrink:0}

  table{width:100%;border-collapse:collapse;font-size:12.5px}
  th{font-size:10.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);background:#fafafa}
  td{padding:11px 14px;border-bottom:1px solid #f0f0f2}
  tr:last-child td{border-bottom:0}
  td.n{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
  .bar{display:inline-block;width:70px;height:6px;border-radius:3px;background:#eef0f4;overflow:hidden;vertical-align:middle;margin-right:7px}
  .bar i{display:block;height:100%;border-radius:3px}
  .muted{color:var(--muted)}

  /* ---------- Prototype additions ---------- */
  a{color:inherit}
  nav a{cursor:pointer}
  .kpi,.tile{cursor:pointer;transition:transform .15s ease, box-shadow .15s ease}
  .kpi:hover{transform:translateY(-2px);box-shadow:0 14px 28px -8px rgba(79,70,229,.55)}
  .tile:hover{transform:translateY(-2px);box-shadow:0 6px 16px -8px rgba(0,0,0,.18)}
  .gbtn:hover{filter:brightness(1.05)} .gbtn:active{transform:translateY(1px)}
  .more{cursor:pointer}
  .row{cursor:pointer} .row:hover{background:#fafafa}
  .collapse{cursor:pointer;border-radius:6px;width:22px;height:22px} .collapse:hover{background:#e4e4e7}
  aside{transition:width .2s ease}
  .app.mini aside{width:64px}
  .app.mini .brand h1,.app.mini .branch,.app.mini nav a span,.app.mini .me .who,.app.mini .me .chev{display:none}
  .app.mini .brand-row{flex-direction:column;gap:8px}
  .app.mini .collapse svg{transform:rotate(180deg)}
  .app.mini nav a{justify-content:center;padding:9px 0}
  .app.mini .me{justify-content:center;padding:11px 0}
  .me{cursor:pointer;position:relative}
  .me:hover{background:#ececee}
  .menu{position:absolute;bottom:52px;left:10px;right:10px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px -8px rgba(0,0,0,.18);padding:5px;display:none;z-index:20;min-width:180px}
  .menu.open{display:block}
  .menu button{display:flex;width:100%;align-items:center;gap:9px;border:0;background:none;padding:8px 10px;border-radius:6px;font:500 13px Inter,sans-serif;color:var(--ink2);cursor:pointer;text-align:left}
  .menu button:hover{background:#f4f4f5}
  .menu button.danger{color:#dc2626}
  .menu svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

  .topbar{justify-content:space-between}
  .sync{display:flex;align-items:center;gap:10px;font-weight:500;color:var(--muted);font-size:11.5px}
  .sync .dot{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px #dcfce7}
  .ibtn{display:inline-flex;align-items:center;gap:6px;height:27px;padding:0 10px;border:1px solid var(--line);background:#fff;border-radius:6px;font:500 11.5px Inter,sans-serif;color:var(--ink2);cursor:pointer}
  .ibtn:hover{background:#fafafa}
  .ibtn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .spin svg{animation:sp 0.8s linear infinite} @keyframes sp{to{transform:rotate(360deg)}}

  .page-h{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}
  .page-h h2{font-size:20px;font-weight:700;letter-spacing:-.01em}
  .page-h p{font-size:12.5px;color:var(--muted);margin-top:4px}
  .toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid var(--line)}
  .seg{display:inline-flex;background:#f4f4f5;border-radius:8px;padding:3px}
  .seg button{border:0;background:none;padding:6px 12px;border-radius:6px;font:500 12px Inter,sans-serif;color:var(--ink2);cursor:pointer}
  .seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
  .search{flex:1;min-width:200px;position:relative}
  .search input{width:100%;height:32px;border:1px solid var(--line);border-radius:7px;padding:0 10px 0 32px;font:400 12.5px Inter,sans-serif;outline:none}
  .search input:focus{border-color:#93c5fd;box-shadow:0 0 0 3px #dbeafe}
  .search svg{position:absolute;left:10px;top:9px;width:14px;height:14px;stroke:var(--muted);fill:none;stroke-width:2}
  .chips{display:flex;gap:6px;flex-wrap:wrap}
  .chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 11px;font:500 11.5px Inter,sans-serif;color:var(--ink2);cursor:pointer;display:inline-flex;gap:6px;align-items:center}
  .chip b{font-weight:700}
  .chip.on{border-color:transparent;background:var(--ink);color:#fff}
  th.sort{cursor:pointer;user-select:none;white-space:nowrap} th.sort:hover{color:var(--ink)}
  th.sort.asc::after{content:" ↑"} th.sort.desc::after{content:" ↓"}
  tbody tr.r{cursor:pointer} tbody tr.r:hover td{background:#fafbff}
  tr.det td{background:#fafafa;padding:12px 16px 14px}
  .det-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;font-size:12px}
  .det-grid h4{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:6px}
  .mini td{padding:4px 8px;border:0;background:none} .mini{width:auto}
  .norm-edit{border-bottom:1px dashed var(--link);cursor:pointer}
  .tag-manual{font-size:9.5px;color:#7c3aed;background:#f3e8ff;border-radius:4px;padding:1px 5px;margin-left:5px;font-weight:600}
  .sub{font-size:10.5px;color:var(--muted);font-weight:400}
  .empty{padding:36px;text-align:center;color:var(--muted);font-size:13px}
  .foot{padding:10px 16px;font-size:11.5px;color:var(--muted);border-top:1px solid var(--line);display:flex;justify-content:space-between}
  input[type=checkbox]{accent-color:#4f46e5;width:15px;height:15px;cursor:pointer}

  .grid3{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
  .rep{padding:20px 21px;display:flex;flex-direction:column;gap:12px}
  .rep .ic{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,#3b82f6,#6d4cf0)}
  .rep .ic svg{width:19px;height:19px;stroke:#fff;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .rep h3{font-size:15px;font-weight:700} .rep p{font-size:12px;color:var(--muted)}
  .field{display:flex;flex-direction:column;gap:5px;font-size:11.5px;color:var(--muted);font-weight:500}
  .field input,.field select{height:34px;border:1px solid var(--line);border-radius:7px;padding:0 10px;font:400 13px Inter,sans-serif;color:var(--ink);background:#fff;outline:none}
  .field input:focus,.field select:focus{border-color:#93c5fd;box-shadow:0 0 0 3px #dbeafe}
  .frow{display:flex;gap:10px} .frow .field{flex:1}

  .chart{padding:6px 21px 21px}
  .crow{display:grid;grid-template-columns:200px 1fr 70px;gap:12px;align-items:center;padding:7px 0;font-size:12.5px}
  .ctrack{height:12px;background:#f1f2f6;border-radius:6px;overflow:hidden;display:flex}
  .ctrack i{display:block;height:100%}
  .legend{display:flex;gap:16px;font-size:11.5px;color:var(--muted);padding:0 21px 14px}
  .legend span{display:inline-flex;align-items:center;gap:6px} .legend i{width:10px;height:10px;border-radius:3px;display:inline-block}

  .set{padding:20px 21px;display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
  .preview{display:flex;height:12px;border-radius:6px;overflow:hidden;margin:0 21px 20px}

  .overlay{position:fixed;inset:0;background:rgba(24,24,27,.35);display:none;align-items:center;justify-content:center;z-index:50;padding:16px}
  .overlay.open{display:flex}
  .modal{background:#fff;border-radius:16px;width:100%;max-width:400px;box-shadow:0 24px 60px -12px rgba(0,0,0,.35)}
  .modal .mh{padding:18px 20px 6px;font-size:16px;font-weight:700}
  .modal .mb{padding:10px 20px;display:flex;flex-direction:column;gap:12px;font-size:13px;color:var(--ink2)}
  .modal .mf{padding:14px 20px 18px;display:flex;justify-content:flex-end;gap:8px}
  .btn2{height:34px;padding:0 14px;border:1px solid var(--line);background:#fff;border-radius:6px;font:500 13px Inter,sans-serif;cursor:pointer;color:var(--ink2)}
  .btn2:hover{background:#fafafa}

  .toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:#18181b;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;opacity:0;transition:all .25s ease;z-index:60;display:flex;gap:8px;align-items:center;pointer-events:none}
  .toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
  .toast svg{width:16px;height:16px;stroke:#4ade80;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

  .login{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#f4f4f5;padding:16px}
  .login form{background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px;width:100%;max-width:360px;box-shadow:0 10px 30px -12px rgba(0,0,0,.15);display:flex;flex-direction:column;gap:14px}
  .login .brand-row{margin-bottom:6px}
  .login .gbtn{justify-content:center;width:100%;height:38px}
  .err{color:#dc2626;font-size:12px;min-height:16px}
  .hint{font-size:11px;color:var(--muted);text-align:center}

  @media (max-width:900px){
    .kpis{grid-template-columns:repeat(2,1fr)} .two,.grid3{grid-template-columns:1fr} .tiles{grid-template-columns:repeat(2,1fr)}
    .set{grid-template-columns:1fr} .crow{grid-template-columns:120px 1fr 50px}
    .content{padding:20px 16px 40px} .scroll{overflow-x:auto}
  }
  @media (max-width:700px){
    aside{width:56px!important}
    .brand h1,.branch,nav a span,.me .who,.me .chev,.collapse{display:none}
    .brand{padding:12px 9px} nav{padding:10px 6px} nav a{justify-content:center;padding:9px 0}
    .me{justify-content:center;padding:11px 0} .menu{left:6px;right:auto}
    .kpis{grid-template-columns:1fr 1fr;gap:12px} .kpi{padding:14px;min-height:120px} .kpi .badge{display:none}
    .actions{flex-wrap:wrap} .gbtn{font-size:13px}
    .sync>span:not(.dot),.sync{font-size:0} .sync .ibtn{font-size:11.5px}
    .row .t{max-width:170px}
    .stamp{display:none}
  }

  .banner{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:12px;padding:12px 16px;font-size:13px;margin-bottom:20px}
  .sync .auto{color:#a1a1aa}
  @media (max-width:1100px){ .sync .auto{display:none} }
  .loading{position:fixed;inset:0;background:rgba(255,255,255,.7);display:flex;align-items:center;justify-content:center;gap:10px;font-size:14px;color:var(--ink2);z-index:40}
  .loading .sp{width:20px;height:20px;border:3px solid #dbe3f3;border-top-color:#4f46e5;border-radius:50%;animation:sp 1s linear infinite}
  .ro{font-size:12px;color:var(--muted);background:#f4f4f5;border-radius:10px;padding:10px 14px;margin-bottom:16px}

  /* Логотип учреждения */
  .brand{position:relative;text-align:center;padding:18px 14px 14px}
  .brand-row{flex-direction:column;align-items:center;gap:10px}
  .brand .collapse{position:absolute;top:10px;right:8px}
  .org-logo{width:72px;height:72px;border-radius:50%;flex-shrink:0;display:block;object-fit:cover;box-shadow:0 2px 6px rgba(0,0,0,.14);background:#fff}
  .org-name{font-size:12.5px;font-weight:700;line-height:1.35;letter-spacing:-.005em;color:var(--ink)}
  .brand .branch{justify-content:center;margin-top:8px}
  .app.mini .brand{padding:12px 6px}
  .app.mini .brand .collapse{position:static}
  .app.mini .org-logo{width:40px;height:40px}
  .app.mini .org-name{display:none}
  .login-brand{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;margin-bottom:4px}
  .login-brand .org-logo{width:88px;height:88px}
  .login-brand .org-name{font-size:14px}
  @media (max-width:700px){ .org-name{display:none} .org-logo{width:38px;height:38px} .brand .collapse{display:none} .brand{padding:12px 6px} }

  /* окно согласия после входа */
  .cs-lock{overflow:hidden} .cs-lock .app{filter:blur(3px);pointer-events:none;user-select:none}
  .cs-ov{position:fixed;inset:0;background:rgba(24,24,27,.45);display:flex;align-items:center;justify-content:center;z-index:100;padding:16px;overflow:auto}
  .cs-modal{background:#fff;border-radius:16px;width:100%;max-width:560px;box-shadow:0 24px 60px -12px rgba(0,0,0,.45);margin:auto}
  .cs-h{display:flex;gap:14px;align-items:center;padding:22px 24px 4px}
  .cs-h img{width:52px;height:52px;border-radius:50%;flex:none}
  .cs-t{font-size:18px;font-weight:700} .cs-s{font-size:12px;color:var(--muted);margin-top:2px}
  .cs-b{padding:14px 24px 6px;display:flex;flex-direction:column;gap:14px;font-size:13.5px;line-height:1.5;color:var(--ink2)}
  .cs-b b{color:var(--ink)} .cs-b .err:empty{display:none}
  .cs-pts{display:flex;flex-direction:column;gap:10px} .cs-pt{display:flex;gap:12px;align-items:flex-start}
  .cs-ic{flex:none;width:30px;height:30px;border-radius:8px;background:#eef2ff;display:flex;align-items:center;justify-content:center}
  .cs-ic svg{width:16px;height:16px;stroke:#4f46e5;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .cs-warn{display:flex;gap:10px;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:12px 14px;color:#78350f}
  .cs-warn b{color:#78350f} .cs-warn svg{flex:none;width:18px;height:18px;stroke:#d97706;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-top:1px}
  .cs-agree{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:10px;cursor:pointer;user-select:none;color:var(--ink)}
  .cs-agree:hover{background:#fafafa} .cs-agree input{width:18px;height:18px;margin-top:1px;accent-color:#6d5af8;flex:none;cursor:pointer}
  .cs-f{padding:14px 24px 20px;display:flex;justify-content:space-between;align-items:center;gap:10px}
  .cs-note{font-size:11.5px;color:var(--muted)} .cs-btns{display:flex;gap:8px;flex:none}
  .cs-btns .btn2,.cs-btns .gbtn{white-space:nowrap;height:36px} .cs-btns .gbtn{font-size:13.5px;font-weight:600}
  .gbtn:disabled{opacity:.4;cursor:not-allowed;box-shadow:none;filter:none}
  @media (max-width:560px){ .cs-f{flex-direction:column-reverse;align-items:stretch} .cs-btns{justify-content:flex-end} .cs-h{padding:18px 18px 4px} .cs-b{padding:12px 18px 4px} .cs-f{padding:12px 18px 18px} }

  /* уведомление о малых остатках (правый верхний угол) */
  .nt-bell{position:relative;padding:0 8px} .nt-bell svg{width:14px;height:14px}
  .nt-bell.has svg{stroke:#dc2626}
  .nt-bell b{position:absolute;top:-6px;right:-7px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#ef4444;color:#fff;font:700 10px/17px Inter,sans-serif;text-align:center;box-shadow:0 0 0 2px #f4f4f5}
  .nt{position:fixed;top:52px;right:16px;z-index:70;width:400px;max-width:calc(100vw - 32px);background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px -12px rgba(0,0,0,.28),0 2px 6px rgba(0,0,0,.05);overflow:hidden;
      opacity:0;transform:translateY(-8px) scale(.98);transition:opacity .2s ease,transform .2s ease}
  .nt.in{opacity:1;transform:none}
  .nt::before{content:"";display:block;height:3px;background:linear-gradient(90deg,#ef4444,#f97316)}
  .nt-h{display:flex;gap:12px;align-items:flex-start;padding:14px 14px 10px 16px}
  .nt-ic{flex:none;width:34px;height:34px;border-radius:10px;background:#fef2f2;display:flex;align-items:center;justify-content:center}
  .nt-ic svg{width:18px;height:18px;stroke:#dc2626;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .nt-ht{flex:1;min-width:0} .nt-t{font-size:14px;font-weight:700;color:var(--ink)} .nt-s{font-size:12px;color:var(--muted);margin-top:2px}
  .nt-x{flex:none;width:26px;height:26px;border:0;background:transparent;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center}
  .nt-x:hover{background:#f4f4f5} .nt-x svg{width:14px;height:14px;stroke:#71717a;fill:none;stroke-width:2;stroke-linecap:round}
  .nt-l{padding:2px 8px 6px;max-height:330px;overflow:auto}
  .nt-i{padding:9px 8px;border-radius:8px;cursor:pointer} .nt-i:hover{background:#fafafa}
  .nt-i+.nt-i{border-top:1px solid #f4f4f5}
  .nt-n{display:flex;gap:8px;align-items:center;font-size:12.5px;font-weight:600;color:var(--ink)}
  .nt-n span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nt-n em{flex:none;font-style:normal;font-size:10.5px;font-weight:600;color:#4f46e5;background:#eef2ff;border-radius:5px;padding:1px 6px}
  .nt-m{display:flex;gap:8px;align-items:center;margin-top:6px;font-size:11.5px;color:var(--muted)}
  .nt-bar{flex:none;width:90px;height:6px;border-radius:3px;background:#fee2e2;overflow:hidden} .nt-bar i{display:block;height:100%;background:#ef4444;border-radius:3px}
  .nt-q{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .nt-m b{color:#dc2626;font-size:12px}
  .nt-more{font-size:12px;color:var(--muted);padding:6px 8px 2px}
  .nt-f{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px 14px 16px;border-top:1px solid #f4f4f5}
  .nt-f>div{display:flex;gap:6px} .nt-time{font-size:11px;color:var(--muted)}
  .nt-f .btn2,.nt-f .gbtn{height:30px;font-size:12px;padding:0 11px;white-space:nowrap;border-radius:6px} .nt-f .gbtn{font-weight:600;box-shadow:none}
  @media (max-width:560px){ .nt{top:auto;bottom:12px;right:12px;left:12px;width:auto;max-width:none} .nt-time{display:none} }

  /* без мигающего курсора ввода вне полей ввода */
  *{caret-color:transparent}
  input,textarea,select,[contenteditable="true"]{caret-color:auto}
  aside,nav,button,a,.topbar,.nt,.cs-modal .cs-h,label,.pill,.ibtn,.gbtn,.btn2{-webkit-user-select:none;user-select:none}
