:root {
    --bg: #07080c;
    --panel: #111722;
    --panel-2: #171e2c;
    --text: #eef2ff;
    --muted: #9ca8bd;
    --border: rgba(255,255,255,.09);
    --red: #730B12;
    --red-2: #d42131;
    --green: #2ecc71;
    --shadow: 0 20px 60px rgba(0,0,0,.36);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, rgba(115,11,18,.38), transparent 32rem), radial-gradient(circle at bottom right, rgba(44,72,130,.22), transparent 32rem), var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    padding: 24px;
    background: rgba(8,10,15,.82);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.brand-logo {
    width: 46px; height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--red), var(--red-2));
    display: grid; place-items: center;
    font-weight: 900;
    box-shadow: var(--shadow);
}
.brand strong { display: block; font-size: 18px; }
.brand span { color: var(--muted); font-size: 12px; }
nav { display: grid; gap: 8px; }
nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--muted);
    transition: .15s ease;
}
nav a:hover, nav a.active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(115,11,18,.9), rgba(115,11,18,.18));
}
.sidebar-bottom { margin-top: auto; }
.danger-link { color: #ff7b86; }
.main { margin-left: 280px; padding: 30px; min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; }
h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: -.04em; }
p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 12px; }
.metric { font-size: 34px; font-weight: 900; }
.metric-label { color: var(--muted); }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: rgba(18,23,34,.78); }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.035); }
tr:hover td { background: rgba(255,255,255,.025); }
pre {
    margin: 0; white-space: pre-wrap; word-break: break-word;
    background: #070910; color: #d8e2ff;
    border: 1px solid var(--border);
    padding: 16px; border-radius: 18px;
    max-height: 72vh; overflow: auto;
}
.btn, button {
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; background: var(--red);
    color: white; border-radius: 14px;
    padding: 10px 14px; font-weight: 700; cursor: pointer;
}
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill {
    border: 1px solid rgba(46,204,113,.35);
    background: rgba(46,204,113,.12);
    color: #9df0bf;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}
.badge {
    display: inline-flex; padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: var(--muted);
    font-size: 12px;
}
input, textarea {
    width: 100%; background: #090c13; color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px; padding: 12px 14px; outline: none;
}
textarea { min-height: 60vh; resize: vertical; font-family: ui-monospace, monospace; }
.form-row { display: grid; gap: 8px; margin-bottom: 14px; }
label { color: var(--muted); font-size: 13px; }
.alert {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: rgba(255,255,255,.055);
}
.alert.success { border-color: rgba(46,204,113,.35); background: rgba(46,204,113,.1); }
.alert.error { border-color: rgba(255,80,95,.35); background: rgba(255,80,95,.1); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.login-card { width: min(440px, 100%); }
.searchbar { display: flex; gap: 10px; margin-bottom: 18px; }
.searchbar input { flex: 1; }
@media (max-width: 980px) {
    .sidebar { position: static; width: auto; }
    .main { margin-left: 0; padding: 20px; }
    .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
