:root {
  --bg-body: #0d0a10;
  --bg-card: rgba(23, 17, 28, .82);
  --bg-card-hover: rgba(31, 23, 38, .94);
  --border: rgba(255, 255, 255, .09);
  --text-main: #f5f2f7;
  --text-muted: #9b93a4;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --success: #10b981;
  --danger: #ef4444;
  --blue: #3b82f6;
  --radius: 15px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 72% 8%, rgba(91, 33, 182, .16), transparent 28%), linear-gradient(135deg, var(--bg-body), #09070b 56%, #130c18); color: var(--text-main); font-family: 'Sora', system-ui, sans-serif; line-height: 1.5; min-height: 100vh; }
button, input, select { font: inherit; }
a { color: inherit; }
.layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 26px 20px; border-right: 1px solid var(--border); background: rgba(13, 10, 16, .88); backdrop-filter: blur(22px); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 8px 28px; }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; display: inline-grid; place-items: center; color: white; font-weight: 800; background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 10px 30px rgba(124, 58, 237, .34); }
.brand-mark.large { width: 58px; height: 58px; border-radius: 17px; font-size: 23px; margin-bottom: 18px; }
.brand strong, .brand small, .sidebar-footer strong, .sidebar-footer small { display: block; }
.brand strong { font-size: 14px; }
.brand small, .sidebar-footer small { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; margin-top: 2px; }
.nav { display: grid; gap: 7px; }
.nav-link { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 11px; text-decoration: none; color: var(--text-muted); font-size: 13px; font-weight: 600; transition: .2s ease; }
.nav-link span { width: 20px; color: #b6a6c7; text-align: center; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(139, 92, 246, .14); }
.nav-link.active { box-shadow: inset 3px 0 #8b5cf6; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--border); font-size: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 14px rgba(16, 185, 129, .8); flex: 0 0 auto; }
.main { margin-left: 260px; padding: 28px clamp(20px, 4vw, 52px) 70px; max-width: 1600px; }
.topbar, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { margin-bottom: 30px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.025em; }
.eyebrow { color: #a78bfa; text-transform: uppercase; font-size: 10px; letter-spacing: .17em; font-weight: 800; margin-bottom: 5px; }
.last-update, .muted-text { color: var(--text-muted); font-size: 12px; }
.section { scroll-margin-top: 25px; margin-bottom: 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-top: 18px; }
.stat-card, .card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow); }
.stat-card { padding: 19px; display: flex; gap: 14px; align-items: flex-start; }
.stat-icon { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; font-weight: 800; }
.stat-icon.blue { background: rgba(59,130,246,.13); color: #60a5fa; }.stat-icon.green { background: rgba(16,185,129,.13); color: #34d399; }.stat-icon.red { background: rgba(239,68,68,.12); color: #f87171; }.stat-icon.purple { background: rgba(139,92,246,.14); color: #a78bfa; }
.stat-card small, .stat-card strong, .stat-card p { display: block; }
.stat-card small { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.stat-card strong { font-size: 25px; margin: 3px 0 0; }
.stat-card p { margin: 2px 0 0; color: var(--text-muted); font-size: 10px; }
.card { padding: 23px; }
.table-wrap { overflow-x: auto; margin: 18px -23px -23px; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 14px 20px; text-align: left; border-top: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
th { color: var(--text-muted); text-transform: uppercase; font-size: 9px; letter-spacing: .1em; background: rgba(255,255,255,.018); }
td strong, td small { display: block; } td small { color: var(--text-muted); font-size: 10px; margin-top: 3px; }
.mono, code { font-family: 'JetBrains Mono', monospace; }
.badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 700; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success { color: #34d399; background: rgba(16,185,129,.12); }.badge.muted { color: #9ca3af; background: rgba(156,163,175,.1); }.badge.danger { color: #f87171; background: rgba(239,68,68,.12); }
.empty-state { text-align: center; padding: 45px; }.empty-state span { display: block; color: var(--text-muted); margin-top: 6px; }
.package-total { color: #c4b5fd; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.25); border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 700; }.package-table { margin-top: 16px; }.package-table table { min-width: 760px; }.package-pending { color: #fbbf24; font-size: 10px; font-weight: 700; }
.package-actions, .command-buttons { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid, .login-form { display: grid; gap: 14px; margin-top: 21px; }
label span { display: block; color: var(--text-muted); font-size: 11px; font-weight: 600; margin-bottom: 7px; }
input, select { width: 100%; color: white; background: rgba(255,255,255,.045); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus, select:focus { border-color: rgba(139,92,246,.75); box-shadow: 0 0 0 3px rgba(139,92,246,.11); }
select option { background: #17111c; }
.button { border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; color: white; text-decoration: none; font-size: 11px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.button.primary { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 9px 25px rgba(109,40,217,.25); }.button.primary:hover { background: linear-gradient(135deg, #9f7aea, #7c3aed); }.button.secondary { background: rgba(255,255,255,.045); border-color: var(--border); }.button.secondary:hover { background: rgba(255,255,255,.08); }
.button.danger { color: #fecaca; background: rgba(239,68,68,.11); border-color: rgba(239,68,68,.32); }.button.danger:hover { background: rgba(239,68,68,.2); }.button.compact, .device-action .button { padding: 7px 10px; }.device-action { margin: 0; }.device-actions { display: flex; align-items: center; gap: 7px; }.action-complete { color: #7f7788; font-size: 10px; white-space: nowrap; }
.code-card h2 { font-family: 'JetBrains Mono', monospace; color: #c4b5fd; margin-top: 14px; }
.code-block { display: flex; gap: 10px; align-items: stretch; margin-top: 15px; padding: 10px; border: 1px solid var(--border); background: rgba(5,4,7,.48); border-radius: 11px; }
.code-block code { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: #d8d1df; font-size: 10px; align-self: center; }
.code-block button { flex: 0 0 auto; border: 1px solid rgba(139,92,246,.35); background: rgba(139,92,246,.1); color: #c4b5fd; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 10px; }
.steps { display: grid; gap: 0; margin-top: 20px; }.steps article { display: flex; gap: 15px; padding: 17px 0; border-top: 1px solid var(--border); }.steps article > span { width: 27px; height: 27px; border-radius: 50%; background: rgba(139,92,246,.13); color: #a78bfa; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: 0 0 auto; }.steps article > div { flex: 1; min-width: 0; }.steps p { color: var(--text-muted); font-size: 11px; margin: 4px 0 0; }
.requirement-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 13px 14px; border: 1px solid rgba(245,158,11,.28); border-radius: 11px; background: rgba(245,158,11,.07); }.requirement-note strong { flex: 0 0 auto; color: #fbbf24; font-size: 11px; }.requirement-note span { color: var(--text-muted); font-size: 10px; line-height: 1.55; }
.endpoint-note { margin-top: 17px; border: 1px solid var(--border); background: rgba(255,255,255,.025); border-radius: 12px; padding: 13px; display: flex; align-items: center; gap: 11px; font-size: 11px; }.endpoint-note strong, .endpoint-note a { display: block; }.endpoint-note a { color: #a78bfa; margin-top: 3px; text-decoration: none; }
.alert { padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; font-size: 12px; }.alert.danger { color: #fecaca; border: 1px solid rgba(239,68,68,.28); background: rgba(239,68,68,.1); }.alert.success { color: #a7f3d0; border: 1px solid rgba(16,185,129,.28); background: rgba(16,185,129,.1); }
.device-dialog { width: min(720px, calc(100% - 28px)); color: var(--text); background: #151019; border: 1px solid var(--border); border-radius: 18px; padding: 23px; box-shadow: 0 35px 100px rgba(0,0,0,.65); }.device-dialog::backdrop { background: rgba(4,3,6,.78); backdrop-filter: blur(5px); }.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }.dialog-header h2 { margin: 0; }.dialog-close { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); color: var(--text-muted); background: rgba(255,255,255,.04); cursor: pointer; font-size: 21px; }.device-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 20px; }.device-detail-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.025); }.device-detail-grid small, .device-detail-grid strong { display: block; }.device-detail-grid small { color: var(--text-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 5px; }.device-detail-grid strong { font-size: 11px; overflow-wrap: anywhere; }.rename-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-top: 18px; }.rename-form label span { margin-bottom: 7px; }
.monitoring-history { margin-top: 18px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: rgba(5,4,7,.34); }.monitoring-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }.monitoring-heading h3 { margin: 0; font-size: 14px; }.monitoring-heading > span, .chart-range { color: var(--text-muted); font-size: 9px; }.chart-legend { display: flex; gap: 14px; margin: 14px 0 8px; font-size: 10px; font-weight: 700; }.chart-legend .cpu { color: #60a5fa; }.chart-legend .ram { color: #a78bfa; }.metric-chart { display: block; width: 100%; height: 105px; overflow: visible; }.metric-chart line { stroke: rgba(255,255,255,.07); stroke-width: 1; vector-effect: non-scaling-stroke; }.metric-chart polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }.metric-chart .cpu-line { stroke: #60a5fa; }.metric-chart .ram-line { stroke: #a78bfa; }.chart-range { display: flex; justify-content: space-between; margin-top: 4px; }.history-empty { margin-top: 14px; padding: 18px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-muted); text-align: center; font-size: 10px; }
.command-panel { margin-top: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.018); }.command-buttons { margin-top: 13px; }.command-history { display: grid; gap: 6px; margin-top: 13px; }.command-history > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; align-items: center; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.025); }.command-history code { min-width: 0; overflow-wrap: anywhere; font-size: 9px; }.command-history small { grid-column: 1 / -1; color: var(--text-muted); font-size: 9px; }.command-status { font-size: 9px; font-weight: 800; text-transform: uppercase; }.command-status.success { color: #34d399; }.command-status.danger { color: #f87171; }.command-status.accent { color: #a78bfa; }.command-status.pending { color: #fbbf24; }.command-status.muted { color: #9ca3af; }.compact-empty { display: block; margin-top: 0; padding: 12px; }
.mobile-menu { display: none; border: 1px solid var(--border); color: white; background: var(--bg-card); border-radius: 9px; width: 38px; height: 38px; }
.logout-form { margin-left: auto; }
.login-body { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(430px, 100%); }
.login-card { text-align: center; border: 1px solid var(--border); border-radius: 22px; padding: clamp(27px, 7vw, 46px); background: rgba(23,17,28,.82); box-shadow: 0 35px 100px rgba(0,0,0,.42); backdrop-filter: blur(18px); }
.login-card h1 { margin: 0 0 10px; }.login-card .muted-text { max-width: 310px; margin: 0 auto; }.login-form { text-align: left; }.login-form .button { margin-top: 3px; padding: 12px; }.login-foot { display: block; margin-top: 25px; color: #746d7c; }

@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .two-column { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: 25px 0 70px rgba(0,0,0,.45); }.sidebar.open { transform: translateX(0); }.main { margin-left: 0; padding: 20px 16px 55px; }.mobile-menu { display: inline-grid; place-items: center; }.topbar { align-items: flex-start; }.topbar h1 { font-size: 23px; }.logout-form { margin-left: 0; }.last-update { display: none; }.stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.stat-card { padding: 14px; gap: 10px; }.stat-icon { width: 33px; height: 33px; }.stat-card strong { font-size: 21px; }.card { padding: 18px; }.table-wrap { margin: 16px -18px -18px; } }
@media (max-width: 460px) { .stats-grid { grid-template-columns: 1fr; }.topbar .button { padding-inline: 10px; }.code-block { flex-direction: column; }.code-block button { align-self: flex-end; }.device-detail-grid, .rename-form { grid-template-columns: 1fr; }.device-dialog { padding: 18px; } }
