:root {
    --bg: #07111f;
    --panel: #0f1d33;
    --panel-2: #142744;
    --line: rgba(255,255,255,0.08);
    --text: #eef4ff;
    --muted: #9caecc;
    --gold: #d9b160;
    --accent: #2c74ff;
    --success: #1f9d65;
    --danger: #c44c4c;
    --warning: #d48c2c;
    --shadow: 0 20px 50px rgba(0,0,0,0.25);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(44,116,255,0.18), transparent 32%),
        linear-gradient(180deg, #06101c, #081426 65%, #081223);
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 34px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 17, 31, 0.75);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
}
.brand-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}
.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--text); }
.content-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto;
    flex: 1;
}
.hero, .card, .stat-card, .table-card, .empty-state {
    background: linear-gradient(180deg, rgba(20,39,68,0.96), rgba(15,29,51,0.96));
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.hero {
    padding: 38px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    align-items: center;
}
.hero h1, h2, h3 { margin-top: 0; }
.hero p, .muted { color: var(--muted); line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(180deg, #377dff, #245cd1);
    color: white;
}
.button-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.16);
}
.button-danger {
    background: linear-gradient(180deg, #d65b5b, #b84343);
}
.button-small { padding: 9px 14px; border-radius: 10px; }
.stats-grid, .grid-2, .grid-3, .dashboard-grid {
    display: grid;
    gap: 18px;
}
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-top: 24px; }
.dashboard-grid { grid-template-columns: 1.2fr 1fr; margin-top: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card, .card, .table-card, .empty-state { padding: 24px; }
.stat-card h3 { font-size: 34px; color: var(--gold); margin-bottom: 8px; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.badge {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    color: var(--text);
}
.badge-success { background: rgba(31,157,101,0.18); color: #8ef0bf; }
.badge-warning { background: rgba(212,140,44,0.18); color: #ffcb80; }
.badge-danger { background: rgba(196,76,76,0.18); color: #ffadad; }
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
th { color: var(--muted); font-size: 14px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
label { color: var(--muted); font-size: 14px; }
input, select, textarea {
    width: 100%;
    background: rgba(7,17,31,0.9);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 13px 14px;
    outline: none;
}
textarea { min-height: 120px; resize: vertical; }
.auth-shell {
    width: min(560px, calc(100% - 24px));
    margin: 60px auto;
}
.auth-card { padding: 28px; }
.notice {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}
.notice-success { background: rgba(31,157,101,0.16); color: #9bf2c5; }
.notice-error { background: rgba(196,76,76,0.16); color: #ffc0c0; }
.notice-warning { background: rgba(212,140,44,0.16); color: #ffd8a8; }
.link-list { display: grid; gap: 14px; }
.link-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(7,17,31,0.42);
}
.footer {
    border-top: 1px solid var(--line);
    padding: 20px 34px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
}
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
@media (max-width: 980px) {
    .hero, .dashboard-grid, .grid-2, .grid-3, .stats-grid, .form-grid { grid-template-columns: 1fr; }
    .topbar, .footer { padding-inline: 18px; }
    .content-wrap { width: min(100% - 18px, 1200px); margin: 18px auto; }
}
