/* РЕН Лаборатория 2.0 — фирменный стиль РЕН-Качество (как m.renkachestvo.ru), шрифт Manrope локально */
@font-face{font-family:"Manrope";src:url(manrope.woff2) format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
:root{
  --ren-blue:#2E5A9C; --ren-blue-2:#3468B4; --ren-deep:#16305C; --ren-red:#C62828;
  --bg:#F4F7FB; --panel:#fff; --ink:#16233B; --text:#2A3A55; --mute:#5E6F89; --mute-2:#8494AB;
  --line:#E1E7F0; --line-2:#D3DCE8; --field:#F8FAFD;
  --brand:var(--ren-blue); --brand2:var(--ren-blue-2); --brand-soft:#EAF0F9;
  --ok:#1B7F4B; --ok-soft:#E6F4EC; --warn:#8A5A00; --warn-soft:#FFF4DC; --bad:var(--ren-red); --bad-soft:#FDECEC;
  --grad:linear-gradient(180deg,#3468B4 0%,#2E5A9C 100%);
  --grad-bg:radial-gradient(1200px 760px at 50% -12%,#4272B8 0%,#274E85 46%,#16305C 100%);
  --ring:0 0 0 3px rgba(46,90,156,.18);
  --sh-1:0 1px 2px rgba(22,48,92,.05),0 2px 8px rgba(22,48,92,.05);
  --sh-2:0 1px 2px rgba(22,48,92,.06),0 8px 24px rgba(22,48,92,.08);
  --sh-3:0 24px 64px rgba(10,24,52,.35);
  --r:16px; --r-m:12px; --r-s:10px; --tap:48px;
  font-size:17px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);
  font-family:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-weight:500;line-height:1.45;
  -webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;font-feature-settings:"tnum" 0}
h1,h2,h3,b,strong{color:var(--ink)}
button,input,select,textarea{font:inherit;color:inherit}
[hidden]{display:none!important}

/* иконки (линейные, одна толщина) */
.i{display:inline-block;flex:none;width:1.2em;height:1.2em;background:currentColor;vertical-align:-.22em;
  -webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
.i-refresh{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 5.7'/%3E%3Cpath d='M20 4v7h-7'/%3E%3C/svg%3E")}
.i-ruble{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 20V4h5.5a4 4 0 0 1 0 8H6M6 16h9'/%3E%3C/svg%3E")}
.i-list{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01'/%3E%3C/svg%3E")}
.i-userplus{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M19 8v6M16 11h6'/%3E%3C/svg%3E")}
.i-logout{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3M16 16l4-4-4-4M20 12H10'/%3E%3C/svg%3E")}
.i-menu{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E")}
.i-plus{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
.i-upload{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3M16.5 8.5 12 4 7.5 8.5M12 4v11'/%3E%3C/svg%3E")}
.i-download{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3M7.5 10.5 12 15l4.5-4.5M12 15V4'/%3E%3C/svg%3E")}
.i-disc{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M7.5 9.5a5 5 0 0 1 2-2'/%3E%3C/svg%3E")}
.i-check{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 6.5 9.5 17l-5-5'/%3E%3C/svg%3E")}
.i-x{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 6.5l-11 11M6.5 6.5l11 11'/%3E%3C/svg%3E")}
.i-back{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E")}
.ico{display:none}

/* кнопки */
.btn{min-height:var(--tap);padding:0 20px;border-radius:var(--r-m);border:1.5px solid var(--line-2);background:#fff;color:var(--ren-blue);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:650;line-height:1.15;text-align:center;touch-action:manipulation;
  transition:background-color .15s,border-color .15s,box-shadow .15s,color .15s;letter-spacing:-.005em}
.btn:hover{border-color:#B8C6DA;background:#FAFCFF}
.btn:active{filter:brightness(.96)}
.btn:disabled{opacity:.55;cursor:default}
.btn.primary{background:var(--grad);border-color:transparent;color:#fff;box-shadow:0 4px 14px rgba(46,90,156,.28)}
.btn.primary:hover{background:linear-gradient(180deg,#3A72C2 0%,#3163A9 100%);box-shadow:0 6px 18px rgba(46,90,156,.34)}
.btn.danger{color:var(--bad);border-color:#F0CACA}
.btn.danger:hover{background:#FFF7F7;border-color:#E8B0B0}
.btn.ok{background:var(--ok);border-color:var(--ok);color:#fff}
.btn.big{min-height:56px;font-size:1.06rem;padding:0 24px}
.btn.wide{width:100%}
.btn.ghost{background:transparent;border-color:transparent;color:#fff;box-shadow:none;font-weight:600}
.btn.ghost:hover{background:rgba(255,255,255,.13)}
.btn.link{border:none;background:none;color:var(--ren-blue);padding:0 6px;min-height:40px;font-weight:650;box-shadow:none}
.btn.link:hover{background:none;text-decoration:underline;text-underline-offset:3px}
.err{color:var(--bad);font-weight:600;font-size:.94rem}
.err:empty{display:none}
.err:not(:empty){background:var(--bad-soft);border:1px solid #F3C6C6;border-radius:var(--r-s);padding:10px 14px}

/* поля */
label{display:flex;flex-direction:column;gap:7px;font-weight:650;font-size:.9rem;color:var(--mute)}
input[type=text],input[type=password],input[type=search],input:not([type]),input[type=tel],input[type=date],select{
  min-height:var(--tap);border:1.5px solid var(--line-2);border-radius:var(--r-m);padding:0 14px;background:var(--field);color:var(--ink);
  font-weight:500;font-size:1rem;width:100%;transition:border-color .15s,box-shadow .15s,background-color .15s;-webkit-appearance:none;appearance:none}
select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E6F89' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;background-size:20px;padding-right:40px}
input::placeholder{color:var(--mute-2);font-weight:500}
input:hover,select:hover{border-color:#BCC8D9}
input:focus,select:focus{outline:none;background:#fff;border-color:var(--ren-blue);box-shadow:var(--ring)}
button:focus-visible,a:focus-visible{outline:none;box-shadow:var(--ring)}

/* вход */
html:has(#login:not([hidden])),body:has(#login:not([hidden])){background:#1F4176}
.login{min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px 16px;
  padding-top:calc(24px + env(safe-area-inset-top));padding-bottom:calc(24px + env(safe-area-inset-bottom));background:var(--grad-bg)}
.login-box{background:#fff;border-radius:20px;padding:32px 30px 30px;width:100%;max-width:420px;display:flex;flex-direction:column;gap:16px;box-shadow:var(--sh-3)}
.brand{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;margin-bottom:6px}
.brand img{width:200px;height:auto;max-width:62%}
.brand b{display:block;font-size:1.45rem;font-weight:750;letter-spacing:-.02em;color:var(--ren-deep)}
.brand span{display:block;color:var(--mute);font-size:.95rem;margin-top:2px}
.login-box .btn.big{margin-top:6px}

/* шапка */
.top{position:sticky;top:0;z-index:5;background:var(--grad);color:#fff;display:flex;align-items:center;justify-content:space-between;
  padding:10px 20px;padding-top:calc(10px + env(safe-area-inset-top));gap:12px;box-shadow:0 2px 12px rgba(22,48,92,.22)}
.top-l{display:flex;align-items:center;gap:14px;min-width:0;flex:1 1 auto}
.logo-tile{flex:none;background:#fff;border-radius:14px;padding:4px 8px;display:flex;align-items:center;box-shadow:0 2px 8px rgba(10,24,52,.18)}
.logo-tile .logo{display:block;height:56px;width:auto}
.top-title{display:flex;flex-direction:column;min-width:0;gap:1px}
.top-title b{font-size:1.2rem;font-weight:750;letter-spacing:-.015em;color:#fff}
.top-title > span{opacity:.86;font-size:.9rem;font-weight:500}
.top-title b,.top-title span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-r{display:flex;gap:4px;flex-wrap:nowrap}
.top-r .btn{padding:0 14px;gap:8px}
.top-r .i{width:1.15em;height:1.15em;opacity:.95}
.m-only,.top-title .short{display:none!important}

/* раскладка */
.layout{display:grid;grid-template-columns:minmax(330px,400px) 1fr;gap:20px;padding:20px;max-width:1500px;margin:0 auto;height:calc(100vh - 84px)}
.pane{background:var(--panel);border-radius:var(--r);border:1px solid var(--line);box-shadow:var(--sh-1);min-height:0;display:flex;flex-direction:column}
.list-head{padding:16px;display:flex;flex-direction:column;gap:12px;border-bottom:1px solid var(--line)}
input.search{font-size:1rem;padding-left:44px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238494AB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:14px center;background-size:20px}
.seg{display:grid;grid-template-columns:1fr 1fr;background:#EEF2F8;border-radius:var(--r-m);padding:4px;gap:4px}
.seg-b{min-height:42px;border:none;background:none;border-radius:9px;font-weight:650;font-size:.94rem;color:var(--mute);cursor:pointer;transition:background-color .15s,color .15s}
.seg-b:hover{color:var(--ink)}
.seg-b.on{background:#fff;color:var(--ren-blue);box-shadow:0 1px 3px rgba(22,48,92,.12)}
.pat-list{list-style:none;margin:0;padding:8px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:2px}
.pat-list li{padding:12px 14px;border-radius:var(--r-m);cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:64px;transition:background-color .12s}
.pat-list li:hover{background:#F4F7FB}
.pat-list li.sel{background:var(--brand-soft);box-shadow:inset 3px 0 0 var(--ren-blue)}
.pat-list .nm{font-weight:700;color:var(--ink)}
.pat-list .sub{color:var(--mute);font-size:.86rem;margin-top:3px;line-height:1.35}
.pat-list .cnt{flex:none;background:#EEF2F8;border-radius:999px;min-width:28px;height:26px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;font-size:.82rem;font-weight:700;color:var(--mute)}
.pat-list li.sel .cnt{background:#fff;color:var(--ren-blue)}
.pat-list .none{color:var(--mute);cursor:default;justify-content:center;text-align:center;font-weight:500}
.pat-list .none:hover{background:none}

/* карточка */
.card-pane{overflow:auto}
.card-empty{display:flex;align-items:center;justify-content:center;flex:1;min-height:300px}
.empty-hint{color:var(--mute);text-align:center;font-size:1.02rem;line-height:1.65}
.card{padding:28px 30px;display:flex;flex-direction:column;gap:20px}
.back{display:none}
.card h1{margin:0;font-size:1.65rem;line-height:1.2;font-weight:750;letter-spacing:-.02em;color:var(--ren-deep)}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.fact{background:#F6F8FC;border:1px solid #EBF0F6;border-radius:var(--r-m);padding:12px 16px}
.fact span{display:block;color:var(--mute);font-size:.8rem;font-weight:600;margin-bottom:3px}
.fact b{font-weight:650;line-height:1.3}
.actions{display:flex;flex-wrap:wrap;gap:12px}
.actions .btn.primary{flex:1 1 260px}
.sect-t{font-size:1.1rem;font-weight:750;margin:8px 0 0;color:var(--ink);letter-spacing:-.01em}
.studies{display:flex;flex-direction:column;gap:12px}
.study{border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;display:grid;grid-template-columns:1fr auto;gap:8px 16px;align-items:center;background:#fff;
  box-shadow:var(--sh-1);transition:box-shadow .15s,border-color .15s}
.study:hover{box-shadow:var(--sh-2);border-color:var(--line-2)}
.study .t{font-weight:700;color:var(--ink)}
.study .m{color:var(--mute);font-size:.86rem;word-break:break-word;line-height:1.4}
.study .acts{grid-row:1/span 3;grid-column:2;display:flex;flex-direction:column;gap:8px}

/* статусы-чипы: один стиль */
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;min-height:28px;padding:0 12px;font-weight:650;font-size:.84rem;width:max-content;max-width:100%;
  border:1px solid transparent;line-height:1.2}
.pill .i{width:1.05em;height:1.05em;vertical-align:0}
.pill.ok{background:var(--ok-soft);color:var(--ok);border-color:#CBE7D6}
.pill.warn{background:var(--warn-soft);color:var(--warn);border-color:#F1DDB0}
.pill.bad{background:var(--bad-soft);color:var(--bad);border-color:#F3C6C6}
.pill.run{background:var(--brand-soft);color:var(--ren-blue);border-color:#D2DFF1}
.badges{display:flex;flex-wrap:wrap;gap:8px}

/* загрузка / статус */
.up{border:1.5px solid #CCDAEE;border-radius:var(--r);padding:16px 18px;display:flex;flex-direction:column;gap:10px;background:#F8FBFF}
.up.err{border-color:#EDBDBD;background:#FFF9F9}
.up.done{border-color:#BFE0CC;background:#F5FBF7}
.up.chk{border-color:#EBCF8F;background:#FFFCF3}
.up .ttl{font-weight:700;font-size:1rem;color:var(--ink)}
.up .st{font-size:1.2rem;font-weight:750;color:var(--ink);display:flex;align-items:center;gap:8px;flex-wrap:wrap;letter-spacing:-.01em}
.up.done .st{color:var(--ok)}
.up.err .st{color:var(--bad)}
.st .i{width:1.1em;height:1.1em}
.bar{height:10px;background:#E4EAF3;border-radius:999px;overflow:hidden}
.bar i{display:block;height:100%;background:linear-gradient(90deg,var(--ren-blue),#4F86D6);width:0;transition:width .3s;border-radius:999px}
.up.err .bar i{background:var(--bad)}
.up.done .bar i{background:var(--ok)}
.up .row{display:flex;gap:10px;flex-wrap:wrap}
.up .row .btn{flex:1 1 160px}
.warnlist{margin:0;padding-left:20px;color:#6B4600;display:flex;flex-direction:column;gap:6px;font-weight:600}

/* диалог */
.dlg{border:none;border-radius:20px;padding:0;width:min(640px,calc(100vw - 24px));max-height:calc(100vh - 40px);box-shadow:var(--sh-3);color:var(--text)}
.dlg::backdrop{background:rgba(14,28,56,.5);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.dlg form{display:flex;flex-direction:column;max-height:calc(100vh - 40px)}
.dh{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid var(--line)}
.dh h2{margin:0;font-size:1.22rem;font-weight:750;letter-spacing:-.015em;color:var(--ren-deep)}
.dx{border:none;background:none;font-size:1.7rem;width:44px;height:44px;cursor:pointer;color:var(--mute-2);border-radius:var(--r-s);line-height:1;margin-right:-8px}
.dx:hover{background:#F1F4F9;color:var(--ink)}
.db{padding:20px 24px;overflow:auto;display:flex;flex-direction:column;gap:16px}
.df{padding:14px 24px 18px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;background:#FBFCFE;border-radius:0 0 20px 20px}
.df .btn{min-width:140px}
.df .sp{flex:1}
.df .btn.link{min-width:0;padding:0 4px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.sexsel{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sexsel button{min-height:var(--tap);border:1.5px solid var(--line-2);border-radius:var(--r-m);background:#fff;font-weight:650;cursor:pointer;color:var(--text)}
.sexsel button.on{border-color:var(--ren-blue);background:var(--brand-soft);color:var(--ren-blue)}
.combo{position:relative}
.combo ul{list-style:none;margin:6px 0 0;padding:6px;border:1px solid var(--line);border-radius:var(--r-m);max-height:240px;overflow:auto;background:#fff;box-shadow:var(--sh-2)}
.combo li{padding:10px 12px;border-radius:9px;cursor:pointer;min-height:44px;display:flex;justify-content:space-between;gap:8px;align-items:center}
.combo li:hover,.combo li.on{background:var(--brand-soft)}
.combo li small{color:var(--mute)}
.chosen{background:var(--brand-soft);border:1px solid #D2DFF1;border-radius:var(--r-m);padding:10px 14px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-weight:650;color:var(--ink)}
.kinds{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kind{border:1.5px solid var(--line-2);border-radius:var(--r-m);padding:14px 16px;background:#fff;text-align:left;cursor:pointer;min-height:68px;transition:border-color .15s,background-color .15s}
.kind:hover{border-color:#B8C6DA}
.kind b{display:block;font-weight:700}
.kind small{color:var(--mute);font-size:.84rem}
.kind.on{border-color:var(--ren-blue);background:var(--brand-soft);box-shadow:inset 0 0 0 1px var(--ren-blue)}
.files{border:1.5px dashed #BACADE;border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:10px;background:#FBFCFE}
.check{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.check li{display:flex;gap:10px;align-items:flex-start}
.check .y{color:var(--ok);font-weight:800}
.check .n{color:var(--warn);font-weight:800}
.hint{color:var(--mute);font-size:.9rem;line-height:1.5}
.note{background:var(--warn-soft);color:#6B4600;border:1px solid #F1DDB0;border-radius:var(--r-m);padding:12px 16px;font-weight:600}
.tbl{width:100%;border-collapse:collapse}
.tbl td,.tbl th{padding:10px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.tbl th{color:var(--mute);font-size:.82rem;font-weight:650}
.tbl input{min-height:44px}
.tbl .btn.danger{padding:0 14px}
.hist{list-style:none;margin:0;padding:0}
.hist li{padding:12px 4px;border-bottom:1px solid var(--line);display:flex;gap:14px}
.hist li:last-child{border-bottom:none}
.hist .w{color:var(--mute);flex:none;width:130px;font-variant-numeric:tabular-nums;font-size:.92rem}
.steps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:8px;line-height:1.5}
.menu{display:flex;flex-direction:column;gap:10px}
.menu .btn{justify-content:flex-start;min-height:56px;font-size:1.04rem;color:var(--ink)}
.menu .btn .i{color:var(--ren-blue)}
.menu .btn.danger,.menu .btn.danger .i{color:var(--bad)}
.row2{display:flex;gap:10px;flex-wrap:wrap}
.row2 .btn{flex:1 1 200px}
#bn,#dsk{display:flex;flex-direction:column;gap:12px}
a.btn{text-decoration:none}

.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(150%);background:var(--ren-deep);color:#fff;
  padding:14px 22px;border-radius:14px;max-width:calc(100vw - 24px);font-weight:650;z-index:50;box-shadow:0 10px 30px rgba(10,24,52,.3);
  visibility:hidden;opacity:0;transition:transform .25s,opacity .25s,visibility .25s}
.toast.show{transform:translateX(-50%) translateY(0);visibility:visible;opacity:1}
.toast.bad{background:var(--bad)}
.gup{position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom));z-index:40;background:var(--grad);color:#fff;border:none;border-radius:999px;
  min-height:52px;padding:0 22px;font-weight:700;box-shadow:0 10px 26px rgba(22,48,92,.32);cursor:pointer;display:inline-flex;align-items:center;gap:8px}

/* телефон и планшет */
@media (max-width:900px){
  :root{font-size:16.5px}
  html,body{background:#fff}
  .top{padding:8px 8px 8px 12px;padding-top:calc(8px + env(safe-area-inset-top))}
  .top-l{gap:10px}
  .logo-tile{border-radius:11px;padding:3px 6px}
  .logo-tile .logo{height:42px}
  .top-title b{font-size:1.04rem}
  .top-title .full{display:none}
  .top-title .short{display:inline!important}
  #labName{font-size:.86rem}
  .top-r{flex:none}
  .top-r .lbl{display:none}
  .top-r .btn{padding:0;width:44px;min-height:44px}
  .top-r .i{width:1.4em;height:1.4em}
  .m-hide{display:none!important}
  .m-only{display:inline-flex!important}
  #btnMenu{width:auto!important;padding:0 12px!important;gap:6px;background:rgba(255,255,255,.14);border-radius:12px}
  #btnMenu .i{width:1.25em;height:1.25em}
  #btnMenu .mlbl{font-size:1rem}
  .layout{display:block;padding:0;height:auto}
  .pane{border-radius:0;border:none;box-shadow:none;min-height:calc(100vh - 62px)}
  body.show-card #pane-list{display:none}
  body:not(.show-card) #pane-card{display:none}
  .list-head{padding:14px}
  .seg-b{min-height:46px}
  .pat-list{overflow:visible;padding:6px 8px}
  .back{display:inline-flex;align-self:flex-start;margin:-6px 0 -6px -10px;gap:4px}
  .card{padding:18px 16px 40px;gap:18px}
  .card h1{font-size:1.42rem}
  .facts{grid-template-columns:1fr 1fr;gap:10px}
  .fact{padding:10px 14px}
  .actions .btn{flex:1 1 100%}
  .study{grid-template-columns:1fr;padding:14px 16px}
  .study .acts{grid-row:auto;grid-column:auto;flex-direction:row;flex-wrap:wrap;margin-top:4px}
  .study .acts .btn{flex:1 1 auto}
  .kinds{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .dlg{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0;margin:0}
  .dlg form{max-height:100dvh;height:100%}
  .dh{padding:12px 16px 12px 20px;padding-top:calc(12px + env(safe-area-inset-top))}
  .db{flex:1;padding:18px 16px}
  .df{padding:12px 16px calc(14px + env(safe-area-inset-bottom));border-radius:0}
  .df .btn{flex:1 1 140px}
  .df .sp{display:none}
  .hist .w{width:96px;font-size:.86rem}
  .tbl thead{display:none}
  .tbl,.tbl tbody,.tbl tfoot{display:block}
  .tbl tr{display:grid;grid-template-columns:1fr 120px;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}
  .tbl td{border:none;padding:0;width:auto!important}
  .tbl td:last-child{grid-column:1/-1;display:flex;gap:8px;white-space:normal!important}
  .tbl td:last-child .btn{flex:1}
  .tbl td:last-child .btn.danger{flex:0 0 56px}
  .login-box{padding:28px 22px 24px;gap:14px;border-radius:20px}
  .brand img{width:170px}
  .gup{right:12px;left:12px;justify-content:center}
}
@media (max-width:380px){ .facts{grid-template-columns:1fr} }
.flabel{font-weight:650;font-size:.9rem;color:var(--mute);margin-bottom:7px}
.hint b{color:var(--ink)}
@media (max-width:900px){ .df .btn{padding:0 12px;font-size:1rem} }
.menu .btn{text-align:left}
.tbl .btn{min-height:44px}
.i-eye{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
.pw{position:relative;display:block}
.pw input{padding-right:52px!important}
.pw-eye{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:46px;height:46px;border:none;background:none;color:var(--mute-2);cursor:pointer;border-radius:10px;display:flex;align-items:center;justify-content:center}
.pw-eye:hover,.pw-eye.on{color:var(--ren-blue)}
.pw-eye .i{width:22px;height:22px}
.login{flex-direction:column;gap:18px}
.login-foot{color:rgba(255,255,255,.72);font-size:.8rem;text-align:center;max-width:420px;line-height:1.4}
