/* ══════════════════════════════════════════════════════════════
   Lunex Shop — оформление в стиле основного Lunex.
   Токены совпадают с lunex.fun: белая светлая тема, тот же бренд.
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --brand: #2b7fff;
    --brand-2: #00d4ff;
    --grad-vivid: linear-gradient(135deg, #6a5cff 0%, #2b7fff 55%, #00d4ff 100%);
    --glow-brand: 0 8px 28px rgba(43,127,255,.35);

    --success: #22b36a;
    --warning: #dd9c1f;
    --danger: #e05260;

    /* Тёмная тема — по умолчанию, как в Lunex */
    --bg: #08090c;
    --panel: #111318;
    --panel-2: #171a21;
    --surface: #14171d;
    --surface-strong: #1c2028;
    --input: #12151a;
    --line: rgba(255,255,255,.09);
    --text: #eef1f6;
    --strong: #ffffff;
    --muted: #98a0b0;
    --text-soft: #b9c0cc;
    --text-faint: #7f8798;
    --shadow: 0 24px 60px rgba(0,0,0,.45);
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #f5f6f9;
    --surface: #ffffff;
    --surface-strong: #f2f4f7;
    --input: #ffffff;
    --line: rgba(20,24,34,.14);
    --text: #171b23;
    --strong: #0c0f15;
    --muted: #5d6675;
    --text-soft: #4d5666;
    --text-faint: #737c8c;
    --shadow: 0 24px 60px rgba(9,20,44,.10);
}

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── Шапка ─────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--strong); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--grad-vivid);
    box-shadow: var(--glow-brand);
    color: #fff;
}
.brand-mark svg { width: 15px; margin-left: 1px; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
/* «shop» — отдельным словом, тоньше и приглушённее, иначе название
   читается как одно слипшееся «lunexshop». */
.brand-name > span {
    margin-left: .34em;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--text-faint);
}

.topbar-nav { display: flex; align-items: center; gap: 18px; }
.topbar-nav > a { color: var(--text-soft); font-size: 14px; font-weight: 600; }
.topbar-nav > a:hover { color: var(--text); text-decoration: none; }
.inline-form { display: inline; }

.theme-toggle {
    width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
    display: grid; place-items: center; cursor: pointer;
    background: var(--surface-strong); border: 1px solid var(--line); color: var(--text-soft);
}
.theme-toggle svg { width: 17px; }
.theme-toggle:hover { color: var(--brand); }

/* ── Каркас страницы ───────────────────────────────────── */
.page { flex: 1 0 auto; padding: 40px 20px 70px; }

.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--text-faint); font-size: 13.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-faint); }

/* ── Первый экран ──────────────────────────────────────── */
.hero { position: relative; padding: 46px 0 44px; text-align: center; }

/* Мягкое свечение за заголовком — как на главной Lunex. */
.hero-glow {
    position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
    width: min(760px, 96%); height: 380px; pointer-events: none; z-index: -1;
    background: radial-gradient(closest-side, rgba(43,127,255,.20), rgba(106,92,255,.09) 55%, transparent 100%);
    filter: blur(6px);
}
:root[data-theme="light"] .hero-glow {
    background: radial-gradient(closest-side, rgba(43,127,255,.14), rgba(106,92,255,.07) 55%, transparent 100%);
}

