/* ============================================================
   DayZ Магазин — светлая / тёмная тема
   ============================================================ */

:root {
    --bg:           #f6f8fa;
    --bg-card:      #ffffff;
    --bg-subtle:    #f0f2f5;
    --bg-header:    #ffffff;
    --border:       #e4e7eb;
    --border-hover: #cbd2d9;
    --text:         #1a1d21;
    --text-muted:   #6b7280;
    --text-faint:   #9ca3af;
    --primary:      #2f6f4e;
    --primary-dark: #245840;
    --primary-light:#e8f3ee;
    --success:      #16a34a;
    --success-bg:   #f0fdf4;
    --danger:       #dc2626;
    --danger-bg:    #fef2f2;
    --warning:      #d97706;
    --warning-bg:   #fffbeb;
    --shadow-sm:  0 1px 2px rgba(16, 24, 40, .05);
    --shadow:     0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md:  0 4px 12px rgba(16, 24, 40, .08), 0 2px 4px rgba(16, 24, 40, .04);
    --shadow-lg:  0 12px 32px rgba(16, 24, 40, .12);
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --ease: cubic-bezier(.4, 0, .2, 1);
    --duration: .22s;
    --grid-line: rgba(47, 111, 78, .07);
}

[data-theme="dark"] {
    --bg:           #0f1115;
    --bg-card:      #171a20;
    --bg-subtle:    #1f232a;
    --bg-header:    #14171c;
    --border:       #262b33;
    --border-hover: #343a44;
    --text:         #e6e8eb;
    --text-muted:   #8b929c;
    --text-faint:   #5c6470;
    --primary:      #4ade80;
    --primary-dark: #22c55e;
    --primary-light:#163a25;
    --success:      #22c55e;
    --success-bg:   #0f2a1c;
    --danger:       #f87171;
    --danger-bg:    #2a1013;
    --warning:      #fbbf24;
    --warning-bg:   #2a2010;
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, .3);
    --shadow:     0 1px 3px rgba(0, 0, 0, .4);
    --shadow-md:  0 4px 12px rgba(0, 0, 0, .4);
    --shadow-lg:  0 12px 32px rgba(0, 0, 0, .6);
    --grid-line: rgba(74, 222, 128, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px; line-height: 1.55;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .3s var(--ease), color .3s var(--ease);
    min-height: 100vh; display: flex; flex-direction: column;
}

h1, h2, h3 { margin: 0 0 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; margin-top: 28px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-dark); }
small { color: var(--text-muted); }
code, pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--bg-subtle); padding: 2px 6px; border-radius: 4px; color: var(--danger); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; width: 100%; }
.container-wide { max-width: 100%; width: 100%; margin: 0 auto; padding: 0 24px; }
.main-content { flex: 1; padding: 24px 16px 60px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
    transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header .container,
.site-header .container-wide {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
    position: relative;
}
.site-header .container-wide { justify-content: space-between; }

.site-logo {
    font-size: 20px; font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #4a9670 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; flex-shrink: 0; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
}
.site-logo .icon {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.site-menu {
    display: flex; gap: 4px; flex: 1; flex-wrap: wrap; align-items: center;
}
.site-menu a {
    padding: 8px 14px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    transition: all var(--duration) var(--ease); white-space: nowrap;
}
.site-menu a:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }

.site-header .header-actions {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0; margin-left: auto;
}
body.full-width .site-header .header-actions { margin-left: auto; }

.theme-toggle {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg-subtle); border: 1px solid var(--border);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1; padding: 0;
    transition: all var(--duration) var(--ease);
    color: var(--text);
}
.theme-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: rotate(20deg) scale(1.08);
}
.theme-toggle:active { transform: rotate(20deg) scale(.95); }
.theme-toggle .icon { margin: 0; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: inline-flex; align-items: center; }

.menu-burger {
    display: none; width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg-subtle); border: 1px solid var(--border);
    cursor: pointer; font-size: 18px; padding: 0; color: var(--text);
    align-items: center; justify-content: center;
}
.menu-burger .icon { margin: 0; }

/* ============================================================
   Соцсети в шапке
   ============================================================ */
