/* ═══════════════════════════════════════════════════════════════
   Админка — движок «Герман Парло» v1.1
   Сайдбар + топбар, карточки, мягкие тени. Адаптив: на мобильных
   сайдбар становится выдвижным (бургер).
   ═══════════════════════════════════════════════════════════════ */
:root {
    --abg: #f2f4f8;
    --acard: #ffffff;
    --afg: #1a2233;
    --amuted: #68718a;
    --aaccent: #3556d4;
    --aaccent-2: #7a4fd4;
    --aaccent-soft: #e8edfb;
    --adanger: #d0453c;
    --aok: #178a4c;
    --aborder: #e3e7f0;
    --asidebar: #131a2a;
    --asidebar-2: #0d1320;
    --asidebar-fg: #b8c2d9;
    --aradius: 14px;
    --ashadow: 0 1px 2px rgba(16,24,40,0.05), 0 4px 16px rgba(16,24,40,0.06);
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body.admin-body {
    margin: 0;
    background: var(--abg);
    color: var(--afg);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--aaccent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(53,86,212,0.18); }

/* ─── Каркас: сайдбар + контент ─────────────────────── */
.admin-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}
.admin-sidebar {
    background: linear-gradient(170deg, var(--asidebar) 0%, var(--asidebar-2) 100%);
    color: var(--asidebar-fg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 60;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }
.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.admin-brand:hover { text-decoration: none; }
.admin-brand-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--aaccent), var(--aaccent-2));
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(53,86,212,0.45);
    flex: 0 0 auto;
}
.admin-brand-text {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.2;
    min-width: 0;
}
.admin-brand-text small {
    font-weight: 400;
    font-size: 0.68rem;
    color: #7e8aa5;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-top: 3px;
}
.admin-nav { padding: 12px 12px 20px; flex: 1; }
.admin-nav-group {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #5d6883;
    padding: 16px 12px 6px;
    font-weight: 700;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 10px;
    color: var(--asidebar-fg);
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.14s ease, color 0.14s ease;
    position: relative;
}
.admin-nav a .nav-ico { width: 22px; text-align: center; font-size: 1rem; flex: 0 0 auto; filter: saturate(0.75); }
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #eef2fa; text-decoration: none; }
.admin-nav a.active {
    background: linear-gradient(90deg, rgba(53,86,212,0.32), rgba(122,79,212,0.16));
    color: #fff;
    font-weight: 600;
}
.admin-nav a.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px; bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--aaccent), var(--aaccent-2));
}
.admin-nav a.active .nav-ico { filter: none; }
.admin-sidebar-foot {
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}
.admin-sidebar-foot a { color: #93a0bd; }
.admin-sidebar-foot a:hover { color: #fff; }
.admin-version { color: #525e7a; font-size: 0.68rem; margin-top: 8px; letter-spacing: 0.03em; }

.admin-content { min-width: 0; display: flex; flex-direction: column; }
.admin-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,14,22,0.5);
    z-index: 55;
    backdrop-filter: blur(2px);
}

/* ─── Топбар ────────────────────────────────────────── */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 26px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--aborder);
}
.admin-page-title { margin: 0; font-size: 1.22rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.admin-burger {
    display: none;
    border: 1px solid var(--aborder);
    background: #fff;
    border-radius: 9px;
    width: 38px; height: 38px;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--afg);
    flex: 0 0 auto;
}
.admin-quick-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--abg);
    border: 1px solid var(--aborder);
    border-radius: 999px;
    padding: 5px 6px 5px 14px;
    min-width: 260px;
    max-width: 420px;
    flex: 1;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-quick-search:focus-within {
    border-color: var(--aaccent);
    box-shadow: 0 0 0 3px rgba(53,86,212,0.14);
    background: #fff;
}
.admin-quick-search .qs-icon { color: var(--amuted); flex: 0 0 auto; }
.admin-quick-search input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--afg);
    min-width: 0;
    padding: 4px 0;
}
.admin-quick-search button {
    border: none;
    background: linear-gradient(135deg, var(--aaccent), var(--aaccent-2));
    color: #fff;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
    transition: filter 0.15s ease;
}
.admin-quick-search button:hover { filter: brightness(1.1); }

