/* ===== SiteX — темы оформления =====
   Тёмная премиум (по умолчанию) + светлая мягкая через html[data-theme="light"] */

/* ---------- Тёмная премиум (по умолчанию) ---------- */
:root {
    --bg: #0e1117;
    --bg-soft: #151a24;
    --bg-raise: #1a2029;
    --card: #171c26;
    --card-hover: #1e2430;
    --border: #242c3a;
    --border-soft: #1d2430;
    --text: #e8ecf4;
    --muted: #93a0b8;
    --primary: #7c6cff;
    --primary-2: #9b6cff;
    --accent: #38bdf8;
    --accent-2: #818cf8;
    --green: #34d399;
    --red: #f87171;
    --amber: #fbbf24;
    --radius: 16px;
    --shadow: 0 16px 46px rgba(0,0,0,.35);
    --glow: 0 0 0 1px rgba(124,108,255,.3), 0 14px 46px rgba(124,108,255,.16);
    --header-bg: rgba(14,17,23,.78);
    --footer-bg: linear-gradient(120deg,#0b0e14,#141026 55%,#0e1a28);
    --input-bg: #10151d;
    --chip-shadow: 0 4px 14px rgba(0,0,0,.3);
    --msg-admin-bg: #10151d;
    --card-cat-bg: rgba(20,25,35,.86);
    --card-cat-text: #dbe2ee;
}

/* ---------- Светлая мягкая (переключается) ---------- */
html[data-theme="light"] {
    --bg: #eef1fa;
    --bg-soft: #e6eaf6;
    --bg-raise: #f2f5fc;
    --card: #ffffff;
    --card-hover: #f7f9ff;
    --border: #d9e0f0;
    --border-soft: #e2e7f3;
    --text: #1c2440;
    --muted: #5f6b8c;
    --primary: #6d5ef9;
    --primary-2: #9b4df9;
    --accent: #0ea5e9;
    --accent-2: #22d3ee;
    --green: #0f9d5f;
    --red: #dc3b45;
    --amber: #d97706;
    --shadow: 0 16px 46px rgba(39,46,110,.12);
    --glow: 0 0 0 1px rgba(109,94,249,.25), 0 14px 46px rgba(109,94,249,.15);
    --header-bg: rgba(255,255,255,.82);
    --footer-bg: linear-gradient(120deg,#171a33,#2a1f5e 55%,#173a5e);
    --input-bg: #f3f6fd;
    --chip-shadow: 0 4px 14px rgba(39,46,110,.08);
    --msg-admin-bg: #f0f3fb;
    --card-cat-bg: rgba(255,255,255,.9);
    --card-cat-text: #1c2440;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(1100px 520px at 88% -12%, rgba(124,108,255,.16), transparent 55%),
        radial-gradient(800px 420px at 4% 0%, rgba(56,189,248,.10), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background .25s ease, color .25s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-soft); transition: background .25s ease; }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 26px; background: linear-gradient(135deg, var(--primary), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: var(--text); }
.main-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: 14px; }
.main-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-actions a { font-size: 14px; }
.cart-btn, .balance-btn, .reg-btn { background: var(--card); border: 1px solid var(--border); padding: 9px 14px; border-radius: 11px; }
.cart-btn, .reg-btn { color: var(--text) !important; }
.balance-btn { color: var(--green) !important; font-weight: 700; }
.badge { position: absolute; top: -7px; right: -7px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.btn { display: inline-block; border: none; cursor: pointer; border-radius: 12px; padding: 11px 19px; font-size: 15px; font-weight: 600; font-family: inherit; transition: all .15s ease; text-decoration: none !important; line-height: 1.2; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 10px 28px rgba(124,108,255,.35); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 15px 26px; font-size: 16px; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.login-btn, .profile-btn, .logout-btn { color: var(--muted); }
.profile-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.mini-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 13px; font-weight: 700; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-link { color: #fda4af !important; }
.logout-btn:hover { color: var(--red); }

/* ===== Переключатель темы ===== */
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border); padding: 7px 12px; border-radius: 20px; cursor: pointer; color: var(--text); font-size: 13px; font-weight: 600; user-select: none; }
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle .ico { font-size: 15px; }

/* ===== Hero ===== */
.hero { padding: 62px 0 40px; text-align: center; }
.hero-title { font-size: clamp(32px, 6vw, 54px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.12; background: linear-gradient(135deg, var(--text) 30%, var(--primary) 70%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 18px; margin-top: 14px; max-width: 620px; margin-inline: auto; }
.searchbar { display: flex; gap: 10px; max-width: 460px; margin: 24px auto 0; }
.searchbar input { flex: 1; padding: 14px 18px; border-radius: 13px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 15px; }
.searchbar button { padding: 14px 24px; border: none; border-radius: 13px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 600; cursor: pointer; }

/* ===== Категории ===== */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 28px; }
.chip { padding: 9px 16px; border-radius: 30px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500; box-shadow: var(--chip-shadow); }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }
.section-title { font-size: 26px; font-weight: 800; margin-bottom: 22px; letter-spacing: -.5px; }

/* ===== Grid товаров ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 22px; padding-bottom: 40px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .3s ease; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--glow); }
.card-img { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.card-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 56px; color: rgba(124,108,255,.5); }
.card-cat { position: absolute; top: 10px; left: 10px; background: var(--card-cat-bg); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 20px; font-size: 12px; color: var(--card-cat-text); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 16px; font-weight: 600; }
.card-body h3 a { color: var(--text) !important; }
.card-body h3 a:hover { color: var(--accent) !important; text-decoration: none; }
.card-price { margin-top: auto; }
.price { color: var(--text); font-weight: 800; font-size: 18px; }
.old { color: var(--muted); text-decoration: line-through; font-size: 14px; margin-left: 8px; }
.price.big { font-size: 32px; }

/* ===== Страница товара ===== */
.breadcrumbs { color: var(--muted); font-size: 13px; margin: 20px 0; }
.breadcrumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.product-media { border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-ph { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 100px; color: rgba(124,108,255,.5); }
.product-title { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.product-price { margin: 18px 0; }
.product-desc { color: var(--muted); margin: 18px 0; white-space: pre-line; }
.product-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 18px 0; }
.meta-ok { color: var(--green); font-size: 14px; }
.product-meta span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 7px; }
.buy-form { display: flex; gap: 12px; align-items: center; }
.qty-row { display: flex; gap: 12px; align-items: center; }
.qty-input { width: 74px; padding: 12px 10px; border-radius: 11px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 15px; }
.link { color: var(--accent); font-size: 13px; margin-top: 14px; display: inline-block; }

/* ===== Корзина ===== */
.cart-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.cart-item { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.cart-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-soft); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: rgba(124,108,255,.5); }
.cart-name { flex: 1; }
.cart-name a { color: var(--text) !important; font-weight: 600; }
.cart-name a:hover { color: var(--accent) !important; }
.cart-unit { color: var(--muted); font-size: 13px; display: block; }
.cart-line { font-weight: 700; min-width: 90px; text-align: right; }
.cart-remove { color: var(--muted) !important; font-size: 18px; padding: 6px; }
.cart-remove:hover { color: var(--red) !important; text-decoration: none; }
.cart-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.cart-total { font-size: 20px; }
.cart-total strong { color: var(--text); font-size: 24px; }

/* ===== Checkout ===== */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; padding-bottom: 50px; }
.checkout-form, .checkout-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.checkout-form h3, .checkout-summary h3 { font-size: 18px; margin-bottom: 16px; }
.checkout-form label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.checkout-form input[type=email], .checkout-form input[type=text] { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 15px; }
.promo-form { display: flex; gap: 10px; }
.promo-form input { flex: 1; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); }
.promo-msg { color: var(--green); font-size: 13px; margin-top: 10px; }
.checkout-summary { position: sticky; top: 90px; align-self: start; }
.sum-lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; font-size: 14px; }
.sum-line { display: flex; justify-content: space-between; color: var(--muted); }
.sum-line span:last-child { color: var(--text); }
.sum-line.discount span { color: var(--green); }
.sum-line.total { font-size: 19px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 14px; color: var(--text); }
.sum-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; }