.header-social {
    display: flex; align-items: center; gap: 6px; margin-right: 4px;
}
.header-social .social-link {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-subtle); border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--duration) var(--ease); text-decoration: none;
    flex-shrink: 0; padding: 0;
}
.header-social .social-link svg { width: 16px; height: 16px; display: block; }
.header-social .social-link:hover {
    transform: translateY(-2px) scale(1.05);
    text-decoration: none; color: #fff;
}
.header-social .social-vk:hover       { background: #0077FF; border-color: #0077FF; }
.header-social .social-telegram:hover { background: #229ED9; border-color: #229ED9; }
.header-social .social-discord:hover  { background: #5865F2; border-color: #5865F2; }
.header-social .social-youtube:hover  { background: #FF0000; border-color: #FF0000; }
.header-social .social-steam:hover    { background: #171a21; border-color: #171a21; }

@media (max-width: 640px) {
    .header-social { gap: 4px; }
    .header-social .social-link { width: 30px; height: 30px; }
    .header-social .social-link svg { width: 14px; height: 14px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    padding: 24px 0; text-align: center;
    color: var(--text-muted); font-size: 13px;
    transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-footer .credit { margin-top: 6px; font-size: 12px; color: var(--text-faint); }
.site-footer .credit b { color: var(--text-muted); font-weight: 600; }

/* ============================================================
   Топбар страницы магазина
   ============================================================ */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px; margin-bottom: 28px;
    animation: slideDown .4s var(--ease);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.topbar h1 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.topbar h1 .icon { color: var(--primary); }

.user-info { display: flex; align-items: center; gap: 16px; }
.balance-center {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.balance-center .balance {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.btn-add {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none;
    font-size: 20px; line-height: 1; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; transition: all var(--duration) var(--ease);
    box-shadow: 0 2px 6px rgba(47, 111, 78, .3); flex-shrink: 0;
    animation: glowPulse 2.5s infinite;
}
.btn-add:hover {
    background: var(--primary-dark);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(47, 111, 78, .4);
}
.btn-add:active { transform: rotate(90deg) scale(.95); }
.btn-add .icon { margin: 0; }

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(47, 111, 78, .4); }
    50%      { box-shadow: 0 0 0 12px rgba(47, 111, 78, 0); }
}

/* ============================================================
   Карточки
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration) var(--ease),
                border-color var(--duration) var(--ease),
                background .3s var(--ease);
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* ============================================================
   Сетка товаров
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}
.grid > .item-card { height: 100%; }

/* ============================================================
   Табы категорий
   ============================================================ */
.category-tabs {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
    padding: 6px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    animation: slideDown .4s var(--ease);
}
.cat-tab {
    padding: 8px 16px; border-radius: var(--radius-sm); background: transparent;
    border: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500;
    color: var(--text-muted); transition: all var(--duration) var(--ease); white-space: nowrap;
    display: inline-flex; align-items: center;
}
.cat-tab:hover { background: var(--bg-subtle); color: var(--text); }
.cat-tab.active {
    background: var(--primary); color: #fff;
    box-shadow: 0 2px 6px rgba(47, 111, 78, .3);
}
.cat-tab .icon { margin-right: 2px; }

/* ============================================================
   Карточка товара
   ============================================================ */
.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease),
                border-color var(--duration) var(--ease),
                background .3s var(--ease);
    animation: fadeInUp .4s var(--ease) backwards;
    overflow: hidden;
}
.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.item-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--border) 100%);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.item-image picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-image picture img,
.item-image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    transition: transform .4s var(--ease);
}
.item-card:hover .item-image img { transform: scale(1.05); }
.item-image-placeholder {
    font-size: 56px; font-weight: 800; color: var(--primary);
    opacity: .18; text-transform: uppercase; user-select: none;
}

.item-card h3 {
    margin: 0 0 6px; font-size: 16px; line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card .desc {
    color: var(--text-muted); font-size: 13px; margin: 0 0 12px;
    line-height: 1.45; min-height: calc(1.45em * 2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; flex-grow: 1;
}

.item-card .price-row {
    margin-top: auto !important; padding-top: 8px;
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}

.item-card form { margin: 0; }

.item-card:nth-child(1) { animation-delay: .02s; }
.item-card:nth-child(2) { animation-delay: .05s; }
.item-card:nth-child(3) { animation-delay: .08s; }
.item-card:nth-child(4) { animation-delay: .11s; }
.item-card:nth-child(5) { animation-delay: .14s; }
.item-card:nth-child(6) { animation-delay: .17s; }
.item-card:nth-child(7) { animation-delay: .20s; }
.item-card:nth-child(8) { animation-delay: .23s; }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes popIn {
    0%   { transform: scale(.3); opacity: 0; }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.btn-primary {
    background: var(--primary); color: #fff;
    box-shadow: 0 1px 2px rgba(47, 111, 78, .3);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 111, 78, .35);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) {
    background: #15803d;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, .3);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, .3);
}

.btn-secondary {
    background: var(--bg-subtle); color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--border);
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-block { width: 100%; }
.btn-icon { padding: 6px 10px; font-size: 13px; }
.btn-icon .icon { margin: 0; }

.btn .icon { margin-right: 2px; }
.btn:hover .icon { transform: scale(1.15); }
.btn .icon { transition: transform var(--duration) var(--ease); }

/* ============================================================
   Формы
   ============================================================ */
.form-row { margin-bottom: 16px; }
.form-row label {
    display: block; margin-bottom: 6px;
    color: var(--text-muted); font-size: 13px; font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="file"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease),
                background .3s var(--ease);
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
input[type="file"] { padding: 8px; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }
input[type="checkbox"] { width: auto; accent-color: var(--primary); cursor: pointer; }

.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-inline input[type="number"] { width: 200px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

select.category-select {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}
select.category-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}
.checkbox-line input[type="checkbox"] { margin: 0; }

/* ============================================================
   Таблицы
   ============================================================ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 14px;
}
th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
th {
    background: var(--bg-subtle);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--duration) var(--ease), transform var(--duration) var(--ease); }
tbody tr:hover { background: var(--bg-subtle); transform: translateX(2px); }

.thumb {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    object-fit: contain;
    padding: 2px;
    display: block;
}

/* ============================================================
   Flash-сообщения
   ============================================================ */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
    animation: slideInLeft .35s var(--ease);
}
.flash-ok    { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.flash-err   { background: var(--danger-bg);  color: var(--danger); border-color: var(--danger); }
.flash-warn  { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }

/* ============================================================
   Бейджи
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-pending   { background: var(--warning-bg); color: var(--warning); }
.badge-paid      { background: var(--success-bg); color: var(--success); }
.badge-fail      { background: var(--danger-bg);  color: var(--danger); }
.badge-delivered { background: var(--primary-light); color: var(--primary); }

/* ============================================================
   Админка: боковое меню
   ============================================================ */
.admin-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-height: 60vh;
    max-width: 100% !important;
}

.admin-sidebar {
    flex: 0 0 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 10px 14px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}
.admin-nav a:hover {
    background: var(--bg-subtle);
    color: var(--text);
    text-decoration: none;
    transform: translateX(2px);
}
.admin-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(47, 111, 78, .25);
}
.admin-nav a .icon,
.admin-nav-parent .icon { flex-shrink: 0; }
.admin-nav a::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 0;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transform: translateY(-50%);
    transition: height .25s var(--ease);
}
.admin-nav a:hover::before { height: 60%; }
.admin-nav a.active::before { height: 60%; background: #fff; }

.admin-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
}
.admin-logout:hover { background: var(--danger-bg); text-decoration: none; }

.admin-main { flex: 1; min-width: 0; }

/* Подменю настроек */
.admin-nav-group { position: relative; }
.admin-nav-parent {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
}
.admin-nav-parent:hover {
    background: var(--bg-subtle);
    color: var(--text);
}
.admin-nav-parent.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(47, 111, 78, .25);
}
.admin-nav-parent .admin-nav-arrow {
    margin-left: auto;
    transition: transform var(--duration) var(--ease);
}
.admin-nav-group.open .admin-nav-parent .admin-nav-arrow { transform: rotate(180deg); }

