:root{
  --bg:#f1f5f9;--card:#fff;--ink:#0f172a;--mut:#64748b;--line:#e2e8f0;--soft:#f8fafc;
  --pri:#059669;--pri-d:#047857;--pri-l:#ecfdf5;
  --nav:#0f172a;--nav-2:#1e293b;
  --red:#dc2626;--red-l:#fef2f2;--amb:#b45309;--amb-l:#fffbeb;--blue:#2563eb;--blue-l:#eff6ff;
  --r:14px;--shadow:0 1px 2px rgba(15,23,42,.05),0 6px 18px rgba(15,23,42,.05);
  --safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px)
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:14px/1.55 Inter,"Segoe UI",system-ui,-apple-system,Roboto,sans-serif;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}
.hidden{display:none!important}
h1,h2,h3{margin:0;letter-spacing:-.015em}
a{color:var(--pri)}
code{background:#eef2f7;border-radius:5px;padding:1px 6px;font:12px Consolas,monospace}
svg.i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}

.app{display:flex;min-height:100vh;min-height:100dvh}
.content{flex:1;min-width:0}
.main{padding:32px 40px 56px;max-width:1280px;margin:0 auto;width:100%}
.topbar{display:none}

.sidebar{width:268px;flex:none;background:linear-gradient(180deg,#0f172a 0%,#111d36 100%);color:#cbd5e1;padding:22px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;height:100dvh;overflow-y:auto}
.brand{display:flex;gap:12px;align-items:center;padding:2px 8px 22px;color:#fff}
.brand b{font-size:16px;display:block;line-height:1.2}
.brand small{display:block;color:#94a3b8;font-size:12px}
.logo{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#10b981,#059669);color:#fff;display:grid;place-items:center;font-weight:800;font-size:20px;box-shadow:0 4px 12px rgba(16,185,129,.35);flex:none}
.logo.sm{width:32px;height:32px;font-size:16px;border-radius:9px}
.nav-label{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#64748b;padding:0 12px 8px}
#nav{display:flex;flex-direction:column;gap:3px;flex:1}
#nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;color:#cbd5e1;text-decoration:none;font-weight:500;position:relative;transition:background .15s,color .15s}
#nav a:hover{background:rgba(148,163,184,.12);color:#fff}
#nav a.active{background:rgba(16,185,129,.16);color:#fff}
#nav a.active::before{content:"";position:absolute;left:-16px;top:8px;bottom:8px;width:4px;border-radius:0 4px 4px 0;background:#10b981}
#nav a.active svg{color:#34d399}
.badge{margin-left:auto;background:#f59e0b;color:#1c1917;border-radius:10px;padding:0 8px;font-size:12px;font-weight:700;min-width:20px;text-align:center}
.side-foot{border-top:1px solid rgba(148,163,184,.18);padding-top:14px;margin-top:10px;display:flex;flex-direction:column;gap:10px}
.me{display:flex;gap:10px;align-items:center;color:#e2e8f0}
.me b{display:block;font-size:13px;line-height:1.2}.me small{color:#94a3b8;font-size:12px}
.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;color:#fff;background:#475569;flex:none}
.avatar.sm{width:34px;height:34px;font-size:12px}

.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:22px;flex-wrap:wrap}
h1{font-size:27px;line-height:1.2}
.sub{color:var(--mut);margin:4px 0 0}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:22px;margin-bottom:18px;box-shadow:var(--shadow)}
.card h3{font-size:16px;margin:0 0 4px}
.card .hint,.hint{color:var(--mut);font-size:13px;margin:0 0 14px}
.card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.card-head .hint{margin:0}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;display:flex;gap:14px;align-items:center;box-shadow:var(--shadow);min-width:0}
.stat .ico{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;flex:none}
.stat .ico svg{width:22px;height:22px}
.ico.g{background:var(--pri-l);color:var(--pri)}.ico.b{background:var(--blue-l);color:var(--blue)}.ico.a{background:var(--amb-l);color:var(--amb)}.ico.r{background:var(--red-l);color:var(--red)}
.stat b{display:block;font-size:22px;line-height:1.15;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat small{color:var(--mut);font-size:12.5px}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
label.f{display:block;font-weight:600;font-size:13px;min-width:0}
.grid>*{min-width:0}
input,select,textarea{min-width:0;max-width:100%}
input[type=date],input[type=time]{display:block;-webkit-appearance:none;appearance:none}
input[type=date]::-webkit-date-and-time-value,input[type=time]::-webkit-date-and-time-value{text-align:left}
label.f span.t{display:block;margin-bottom:5px;color:#334155}
input[type=text],input[type=password],input[type=number],input[type=date],input[type=time],input[type=email],input[type=search],input[type=file],textarea,select{width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;background:#fff;color:var(--ink);transition:border-color .15s,box-shadow .15s;min-height:42px}
input[type=file]{padding:8px 10px}
input:focus,textarea:focus,select:focus{outline:0;border-color:var(--pri);box-shadow:0 0 0 3px rgba(5,150,105,.18)}
input::placeholder,textarea::placeholder{color:#94a3b8}
textarea{min-height:150px;resize:vertical;font-family:inherit;line-height:1.5}
input[type=search]{padding-left:38px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center/18px}
.chk{display:flex;gap:10px;align-items:center;font-weight:500;cursor:pointer}
.chk input{width:18px;height:18px;accent-color:var(--pri);flex:none}
.switch input{appearance:none;-webkit-appearance:none;width:42px;height:24px;border-radius:24px;background:#cbd5e1;position:relative;transition:background .2s;margin:0;cursor:pointer;flex:none}
.switch input::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 2px rgba(0,0,0,.3)}
.switch input:checked{background:var(--pri)}
.switch input:checked::after{transform:translateX(18px)}
.switch input:focus-visible{outline:2px solid var(--pri);outline-offset:2px}

.btn{border:0;background:var(--pri);color:#fff;padding:10px 18px;border-radius:10px;font:inherit;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 1px 2px rgba(5,150,105,.35);transition:background .15s,transform .05s;min-height:40px;text-decoration:none}
.btn:hover{background:var(--pri-d)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55;cursor:wait}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid #cbd5e1;box-shadow:none}
.btn.ghost:hover{background:var(--soft);border-color:#94a3b8}
.sidebar .btn.ghost{background:transparent;color:#cbd5e1;border-color:#334155}
.sidebar .btn.ghost:hover{background:rgba(148,163,184,.12)}
.btn.danger{background:var(--red);box-shadow:0 1px 2px rgba(220,38,38,.35)}
.btn.danger:hover{background:#b91c1c}
.btn.blue{background:var(--blue);box-shadow:0 1px 2px rgba(37,99,235,.35)}
.btn.blue:hover{background:#1d4ed8}
.btn.small{padding:6px 12px;font-size:13px;min-height:34px;border-radius:9px}
.btn svg.i{width:18px;height:18px}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

.toolbar{display:flex;gap:12px;margin-bottom:14px;flex-wrap:wrap;align-items:center}
.toolbar .search{flex:1;min-width:220px;max-width:380px}
.toolbar select.srt{width:auto;min-width:230px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{border:1px solid var(--line);background:#fff;color:#475569;border-radius:20px;padding:5px 13px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.chip:hover{border-color:#94a3b8}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.tablewrap{margin:0 -22px -8px;overflow-x:auto}
.c-actions .actions{flex-wrap:nowrap;gap:6px}
.c-actions .btn{padding:0;width:36px;min-height:36px;gap:0}
.c-actions .btn .lbl{display:none}
.c-actions .btn svg.i{width:17px;height:17px}
.c-actions .btn.txt{width:auto;padding:0 14px}
.c-actions .btn.del:hover{color:var(--red);border-color:#fca5a5;background:var(--red-l)}
.c-actions .btn.ok{color:var(--pri);border-color:#a7f3d0}
.c-actions .btn.ok:hover{background:var(--pri-l)}
@media (min-width:861px) and (max-width:1699px){.c-actions .actions{flex-wrap:wrap;width:122px;justify-content:flex-end}}
@media (min-width:1700px){.c-actions .btn{width:auto;padding:0 12px;gap:6px}.c-actions .btn .lbl{display:inline}}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut);background:var(--soft);font-weight:700;white-space:nowrap}
th.sortable{cursor:pointer;user-select:none}th.sortable:hover{color:var(--ink)}
th:first-child,td:first-child{padding-left:22px}th:last-child,td:last-child{padding-right:22px}
tbody tr:hover{background:#fafcff}
tr:last-child td{border-bottom:0}
.c-name{min-width:200px}
.cn{display:flex;gap:12px;align-items:center}
.cn b{display:block;line-height:1.25}
td:not(.c-name){white-space:nowrap}
td.c-srv{white-space:normal!important}
@media (min-width:861px) and (max-width:1250px){td.c-name .avatar{display:none}}
@media (min-width:861px) and (max-width:1499px){th,td{padding:11px 8px}th:first-child,td:first-child{padding-left:16px}th:last-child,td:last-child{padding-right:16px}table td.c-name{min-width:130px}}
td.money{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.tag{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600;white-space:nowrap}
.tag::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.tag.ok{background:#dcfce7;color:#166534}.tag.warn{background:#fef3c7;color:#92400e}.tag.bad{background:#fee2e2;color:#991b1b}.tag.info{background:#dbeafe;color:#1e40af}.tag.off{background:#e5e7eb;color:#4b5563}
.tag.mini{padding:1px 8px;font-size:11px;margin-left:6px}.tag.mini::before{display:none}
.empty{color:var(--mut);padding:36px 16px;text-align:center}
.empty svg{width:40px;height:40px;stroke-width:1.5;color:#cbd5e1;display:block;margin:0 auto 8px}
.banner{background:linear-gradient(180deg,#fffbeb,#fef3c7);border:1px solid #fcd34d;border-radius:var(--r);padding:16px 20px;margin-bottom:18px}
.banner h3{margin:0 0 8px;color:#92400e;font-size:15px}
.banner.red{background:linear-gradient(180deg,#fef2f2,#fee2e2);border-color:#fca5a5}.banner.red h3{color:#991b1b}
.ren{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px 0;border-top:1px solid #fde68a;flex-wrap:wrap}
.banner.red .ren{border-top-color:#fecaca}
.ren:first-of-type{border-top:0}

.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:grid;grid-template-columns:minmax(0,1fr);place-items:center;z-index:60;padding:16px}
.modal-box{min-width:0;background:#fff;border-radius:18px;padding:26px;width:100%;max-width:560px;max-height:92vh;max-height:92dvh;overflow:auto;box-shadow:0 24px 60px rgba(15,23,42,.35);animation:pop .18s ease-out}
.modal-box h2{margin:0 0 16px;font-size:20px}
.modal-box .grid{grid-template-columns:1fr 1fr}
.modal-box .full{grid-column:1/-1}
.modal-foot{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}
.sheet-list{display:flex;flex-direction:column;gap:6px}
.sheet-item{display:flex;align-items:center;gap:14px;padding:14px;border-radius:12px;background:var(--soft);border:1px solid var(--line);color:var(--ink);text-decoration:none;font:inherit;font-weight:600;width:100%;text-align:left;cursor:pointer}
.sheet-item svg{color:var(--pri)}
.sheet-item.danger,.sheet-item.danger svg{color:var(--red)}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@keyframes slideup{from{transform:translateY(100%)}to{transform:none}}

#toasts{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:8px;z-index:99;pointer-events:none}
.toast{background:#0f172a;color:#fff;padding:12px 16px;border-radius:12px;box-shadow:0 10px 30px rgba(15,23,42,.35);max-width:380px;border-left:4px solid #10b981;animation:pop .18s ease-out}
.toast.err{border-left-color:#f87171;background:#7f1d1d}

.auth{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:20px;background:radial-gradient(900px 500px at 15% 10%,#134e4a 0%,transparent 60%),radial-gradient(800px 500px at 90% 90%,#1e3a8a 0%,transparent 55%),#0f172a}
.auth .card{width:100%;max-width:400px;padding:30px 28px;box-shadow:0 30px 70px rgba(0,0,0,.4);border:0;max-height:calc(100dvh - 40px);overflow:auto}
.auth .logo{margin:0 auto 14px;width:52px;height:52px;font-size:26px;border-radius:15px}
.auth h2{text-align:center;font-size:21px}
.auth .hint{text-align:center;margin:6px 0 18px}
.auth .twofa img{width:180px;height:180px}
.captcha{display:flex;gap:10px;align-items:center;margin-top:12px}
.captcha .capimg{flex:1;min-width:0;border:1px solid #cbd5e1;border-radius:10px;overflow:hidden;background:#eef2f7;line-height:0}
.captcha img{width:100%;height:auto;display:block;-webkit-user-select:none;user-select:none}
.captcha .btn{min-height:68px;padding:0 14px;font-size:20px}
.mfabox{margin-top:12px;background:var(--amb-l);border:1px solid #fcd34d;border-radius:10px;padding:10px 12px}
.mfabox small{display:block;color:#92400e;margin-bottom:6px;font-weight:600}

.qr{width:min(300px,100%);aspect-ratio:1;border:1px solid var(--line);border-radius:14px;display:grid;place-items:center;color:var(--mut);text-align:center;padding:12px;background:var(--soft);flex:none}
.qr img{width:100%;height:100%;border-radius:8px}
.seg{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin-bottom:18px}
.opt{border:2px solid var(--line);border-radius:12px;padding:14px 16px;cursor:pointer;display:flex;gap:12px;align-items:flex-start;transition:border-color .15s,background .15s}
.opt:hover{border-color:#94a3b8}
.opt.sel{border-color:var(--pri);background:var(--pri-l)}
.opt input{margin-top:3px;accent-color:var(--pri);width:18px;height:18px;flex:none}
.opt small{display:block;color:var(--mut);font-weight:400;margin-top:2px}
.statusline{display:inline-flex;align-items:center;gap:8px;font-weight:600;margin:0 0 14px}
.statusline::before{content:"";width:10px;height:10px;border-radius:50%;background:#94a3b8}
.statusline.on::before{background:#10b981;box-shadow:0 0 0 4px rgba(16,185,129,.2)}
.statusline.wait::before{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.2)}

.vars{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 0}
.vars button{border:1px dashed #94a3b8;background:var(--soft);border-radius:7px;padding:3px 9px;font:12px Consolas,monospace;cursor:pointer;color:#334155}
.vars button:hover{background:#e2e8f0}
.chat{background:#efeae2;background-image:radial-gradient(#e4ddd0 1px,transparent 1px);background-size:14px 14px;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:6px;border:1px solid #e4ddd0}
.preview,.pixcard{background:#d9fdd3;border-radius:10px 10px 10px 2px;padding:9px 12px;white-space:pre-wrap;word-break:break-word;max-width:92%;font-size:13.5px;box-shadow:0 1px 1px rgba(0,0,0,.12);align-self:flex-start}
.pixcard{white-space:normal}
.pixbtn{margin-top:8px;padding-top:8px;border-top:1px solid #b9e9b1;color:#0a7d4f;font-weight:600;text-align:center}
.tpl-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:14px}
.tpl-grid small.lbl{display:block;color:var(--mut);font-weight:600;margin-bottom:6px;font-size:12px;text-transform:uppercase;letter-spacing:.05em}

.twofa{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.twofa img{width:200px;height:200px;border:1px solid var(--line);border-radius:12px;max-width:100%}
.secret{font:600 15px/1.4 Consolas,monospace;letter-spacing:.08em;background:#f1f5f9;border-radius:10px;padding:10px 12px;word-break:break-all;user-select:all}
.codes{font:600 15px/1.9 Consolas,monospace;background:#f1f5f9;border-radius:10px;padding:12px 16px;columns:2;user-select:all}
.warnbox{background:var(--amb-l);border:1px solid #fcd34d;border-radius:10px;padding:10px 12px;color:#92400e;font-size:13px;margin:12px 0}
.dangerbox{background:var(--red-l);border:1px solid #fecaca;border-radius:10px;padding:10px 12px;color:#991b1b;font-size:13px;margin:12px 0}
.infobox{background:var(--blue-l);border:1px solid #bfdbfe;border-radius:10px;padding:10px 12px;color:#1e40af;font-size:13px;margin:12px 0}

@media (min-width:861px) and (max-width:1499px){.hide-md{display:none}}
.steps{display:flex;gap:8px;justify-content:center;margin:0 0 18px;flex-wrap:wrap}
.step{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:#94a3b8}
.step i{font-style:normal;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#e2e8f0;color:#64748b;font-size:12px}
.step.on{color:var(--ink)}.step.on i{background:var(--pri);color:#fff}
.step.done{color:var(--pri)}.step.done i{background:var(--pri-l);color:var(--pri)}
.step+.step::before{content:"";width:18px;height:2px;background:#e2e8f0;margin-right:1px}
.cred{display:grid;gap:12px;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-top:6px}
.cred small{display:block;color:var(--mut);font-size:12px}
.cred b{font-size:16px;word-break:break-all}
hr.sep{border:0;border-top:1px solid var(--line);margin:20px 0 16px}

.bk-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-bottom:6px}
.bk-btn{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--soft);cursor:pointer;font:inherit;text-align:left;color:var(--ink);width:100%}
.bk-btn:hover{border-color:#94a3b8;background:#fff}.bk-btn:disabled{opacity:.6;cursor:wait}
.bk-btn svg{color:var(--pri);width:26px;height:26px}
.bk-btn b{display:block}.bk-btn small{color:var(--mut)}
.impsum{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-top:14px}
.impsum .nums{display:flex;flex-wrap:wrap;gap:8px 18px;margin-bottom:8px}
.impsum .nums span{white-space:nowrap}.impsum .nums b{font-size:16px}
.impsum ul{margin:8px 0 0;padding-left:18px;color:#991b1b;font-size:13px}
.seg2{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.seg2 .opt{flex:1;min-width:230px}

.srv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:16px;margin-bottom:18px}
.srv{margin:0;display:flex;flex-direction:column;gap:10px}
.srv-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.srv-top h3{font-size:17px;margin:0}
.srv-meta{display:flex;gap:6px 14px;flex-wrap:wrap;color:var(--mut);font-size:13px}
.srv-meta b{color:var(--ink)}
.keybox{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.keybox .kline{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.keybox small{color:var(--mut)}
.lookup{margin-top:8px;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--soft)}
.lookup .lres{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.lookup .lres button{text-align:left;border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 10px;font:inherit;cursor:pointer}
.lookup .lres button:hover{border-color:var(--pri);background:var(--pri-l)}
.att{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;padding:10px 0;border-top:1px solid #fecaca;flex-wrap:wrap}
.att:first-of-type{border-top:0}
.att .why{font-size:13px;color:#7f1d1d;margin-top:2px;word-break:break-word}

.installbar{display:none}
@media (max-width:860px){
  .installbar{display:flex;align-items:center;gap:10px;position:fixed;left:10px;right:10px;bottom:calc(76px + var(--safe-b));z-index:45;background:#0f172a;color:#fff;border-radius:16px;padding:10px 10px 10px 12px;box-shadow:0 12px 30px rgba(15,23,42,.45);animation:pop .2s ease-out}
  .installbar.hidden{display:none!important}
  .installbar img{border-radius:10px;flex:none}
  .installbar div{flex:1;min-width:0;line-height:1.25}.installbar b{display:block;font-size:14px}.installbar small{color:#94a3b8;font-size:12px}
  .installx{background:none;border:0;color:#94a3b8;font-size:24px;line-height:1;padding:6px 8px;cursor:pointer}
}

.bottomnav{display:none}

@media (max-width:1100px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .main{padding:26px 24px 48px}
}

@media (max-width:860px){
  html{scroll-padding-top:70px}
  body{font-size:15px}
  .sidebar{display:none}
  .topbar{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:30;background:var(--nav);color:#fff;padding:calc(12px + var(--safe-t)) 16px 12px;box-shadow:0 2px 10px rgba(15,23,42,.25)}
  .topbar h2{font-size:17px;font-weight:700}
  .main{padding:18px 14px calc(92px + var(--safe-b))}
  h1{font-size:23px}
  .page-head{margin-bottom:16px}
  .page-head .actions,.page-head .actions .btn{width:100%}
  .card{padding:16px;border-radius:14px}
  .stats{gap:10px}
  .stat{padding:12px;gap:10px}
  .stat .ico{width:38px;height:38px}.stat .ico svg{width:19px;height:19px}
  .stat b{font-size:18px}
  .stat small{font-size:12px;line-height:1.2;display:block}

  input[type=text],input[type=password],input[type=number],input[type=date],input[type=time],input[type=email],input[type=search],input[type=file],textarea,select{font-size:16px;min-height:46px}
  textarea{min-height:190px}
  .btn{min-height:46px}.btn.small{min-height:40px;padding:8px 14px}
  .grid{grid-template-columns:1fr}
  .srv-grid{grid-template-columns:1fr}
  .toolbar{flex-direction:column;flex-wrap:nowrap;align-items:stretch}.toolbar>*{min-width:0}.toolbar .search{max-width:none;min-width:0;flex:none}.toolbar select.srt{width:100%;min-width:0}
  .chips{overflow-x:auto;flex-wrap:nowrap;margin:0 -16px;padding:0 16px 4px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}
  .chip{white-space:nowrap}
  .tpl-grid{grid-template-columns:1fr}
  .seg{grid-template-columns:1fr}
  .qr{margin:0 auto}
  .row>*{min-width:0}

  .tablewrap{margin:0;overflow:visible}
  .card.plain-m{background:transparent;border:0;box-shadow:none;padding:0}
  .card.plain-m .toolbar{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:12px;box-shadow:var(--shadow)}
  table.resp,table.resp tbody,table.resp tr,table.resp td{display:block;width:100%}
  table.resp thead{display:none}
  table.resp tr{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px;box-shadow:var(--shadow)}
  table.resp tbody tr:hover{background:#fff}
  table.resp td,table.resp td:first-child,table.resp td:last-child{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:6px 0;border:0;text-align:right}
  table.resp td:not(.c-name){white-space:normal}
  table.resp td::before{content:attr(data-label);color:var(--mut);font-size:12.5px;font-weight:600;text-align:left;flex:none}
  table.resp td.c-name{justify-content:flex-start;text-align:left;padding-bottom:10px;margin-bottom:4px;border-bottom:1px solid var(--line);min-width:0}
  table.resp td.c-name::before,table.resp td.c-actions::before{display:none}
  table.resp td.c-name .avatar{width:42px;height:42px;display:grid}
  table.resp td.c-actions{padding-top:12px;margin-top:6px;border-top:1px solid var(--line)}
  table.resp td.c-actions .actions{width:100%;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
  table.resp td.c-actions .btn{width:100%;padding:0 6px;gap:6px}
  table.resp td.c-actions .btn .lbl{display:inline}
  table.resp td.c-actions .btn.txt{grid-column:1/-1}
  .hide-md{display:flex!important}
  .ren{align-items:stretch}.ren .actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .att .actions{width:100%}

  .modal{place-items:end center;padding:0}
  .modal-box{max-width:none;border-radius:22px 22px 0 0;padding:14px 18px calc(22px + var(--safe-b));max-height:92vh;max-height:92dvh;animation:slideup .22s ease-out}
  .modal-box::before{content:"";display:block;width:42px;height:4px;border-radius:4px;background:#cbd5e1;margin:0 auto 16px}
  .modal-box .grid{grid-template-columns:1fr}
  .modal-foot{flex-direction:column-reverse}.modal-foot .btn{width:100%}
  .codes{columns:1}
  .twofa{justify-content:center}

  #toasts{left:12px;right:12px;bottom:calc(80px + var(--safe-b))}.toast{max-width:none}

  .bottomnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid var(--line);padding:4px 4px calc(4px + var(--safe-b));box-shadow:0 -4px 18px rgba(15,23,42,.06)}
  .bottomnav.hidden{display:none!important}
  .bottomnav a,.bottomnav button{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 2px;border:0;background:none;color:var(--mut);font:inherit;font-size:11px;font-weight:600;text-decoration:none;position:relative;border-radius:12px;cursor:pointer}
  .bottomnav svg.i{width:22px;height:22px}
  .bottomnav .active{color:var(--pri)}
  .bottomnav .active svg{background:var(--pri-l);box-sizing:content-box;padding:3px 14px;border-radius:14px;margin:-3px 0}
  .bottomnav .badge{position:absolute;top:2px;left:calc(50% + 6px);margin:0;padding:0 5px;font-size:10px;min-width:17px;line-height:17px}
}

@media (max-width:380px){
  .stats{grid-template-columns:1fr}
  .stat b{font-size:20px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