.hero-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: var(--brand);
    background: rgba(43,127,255,.1);
    border-radius: 999px; padding: 7px 14px; margin-bottom: 18px;
}
.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 48px); font-weight: 900; letter-spacing: -.035em; line-height: 1.12;
    color: var(--strong);
}
/* Вторая строка заголовка — фирменным градиентом. */
.hero h1 em {
    font-style: normal;
    background: var(--grad-vivid);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero p { margin: 0 auto; max-width: 600px; font-size: 16.5px; color: var(--text-soft); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ── Полоса преимуществ ────────────────────────────────── */
.trust {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px;
    margin: 8px 0 54px;
}
.trust-item {
    display: flex; gap: 13px; align-items: flex-start;
    padding: 17px 18px; border-radius: 16px;
    background: var(--panel); border: 1px solid var(--line);
}
.trust-icon {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; color: var(--brand);
    background: rgba(43,127,255,.1);
}
.trust-icon svg { width: 19px; }
.trust-item strong { display: block; font-size: 14.5px; font-weight: 800; color: var(--strong); margin-bottom: 3px; }
.trust-item span { font-size: 13px; color: var(--text-faint); line-height: 1.5; }

/* ── Как это работает ──────────────────────────────────── */
.how { margin-top: 64px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step {
    position: relative; padding: 22px 20px 20px;
    border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
}
.step-num {
    display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 11px; margin-bottom: 13px;
    background: var(--grad-vivid); color: #fff;
    font-size: 14px; font-weight: 900;
    box-shadow: 0 8px 20px rgba(43,127,255,.26);
}
.step strong { display: block; font-size: 15.5px; font-weight: 800; color: var(--strong); margin-bottom: 6px; }
.step p { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }

/* ── Кнопки ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 22px; border-radius: 13px;
    font-size: 14.5px; font-weight: 700; cursor: pointer;
    border: 1px solid transparent; white-space: nowrap;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad-vivid); color: #fff; box-shadow: 0 12px 30px rgba(43,127,255,.24); }
.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-strong); }
.btn-sm { height: 38px; padding: 0 15px; font-size: 13.5px; border-radius: 11px; }
.btn-wide { width: 100%; }
.btn-danger { background: rgba(224,82,96,.12); color: var(--danger); border-color: rgba(224,82,96,.3); }

/* ── Каталог ───────────────────────────────────────────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.section-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--strong); }
.section-head p { margin: 0; color: var(--text-faint); font-size: 14px; }

.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }

.card {
    display: flex; flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }

.card-media {
    aspect-ratio: 16 / 9; background: var(--panel-2);
    display: block; overflow: hidden; border-bottom: 1px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-faint); font-size: 13px; }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { margin: 0; font-size: 17.5px; font-weight: 800; letter-spacing: -.02em; color: var(--strong); }
.card-title a { color: inherit; }
.card-tagline { margin: 0; font-size: 14px; color: var(--text-soft); flex: 1; }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.price { font-size: 21px; font-weight: 900; color: var(--strong); letter-spacing: -.02em; white-space: nowrap; }
.price small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-faint); text-decoration: line-through; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 11px;
    background: rgba(43,127,255,.1); color: var(--brand);
}
.badge-muted { background: var(--surface-strong); color: var(--text-faint); }
.badge-ok { background: rgba(34,179,106,.12); color: var(--success); }
.badge-warn { background: rgba(221,156,31,.14); color: var(--warning); }
.badge-danger { background: rgba(224,82,96,.12); color: var(--danger); }

/* ── Страница товара ───────────────────────────────────── */
.product { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; align-items: start; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } }

.product-head h1 { margin: 0 0 8px; font-size: clamp(25px, 4vw, 34px); font-weight: 900; letter-spacing: -.03em; color: var(--strong); }
.product-head p { margin: 0 0 18px; font-size: 16px; color: var(--text-soft); }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 28px; }
.shot {
    border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
    background: var(--panel-2); cursor: zoom-in; aspect-ratio: 16 / 10;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

.prose { color: var(--text-soft); font-size: 15.5px; line-height: 1.75; }
.prose h2, .prose h3 { color: var(--strong); letter-spacing: -.02em; margin: 26px 0 10px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 5px 0; }
.prose code { background: var(--surface-strong); border-radius: 6px; padding: 2px 6px; font-size: 13.5px; }

.buy-panel {
    position: sticky; top: 88px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 20px; padding: 22px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 14px;
}
.buy-price { font-size: 30px; font-weight: 900; letter-spacing: -.03em; color: var(--strong); }
.buy-price small { display: block; font-size: 14px; font-weight: 600; color: var(--text-faint); text-decoration: line-through; }
.buy-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 13.5px; color: var(--text-soft); }
.buy-list li { display: flex; gap: 9px; align-items: flex-start; }
.buy-list svg { width: 16px; flex-shrink: 0; color: var(--success); margin-top: 2px; }

/* ── Формы ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-soft); }
.field input, .field textarea, .field select {
    width: 100%; height: 46px; padding: 0 14px;
    background: var(--input); color: var(--text);
    border: 1px solid var(--line); border-radius: 12px;
    font: inherit; font-weight: 500; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.field select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23858a96' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field input:focus, .field textarea:focus, .field select:focus {
    border-color: rgba(43,127,255,.65); box-shadow: 0 0 0 4px rgba(43,127,255,.1);
}
.field-hint { font-weight: 500; font-size: 12.5px; color: var(--text-faint); }

.notice { border-radius: 14px; padding: 13px 16px; font-size: 14px; margin-bottom: 20px; border: 1px solid transparent; }
.notice-error { background: rgba(224,82,96,.1); border-color: rgba(224,82,96,.28); color: var(--danger); }
.notice-ok { background: rgba(34,179,106,.1); border-color: rgba(34,179,106,.28); color: var(--success); }
.notice-warn { background: rgba(221,156,31,.1); border-color: rgba(221,156,31,.3); color: var(--warning); }

/* ── Заказ ─────────────────────────────────────────────── */
.order-card {
    max-width: 640px; margin: 0 auto;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 20px; padding: 30px; box-shadow: var(--shadow);
}
.order-icon {
    width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 18px;
    display: grid; place-items: center; color: #fff;
    background: var(--grad-vivid); box-shadow: var(--glow-brand);
}
.order-icon svg { width: 28px; }
.order-card h1 { margin: 0 0 8px; font-size: 24px; font-weight: 900; letter-spacing: -.03em; text-align: center; color: var(--strong); }
.order-card > p { margin: 0 0 22px; text-align: center; color: var(--text-soft); }

.keybox {
    background: var(--surface-strong); border: 1px solid var(--line);
    border-radius: 14px; padding: 16px; margin-bottom: 18px;
}
.keybox span { display: block; font-size: 12px; font-weight: 700; color: var(--text-faint); margin-bottom: 7px; }
.keybox code {
    display: block; font-size: 16px; font-weight: 800; letter-spacing: .06em;
    color: var(--strong); word-break: break-all;
}
.keybox button { margin-top: 11px; }

.rows { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rows div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 15px; background: var(--panel); font-size: 14px; }
.rows dt, .rows b { color: var(--text-faint); font-weight: 600; }
.rows strong { color: var(--strong); font-weight: 700; }

/* ── Пустое состояние ──────────────────────────────────── */
.empty { text-align: center; padding: 44px 20px 52px; }
.empty-icon {
    width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 18px;
    display: grid; place-items: center; color: #fff;
    background: var(--grad-vivid); box-shadow: var(--glow-brand);
}
.empty-icon svg { width: 34px; }
.empty h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; color: var(--strong); }
.empty p { margin: 0 auto; max-width: 420px; color: var(--text-soft); }