/* ===== Auth ===== */
.auth-page { display: flex; justify-content: center; padding: 40px 0 60px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.auth-card input { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 15px; }
.auth-card .btn { margin-top: 20px; }
.auth-alt { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-alt a { color: var(--accent) !important; text-decoration: none; }

/* ===== Профиль ===== */
.profile-page { padding: 20px 0 50px; }
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.card-plain, .profile-purchases { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.card-plain h3, .profile-purchases h3 { font-size: 18px; margin-bottom: 16px; }
.card-plain label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.card-plain input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); }
.card-plain input:disabled { opacity: .5; }
.pur-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pur-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--bg-soft); flex-shrink: 0; }
.pur-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pur-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 22px; color: rgba(124,108,255,.5); }
.pur-info { flex: 1; }
.pur-info strong { color: var(--text); }
.pur-date { display: block; color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.pur-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.key-box { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px; }
.key-box code { color: var(--accent); font-weight: 600; word-break: break-all; }
.meta-wait { color: var(--amber); font-size: 13px; }
.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; padding: 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.st { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.st-paid { background: rgba(52,211,153,.15); color: var(--green); }
.st-pending { background: rgba(251,191,36,.15); color: var(--amber); }
.st-cancel { background: rgba(248,113,113,.15); color: var(--red); }

/* ===== Flash & empty ===== */
.flash { padding: 14px 18px; border-radius: 12px; margin-top: 18px; font-size: 14px; }
.flash-success { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); color: var(--green); }
.flash-error { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: var(--red); }
.flash-info { background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.35); color: var(--accent); }
.empty { color: var(--muted); text-align: center; padding: 40px 20px; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty a { color: var(--accent) !important; }

/* Профиль-шапка */
.profile-top { display: flex; align-items: center; gap: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 30px; margin-bottom: 22px; }
.profile-avatar-big { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 32px; font-weight: 800; }
.profile-name { font-size: 24px; font-weight: 800; margin: 0; }
.profile-email { color: var(--muted); margin: 2px 0 8px; }
.profile-head-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.head-badge { background: var(--bg-soft); border: 1px solid var(--border); padding: 5px 12px; border-radius: 20px; font-size: 13px; color: var(--muted); }
.head-badge b { color: var(--green); }
.profile-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.profile-tabs .tab { padding: 10px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; }
.profile-tabs .tab:hover { border-color: var(--primary); text-decoration: none; }
.profile-tabs .tab.active-tab { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }
.profile-section { margin-bottom: 32px; }
.section-label { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.profile-section .card-plain { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; max-width: 640px; }
.profile-form label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.profile-form input[type=text], .profile-form input[type=email], .profile-form input[type=password], .profile-form input[type=file] { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 15px; }
.form-sep { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.form-hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.check-label { display: flex !important; align-items: center; gap: 8px; margin-top: 10px !important; cursor: pointer; color: var(--text) !important; font-size: 13px !important; }
.check-label input { width: auto !important; }
.req { color: var(--red); }

/* ===== Баланс ===== */
.balance-section { padding: 20px 0 50px; }
.balance-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-bottom: 26px; }
.balance-card { background: linear-gradient(135deg, rgba(52,211,153,.12), rgba(124,108,255,.06)); border: 1px solid rgba(52,211,153,.35); border-radius: var(--radius); padding: 30px; }
.balance-label { color: var(--muted); font-size: 14px; }
.balance-amount { font-size: 42px; font-weight: 800; color: var(--green); margin: 8px 0 6px; }
.balance-hint { color: var(--muted); font-size: 14px; }
.balance-actions { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.balance-note { color: var(--muted); font-size: 13px; }
.balance-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.balance-tables .card-plain { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
@media (max-width: 860px){ .balance-hero, .balance-tables { grid-template-columns: 1fr; } }

/* ===== Отзывы ===== */
.reviews { padding: 20px 0 50px; }
.reviews .section-title { text-align: center; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 18px; }
.ra1 { background: linear-gradient(135deg,#7c6cff,#9b6cff); }
.ra2 { background: linear-gradient(135deg,#0ea5e9,#38bdf8); }
.ra3 { background: linear-gradient(135deg,#34d399,#6ee7b7); }
.review-name { font-weight: 700; color: var(--text); }
.review-stars { color: #f5a623; font-size: 15px; letter-spacing: 2px; }
.review-text { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ===== Тикеты ===== */
.tickets-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.tickets-sidebar { display: flex; flex-direction: column; gap: 10px; }
.ticket-list-item { display: block; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-decoration: none !important; }
.ticket-list-item.active { border-color: var(--primary); box-shadow: var(--glow); }
.tli-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tli-subject { font-weight: 700; color: var(--text); font-size: 14px; word-break: break-word; }
.tli-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tickets-content { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-height: 400px; }
.tickets-content label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.tickets-content select, .tickets-content input[type=text], .tickets-content textarea { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 15px; font-family: inherit; }
.tickets-content textarea { resize: vertical; }
.ticket-thread { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.msg { max-width: 80%; padding: 14px 16px; border-radius: 14px; }
.msg-user { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-bottom-right-radius: 4px; }
.msg-admin { align-self: flex-start; background: var(--msg-admin-bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.msg-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 6px; font-size: 13px; }
.msg-user .msg-head { color: rgba(255,255,255,.85); }
.msg-admin .msg-head { color: var(--muted); }
.msg-date { font-size: 11px; opacity: .8; }
.msg-text { white-space: pre-line; font-size: 14px; line-height: 1.5; }
.ticket-reply { display: flex; gap: 10px; align-items: flex-end; }
.ticket-reply textarea { flex: 1; }
@media (max-width: 860px){ .tickets-layout { grid-template-columns: 1fr; } .msg { max-width: 100%; } }

/* ===== Колесо фортуны ===== */
.wheel-page { padding: 24px 0 50px; }
.wheel-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 34px; align-items: center; max-width: 900px; margin: 20px auto; }
.wheel-box { position: relative; text-align: center; }
.wheel-box canvas { max-width: 100%; height: auto; filter: drop-shadow(0 14px 40px rgba(124,108,255,.35)); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 34px; color: var(--amber); z-index: 5; line-height: 1; text-shadow: 0 4px 12px rgba(0,0,0,.5); }
.wheel-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.wheel-panel .btn:disabled { opacity: .5; cursor: not-allowed; }
.wheel-win { text-align: center; padding: 18px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(52,211,153,.12), rgba(124,108,255,.06)); border: 1px solid rgba(52,211,153,.35); border-radius: var(--radius); }
.win-title { color: var(--muted); font-size: 13px; }
.win-prize { font-size: 28px; font-weight: 800; color: var(--amber); }
.win-note { color: var(--text); font-size: 14px; margin-top: 8px; }
.wheel-history { max-width: 900px; margin: 0 auto; }
@media (max-width: 760px){ .wheel-wrap { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer { margin-top: auto; border-top: 1px solid var(--border-soft); padding: 36px 0; background: var(--footer-bg); transition: background .3s ease; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: #c6cdfc; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-muted { color: #9aa3d0; font-size: 13px; }
.footer-inner .brand-name { color: #fff; font-size: 17px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .product, .checkout-grid, .profile-grid { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .hero { padding: 44px 0 30px; }
    .cart-summary { flex-direction: column; align-items: stretch; }
}
@media (max-width: 520px) {
    .header-actions { flex-wrap: wrap; }
    .cart-item { flex-wrap: wrap; }
}