/* ─── Контент ───────────────────────────────────────── */
.admin-main { padding: 26px; flex: 1; max-width: 1320px; width: 100%; margin: 0 auto; }
.card {
    background: var(--acard);
    border: 1px solid var(--aborder);
    border-radius: var(--aradius);
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: var(--ashadow);
}
.card h2 { margin-top: 0; font-size: 1.05rem; font-weight: 700; }
.card h3 { font-size: 0.96rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ─── Статистические плитки ─────────────────────────── */
.stat-tile {
    background: var(--acard);
    border: 1px solid var(--aborder);
    border-radius: var(--aradius);
    padding: 18px 20px;
    box-shadow: var(--ashadow);
    position: relative;
    overflow: hidden;
}
.stat-tile::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--aaccent), var(--aaccent-2));
    opacity: 0.75;
}
.stat-tile .stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #24304d, #3556d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-tile .stat-label { color: var(--amuted); font-size: 0.8rem; margin-top: 6px; }

/* ─── Таблицы ───────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    background: var(--acard);
    border: 1px solid var(--aborder);
    border-radius: var(--aradius);
    box-shadow: var(--ashadow);
}
.admin-table { width: 100%; border-collapse: collapse; background: transparent; }
.admin-table th, .admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--aborder);
    text-align: left;
    vertical-align: middle;
}
.admin-table thead th, .admin-table tr:first-child th {
    background: #f7f9fc;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--amuted);
    font-weight: 700;
    position: sticky;
    top: 0;
}
.admin-table tbody tr { transition: background 0.1s ease; }
.admin-table tbody tr:hover { background: #f6f8fd; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .actions { white-space: nowrap; display: flex; gap: 8px; }
.admin-table input[type="text"], .admin-table input[type="date"] { padding: 7px 10px; }
.muted { color: var(--amuted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }

/* ─── Кнопки ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 17px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--aborder);
    background: #fff;
    color: var(--afg);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none !important;
    transition: all 0.14s ease;
    box-shadow: 0 1px 2px rgba(16,24,40,0.05);
    white-space: nowrap;
}
.btn:hover { background: #f4f6fb; border-color: #ccd4e4; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--aaccent), var(--aaccent-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(53,86,212,0.35);
}
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--aaccent), var(--aaccent-2)); }
.btn-danger { background: #fff; border-color: #ecc9c5; color: var(--adanger); box-shadow: none; }
.btn-danger:hover { background: #fdeeed; border-color: var(--adanger); }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }

/* ─── Формы ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group > label, .admin-form label.field-label, .install-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.form-hint { color: var(--amuted); font-size: 0.8rem; margin-top: 6px; line-height: 1.45; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="search"], input[type="file"], select, textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--aborder);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.93rem;
    background: #fff;
    color: var(--afg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; line-height: 1.65; }
textarea.poem-text-input {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.03rem;
    min-height: 340px;
    background: linear-gradient(#fff, #fff), repeating-linear-gradient(#fff, #fff 31px, #eef1f7 31px, #eef1f7 32px);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--aaccent);
    box-shadow: 0 0 0 3px rgba(53,86,212,0.14);
}
input[type="file"] { padding: 8px; background: #f7f9fc; cursor: pointer; }
input[type="file"]::file-selector-button {
    border: 1px solid var(--aborder);
    background: #fff;
    border-radius: 8px;
    padding: 6px 14px;
    margin-right: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--afg);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--aaccent); width: 16px; height: 16px; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.checkbox-grid label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    padding: 6px 13px;
    border: 1px solid var(--aborder);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.13s ease;
}
.checkbox-grid label:hover { border-color: var(--aaccent); background: var(--aaccent-soft); }
.checkbox-grid label:has(input:checked) {
    background: linear-gradient(135deg, var(--aaccent), var(--aaccent-2));
    border-color: transparent;
    color: #fff;
}
.check-list label {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
    font-weight: 400;
    padding: 10px 14px;
    border: 1px solid var(--aborder);
    border-radius: 10px;
    background: #fbfcfe;
    cursor: pointer;
    transition: all 0.13s ease;
}
.check-list label:hover { border-color: #c6d0e6; }
.check-list label:has(input:checked) { border-color: var(--aaccent); background: var(--aaccent-soft); }
.field-error { color: var(--adanger); font-size: 0.85rem; margin-top: 4px; }

/* ─── Автоподсказки циклов ──────────────────────────── */
.suggest-box {
    position: fixed;
    z-index: 999;
    background: #fff;
    border: 1px solid var(--aborder);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16,24,40,0.16);
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
}
.suggest-item {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--afg);
}
.suggest-item b { color: var(--aaccent); font-weight: 700; }
.suggest-item:hover, .suggest-item.active { background: var(--aaccent-soft); }