/* ── Лайтбокс ──────────────────────────────────────────── */
.lightbox {
    position: fixed; inset: 0; z-index: 100; cursor: zoom-out;
    background: rgba(4,7,14,.86); backdrop-filter: blur(6px);
    display: grid; place-items: center; padding: 40px;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }

/* ── Админка ───────────────────────────────────────────── */
.panel {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 18px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--strong); }
.panel-head p { margin: 3px 0 0; font-size: 13.5px; color: var(--text-faint); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.stat span { display: block; font-size: 12.5px; color: var(--text-faint); font-weight: 600; margin-bottom: 5px; }
.stat strong { font-size: 22px; font-weight: 900; letter-spacing: -.02em; color: var(--strong); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint);
    border-bottom: 1px solid var(--line);
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-strong); }
.table code { font-size: 13px; color: var(--text-soft); }
.table-scroll { overflow-x: auto; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.login-box { max-width: 380px; margin: 60px auto; }
.login-box .panel { display: grid; gap: 16px; }

/* ── Каркас панели: слева меню, справа содержимое ──────── */
.admin-shell {
    display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 26px;
    align-items: start; padding: 30px 20px 70px; flex: 1 0 auto;
}
.admin-side { position: sticky; top: 90px; }
.admin-side nav { display: grid; gap: 3px; }
.admin-side a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 13px; border-radius: 12px;
    font-size: 14px; font-weight: 650; color: var(--text-soft);
    border: 1px solid transparent;
    transition: background .14s ease, color .14s ease;
}
.admin-side a:hover { background: var(--surface-strong); color: var(--text); text-decoration: none; }
.admin-side a svg { width: 18px; flex-shrink: 0; opacity: .8; }
.admin-side a.is-active {
    background: rgba(43,127,255,.1);
    border-color: color-mix(in srgb, var(--brand) 26%, transparent);
    color: var(--brand);
}
.admin-side a.is-active svg { opacity: 1; }
.admin-main { min-width: 0; }
.admin-side { min-width: 0; }
.topbar-user { font-size: 13.5px; white-space: nowrap; }

