:root {
    --bg: #08101f;
    --bg-soft: rgba(16, 24, 44, 0.84);
    --text: #eef4ff;
    --muted: #9faccd;
    --line: rgba(255,255,255,.08);
    --primary: #7b72ff;
    --secondary: #ff67bb;
    --success: #21c787;
    --danger: #ff6b6b;
    --shadow: 0 24px 80px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: linear-gradient(180deg, #070d19 0%, #0a1325 100%); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.admin-bg { position: fixed; inset: 0; background: radial-gradient(circle at 10% 10%, rgba(123,114,255,.22), transparent 25%), radial-gradient(circle at 90% 20%, rgba(255,103,187,.16), transparent 20%), linear-gradient(180deg, rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: auto, auto, 32px 32px, 32px 32px; z-index: -1; }
.admin-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.admin-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); background: rgba(7, 13, 25, .78); border-bottom: 1px solid var(--line); }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-brand { font-weight: 900; letter-spacing: -.02em; font-size: 1.2rem; }
.admin-brand span { color: var(--secondary); }
.admin-nav { display: flex; flex-wrap: wrap; gap: .75rem; }
.admin-nav a { color: var(--muted); font-weight: 700; padding: .65rem .9rem; border-radius: 12px; }
.admin-nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.main-wrap { padding: 2rem 0 3rem; }
.card, .stats-card, .form-card, .login-card, .table-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-head h1, .card h2, .form-card h2, .login-card h1 { margin: 0 0 .5rem; letter-spacing: -.03em; }
.page-head p, .muted, label small, .help, .table-note, .login-card p { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stats-card, .card, .form-card, .table-card, .login-card { padding: 1.35rem; }
.stats-card strong { display: block; font-size: 1.9rem; margin-bottom: .25rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .75rem 1rem; border-radius: 14px; border: 1px solid transparent; cursor: pointer; font-weight: 800; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; }
.btn-secondary { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--line); }
.btn-danger { background: rgba(255,107,107,.14); border-color: rgba(255,107,107,.3); color: #ffd1d1; }
.flash { padding: 1rem 1.1rem; border-radius: 16px; margin-bottom: 1rem; border: 1px solid var(--line); }
.flash-success { background: rgba(33,199,135,.14); }
.flash-error { background: rgba(255,107,107,.14); }
.flash-warning { background: rgba(255,190,85,.14); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: .45rem; font-weight: 700; }
input, select { width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); padding: .8rem .9rem; }
input::placeholder { color: #90a0c7; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: .9rem .75rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .92rem; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: .35rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 800; border: 1px solid var(--line); }
.role-admin { background: rgba(123,114,255,.16); }
.role-reader { background: rgba(255,103,187,.14); }
.status-active { background: rgba(33,199,135,.14); }
.status-inactive { background: rgba(255,107,107,.14); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.login-wrap { min-height: calc(100vh - 79px); display: grid; place-items: center; }
.login-card { width: min(520px, 100%); }
.kicker { color: var(--secondary); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 800; }
.install-note { margin-top: 1rem; padding: .95rem 1rem; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px dashed var(--line); }
@media (max-width: 900px) { .grid-3, .form-grid { grid-template-columns: 1fr; } }

textarea { width: 100%; min-height: 160px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); padding: .8rem .9rem; resize: vertical; }
