:root {
    --bg: #0b0b0c;
    --panel: #151518;
    --panel-soft: #1d1d22;
    --text: #f4f1ea;
    --muted: #aaa4a0;
    --line: rgba(255,255,255,.12);
    --accent: #e7d6bd;
    --danger: #ff6b6b;
    --success: #76d191;
    --radius: 22px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, rgba(77,66,55,.65), transparent 42rem), var(--bg);
    color: var(--text);
}
a { color: inherit; }
.admin-shell { width: min(1320px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 60px; }
.admin-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); font-size: .78rem; font-weight: 800; }
h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 5rem); line-height: .9; letter-spacing: -.07em; }
h2 { margin: 0 0 14px; font-size: 1.45rem; }
h2 span { color: var(--muted); font-weight: 500; }
nav { display: flex; gap: 10px; flex-wrap: wrap; }
nav a, .button, .danger {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 15px;
    text-decoration: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.button { background: var(--text); color: var(--bg); border-color: var(--text); }
.danger { color: var(--danger); border-color: rgba(255,107,107,.35); white-space: nowrap; }
.panel {
    background: rgba(255,255,255,.045);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 30px);
    margin-bottom: 18px;
}
.login-panel { max-width: 520px; }
.panel p, .hint, small, .empty { color: var(--muted); line-height: 1.5; }
code { color: var(--accent); }
label { display: grid; gap: 7px; color: var(--muted); margin-bottom: 15px; }
input[type="text"], input[type="password"], input:not([type]) {
    width: 100%; border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px;
    background: var(--panel-soft); color: var(--text); font: inherit;
}
.filebox {
    border: 1px dashed rgba(231,214,189,.55);
    border-radius: var(--radius);
    padding: 24px;
    place-items: center;
    text-align: center;
    cursor: pointer;
    background: rgba(231,214,189,.04);
}
.filebox input { margin-top: 12px; max-width: 100%; }
.check { display: flex; align-items: center; gap: 10px; }
.notice { margin-bottom: 16px; border-radius: 16px; padding: 13px 16px; border: 1px solid var(--line); }
.notice--success { background: rgba(118,209,145,.14); border-color: rgba(118,209,145,.35); }
.notice--error { background: rgba(255,107,107,.14); border-color: rgba(255,107,107,.35); }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.media-list { display: grid; gap: 12px; }
.media-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(0,0,0,.14);
}
.media-item img, .video-thumb { width: 82px; height: 82px; object-fit: cover; border-radius: 14px; background: var(--panel-soft); }
.video-thumb { display: grid; place-items: center; color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: .75rem; }
.media-item strong { display: block; overflow-wrap: anywhere; margin-bottom: 5px; }
.media-item small { display: block; }
@media (max-width: 980px) { .grid-two { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
    .admin-header { align-items: flex-start; flex-direction: column; }
    .media-item { grid-template-columns: 70px minmax(0, 1fr); }
    .media-item form { grid-column: 1 / -1; }
    .media-item img, .video-thumb { width: 70px; height: 70px; }
}

.settings-form textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); background: #16161a; color: #f6f0e8; border-radius: 14px; padding: 12px 14px; font: inherit; resize: vertical; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }
.admin-separator { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 24px 0; }
.settings-form h3 { margin: 0 0 10px; }