.admin-nav-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 12px;
    margin-top: 2px;
    border-left: 2px solid var(--border);
    margin-left: 16px;
}
.admin-nav-sub a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
}
.admin-nav-sub a:hover {
    background: var(--bg-subtle);
    color: var(--text);
    transform: translateX(2px);
}
.admin-nav-sub a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.admin-nav-sub a .icon { color: inherit; }

/* ============================================================
   Page header
   ============================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-header h1 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.page-header h1 .icon { color: var(--primary); }

/* ============================================================
   Status-страницы
   ============================================================ */
.status-page {
    text-align: center;
    padding: 60px 20px;
    max-width: 480px;
    margin: 0 auto;
    animation: fadeIn .5s var(--ease);
}
.status-page .icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: popIn .5s var(--ease);
}
.status-page h1 { font-size: 26px; margin-bottom: 12px; }
.status-page p  { color: var(--text-muted); }

/* ============================================================
   Логин-бокс
   ============================================================ */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    animation: cardIn .4s var(--ease);
}

/* ============================================================
   Метрики
   ============================================================ */
.metric {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease);
    position: relative;
    animation: fadeInScale .4s var(--ease) backwards;
}
.metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.metric-icon {
    color: var(--primary);
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
}
.metric .label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.metric .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}
.metric:nth-child(1) { animation-delay: .02s; }
.metric:nth-child(2) { animation-delay: .06s; }
.metric:nth-child(3) { animation-delay: .10s; }
.metric:nth-child(4) { animation-delay: .14s; }
.metric:nth-child(5) { animation-delay: .18s; }
.metric:nth-child(6) { animation-delay: .22s; }
.metric:nth-child(7) { animation-delay: .26s; }
.metric:nth-child(8) { animation-delay: .30s; }

