* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #000000;
    --glass: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.62);
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}
.glass-panel, .glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
}
.glass-card { padding: 22px; margin-bottom: 20px; }
.app-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; gap: 20px; padding: 20px; }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; padding: 22px; height: calc(100vh - 40px); position: sticky; top: 20px; }
.logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; }
.logo small { display: block; color: var(--muted); font-size: 12px; }
.nav-menu { display: flex; flex-direction: column; gap: 8px; }
.nav-item { color: var(--muted); text-decoration: none; padding: 11px 14px; border-radius: 10px; transition: 0.2s; font-size: 14px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.1); color: #fff; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.topbar-actions { display: flex; gap: 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-card { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 28px; font-weight: 700; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: 0.2s; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { opacity: 0.88; }
.btn-outline { background: transparent; color: #fff; border-color: var(--glass-border); }
.btn-outline:hover { background: rgba(255,255,255,0.08); }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--muted); margin-top: 10px; }
.full-width { width: 100%; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
input, select { background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); color: #fff; padding: 11px 14px; border-radius: 10px; font-size: 14px; outline: none; }
select option { background: #111; color: #fff; }
input:focus, select:focus { border-color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.08); }
th { color: var(--muted); font-weight: 500; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,0.1); border: 1px solid var(--glass-border); }
.status-pill { font-size: 12px; padding: 8px 12px; border-radius: 10px; text-align: center; border: 1px solid var(--glass-border); }
.status-pill.connected { background: rgba(34, 197, 94, 0.15); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
.status-pill.disconnected { background: rgba(255,255,255,0.05); color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.tab-section { display: none; }
.tab-section.active { display: block; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: #bbf7d0; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: #fecaca; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 6px; font-family: monospace; font-size: 13px; }
.auth-body { display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; text-align: center; }
.brand-badge { display: inline-block; padding: 4px 12px; border: 1px solid var(--glass-border); border-radius: 999px; font-size: 12px; letter-spacing: 2px; margin-bottom: 14px; }
.form-group { text-align: right; margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.hint { margin-top: 16px; font-size: 12px; color: var(--muted); }
.toast { position: fixed; bottom: 24px; left: 24px; background: #fff; color: #000; padding: 12px 20px; border-radius: 10px; font-weight: 600; display: none; z-index: 999; }
@media (max-width: 900px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { height: auto; position: static; }
}
