:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --primary: #7c3aed;
    --accent: #f59e0b;
    --gradient: linear-gradient(135deg, #7c3aed, #f59e0b);
    --text: #e5e5e5;
    --text-muted: #888;
    --border: #1e1e2a;
    --radius: 12px;
    --font: 'Inter', system-ui, sans-serif;
    --success: #22c55e;
    --error: #ef4444;
}

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

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.nav__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
}

.main { flex: 1; }

.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer__copy {
    margin: 0;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
}

.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer__links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Legal pages */
.legal-page__content {
    max-width: 48rem;
}

.legal-page__content h2 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
}

.legal-page__content h2:first-of-type {
    margin-top: 0;
}

.legal-page__content p,
.legal-page__content li {
    color: var(--text-muted);
    line-height: 1.7;
}

.legal-page__content ul {
    padding-left: 1.25rem;
}

.legal-page__content a {
    color: var(--primary);
}

.legal-page__updated {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--bg-card);
    color: var(--text);
}

/* Privacy consent checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    cursor: pointer;
}

.form-check input {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.form-check a {
    color: var(--primary);
}

.privacy-consent {
    margin-bottom: 1.25rem;
}

/* Cookie consent banner */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 1rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}

.cookie-consent__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-consent__text {
    margin: 0;
    flex: 1 1 16rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-consent__text a {
    color: var(--primary);
}

.cookie-consent__btn {
    flex-shrink: 0;
}

.hero {
    padding: 5rem 0;
    text-align: center;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin: 0 0 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 560px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s, transform 0.2s;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.btn--primary {
    background: var(--gradient);
    color: #fff;
}

.btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn--secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.btn--sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin: 1rem auto;
    max-width: 1200px;
}

.flash--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.flash--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.error-page {
    text-align: center;
    padding: 5rem 0;
}

.error-page h1 {
    font-size: 4rem;
    margin: 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-detail {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: left;
    overflow-x: auto;
    font-size: 0.8rem;
    color: var(--error);
}

/* Install page */
.install-page {
    max-width: 520px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.install-page h1 { margin-top: 0; }

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert--info {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
}

@media (max-width: 640px) {
    .nav { gap: 1rem; }
    .hero { padding: 3rem 0; }
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section--alt {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.section__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.section__link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.section__link:hover { text-decoration: underline; }

/* Page header */
.page-header {
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.page-header__subtitle {
    color: var(--text-muted);
    margin: 0;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover { color: var(--primary); }

/* Categories */
.categories {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.categories--wrap {
    flex-wrap: wrap;
    overflow-x: visible;
}

.category-chip {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
}

.category-chip:hover,
.category-chip--active {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.15);
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card__image {
    aspect-ratio: 16 / 10;
    background: var(--bg);
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.product-card__body {
    padding: 1rem 1.25rem 1.25rem;
}

.product-card__category {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.35rem 0 0.5rem;
    line-height: 1.4;
}

.product-card__price {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

/* Catalog filters */
.catalog-filters {
    margin-bottom: 2rem;
}

.catalog-filters__search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.catalog-filters__input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

.catalog-filters__input:focus {
    outline: none;
    border-color: var(--primary);
}

.catalog-count {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state .btn {
    margin-top: 1rem;
}

/* Product detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-detail__media {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.product-detail__image {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-detail__placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
}

.product-detail__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.3;
}

.product-detail__price {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--accent);
}

.product-detail__description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.product-detail__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.variant-picker {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0;
}

.variant-picker__legend {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 0.25rem;
}

.variant-option {
    display: block;
    cursor: pointer;
    margin-top: 0.75rem;
}

.variant-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.variant-option__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.variant-option input:checked + .variant-option__content {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
}

.variant-option__title {
    font-weight: 500;
}

.variant-option__price {
    font-weight: 600;
    color: var(--accent);
}

.quantity-picker label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.quantity-picker input {
    width: 100px;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

.quantity-picker input:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .catalog-filters__search {
        flex-direction: column;
    }

    .section__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
    }

    .cart-item__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Cart */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cart-item__media {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg);
}

.cart-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
}

.cart-item__title {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.cart-item__title:hover { color: var(--primary); }

.cart-item__variant {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cart-item__price {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cart-item__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.cart-item__qty {
    width: 72px;
    padding: 0.4rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-align: center;
}

.cart-item__total {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.cart-item__remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.cart-item__remove:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.cart-summary {
    position: sticky;
    top: 80px;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cart-summary__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cart-summary__row--total {
    margin: 1rem 0 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 700;
}

.cart-summary__continue {
    margin-top: 0.75rem;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 0;
    background: var(--bg-card);
}

.checkout-fieldset legend {
    font-weight: 600;
    padding: 0 0.35rem;
}

.checkout-profile p {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.checkout-profile strong {
    color: var(--text);
}

.checkout-items {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.checkout-items__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkout-items__row small {
    color: var(--text-muted);
}

.checkout-note {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.checkout-alert {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

/* Auth */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.auth-card--wide {
    max-width: 480px;
}

.auth-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
}

.auth-card__subtitle {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form__links {
    margin: 0;
    text-align: center;
    font-size: 0.875rem;
}

.auth-form__links a {
    color: var(--primary);
}

.code-input {
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    text-align: center;
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-card__footer {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-card__footer a {
    color: var(--primary);
}

.telegram-widget {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.nav__logout-form {
    display: inline;
    margin: 0;
}

.nav__logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.nav__logout-btn:hover {
    color: var(--text);
}

/* Account */
.account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.account-nav__link {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.account-nav__link:hover,
.account-nav__link--active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--text);
}

.account-nav__link--button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.account-nav__logout {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.account-card h2 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.account-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem 1rem;
    margin: 0;
}

.account-dl dt {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.account-dl dd {
    margin: 0;
}

.orders-table-wrap {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.orders-table th,
.orders-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.orders-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.orders-table a {
    color: var(--primary);
    text-decoration: none;
}

.orders-table a:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge--info { background: rgba(124, 58, 237, 0.15); color: var(--primary); }
.badge--warning { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
.badge--danger { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge--muted { background: rgba(136, 136, 136, 0.15); color: var(--text-muted); }

.status-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-timeline__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.status-timeline__item:last-child {
    border-bottom: none;
}

.status-timeline__meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.status-timeline__comment {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-dl {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .account-dl dt {
        margin-top: 0.5rem;
    }
}

/* ── Admin panel ── */

.admin-body {
    min-height: 100vh;
}

.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar__logo {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.admin-sidebar__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1.5rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.admin-nav__link {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.admin-nav__link:hover,
.admin-nav__link--active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--text);
}

.admin-nav__link--button {
    margin-top: 0.25rem;
}

.admin-sidebar__footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.admin-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.admin-topbar__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-topbar__user {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.admin-flash {
    margin: 1rem 1.5rem 0;
    max-width: none;
}

.admin-content {
    padding: 1.5rem;
    flex: 1;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-stat-card__label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.admin-card h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.admin-card__header h2 {
    margin: 0;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filters--wide {
    flex: 1;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-table a {
    color: var(--primary);
    text-decoration: none;
}

.admin-table a:hover {
    text-decoration: underline;
}

.admin-table__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    white-space: nowrap;
}

.admin-table__nowrap {
    white-space: nowrap;
}

.admin-inline-form {
    display: inline;
}

.admin-link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    text-decoration: none;
}

.admin-link-btn--danger {
    color: var(--error);
}

.admin-link-btn:hover {
    text-decoration: underline;
}

.admin-product-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-product-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.admin-empty {
    color: var(--text-muted);
    margin: 0;
}

.admin-empty--inline {
    padding: 0.5rem 0;
}

.admin-list-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.admin-breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.admin-breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.admin-current-status {
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.admin-form-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.admin-image-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.admin-image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.form-input--sm {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    width: auto;
}

.form-input--xs {
    width: 60px;
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
}

.admin-variants {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.variants-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.variant-row {
    display: grid;
    grid-template-columns: 1fr 120px 60px 120px auto;
    gap: 0.5rem;
    align-items: center;
}

.admin-pagination {
    display: flex;
    gap: 0.35rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.admin-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.admin-pagination__link:hover,
.admin-pagination__link--active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--text);
    border-color: var(--primary);
}

.admin-code {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.admin-details summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 0.8rem;
}

.admin-json {
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 6px;
    overflow-x: auto;
    max-width: 300px;
    margin: 0.5rem 0 0;
}

@media (max-width: 1024px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        height: auto;
        position: static;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .variant-row {
        grid-template-columns: 1fr;
    }
}