/* ============================================================
   Модальные окна
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .2s var(--ease);
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale .3s cubic-bezier(.34, 1.56, .64, 1);
    position: relative;
    color: var(--text);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.modal h3 { margin: 0 0 4px; font-size: 20px; }
.modal .subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all .2s;
}
.modal-close:hover { background: var(--bg-subtle); color: var(--text); }
.modal-close .icon { margin: 0; }

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}
.quick-amounts button {
    padding: 8px 4px;
    border-radius: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: all .18s;
}
.quick-amounts button:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.qty-control {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 16px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
}
.qty-control button {
    width: 48px;
    border: none;
    background: var(--bg-subtle);
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.qty-control button:hover { background: var(--border); }
.qty-control button:disabled { opacity: .4; cursor: not-allowed; }
.qty-control button .icon { margin: 0; }
.qty-control input {
    flex: 1;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    background: var(--bg-card);
    padding: 12px;
}
.qty-control input:focus { box-shadow: none; }

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    margin-top: 10px;
    font-size: 15px;
}
.total-price .amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================================
   Рулетка
   ============================================================ */
.roulette-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(47, 111, 78, .25);
    margin-bottom: 24px;
    animation: slideDown .5s var(--ease);
}
.roulette-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .15) 0%, transparent 60%);
    pointer-events: none;
}
.roulette-box h2 { color: #fff; margin: 0 0 8px; font-size: 22px; }
.roulette-box p { color: rgba(255, 255, 255, .85); margin-bottom: 20px; }
.roulette-box .roulette-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: inline-block;
    animation: wheelSpin 3s linear infinite;
    color: #fff;
}
.roulette-box .roulette-icon svg {
    animation: wheelSpin 3s linear infinite;
    display: inline-block;
}
@keyframes wheelSpin {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}
.roulette-box .cooldown {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 0, 0, .25);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}
.roulette-box .btn {
    background: #fff;
    color: var(--primary-dark);
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}
.roulette-box .btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.roulette-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    animation: popIn .5s var(--ease);
}
.roulette-result .prize {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
}

/* ============================================================
   VIP
   ============================================================ */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: 0 2px 6px rgba(251, 191, 36, .4);
}
.vip-badge .icon { margin: 0; }
.vip-card {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(251, 191, 36, .35);
    margin-bottom: 20px;
    animation: fadeInUp .5s var(--ease);
}
.vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.vip-plan {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #fbbf24;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all .25s;
}
.vip-plan:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(251, 191, 36, .4);
}
.vip-plan h3 { color: #78350f; margin: 0 0 8px; }
.vip-plan .v-price { font-size: 28px; font-weight: 700; color: #b45309; margin: 12px 0; }
.vip-plan ul {
    text-align: left;
    color: #78350f;
    font-size: 13px;
    padding-left: 20px;
    margin: 12px 0;
}

/* ============================================================
   Ежедневный бонус
   ============================================================ */
.daily-box {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(34, 197, 94, .3);
    animation: fadeInUp .5s var(--ease);
}
.daily-box .streak {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 0, 0, .2);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}
.daily-box .btn {
    background: #fff;
    color: #166534;
    font-weight: 600;
}

/* ============================================================
   Аукцион
   ============================================================ */
.auction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    transition: all .2s;
    margin-bottom: 12px;
}
.auction-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.auction-card .image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
}
.auction-card .image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.auction-card .info { flex: 1; }
.auction-card .auction-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.auction-card .auction-expires {
    font-size: 12px;
    color: var(--text-muted);
}
.auction-card .auction-expires.soon {
    color: var(--danger);
    font-weight: 600;
}

