:root {
    --bg: #0b1220;
    --panel: #111a2b;
    --panel-2: #162238;
    --line: #223252;
    --text: #e8edf7;
    --muted: #9fb0cf;
    --accent: #3b82f6;
    --accent-2: #1d4ed8;
    --success: #16a34a;
    --error: #dc2626;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #07101c, #0b1220 40%, #0e1930 100%);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
    background: rgba(6, 12, 23, 0.95);
    border-right: 1px solid var(--line);
    padding: 22px;
}
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 30px; }
.brand-badge {
    width: 48px; height: 48px; border-radius: 14px;
    display: grid; place-items: center; font-weight: bold;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.nav { display: grid; gap: 10px; }
.nav a {
    background: var(--panel); padding: 12px 14px; border-radius: 12px; border: 1px solid transparent;
}
.nav a:hover { border-color: var(--accent); }
.main-content { padding: 24px; }
.topbar h1 { margin: 0 0 6px; }
.topbar p { margin: 0 0 24px; color: var(--muted); }
.card {
    background: rgba(17, 26, 43, 0.95);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.stats-grid, .content-grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.content-grid { grid-template-columns: 1fr 1fr; }
.content-grid.single-top { grid-template-columns: 1fr; }
.stat-card span { color: var(--muted); display: block; margin-bottom: 10px; }
.stat-card strong { font-size: 36px; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.button-link, button {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: white; border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer; font-weight: bold;
}
.grid-form { display: grid; gap: 14px; }
.grid-form.two-col { grid-template-columns: 1fr 1fr; }
.grid-form .full { grid-column: 1 / -1; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
input, textarea, select {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.badge {
    display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(59,130,246,0.15); color: #bfdbfe; font-size: 12px;
}
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; }
.alert.success { background: rgba(22,163,74,0.15); border: 1px solid rgba(22,163,74,0.3); }
.alert.error { background: rgba(220,38,38,0.15); border: 1px solid rgba(220,38,38,0.3); }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card {
    width: min(100%, 460px); background: rgba(17,26,43,0.98); border: 1px solid var(--line);
    border-radius: 24px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.login-logo {
    width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2)); font-weight: bold; font-size: 24px; margin-bottom: 18px;
}
.login-card h1 { margin: 0 0 8px; }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.demo-box { margin-top: 18px; padding: 14px; background: var(--panel-2); border-radius: 14px; color: var(--muted); }
.inline-form { display: flex; gap: 10px; align-items: center; }
code { color: #93c5fd; }
@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { padding-bottom: 10px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .grid-form.two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .inline-form { flex-direction: column; align-items: stretch; }
}