/* ─── Flash ─────────────────────────────────────────── */
.flash {
    padding: 13px 18px 13px 46px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.92rem;
    position: relative;
    animation: flash-in 0.25s ease;
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; } }
.flash::before { position: absolute; left: 15px; top: 12px; font-size: 1.05rem; }
.flash-ok { background: #e6f6ec; color: #0f5c33; border: 1px solid #bfe6cf; }
.flash-ok::before { content: "✓"; color: var(--aok); font-weight: 800; }
.flash-error { background: #fdeceb; color: #8c231c; border: 1px solid #f2c8c4; }
.flash-error::before { content: "✕"; color: var(--adanger); font-weight: 800; }

/* ─── Пагинация ─────────────────────────────────────── */
.admin-pagination { display: flex; gap: 6px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.admin-pagination a, .admin-pagination span.cur {
    padding: 7px 13px;
    border: 1px solid var(--aborder);
    border-radius: 9px;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.12s ease;
}
.admin-pagination a:hover { border-color: var(--aaccent); color: var(--aaccent); text-decoration: none; }
.admin-pagination span.cur {
    background: linear-gradient(135deg, var(--aaccent), var(--aaccent-2));
    border-color: transparent;
    color: #fff;
}
.admin-pagination .gap { border: none; background: none; padding: 6px 2px; color: var(--amuted); }

/* ─── Фильтры списка ────────────────────────────────── */
.list-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    background: var(--acard);
    border: 1px solid var(--aborder);
    border-radius: var(--aradius);
    padding: 14px 16px;
    box-shadow: var(--ashadow);
}
.list-filters input[type="search"], .list-filters select { width: auto; }
.list-filters input[type="search"] { min-width: 260px; flex: 1; }

/* ─── Массовые блоки ────────────────────────────────── */
.bulk-item {
    background: var(--acard);
    border: 1px solid var(--aborder);
    border-radius: var(--aradius);
    padding: 18px 20px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: var(--ashadow);
}
.bulk-item .bulk-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--amuted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
}
.bulk-remove { position: absolute; top: 12px; right: 14px; }
.bulk-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 700px) { .bulk-fields { grid-template-columns: 1fr; } }

/* ─── Drag & drop список треков ─────────────────────── */
.track-editor { list-style: none; margin: 0 0 14px; padding: 0; }
.track-editor li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--aborder);
    border-radius: 11px;
    padding: 11px 14px;
    margin-bottom: 9px;
    cursor: grab;
    transition: box-shadow 0.14s ease, border-color 0.14s ease, opacity 0.14s;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.track-editor li:hover { border-color: #c9d3e8; box-shadow: 0 4px 14px rgba(16,24,40,0.08); }
.track-editor li.dragging { opacity: 0.4; }
.track-editor li.drag-over { border-color: var(--aaccent); box-shadow: 0 0 0 3px rgba(53,86,212,0.15); }
.track-editor .drag-handle { color: #b3bccf; cursor: grab; user-select: none; font-size: 1.15rem; flex: 0 0 auto; }
.track-editor .track-kind {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--aaccent-soft);
    color: var(--aaccent);
    white-space: nowrap;
    flex: 0 0 auto;
}
.track-editor .track-kind.kind-poem { background: #e2f4e9; color: var(--aok); }
.track-editor .track-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.track-editor .track-main input[type="text"] { padding: 6px 10px; }
.track-editor .upload-status { font-size: 0.78rem; }
.track-editor .row-movers { display: flex; gap: 4px; flex: 0 0 auto; }
.track-editor .row-movers .btn { padding: 4px 8px; font-size: 0.7rem; line-height: 1; }
@media (hover: none) {
    .track-editor li { cursor: default; }
    .track-editor .drag-handle { display: none; }
}

/* ─── Прогресс чанковой загрузки ────────────────────── */
.upload-progress {
    height: 8px;
    background: #e7ebf4;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}
.upload-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--aaccent), var(--aaccent-2));
    transition: width 0.18s ease;
}