/* ============================================================
   Графики (дашборд)
   ============================================================ */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.chart-card canvas { max-height: 300px; }
.chart-card h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.chart-card h2 .icon { color: var(--primary); }

/* ============================================================
   Профиль
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-subtle);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.profile-stat {
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.profile-stat .ps-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.profile-stat .ps-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.tab-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all .2s;
    white-space: nowrap;
}
.tab-btn:hover { background: var(--bg-subtle); color: var(--text); }
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .25s var(--ease); }

/* ============================================================
   Поиск
   ============================================================ */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 8px 8px 16px;
    box-shadow: var(--shadow-sm);
    transition: all .2s;
}
.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.search-bar input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 6px 0;
    box-shadow: none !important;
}
.search-bar input:focus { border: none; box-shadow: none !important; }
.search-bar button { flex-shrink: 0; }

#liveSearchInput.loading {
    background-image: linear-gradient(90deg, transparent 0%, var(--primary-light) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Кнопка "Показать ещё"
   ============================================================ */
.load-more-wrap {
    text-align: center;
    margin: 32px 0;
}
.load-more-wrap .btn {
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
}
.pagination a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}
.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ============================================================
   Скелетоны
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border) 50%, var(--bg-subtle) 75%);
    background-size: 200% 100%;
    animation: skeletonLoad 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeletonLoad {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Скидки
   ============================================================ */
.price-old {
    font-size: 14px;
    color: var(--text-faint);
    text-decoration: line-through;
}
.price-new {
    font-size: 22px;
    font-weight: 700;
    color: var(--danger);
}
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(220, 38, 38, .4);
    z-index: 2;
}

/* ============================================================
   Категория товара (синий бейдж внизу слева)
   ============================================================ */
.category-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #2563eb;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .35);
    z-index: 2;
    white-space: nowrap;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.servers-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(107, 114, 128, .92);
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadeInScale .3s var(--ease);
}
.servers-badge .icon { margin: 0; flex-shrink: 0; }

.item-badges-bottom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6px;
    z-index: 2;
    pointer-events: none;
}
.item-badges-bottom > * { pointer-events: auto; }

/* ============================================================
   Избранное
   ============================================================ */
.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all .2s;
    z-index: 3;
    padding: 0;
    color: var(--text-muted);
}
.fav-btn:hover { transform: scale(1.15); background: #fff; }
.fav-btn.active {
    background: var(--danger);
    color: #fff;
}
.fav-btn .icon { margin: 0; }
.fav-btn.active .icon { fill: currentColor; }

/* ============================================================
   Уведомления (колокольчик)
   ============================================================ */
.notify-bell {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: all .2s;
    color: var(--text);
}
.notify-bell:hover { background: var(--primary-light); border-color: var(--primary); }
.notify-bell .icon { margin: 0; }
.notify-bell .badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn .3s var(--ease), floatY 2s ease-in-out infinite;
}
.notify-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    display: none;
    animation: slideDown .2s var(--ease);
}
.notify-panel.open { display: block; }
.notify-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    transition: background .2s;
}
.notify-item:hover { background: var(--bg-subtle); }
.notify-item:last-child { border-bottom: none; }
.notify-item.unread { background: var(--primary-light); }
.notify-item .n-date {
    color: var(--text-faint);
    font-size: 12px;
    margin-top: 4px;
}
.notify-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px;
    animation: toastIn .35s var(--ease);
    pointer-events: auto;
    font-size: 14px;
    transition: opacity .3s, transform .3s;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(400px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   Категории в админке
   ============================================================ */
.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all var(--duration) var(--ease);
}
.category-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.category-item .cat-name { flex: 1; font-weight: 500; font-size: 15px; }
.category-item .cat-order { color: var(--text-muted); font-size: 13px; min-width: 40px; text-align: right; }
.category-item .cat-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-subtle);
    color: var(--text-muted);
}
.category-item .cat-status.active { background: var(--success-bg); color: var(--success); }

