:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --border: #2d3a4f;
    --text: #e7ecf3;
    --muted: #8b9cb3;
    --primary: #3b82f6;
    --success: #22c55e;
    --error: #ef4444;
    --warn: #f59e0b;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Segoe UI, system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
code { background: #111827; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 1rem; }
.brand { font-weight: 700; font-size: 1.1rem; margin-bottom: 1.5rem; color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar nav a { padding: 0.55rem 0.75rem; border-radius: 8px; color: var(--muted); }
.sidebar nav a:hover { background: #243044; color: #fff; }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 1rem; font-size: 0.85rem; color: var(--muted); display: flex; justify-content: space-between; }
.content { flex: 1; padding: 1.5rem 2rem; }
.content h1 { margin-top: 0; font-size: 1.5rem; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; width: 100%; max-width: 420px; }
.auth-card h1 { margin-top: 0; text-align: center; }

label { display: block; margin: 0.75rem 0 0.35rem; font-size: 0.85rem; color: var(--muted); }
input, textarea, select { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: #111827; color: var(--text); }
textarea { resize: vertical; font-family: inherit; }

.btn { display: inline-block; padding: 0.55rem 1rem; border: none; border-radius: 8px; cursor: pointer; font-size: 0.9rem; background: #374151; color: #fff; }
.btn-primary { background: var(--primary); }
.btn-danger { background: var(--error); }
.btn-sm { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.form-inline input { width: auto; min-width: 120px; flex: 1; }
.form-grid { display: grid; gap: 0.25rem; max-width: 640px; }
.form-actions { margin-top: 1rem; }
.inline { display: inline; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; }
.block { margin-bottom: 1.25rem; }
.grid.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.grid.stats .card { text-align: center; }
.grid.stats span { display: block; color: var(--muted); font-size: 0.85rem; }
.grid.stats strong { font-size: 1.75rem; }
.grid.stats .warn strong { color: var(--warn); }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.actions { white-space: nowrap; }
.row-warn { background: rgba(245, 158, 11, 0.08); }

.badge { padding: 0.2rem 0.5rem; border-radius: 999px; font-size: 0.75rem; background: #374151; }
.badge-active { background: rgba(34,197,94,.2); color: var(--success); }
.badge-banned { background: rgba(239,68,68,.2); color: var(--error); }
.badge-expired { background: rgba(245,158,11,.2); color: var(--warn); }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-success { background: rgba(34,197,94,.15); border: 1px solid var(--success); }
.alert-error { background: rgba(239,68,68,.15); border: 1px solid var(--error); }
.hint { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0; }
.hint.ok { color: var(--success); }
.hint.warn { color: var(--warn); }
.kv { list-style: none; padding: 0; }
.kv li { padding: 0.35rem 0; }
.code-block { background: #111827; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: 0.8rem; line-height: 1.4; max-height: 400px; }