/* ─── Предпросмотр стиха (модалка) ──────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 22, 0.6);
    backdrop-filter: blur(4px);
    z-index: 300;
    overflow-y: auto;
    padding: 40px 16px;
}
.modal-overlay.open { display: block; }
.modal-box {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    padding: 38px 44px;
    position: relative;
    font-family: Georgia, serif;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    animation: modal-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; } }
.modal-close {
    position: absolute;
    top: 14px; right: 18px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    width: 38px; height: 38px;
    border-radius: 50%;
    transition: background 0.14s;
}
.modal-close:hover { background: #f1f3f8; color: #333; }
.modal-box h2 { font-family: inherit; margin-top: 0; }
.modal-poem-title { font-size: 1.55rem; margin: 0 0 4px; }
.modal-poem-date { color: #888; font-size: 0.85rem; font-family: sans-serif; margin-bottom: 20px; }
.modal-poem-text { white-space: pre-wrap; line-height: 1.8; font-size: 1.05rem; }

/* ─── Страница входа ────────────────────────────────── */
.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(53,86,212,0.5), transparent 60%),
        radial-gradient(800px 500px at 110% 110%, rgba(122,79,212,0.42), transparent 55%),
        linear-gradient(160deg, #141b2d, #0c111d 70%);
}
.login-box {
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    padding: 40px 44px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: modal-in 0.3s ease;
}
.login-title { margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.login-subtitle { color: var(--amuted); margin: 6px 0 24px; font-size: 0.9rem; }
.login-box label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.login-box .btn { width: 100%; margin-top: 18px; padding: 12px; justify-content: center; }
.login-back { margin-top: 20px; font-size: 0.85rem; text-align: center; }

/* ─── Аналитика ─────────────────────────────────────── */
.chart-wrap { background: #fff; border: 1px solid var(--aborder); border-radius: var(--aradius); padding: 18px; }
.chart-wrap canvas { width: 100%; height: 260px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.bar-row .bar-label { flex: 0 0 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; }
.bar-row .bar-track { flex: 1; height: 16px; background: #edf0f7; border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--aaccent), var(--aaccent-2));
    border-radius: 6px;
    transition: width 0.4s ease;
}
.bar-row .bar-value { flex: 0 0 76px; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.82rem; color: var(--amuted); }

/* ─── Установка ─────────────────────────────────────── */
.install-body {
    background:
        radial-gradient(900px 500px at 12% -10%, rgba(53,86,212,0.42), transparent 60%),
        radial-gradient(800px 500px at 108% 112%, rgba(122,79,212,0.34), transparent 55%),
        #101625;
    font: 15px/1.6 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    color: var(--afg);
}
.install-wrap {
    max-width: 740px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    padding: 42px 50px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.install-wrap h1 { margin-top: 0; font-size: 1.65rem; letter-spacing: -0.01em; }
.install-steps { color: var(--amuted); font-size: 0.85rem; margin-bottom: 26px; }
.req-list { list-style: none; padding: 0; margin: 0 0 20px; }
.req-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eef0f6;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.92rem;
}
.req-ok { color: var(--aok); font-weight: 700; }
.req-fail { color: var(--adanger); font-weight: 700; }
.req-warn { color: #a06b00; font-weight: 700; }
.install-section {
    border: 1px solid var(--aborder);
    border-radius: var(--aradius);
    padding: 20px 22px;
    margin-bottom: 18px;
    background: #fbfcfe;
}
.install-section h2 { margin-top: 0; font-size: 1.02rem; }
.install-form .form-group { margin-bottom: 14px; }
.install-form label { font-weight: 500 !important; }
.mysql-fields { display: none; }
.mysql-fields.visible { display: block; }
.install-done { text-align: center; padding: 20px 0; }
.install-done .big-icon { font-size: 3.2rem; }
.install-warning {
    background: #fff7e6;
    border: 1px solid #f0d9a8;
    color: #7a5b12;
    padding: 15px 18px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: left;
    font-size: 0.92rem;
}

/* ─── Прочее ────────────────────────────────────────── */
.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #e7eaf2;
    font-size: 0.92rem;
}
.kv-list li:last-child { border-bottom: none; }
.current-file {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f4f6fb;
    border: 1px solid var(--aborder);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 0.88rem;
}
audio.mini-player { height: 34px; }
.help-note {
    background: linear-gradient(120deg, #eef2fe, #f3eefe);
    border: 1px solid #d9e0f7;
    color: #3a4a7f;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 18px;
}
code { background: #eef0f6; padding: 2px 7px; border-radius: 5px; font-size: 0.86em; }
.import-result { margin-top: 14px; }
.import-result ul { margin: 8px 0; padding-left: 20px; }

/* ─── Мобильная адаптация ───────────────────────────── */
@media (max-width: 980px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 264px;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.24s cubic-bezier(0.3, 0.9, 0.4, 1);
        box-shadow: none;
    }
    .admin-shell.sidebar-open .admin-sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,0.35); }
    .admin-shell.sidebar-open .admin-backdrop { display: block; }
    .admin-burger { display: flex; align-items: center; justify-content: center; }
    .admin-topbar { padding: 12px 16px; }
    .admin-main { padding: 18px 14px 50px; }
    .admin-quick-search { min-width: 0; }
    .admin-quick-search button { display: none; }
    .admin-page-title { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; }
}