/* ============================================================
   Массовое удаление
   ============================================================ */
.bulk-checkbox {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    accent-color: var(--danger);
}
.bulk-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    animation: slideDown .25s var(--ease);
}
.bulk-actions .selected-count {
    color: var(--danger);
    font-weight: 600;
    margin-right: auto;
}

/* ============================================================
   Аттачи в форме товара
   ============================================================ */
.attachments-list { display: flex; flex-direction: column; gap: 6px; }
.attachment-row { display: flex; gap: 6px; align-items: center; }
.attachment-row input { flex: 1; }

/* ============================================================
   Прочее
   ============================================================ */
.muted      { color: var(--text-muted); }
.faint      { color: var(--text-faint); font-size: 12px; }
.text-right { text-align: right; }
.mt-0       { margin-top: 0; }
.mb-0       { margin-bottom: 0; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.image-preview {
    max-width: 200px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 8px;
    display: block;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { flex: none; width: 100%; position: static; max-height: none; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-nav a { flex: 0 0 auto; padding: 8px 12px; }
    .admin-nav-sub { display: flex !important; }
}

@media (max-width: 768px) {
    .menu-burger { display: inline-flex; align-items: center; justify-content: center; }
    .site-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-header);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 2px;
        display: none;
        box-shadow: var(--shadow-md);
        z-index: 40;
    }
    .site-menu.open { display: flex; }
    .site-menu a { padding: 12px 16px; }
}

@media (max-width: 640px) {
    body { padding: 0; background-size: 36px 36px; }
    .main-content { padding: 16px 12px 40px; }
    h1 { font-size: 22px; }
    h2 { font-size: 17px; }
    .card { padding: 18px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .item-card { padding: 12px; }
    .item-image-placeholder { font-size: 40px; }
    .user-info { width: 100%; justify-content: space-between; }
    table { font-size: 13px; }
    th, td { padding: 8px 10px; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .quick-amounts { grid-template-columns: repeat(2, 1fr); }
    .roulette-box { padding: 24px 16px; }
    .roulette-box .roulette-icon { font-size: 44px; }
    .auction-card { flex-direction: column; }
    .auction-card .image { width: 100%; }
    .notify-panel { width: calc(100vw - 32px); right: -8px; }
    .container-wide { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   Онлайн серверов в шапке
   ============================================================ */
.server-status-wrap { padding: 14px 16px 0; background: transparent; }
.server-status-wrap .container { display: block; }
.server-status-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.server-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease);
    min-height: 52px;
    overflow: hidden;
    animation: slideInRight .4s var(--ease) backwards;
}
.server-status-card:nth-child(1) { animation-delay: .05s; }
.server-status-card:nth-child(2) { animation-delay: .15s; }
.server-status-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.server-status-card .ss-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .18);
    flex-shrink: 0;
    animation: ssPulse 2.2s ease-in-out infinite;
}
.server-status-card.offline .ss-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .18);
    animation: none;
}
@keyframes ssPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
    50%      { box-shadow: 0 0 0 8px rgba(22, 163, 74, .05); }
}
.server-status-card .ss-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.server-status-card .ss-players {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}
.server-status-card .ss-players b {
    color: var(--primary);
    font-weight: 700;
    font-size: 17px;
    margin-right: 1px;
}

@media (max-width: 640px) {
    .server-status-wrap { padding: 10px 12px 0; }
    .server-status-bar { grid-template-columns: 1fr; gap: 8px; }
    .server-status-card { padding: 10px 14px; min-height: 46px; }
    .server-status-card .ss-name { font-size: 13px; }
}

/* ============================================================
   SVG-иконки
   ============================================================ */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.icon-ok  { color: var(--success); }
.icon-no  { color: var(--text-faint); }

/* ============================================================
   Настройки — список
   ============================================================ */
.settings-list { display: flex; flex-direction: column; gap: 0; }
.settings-item { padding: 20px 24px; margin-bottom: 12px; }
.settings-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-item-title .icon { color: var(--primary); }
.settings-item .form-row:last-child { margin-bottom: 0; }

/* ============================================================
   Сброс статистики
   ============================================================ */
