:root {
    --bg: #0f1115;
    --panel: #171a21;
    --line: #2a303c;
    --text: #e8eaed;
    --muted: #9aa3b2;
    --accent: #c4a574;
    --danger: #d96b6b;
    --ok: #6bbf8a;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: radial-gradient(1200px 600px at 10% -10%, #1a2030, var(--bg));
    color: var(--text);
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(0,0,0,.25);
}
.admin-brand { letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.admin-bar nav { display: flex; gap: 18px; align-items: center; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; }

.auth { display: grid; place-items: center; }
.auth-card {
    width: min(420px, 92vw);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px;
}

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
h1 { font-weight: 500; letter-spacing: -.02em; margin: 0 0 12px; }

.stack { display: grid; gap: 14px; }
.form-grid { max-width: 640px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: 8px; }
input[type="text"], input[type="email"], input[type="password"], input[type="file"], select, textarea {
    width: 100%;
    background: #0c0e13;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
}
button, .btn {
    display: inline-block;
    background: var(--accent);
    color: #1a140c;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
button.linkish, .linkish {
    background: none;
    border: 0;
    color: var(--accent);
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.linkish.danger { color: var(--danger); }
.inline { display: inline; }

.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.link-code { font-size: 11px; word-break: break-all; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.badge.ok { background: #1d3a2a; color: #9ee0b8; }
.badge.priv { background: #3a2a1d; color: #e0c49e; }

.alert { padding: 10px 12px; border-radius: 8px; }
.alert.error { background: #3a1d1d; color: #ffb4b4; }
.alert.success { background: #1d3a2a; color: #9ee0b8; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stat-label { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.stat-value { font-size: 24px; margin-top: 6px; }

.section-title { margin: 28px 0 12px; font-size: 16px; font-weight: 600; }
.access-box {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px 18px;
    background: #12151c;
}
.access-box legend { padding: 0 6px; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.indent { margin: 10px 0 14px 22px; display: grid; gap: 10px; }
.check-grid { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.hidden { display: none !important; }
