/* ============================================================
   Server Admin — Liquid Glass · magenta neon (Horion brend)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #07070c;
  --glass: rgba(255,255,255,.035);
  --glass2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.14);
  --text: #f2f2f7; --muted: #9a9aad;
  --brand: #DC04AF; --brand2: #7C3AED; --cyan: #22d3ee;
  --green: #34d399; --red: #f87171; --yellow: #fbbf24;
  --grad: linear-gradient(135deg, #DC04AF, #7C3AED);
  --glow: 0 0 24px rgba(220,4,175,.35);
}
html { color-scheme: dark; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 'Inter', -apple-system, sans-serif; min-height: 100vh; overflow-x: hidden; }
h1,h2,h3,.side-logo b { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: .2px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.grad-text { background: linear-gradient(120deg, #fff 10%, #f8c6ec 45%, #DC04AF 75%, #7C3AED); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Orqa fon: orb + grid ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; }
.o1 { width: 560px; height: 560px; left: -140px; top: -180px; background: radial-gradient(circle, rgba(220,4,175,.5), transparent 65%); }
.o2 { width: 640px; height: 640px; right: -200px; top: 20%; background: radial-gradient(circle, rgba(124,58,237,.42), transparent 65%); animation-delay: -8s; }
.o3 { width: 480px; height: 480px; left: 30%; bottom: -220px; background: radial-gradient(circle, rgba(34,211,238,.22), transparent 65%); animation-delay: -14s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(60px,40px) scale(1.12); } }
.grid-fx { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); }

/* ---------- Glass ---------- */
.glass { background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35); }