.reset-options { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.reset-options form { margin: 0; }
.reset-options .btn { justify-content: flex-start; padding: 12px 18px; font-size: 14px; }

/* ============================================================
   Варианты товаров — превью картинки сверху
   ============================================================ */
.variant-preview {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 16px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--border) 100%);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--border);
    animation: fadeIn .25s var(--ease);
}
.variant-preview picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.variant-preview picture img,
.variant-preview > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform .25s var(--ease);
}
.variant-preview:hover img { transform: scale(1.05); }
.variant-preview .vp-ph {
    font-size: 72px;
    font-weight: 800;
    color: var(--primary);
    opacity: .18;
    text-transform: uppercase;
    user-select: none;
}

/* ============================================================
   Варианты товаров — список
   ============================================================ */
.variant-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
}
.variant-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.variant-option:hover { border-color: var(--border-hover); }
.variant-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 2px 6px rgba(47, 111, 78, .15);
}
.variant-option img,
.variant-option .v-ph {
    flex-shrink: 0;
    align-self: center;
    margin: 0;
}
.variant-option img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
    background: var(--bg-subtle);
}
.variant-option .v-ph {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}
.variant-option .v-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    align-self: center;
    line-height: 1.35;
}
.variant-option .v-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    line-height: 1.35;
}
.variant-option input[type="radio"] { display: none; }

/* ============================================================
   Кликабельная кнопка "Активен" в таблице товаров
   ============================================================ */
.toggle-active-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    background: transparent;
    font-family: inherit;
}
.toggle-active-btn .icon { margin: 0; }
.toggle-active-btn:hover { transform: scale(1.12); }
.toggle-active-btn:active { transform: scale(0.95); }
.toggle-active-btn.on {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}
.toggle-active-btn.on:hover {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, .35);
}
.toggle-active-btn.off {
    background: var(--bg-subtle);
    color: var(--text-faint);
    border-color: var(--border);
}
.toggle-active-btn.off:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(220, 38, 38, .25);
}

/* ============================================================
   Быстрое редактирование цены в списке товаров
   ============================================================ */
.price-editable {
    display: inline-block;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px dashed transparent;
    font-weight: 600;
    color: var(--primary);
    transition: all var(--duration) var(--ease);
    user-select: none;
    white-space: nowrap;
}
.price-editable:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}
.price-editable.saved { animation: priceSaved .8s var(--ease); }
@keyframes priceSaved {
    0%   { background: var(--primary-light); }
    30%  { background: var(--success-bg); color: var(--success); }
    100% { background: transparent; }
}
.price-editable .price-input {
    width: 110px;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
    -moz-appearance: textfield;
    appearance: textfield;
}
.price-editable .price-input::-webkit-outer-spin-button,
.price-editable .price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================================
   Промокод — форма в профиле
   ============================================================ */
.promo-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.promo-form .form-row {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}
.promo-form input[type="text"] {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

/* ============================================================
   Админка — карточка сервера
   ============================================================ */
.server-admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: all var(--duration) var(--ease);
}
.server-admin-card:hover { border-color: var(--primary); }
.server-admin-card .server-admin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.server-admin-card .server-admin-header .server-admin-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.server-admin-card .server-admin-header .server-admin-title .icon {
    color: var(--primary);
}
.server-admin-card .server-admin-header .server-admin-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-subtle);
    color: var(--text-muted);
}
.server-admin-card .server-admin-header .server-admin-badge.on {
    background: var(--success-bg);
    color: var(--success);
}
.server-admin-card .server-admin-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.server-add-btn-wrap {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

/* ============================================================
   Скроллбары
   ============================================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-subtle);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
    background: var(--bg-subtle);
    border-radius: 5px;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 5px;
    border: 2px solid var(--bg-subtle);
    transition: background .2s;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
}
*::-webkit-scrollbar-corner { background: var(--bg-subtle); }

/* ============================================================
   Хлебные крошки
   ============================================================ */
.breadcrumbs { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.breadcrumbs a {
    color: var(--text-muted);
    transition: color var(--duration) var(--ease);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .bc-sep { color: var(--text-faint); user-select: none; }
.breadcrumbs .current > span {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
@media (max-width: 640px) {
    .breadcrumbs { font-size: 12px; }
    .breadcrumbs a, .breadcrumbs .current > span { max-width: 120px; }
}

/* Иконки внутри кнопок +/− не должны перехватывать клики — пусть клик всегда идёт на саму кнопку */
.qty-btn svg,
.qty-btn .icon {
    pointer-events: none;
    display: block;
}