.admin-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }

/* ── Журнал действий ───────────────────────────────────── */
.audit-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.audit-row:last-child { border-bottom: 0; }
.audit-row strong { font-size: 13.5px; font-weight: 800; color: var(--strong); }
.audit-row small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-faint); }
.audit-row time { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; }

/* ── Телефоны и планшеты ───────────────────────────────── */
@media (max-width: 860px) {
    .topbar-inner { height: 58px; }
    .topbar-nav { gap: 12px; }
    .topbar-nav > a { font-size: 13px; }
    /* В шапке панели не хватает места: ссылку на витрину прячем —
       логотип слева ведёт туда же. */
    .topbar-user { display: none; }
    .brand-name { font-size: 17px; }
    .page { padding: 26px 16px 50px; }
    .wrap { padding: 0 16px; }

    .hero { padding: 26px 0 30px; }
    .hero h1 { font-size: clamp(25px, 7vw, 34px); }
    .hero p { font-size: 15px; }
    .hero-actions .btn { flex: 1 1 100%; }

    .trust { margin-bottom: 38px; }
    .how { margin-top: 44px; }

    /* Меню панели уезжает наверх и прокручивается вбок.
       minmax(0,1fr) и min-width:0 обязательны: иначе дорожка грида
       раздувается под ширину всех пунктов меню сразу, и всю страницу
       начинает мотать вбок. */
    .admin-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 16px 50px; }
    .admin-side { position: static; min-width: 0; }
    .admin-side nav {
        grid-auto-flow: column; grid-auto-columns: max-content;
        overflow-x: auto; gap: 7px; padding-bottom: 4px;
        scrollbar-width: none;
    }
    .admin-side nav::-webkit-scrollbar { display: none; }
    .admin-side a { white-space: nowrap; }

    .panel { padding: 17px; border-radius: 15px; }
    .order-card { padding: 22px 18px; }
    .buy-panel { position: static; }
    .footer-inner { flex-direction: column; gap: 10px; }
}

/* Таблицы на узком экране: строка превращается в карточку, а шапка
   заменяется подписями из data-label. Горизонтальная прокрутка внутри
   таблицы на телефоне неудобна — половина колонок оказывается за кадром. */
@media (max-width: 700px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr {
        border: 1px solid var(--line); border-radius: 14px;
        padding: 6px 14px; margin-bottom: 10px; background: var(--panel);
    }
    .table tr:hover td { background: transparent; }
    .table td {
        border: 0; padding: 8px 0;
        display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
        text-align: right;
    }
    .table td + td { border-top: 1px dashed var(--line); }
    /* Первая ячейка — заголовок карточки: в ней две строки текста,
       в одну строку с подписью они не помещаются. */
    .table td:first-child {
        flex-direction: column; align-items: flex-start;
        gap: 3px; text-align: left; word-break: break-word;
    }
    .table td::before {
        content: attr(data-label);
        flex: 0 0 auto; text-align: left;
        font-size: 12.5px; font-weight: 700; color: var(--text-faint);
    }
    /* Ячейка с кнопками — во всю ширину, без подписи. */
    .table td.td-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
    .table td.td-actions::before { display: none; }
    .table td.td-actions .btn { flex: 1 1 auto; }
    .table-scroll { overflow-x: visible; }
}

@media (max-width: 560px) {
    .catalog { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { padding: 13px 14px; }
    .stat span { font-size: 11.5px; }
    .stat strong { font-size: 18px; }
    .shots { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .keybox code { font-size: 14px; }
    /* Заголовок раздела и кнопка — в столбик, иначе кнопку срезает. */
    .panel-head { flex-direction: column; align-items: stretch; gap: 12px; }
    .panel-head .btn { width: 100%; }
}
.admin-shot { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; }
.admin-shot img { width: 100%; height: 100%; object-fit: cover; }
.admin-shot form { position: absolute; top: 6px; right: 6px; }
.admin-shot button {
    width: 26px; height: 26px; border-radius: 8px; cursor: pointer; line-height: 1;
    background: rgba(10,14,22,.72); color: #fff; border: 0; font-size: 15px;
}