/* ---------- LOGIN ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; border-radius: 28px; padding: 40px 34px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08); animation: rise .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { from { transform: translateY(26px) scale(.97); opacity: 0; } }
.login-ring { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%; padding: 3px; background: conic-gradient(from 180deg, #DC04AF, #7C3AED, #22d3ee, #DC04AF); animation: spin 6s linear infinite; box-shadow: var(--glow); }
@keyframes spin { to { transform: rotate(360deg); } }
.login-mark { width: 100%; height: 100%; border-radius: 50%; background: #0d0d14; display: grid; place-items: center; font-size: 36px; animation: spin 6s linear infinite reverse; }
.login-card h1 { font-size: 26px; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.passkey-btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 15px; border: none; border-radius: 16px; background: var(--grad); color: #fff; font-size: 15px; font-weight: 700; font-family: 'Space Grotesk'; cursor: pointer; box-shadow: var(--glow); transition: transform .18s, box-shadow .18s; }
.passkey-btn:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(220,4,175,.55); }
.btn-shine { position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%,60% { left: -80%; } 100% { left: 130%; } }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; margin: 20px 0 14px; text-transform: uppercase; letter-spacing: 1.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field { text-align: left; margin-bottom: 13px; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .8px; }
.input { width: 100%; padding: 13px 15px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 13px; color: var(--text); font-size: 14px; outline: none; transition: border .2s, box-shadow .2s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,4,175,.18); }
.btn { padding: 10px 17px; background: var(--glass2); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .18s; }
.btn:hover { border-color: rgba(220,4,175,.5); background: rgba(220,4,175,.1); transform: translateY(-1px); }
.btn-primary { background: var(--grad); border: none; font-weight: 700; box-shadow: 0 6px 20px rgba(220,4,175,.3); }
.btn-primary:hover { box-shadow: var(--glow); background: var(--grad); }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(248,113,113,.35); color: var(--red); }
.btn-danger:hover { background: rgba(248,113,113,.12); border-color: var(--red); }
.pw-toggle button { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; margin-top: 14px; }
.pw-toggle button:hover { color: var(--text); }
.err-msg { color: var(--red); font-size: 13px; margin-top: 13px; min-height: 18px; }
.warn-msg { color: var(--yellow); font-size: 12px; margin-top: 6px; }

/* ---------- APP LAYOUT ---------- */
.app { display: none; }
.app.active { display: flex; min-height: 100vh; }
.side { width: 218px; flex-shrink: 0; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); border-top: none; border-bottom: none; border-left: none; border-radius: 0; }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-size: 17px; letter-spacing: 2px; }
.side-logo .mark { width: 34px; height: 34px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; font-size: 18px; box-shadow: var(--glow); }
.nav { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 500; border: 1px solid transparent; transition: all .18s; user-select: none; }
.nav a i { font-style: normal; font-size: 17px; width: 22px; text-align: center; }
.nav a:hover { color: var(--text); background: var(--glass2); }
.nav a.active { color: #fff; background: linear-gradient(135deg, rgba(220,4,175,.2), rgba(124,58,237,.16)); border-color: rgba(220,4,175,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 18px rgba(220,4,175,.15); }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.uchip { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.uav { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: 13px; }

.main-wrap { flex: 1; min-width: 0; padding: 26px 30px 40px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead h2 { font-size: 26px; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.head-right { display: flex; align-items: center; gap: 12px; }
.clock { color: var(--muted); font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--glass2); border: 1px solid var(--border); padding: 6px 13px; border-radius: 20px; font-size: 12px; color: var(--muted); }
.pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* ---------- Kartalar ---------- */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--glass); border: 1px solid var(--border); border-radius: 20px; padding: 20px; backdrop-filter: blur(18px); position: relative; overflow: hidden; transition: border .25s, transform .25s, box-shadow .25s; }
.card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); }
.card h3 { font-size: 13.5px; margin-bottom: 14px; color: #cfcfda; display: flex; align-items: center; gap: 8px; }

/* Stat kartalar: gauge + sparkline */
.stat-card { display: flex; align-items: center; gap: 16px; }
.gauge { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.gauge svg { transform: rotate(-90deg); }
.gauge .track { stroke: rgba(255,255,255,.07); }
.gauge .val { stroke: url(#gaugeGrad); stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.3,.8,.3,1); filter: drop-shadow(0 0 5px rgba(220,4,175,.55)); }
.gauge .val.warn { stroke: var(--yellow); filter: drop-shadow(0 0 5px rgba(251,191,36,.5)); }
.gauge .val.crit { stroke: var(--red); filter: drop-shadow(0 0 6px rgba(248,113,113,.6)); }
.gauge .gnum { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Space Grotesk'; font-weight: 700; font-size: 19px; }
.stat-info { min-width: 0; flex: 1; }
.stat-name { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 3px; }
.stat-det { font-size: 12.5px; color: #cfcfda; margin-bottom: 8px; }
.spark { width: 100%; height: 30px; display: block; }
.spark polyline { fill: none; stroke: url(#sparkGrad); stroke-width: 2; }
.spark .sfill { fill: url(#sparkFill); stroke: none; opacity: .5; }

/* Xizmat chiplari */
.svc { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--glass2); border: 1px solid var(--border); border-radius: 22px; font-size: 12.5px; margin: 4px 6px 4px 0; transition: border .2s; }
.svc:hover { border-color: var(--border2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot.on { background: var(--green); box-shadow: 0 0 9px var(--green); animation: pulse 2.4s infinite; }

/* ---------- Jadval ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; padding: 4px 14px; }
td { padding: 13px 14px; background: rgba(255,255,255,.028); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
tr td:first-child { border-left: 1px solid var(--border); border-radius: 13px 0 0 13px; }
tr td:last-child { border-right: 1px solid var(--border); border-radius: 0 13px 13px 0; }
tbody tr { transition: transform .15s; }
tbody tr:hover td { background: rgba(220,4,175,.05); }
.badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.badge.on { background: rgba(52,211,153,.13); color: var(--green); box-shadow: inset 0 0 0 1px rgba(52,211,153,.25); }
.badge.off { background: rgba(248,113,113,.13); color: var(--red); box-shadow: inset 0 0 0 1px rgba(248,113,113,.25); }
.badge.ssl { background: rgba(52,211,153,.13); color: var(--green); box-shadow: inset 0 0 0 1px rgba(52,211,153,.25); }
.badge.nossl { background: rgba(251,191,36,.13); color: var(--yellow); box-shadow: inset 0 0 0 1px rgba(251,191,36,.25); }
.row-actions { display: flex; gap: 6px; }
.text-muted { color: var(--muted); }

/* ---------- Modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-bg.active { display: grid; }
.modal { border-radius: 22px; padding: 26px; width: 100%; max-width: 780px; max-height: 85vh; overflow: auto; box-shadow: 0 30px 90px rgba(0,0,0,.6); animation: rise .3s cubic-bezier(.2,.9,.3,1.15); }
.modal h3 { margin-bottom: 16px; font-size: 17px; }
.term { background: #0a0a10; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.term-head { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.term-head i { width: 10px; height: 10px; border-radius: 50%; font-style: normal; }
.term-head i:nth-child(1) { background: #ff5f57; } .term-head i:nth-child(2) { background: #febc2e; } .term-head i:nth-child(3) { background: #28c840; }
.term-head span { margin-left: 8px; }
pre.logbox { padding: 14px 16px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11.5px; line-height: 1.6; overflow: auto; max-height: 38vh; white-space: pre-wrap; word-break: break-all; color: #b8e8c5; }
pre.logbox.err { color: #f5b3b3; }
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast { background: rgba(20,20,28,.92); backdrop-filter: blur(14px); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 14px; padding: 13px 19px; font-size: 13px; box-shadow: 0 14px 40px rgba(0,0,0,.4); animation: slideIn .28s cubic-bezier(.2,.9,.3,1.2); }
.toast.err { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }

.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; background: rgba(255,255,255,.028); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 9px; transition: border .2s; }
.list-item:hover { border-color: var(--border2); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(220,4,175,.4); }

@media (max-width: 860px) {
  .side { width: 68px; padding: 18px 9px; }
  .side-logo b, .nav a span, .uchip .uname { display: none; }
  .nav a { justify-content: center; padding: 13px 0; }
  .nav a i { width: auto; }
  .main-wrap { padding: 18px 14px 30px; }
  .pagehead h2 { font-size: 21px; }
  .clock { display: none; }
}
