:root {
    --bg: #0b1220;
    --panel: #121b2d;
    --panel-soft: #18243a;
    --line: #263550;
    --text: #e6edf7;
    --muted: #95a4bb;
    --primary: #3b82f6;
    --primary-soft: rgba(59, 130, 246, .16);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .16);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, .16);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, .16);
    --radius: 16px;
    --shadow: 0 20px 45px rgba(0, 0, 0, .2);
    --font: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    padding: 28px;
    border-right: 1px solid var(--line);
    background: rgba(7, 12, 20, .8);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand--center {
    justify-content: center;
}

.brand__badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.nav { display: flex; flex-direction: column; gap: 10px; }
.nav__link {
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
}
.nav__link:hover {
    background: var(--panel);
    border-color: var(--line);
    color: var(--text);
}

.sidebar__footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
}

.page-header h1,
.section-title h2,
.update-window h1,
.update-window h2,
.auth-card h1 {
    margin: 0;
}

.muted { color: var(--muted); font-size: 14px; }

.card {
    background: linear-gradient(180deg, rgba(24, 36, 58, .95), rgba(18, 27, 45, .95));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 34px;
    line-height: 1.1;
}

.btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .18s ease;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
}

.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost {
    background: rgba(255, 255, 255, .03);
    border-color: var(--line);
    color: var(--text);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, .08);
}

.btn--danger {
    background: var(--danger);
    color: #fff;
}

.btn--block { width: 100%; }
.btn--large { padding: 14px 22px; font-size: 16px; }

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}
.alert--success { background: var(--success-soft); border-color: rgba(16, 185, 129, .32); }
.alert--error { background: var(--danger-soft); border-color: rgba(239, 68, 68, .32); }

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid__full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
}

input, textarea, select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(4, 10, 18, .6);
    color: var(--text);
    padding: 12px 14px;
}

textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.section-title,
.section-actions,
.inline-actions,
.filters,
.pagination,
.meta-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-actions--center { justify-content: center; }
.inline-actions { flex-wrap: wrap; }
.inline-actions--top { justify-content: flex-start; margin-top: 18px; }
.meta-list { flex-wrap: wrap; }
.meta-list--stack {
    flex-direction: column;
    align-items: flex-start;
}

.table-wrap { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    text-align: left;
    vertical-align: top;
}

.table th { color: var(--muted); font-weight: 600; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge--success,
.badge--authorized { background: var(--success-soft); color: #67e8b1; }
.badge--pending { background: var(--warning-soft); color: #f9d27d; }
.badge--revoked,
.badge--blocked { background: var(--danger-soft); color: #ffa4a4; }

.release-highlight,
.auth-card__tips,
.empty-window {
    display: grid;
    gap: 12px;
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.auth-page,
.public-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card,
.update-window__card {
    width: min(760px, 100%);
    background: linear-gradient(180deg, rgba(24, 36, 58, .98), rgba(18, 27, 45, .98));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.auth-card { width: min(520px, 100%); }
.auth-card__header { margin-bottom: 20px; }

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}
.checkbox {
    grid-auto-flow: column;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}
.checkbox input {
    width: auto;
    margin: 0;
}

.update-window {
    width: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
}

.update-window__card { display: grid; gap: 24px; }
.update-window__version { display: grid; gap: 10px; text-align: center; }
.notice-block {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 18px;
    padding: 18px;
}

.empty {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 1080px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .grid--cards,
    .grid--two,
    .form-grid--two { grid-template-columns: 1fr; }
}

