:root {
    --bg: #f4f6f8;
    --text: #0f172a;
    --muted: #475569;
    --line: #dbe2ea;
    --card: #ffffff;
    --brand: #1d4ed8;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.shell-header, .shell-footer {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.shell-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.shell-main {
    padding: 32px 0;
}

.brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand);
}

.shell-header .shell-wrap,
.shell-footer .shell-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    font-weight: 600;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
}

h1 {
    margin: 0 0 16px;
    font-size: 32px;
}

p {
    margin: 0 0 12px;
    line-height: 1.6;
}

.admin-body {
}

.storefront-hero-bg {
    background-image: url("/assets/images/backgrounds/hero-bg.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.storefront-star-rating {
    color: #fbbf24;
}

.storefront-star-empty {
    color: #d1d5db;
}

.storefront-radio {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
}

.storefront-radio:checked {
    border-color: #1e40af;
    background-color: #1e40af;
}

.storefront-radio:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: #fff;
}

.storefront-map-placeholder {
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
}

.storefront-rich-text p:last-child,
.storefront-rich-text ul:last-child,
.storefront-rich-text ol:last-child {
    margin-bottom: 0;
}

.storefront-article-content ul,
.storefront-rich-text ul {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.storefront-article-content li,
.storefront-rich-text li {
    margin: 0 0 0.45rem;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    overflow-x: clip;
}


html {
    -webkit-text-size-adjust: 100%;
}

a,
button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
.storefront-mobile-sticky,
.storefront-mobile-panel {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#mobile-menu-panel,
#mobile-search-panel,
#cart-sidebar,
#family-mobile-panel,
#lead-modal,
#review-modal,
#site-consent,
#image-modal {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.storefront-mobile-sticky-spacer {
    display: block;
}

@media (max-width: 767px) {
    .storefront-mobile-sticky-spacer {
        height: calc(env(safe-area-inset-bottom, 0px) + 7.25rem);
    }
}


.storefront-no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.storefront-no-scrollbar::-webkit-scrollbar {
    display: none;
}

.storefront-safe-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
}

.storefront-safe-bottom-space {
    height: calc(env(safe-area-inset-bottom, 0px) + 6rem);
}

.storefront-card-compact {
    border-radius: 1rem;
}

@media (max-width: 767px) {
    .storefront-mobile-panel {
        border-top-left-radius: 1.25rem;
        border-top-right-radius: 1.25rem;
    }

    .storefront-mobile-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
    }

    .storefront-spec-pair {
        display: grid;
        gap: 0.35rem;
    }

    .storefront-spec-pair > span:last-child {
        text-align: left;
    }
}


.storefront-cart-metric {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 1rem;
    padding: 0.875rem 1rem;
    min-width: 0;
}

.storefront-cart-metric__label {
    font-size: 0.70rem;
    line-height: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}

.storefront-cart-metric__value {
    font-size: 1rem;
    line-height: 1.35rem;
    font-weight: 600;
    color: #111827;
}

@media (max-width: 767px) {
    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    .storefront-mobile-sticky .bg-white {
        border-radius: 1rem;
    }

    .storefront-cart-metric {
        padding: 0.75rem 0.875rem;
    }
}


/* Mobile storefront hardening */
.opacity-0.pointer-events-none {
    pointer-events: none;
}

#mobile-menu-panel[aria-hidden="true"],
#mobile-search-panel[aria-hidden="true"],
#cart-sidebar[aria-hidden="true"],
#family-mobile-panel[aria-hidden="true"],
#lead-modal[aria-hidden="true"],
#review-modal[aria-hidden="true"],
#site-consent[aria-hidden="true"],
#image-modal[aria-hidden="true"] {
    visibility: hidden;
    pointer-events: none;
}

#mobile-menu-panel[aria-hidden="false"],
#mobile-search-panel[aria-hidden="false"],
#cart-sidebar[aria-hidden="false"],
#family-mobile-panel[aria-hidden="false"],
#lead-modal[aria-hidden="false"],
#review-modal[aria-hidden="false"],
#image-modal[aria-hidden="false"] {
    visibility: visible;
    pointer-events: auto;
}

#site-consent[aria-hidden="false"],
#site-consent[aria-hidden="true"] {
    pointer-events: none;
}

#site-consent .pointer-events-auto {
    pointer-events: auto;
}

@media (max-width: 767px) {
    .product-page .product-page__gallery {
        gap: 0.875rem;
    }

    .product-page #main-image {
    }

    .product-page .thumbnail-btn {
        border-radius: 0.9rem;
    }

    .product-page .thumbnail-btn img {
        width: 4.5rem;
        height: 4.5rem;
    }

    .product-page .product-summary-row,
    .product-page .product-spec-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.3rem;
    }

    .product-page .product-summary-row > :last-child,
    .product-page .product-spec-row > :last-child {
        text-align: left;
    }

    .product-page .product-tabs-nav {
        scroll-snap-type: x proximity;
    }

    .product-page .product-tabs-nav .tab-btn {
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .product-page .product-image-modal-shell {
        padding-top: max(1rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    }

    .product-page .product-modal-image {
        max-height: 68vh;
    }

    .product-page .product-page__summary {
        gap: 1rem;
    }

    .product-page .product-tabs-nav [data-tab="reviews"] {
        display: none;
    }

    .product-page #reviews {
        display: none !important;
    }

    .product-page .product-page__summary-card {
    }

    .product-page .product-mobile-chip {
        display: inline-flex;
        align-items: center;
        min-height: 2rem;
        padding: 0.4rem 0.75rem;
        border: 1px solid #dbeafe;
        border-radius: 9999px;
        background: #f8fafc;
        font-size: 0.78rem;
        line-height: 1rem;
        font-weight: 600;
    }

    .product-page .product-mobile-spec-card {
        min-width: 0;
        border: 1px solid #e5e7eb;
        border-radius: 1rem;
        background: #f9fafb;
        padding: 0.75rem 0.875rem;
    }

    .product-page .product-mobile-spec-card__label {
        font-size: 0.68rem;
        line-height: 0.95rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #9ca3af;
        margin-bottom: 0.32rem;
    }

    .product-page .product-mobile-spec-card__value {
        font-size: 0.92rem;
        line-height: 1.25rem;
        font-weight: 600;
        color: #111827;
        word-break: break-word;
    }

    .product-page .product-mobile-trust-list {
        display: grid;
        gap: 0.65rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .product-page .product-mobile-trust-list li {
        position: relative;
        min-width: 0;
        padding-left: 1.45rem;
        font-size: 0.88rem;
        line-height: 1.35rem;
        color: #374151;
    }

    .product-page .product-mobile-trust-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.5rem;
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 9999px;
        background: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    }

    .product-page .product-page__cta-card {
        padding: 1rem;
    }

    .product-page .product-page__cta-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-page .product-page__cta-card #add-to-cart-btn,
    .product-page .product-page__cta-card #buy-now-btn,
    .product-page .product-page__cta-card #product-go-to-cart,
    .product-page .product-page__cta-card a[href="/checkout"] {
        min-height: 3.25rem;
        padding-left: 0.875rem;
        padding-right: 0.875rem;
        font-size: 0.95rem;
        line-height: 1.25rem;
    }

    .product-page .product-page__cta-card #add-to-cart-btn:not(:disabled) {
        background: #ffffff;
        color: #1d4ed8;
        border: 1px solid #bfdbfe;
    }

    .product-page .product-page__cta-card #cart-qty-input,
    .product-page .product-page__cta-card #cart-qty-decrease,
    .product-page .product-page__cta-card #cart-qty-increase {
        height: 3rem;
    }

    .product-page .tab-btn {
    }

    .product-page .tab-content > h3 {
        margin-bottom: 1rem;
        font-size: 1.125rem;
        line-height: 1.55rem;
    }

    .product-page .tab-content .prose,
    .product-page .tab-content .storefront-rich-text {
        font-size: 0.95rem;
        line-height: 1.65rem;
    }

    .product-page #reviews .max-w-\[820px\] {
        max-width: 100%;
    }

    .product-page #reviews .max-w-\[760px\] {
        max-width: 100%;
    }

    .product-page .storefront-mobile-sticky .bg-white {
    }

    .product-page .storefront-mobile-sticky .px-3.py-3 {
        padding: 0.75rem;
    }

    .product-page .storefront-mobile-sticky .text-base {
        font-size: 0.95rem;
        line-height: 1.25rem;
    }

    .product-page .storefront-mobile-sticky .px-3\.5.py-3 {
        min-height: 3rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }


    .product-page #site-consent .max-w-5xl {
        max-width: 100%;
    }

    .product-page #site-consent .rounded-3xl {
        border-radius: 1rem;
    }

    .product-page #site-consent .shadow-xl {
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
    }

    .product-page #site-consent p {
        font-size: 0.82rem;
        line-height: 1.3rem;
    }

    .product-page #site-consent #site-consent-accept {
        min-height: 2.75rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }
}

@media (max-width: 767px) {
    .product-page {
        --product-mobile-sticky-offset: 1rem;
    }

    .product-page .storefront-mobile-sticky {
        z-index: 45;
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    .product-page .storefront-mobile-sticky.is-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px)));
    }

    body.product-mobile-sticky-active .product-page {
    }

    .product-page .product-page__mobile-help {
        scroll-margin-top: 1rem;
    }

    .product-page #site-consent {
        bottom: var(--product-mobile-sticky-offset);
    }

    .product-page .tab-btn {
    }

    .storefront-footer .grid {
        gap: 1.25rem;
    }

    .storefront-footer .border-t {
        margin-top: 1.25rem;
        padding-top: 1rem;
    }

    .storefront-footer .text-xs {
        font-size: 0.72rem;
        line-height: 1.1rem;
    }
}


@media (max-width: 1023px) {
    .product-page .product-page__gallery {
        gap: 0.875rem;
    }

    .product-page #main-image {
        height: clamp(14rem, 56vw, 24rem);
    }

    .product-page .product-page__summary {
        gap: 1rem;
    }

    .product-page .product-page__summary-card {
        border-radius: 1.125rem;
        padding: 1.25rem;
    }

    .product-page .product-mobile-status-row {
        align-items: center;
    }

    .product-page .product-mobile-chip {
        display: inline-flex;
        align-items: center;
        min-height: 2rem;
        padding: 0.4rem 0.75rem;
        border: 1px solid #dbeafe;
        border-radius: 9999px;
        background: #f8fafc;
        font-size: 0.78rem;
        line-height: 1rem;
        font-weight: 600;
    }

    .product-page .product-mobile-spec-grid {
        align-items: stretch;
    }

    .product-page .product-page__summary-card > .lg\:hidden.text-sm.leading-6.text-gray-600.mb-4 {
        margin-bottom: 0.75rem;
        font-size: 0.88rem;
        line-height: 1.4rem;
        color: #4b5563;
    }

    .product-page .product-mobile-spec-card {
        min-width: 0;
        border: 1px solid #e5e7eb;
        border-radius: 1rem;
        background: #f9fafb;
        padding: 0.75rem 0.875rem;
    }

    .product-page .product-mobile-spec-card__label {
        font-size: 0.68rem;
        line-height: 0.95rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #9ca3af;
        margin-bottom: 0.32rem;
    }

    .product-page .product-mobile-spec-card__value {
        font-size: 0.92rem;
        line-height: 1.25rem;
        font-weight: 600;
        color: #111827;
        word-break: break-word;
    }

    .product-page .product-mobile-offer-card {
        border-color: #dbeafe;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    }

    .product-page .product-mobile-price-row > :first-child {
        min-width: 0;
    }

    .product-page .product-mobile-price-row > :last-child {
        max-width: 72%;
    }

    .product-page .product-mobile-risk-note {
        font-size: 0.88rem;
        line-height: 1.4rem;
        border-color: #dbeafe;
        background: #ffffff;
    }

    .product-page .product-mobile-trust-list {
        display: grid;
        gap: 0.65rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .product-page .product-mobile-trust-list li {
        position: relative;
        min-width: 0;
        padding-left: 1.35rem;
        font-size: 0.86rem;
        line-height: 1.3rem;
        color: #374151;
    }

    .product-page .product-mobile-trust-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.46rem;
        width: 0.45rem;
        height: 0.45rem;
        border-radius: 9999px;
        background: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    }

    .product-page .product-page__cta-card {
        padding: 1rem;
        border-color: #dbeafe;
        background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    }

    .product-page .product-page__cta-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-page .product-page__cta-card #add-to-cart-btn,
    .product-page .product-page__cta-card #buy-now-btn,
    .product-page .product-page__cta-card #product-go-to-cart,
    .product-page .product-page__cta-card a[href="/checkout"] {
        min-height: 3.25rem;
        padding-left: 0.95rem;
        padding-right: 0.95rem;
        font-size: 0.97rem;
        line-height: 1.25rem;
    }

    .product-page .product-page__cta-card #add-to-cart-btn:not(:disabled),
    .product-page .storefront-mobile-sticky #mobile-add-to-cart:not(:disabled) {
        background: #2563eb;
        color: #ffffff;
        border: 1px solid #2563eb;
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
    }

    .product-page .product-page__cta-card #buy-now-btn,
    .product-page .storefront-mobile-sticky #mobile-buy-now {
        background: #ffffff;
        color: #111827;
        border: 1px solid #e5e7eb;
        box-shadow: none;
    }

    .product-page .product-page__cta-card #cart-qty-input,
    .product-page .product-page__cta-card #cart-qty-decrease,
    .product-page .product-page__cta-card #cart-qty-increase {
        height: 3rem;
    }

    .product-page .product-page__mobile-help,
    .product-page .product-page__mobile-specs-after-cta {
        border-color: #e5e7eb;
        background: #ffffff;
    }

    .product-page .product-mobile-help-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 1.75rem;
        padding: 0.25rem 0.65rem;
        border-radius: 9999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 0.72rem;
        line-height: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .product-page .product-page__post-tabs-mobile {
        align-items: start;
    }

    .product-page .tab-btn {
        padding-top: 0.78rem;
        padding-bottom: 0.78rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .product-page .tab-content > h3 {
        margin-bottom: 1rem;
        font-size: 1.125rem;
        line-height: 1.55rem;
    }

    .product-page .tab-content .prose,
    .product-page .tab-content .storefront-rich-text {
        font-size: 0.95rem;
        line-height: 1.65rem;
    }

    .product-page .storefront-mobile-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    .product-page .storefront-mobile-sticky .bg-white {
        border-radius: 0.95rem;
    }

    .product-page .storefront-mobile-sticky .px-3.py-2 {
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }

    .product-page .storefront-mobile-sticky #mobile-add-to-cart,
    .product-page .storefront-mobile-sticky #mobile-buy-now {
        min-height: 3rem;
        font-size: 0.92rem;
    }

    .product-page .storefront-mobile-sticky .px-3\.5.py-3 {
        min-height: 3rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }

    .product-page .storefront-mobile-sticky.is-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px)));
    }

    .product-page .storefront-mobile-sticky-spacer {
        display: block;
        height: calc(env(safe-area-inset-bottom, 0px) + 7rem);
    }

    body.product-mobile-sticky-active .product-page {
        --product-mobile-sticky-offset: calc(env(safe-area-inset-bottom, 0px) + 5.7rem);
    }

    .product-page #site-consent {
        bottom: var(--product-mobile-sticky-offset);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .product-page .product-page__summary-card {
    }

    .product-page .product-mobile-spec-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-page .product-page__mobile-specs-after-cta .product-mobile-spec-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-page .product-mobile-trust-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-page .product-page__post-tabs-mobile {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-page #main-image {
    }
}

/* =========================
   Панель управления
   ========================= */
.admin-body {
    --admin-success-bg: #f0fdf4;
    --admin-success-text: #166534;
    --admin-success-line: #bbf7d0;
    --admin-warn-bg: #fff7ed;
    --admin-warn-text: #9a3412;
    --admin-warn-line: #fed7aa;
    --admin-error-bg: #fef2f2;
    --admin-error-text: #b91c1c;
    --admin-error-line: #fecaca;
    min-height: 100vh;
}

.admin-body,
.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-body button {
    font-family: Inter, Arial, sans-serif;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    backdrop-filter: blur(16px);
}

.admin-sidebar__head,
.admin-sidebar__foot {
    display: grid;
}

.admin-brand {
    font-weight: 700;
}

.admin-caption,
.admin-user__meta,
.admin-topbar__subtitle,
.admin-page__lead,
.admin-empty,
.admin-note,
.admin-metric__label,
.admin-table__hint,
.admin-backlink {
    color: var(--admin-muted);
}

.admin-nav {
    display: grid;
    align-content: start;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color .18s ease, color .18s ease;
}

.admin-nav__link:hover {
}

.admin-nav__link.is-active {
    color: #fff;
}

.admin-user__name {
    font-size: 0.92rem;
    font-weight: 600;
}

.admin-main {
}

.admin-topbar {
    position: sticky;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.admin-topbar__title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-topbar__meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--admin-muted);
    white-space: nowrap;
}

.admin-dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #9ca3af;
}

.admin-content {
}

.admin-stack {
    display: grid;
}

.admin-page,
.admin-card,
.admin-body .card {
    background: var(--admin-surface);
}

.admin-page,
.admin-body .card {
}

.admin-card {
}

.admin-page__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.admin-page__title,
.admin-body h1 {
    margin: 0;
}

.admin-body h2 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.admin-page__lead,
.admin-body p {
    margin: 8px 0 0;
}

.admin-actions,
.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
}

.admin-button,
.admin-body button.admin-button,
.admin-body a.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-line-strong);
    background: #fff;
    color: var(--admin-text);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.admin-button:hover,
.admin-body button.admin-button:hover,
.admin-icon-button:hover {
    border-color: #9ca3af;
}

.admin-button--primary {
}

.admin-button--primary:hover {
}

.admin-button--ghost {
}

.admin-button--subtle {
}

.admin-button--danger {
    background: var(--admin-error-bg);
    border-color: var(--admin-error-line);
    color: var(--admin-error-text);
}

.admin-button--success {
    background: var(--admin-success-bg);
    border-color: var(--admin-success-line);
    color: var(--admin-success-text);
}

.admin-button--block {
}

.admin-icon-button {
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--admin-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-text);
    cursor: pointer;
}

.admin-grid,
.admin-kpi-grid {
    display: grid;
    gap: 14px;
}

.admin-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-metric {
    display: grid;
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
}

.admin-metric__value {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.admin-split {
}

.admin-filter {
    display: grid;
    gap: 12px;
}

.admin-filter--products {
    grid-template-columns: 2fr minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.admin-filter--orders {
    grid-template-columns: 2fr repeat(3, minmax(140px, 1fr)) auto;
}

.admin-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-form-layout > .product-form-row {
    grid-column: 1 / -1;
}

.product-form-row {
    display: grid;
    gap: 12px;
    align-items: end;
}

.product-form-row--2 {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.product-form-row--4 {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.product-form-row--meta {
    grid-template-columns: 1fr;
}

.admin-field--counter .admin-input-counter {
    position: relative;
}

.admin-field--counter .admin-input-counter > input {
    padding-right: 56px;
}

.admin-input-counter__value {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1;
    color: #9ca3af;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    background: transparent;
}

@media (max-width: 1100px) {
    .product-form-row--4 {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 760px) {
    .product-form-row--2,
    .product-form-row--4 {
        grid-template-columns: 1fr;
    }
}

.admin-field,
.admin-body label[style*="display:grid"] {
    display: grid;
    gap: 6px;
}

.admin-field__label,
.admin-body label > span:first-child {
    font-weight: 600;
    color: #374151;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]),
.admin-body select,
.admin-body textarea {
    width: 100%;
    border: 1px solid var(--admin-line-strong) !important;
    color: var(--admin-text);
    box-shadow: none;
}

.admin-body textarea {
    resize: vertical;
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
    outline: none;
}

.admin-notice {
    border: 1px solid var(--admin-line);
    background: var(--admin-surface-soft);
    color: #374151;
}

.admin-notice--success {
    border-color: var(--admin-success-line);
    background: var(--admin-success-bg);
    color: var(--admin-success-text);
    margin-bottom: 12px;
}

.admin-notice--warning {
    border-color: var(--admin-warn-line);
    background: var(--admin-warn-bg);
    color: var(--admin-warn-text);
}

.admin-notice--error {
    border-color: var(--admin-error-line);
    background: var(--admin-error-bg);
    color: var(--admin-error-text);
}

.admin-info-strip {
    border: 1px solid var(--admin-line);
    color: #374151;
}

.admin-empty {
    padding: 18px;
    border: 1px dashed var(--admin-line-strong);
}

.admin-table-wrap {
}

.admin-table {
    width: 100%;
}

.admin-table th,
.admin-table td {
    text-align: left;
}

.admin-table th {
}

.admin-table tbody tr:hover {
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--admin-line);
    color: #374151;
}

.admin-chip--dark {
}

.admin-chip--success {
}

.admin-chip--warning {
}

.admin-chip--error {
}

.admin-list {
    display: grid;
    gap: 12px;
}

.admin-list-item {
}

.admin-media-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 12px;
    align-items: center;
}

.product-page .product-main-image {
    display: block;
    object-fit: cover;
    object-position: top center;
    background: #fff;
}

.product-page .product-main-image.is-placeholder {
    object-fit: contain;
    object-position: center;
    padding: clamp(1rem, 4vw, 3rem);
}

.product-page .product-thumbnail-image {
    display: block;
    object-fit: cover;
    object-position: top center;
    background: #fff;
}

.product-page .product-thumbnail-image.is-placeholder {
    object-fit: contain;
    object-position: center;
    padding: 0.4rem;
}

.product-page .product-image-modal-stage {
    width: 100%;
    height: min(82dvh, 56rem);
    max-height: calc(100dvh - 3rem);
    padding: clamp(0.5rem, 2vw, 1.5rem);
    overflow: hidden;
    touch-action: none;
}

.product-page .product-modal-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    will-change: transform;
    transform-origin: center center;
    transition: transform 0.18s ease;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}

.admin-thumb {
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.admin-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(17, 24, 39, 0.06);
}

.admin-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.34);
    z-index: 30;
}

/* Нормализация встроенных цветов интерфейса */
.admin-body [style*="background:#1d4ed8"] {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #fff !important;
}

.admin-body [style*="background:#0f766e"] {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #fff !important;
}

.admin-body [style*="background:#dbeafe"],
.admin-body [style*="background:#dcfce7"],
.admin-body [style*="background:#fef3c7"],
.admin-body [style*="background:#ede9fe"],
.admin-body [style*="background:#eef2ff"],
.admin-body [style*="background:#eff6ff"],
.admin-body [style*="background:#f8fafc"],
.admin-body [style*="background:#fffbeb"] {
    background: #fafafa !important;
    color: #374151 !important;
}

.admin-body [style*="color:#1d4ed8"],
.admin-body [style*="color:#166534"],
.admin-body [style*="color:#92400e"],
.admin-body [style*="color:#6d28d9"],
.admin-body [style*="color:#1e3a8a"] {
    color: #374151 !important;
}

.admin-body [style*="border-radius:16px"],
.admin-body [style*="border-radius:14px"],
.admin-body [style*="border-radius:12px"] {
    border-radius: 12px !important;
}

.admin-body [style*="border-bottom:1px solid #e2e8f0"],
.admin-body [style*="border-bottom:1px solid #f1f5f9"],
.admin-body [style*="border:1px solid #e2e8f0"],
.admin-body [style*="border:1px solid #dbe2ea"],
.admin-body [style*="border:1px solid #cbd5e1"] {
    border-color: var(--admin-line) !important;
}

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

    .admin-filter--products,
    .admin-filter--orders,
    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .admin-layout {
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: auto;
        transition: transform .2s ease;
        z-index: 40;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-topbar {
        padding-left: 20px;
        padding-right: 20px;
    }

    .admin-content {
    }

    .admin-icon-button {
    }

    .admin-topbar__meta {
        display: none;
    }
}

@media (max-width: 720px) {
    .admin-page,
    .admin-body .card,
    .admin-card,
    .admin-auth-card {
        padding: 18px;
    }

    .admin-page__title,
    .admin-body h1 {
        font-size: 1.55rem;
    }

    .admin-filter--products,
    .admin-filter--orders,
    .admin-form-grid,
    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        min-height: 64px;
        padding: 14px 16px;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-media-row {
        grid-template-columns: 56px 1fr;
    }

    .admin-media-row > :last-child {
        grid-column: 1 / -1;
    }
}

/* Promotions admin UX */
.admin-tabs {
}

.promo-builder-page {
}

.promo-builder-intro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.promo-builder-intro__item,
.promo-builder-tip,
.promo-builder-stat {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: #fff;
}

.promo-builder-intro__item strong,
.promo-builder-tip strong,
.promo-builder-stat strong {
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}

.promo-builder-intro__item span,
.promo-builder-tip span,
.promo-builder-stat span,
.promo-builder-help,
.promo-builder-row__hint {
    color: var(--admin-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.promo-builder-card {
    border-radius: 18px;
}

.promo-builder-card__head {
    margin-bottom: 18px;
}

.promo-builder-card__head--actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.promo-builder-grid {
    display: grid;
    gap: 14px;
}

.promo-builder-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.promo-builder-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promo-builder-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-field--full {
    grid-column: 1 / -1;
}

.promo-builder-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.promo-builder-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: #fff;
    color: var(--admin-text);
    font-weight: 500;
}

.promo-builder-toggle--compact {
    min-height: 42px;
}

.promo-builder-list {
    display: grid;
    gap: 14px;
}

.promo-builder-row {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: #fff;
}

.promo-builder-row--soft {
    background: #fcfcfc;
}

.promo-builder-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.promo-builder-row__head strong {
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.promo-builder-section[hidden] {
    display: none !important;
}

.promo-builder-info-strip {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--admin-line);
    color: #374151;
    line-height: 1.55;
}

.promo-builder-tips,
.promo-builder-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.promo-builder-stat strong {
    font-size: 1.02rem;
}

.promo-builder-row [hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .promo-builder-intro,
    .promo-builder-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .promo-builder-grid--3,
    .promo-builder-grid--2,
    .promo-builder-tips,
    .promo-builder-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .promo-builder-intro {
        grid-template-columns: 1fr;
    }

    .promo-builder-card {
        padding: 18px;
    }

    .promo-builder-toggle {
        width: 100%;
    }
}


/* =========================
   Storefront polish
   ========================= */
.storefront-card,
.storefront-summary-card,
.storefront-section-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.storefront-summary-card {
    padding: 1.5rem;
}

.storefront-summary-card__title {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
}

.storefront-stack {
    display: grid;
    gap: 1rem;
}

.storefront-stack--sm {
    gap: 0.75rem;
}

.storefront-kicker {
    font-size: 0.72rem;
    line-height: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9ca3af;
}

.storefront-line-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.storefront-line-item__label {
    color: #6b7280;
}

.storefront-line-item__value {
    text-align: right;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.storefront-line-item--center {
    align-items: center;
}

.storefront-divider {
    border-top: 1px solid #e5e7eb;
}

.storefront-promo-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.storefront-promo-inline {
    display: grid;
    gap: 0.75rem;
}

.storefront-promo-inline__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.storefront-promo-inline__title {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.3rem;
    font-weight: 700;
    color: #111827;
}

.storefront-promo-inline__meta {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.3rem;
    color: #6b7280;
}

.storefront-promo-inline__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.storefront-promo-inline__input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.95rem;
    background: #fff;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
}

.storefront-promo-inline__input::placeholder {
    text-transform: none;
    color: #9ca3af;
    font-weight: 400;
}

.storefront-promo-inline__input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.storefront-promo-inline__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.storefront-discount-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f9fafb;
}

.storefront-discount-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.storefront-discount-card__title {
    font-size: 0.92rem;
    line-height: 1.3rem;
    font-weight: 700;
    color: #111827;
}

.storefront-discount-card__list {
    display: grid;
    gap: 0.55rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.storefront-promo-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.storefront-promo-card__title {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.35rem;
    font-weight: 700;
    color: #111827;
}

.storefront-promo-card__meta {
    margin-top: 0.25rem;
    font-size: 0.82rem;
    line-height: 1.35rem;
    color: #6b7280;
}

.storefront-promo-card__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.storefront-promo-card__input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.95rem;
    background: #fff;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
}

.storefront-promo-card__input::placeholder {
    text-transform: none;
    color: #9ca3af;
    font-weight: 400;
}

.storefront-promo-card__input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.storefront-promo-card__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.storefront-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    line-height: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.storefront-chip--green {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.storefront-chip--red {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.storefront-note {
    font-size: 0.82rem;
    line-height: 1.4rem;
    color: #6b7280;
}

.storefront-feedback {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.storefront-feedback__title {
    font-size: 0.86rem;
    line-height: 1.25rem;
    font-weight: 700;
}

.storefront-feedback__text {
    font-size: 0.82rem;
    line-height: 1.35rem;
}

.storefront-feedback--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.storefront-feedback--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.storefront-feedback--muted {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
}

.storefront-summary-list {
    display: grid;
    gap: 0.75rem;
}

.storefront-summary-list .storefront-line-item {
    font-size: 0.92rem;
    line-height: 1.35rem;
}

.storefront-sidebar-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.storefront-sidebar-total__label {
    font-size: 0.9rem;
    color: #6b7280;
}

.storefront-sidebar-total__value {
    font-size: 1.25rem;
    line-height: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.storefront-sidebar-meta {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.storefront-sidebar-meta .storefront-line-item {
    font-size: 0.82rem;
    line-height: 1.25rem;
}

.storefront-drawer-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f9fafb;
}

.storefront-drawer-card__media {
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.storefront-drawer-card__title {
    font-size: 0.92rem;
    line-height: 1.3rem;
    font-weight: 700;
    color: #111827;
}

.storefront-drawer-card__meta {
    font-size: 0.76rem;
    line-height: 1.2rem;
    color: #6b7280;
}

.storefront-drawer-card__price {
    font-size: 0.8rem;
    line-height: 1.2rem;
    color: #6b7280;
}

.storefront-drawer-card__sum {
    font-size: 0.9rem;
    line-height: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.storefront-tight-grid {
    display: grid;
    gap: 1rem;
}

@media (max-width: 767px) {
    .storefront-summary-card {
        padding: 1rem;
        border-radius: 1.25rem;
    }

    .storefront-promo-card {
        padding: 0.9rem;
        border-radius: 0.95rem;
    }

    .storefront-promo-card__form,
    .storefront-promo-inline__form {
        grid-template-columns: 1fr;
    }

    .storefront-promo-card__actions,
    .storefront-promo-inline__actions {
        width: 100%;
    }

    .storefront-promo-card__actions > *,
    .storefront-promo-inline__actions > * {
        width: 100%;
    }

    .admin-table th {
        position: sticky;
        top: 0;
        z-index: 1;
    }
}

.storefront-discount-card__list > .flex > :last-child,
#checkout-subtotal,
#checkout-discount-total,
#checkout-grand-total,
#mobile-checkout-total,
#subtotal,
#all-items-total,
#discount-total,
#total,
.storefront-sidebar-total__value {
    white-space: nowrap;
}

/* =========================
   Панель управления: обновлённая оболочка
   ========================= */
.admin-body.admin-theme {
    --admin-bg: #f3f6fb;
    --admin-surface: rgba(255, 255, 255, 0.96);
    --admin-surface-soft: #f8fafc;
    --admin-surface-tint: #eef4ff;
    --admin-text: #0f172a;
    --admin-muted: #64748b;
    --admin-accent: #0f172a;
    --admin-accent-soft: #e8eefc;
    --admin-brand: #2563eb;
    --admin-brand-soft: rgba(37, 99, 235, 0.12);
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.08), transparent 20%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}

.admin-body.admin-sidebar-open {
    overflow: hidden;
}

.admin-layout {
    grid-template-columns: 296px minmax(0, 1fr);
}

.admin-sidebar {
    gap: 22px;
    padding: 24px 18px 18px;
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 42%, #111827 100%);
    border-right: 0;
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.16);
}

.admin-sidebar__head,
.admin-sidebar__foot {
    gap: 14px;
}

.admin-brand {
    color: #f8fafc;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
}

.admin-caption,
.admin-user__meta,
.admin-nav-group__title,
.admin-user-card__meta {
    color: rgba(226, 232, 240, 0.62);
}

.admin-button--sidebar {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
}

.admin-button--sidebar:hover {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav-groups {
    display: grid;
    gap: 18px;
    align-content: start;
}

.admin-nav-group {
    display: grid;
    gap: 8px;
}

.admin-nav-group__title {
    display: none;
}

.admin-nav {
    gap: 6px;
}

.admin-nav__link {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(241, 245, 249, 0.84);
    background: transparent;
}

.admin-nav__link:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-nav__link.is-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(59, 130, 246, 0.18));
    border-color: rgba(96, 165, 250, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 26px rgba(15, 23, 42, 0.18);
}

.admin-user-card {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.admin-user-card .admin-user__name {
    color: #f8fafc;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    top: 18px;
    margin: 18px 24px 0;
    min-height: 80px;
    padding: 16px 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(20px);
}

.admin-topbar__left,
.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-topbar__context {
    display: grid;
    gap: 2px;
}

.admin-page__eyebrow {
    display: none !important;
}

.admin-page__eyebrow::before {
    display: none !important;
}

.admin-topbar__title {
    font-size: 1.1rem;
    color: var(--admin-text);
}

.admin-topbar__subtitle {
    color: var(--admin-muted);
    font-size: 0.88rem;
}

.admin-topbar__pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--admin-brand-soft);
    color: var(--admin-brand);
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-topbar__user {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-icon-button {
    flex-direction: column;
    gap: 4px;
}

.admin-icon-button span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.admin-content {
    max-width: none;
    padding: 24px;
}

.admin-content__inner {
    max-width: 1560px;
    margin: 0 auto;
}

.admin-stack {
    gap: 22px;
}

.admin-stack-lg {
    display: grid;
    gap: 24px;
}

.admin-page,
.admin-card,
.admin-body .card,
.admin-auth-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: var(--admin-surface);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(15, 23, 42, 0.04);
}

.admin-page,
.admin-body .card {
}

.admin-card {
}

.admin-page--hero {
    position: relative;
    overflow: hidden;
}

.admin-page--hero::after {
    content: "";
    position: absolute;
    top: -48px;
    right: -64px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.admin-page__head {
    gap: 18px;
}

.admin-page__head--hero {
    align-items: stretch;
}

.admin-page__title,
.admin-body h1 {
}

.admin-body h2 {
}

.admin-page__lead,
.admin-body p {
    max-width: 920px;
    line-height: 1.62;
}

.admin-flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-space-top {
    margin-top: 18px;
}

.admin-space-xs {
    margin-top: 6px;
}

.admin-actions,
.admin-inline-actions {
    gap: 10px;
}

.admin-inline-actions--end {
    align-self: end;
}

.admin-inline-actions--wrap {
    flex-wrap: wrap;
}

.admin-button,
.admin-body button.admin-button,
.admin-body a.admin-button {
    padding: 0 16px;
}

.admin-button--primary {
    box-shadow: 0 14px 28px rgba(29, 78, 216, 0.18);
}

.admin-button--primary:hover {
}

.admin-button--ghost {
    background: rgba(255, 255, 255, 0.84);
}

.admin-button--subtle {
    border-color: rgba(148, 163, 184, 0.16);
}

.admin-metric,
.admin-stat-tile,
.admin-quick-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 16px 26px rgba(15, 23, 42, 0.04);
}

.admin-kpi-grid--featured {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-metric {
    gap: 10px;
    padding: 20px;
}

.admin-metric--featured {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(29, 78, 216, 0.92));
}

.admin-metric--featured .admin-metric__label,
.admin-metric--featured .admin-metric__value {
    color: #fff;
}

.admin-metric__value {
    font-size: 2rem;
}

.admin-stat-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 12px;
    min-width: min(100%, 360px);
}

.admin-stat-tile {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.admin-stat-tile span,
.admin-quick-card span {
    color: var(--admin-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.admin-stat-tile strong {
    font-size: 1.7rem;
    letter-spacing: -0.03em;
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.admin-quick-card {
    display: grid;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-quick-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 22px 34px rgba(37, 99, 235, 0.08);
}

.admin-toolbar-card {
    padding: 18px;
}

.admin-toolbar {
    gap: 14px;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]),
.admin-body select,
.admin-body textarea {
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.admin-body textarea {
    min-height: 120px;
}

.admin-body textarea.admin-textarea--short {
    min-height: 72px;
}

.admin-body textarea.admin-textarea--html {
    min-height: 96px;
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
    border-color: rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.admin-field {
    gap: 8px;
}

.admin-field__label,
.admin-body label > span:first-child {
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.admin-notice {
    border-radius: 16px;
    padding: 14px 16px;
}

.admin-table-wrap {
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04);
}

.admin-table {
}

.admin-table th,
.admin-table td {
}

.admin-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
}

.admin-table tbody tr {
    transition: background-color .16s ease, box-shadow .16s ease;
}

.admin-table tbody tr:hover {
    box-shadow: inset 3px 0 0 var(--admin-brand);
}

.admin-table__hint {
    display: block;
    color: var(--admin-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-data-title {
    font-weight: 700;
    color: var(--admin-text);
}

.admin-chip {
    min-height: 30px;
    border-color: rgba(148, 163, 184, 0.18);
    background: #f8fafc;
}

.admin-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-chip--dark {
}

.admin-entity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
}

.admin-thumb--sm {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    flex: 0 0 auto;
}

.admin-empty {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.admin-tabs {
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.promo-builder-page {
    gap: 20px;
}

.promo-builder-intro__item,
.promo-builder-tip,
.promo-builder-stat,
.promo-builder-row,
.promo-builder-toggle {
    border-radius: 18px;
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.03);
}

.promo-builder-card {
    padding: 24px;
}

.promo-builder-toggle {
    min-height: 52px;
    padding: 0 16px;
}

.promo-builder-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--admin-brand);
}

.promo-builder-info-strip {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.16);
}

.admin-sticky-actions {
    position: sticky;
    bottom: 22px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1180px) {
    .admin-layout {
        grid-template-columns: 264px minmax(0, 1fr);
    }

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

    .admin-stat-strip {
        min-width: 0;
    }
}

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

    .admin-sidebar {
        width: 296px;
        transform: translateX(-104%);
    }

    .admin-topbar {
        top: 12px;
        margin: 12px 12px 0;
        padding: 14px 16px;
        border-radius: 18px;
    }

    .admin-content {
        padding: 16px 12px 20px;
    }

    .admin-icon-button {
        display: inline-flex;
    }

    .admin-topbar__actions {
        display: none;
    }
}

@media (max-width: 760px) {
    .admin-page,
    .admin-body .card,
    .admin-card,
    .admin-auth-card {
        padding: 20px;
        border-radius: 20px;
    }

    .admin-page__title,
    .admin-body h1 {
        font-size: 1.7rem;
    }

    .admin-page__head--hero,
    .promo-builder-card__head--actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-stat-strip,
    .admin-filter--products,
    .admin-filter--orders,
    .admin-form-grid,
    .admin-kpi-grid,
    .promo-builder-grid--4,
    .promo-builder-grid--3,
    .promo-builder-grid--2,
    .promo-builder-tips,
    .promo-builder-stats {
        grid-template-columns: 1fr;
    }

    .admin-entity {
        min-width: 0;
    }

    .admin-topbar__title {
        font-size: 1rem;
    }
}


/* =========================
   Панель управления: базовые карточки
   ========================= */
.admin-body.admin-theme {
    --admin-line: rgba(100, 116, 139, 0.26);
    --admin-line-strong: rgba(71, 85, 105, 0.34);
}

.admin-page,
.admin-card,
.admin-body .card,
.admin-auth-card,
.admin-table-wrap,
.admin-notice,
.admin-user-card,
.promo-builder-card,
.promo-builder-tip,
.promo-builder-stat,
.promo-builder-row,
.promo-builder-toggle,
.admin-quick-card,
.admin-metric,
.admin-stat-tile,
.admin-empty,
.admin-list-item,
.admin-info-strip {
    border-color: var(--admin-line-strong) !important;
}

.admin-card,
.admin-page,
.admin-auth-card,
.admin-table-wrap,
.admin-list-item,
.admin-info-strip {
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.admin-button,
.admin-btn {
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-button:hover,
.admin-btn:hover {
    transform: translateY(-1px);
}

.admin-button--primary,
.admin-btn--primary {
    color: #fff;
}

.admin-button--primary:hover,
.admin-btn--primary:hover,
.admin-button--danger:hover,
.admin-btn--danger:hover,
.admin-button--soft-danger:hover,
.admin-btn--soft-danger:hover {
    color: #fff !important;
}

.admin-button--ghost:hover,
.admin-btn--ghost:hover,
.admin-btn--secondary:hover {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.admin-button--subtle:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
    color: #fff !important;
}

.admin-button--danger,
.admin-btn--danger {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
    border-color: transparent;
    color: #fff;
}

.admin-button--danger:hover,
.admin-btn--danger:hover {
    background: linear-gradient(135deg, #7a1212 0%, #b91c1c 100%);
    border-color: transparent;
}

.admin-button--soft-danger,
.admin-btn--soft-danger {
    background: #fff1f2;
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.admin-button--soft-danger:hover,
.admin-btn--soft-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.admin-btn,
.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.admin-alert {
    margin-bottom: 14px;
}

.admin-alert--success,
.admin-alert--error,
.admin-alert--warning {
    border-radius: 16px;
    padding: 14px 16px;
}

.admin-alert--success {
    background: rgba(22, 163, 74, 0.10);
    border: 1px solid rgba(22, 163, 74, 0.18);
    color: #166534;
}

.admin-alert--error {
    background: rgba(220, 38, 38, 0.10);
    border: 1px solid rgba(220, 38, 38, 0.18);
    color: #991b1b;
}

.admin-alert--warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #92400e;
}

.admin-hero__content {
    display: grid;
    gap: 6px;
}

.admin-hero__content .admin-backlink {
    margin-bottom: 4px;
}

.admin-title {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.admin-lead {
    margin: 0;
    color: var(--admin-muted);
    line-height: 1.62;
}

.admin-panel,
.admin-card {
    padding: 24px;
    border-radius: 22px;
}

.admin-panel__header,
.admin-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-heading {
    margin: 0;
    font-size: 1.18rem;
}

.admin-copy {
    margin: 6px 0 0;
    color: var(--admin-muted);
    line-height: 1.6;
}

.admin-link,
.admin-backlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-brand);
    font-weight: 700;
}

.admin-link:hover,
.admin-backlink:hover {
    color: #1d4ed8;
}

.admin-note {
    color: var(--admin-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.admin-note--panel {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
}

.admin-meta {
    color: var(--admin-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.admin-grid {
    display: grid;
    gap: 18px;
}

.admin-grid--2,
.admin-two-col-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.admin-card-list,
.admin-list {
    display: grid;
    gap: 14px;
}

.admin-list--cards {
    gap: 16px;
}

.admin-list-item {
    padding: 16px 18px;
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.admin-list-item--card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
}

.admin-list-item--split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-kv {
    display: grid;
    gap: 4px;
}

.admin-kv__title {
    font-weight: 700;
    color: var(--admin-text);
}

.admin-kv__meta {
    font-size: 0.82rem;
    color: var(--admin-muted);
}

.admin-info-strip {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    line-height: 1.6;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--admin-brand);
}

.admin-form-actions,
.admin-sticky-actions {
    margin-top: 18px;
}

.admin-sticky-actions--static {
    position: static;
    bottom: auto;
}

.admin-product-savebar {
    position: sticky;
    top: 18px;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    margin: 10px 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.admin-product-savebar.is-saving,
form.is-saving .admin-product-savebar {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.08);
}

@media (max-width: 860px) {
    .admin-product-savebar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-product-savebar .admin-actions {
        width: 100%;
    }

    .admin-product-savebar .admin-actions .admin-button {
        width: 100%;
    }
}

.admin-page__head--compact {
    margin-bottom: 12px;
}

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

.admin-tabs--segmented {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--admin-line-strong);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.admin-tab:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    transform: translateY(-1px);
}

.admin-tab.is-active {
    box-shadow: 0 12px 26px rgba(29, 78, 216, 0.18);
}

.admin-quick-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-table td .admin-button,
.admin-table td .admin-btn {
    white-space: nowrap;
}

@media (max-width: 980px) {
    .admin-split,
    .admin-grid--2,
    .admin-two-col-tiles,
    .admin-quick-grid--2 {
        grid-template-columns: 1fr;
    }
}


/* =========================
   Admin UI shell v2
   ========================= */
.admin-body {
    --admin-bg: #f9fafb;
    --admin-surface: #ffffff;
    --admin-surface-soft: #f9fafb;
    --admin-text: #111827;
    --admin-muted: #6b7280;
    --admin-line: #e5e7eb;
    --admin-line-strong: #d1d5db;
    --admin-accent: #3b82f6;
    --admin-accent-soft: #eff6ff;
    --admin-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-layout--v2 {
    display: block;
    min-height: 100vh;
}

.admin-sidebar--v2 {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16rem;
    height: 100vh;
    padding: 0;
    gap: 0;
    background: #fff;
    border-right: 1px solid var(--admin-line);
    backdrop-filter: none;
    z-index: 40;
}

.admin-sidebar__head--v2 {
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-line);
}

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

.admin-brand--v2 {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.admin-nav-groups--v2 {
    padding: 1rem;
    overflow-y: auto;
}

.admin-nav-group--v2 + .admin-nav-group--v2 {
    margin-top: 1.25rem;
}

.admin-nav-group__label {
    margin: 0 0 0.75rem;
    padding: 0 0.75rem;
    font-size: 0.70rem;
    font-weight: 700;
    line-height: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
}

.admin-nav--v2 {
    gap: 0.125rem;
}

.admin-nav__link--v2 {
    min-height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-nav__link--v2:hover {
    background: #f3f4f6;
    color: #111827;
}

.admin-nav__link--v2.is-active {
    background: #eff6ff;
    color: #2563eb;
    border-right: 3px solid #3b82f6;
}

.admin-nav__icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex: 0 0 auto;
    font-size: 1rem;
}

.admin-main--v2 {
    margin-left: 16rem;
    min-width: 0;
}

.admin-topbar--v2 {
    position: fixed;
    top: 0;
    left: 16rem;
    right: 0;
    z-index: 30;
    min-height: 4rem;
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--admin-line);
    backdrop-filter: none;
}

.admin-topbar__left--v2 {
    flex: 1 1 auto;
    max-width: 42rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-content--v2 {
    max-width: none;
    padding: 5.5rem 0 0;
}

.admin-content__inner--v2 {
    padding: 1.5rem;
}

.admin-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.admin-breadcrumbs a:hover {
    color: #111827;
}

.admin-breadcrumbs span:last-child {
    color: #111827;
    font-weight: 500;
}

.admin-search {
    position: relative;
    width: 100%;
}

.admin-search__icon {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.admin-search input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.875rem 0 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--admin-line-strong) !important;
    background: #fff;
}

.admin-topbar__actions--v2 {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-bell {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #9ca3af;
}

.admin-bell:hover {
    color: #4b5563;
    background: #f3f4f6;
}

.admin-bell__dot {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #f87171;
}

.admin-user-menu {
    position: relative;
}

.admin-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 0;
    background: transparent;
    border-radius: 0.5rem;
}

.admin-user-trigger:hover {
    background: #f3f4f6;
}

.admin-user-trigger__avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.admin-user-trigger__meta {
    display: grid;
    text-align: left;
    line-height: 1.2;
}

.admin-user-trigger__meta strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.admin-user-trigger__meta span {
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-user-trigger__arrow {
    color: #9ca3af;
}

.admin-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 14rem;
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.admin-dropdown-menu__section {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--admin-line);
}

.admin-dropdown-menu__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.admin-dropdown-menu__caption {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-dropdown-menu__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
}

.admin-dropdown-menu__link:hover {
    background: #f9fafb;
    color: #111827;
}

.admin-dropdown-menu__link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-page,
.admin-card,
.admin-body .card {
    border-radius: 0.5rem;
    border: 1px solid var(--admin-line);
    box-shadow: none;
}

.admin-page,
.admin-body .card {
    padding: 1.5rem;
}

.admin-card {
    padding: 1.25rem;
}

.admin-page__head {
    margin-bottom: 1.5rem;
}

.admin-page__title,
.admin-body h1 {
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.admin-body h2 {
    font-size: 1.125rem;
}

.admin-page__lead,
.admin-body p {
    margin-top: 0.25rem;
    color: #6b7280;
}

.admin-quick-grid,
.admin-kpi-grid,
.admin-grid {
    gap: 1.5rem;
}

.admin-metric,
.admin-quick-card {
    border-radius: 0.5rem;
    border: 1px solid var(--admin-line);
    background: #fff;
}

.admin-quick-card {
    min-height: 0;
    padding: 1rem;
}

.admin-quick-card strong {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.95rem;
    color: #111827;
}

.admin-quick-card span {
    font-size: 0.8125rem;
    color: #6b7280;
}

.admin-table-wrap {
    border-radius: 0.5rem;
    border: 1px solid var(--admin-line);
    overflow: auto;
    background: #fff;
}

.admin-table {
    min-width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f9fafb;
}

.admin-table th,
.admin-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--admin-line);
    vertical-align: top;
}

.admin-table th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

.admin-chip {
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
}

.admin-button,
.admin-body button.admin-button,
.admin-body a.admin-button {
    min-height: 2.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.admin-button--primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.admin-button--primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.admin-button--subtle {
    background: #f3f4f6;
    color: #111827;
}

.admin-icon-button {
    display: none;
}

.admin-topbar__title,
.admin-topbar__subtitle,
.admin-topbar__pill,
.admin-topbar__user,
.admin-topbar__context {
    display: none !important;
}

@media (max-width: 1024px) {
    .admin-sidebar--v2 {
        transform: translateX(-100%);
        transition: transform .22s ease;
    }

    .admin-sidebar--v2.is-open {
        transform: translateX(0);
    }

    .admin-main--v2 {
        margin-left: 0;
    }

    .admin-topbar--v2 {
        left: 0;
    }

    .admin-icon-button {
        display: inline-flex;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        position: relative;
        background: #fff;
    }

    .admin-icon-button span {
        position: absolute;
        left: 0.75rem;
        right: 0.75rem;
        height: 2px;
        border-radius: 999px;
        background: #111827;
    }

    .admin-icon-button span:nth-child(1) {
        top: 0.85rem;
    }

    .admin-icon-button span:nth-child(2) {
        top: 1.2rem;
    }

    .admin-icon-button span:nth-child(3) {
        top: 1.55rem;
    }

    .admin-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.45);
        z-index: 35;
    }
}

@media (max-width: 767px) {
    .admin-topbar--v2 {
    }

    .admin-content__inner--v2 {
        padding: 1rem;
    }

    .admin-user-trigger__meta,
    .admin-user-trigger__arrow,
    .admin-bell {
        display: none;
    }

    .admin-page,
    .admin-card,
    .admin-body .card {
        padding: 1rem;
    }

    .admin-page__head {
    }
}


/* =========================
   Admin UI harmonization pass 2
   ========================= */
.admin-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-field--span-2 {
}

.admin-field--span-3 {
    grid-column: span 3;
}

.admin-field--span-full,
.admin-field--full {
    grid-column: 1 / -1;
}

.admin-grid--start {
    align-items: start;
}

.admin-kpi-grid {
    display: grid;
    gap: 16px;
}

.admin-kpi-grid--3 {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    min-width: min(100%, 520px);
}

.admin-inline-actions--start {
    justify-content: flex-start;
}

.admin-inline-actions--compact {
    gap: 8px;
}

.admin-page__head--tight,
.admin-card__head--tight {
    margin-bottom: 14px;
}

.admin-page__head--form-end {
    margin-top: 16px;
    margin-bottom: 0;
    align-items: center;
}

.admin-card--compact,
.admin-card--nested {
    padding: 20px;
}

.admin-card--nested {
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
}

.admin-table--wide-sm {
    min-width: 840px;
}

.admin-table--wide-md {
    min-width: 960px;
}

.admin-table--wide-lg {
    min-width: 1080px;
}

.admin-table--wide-xl {
    min-width: 1280px;
}

.admin-table--clean {
    min-width: 100%;
    border-collapse: collapse;
}

.admin-table--clean th,
.admin-table--clean td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.admin-table--clean thead th {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: transparent;
    border-bottom-color: #e2e8f0;
}

.admin-table__cell--right,
.admin-table--clean .admin-table__cell--right {
    text-align: right;
}

.admin-table__cell--action {
    white-space: nowrap;
    text-align: right;
}

.admin-table__editor,
.admin-table__editor select,
.admin-table__editor input,
.admin-table__editor textarea {
    width: 100%;
}

.admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-section-head__title {
    font-weight: 700;
    color: #0f172a;
}

.admin-stack--spaced {
    margin-top: 16px;
}

.admin-muted-block {
    color: #64748b;
}

.admin-muted-block--sm {
    margin-top: 4px;
    font-size: 13px;
}

.admin-muted-block--xs {
}

.admin-label-strong {
    font-weight: 700;
}

.admin-list-item--between {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.admin-list-item__aside {
    text-align: right;
    white-space: nowrap;
}

.admin-list-item__aside--top {
    align-self: flex-start;
}

.admin-link-offset {
    margin-left: 8px;
    margin-top: 8px !important;
}

.admin-media-grid {
    margin-top: 16px;
}

.admin-media-card {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-media-thumb {
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 12px;
    background: #f8fafc;
}

.admin-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-media-actions {
    display: grid;
    gap: 8px;
}

.admin-video-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-video-preview {
    width: 100%;
    max-height: 240px;
    border-radius: 12px;
    background: #000;
}

.admin-entity--product {
    display: grid;
    gap: 4px;
}

.admin-list-card {
    padding: 16px 18px;
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 980px) {
    .admin-form-grid--4,
    .admin-kpi-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }

    .admin-field--span-2,
    .admin-field--span-3 {
        grid-column: 1 / -1;
    }

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

    .admin-media-thumb {
        width: 100%;
        height: 220px;
    }
}

@media (max-width: 767px) {
    .admin-form-grid,
    .admin-form-grid--2,
    .admin-form-grid--4,
    .admin-kpi-grid--3,
    .admin-filter--orders,
    .admin-filter--products,
    .admin-section-head,
    .admin-list-item--between,
    .admin-page__head--form-end {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .admin-list-item__aside,
    .admin-table__cell--action,
    .admin-table__cell--right {
        text-align: left;
    }
}

.admin-filter-actions {
}


/* =========================
   Admin reference parity pass
   ========================= */
.admin-brand--v2 {
    gap: 0.875rem;
    text-decoration: none;
}

.admin-brand__wordmark {
    display: inline-block;
    font-family: "Pacifico", cursive;
    font-size: 1.3rem;
    line-height: 1;
    color: #3b82f6;
    flex: 0 0 auto;
}

.admin-brand__meta {
    display: grid;
    gap: 0.1rem;
    line-height: 1.15;
}

.admin-brand__meta strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.admin-brand__meta span {
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-button--block {
    width: 100%;
}

.admin-page--hero {
    border-radius: 0.5rem;
}

.admin-dashboard-hero {
    padding-bottom: 1.5rem;
}

.admin-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.admin-dashboard-stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--admin-line);
    border-radius: 0.5rem;
    background: #fff;
}

.admin-dashboard-stat-card__label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.admin-dashboard-stat-card__value {
    margin: 0.375rem 0 0;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.admin-dashboard-stat-card__hint {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

.admin-dashboard-stat-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex: 0 0 auto;
}

.admin-dashboard-stat-card__icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

.admin-dashboard-stat-card__icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.admin-dashboard-stat-card__icon--orange {
    background: #ffedd5;
    color: #ea580c;
}

.admin-dashboard-stat-card__icon--purple {
    background: #ede9fe;
    color: #7c3aed;
}

.admin-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.admin-dashboard-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-height: 8.75rem;
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--admin-line);
    border-radius: 0.5rem;
    background: #fff;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.admin-dashboard-action:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.admin-dashboard-action__icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #3b82f6;
}

.admin-dashboard-action strong {
    display: block;
    font-size: 0.9rem;
    color: #374151;
}

.admin-dashboard-action span:last-child {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
}

.admin-dashboard-chart {
    width: 100%;
    height: 18.75rem;
}

.admin-card__head .admin-link {
    white-space: nowrap;
}

.admin-chip--dark {
    color: #fff;
    background: #374151;
    border-color: #374151;
}

.admin-chip--success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.admin-chip--warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.admin-chip--error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

@media (max-width: 1279px) {
    .admin-dashboard-stats,
    .admin-dashboard-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .admin-dashboard-stats,
    .admin-dashboard-actions {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-stat-card {
        padding: 1rem;
    }

    .admin-dashboard-action {
        min-height: 0;
        align-items: flex-start;
        text-align: left;
    }

    .admin-dashboard-chart {
        height: 14rem;
    }
}

.site-body {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.site-shell {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-shell > * {
    flex: 0 0 auto;
}

.site-main {
    flex: 1 0 auto;
    min-width: 0;
}

.storefront-footer--page-end {
    position: relative;
    margin-top: auto;
    width: 100%;
    flex: 0 0 auto;
}

/* Служебные элементы аналитики не должны влиять на раскладку страницы. */
body > .__ymDebugger,
body > .__ym_wv_ign,
body > .__ymDebugger.__ym_wv_ign,
.site-shell > .__ymDebugger,
.site-shell > .__ym_wv_ign,
.site-shell > .__ymDebugger.__ym_wv_ign {
    position: fixed !important;
    inset: auto !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    z-index: -1 !important;
    flex: 0 0 auto !important;
}

/* =========================
   Admin products rebuild
   ========================= */
.admin-table--products-grid td {
    vertical-align: top;
}

.admin-thumb--product-table {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-thumb--product-table img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.admin-inline-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
}

.admin-price-cell {
    display: grid;
    gap: 0.35rem;
    min-width: 190px;
}

.admin-price-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    line-height: 1.2;
}

.admin-price-line__label {
    color: #64748b;
}

.admin-price-line__value {
    display: block;
    width: 104px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    text-align: center;
}

.admin-price-edit-wrap {
    position: relative;
    width: 104px;
}

.admin-price-input {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 0.75rem;
    text-align: center;
    font: inherit;
    color: #0f172a;
    background: #fff;
}

.admin-price-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.admin-price-save {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.45rem);
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid #86efac;
    border-radius: 999px;
    background: #f0fdf4;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.admin-price-save[hidden] {
    display: none;
}

.admin-price-save:disabled {
    opacity: 0.45;
}

.admin-price-cell.is-dirty .admin-price-save {
    opacity: 1;
    pointer-events: auto;
}

.admin-price-cell.is-busy {
    opacity: 0.72;
}

.admin-status-cell,
.admin-popularity-cell,
.admin-product-main {
    display: grid;
    gap: 0.4rem;
}

.admin-status-cell {
    justify-items: start;
}

.admin-status-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    font-size: 1rem;
    padding: 0;
}

.admin-status-icon--active {
    color: #16a34a;
    background: transparent;
    border-color: transparent;
}

.admin-status-glyph {
    font-size: 1.05rem;
    line-height: 1;
}

.admin-status-icon--draft {
    color: #d97706;
    background: transparent;
    border-color: transparent;
}

.admin-status-icon--hidden {
    color: #64748b;
    background: transparent;
    border-color: transparent;
}

.admin-status-icon--archived {
    color: #475569;
    background: transparent;
    border-color: transparent;
}

.admin-icon-action {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-icon-action--edit:hover,
.admin-icon-action--edit:focus-visible {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.18);
}

.admin-icon-action.is-disabled,
.admin-icon-action[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

.admin-icon-action.is-info {
    color: #2563eb;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.admin-tab {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font: inherit;
    font-weight: 600;
}

.admin-tab.is-active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.admin-price-arrow {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-price-arrow--up {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
}

.admin-price-arrow--down {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.admin-price-arrow--same {
    color: #64748b;
    background: rgba(100, 116, 139, 0.08);
}

.admin-toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1400;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.admin-toast.is-error {
    background: #991b1b;
}

.admin-modal-backdrop[hidden],
.admin-modal[hidden] {
    display: none !important;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 1390;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.admin-modal__card {
    width: min(100%, 420px);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
    padding: 1.25rem;
}

.admin-modal__head,
.admin-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-modal__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.admin-modal__title {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.admin-modal__body {
    padding: 1rem 0 1.1rem;
}

.admin-modal__text {
    margin: 0;
    color: #334155;
}

.admin-modal__close {
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    color: #64748b;
}

@media (max-width: 900px) {
    .admin-table--products-grid {
        min-width: 1180px !important;
    }
}


.admin-popconfirm {
    position: fixed;
    z-index: 1400;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.admin-popconfirm__card {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    padding: 0.5rem 0.7rem 0.5rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-popconfirm__head,
.admin-popconfirm__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.admin-popconfirm__head--inline {
    justify-content: space-between;
}

.admin-popconfirm__actions--inline {
    flex-shrink: 0;
}

.admin-popconfirm__title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #0f172a;
    white-space: nowrap;
}

.admin-popconfirm__text[hidden] {
    display: none;
}

.admin-popconfirm__text {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.admin-popconfirm__icon-button {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #64748b;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.admin-popconfirm__icon-button--accept {
    color: #16a34a;
    border-color: #86efac;
    background: #f0fdf4;
}

.admin-popconfirm__icon-button--cancel {
    color: #64748b;
}


/* Product editor refactor */
.admin-editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 16px;
}

.admin-editor-tab {
    appearance: none;
    border: 1px solid var(--admin-line);
    background: rgba(255, 255, 255, .86);
    color: var(--admin-text);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.admin-editor-tab:hover {
    border-color: rgba(37, 99, 235, .34);
    transform: translateY(-1px);
}

.admin-editor-tab.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.admin-editor-grid {
    display: grid;
    gap: 18px;
}

.admin-editor-grid--2 {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
}

.admin-button--xs {
    padding: 8px 11px;
    min-height: 36px;
    font-size: .8rem;
}

.admin-check--compact {
    margin: 0;
}

.admin-divider {
    height: 1px;
    background: var(--admin-line);
    margin: 6px 0;
}

.admin-list-card--thin {
    padding: 12px 14px;
}

.admin-chip-row--form {
    gap: 8px;
}

.admin-compat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    gap: 18px;
    align-items: start;
}

.admin-compat-browser,
.admin-compat-summary {
    display: grid;
    gap: 14px;
}

.admin-compat-brand {
    display: grid;
    gap: 12px;
}

.admin-compat-brand__head,
.admin-compat-summary__head,
.admin-compat-picked__head,
.admin-product-promo-row__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.admin-compat-model {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 14px;
    background: #f8fafc;
}

.admin-field--search input {
    background: #fff;
}

.admin-product-promo-row {
    display: grid;
    gap: 14px;
}

.admin-product-promo-row__title {
    font-weight: 700;
    color: var(--admin-text);
}

@media (max-width: 1100px) {
    .admin-editor-grid--2,
    .admin-compat-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .admin-editor-tabs {
        flex-direction: column;
    }

    .admin-compat-model,
    .admin-compat-brand__head,
    .admin-compat-summary__head,
    .admin-compat-picked__head,
    .admin-product-promo-row__head {
        flex-direction: column;
        align-items: stretch;
    }
}

/* === admin tables/orders/leads cleanup 2026-04-23 === */
.admin-topbar__toggle {
    flex: 0 0 auto;
}

.admin-search--topbar {
    flex: 1 1 auto;
}

.admin-filter-bar {
    display: grid;
    gap: 12px;
    align-items: end;
}

.admin-filter-bar--orders {
    grid-template-columns: minmax(280px, 2.2fr) repeat(3, minmax(160px, 1fr)) auto;
}

.admin-filter-bar--leads {
    grid-template-columns: minmax(280px, 2.2fr) minmax(160px, 1fr) minmax(180px, 1fr) auto;
}

.admin-toolbar-card--compact {
    padding: 18px 20px;
}

.admin-stat-strip--compact {
    gap: 12px;
}

.admin-field--searchbar {
    position: relative;
}

.admin-field__icon {
    position: absolute;
    left: 12px;
    bottom: 13px;
    color: #94a3b8;
    pointer-events: none;
    font-size: 0.95rem;
}

.admin-field--searchbar input {
    padding-left: 38px;
}

.admin-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: end;
    white-space: nowrap;
}

.admin-table--modern {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.admin-table--modern thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .06em;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table--modern th,
.admin-table--modern td {
    padding: 14px 16px;
    vertical-align: top;
    border-bottom: 1px solid #eef2f7;
}

.admin-table--modern tbody tr:hover {
    background: #fbfdff;
}

.admin-table--modern tbody tr:last-child td {
    border-bottom: 0;
}

.admin-cell-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-data-title--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    letter-spacing: .01em;
}

.admin-chip-row--stack {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.admin-price-cell {
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-copy--compact {
    max-width: 440px;
    line-height: 1.45;
    color: #0f172a;
    white-space: normal;
}

.admin-break-anywhere {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-table__editor--inline {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.admin-orders-table .admin-table__cell--right,
.admin-orders-table td.admin-table__cell--right {
    white-space: nowrap;
}

.admin-leads-table td:nth-child(4) {
    min-width: 280px;
}

@media (max-width: 1180px) {
    .admin-filter-bar--orders,
    .admin-filter-bar--leads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .admin-toolbar-card--compact {
        padding: 14px;
    }

    .admin-filter-bar--orders,
    .admin-filter-bar--leads {
        grid-template-columns: 1fr;
    }

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

    .admin-table--modern {
        min-width: 980px;
    }

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

/* === admin tables/orders/leads second pass 2026-04-23 === */
.admin-toolbar-card--scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-filter-bar--single-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: end;
    gap: 10px;
    min-width: max-content;
}

.admin-filter-bar__search {
    flex: 1 1 420px;
    min-width: 340px;
}

.admin-filter-bar__field {
    flex: 0 0 168px;
    min-width: 168px;
}

.admin-filter-bar--orders .admin-filter-bar__field:last-of-type {
    flex-basis: 190px;
    min-width: 190px;
}

.admin-filter-bar--single-row .admin-inline-actions {
    flex: 0 0 auto;
}

.admin-filter-bar--single-row .admin-field__label {
    white-space: nowrap;
}

.admin-filter-bar--single-row .admin-field select,
.admin-filter-bar--single-row .admin-field input {
    height: 42px;
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.admin-filter-bar--single-row .admin-button {
    min-height: 42px;
}

.admin-orders-table {
    table-layout: fixed;
}

.admin-orders-table th:nth-child(1),
.admin-orders-table td:nth-child(1) {
    width: 170px;
}

.admin-orders-table th:nth-child(2),
.admin-orders-table td:nth-child(2) {
    width: 230px;
}

.admin-orders-table th:nth-child(3),
.admin-orders-table td:nth-child(3) {
    width: 260px;
}

.admin-orders-table th:nth-child(4),
.admin-orders-table td:nth-child(4) {
    width: 170px;
}

.admin-orders-table th:nth-child(5),
.admin-orders-table td:nth-child(5) {
    width: 130px;
}

.admin-orders-table th:nth-child(6),
.admin-orders-table td:nth-child(6) {
    width: 160px;
}

.admin-orders-table th:nth-child(7),
.admin-orders-table td:nth-child(7) {
    width: 120px;
}

.admin-leads-table--compact {
    table-layout: fixed;
}

.admin-leads-table--compact th:nth-child(1),
.admin-leads-table--compact td:nth-child(1) {
    width: 110px;
}

.admin-leads-table--compact th:nth-child(2),
.admin-leads-table--compact td:nth-child(2) {
    width: 220px;
}

.admin-leads-table--compact th:nth-child(3),
.admin-leads-table--compact td:nth-child(3) {
    width: 420px;
}

.admin-leads-table--compact th:nth-child(4),
.admin-leads-table--compact td:nth-child(4) {
    width: 230px;
}

.admin-leads-table--compact th:nth-child(5),
.admin-leads-table--compact td:nth-child(5) {
    width: 220px;
}

.admin-cell-stack--dense {
    gap: 6px;
}

.admin-copy--lead {
}

.admin-truncate-link {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-truncate-link a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

@media (max-width: 767px) {
    .admin-filter-bar--single-row {
        display: grid;
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .admin-filter-bar__search,
    .admin-filter-bar__field {
        min-width: 0;
        width: 100%;
        flex: initial;
    }
}

/* === admin leads/orders compact pass 2026-04-23 === */
.admin-search--topbar {
    position: relative;
    width: 100%;
    min-width: 0;
}

.admin-search--topbar .admin-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    z-index: 2;
    color: #94a3b8;
}

.admin-search--topbar input {
    padding-left: 40px !important;
}

.admin-filter-bar--single-row-tight {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: end;
    gap: 10px;
    min-width: max-content;
}

.admin-filter-bar--single-row-tight > .admin-field,
.admin-filter-bar--single-row-tight > .admin-inline-actions {
    flex: 0 0 auto;
}

.admin-filter-bar--single-row-tight .admin-filter-bar__search {
    flex: 1 1 360px;
    min-width: 320px;
}

.admin-filter-bar--single-row-tight .admin-filter-bar__field {
    min-width: 140px;
}

.admin-filter-bar--single-row-tight .admin-filter-bar__field--sm {
    min-width: 136px;
}

.admin-filter-bar--single-row-tight .admin-filter-bar__field--md {
    min-width: 168px;
}

.admin-filter-bar--single-row-tight .admin-filter-bar__field--date {
    min-width: 150px;
}

.admin-filter-bar--single-row-tight .admin-field {
    gap: 6px;
}

.admin-filter-bar--single-row-tight .admin-field__label {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.admin-filter-bar--single-row-tight .admin-field select,
.admin-filter-bar--single-row-tight .admin-field input {
    min-height: 40px;
    height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.admin-filter-bar--single-row-tight .admin-filter-actions {
    display: inline-flex;
    gap: 8px;
    white-space: nowrap;
    align-self: end;
}

.admin-filter-bar--single-row-tight .admin-button {
    min-height: 40px;
}

.admin-leads-table--crm {
    table-layout: fixed;
}

.admin-leads-table--crm th:nth-child(1),
.admin-leads-table--crm td:nth-child(1) {
    width: 110px;
}

.admin-leads-table--crm th:nth-child(2),
.admin-leads-table--crm td:nth-child(2) {
    width: 170px;
}

.admin-leads-table--crm th:nth-child(3),
.admin-leads-table--crm td:nth-child(3) {
    width: 360px;
}

.admin-leads-table--crm th:nth-child(4),
.admin-leads-table--crm td:nth-child(4) {
    width: 180px;
}

.admin-leads-table--crm th:nth-child(5),
.admin-leads-table--crm td:nth-child(5) {
    width: 220px;
}

.admin-detail-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-status-form {
    display: grid;
    gap: 8px;
}

.admin-status-form select,
.admin-status-form .admin-button {
    width: 100%;
}

.admin-copy--lead {
    max-width: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-truncate-link,
.admin-truncate-link a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .admin-filter-bar--single-row-tight {
        display: grid !important;
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .admin-filter-bar--single-row-tight .admin-filter-bar__search,
    .admin-filter-bar--single-row-tight .admin-filter-bar__field,
    .admin-filter-bar--single-row-tight .admin-inline-actions {
        min-width: 0;
        width: 100%;
    }
}


/* === hotfix 2026-04-23: settings guard + compact stat tiles row === */
.admin-stat-strip--compact {
    min-width: 0;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.admin-stat-strip--compact .admin-stat-tile {
    min-width: 0;
}

@media (max-width: 760px) {
    .admin-stat-strip--compact {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin bell / notification dropdown fix ===== */

.admin-dropdown-menu--notifications {
    overflow: hidden;
}

.admin-dropdown-menu__section--notifications {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.admin-dropdown-menu__section--notifications .admin-dropdown-menu__title {
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
}

.admin-dropdown-menu__section--notifications .admin-dropdown-menu__caption {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
    white-space: normal;
}

.admin-dropdown-menu--notifications .admin-inline-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 12px;
}

.admin-dropdown-menu--notifications .admin-button {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    font-weight: 600;
}

.admin-notification-feed {
    overflow-y: auto;
    background: #f8fafc;
    display: grid;
}

.admin-notification-feed__empty {
    padding: 16px 14px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #ffffff;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.45;
}

.admin-notification-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #111827;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.admin-notification-item:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.admin-notification-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1rem;
    margin-top: 2px;
    color: #64748b;
}

.admin-notification-item__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-notification-item__body strong {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}

.admin-notification-item__body span {
    display: block;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #374151;
    word-break: break-word;
}

.admin-notification-item__body small {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #6b7280;
}

.admin-notification-item--success {
    border-left: 4px solid #16a34a;
}

.admin-notification-item--warning {
    border-left: 4px solid #f59e0b;
}

.admin-notification-item--error {
    border-left: 4px solid #dc2626;
}

.admin-notification-item--info {
    border-left: 4px solid #3b82f6;
}

@media (max-width: 640px) {
    .admin-dropdown-menu--notifications {
        right: -8px;
        width: min(24rem, calc(100vw - 0.75rem));
        min-width: 0;
    }

    .admin-dropdown-menu--notifications .admin-inline-actions {
        grid-template-columns: 1fr;
    }
}

/* === admin lead/order archive + mobile polish 2026-04-23 === */
.admin-input-with-icon {
    position: relative;
    display: block;
}

.admin-input-with-icon__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.admin-input-with-icon input {
    padding-left: 38px !important;
}

.admin-filter-bar--responsive {
    display: grid;
    gap: 12px;
    align-items: end;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(140px, 1fr)) auto;
}

.admin-space-bottom-sm {
    margin-bottom: 14px;
}

.admin-segmented-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: max-content;
}

.admin-segmented-tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.admin-segmented-tabs__item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    line-height: 1;
}

.admin-segmented-tabs__item.is-active {
    border-color: #3b82f6;
    color: #0f172a !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12);
}

.admin-product-gallery-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 10px;
}

.admin-product-gallery-strip__item {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.admin-product-gallery-strip__item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.admin-price-grid__item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.admin-price-grid__item span {
    font-size: 12px;
    color: #64748b;
}

.admin-price-grid__item strong {
    font-size: 15px;
    color: #111827;
}

.admin-inline-actions--stack-sm > * {
    display: inline-flex;
}

.admin-dropdown-menu--notifications {
    right: 0;
    width: min(26rem, calc(100vw - 24px));
    min-width: 20rem;
    max-width: 26rem;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.admin-dropdown-menu__section--notifications {
    padding: 16px;
}

.admin-dropdown-menu__section--notifications .admin-dropdown-menu__caption {
    margin-top: 8px;
}

.admin-dropdown-menu--notifications .admin-inline-actions {
    gap: 8px;
}

.admin-notification-feed {
    max-height: min(56vh, 24rem);
    padding: 12px;
    gap: 8px;
}

.admin-notification-item {
    padding: 12px 14px;
    border-radius: 16px;
}

@media (max-width: 1100px) {
    .admin-filter-bar--responsive {
        grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, 1fr));
    }

    .admin-filter-bar--responsive .admin-filter-bar__search,
    .admin-filter-bar--responsive .admin-filter-bar__field--md,
    .admin-filter-bar--responsive .admin-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .admin-topbar--v2 {
        padding: 12px 12px;
    }

    .admin-topbar__left--v2 {
        min-width: 0;
        gap: 10px;
    }

    .admin-topbar__actions--v2 {
        gap: 10px;
    }

    .admin-search--topbar {
        min-width: 0;
    }

    .admin-search--topbar input {
        height: 40px;
        font-size: 14px;
    }

    .admin-filter-bar--responsive {
        grid-template-columns: 1fr;
    }

    .admin-filter-bar--responsive .admin-filter-bar__search,
    .admin-filter-bar--responsive .admin-filter-bar__field,
    .admin-filter-bar--responsive .admin-filter-actions {
        grid-column: auto;
    }

    .admin-filter-actions {
        width: 100%;
        justify-content: stretch;
    }

    .admin-filter-actions .admin-button,
    .admin-inline-actions--stack-sm .admin-button,
    .admin-inline-actions--stack-sm form,
    .admin-inline-actions--stack-sm form .admin-button {
        width: 100%;
    }

    .admin-dropdown-menu--notifications {
        position: fixed;
        top: 68px;
        right: 12px;
        left: 12px;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: calc(100vh - 84px);
    }

    .admin-split--detail-mobile {
        grid-template-columns: 1fr;
    }

    .admin-page__head {
        gap: 12px;
    }

    .admin-page__head--form-end {
        flex-direction: column;
        align-items: stretch;
    }

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

    .admin-product-gallery-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===== Admin lead detail v2 ===== */
.admin-lead-v2 {
    gap: 18px;
}

.admin-lead-v2__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 560px);
    grid-template-areas:
        "lead product"
        "summary tech";
    gap: 18px;
    align-items: start;
}

.admin-lead-v2__lead {
    grid-area: lead;
}

.admin-lead-v2__product {
    grid-area: product;
}

.admin-lead-v2__summary {
    grid-area: summary;
}

.admin-lead-v2__tech {
    grid-area: tech;
}

.admin-lead-v2__facts,
.admin-lead-v2__summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-lead-v2__fact,
.admin-lead-v2__tech-item,
.admin-lead-v2__price {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.admin-lead-v2__fact--full {
    grid-column: 1 / -1;
}

.admin-lead-v2__fact span,
.admin-lead-v2__tech-item span,
.admin-lead-v2__price span,
.admin-lead-v2__label {
    font-size: 12px;
    color: #64748b;
}

.admin-lead-v2__fact strong,
.admin-lead-v2__tech-item strong,
.admin-lead-v2__price strong {
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
}

.admin-lead-v2__message {
    margin-top: 14px;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}

.admin-lead-v2__message-body {
    margin-top: 8px;
    color: #0f172a;
    line-height: 1.65;
    white-space: normal;
    word-break: break-word;
}

.admin-lead-v2__actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-lead-v2__status-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-lead-v2__status-form select {
    min-width: 220px;
}

.admin-lead-v2__product-top {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.admin-lead-v2__cover {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.admin-lead-v2__cover img,
.admin-lead-v2__thumb img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.admin-lead-v2__cover img {
    aspect-ratio: 1 / 1;
}

.admin-lead-v2__product-content {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.admin-lead-v2__product-title {
    font-size: 1.08rem;
    line-height: 1.45;
    font-weight: 800;
    color: #0f172a;
}

.admin-lead-v2__product-meta {
    display: grid;
    gap: 8px;
}

.admin-lead-v2__product-meta div {
    color: #334155;
    line-height: 1.5;
}

.admin-lead-v2__product-meta span {
    color: #64748b;
}

.admin-lead-v2__product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-lead-v2__prices {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-lead-v2__gallery {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.admin-lead-v2__thumb {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.admin-lead-v2__thumb img {
    aspect-ratio: 1 / 1;
}

.admin-lead-v2__tech-list {
    display: grid;
    gap: 12px;
}

.admin-lead-v2__break {
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 1279px) {
    .admin-lead-v2__grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "lead"
            "product"
            "summary"
            "tech";
    }
}

@media (max-width: 767px) {
    .admin-lead-v2__facts,
    .admin-lead-v2__summary-grid,
    .admin-lead-v2__prices,
    .admin-lead-v2__gallery,
    .admin-lead-v2__product-top {
        grid-template-columns: 1fr;
    }

    .admin-lead-v2__actions,
    .admin-lead-v2__status-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-lead-v2__status-form select,
    .admin-lead-v2__actions .admin-button,
    .admin-lead-v2__status-form .admin-button {
        width: 100%;
    }
}

/* archive controls hardening 2026-04-23 */
.admin-button:disabled,
.admin-button[disabled] {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== Admin detail pages aligned with storefront product composition ===== */
.admin-detail-page {
    --admin-detail-main-col: minmax(0, 1.12fr);
    --admin-detail-side-col: minmax(360px, 0.88fr);
    display: grid;
    gap: 18px;
}

.admin-detail-product,
.admin-detail-sidebar,
.admin-detail-sidebar-stack {
    align-content: start;
}

.admin-detail-page--lead .admin-detail-hero {
    align-items: start;
}

.admin-detail-page--lead .admin-detail-product,
.admin-detail-page--lead .admin-detail-sidebar,
.admin-detail-page--lead .admin-detail-sidebar-stack,
.admin-detail-page--lead .admin-detail-hero > .admin-card,
.admin-detail-page--lead .admin-detail-hero > .admin-detail-sidebar,
.admin-detail-page--lead .admin-detail-hero > .admin-detail-sidebar-stack {
    height: auto;
    min-height: 0;
}

.admin-detail-hero,
.admin-detail-bottom {
    display: grid;
    gap: 18px;
}

.admin-detail-hero {
    align-items: stretch;
}

.admin-detail-bottom {
    align-items: start;
}

.admin-detail-hero,
.admin-detail-bottom {
    grid-template-columns: var(--admin-detail-main-col) var(--admin-detail-side-col);
}

.admin-detail-hero > .admin-card,
.admin-detail-hero > .admin-detail-sidebar,
.admin-detail-hero > .admin-detail-sidebar-stack {
    min-height: 100%;
}

.admin-detail-product,
.admin-detail-sidebar {
    height: 100%;
}

.admin-detail-bottom__side {
    display: grid;
    gap: 18px;
    align-self: start;
}

.admin-detail-product,
.admin-detail-sidebar,
.admin-detail-summary-stack,
.admin-detail-section,
.admin-detail-form-stack,
.admin-detail-gallery,
.admin-detail-product__content,
.admin-detail-techlist {
    display: grid;
    gap: 16px;
}

.admin-detail-product__stack,
.admin-detail-product__meta {
    display: grid;
    gap: 16px;
}

.admin-detail-product__stack--order {
    align-content: start;
}

.admin-detail-sidebar,
.admin-detail-sidebar-stack {
    display: grid;
    gap: 16px;
}

.admin-detail-sidebar {
    position: sticky;
    top: 92px;
}

.admin-detail-sidebar--static {
    position: static;
    top: auto;
}

.admin-detail-sidebar-stack {
    position: sticky;
    top: 92px;
    gap: 18px;
    align-self: start;
}

.admin-detail-sidebar-stack--static {
    position: static;
    top: auto;
}

.admin-detail-product__grid {
    display: grid;
    grid-template-columns: minmax(260px, 480px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-detail-gallery__frame {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    cursor: zoom-in;
}

.admin-detail-gallery__frame img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-detail-gallery__rail {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
}

.admin-detail-gallery__thumbs {
    display: flex;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.admin-detail-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.admin-detail-gallery__rail-nav {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    color: #0f172a;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.admin-detail-gallery__rail-nav:hover,
.admin-detail-gallery__rail-nav:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.admin-detail-gallery__rail-nav[disabled] {
    opacity: .42;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.admin-detail-gallery__thumb {
    appearance: none;
    flex: 0 0 92px;
    width: 92px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.admin-detail-gallery__thumb:hover,
.admin-detail-gallery__thumb:focus-visible,
.admin-detail-gallery__thumb.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.admin-detail-gallery__thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-detail-product__titleblock {
    display: grid;
    gap: 6px;
}


.admin-detail-product--order .admin-detail-gallery__frame img {
    aspect-ratio: 1 / 1;
}

.admin-detail-product--order .admin-detail-product__titleblock--order {
    gap: 8px;
}

.admin-detail-product--order .admin-detail-product__meta--order {
    gap: 16px;
}

.admin-detail-product__title {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.35;
    font-weight: 800;
    color: #0f172a;
}

.admin-detail-product__subtitle {
    color: #64748b;
    font-size: .95rem;
}

.admin-detail-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-detail-kv-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-detail-kv-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.admin-detail-kv {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.admin-detail-kv--full {
    grid-column: 1 / -1;
}

.admin-detail-kv span,
.admin-detail-message__label {
    color: #64748b;
    font-size: 12px;
}

.admin-detail-kv strong {
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
}

.admin-detail-break {
    white-space: normal;
    word-break: break-word;
}

.admin-detail-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-detail-price {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid rgba(37, 99, 235, .12);
}

.admin-detail-price span {
    font-size: 12px;
    color: #475569;
}

.admin-detail-price strong {
    font-size: 1.05rem;
    line-height: 1.35;
    color: #0f172a;
}

.admin-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-detail-actions--spread {
    justify-content: space-between;
}

.admin-detail-actions--stack {
    flex-direction: column;
    align-items: stretch;
}

.admin-detail-actions--stack .admin-button {
    width: 100%;
}

.admin-detail-message {
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}

.admin-detail-message__body {
    margin-top: 8px;
    color: #0f172a;
    line-height: 1.65;
    word-break: break-word;
}

.admin-detail-line-items {
    display: grid;
    gap: 10px;
}

.admin-detail-line-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.admin-detail-line-item__aside {
    text-align: right;
    flex: 0 0 auto;
}

.admin-detail-section > h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.admin-detail-form-stack--boxed {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}

.admin-form-grid--detail {
    gap: 14px;
}

.admin-image-modal[hidden] {
    display: none;
}

.admin-image-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, .9);
    padding: 20px;
}

.admin-image-modal__shell {
    position: relative;
    width: min(100%, 1280px);
    max-height: 100%;
    padding: 24px 72px;
}

.admin-image-modal__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(72vh, 820px);
}

.admin-image-modal__image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
}

.admin-image-modal__close,
.admin-image-modal__nav {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.admin-image-modal__close:hover,
.admin-image-modal__close:focus-visible,
.admin-image-modal__nav:hover,
.admin-image-modal__nav:focus-visible {
    background: rgba(255, 255, 255, .28);
    transform: scale(1.04);
}

.admin-image-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 24px;
    z-index: 2;
}

.admin-image-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 28px;
    z-index: 2;
}

.admin-image-modal__nav--prev {
    left: 8px;
}

.admin-image-modal__nav--next {
    right: 8px;
}

.admin-image-modal__nav[disabled] {
    opacity: .45;
    cursor: default;
    transform: translateY(-50%);
}

@media (max-width: 1279px) {
    .admin-detail-hero,
    .admin-detail-bottom {
        grid-template-columns: 1fr;
    }

    .admin-detail-sidebar,
    .admin-detail-sidebar-stack {
        position: static;
    }
}

@media (max-width: 767px) {
    .admin-detail-product__grid,
    .admin-detail-kv-grid,
    .admin-detail-kv-grid--compact,
    .admin-detail-prices,
    .admin-form-grid--detail {
        grid-template-columns: 1fr;
    }

    .admin-detail-gallery__rail {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 8px;
    }

    .admin-detail-gallery__rail-nav {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .admin-detail-gallery__thumb {
        flex-basis: 78px;
        width: 78px;
    }

    .admin-detail-actions,
    .admin-detail-actions--spread,
    .admin-detail-line-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-detail-line-item__aside {
        text-align: left;
    }

    .admin-detail-actions .admin-button,
    .admin-detail-actions form,
    .admin-detail-actions form .admin-button {
        width: 100%;
    }

    .admin-image-modal {
        padding: 12px;
    }

    .admin-image-modal__shell {
        padding: 56px 8px 24px;
    }

    .admin-image-modal__stage {
        min-height: auto;
    }

    .admin-image-modal__image {
        max-height: 72vh;
    }

    .admin-image-modal__nav {
        width: 44px;
        height: 44px;
        font-size: 24px;
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .admin-image-modal__nav--prev {
        left: calc(50% - 52px);
    }

    .admin-image-modal__nav--next {
        right: calc(50% - 52px);
    }
}


/* Адаптивные вкладки настроек и статистики: кликабельны на 13-14" ноутбуках. */
.admin-segmented-tabs--settings,
.admin-statistics .admin-segmented-tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-padding-inline: 8px;
    padding: 2px 2px 8px;
}

.admin-segmented-tabs--settings .admin-segmented-tabs__item,
.admin-statistics .admin-segmented-tabs .admin-segmented-tabs__item {
    flex: 0 0 auto;
}

.admin-segmented-tabs--settings::-webkit-scrollbar,
.admin-statistics .admin-segmented-tabs::-webkit-scrollbar {
    height: 6px;
}

@media (max-width: 1366px) {
    .admin-segmented-tabs--settings .admin-segmented-tabs__item,
    .admin-statistics .admin-segmented-tabs .admin-segmented-tabs__item {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }
}

/* admin settings tabs + hover hardening 2026-04-24 */
.admin-segmented-tabs--settings {
    align-items: center;
    gap: 6px;
}

.admin-segmented-tabs--settings .admin-segmented-tabs__item {
    white-space: nowrap;
}

.admin-settings-panel[hidden] {
    display: none !important;
}

.admin-card--settings-group + .admin-card--settings-group {
    margin-top: 16px;
}

.admin-body .admin-button,
.admin-body a.admin-button,
.admin-body button.admin-button {
    color: var(--admin-text);
}

.admin-body .admin-button:hover,
.admin-body a.admin-button:hover,
.admin-body button.admin-button:hover {
    background: #f8fafc;
    color: var(--admin-text) !important;
    border-color: #94a3b8;
}

.admin-body .admin-button--primary,
.admin-body a.admin-button--primary,
.admin-body button.admin-button--primary {
    background: var(--admin-accent);
    border-color: var(--admin-accent);
    color: #fff !important;
}

.admin-body .admin-button--primary:hover,
.admin-body a.admin-button--primary:hover,
.admin-body button.admin-button--primary:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff !important;
}

.admin-body .admin-button--ghost:hover,
.admin-body a.admin-button--ghost:hover,
.admin-body button.admin-button--ghost:hover,
.admin-body .admin-button--subtle:hover,
.admin-body a.admin-button--subtle:hover,
.admin-body button.admin-button--subtle:hover {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.admin-body .admin-button--danger,
.admin-body a.admin-button--danger,
.admin-body button.admin-button--danger,
.admin-body .admin-button--soft-danger,
.admin-body a.admin-button--soft-danger,
.admin-body button.admin-button--soft-danger {
    color: var(--admin-error-text) !important;
}

.admin-body .admin-button--danger:hover,
.admin-body a.admin-button--danger:hover,
.admin-body button.admin-button--danger:hover,
.admin-body .admin-button--soft-danger:hover,
.admin-body a.admin-button--soft-danger:hover,
.admin-body button.admin-button--soft-danger:hover {
    background: #7f1d1d !important;
    border-color: #7f1d1d !important;
    color: #fff !important;
}

.admin-body .admin-segmented-tabs__item:hover {
    color: var(--admin-text) !important;
}

.admin-body .admin-segmented-tabs__item.is-active,
.admin-body .admin-segmented-tabs__item.is-active:hover {
    color: #fff;
}

/* admin content hierarchy + segmented tab hardening 2026-04-28 */
.admin-body .admin-segmented-tabs__item,
.admin-body button.admin-segmented-tabs__item,
.admin-body a.admin-segmented-tabs__item {
    color: #334155 !important;
    background: #fff;
}

.admin-body .admin-segmented-tabs__item.is-active,
.admin-body button.admin-segmented-tabs__item.is-active,
.admin-body a.admin-segmented-tabs__item.is-active {
    color: #0f172a !important;
    background: #fff !important;
    border-color: #3b82f6 !important;
}

.admin-body .admin-segmented-tabs__item.is-active span {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-actions--wrap {
    flex-wrap: wrap;
}

.admin-content-tree {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-content-family-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px;
}

.admin-content-family-card__actions {
    margin-top: 12px;
    padding-left: 8px;
}

.admin-content-tree__children {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.admin-content-tree__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 16px;
    padding: 12px 14px;
}

.admin-content-tree__row + .admin-content-tree__row {
    margin-top: 0;
}

.admin-content-tree__row--family {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.admin-content-tree__row--group .admin-content-tree__main {
    padding-left: calc(var(--group-level, 0) * 18px);
}

.admin-content-tree__titlewrap {
    min-width: 0;
}

.admin-content-tree__titleline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-content-tree__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
}

.admin-content-tree__meta {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.admin-content-tree__sort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.admin-content-tree__actions {
    justify-self: end;
}

.admin-content-state {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-content-state.is-active {
    background: #dcfce7;
    color: #166534;
}

.admin-content-state.is-inactive {
    background: #e2e8f0;
    color: #475569;
}

.admin-content-state.is-archived {
    background: #fef3c7;
    color: #92400e;
}

.admin-content-state.is-deleted {
    background: #fee2e2;
    color: #991b1b;
}

.admin-content-menu {
    position: relative;
}

.admin-dropdown-menu--content-actions {
}

.admin-content-menu__toggle {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.admin-content-menu__toggle:hover,
.admin-content-menu__toggle:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
}

.admin-content-menu__grid {
}

.admin-content-menu__grid form {
}

.admin-content-menu__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #0f172a;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.admin-content-menu__action:hover,
.admin-content-menu__action:focus-visible {
    border-color: #93c5fd;
}

.admin-content-menu__action.is-danger:hover,
.admin-content-menu__action.is-danger:focus-visible {
    border-color: #fca5a5;
}

@media (max-width: 767px) {
    .admin-content-tree__row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .admin-content-tree__actions {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: start;
    }

    .admin-content-tree__sort {
        grid-column: 1;
        justify-self: start;
    }

    .admin-content-menu__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================
   Admin content center responsive pass
   ========================= */
.admin-page--content-center {
    overflow: visible;
}

.admin-page--content-center::after {
    z-index: 0;
}

.admin-page--content-center > * {
    position: relative;
    z-index: 1;
}

.admin-page__head--content {
    align-items: flex-start;
}

.admin-content-hero__content {
    flex: 1 1 460px;
    min-width: 0;
}

.admin-actions--content {
    justify-content: flex-end;
    max-width: 720px;
}

.admin-actions--content .admin-button {
    white-space: nowrap;
}

.admin-content-editor-card {
    margin-top: clamp(10px, 1.4vw, 18px);
}

.admin-panel__header--content-editor,
.admin-panel__header--content-section {
    gap: 12px;
    margin-bottom: 14px;
}

.admin-content-editor-form {
    gap: 16px;
}

.admin-form-grid--content {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.admin-content-field--html textarea {
    min-height: clamp(260px, 34vh, 520px);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.55;
}

.admin-content-editor-actions {
    margin-top: 0 !important;
    justify-content: flex-end;
}

.admin-content-layout {
    margin-top: clamp(12px, 1.4vw, 18px);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    align-items: start;
}

.admin-content-section {
    min-width: 0;
}

.admin-table--content-list {
    min-width: 0 !important;
}

.admin-table--content-list th,
.admin-table--content-list td {
    padding: 12px 14px;
}

.admin-content-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-content-brand-head,
.admin-content-model-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.admin-card-list--models {
}

.admin-list-card--model {
    background: #f8fafc;
}

.admin-content-model-row {
    align-items: center;
    gap: 10px;
}

.admin-content-model-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
    .admin-page__head--content {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-actions--content {
        justify-content: flex-start;
        max-width: none;
    }
}

@media (max-width: 760px) {
    .admin-actions--content {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-actions--content .admin-button {
        width: 100%;
        min-width: 0;
        padding-inline: 12px;
    }

    .admin-content-editor-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-content-editor-actions .admin-button {
        width: 100%;
    }

    .admin-content-tree__row {
        grid-template-columns: minmax(0, 1fr) 34px 38px;
        gap: 8px;
        padding: 10px;
    }

    .admin-content-tree__actions {
        grid-column: auto;
        grid-row: auto;
        align-self: center;
    }

    .admin-content-tree__sort {
        grid-column: auto;
        justify-self: center;
        width: 32px;
        height: 32px;
    }

    .admin-content-tree__row--group .admin-content-tree__main {
        padding-left: min(calc(var(--group-level, 0) * 14px), 42px);
    }

    .admin-content-tree__titleline {
        gap: 6px;
    }

    .admin-content-state {
        min-height: 20px;
        padding-inline: 7px;
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    .admin-table-wrap:has(.admin-table--content-list) {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .admin-table--content-list,
    .admin-table--content-list thead,
    .admin-table--content-list tbody,
    .admin-table--content-list tr,
    .admin-table--content-list th,
    .admin-table--content-list td {
        display: block;
        width: 100%;
    }

    .admin-table--content-list thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .admin-table--content-list tbody {
        display: grid;
        gap: 10px;
    }

    .admin-table--content-list tr {
        border: 1px solid var(--admin-line);
        border-radius: 16px;
        background: #fff;
        overflow: hidden;
    }

    .admin-table--content-list td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--admin-line);
        text-align: left !important;
    }

    .admin-table--content-list td:first-child {
        display: block;
    }

    .admin-table--content-list td:last-child {
        border-bottom: 0;
    }

    .admin-table--content-list td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .admin-table--content-list td:first-child::before {
        display: block;
        margin-bottom: 6px;
    }

    .admin-table--content-list .admin-backlink {
        white-space: nowrap;
    }

    .admin-content-brand-head,
    .admin-content-model-row {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .admin-actions--content,
    .admin-content-editor-actions {
        grid-template-columns: 1fr;
    }

    .admin-content-tree__row {
        grid-template-columns: minmax(0, 1fr) 32px 36px;
        border-radius: 14px;
    }

    .admin-content-tree__title {
        font-size: 13px;
    }

    .admin-content-tree__meta {
        font-size: 11px;
    }

    .admin-content-menu__toggle {
        width: 34px;
        height: 34px;
    }
}

/* Admin content center tabs + create modal pass 2026-04-28 */
.admin-content-tabs {
    margin-top: clamp(12px, 1.4vw, 18px);
    min-width: 0;
}

.admin-segmented-tabs--content {
    width: 100%;
    margin-bottom: 14px;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    gap: 6px;
    overflow-x: auto;
}

.admin-segmented-tabs--content .admin-segmented-tabs__item {
    flex: 0 0 auto;
    border-radius: 14px;
    min-height: 42px;
    white-space: nowrap;
    cursor: pointer;
}

.admin-content-tab-panels {
    display: grid;
    gap: 16px;
}

.admin-content-section[hidden],
.admin-content-create-step[hidden] {
    display: none !important;
}

.admin-content-section {
    overflow: visible;
}

.admin-content-section--tree,
.admin-content-section--brands,
.admin-content-section--pages,
.admin-content-section--posts {
    width: 100%;
}

.admin-dropdown-menu--content-actions {
    z-index: 1450;
    min-width: 218px;
    width: max-content;
    max-width: min(280px, calc(100vw - 32px));
    padding: 6px;
    border-radius: 16px;
    border-color: #dbe3ef;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    overflow: visible;
}

.admin-content-menu__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
}

.admin-content-menu__grid form {
    margin: 0;
}

.admin-content-menu__action,
button.admin-content-menu__action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 38px;
    height: auto;
    padding: 9px 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.admin-content-menu__action:hover,
.admin-content-menu__action:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: 0;
}

.admin-content-menu__action.is-danger,
button.admin-content-menu__action.is-danger {
    color: #b91c1c;
}

.admin-content-menu__action.is-danger:hover,
.admin-content-menu__action.is-danger:focus-visible {
    background: #fef2f2;
    color: #991b1b;
}

.admin-content-brand-card {
    padding: 16px;
    border-radius: 18px;
}

.admin-content-brands-list {
    gap: 14px;
}

.admin-content-brand-head {
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-card-list--models {
    gap: 10px;
    margin-top: 12px;
}

.admin-list-card--model {
    padding: 11px 12px;
    border-radius: 14px;
    border-color: #e2e8f0;
}

.admin-content-model-row {
    min-height: 28px;
}

.admin-content-create-modal__card {
    width: min(100%, 760px);
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.admin-content-create-modal__head {
    position: relative;
    justify-content: center;
    min-height: 72px;
    padding: 18px 56px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.admin-content-create-modal__titlebox {
    text-align: center;
    min-width: 0;
}

.admin-content-create-modal__back,
.admin-content-create-modal__head .admin-modal__close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.admin-content-create-modal__back {
    left: 16px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.admin-content-create-modal__back:hover,
.admin-content-create-modal__back:focus-visible {
    background: #f8fafc;
    border-color: #94a3b8;
    outline: 0;
}

.admin-content-create-modal__head .admin-modal__close {
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f8fafc;
    cursor: pointer;
}

.admin-content-create-modal__body {
    min-height: 0;
    padding: 16px;
    overflow: auto;
}

.admin-content-create-step.is-active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 12px;
}

.admin-content-create-step:not(.is-active) {
    display: none;
}

.admin-content-create-choice,
.admin-content-create-link,
.admin-content-create-empty {
    display: grid;
    gap: 6px;
    align-content: start;
    min-height: 96px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    text-decoration: none;
}

.admin-content-create-choice {
    cursor: pointer;
}

.admin-content-create-choice:hover,
.admin-content-create-choice:focus-visible,
.admin-content-create-link:hover,
.admin-content-create-link:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    outline: 0;
}

.admin-content-create-choice strong,
.admin-content-create-link strong {
    font-size: 14px;
    font-weight: 800;
}

.admin-content-create-choice span,
.admin-content-create-link span,
.admin-content-create-empty {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.admin-content-create-list {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 10px;
}

.admin-content-create-list .admin-content-create-link {
    min-height: 78px;
}

.admin-content-create-empty {
    grid-column: 1 / -1;
    min-height: auto;
    background: #f8fafc;
}

@media (max-width: 760px) {
    .admin-segmented-tabs--content {
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .admin-segmented-tabs--content .admin-segmented-tabs__item {
        min-height: 40px;
        padding-inline: 12px;
    }

    .admin-content-create-open {
        width: 100%;
    }

    .admin-content-brand-head {
        align-items: flex-start;
        gap: 10px;
    }

    .admin-content-model-row {
        align-items: flex-start;
    }

    .admin-modal--content-create {
        align-items: flex-end;
        padding: 0;
    }

    .admin-content-create-modal__card {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }

    .admin-content-create-modal__head {
        min-height: 68px;
        padding: 16px 52px;
    }

    .admin-content-create-step.is-active,
    .admin-content-create-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-dropdown-menu--content-actions {
        min-width: 196px;
    }

    .admin-content-menu__action,
    button.admin-content-menu__action {
        white-space: normal;
    }

    .admin-content-brand-head,
    .admin-content-model-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-content-create-modal__head {
        justify-content: flex-start;
        padding-left: 52px;
        padding-right: 48px;
    }

    .admin-content-create-modal__titlebox {
        text-align: left;
    }
}

/* Admin content modal/dropdown calibration 2026-04-28 */
.admin-body .admin-modal--content-create {
    box-sizing: border-box;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__card {
    box-sizing: border-box;
    width: min(760px, calc(100vw - 32px)) !important;
    max-width: 760px !important;
    max-height: min(86vh, 760px) !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
}

.admin-body .admin-modal--content-create .admin-content-create-modal__head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(112px, auto) minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.admin-body .admin-modal--content-create .admin-content-create-modal__titlebox {
    grid-column: 2;
    min-width: 0;
    text-align: center;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__back,
.admin-body .admin-modal--content-create .admin-content-create-modal__head .admin-modal__close {
    position: static !important;
    transform: none !important;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__back {
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__back[hidden] {
    display: block !important;
    visibility: hidden;
    pointer-events: none;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__back:hover,
.admin-body .admin-modal--content-create .admin-content-create-modal__back:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
    outline: 0;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__head .admin-modal__close {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__head .admin-modal__close:hover,
.admin-body .admin-modal--content-create .admin-content-create-modal__head .admin-modal__close:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
    outline: 0;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__body {
    box-sizing: border-box;
    min-height: 0;
    max-height: calc(min(86vh, 760px) - 74px);
    padding: 18px;
    overflow: auto;
    background: #fff;
}

.admin-body .admin-modal--content-create .admin-content-create-step[hidden],
.admin-body .admin-modal--content-create .admin-content-create-step:not(.is-active) {
    display: none !important;
}

.admin-body .admin-modal--content-create .admin-content-create-step.is-active {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 12px;
    align-items: stretch;
}

.admin-body .admin-modal--content-create .admin-content-create-list {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 12px;
    align-items: stretch;
}

.admin-body .admin-modal--content-create .admin-content-create-choice,
.admin-body .admin-modal--content-create .admin-content-create-link,
.admin-body .admin-modal--content-create .admin-content-create-empty {
    box-sizing: border-box;
    display: grid !important;
    grid-template-rows: auto 1fr;
    gap: 7px;
    align-content: start;
    width: 100%;
    min-height: 94px;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.admin-body .admin-modal--content-create .admin-content-create-choice {
    cursor: pointer;
}

.admin-body .admin-modal--content-create .admin-content-create-choice strong,
.admin-body .admin-modal--content-create .admin-content-create-link strong {
    display: block !important;
    min-width: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.admin-body .admin-modal--content-create .admin-content-create-choice span,
.admin-body .admin-modal--content-create .admin-content-create-link span {
    display: block !important;
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.admin-body .admin-modal--content-create .admin-content-create-empty {
    grid-column: 1 / -1;
    min-height: auto;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.admin-body .admin-modal--content-create .admin-content-create-choice:hover,
.admin-body .admin-modal--content-create .admin-content-create-choice:focus-visible,
.admin-body .admin-modal--content-create .admin-content-create-link:hover,
.admin-body .admin-modal--content-create .admin-content-create-link:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.10);
    outline: 0;
}

.admin-body .admin-dropdown-menu--content-actions {
    box-sizing: border-box;
    z-index: 1700;
    min-width: 220px !important;
    width: max-content !important;
    max-width: min(300px, calc(100vw - 32px));
    padding: 7px !important;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.admin-body .admin-content-menu__grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3px !important;
}

.admin-body .admin-content-menu__grid form {
    margin: 0 !important;
}

.admin-body .admin-content-menu__action,
.admin-body button.admin-content-menu__action {
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 100% !important;
    min-height: 38px;
    height: auto !important;
    padding: 9px 11px !important;
    border: 0 !important;
    border-radius: 11px;
    background: transparent !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
}

.admin-body .admin-content-menu__action:hover,
.admin-body .admin-content-menu__action:focus-visible {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    outline: 0;
}

.admin-body .admin-content-menu__action.is-danger,
.admin-body button.admin-content-menu__action.is-danger {
    color: #b91c1c !important;
}

.admin-body .admin-content-menu__action.is-danger:hover,
.admin-body .admin-content-menu__action.is-danger:focus-visible {
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.admin-body .admin-content-brand-card {
    padding: 16px !important;
}

.admin-body .admin-content-brand-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-body .admin-card-list--models {
    display: grid;
    gap: 10px;
    margin-top: 0;
}

.admin-body .admin-content-model-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 30px;
}

@media (max-width: 760px) {
    .admin-body .admin-modal--content-create {
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__card {
        max-width: none !important;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__body {
        padding: 14px;
    }

    .admin-body .admin-modal--content-create .admin-content-create-step.is-active,
    .admin-body .admin-modal--content-create .admin-content-create-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .admin-body .admin-modal--content-create .admin-content-create-modal__head {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 68px;
        padding: 12px 14px;
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__titlebox {
        text-align: left;
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__back {
        min-width: 42px;
        width: 42px;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        color: transparent;
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__back::before {
        content: "←";
        color: #0f172a;
        font-size: 18px;
        line-height: 1;
    }

    .admin-body .admin-modal--content-create .admin-content-create-choice,
    .admin-body .admin-modal--content-create .admin-content-create-link,
    .admin-body .admin-modal--content-create .admin-content-create-empty {
        min-height: auto;
        padding: 13px 14px;
    }

    .admin-body .admin-dropdown-menu--content-actions {
        min-width: 206px !important;
    }

    .admin-body .admin-content-brand-head,
    .admin-body .admin-content-model-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

/* Admin content create modal: centered + inline forms 2026-04-28 */
.admin-body .admin-modal--content-create {
}

.admin-body .admin-modal--content-create .admin-content-create-modal__card {
}

.admin-body .admin-modal--content-create .admin-content-create-form {
    display: grid !important;
    grid-column: 1 / -1;
    gap: 16px;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.admin-body .admin-modal--content-create .admin-content-create-form__grid {
    width: 100%;
    min-width: 0;
}

.admin-body .admin-modal--content-create .admin-content-create-form__actions {
    position: sticky;
    bottom: -18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 4px -18px -18px;
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, #fff 42%);
    backdrop-filter: blur(10px);
}

.admin-body .admin-modal--content-create .admin-content-create-form .admin-field,
.admin-body .admin-modal--content-create .admin-content-create-form .admin-check {
    min-width: 0;
}

.admin-body .admin-modal--content-create .admin-content-create-form textarea {
    resize: vertical;
}

@media (max-width: 760px) {
    .admin-body .admin-modal--content-create {
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__card {
        width: min(100%, 760px) !important;
        max-height: calc(100vh - 24px) !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 22px !important;
    }

    .admin-body .admin-modal--content-create .admin-content-create-modal__body {
        max-height: calc(100vh - 96px) !important;
    }

    .admin-body .admin-modal--content-create .admin-content-create-form__actions {
        bottom: -14px;
        margin: 2px -14px -14px;
        padding: 12px 14px;
    }
}

@media (max-width: 560px) {
    .admin-body .admin-modal--content-create .admin-content-create-form__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Панель управления: модальное окно поверх содержимого */
.admin-body.admin-modal-open {
    overflow: hidden !important;
}

.admin-body .admin-content-create-backdrop[hidden],
.admin-body .admin-modal--content-create[hidden] {
    display: none !important;
}

.admin-body .admin-content-create-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10040 !important;
    background: rgba(15, 23, 42, 0.48) !important;
}

.admin-body .admin-modal--content-create {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10050 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    padding: clamp(14px, 2vw, 28px) !important;
    overflow: auto !important;
    pointer-events: auto !important;
    isolation: isolate;
}

.admin-body .admin-modal--content-create .admin-content-create-modal__card {
    position: relative;
    z-index: 1;
    margin: auto !important;
}

@media (max-width: 760px) {
    .admin-body .admin-modal--content-create {
        align-items: center !important;
        justify-content: center !important;
        padding: 12px !important;
    }
}


/* Admin content CRUD modal portal + AJAX actions 2026-04-28 */
body.admin-body > .admin-content-create-layer {
    place-items: center !important;
    isolation: isolate !important;
}

body.admin-body > .admin-content-create-layer[hidden] {
}

body.admin-body > .admin-content-create-layer .admin-content-create-backdrop,
body.admin-body > .admin-content-create-layer .admin-modal--content-create {
    pointer-events: auto !important;
}

.admin-content-inline-action.admin-backlink {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--admin-brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.admin-content-inline-action.admin-backlink:hover,
.admin-content-inline-action.admin-backlink:focus-visible {
    color: #1d4ed8;
    outline: 0;
}

.admin-body .admin-modal--content-create .admin-content-create-feedback {
    grid-column: 1 / -1;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
}

.admin-body .admin-modal--content-create .admin-content-create-feedback[hidden] {
    display: none !important;
}

.admin-body .admin-modal--content-create .admin-content-create-feedback.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.admin-body .admin-modal--content-create .admin-content-create-feedback.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.admin-body .admin-modal--content-create .admin-content-create-form.is-editing .admin-field [disabled],
.admin-body .admin-modal--content-create .admin-content-create-form.is-editing .admin-field option[disabled] {
    color: #94a3b8;
}

/* Storefront header logo */
.storefront-brand-link,
.storefront-mobile-brand-link {
    line-height: 0;
}

.storefront-header-logo {
    display: block;
    width: 118px;
    height: auto;
    max-height: 46px;
    object-fit: contain;
}

.storefront-mobile-logo {
    display: block;
    width: 118px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

@media (min-width: 640px) {
    .storefront-header-logo {
        width: 118px;
    }

    .storefront-mobile-logo {
        width: 204px;
    }
}

@media (min-width: 1024px) {
    .storefront-header-logo {
        width: 118px;
    }
}

@media (max-width: 374px) {
    .storefront-header-logo {
        width: 118px;
    }
}

/* Admin documents module — 2026-05-05 */
.admin-documents-page .admin-card--span-2 {
    grid-column: span 2;
}

.admin-documents-legal-card .admin-note {
    line-height: 1.55;
}

.admin-document-form .admin-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-field--span-2 {
    grid-column: span 2;
}

.admin-document-items {
    display: grid;
    gap: 8px;
}

.admin-document-items__head,
.admin-document-item {
    display: grid;
    grid-template-columns: minmax(110px, .65fr) minmax(220px, 1.7fr) 70px 90px 120px 110px 42px;
    gap: 8px;
    align-items: center;
}

.admin-document-items__head {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    padding: 0 2px;
}

.admin-document-item input {
    width: 100%;
    min-width: 0;
}

.admin-document-item__remove {
    width: 38px;
    height: 38px;
}

.admin-document-summary {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}

.admin-document-party {
    display: grid;
    gap: 6px;
    color: #475569;
}

.admin-document-party strong {
    color: #0f172a;
    font-size: 15px;
}

.admin-action-stack {
    display: grid;
    gap: 10px;
}

.admin-timeline {
    display: grid;
    gap: 10px;
}

.admin-timeline__item {
    border-left: 2px solid #cbd5e1;
    padding-left: 12px;
    display: grid;
    gap: 3px;
}

.admin-timeline__item span {
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .admin-document-form .admin-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-document-items__head {
        display: none;
    }

    .admin-document-item {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fff;
    }

    .admin-document-item input:nth-of-type(4),
    .admin-document-item input:nth-of-type(5),
    .admin-document-item input:nth-of-type(6) {
        min-width: 0;
    }

    .admin-document-item__remove {
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .admin-documents-page .admin-card--span-2 {
        grid-column: auto;
    }

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

    .admin-field--span-2 {
        grid-column: auto;
    }

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

    .admin-document-summary {
        text-align: left;
    }
}

/* Admin organizations settings — 2026-05-05 */
.admin-organizations-table--compact {
    min-width: 860px;
}

.admin-organizations-table--compact th,
.admin-organizations-table--compact td {
    vertical-align: middle;
}

.admin-organizations-table--compact th:first-child,
.admin-organizations-table--compact td:first-child {
    min-width: 280px;
}

.admin-organizations-table--compact th:nth-child(4),
.admin-organizations-table--compact td:nth-child(4) {
    min-width: 190px;
}

.admin-organization-namecell {
    display: grid;
    gap: 4px;
}

.admin-organization-namecell strong {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
}

.admin-organization-namecell > span {
    color: #64748b;
    font-size: 12px;
}

.admin-organization-badges {
    margin-top: 4px;
    gap: 6px;
}

.admin-mono-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #334155;
    white-space: nowrap;
}

.admin-table-actions {
    text-align: right;
    white-space: nowrap;
}

.admin-organization-turnover-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    font-weight: 700;
}

.admin-row-muted {
    opacity: .72;
}

.admin-details-lite {
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 8px 10px;
    background: #f8fafc;
}

.admin-details-lite summary {
    cursor: pointer;
    font-weight: 700;
    color: #334155;
}

.admin-details-lite[open] {
    background: #fff;
}

.admin-details-lite--json textarea {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.admin-muted-block--xs {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.admin-organization-modal {
    width: min(1120px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    border: 0;
    border-radius: 24px;
    padding: 0;
    background: transparent;
    color: #0f172a;
}

.admin-organization-modal::backdrop {
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(4px);
}

.admin-organization-modal__card {
    width: 100%;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.admin-organization-modal__head {
    padding: 20px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.admin-organization-modal__body {
    padding: 18px 22px;
    overflow: auto;
    background: #f8fafc;
}

.admin-organization-modal__actions {
    padding: 16px 22px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.admin-organization-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-organization-block {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.admin-organization-block--span-2 {
    grid-column: 1 / -1;
}

.admin-organization-block__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.admin-organization-block__head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
}

.admin-organization-block__head span {
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.admin-form-grid--compact {
    gap: 10px;
}

.admin-organization-fns-state {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
}

.admin-organization-fns-state strong {
    color: #0f172a;
}

@media (max-width: 1180px) {
    .admin-organizations-table--compact {
        min-width: 760px;
    }
}

@media (max-width: 760px) {
    .admin-organization-modal {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
    }

    .admin-organization-modal__card {
        max-height: calc(100vh - 18px);
        border-radius: 18px;
    }

    .admin-organization-modal__head,
    .admin-organization-modal__body,
    .admin-organization-modal__actions {
        padding: 14px;
    }

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

    .admin-organization-block--span-2 {
        grid-column: auto;
    }

    .admin-organization-block__head {
        display: grid;
    }

    .admin-organization-block__head span {
        text-align: left;
    }
}


/* Admin organizations async/FNS preview — 2026-05-05 */
.admin-organization-fns-preview {
    width: min(860px, calc(100vw - 32px));
}

.admin-fns-diff-list {
    display: grid;
    gap: 10px;
}

.admin-fns-diff-item {
    display: grid;
    grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.admin-fns-diff-item strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.3;
}

.admin-fns-diff-item div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.admin-fns-diff-item span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.admin-fns-diff-item p {
    margin: 0;
    min-height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 10px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.admin-organization-toast-host {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 3000;
    pointer-events: none;
}

.admin-organization-toast {
    min-width: min(360px, calc(100vw - 36px));
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 12px 14px;
    background: #f0fdf4;
    color: #166534;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
    font-size: 13px;
    font-weight: 800;
    z-index: 99999999 !important;
}

.admin-organization-toast.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 760px) {
    .admin-fns-diff-item {
        grid-template-columns: 1fr;
    }

    .admin-organization-toast-host {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .admin-organization-toast {
        min-width: 0;
    }
}

/* Admin API keys grouped layout — 2026-05-05 */
.admin-api-key-sections {
    display: grid;
    gap: 14px;
}

.admin-api-key-section {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.admin-api-key-section__head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.admin-api-key-section__head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
}

.admin-api-key-section__head p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.admin-field input[readonly],
.admin-field textarea[readonly] {
    background: #f8fafc;
    color: #475569;
    border-style: dashed;
    cursor: not-allowed;
}

.admin-organization-create-step {
    display: grid;
    gap: 14px;
}

.admin-fns-candidates {
    margin-top: 14px;
}

.admin-fns-candidate-list {
    display: grid;
    gap: 10px;
}

.admin-fns-candidate {
    gap: 5px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #eff6ff;
    color: #1e3a8a;
    cursor: pointer;
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin: 12px 0;
    text-align: left;
}

.admin-fns-candidate__title {
    display: block;
}

.admin-fns-candidate__meta {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    opacity: .72;
}

.admin-fns-candidate:hover {
    border-color: #93c5fd;
    background: #dbeafe;
}

.admin-fns-candidate strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.35;
}

.admin-fns-candidate span {
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.admin-body .admin-fns-candidate-list {
    margin-top: 12px;
}

.admin-body button.admin-fns-candidate {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 12px 16px;
    margin: 0;
    text-align: left;
    white-space: normal;
    border: 1px solid var(--admin-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-text);
}

.admin-body button.admin-fns-candidate:hover {
    border-color: #9ca3af;
    background: #fcfcfc;
}

.admin-body .admin-fns-candidate__title {
}

.admin-body .admin-fns-candidate__meta {
}

/* FNS organization candidates */
.admin-body .admin-fns-candidates {
}

.admin-body .admin-fns-candidate-list {
}

.admin-body .admin-fns-candidate-list > button.admin-fns-candidate {
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 12px 16px 10px;
    text-align: left;
    white-space: normal;
    border: 1px solid var(--admin-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-text);
    box-shadow: none;
}

.admin-body .admin-fns-candidate-list > button.admin-fns-candidate:hover {
    border-color: #9ca3af;
    background: #fcfcfc;
}

.admin-body .admin-fns-candidate__title {
}

.admin-body .admin-fns-candidate__meta {
    margin-top: 6px;
}

/* =========================
   Production cascade normalization
   Added after CSS audit: keeps storefront/admin scopes isolated and fixes mobile/tablet collisions.
   ========================= */

/* Admin safety: legacy .card rules must not leak into storefront cards. */
body:not(.admin-body) .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    box-shadow: none;
}

/* Admin component buttons only. Native/special buttons keep their own UI. */
.admin-body button:not(.admin-button):not(.admin-icon-button):not(.admin-btn):not(.admin-segmented-tabs__item):not(.admin-content-menu__action):not(.admin-fns-candidate) {
    font: inherit;
}

/* Content-create modal: one portal model, centered, above tabs/backdrops/footer. */
body.admin-body > .admin-content-create-layer {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(16px, 3vw, 32px) !important;
    pointer-events: none !important;
}

body.admin-body > .admin-content-create-layer.is-open,
body.admin-body > .admin-content-create-layer:not([hidden]) {
    display: flex !important;
    pointer-events: auto !important;
}

body.admin-body > .admin-content-create-layer[hidden] {
    display: none !important;
}

body.admin-body > .admin-content-create-layer .admin-content-create-backdrop,
body.admin-body > .admin-content-create-layer .admin-modal__backdrop {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    background: rgba(15, 23, 42, 0.48) !important;
    backdrop-filter: blur(8px);
}

body.admin-body > .admin-content-create-layer .admin-modal--content-create,
body.admin-body > .admin-content-create-layer .admin-content-create-modal,
body.admin-body > .admin-content-create-layer .admin-content-create-modal__card {
    position: relative !important;
    z-index: 1 !important;
    width: min(760px, calc(100vw - 32px)) !important;
    max-height: min(82vh, 760px) !important;
    margin: 0 !important;
    overflow: auto !important;
    pointer-events: auto;
}

/* Mobile product page has its own values. Tablet rules must not silently win on phones. */
@media (max-width: 767px) {
    .product-page #main-image {
        height: clamp(13.5rem, 56vw, 18rem);
    }

    .product-page .product-page__summary-card {
        border-radius: 1.125rem;
        padding: 1rem;
    }

    .product-page .product-page__cta-card #add-to-cart-btn:not(:disabled),
    .product-page .storefront-mobile-sticky #mobile-add-to-cart:not(:disabled) {
        background: #2563eb;
        color: #ffffff;
        border: 1px solid #2563eb;
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
    }

    .product-page .product-page__cta-card #buy-now-btn,
    .product-page .storefront-mobile-sticky #mobile-buy-now {
        background: #ffffff;
        color: #111827;
        border: 1px solid #e5e7eb;
        box-shadow: none;
    }

    .product-page .tab-btn {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .product-page .storefront-mobile-sticky .bg-white {
        border-radius: 0.9rem;
    }

    body.product-mobile-sticky-active .product-page {
        --product-mobile-sticky-offset: calc(env(safe-area-inset-bottom, 0px) + 5.35rem);
    }

    .product-page .storefront-mobile-sticky-spacer {
        height: calc(env(safe-area-inset-bottom, 0px) + 7.25rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .product-page #main-image {
        height: clamp(20rem, 44vw, 25rem);
    }

    .product-page .product-page__summary-card {
        padding: 1.5rem;
    }
}

/* FNS candidates: class-based rendering, no dependency on inline styles. */
.admin-body .admin-fns-candidates {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.admin-body .admin-fns-candidate-list {
    display: grid;
    gap: 10px;
}

.admin-body button.admin-fns-candidate,
.admin-body .admin-fns-candidate-list > button.admin-fns-candidate {
    display: grid !important;
    width: 100% !important;
    gap: 6px;
    min-height: 0;
    margin: 0 !important;
    padding: 14px 16px !important;
    text-align: left !important;
    border: 1px solid var(--admin-line-strong, #d1d5db) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: var(--admin-text, #111827) !important;
    box-shadow: none !important;
}

.admin-body button.admin-fns-candidate:hover,
.admin-body .admin-fns-candidate-list > button.admin-fns-candidate:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
}

.admin-body .admin-fns-candidate__title {
    display: block;
    margin: 0;
    color: #111827;
    font-size: 0.94rem;
    line-height: 1.35;
    font-weight: 700;
}

.admin-body .admin-fns-candidate__meta {
    display: block;
    margin: 0 !important;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}
/* Admin organization 4-step wizard — 2026-05-06 */
.admin-organization-create-step[hidden],
.admin-organization-wizard-panel[hidden] {
    display: none !important;
}

.admin-organization-wizard-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.admin-organization-wizard-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-organization-wizard-steps span.is-active {
    border-color: #1d4ed8;
    background: #eff6ff;
    color: #1d4ed8;
}

.admin-organization-wizard-steps span.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

@media (max-width: 760px) {
    .admin-organization-wizard-steps {
        grid-template-columns: 1fr 1fr;
        padding: 10px 14px;
    }

    .admin-organization-wizard-steps span {
        justify-content: flex-start;
        white-space: normal;
    }
}

/* FNS candidates: sorted list, selected state and legal status badges — 2026-05-06 */
.admin-body .admin-fns-candidate__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-body .admin-fns-candidate__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    max-width: 48%;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: clamp(12px, 0.8rem + 0.2vw, 14px);
    line-height: 1.2;
    font-weight: 800;
    line-height: 1.1;
    white-space: normal;
    text-align: center;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.admin-body .admin-fns-candidate__status--active {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
}

.admin-body .admin-fns-candidate__status--closed {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.admin-body .admin-fns-candidate__status--warning {
    border-color: #fed7aa !important;
    background: #fff7ed !important;
    color: #c2410c !important;
}

.admin-body .admin-fns-candidate__status--unknown {
    border-color: #fde68a !important;
    background: #fffbeb !important;
    color: #92400e !important;
}

.admin-body button.admin-fns-candidate.is-selected,
.admin-body .admin-fns-candidate-list > button.admin-fns-candidate.is-selected {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

@media (max-width: 640px) {
    .admin-body .admin-fns-candidate__head {
        display: grid;
        gap: 8px;
    }

    .admin-body .admin-fns-candidate__status {
        justify-self: flex-start;
        max-width: 100%;
    }
}


/* === CRM/admin compact fix: leads/orders/statistics tabs/order photo — 2026-05-13 === */
.admin-statistics .admin-segmented-tabs__item.is-disabled {
    opacity: .48;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-table-wrap {
    max-width: 100%;
}

.admin-leads-table--crm,
.admin-orders-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}

.admin-leads-table--crm th,
.admin-leads-table--crm td,
.admin-orders-table th,
.admin-orders-table td {
    padding: 12px 14px;
}

.admin-leads-table--crm th:nth-child(1),
.admin-leads-table--crm td:nth-child(1) { width: 18%; min-width: 0; }
.admin-leads-table--crm th:nth-child(2),
.admin-leads-table--crm td:nth-child(2) { width: 25%; min-width: 0; }
.admin-leads-table--crm th:nth-child(3),
.admin-leads-table--crm td:nth-child(3) { width: 23%; min-width: 0; }
.admin-leads-table--crm th:nth-child(4),
.admin-leads-table--crm td:nth-child(4) { width: 14%; min-width: 0; }
.admin-leads-table--crm th:nth-child(5),
.admin-leads-table--crm td:nth-child(5) { width: 14%; min-width: 0; }
.admin-leads-table--crm th:nth-child(6),
.admin-leads-table--crm td:nth-child(6) { width: 112px; min-width: 0; }

.admin-orders-table th:nth-child(1),
.admin-orders-table td:nth-child(1) { width: 15%; }
.admin-orders-table th:nth-child(2),
.admin-orders-table td:nth-child(2) { width: 21%; }
.admin-orders-table th:nth-child(3),
.admin-orders-table td:nth-child(3) { width: 25%; }
.admin-orders-table th:nth-child(4),
.admin-orders-table td:nth-child(4) { width: 13%; }
.admin-orders-table th:nth-child(5),
.admin-orders-table td:nth-child(5) { width: 11%; }
.admin-orders-table th:nth-child(6),
.admin-orders-table td:nth-child(6) { width: 9%; }
.admin-orders-table th:nth-child(7),
.admin-orders-table td:nth-child(7) { width: 116px; }

.admin-leads-table--crm .admin-chip,
.admin-orders-table .admin-chip {
    max-width: 100%;
}

.admin-leads-table--crm .admin-status-form--compact {
    gap: 6px;
}

.admin-leads-table--crm .admin-status-form--compact select,
.admin-leads-table--crm .admin-status-form--compact .admin-button,
.admin-orders-table .admin-button,
.admin-leads-table--crm .admin-button {
    min-height: 36px;
    padding: 8px 11px;
    font-size: .84rem;
}

.admin-cell-stack--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .82rem;
}

.admin-detail-product--order .admin-detail-product__stack--order {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    grid-template-areas:
        "gallery title"
        "gallery meta";
    gap: 14px 18px;
    align-items: start;
}

.admin-detail-product--order .admin-detail-gallery--order {
    grid-area: gallery;
    width: 100%;
    max-width: 220px;
}

.admin-detail-product--order .admin-detail-product__titleblock--order {
    grid-area: title;
}

.admin-detail-product--order .admin-detail-product__meta--order {
    grid-area: meta;
}

.admin-detail-product--order .admin-detail-gallery__frame {
    border-radius: 18px;
}

.admin-detail-product--order .admin-detail-gallery__frame img {
    aspect-ratio: 4 / 3;
    max-height: 170px;
    object-fit: contain;
    background: #fff;
}

.admin-detail-product--order .admin-detail-gallery__rail {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
}

.admin-detail-product--order .admin-detail-gallery__rail-nav {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.admin-detail-product--order .admin-detail-gallery__thumb {
    flex-basis: 56px;
    width: 56px;
    border-radius: 12px;
}

@media (max-width: 1180px) {
    .admin-leads-table--crm { min-width: 980px !important; }
    .admin-orders-table { min-width: 920px !important; }
}

@media (max-width: 767px) {
    .admin-leads-table--crm,
    .admin-orders-table {
        min-width: 880px !important;
    }

    .admin-detail-product--order .admin-detail-product__stack--order {
        grid-template-columns: 1fr;
        grid-template-areas:
            "gallery"
            "title"
            "meta";
    }

    .admin-detail-product--order .admin-detail-gallery--order {
        max-width: 100%;
    }

    .admin-detail-product--order .admin-detail-gallery__frame img {
        max-height: 260px;
    }
}

/* Admin · Yandex Metrika offline exchange status */
.admin-metrika-exchange-modal {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(3px);
}

.admin-metrika-exchange-modal__card {
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.admin-metrika-exchange-modal__head,
.admin-metrika-exchange-modal__actions {
    padding: 1rem 1.15rem;
}

.admin-metrika-exchange-modal__head {
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
}

.admin-metrika-exchange-modal__lead {
    margin: 0.35rem 0 0;
    max-width: 760px;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.45;
}

.admin-metrika-exchange-modal__body {
    padding: 1rem 1.15rem;
    overflow: auto;
    min-height: 220px;
}

.admin-metrika-exchange-modal__actions {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.admin-button--compact {
    min-height: 32px;
    padding: 0.45rem 0.72rem;
    font-size: 0.8rem;
}

.admin-metrika-exchange-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-metrika-exchange-toolbar__meta {
    color: #64748b;
    font-size: 0.84rem;
}

.admin-metrika-exchange-toolbar__meta.is-error {
    color: #b91c1c;
}

.admin-metrika-exchange-list {
    display: grid;
    gap: 0.65rem;
}

.admin-metrika-exchange-list.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.admin-metrika-exchange {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.admin-metrika-exchange.is-open {
    border-color: #bfdbfe;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.admin-metrika-exchange__summary {
    width: 100%;
    border: 0;
    background: #fff;
    display: grid;
    grid-template-columns: 28px minmax(190px, 0.9fr) minmax(260px, 1.5fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    text-align: left;
    cursor: pointer;
}

.admin-metrika-exchange__summary:hover {
    background: #f8fafc;
}

.admin-metrika-exchange__chevron {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease;
}

.admin-metrika-exchange.is-open .admin-metrika-exchange__chevron {
    transform: rotate(90deg);
}

.admin-metrika-exchange__main,
.admin-metrika-exchange__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-metrika-exchange__main strong {
    color: #0f172a;
    font-size: 0.94rem;
}

.admin-metrika-exchange__main small,
.admin-metrika-exchange__meta span {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.25;
}

.admin-metrika-exchange__meta {
    display: grid;
    grid-template-columns: minmax(90px, 0.35fr) minmax(80px, 0.25fr) minmax(190px, 1fr);
    align-items: center;
}

.admin-metrika-exchange__details {
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem 1rem 1rem;
    background: #f8fafc;
}

.admin-metrika-exchange__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-metrika-exchange-table-wrap {
    border-radius: 14px;
    background: #fff;
}

.admin-metrika-exchange-table {
    min-width: 920px;
}

.admin-metrika-exchange-table th,
.admin-metrika-exchange-table td {
    vertical-align: top;
}

.admin-metrika-exchange-table td strong,
.admin-metrika-exchange-table td small {
    display: block;
}

.admin-metrika-exchange-table td strong {
    color: #0f172a;
    margin-bottom: 0.22rem;
}

.admin-metrika-exchange-table td small {
    color: #64748b;
    line-height: 1.35;
}

.admin-metrika-exchange-table__error {
    margin-top: 0.4rem;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.admin-metrika-exchange-json {
    margin-top: 0.45rem;
}

.admin-metrika-exchange-json summary {
    cursor: pointer;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
}

.admin-metrika-exchange-json pre {
    margin: 0.45rem 0 0;
    max-height: 220px;
    overflow: auto;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.75rem;
    font-size: 0.74rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .admin-metrika-exchange-modal__card {
        width: min(100%, calc(100vw - 18px));
        max-height: calc(100vh - 18px);
    }

    .admin-metrika-exchange__summary {
        grid-template-columns: 28px 1fr;
    }

    .admin-metrika-exchange__meta {
        grid-column: 2;
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .admin-metrika-exchange-toolbar,
    .admin-metrika-exchange__actions,
    .admin-metrika-exchange-modal__actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

.admin-metrika-exchange__answer {
    margin-top: 0.12rem;
    color: #334155 !important;
    font-weight: 600;
    line-height: 1.35 !important;
}

.admin-metrika-exchange-table__answer {
    color: #334155 !important;
    font-weight: 600;
}

.admin-metrika-exchange-checks {
    margin-top: 0.8rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.75rem;
    display: grid;
    gap: 0.5rem;
}

.admin-metrika-exchange-checks--empty {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-metrika-exchange-checks__title {
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 800;
}

.admin-metrika-exchange-check {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.55rem 0;
    border-top: 1px solid #f1f5f9;
}

.admin-metrika-exchange-check:first-of-type {
    border-top: 0;
}

.admin-metrika-exchange-check__badge {
    width: max-content;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.admin-metrika-exchange-check.is-stale .admin-metrika-exchange-check__badge {
    background: #f1f5f9;
    color: #64748b;
}

.admin-metrika-exchange-check strong,
.admin-metrika-exchange-check small {
    display: block;
}

.admin-metrika-exchange-check strong {
    color: #0f172a;
    font-size: 0.8rem;
    margin-bottom: 0.18rem;
}

.admin-metrika-exchange-check small {
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.38;
}

.admin-metrika-exchange-checks__error {
    margin-top: 0.24rem;
    color: #991b1b !important;
}

@media (max-width: 900px) {
    .admin-metrika-exchange-check {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* Admin role access matrix */
.admin-access-table {
    min-width: 760px;
}

.admin-access-table th:not(:first-child),
.admin-access-table td:not(:first-child) {
    text-align: center;
    width: 150px;
}

.admin-check--center {
    justify-content: center;
    gap: 8px;
}

.admin-check--center span {
    white-space: nowrap;
}

.admin-access-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-access-legend__item {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(248, 250, 252, 0.72);
}

.admin-access-legend__item strong,
.admin-access-legend__item span {
    display: block;
}

.admin-access-legend__item strong {
    font-size: 13px;
    color: #0f172a;
}

.admin-access-legend__item span {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.admin-access-level-select {
    min-width: 154px;
    max-width: 100%;
    font-size: 12px;
    padding: 8px 10px;
}

.admin-access-table--levels th:not(:first-child),
.admin-access-table--levels td:not(:first-child) {
    width: 176px;
}

.admin-readonly-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: 14px;
    background: rgba(255, 251, 235, 0.92);
    color: #92400e;
    font-size: 13px;
    line-height: 1.45;
}

.admin-readonly-disabled {
    opacity: 0.58;
    cursor: not-allowed !important;
}

@media (max-width: 1100px) {
    .admin-access-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-access-legend {
        grid-template-columns: 1fr;
    }
}

/* Stage 3: unified admin detail pages for leads/orders */
.admin-detail-page--lead,
.admin-detail-page--order {
    --admin-detail-main-col: minmax(0, 1fr);
    --admin-detail-side-col: minmax(320px, .45fr);
}

.admin-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: 16px;
    align-items: start;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.admin-detail-header__main,
.admin-detail-header__aside,
.admin-detail-stack,
.admin-meta-list {
    display: grid;
    gap: 10px;
}

.admin-detail-header__aside {
    justify-items: end;
}

.admin-meta-list {
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.admin-meta-list--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.admin-meta-list--inline span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .45fr);
    gap: 18px;
    align-items: start;
}

.admin-detail-page--lead .admin-detail-side,
.admin-detail-page--order .admin-detail-sidebar,
.admin-detail-page--order .admin-detail-sidebar-stack {
    position: static;
    top: auto;
    height: auto;
    min-height: 0;
    align-self: start;
}

.admin-detail-page--lead .admin-detail-hero,
.admin-detail-page--order .admin-detail-hero,
.admin-detail-page--lead .admin-detail-bottom,
.admin-detail-page--order .admin-detail-bottom {
    align-items: start;
}

.admin-detail-page--lead .admin-detail-hero > .admin-card,
.admin-detail-page--lead .admin-detail-hero > .admin-detail-sidebar,
.admin-detail-page--lead .admin-detail-hero > .admin-detail-sidebar-stack,
.admin-detail-page--order .admin-detail-hero > .admin-card,
.admin-detail-page--order .admin-detail-hero > .admin-detail-sidebar,
.admin-detail-page--order .admin-detail-hero > .admin-detail-sidebar-stack {
    min-height: 0;
}

.admin-detail-page--lead .admin-card--detail,
.admin-detail-page--order .admin-card {
    border-color: #e5e7eb;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .045);
}

.admin-card-title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.admin-status-row,
.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-status-row--block {
    align-items: stretch;
}

.admin-action-row--right,
.admin-status-row:not(.admin-status-row--block) {
    justify-content: flex-end;
}

.admin-action-row--spread {
    justify-content: space-between;
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-status-badge--success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.admin-status-badge--warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.admin-status-badge--danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.admin-status-badge--info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.admin-status-badge--muted {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.admin-detail-product--lead-compact {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    align-items: start;
}

.admin-detail-product--lead-compact .admin-detail-gallery__frame img,
.admin-detail-gallery--compact .admin-detail-gallery__frame img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.admin-detail-gallery--compact .admin-detail-gallery__frame {
    border-radius: 18px;
}

.admin-photo-grid {
    display: flex;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.admin-photo-grid--files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    overflow: visible;
}

.admin-photo-thumb {
    min-width: 0;
    overflow: hidden;
}

.admin-photo-thumb--file {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.admin-photo-thumb--file span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-detail-page--lead .admin-detail-kv strong,
.admin-detail-page--order .admin-detail-kv strong,
.admin-detail-page--lead .admin-label-strong,
.admin-detail-page--order .admin-label-strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-detail-page--lead .admin-detail-line-item,
.admin-detail-page--order .admin-detail-line-item {
    min-width: 0;
}

.admin-detail-page--lead .admin-detail-line-item > div,
.admin-detail-page--order .admin-detail-line-item > div {
    min-width: 0;
}

.admin-body .admin-detail-page .admin-button--ghost,
.admin-body .admin-detail-page a.admin-button--ghost,
.admin-body .admin-detail-page button.admin-button--ghost,
.admin-body .admin-detail-page .admin-button--subtle,
.admin-body .admin-detail-page a.admin-button--subtle,
.admin-body .admin-detail-page button.admin-button--subtle {
    color: #0f172a;
}

@media (min-width: 1280px) {
    .admin-detail-page--order .admin-detail-hero {
        grid-template-columns: minmax(0, 1fr) minmax(340px, .5fr);
    }
}

@media (max-width: 1279px) {
    .admin-detail-header,
    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-detail-header__aside {
        justify-items: start;
    }

    .admin-action-row--right,
    .admin-status-row:not(.admin-status-row--block) {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .admin-detail-header {
        padding: 14px;
        border-radius: 18px;
    }

    .admin-detail-product--lead-compact {
        grid-template-columns: 1fr;
    }

    .admin-detail-header .admin-page__title {
        font-size: 1.55rem;
        line-height: 1.15;
    }

    .admin-meta-list--inline,
    .admin-status-row,
    .admin-action-row,
    .admin-action-row--spread {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-detail-header .admin-button,
    .admin-detail-page .admin-action-row .admin-button,
    .admin-detail-page .admin-action-row form,
    .admin-detail-page .admin-action-row form .admin-button {
        width: 100%;
        justify-content: center;
    }

    .admin-status-badge {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

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

/* =========================================================
   Stage 4: production admin PWA shell + responsive polish
   Safe override layer: no routes/forms/business logic touched.
   ========================================================= */
.admin-body {
    --admin-shell-sidebar-width: 16rem;
    --admin-shell-topbar-height: 4rem;
    --admin-shell-content-max: 1640px;
    --admin-mobile-nav-height: 4.25rem;
    overflow-x: hidden;
    background: #f5f7fb;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.admin-body.admin-sidebar-open {
    overflow: hidden;
    touch-action: none;
}

.admin-app,
.admin-shell,
.admin-layout--v2,
.admin-main--v2,
.admin-content--v2,
.admin-content__inner--v2 {
    min-width: 0;
}

.admin-shell {
    min-height: 100dvh;
}

.admin-sidebar--v2,
.admin-drawer {
    width: var(--admin-shell-sidebar-width);
    max-width: calc(100vw - 2rem);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.admin-sidebar__head--v2,
.admin-sidebar__foot--v2 {
    flex: 0 0 auto;
}

.admin-nav-groups--v2 {
    min-height: 0;
    scrollbar-width: thin;
    overscroll-behavior: contain;
}

.admin-brand__wordmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: .75rem;
    border-radius: .75rem;
    background: #0f172a;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.admin-brand__meta {
    display: grid;
    gap: .12rem;
    line-height: 1.15;
}

.admin-brand__meta span {
    color: #6b7280;
    font-size: .75rem;
    font-weight: 600;
}

.admin-nav__link--v2 {
    min-width: 0;
    outline: none;
}

.admin-nav__link--v2:focus-visible,
.admin-mobile-nav__link:focus-visible,
.admin-button:focus-visible,
.admin-icon-button:focus-visible,
.admin-bell:focus-visible,
.admin-user-trigger:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .24);
    outline-offset: 2px;
}

.admin-nav__link--v2.is-active {
    background: #eaf2ff;
    color: #174ea6;
    border-right-color: #2563eb;
}

.admin-nav__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-main--v2 {
    min-height: 100dvh;
}

.admin-topbar--v2 {
    min-height: var(--admin-shell-topbar-height);
    padding-top: env(safe-area-inset-top, 0);
}

.admin-content--v2 {
    min-height: 100dvh;
    padding-top: calc(var(--admin-shell-topbar-height) + env(safe-area-inset-top, 0px));
}

.admin-content__inner--v2 {
    width: 100%;
    max-width: var(--admin-shell-content-max);
    margin: 0 auto;
    padding: clamp(1rem, 1.8vw, 1.75rem);
}

.admin-breadcrumbs {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.admin-breadcrumbs::-webkit-scrollbar {
    display: none;
}

.admin-page,
.admin-card,
.admin-body .card {
    min-width: 0;
}

.admin-page__head,
.admin-page-header,
.admin-card__head {
    min-width: 0;
}

.admin-page__head > *,
.admin-page-header > *,
.admin-card__head > * {
    min-width: 0;
}

.admin-page__title,
.admin-page-title,
.admin-body h1,
.admin-body h2 {
    overflow-wrap: anywhere;
}

.admin-page__lead,
.admin-table__hint,
.admin-note,
.admin-empty {
    overflow-wrap: anywhere;
}

.admin-page__head .admin-actions,
.admin-page-actions,
.admin-card__head .admin-actions {
    gap: .5rem;
}

.admin-card,
.admin-page,
.admin-body .card {
    border-color: #e5e7eb;
}

.admin-toolbar-card,
.admin-filters,
.admin-filter,
.admin-filter-bar {
    min-width: 0;
}

.admin-filter-bar,
.admin-filter,
.admin-filters {
    align-items: end;
}

.admin-field,
.admin-body label[style*="display:grid"] {
    min-width: 0;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]),
.admin-body select,
.admin-body textarea {
    min-height: 2.625rem;
    border-radius: .625rem;
    background: #fff;
    font-size: .95rem;
}

.admin-body textarea {
    min-height: 7rem;
}

.admin-button,
.admin-body button.admin-button,
.admin-body a.admin-button {
    gap: .45rem;
    min-height: 2.625rem;
    padding: 0 .95rem;
    white-space: nowrap;
}

.admin-button--ghost,
.admin-body a.admin-button--ghost,
.admin-body button.admin-button--ghost {
    background: #fff;
    color: #0f172a;
}

.admin-button--ghost:hover,
.admin-button--subtle:hover {
    background: #f8fafc;
    color: #0f172a;
}

.admin-inline-actions,
.admin-actions,
.admin-action-row,
.admin-detail-actions {
    gap: .5rem;
}

.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-table-wrap:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .2);
    outline-offset: 3px;
}

.admin-table {
    max-width: none;
}

.admin-table th,
.admin-table td {
    overflow-wrap: anywhere;
}

.admin-table__cell--action,
.admin-table-actions {
    white-space: nowrap;
}

.admin-table-wrap--scrollable::after {
    content: "";
    display: block;
    height: 1px;
}

.admin-cell-stack,
.admin-chip-row,
.admin-copy--compact,
.admin-break-anywhere {
    min-width: 0;
}

.admin-mobile-nav {
    display: none;
}

.admin-chat-detail-page,
.admin-chats-page,
.admin-statistics,
.admin-detail-page,
.admin-settings-panel {
    min-width: 0;
}

.admin-detail-page--lead,
.admin-detail-page--order {
    overflow: visible;
}

.admin-detail-header,
.admin-detail-grid,
.admin-detail-hero,
.admin-detail-bottom,
.admin-detail-product,
.admin-detail-sidebar,
.admin-detail-sidebar-stack {
    min-width: 0;
}

@media (min-width: 1280px) {
    .admin-content__inner--v2 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 1024px) {
    .admin-sidebar--v2,
    .admin-drawer {
        z-index: 60;
        box-shadow: 18px 0 50px rgba(15, 23, 42, .18);
    }

    .admin-sidebar--v2:not(.is-open),
    .admin-drawer:not(.is-open) {
        pointer-events: none;
    }

    .admin-topbar--v2 {
        z-index: 50;
    }

    .admin-backdrop {
        z-index: 55;
    }
}

@media (max-width: 767px) {
    .admin-body {
        padding-bottom: calc(var(--admin-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    }

    .admin-content__inner--v2 {
        padding: .875rem;
    }

    .admin-content--v2 {
        padding-top: calc(var(--admin-shell-topbar-height) + env(safe-area-inset-top, 0px));
    }

    .admin-topbar--v2 {
        gap: .625rem;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .admin-search--topbar input {
        padding-left: 2.25rem !important;
    }

    .admin-search--topbar input::placeholder {
        color: transparent;
    }

    .admin-page,
    .admin-card,
    .admin-body .card {
        border-radius: 1rem;
    }

    .admin-page__head,
    .admin-page-header,
    .admin-card__head {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-page__head .admin-actions,
    .admin-page-actions,
    .admin-card__head .admin-actions,
    .admin-filter-actions,
    .admin-inline-actions--stack-sm {
        width: 100%;
    }

    .admin-page__head .admin-button,
    .admin-page-actions .admin-button,
    .admin-filter-actions .admin-button,
    .admin-inline-actions--stack-sm .admin-button,
    .admin-inline-actions--stack-sm form,
    .admin-inline-actions--stack-sm form .admin-button {
        width: 100%;
        justify-content: center;
    }

    .admin-filter-bar,
    .admin-filter,
    .admin-filters,
    .admin-form-grid,
    .promo-builder-grid--2,
    .promo-builder-grid--3,
    .promo-builder-grid--4,
    .product-form-row--2,
    .product-form-row--4 {
        grid-template-columns: 1fr !important;
    }

    .admin-table--stage4-card {
        min-width: 0 !important;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .admin-table--stage4-card thead {
        display: none;
    }

    .admin-table--stage4-card,
    .admin-table--stage4-card tbody,
    .admin-table--stage4-card tr,
    .admin-table--stage4-card td {
        display: block;
    }

    .admin-table--stage4-card tbody {
        display: grid;
        gap: .75rem;
        padding: .75rem;
        background: #f8fafc;
    }

    .admin-table--stage4-card tr {
        border: 1px solid #e5e7eb;
        border-radius: 1rem;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    }

    .admin-table--stage4-card td {
        min-height: 0;
        padding: .7rem .8rem;
        border-bottom: 1px solid #eef2f7;
    }

    .admin-table--stage4-card td:last-child {
        border-bottom: 0;
    }

    .admin-table--stage4-card td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .25rem;
        color: #64748b;
        font-size: .68rem;
        font-weight: 800;
        letter-spacing: .06em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .admin-table--stage4-card .admin-table__cell--action,
    .admin-table--stage4-card .admin-table-actions {
        white-space: normal;
    }

    .admin-table--stage4-card .admin-table__cell--action .admin-button,
    .admin-table--stage4-card .admin-table-actions .admin-button,
    .admin-table--stage4-card .admin-table-actions form,
    .admin-table--stage4-card .admin-table-actions form .admin-button {
        width: 100%;
        justify-content: center;
    }

    .admin-table--modern:not(.admin-table--stage4-card) {
        min-width: 960px;
    }

    .admin-mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 48;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(4.25rem, 1fr);
        gap: .25rem;
        height: calc(var(--admin-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        padding: .45rem .55rem calc(.45rem + env(safe-area-inset-bottom, 0px));
        overflow-x: auto;
        border-top: 1px solid rgba(226, 232, 240, .95);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -12px 34px rgba(15, 23, 42, .10);
        backdrop-filter: blur(16px);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .admin-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .admin-mobile-nav__link {
        display: grid;
        justify-items: center;
        align-content: center;
        gap: .18rem;
        min-width: 0;
        border-radius: .9rem;
        color: #64748b;
        font-size: .68rem;
        font-weight: 800;
        line-height: 1.1;
        text-align: center;
    }

    .admin-mobile-nav__link i {
        font-size: 1.2rem;
        line-height: 1;
    }

    .admin-mobile-nav__link span {
        max-width: 4.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-mobile-nav__link.is-active {
        background: #eaf2ff;
        color: #174ea6;
    }
}

@media (max-width: 520px) {
    .admin-topbar__actions--v2 {
        gap: .35rem;
    }

    .admin-user-trigger {
        padding: .35rem;
    }

    .admin-page,
    .admin-card,
    .admin-body .card {
        padding: .875rem;
    }

    .admin-button,
    .admin-body button.admin-button,
    .admin-body a.admin-button {
        white-space: normal;
    }
}

/* =========================================================
   Stage 5.1: mobile admin usability hotfix
   - bottom mobile nav removed in layout; keep defensive CSS
   - responsive table cards reset fixed column widths
   - mobile chat keeps messenger-like viewport
   ========================================================= */
.admin-mobile-nav {
    display: none !important;
}

@media (max-width: 767px) {
    .admin-body {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }

    .admin-content__inner--v2 {
        padding-bottom: calc(.875rem + env(safe-area-inset-bottom, 0px));
    }

    .admin-body .admin-table--stage4-card,
    .admin-body .admin-table--stage4-card tbody,
    .admin-body .admin-table--stage4-card tr,
    .admin-body .admin-table--stage4-card td {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: auto !important;
    }

    .admin-body .admin-table--stage4-card {
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .admin-body .admin-table--stage4-card tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .admin-body .admin-table--stage4-card th,
    .admin-body .admin-table--stage4-card td,
    .admin-body .admin-leads-table--crm.admin-table--stage4-card th,
    .admin-body .admin-leads-table--crm.admin-table--stage4-card td,
    .admin-body .admin-orders-table.admin-table--stage4-card th,
    .admin-body .admin-orders-table.admin-table--stage4-card td {
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .admin-body .admin-table--stage4-card td {
        overflow: visible !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
    }

    .admin-body .admin-table--stage4-card td[data-label]::before {
        margin-bottom: .35rem;
        overflow-wrap: normal;
        word-break: normal;
    }

    .admin-body .admin-table--stage4-card .admin-cell-stack,
    .admin-body .admin-table--stage4-card .admin-chip-row,
    .admin-body .admin-table--stage4-card .admin-copy--compact,
    .admin-body .admin-table--stage4-card .admin-status-form,
    .admin-body .admin-table--stage4-card .admin-table__editor--inline,
    .admin-body .admin-table--stage4-card .admin-table-actions {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .admin-body .admin-table--stage4-card .admin-detail-meta,
    .admin-body .admin-table--stage4-card .admin-truncate-link,
    .admin-body .admin-table--stage4-card .admin-truncate-link a,
    .admin-body .admin-table--stage4-card .admin-copy--compact {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .admin-body .admin-table--stage4-card .admin-chip,
    .admin-body .admin-table--stage4-card .admin-button,
    .admin-body .admin-table--stage4-card select,
    .admin-body .admin-table--stage4-card input {
        max-width: 100%;
    }

    .admin-body .admin-table--stage4-card .admin-table__cell--action {
        padding-top: .85rem;
        background: #fbfdff;
    }

    .admin-body .admin-table--stage4-card .admin-table__cell--action .admin-button,
    .admin-body .admin-table--stage4-card .admin-table-actions .admin-button {
        min-height: 42px;
    }

    .admin-chat-detail-page .admin-chat-main-card {
        box-shadow: none;
    }
}

/* P1.6.1: configurable report recipients */
.admin-report-recipients__list {
    display: grid;
    gap: 12px;
}

.admin-report-recipient-row {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.7fr) auto;
    align-items: end;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: #fff;
}

.admin-report-recipient-row__reports {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-height: 42px;
}

.admin-report-recipient-row__remove {
    align-self: end;
}

@media (max-width: 900px) {
    .admin-report-recipient-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-report-recipient-row__remove {
        width: 100%;
        justify-content: center;
    }
}

/* P0+P1 manager workflow visual polish */
html.admin-modal-open,
body.admin-modal-open {
    overflow: hidden;
}

.admin-detail-page--lead,
.admin-detail-page--order {
    gap: 22px;
}

.admin-detail-page--lead .admin-detail-header,
.admin-detail-page--order .admin-detail-header {
    margin-bottom: 2px;
}

.admin-detail-page--lead .admin-detail-hero,
.admin-detail-page--order .admin-detail-hero {
    gap: 22px;
    align-items: start;
}

.admin-detail-hero--balanced {
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
}

.admin-detail-stack {
    display: grid;
    gap: 22px;
    align-content: start;
    min-width: 0;
}

.admin-detail-stack--side {
    align-self: start;
}

.admin-detail-page--lead .admin-card--detail,
.admin-detail-page--order .admin-card--detail,
.admin-commercial-decision {
    display: grid;
    gap: 16px;
}

.admin-detail-page--lead .admin-card__head,
.admin-detail-page--order .admin-card__head,
.admin-commercial-decision .admin-card__head {
    margin-bottom: 0;
}

.admin-commercial-decision__form {
    display: grid;
    gap: 16px;
}

.admin-commercial-decision .admin-form-grid,
.admin-commercial-decision .admin-action-row,
.admin-detail-page--lead .admin-detail-techlist,
.admin-detail-page--order .admin-detail-techlist,
.admin-detail-page--lead .admin-detail-line-items,
.admin-detail-page--order .admin-detail-line-items {
    gap: 14px;
}

.admin-detail-line-items--compact .admin-detail-line-item {
    padding: 12px 14px;
}

.admin-detail-history-card .admin-detail-line-items {
    max-height: 420px;
    overflow: auto;
    padding-right: 2px;
}

.admin-technical-action-row {
    margin-top: 10px;
}

.admin-technical-modal {
    width: min(1180px, calc(100vw - 32px));
    max-width: min(1180px, calc(100vw - 32px));
    max-height: min(88vh, 920px);
    padding: 0;
    border: 1px solid gray !important;
    border-radius: 25px !important;
    background: #fff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
    overflow: hidden;
}

.admin-technical-modal::backdrop {
    background: rgba(15, 23, 42, .46);
    backdrop-filter: blur(2px);
}

.admin-technical-modal__panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    max-height: min(88vh, 920px);
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 25px;
    background: #fff;
}

.admin-technical-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.admin-technical-modal__subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.45;
}

.admin-technical-modal__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    overflow: auto;
    padding: 20px 24px 24px;
    background: #f8fafc;
}

.admin-technical-section {
    display: grid;
    gap: 14px;
    min-width: 0;
    align-content: start;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
}

.admin-technical-section__head {
    display: grid;
    gap: 4px;
}

.admin-technical-section__title {
    margin: 0;
    color: #0f172a;
    font-size: .98rem;
    font-weight: 850;
    line-height: 1.3;
}

.admin-technical-section__description {
    margin: 0;
    color: #64748b;
    font-size: .8rem;
    line-height: 1.45;
}

.admin-technical-grid {
    display: grid;
    gap: 10px;
}

.admin-technical-row {
    display: grid;
    grid-template-columns: minmax(138px, .34fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

.admin-technical-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.admin-technical-row--wide {
    grid-template-columns: 1fr;
    gap: 6px;
}

.admin-technical-label {
    color: #64748b;
    font-size: .77rem;
    font-weight: 800;
    line-height: 1.35;
}

.admin-technical-value {
    color: #0f172a;
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.5;
    white-space: normal;
}

.admin-technical-value-list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.admin-technical-value-list span {
    display: block;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.admin-technical-empty {
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: .84rem;
}

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

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

@media (max-width: 720px) {
    .admin-technical-modal {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        border-radius: 20px !important;
    }

    .admin-technical-modal__panel {
        border-radius: 20px;
    }

    .admin-technical-modal__head {
        display: grid;
        padding: 18px;
    }

    .admin-technical-modal__body {
        padding: 16px;
    }

    .admin-technical-section {
        padding: 14px;
    }

    .admin-technical-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Admin settings + analytics patch, 2026-06-24 */
.admin-page__head,
.admin-page-header,
.admin-card__head {
    min-width: 0;
    max-width: 100%;
}

.admin-page__head > div,
.admin-page-header > div,
.admin-card__head > div {
    min-width: 0;
    max-width: 100%;
}

.admin-page__title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
}

.admin-page--hero {
    overflow: visible;
}

.admin-segmented-tabs--settings {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-segmented-tabs--settings .admin-segmented-tabs__item {
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-analytics-period {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
    gap: .75rem;
    align-items: end;
    max-width: 620px;
    width: 100%;
}

.admin-page__head--analytics {
    align-items: flex-start;
    gap: 1rem;
}

.admin-analytics-kpi-grid,
.admin-analytics-status-grid,
.admin-analytics-diagnostics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-analytics-kpi,
.admin-analytics-status-card,
.admin-analytics-diagnostic-card {
    min-width: 0;
}

.admin-analytics-status-card,
.admin-analytics-diagnostic-card {
    display: grid;
    gap: .4rem;
    padding: 1.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
}

.admin-analytics-status-card__label,
.admin-analytics-diagnostic-card__label {
    margin: 0;
    font-size: .82rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.admin-analytics-status-card__value,
.admin-analytics-diagnostic-card__value {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
}

.admin-table--analytics {
    min-width: 760px;
}

.admin-analytics .admin-table-wrap,
.admin-analytics .admin-table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

.admin-empty-state {
    display: grid;
    gap: .65rem;
    justify-items: start;
    padding: 1rem;
}

.admin-empty-state__icon {
    display: inline-grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: .9rem;
    background: #eef2ff;
    color: #2563eb;
    font-size: 1.25rem;
}

.admin-empty-state h3,
.admin-empty-state p {
    margin: 0;
}

.admin-empty-state p {
    color: #64748b;
    max-width: 64rem;
}

@media (max-width: 900px) {
    .admin-page__head--analytics {
        display: grid;
    }

    .admin-analytics-period {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .admin-segmented-tabs--settings .admin-segmented-tabs__item {
        white-space: normal;
        min-height: 2.625rem;
    }

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

    .admin-analytics-period .admin-filter-actions,
    .admin-analytics-period .admin-button {
        width: 100%;
    }

    .admin-analytics-kpi-grid,
    .admin-analytics-status-grid,
    .admin-analytics-diagnostics {
        grid-template-columns: 1fr;
    }
}

.admin-settings-fieldset {
    display: contents;
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.admin-settings-fieldset[disabled] {
    opacity: .78;
}

/* Admin analytics visual polish, 2026-06-24 */
.admin-analytics {
    scroll-behavior: smooth;
}

.admin-analytics-hero {
    padding-bottom: 1.25rem;
}

.admin-page__eyebrow {
    margin-bottom: .5rem;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
}

.admin-page__head--analytics {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: start;
    gap: 1.25rem;
}

.admin-analytics-period.admin-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: .75rem;
    align-items: end;
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .06);
}

.admin-analytics-period__meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .25rem;
    font-size: .8125rem;
    color: #64748b;
}

.admin-analytics-period__meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.admin-segmented-tabs--analytics {
    margin-top: 1.25rem;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.admin-segmented-tabs--analytics .admin-segmented-tabs__item {
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-analytics-overview,
.admin-analytics-card {
    scroll-margin-top: 1rem;
}

.admin-analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.admin-analytics-kpi {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    align-items: flex-start;
    border-radius: 1.1rem;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .055);
}

.admin-analytics-kpi::after {
    content: '';
    position: absolute;
    inset: auto -28px -42px auto;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
}

.admin-analytics-kpi__icon {
    position: relative;
    z-index: 1;
    background: #eff6ff;
    color: #2563eb;
}

.admin-analytics-kpi--green .admin-analytics-kpi__icon,
.admin-analytics-kpi--green::after {
    background: #ecfdf5;
    color: #047857;
}

.admin-analytics-kpi--purple .admin-analytics-kpi__icon,
.admin-analytics-kpi--purple::after {
    background: #f5f3ff;
    color: #7c3aed;
}

.admin-analytics-kpi--orange .admin-analytics-kpi__icon,
.admin-analytics-kpi--orange::after {
    background: #fff7ed;
    color: #ea580c;
}

.admin-analytics-kpi--red .admin-analytics-kpi__icon,
.admin-analytics-kpi--red::after {
    background: #fef2f2;
    color: #dc2626;
}

.admin-analytics-kpi--slate .admin-analytics-kpi__icon,
.admin-analytics-kpi--slate::after {
    background: #f1f5f9;
    color: #475569;
}

.admin-analytics-intelligence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 1rem;
}

.admin-analytics-panel {
    border-radius: 1.15rem;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .045);
}

.admin-analytics-panel--main {
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
}

.admin-analytics-insight-list {
    display: grid;
    gap: .85rem;
}

.admin-analytics-insight {
    display: grid;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .88);
}

.admin-analytics-insight__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-analytics-insight__head div {
    display: grid;
    gap: .25rem;
    min-width: 0;
}

.admin-analytics-insight__head strong {
    color: #0f172a;
}

.admin-analytics-insight__head span {
    color: #64748b;
    font-size: .875rem;
}

.admin-analytics-insight__head b {
    font-size: 1.35rem;
    line-height: 1;
    color: #0f172a;
}

.admin-analytics-progress {
    height: .45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.admin-analytics-progress span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: #2563eb;
}

.admin-analytics-insight--success .admin-analytics-progress span {
    background: #16a34a;
}

.admin-analytics-insight--warning .admin-analytics-progress span {
    background: #f59e0b;
}

.admin-analytics-insight--danger .admin-analytics-progress span {
    background: #ef4444;
}

.admin-analytics-source-leader {
    display: grid;
    gap: .65rem;
    align-content: start;
}

.admin-analytics-source-leader__icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.35rem;
}

.admin-analytics-source-leader strong {
    font-size: 1.4rem;
    color: #0f172a;
}

.admin-analytics-source-leader p {
    margin: 0;
    color: #64748b;
}

.admin-analytics-source-leader__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-top: .5rem;
}

.admin-analytics-source-leader__stats span {
    display: grid;
    gap: .15rem;
    padding: .75rem;
    border: 1px solid #e5e7eb;
    border-radius: .85rem;
    background: #f8fafc;
    color: #64748b;
    font-size: .78rem;
}

.admin-analytics-source-leader__stats b {
    color: #0f172a;
    font-size: 1.1rem;
}

.admin-analytics-card {
    border-radius: 1.15rem;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .045);
}

.admin-analytics .admin-card__head--tight {
    gap: 1rem;
}

.admin-chip--neutral,
.admin-chip--muted {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.admin-analytics-campaign {
    display: inline-block;
    max-width: 28rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

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

.admin-analytics-status-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .9rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f8fafc;
}

.admin-analytics-status-card__icon {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: .9rem;
    background: #fff;
    color: #2563eb;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.admin-analytics-status-card strong {
    display: block;
    color: #0f172a;
}

.admin-analytics-status-card p {
    margin: .25rem 0 0;
    color: #64748b;
    font-size: .875rem;
}

.admin-analytics-status-card dl {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin: .25rem 0 0;
}

.admin-analytics-status-card dl div {
    display: grid;
    gap: .2rem;
    padding: .65rem;
    border-radius: .75rem;
    background: #fff;
}

.admin-analytics-status-card dt,
.admin-analytics-status-card dd {
    margin: 0;
}

.admin-analytics-status-card dt {
    color: #64748b;
    font-size: .75rem;
}

.admin-analytics-status-card dd {
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.admin-analytics-diagnostics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .85rem;
}

.admin-analytics-diagnostic-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .95rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
}

.admin-analytics-diagnostic-card__icon {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    background: #f1f5f9;
    color: #475569;
}

.admin-analytics-diagnostic-card strong,
.admin-analytics-diagnostic-card span {
    display: block;
}

.admin-analytics-diagnostic-card strong {
    color: #0f172a;
    font-size: .9rem;
}

.admin-analytics-diagnostic-card span {
    margin-top: .2rem;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.25;
}

.admin-analytics-diagnostic-card b {
    color: #0f172a;
    font-size: 1.1rem;
}

.admin-analytics-diagnostic-card.has-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.admin-analytics-diagnostic-card.has-warning .admin-analytics-diagnostic-card__icon {
    background: #fef3c7;
    color: #b45309;
}

.admin-empty-state--compact {
    padding: 0;
}

.admin-empty-state--direct {
    min-height: 180px;
    align-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.admin-table--compact th,
.admin-table--compact td {
    padding-top: .65rem;
    padding-bottom: .65rem;
}

.admin-analytics .admin-table--modern tbody tr:hover {
    background: #f8fafc;
}

@media (max-width: 1500px) {
    .admin-analytics-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-analytics-diagnostics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .admin-page__head--analytics,
    .admin-analytics-intelligence-grid {
        grid-template-columns: 1fr;
    }

    .admin-analytics-period.admin-card {
        max-width: none;
    }

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

@media (max-width: 720px) {
    .admin-analytics-period.admin-card {
        grid-template-columns: 1fr;
        padding: .85rem;
    }

    .admin-analytics-period .admin-filter-actions,
    .admin-analytics-period .admin-button {
        width: 100%;
    }

    .admin-analytics-kpi-grid,
    .admin-analytics-diagnostics,
    .admin-analytics-source-leader__stats,
    .admin-analytics-status-card dl {
        grid-template-columns: 1fr;
    }

    .admin-analytics-insight__head {
        display: grid;
    }

    .admin-analytics-diagnostic-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-analytics-diagnostic-card b {
        grid-column: 1 / -1;
        padding-left: 3.1rem;
    }
}

/* Admin analytics dashboard tabs + drill-down patch, 2026-06-24 */
.admin-analytics {
    scroll-behavior: auto;
}

.admin-analytics-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
    max-width: 100%;
}

.admin-analytics-tab {
    appearance: none;
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    padding: .58rem .95rem;
    background: rgba(255, 255, 255, .92);
    color: #475569;
    font: inherit;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.admin-analytics-tab:hover,
.admin-analytics-tab:focus-visible {
    border-color: #93c5fd;
    color: #1d4ed8;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.admin-analytics-tab.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
}

.admin-analytics-panel-tab[hidden] {
    display: none !important;
}

.admin-analytics-panel-tab {
    min-width: 0;
}

.admin-chip--button,
.admin-help-dot {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.admin-chip--button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.admin-chip--button:hover,
.admin-chip--button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .16);
}

.admin-help-dot {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    margin-left: .25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #2563eb;
    vertical-align: middle;
}

.admin-help-dot:hover,
.admin-help-dot:focus-visible {
    outline: 0;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.admin-analytics-nested {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
}

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

.admin-analytics-url {
    display: inline-block;
    max-width: min(42vw, 34rem);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.admin-analytics-log-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.admin-analytics-log-filter .admin-field {
    min-width: min(100%, 20rem);
}

.admin-analytics-diagnostics--cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-analytics-diagnostic-card {
    align-items: start;
}

.admin-analytics-diagnostic-card small {
    display: block;
    margin-top: .4rem;
    color: #64748b;
    font-size: .76rem;
    line-height: 1.35;
}

.admin-analytics-diagnostic-card .admin-button {
    grid-column: 2 / -1;
    justify-self: start;
}

.admin-analytics-diagnostic-card.is-clean {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.admin-analytics-diagnostic-card.is-clean .admin-analytics-diagnostic-card__icon {
    background: #dcfce7;
    color: #15803d;
}

.admin-analytics-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .48);
}

.admin-analytics-modal[hidden] {
    display: none !important;
}

.admin-analytics-modal__box {
    position: relative;
    width: min(100%, 34rem);
    max-height: min(82vh, 42rem);
    overflow: auto;
    border-radius: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

.admin-analytics-modal__box h3 {
    margin: 0 2.25rem .75rem 0;
    color: #0f172a;
    font-size: 1.1rem;
}

.admin-analytics-modal__box p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
    white-space: pre-line;
}

.admin-analytics-modal__close {
    position: absolute;
    top: .8rem;
    right: .8rem;
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
}

.admin-analytics-modal__close:hover,
.admin-analytics-modal__close:focus-visible {
    outline: 0;
    background: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, .16);
}

.admin-heading--sm {
    font-size: 1.02rem;
}

@media (max-width: 900px) {
    .admin-analytics-two-columns,
    .admin-analytics-diagnostics--cards {
        grid-template-columns: 1fr;
    }

    .admin-analytics-url {
        max-width: 72vw;
    }
}

@media (max-width: 620px) {
    .admin-analytics-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-analytics-tab {
        width: 100%;
        padding-inline: .65rem;
        white-space: normal;
        text-align: center;
    }

    .admin-analytics-log-filter,
    .admin-analytics-log-filter .admin-field {
        width: 100%;
    }

    .admin-analytics-diagnostic-card .admin-button,
    .admin-analytics-diagnostic-card b {
        grid-column: 1 / -1;
        justify-self: stretch;
    }
}

.admin-analytics-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    justify-content: flex-end;
}

.admin-analytics-head-actions .admin-inline-form {
    margin: 0;
}

.admin-analytics-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
    margin-top: .85rem;
}

.admin-analytics-mini-grid span {
    min-width: 0;
    border-radius: .85rem;
    padding: .65rem .75rem;
    background: rgba(255, 255, 255, .72);
    color: #475569;
    font-size: .86rem;
}

.admin-empty-state--behavior {
    align-items: flex-start;
    text-align: left;
}

[data-analytics-active-filter][hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .admin-analytics-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-analytics-head-actions,
    .admin-analytics-head-actions .admin-inline-form,
    .admin-analytics-head-actions .admin-button {
        width: 100%;
    }

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

/* Admin analytics v4: Direct strategy labels + behavior dashboard layout, 2026-06-24 */
.admin-analytics-behavior-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-analytics-status-card--compact {
    min-height: 0;
}

.admin-analytics-status-card--compact p {
    word-break: normal;
}

.admin-analytics-behavior-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 1rem;
    align-items: start;
}

.admin-analytics-behavior-panel {
    min-width: 0;
}

.admin-analytics-behavior-panel .admin-heading--sm {
    margin-bottom: .55rem;
}

.admin-table-wrap--behavior {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
}

.admin-table-wrap--behavior .admin-table {
    margin: 0;
    border: 0;
}

.admin-table--behavior-pages,
.admin-table--behavior-actions,
.admin-table--behavior-flow,
.admin-table--behavior-paths {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.admin-table--behavior-pages {
    min-width: 740px;
}

.admin-table--behavior-actions {
    min-width: 640px;
}

.admin-table--behavior-flow {
    min-width: 900px;
}

.admin-table--behavior-paths {
    min-width: 820px;
}

.admin-table--behavior-pages th,
.admin-table--behavior-pages td,
.admin-table--behavior-actions th,
.admin-table--behavior-actions td,
.admin-table--behavior-flow th,
.admin-table--behavior-flow td,
.admin-table--behavior-paths th,
.admin-table--behavior-paths td {
    white-space: nowrap;
    word-break: normal;
}

.admin-table--behavior-pages th:first-child,
.admin-table--behavior-pages td:first-child {
    width: 44%;
    min-width: 320px;
}

.admin-table--behavior-actions th:first-child,
.admin-table--behavior-actions td:first-child {
    min-width: 170px;
}

.admin-table--behavior-pages th:not(:first-child),
.admin-table--behavior-pages td:not(:first-child),
.admin-table--behavior-actions th:nth-last-child(-n+2),
.admin-table--behavior-actions td:nth-last-child(-n+2),
.admin-table--behavior-flow th:nth-child(n+3),
.admin-table--behavior-flow td:nth-child(n+3),
.admin-table--behavior-paths th:nth-child(n+3),
.admin-table--behavior-paths td:nth-child(n+3) {
    text-align: right;
}

.admin-analytics-url--wide {
    max-width: min(50vw, 40rem);
}

.admin-analytics-code {
    display: inline-block;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .88em;
}

@media (max-width: 1280px) {
    .admin-analytics-behavior-layout,
    .admin-analytics-behavior-status {
        grid-template-columns: 1fr;
    }

    .admin-analytics-url--wide {
        max-width: 72vw;
    }
}

@media (max-width: 620px) {
    .admin-table--behavior-pages,
    .admin-table--behavior-actions,
    .admin-table--behavior-flow,
    .admin-table--behavior-paths {
        min-width: 680px;
    }

    .admin-table--behavior-pages th:first-child,
    .admin-table--behavior-pages td:first-child {
        min-width: 260px;
    }
}

/* Admin analytics v5: behavior insights, drill-down and issue states, 2026-06-24 */
.admin-copy--compact {
    margin-top: .25rem;
    font-size: .88rem;
    line-height: 1.45;
}

.admin-analytics-subhead {
    margin-bottom: .75rem;
}

.admin-analytics-behavior-insights {
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    padding: 1rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.admin-analytics-behavior-issue-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.admin-analytics-behavior-issue {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: .95rem;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}

.admin-analytics-behavior-issue--warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.admin-analytics-behavior-issue--critical {
    border-color: #fecaca;
    background: #fef2f2;
}

.admin-analytics-behavior-issue__head {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    justify-content: space-between;
}

.admin-analytics-behavior-issue__head strong {
    min-width: 0;
    color: #0f172a;
    font-size: .98rem;
    line-height: 1.25;
}

.admin-analytics-behavior-issue__head span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: .2rem .5rem;
    background: rgba(15, 23, 42, .06);
    color: #334155;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-analytics-behavior-issue p,
.admin-analytics-behavior-issue small,
.admin-analytics-behavior-issue__action {
    display: block;
    margin-top: .55rem;
    color: #475569;
    line-height: 1.45;
}

.admin-analytics-behavior-issue__action {
    border-top: 1px solid rgba(148, 163, 184, .22);
    padding-top: .65rem;
    font-size: .86rem;
}

.admin-analytics-clickable-row {
    cursor: pointer;
}

.admin-analytics-clickable-row:hover td,
.admin-analytics-clickable-row:focus-visible td {
    background: #f8fafc;
}

.admin-analytics-clickable-row:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: -3px;
}

.admin-table--behavior-pages td small,
.admin-table--behavior-actions td small {
    display: block;
    margin-top: .25rem;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.3;
    white-space: normal;
}

.admin-table--behavior-actions td:nth-child(2),
.admin-table--behavior-actions td:nth-child(3) {
    min-width: 180px;
    max-width: 280px;
    white-space: normal;
}

.admin-analytics-modal--wide {
    place-items: start center;
    overflow: auto;
}

.admin-analytics-modal--wide .admin-analytics-modal__box,
.admin-analytics-page-modal__box {
    width: min(100%, 72rem);
    max-height: none;
    margin-block: 2rem;
    overflow: visible;
}

.admin-analytics-page-modal__head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    padding-right: 2.25rem;
}

.admin-analytics-page-modal__head p {
    margin-top: .2rem;
    color: #64748b;
    font-size: .9rem;
    word-break: break-word;
}

.admin-analytics-page-modal__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.admin-analytics-page-modal__grid article {
    border: 1px solid #e2e8f0;
    border-radius: .95rem;
    padding: .75rem;
    background: #f8fafc;
}

.admin-analytics-page-modal__grid span {
    display: block;
    color: #64748b;
    font-size: .78rem;
}

.admin-analytics-page-modal__grid strong {
    display: block;
    margin-top: .22rem;
    color: #0f172a;
    font-size: 1rem;
}

.admin-analytics-page-modal__section,
.admin-analytics-page-modal__columns > section {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

.admin-analytics-page-modal__section h4,
.admin-analytics-page-modal__columns h4,
.admin-analytics-page-modal__columns h5 {
    margin: 0 0 .6rem;
    color: #0f172a;
}

.admin-analytics-page-modal__section p {
    color: #475569;
    white-space: normal;
}

.admin-analytics-page-modal__section ul {
    margin: .65rem 0 0 1.15rem;
    color: #334155;
    line-height: 1.5;
}

.admin-analytics-page-modal__columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.admin-analytics-page-modal__columns .admin-table-wrap--behavior,
.admin-analytics-page-modal__section .admin-table-wrap--behavior {
    margin-top: .5rem;
}

.admin-analytics-page-modal__columns .admin-table,
.admin-analytics-page-modal__section .admin-table {
    min-width: 420px;
}

@media (max-width: 1100px) {
    .admin-analytics-behavior-issue-grid,
    .admin-analytics-page-modal__columns {
        grid-template-columns: 1fr;
    }

    .admin-analytics-page-modal__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-analytics-behavior-issue-grid,
    .admin-analytics-page-modal__grid {
        grid-template-columns: 1fr;
    }

    .admin-analytics-modal--wide .admin-analytics-modal__box,
    .admin-analytics-page-modal__box {
        margin-block: .75rem;
        padding: 1rem;
    }

    .admin-analytics-page-modal__head {
        display: block;
        padding-right: 2.25rem;
    }
}

/* Analytics v6: behavior playbooks and richer first-party UX diagnostics */
.admin-analytics-behavior-playbook {
    margin: .75rem 0 0;
    padding-left: 1.15rem;
    color: #334155;
    font-size: .84rem;
    line-height: 1.45;
}
.admin-analytics-behavior-playbook li + li { margin-top: .35rem; }

/* Analytics v8: behavior full-width horizontal subtabs, 2026-06-25 */
.admin-analytics-behavior-tabs {
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    padding: 1rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.admin-analytics-behavior-tabs__head {
    display: block;
    margin-bottom: .85rem;
}

.admin-analytics-subtabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: flex-start;
    border-radius: 999px;
    padding: .35rem;
    background: #f1f5f9;
}

.admin-analytics-subtabs--behavior {
    display: flex;
    width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: thin;
}

.admin-analytics-subtab {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .68rem 1rem;
    background: transparent;
    color: #334155;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-analytics-subtab:hover,
.admin-analytics-subtab:focus-visible {
    background: #fff;
    color: #0f172a;
    outline: none;
}

.admin-analytics-subtab.is-active {
    border-color: rgba(37, 99, 235, .22);
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .18);
}

.admin-analytics-behavior-tabs .admin-analytics-behavior-panel {
    width: 100%;
    min-width: 0;
}

.admin-analytics-behavior-tabs .admin-analytics-behavior-panel[hidden] {
    display: none !important;
}

.admin-analytics-behavior-tabs .admin-table-wrap--behavior {
    width: 100%;
    margin-top: .75rem;
    overflow-x: auto;
}

.admin-analytics-behavior-tabs .admin-table--behavior-pages,
.admin-analytics-behavior-tabs .admin-table--behavior-actions,
.admin-analytics-behavior-tabs .admin-table--behavior-flow,
.admin-analytics-behavior-tabs .admin-table--behavior-paths {
    width: 100%;
    min-width: 1120px;
    table-layout: fixed;
}

.admin-analytics-behavior-tabs .admin-table--behavior-pages th:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:first-child {
    width: 46%;
    min-width: 420px;
}

.admin-analytics-behavior-tabs .admin-table--behavior-pages th:nth-child(2),
.admin-analytics-behavior-tabs .admin-table--behavior-pages th:nth-child(3),
.admin-analytics-behavior-tabs .admin-table--behavior-pages th:nth-child(4),
.admin-analytics-behavior-tabs .admin-table--behavior-pages th:nth-child(5),
.admin-analytics-behavior-tabs .admin-table--behavior-pages th:nth-child(6),
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(2),
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(3),
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(4),
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(5),
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(6) {
    text-align: center;
}

.admin-analytics-behavior-tabs .admin-table--behavior-actions th:nth-child(1),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(1) { width: 17%; }
.admin-analytics-behavior-tabs .admin-table--behavior-actions th:nth-child(2),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(2) { width: 22%; }
.admin-analytics-behavior-tabs .admin-table--behavior-actions th:nth-child(3),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(3) { width: 26%; }
.admin-analytics-behavior-tabs .admin-table--behavior-actions th:nth-child(4),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(4),
.admin-analytics-behavior-tabs .admin-table--behavior-actions th:nth-child(5),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(5) { width: 10%; text-align: center; }
.admin-analytics-behavior-tabs .admin-table--behavior-actions th:nth-child(6),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(6) { width: 15%; }

.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(2),
.admin-analytics-behavior-tabs .admin-table--behavior-actions td:nth-child(3) {
    max-width: 420px;
}

.admin-analytics-behavior-tabs .admin-table--behavior-flow th,
.admin-analytics-behavior-tabs .admin-table--behavior-paths th,
.admin-analytics-behavior-tabs .admin-table--behavior-flow td,
.admin-analytics-behavior-tabs .admin-table--behavior-paths td {
    text-align: center;
}

.admin-analytics-behavior-tabs .admin-table--behavior-flow th:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-paths th:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-paths th:nth-child(2),
.admin-analytics-behavior-tabs .admin-table--behavior-flow td:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-paths td:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-paths td:nth-child(2) {
    text-align: left;
}

@media (max-width: 900px) {
    .admin-analytics-subtabs--behavior {
        display: flex;
        width: 100%;
        border-radius: 1rem;
        padding-bottom: .4rem;
    }

    .admin-analytics-subtab {
        flex: 0 0 auto;
        justify-content: center;
        text-align: center;
    }

    .admin-analytics-behavior-tabs .admin-table--behavior-pages,
    .admin-analytics-behavior-tabs .admin-table--behavior-actions,
    .admin-analytics-behavior-tabs .admin-table--behavior-flow,
    .admin-analytics-behavior-tabs .admin-table--behavior-paths {
        min-width: 980px;
    }
}


/* Analytics v9: behavior quick filters and table accents, 2026-06-25 */
.admin-analytics-behavior-panel__head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.admin-analytics-quickfilters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.admin-analytics-quickfilter {
    appearance: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    line-height: 1;
    padding: .6rem .9rem;
    cursor: pointer;
    transition: all .18s ease;
}

.admin-analytics-quickfilter:hover,
.admin-analytics-quickfilter:focus-visible {
    border-color: #93c5fd;
    color: #0f172a;
    outline: none;
}

.admin-analytics-quickfilter.is-active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .12);
}

.admin-table--behavior-pages td small .admin-chip,
.admin-table--behavior-paths td small .admin-chip {
    margin-right: .35rem;
}

.admin-table--behavior-flow td:nth-child(3) .admin-chip {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .admin-analytics-behavior-panel__head {
        display: block;
    }

    .admin-analytics-quickfilters {
        justify-content: flex-start;
        margin-top: .75rem;
    }
}

/* Analytics v10: behavior table containment and drill-down rows, 2026-06-25 */
.admin-analytics-behavior-tabs .admin-table--behavior-pages {
    min-width: 1240px;
}

.admin-analytics-behavior-tabs .admin-table--behavior-pages th:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:first-child {
    width: 38%;
    min-width: 360px;
}

.admin-analytics-behavior-tabs .admin-table--behavior-pages th:nth-child(6),
.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(6) {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    overflow: hidden;
}

.admin-analytics-behavior-tabs .admin-table--behavior-pages td:nth-child(6) .admin-chip {
    display: inline-flex;
    max-width: 238px;
    white-space: normal;
    line-height: 1.25;
    text-align: left;
    overflow-wrap: anywhere;
}

.admin-analytics-behavior-tabs .admin-table--behavior-paths {
    min-width: 1280px;
    table-layout: fixed;
}

.admin-analytics-behavior-tabs .admin-table--behavior-paths th:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-paths td:first-child,
.admin-analytics-behavior-tabs .admin-table--behavior-paths th:nth-child(2),
.admin-analytics-behavior-tabs .admin-table--behavior-paths td:nth-child(2) {
    width: 34%;
    min-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-analytics-behavior-tabs .admin-table--behavior-paths td small {
    display: block;
    margin-top: .35rem;
    line-height: 1.35;
    white-space: normal;
}

.admin-analytics-behavior-tabs .admin-table--behavior-paths td small .admin-chip {
    display: inline-flex;
    vertical-align: middle;
}

.admin-analytics-behavior-tabs .admin-table--behavior-actions tr[data-behavior-action-row],
.admin-analytics-behavior-tabs .admin-table--behavior-flow tr[data-behavior-source-row] {
    cursor: pointer;
}

.admin-analytics-behavior-tabs .admin-table--behavior-actions tr[data-behavior-action-row]:hover,
.admin-analytics-behavior-tabs .admin-table--behavior-flow tr[data-behavior-source-row]:hover {
    background: #f8fafc;
}

.admin-analytics-page-modal__section [data-detail-tertiary] .admin-table,
.admin-analytics-page-modal__columns [data-detail-primary] .admin-table,
.admin-analytics-page-modal__columns [data-detail-secondary] .admin-table {
    min-width: 560px;
}

/* SEO settings patch */
.admin-code-preview {
    display: block;
    width: 100%;
    max-height: 360px;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #0f172a;
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .82rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.admin-settings-panel[data-settings-panel="seo"] .admin-card--nested {
    margin-bottom: .85rem;
}

.admin-settings-panel[data-settings-panel="seo"] .admin-table td {
    overflow-wrap: anywhere;
}

/* Fast CRO/Trust v0.5.1 — visual rollback/CTA compaction */
.product-page .product-page__cta-card #add-to-cart-btn:not(:disabled) {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    border: 1px solid rgba(37, 99, 235, 0.24) !important;
    box-shadow: none !important;
}

.product-page .product-page__cta-card #add-to-cart-btn:not(:disabled):hover {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

.product-page .product-page__cta-card #buy-now-btn {
    background: #ffffff !important;
    color: #b91c1c !important;
    border: 1px solid rgba(220, 38, 38, 0.22) !important;
    box-shadow: none !important;
}

.product-page .product-page__cta-card #buy-now-btn:hover {
    background: #fef2f2 !important;
    border-color: rgba(220, 38, 38, 0.42) !important;
}


@media (max-width: 767px) {
    .storefront-hero-bg {
        min-height: auto !important;
    }
}

/* Fast CRO/trust v0.5.2 — compact home hero layout */
.home-hero {
    min-height: 0 !important;
    overflow: hidden;
}

.home-hero .bg-white\/86,
.home-hero > .absolute {
    pointer-events: none;
}

.home-hero__title {
    line-height: 1.12;
}

.home-hero__subtitle {
    line-height: 1.55;
}

.home-catalog-shortcuts {
    position: relative;
    z-index: 1;
}

.home-category-card {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-category-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {
    .home-hero {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .home-hero__title {
        font-size: 2rem !important;
        letter-spacing: -0.02em;
    }

    .home-hero__subtitle {
        font-size: 1rem !important;
    }

    .home-hero__chips span:nth-child(2) {
        display: none;
    }

    .home-catalog-shortcuts {
        padding-top: 1.5rem !important;
        padding-bottom: 1.75rem !important;
    }

    .home-category-card {
        min-height: 88px;
        padding: 0.875rem !important;
    }

    .home-category-card__desc {
        display: none;
    }
}

/* Trust/CRO patch: public trust blocks and safe lightbox */
.trust-section { position: relative; }
.trust-marketplace-logo { display:inline-flex; min-width:44px; height:32px; align-items:center; justify-content:center; border-radius:10px; background:#e5e7eb; color:#111827; font-size:11px; font-weight:900; letter-spacing:.02em; padding:0 8px; }
.trust-marketplace-logo--avito { background:linear-gradient(135deg,#00aaff 0%,#97cf26 48%,#ff6163 100%); color:#fff; text-shadow:0 1px 1px rgba(0,0,0,.2); }
.trust-marketplace-logo--ozon { background:#005bff; color:#fff; }
.trust-marketplace-logo--yandex { background:#fc3f1d; color:#fff; }
.trust-lightbox-modal { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:24px; }
.trust-lightbox-modal.hidden { display:none; }
.trust-lightbox-modal__backdrop { position:absolute; inset:0; background:rgba(15,23,42,.84); }
.trust-lightbox-modal__dialog { position:relative; max-width:min(1180px,94vw); max-height:90vh; display:flex; align-items:center; justify-content:center; }
.trust-lightbox-modal__img { display:block; max-width:94vw; max-height:86vh; object-fit:contain; border-radius:20px; background:#fff; box-shadow:0 24px 80px rgba(0,0,0,.35); }
.trust-lightbox-modal__close { position:absolute; top:-16px; right:-16px; width:44px; height:44px; border-radius:999px; border:0; background:#fff; color:#111827; font-size:30px; line-height:1; cursor:pointer; box-shadow:0 10px 30px rgba(0,0,0,.25); }
.admin-check-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px 14px; padding:10px 0; }
.admin-check-grid label { display:flex; align-items:center; gap:8px; font-size:13px; color:#334155; }

/* Trust CRO hotfix 2026-07-07: compact in-cart controls on product card */
.product-page .product-page__cta-card .product-page__in-cart-row {
    gap: 0.75rem;
}

.product-page .product-page__cta-card .product-page__in-cart-message {
    flex: 1 1 auto;
}

.product-page .product-page__cta-card .product-page__cart-qty-control {
    width: 8.25rem;
    min-width: 8.25rem;
    margin-left: auto;
    margin-right: 0;
    border-radius: 0.875rem;
}

.product-page .product-page__cta-card .product-page__cart-qty-control #cart-qty-decrease,
.product-page .product-page__cta-card .product-page__cart-qty-control #cart-qty-increase {
    width: 2.625rem !important;
    height: 2.625rem !important;
    font-size: 1rem;
    line-height: 1;
}

.product-page .product-page__cta-card .product-page__cart-qty-control #cart-qty-input {
    width: 3rem !important;
    height: 2.625rem !important;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: 0.95rem;
}

.product-page .product-page__cta-card #product-go-to-cart,
.product-page .product-page__cta-card #product-in-cart-panel a[href="/checkout"] {
    min-height: 3rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    line-height: 1.25rem !important;
}

@media (max-width: 1023px) {
    .product-page .product-page__cta-card .product-page__cart-qty-control {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 420px) {
    .product-page .product-page__cta-card .product-page__cart-qty-control {
        width: 7.875rem;
        min-width: 7.875rem;
    }

    .product-page .product-page__cta-card .product-page__cart-qty-control #cart-qty-decrease,
    .product-page .product-page__cta-card .product-page__cart-qty-control #cart-qty-increase {
        width: 2.5rem !important;
    }

    .product-page .product-page__cta-card .product-page__cart-qty-control #cart-qty-input {
        width: 2.875rem !important;
    }
}

/* Trust CRO hotfix 2026-07-07 #2: compact product CTA and product reviews tab */
.product-page .product-page__cta-card .product-page__primary-trust-cta {
    min-height: 3rem;
    line-height: 1.25rem;
}

.product-page .product-page__cta-card .product-page__cta-microcopy {
    font-size: 0.875rem;
    line-height: 1.55;
}

.product-page .product-page__prepay-note {
    font-size: 0.875rem;
    line-height: 1.55;
}

.product-page .product-review-tabs .product-review-tab {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.product-page .product-review-external-grid .trust-marketplace-logo {
    min-width: 40px;
    height: 30px;
    font-size: 10px;
}

@media (max-width: 420px) {
    .product-page .product-page__cta-card .product-page__primary-trust-cta {
        padding-left: 0.875rem !important;
        padding-right: 0.875rem !important;
        font-size: 0.98rem !important;
    }

    .product-page .product-page__cta-card .product-page__cta-microcopy,
    .product-page .product-page__prepay-note {
        font-size: 0.82rem;
    }
}

/* Trust CRO hotfix 2026-07-07 #3: marketplace SVG logos and product shipping estimator modal */
.marketplace-logo {
    display: inline-flex;
    width: 112px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.marketplace-logo svg {
    display: block;
    width: 100%;
    height: 100%;
}

.marketplace-logo--ozon { border-color: rgba(0, 91, 255, .18); }
.marketplace-logo--avito { border-color: rgba(0, 170, 255, .18); }
.marketplace-logo--yandex_maps { border-color: rgba(252, 63, 29, .18); }

.marketplace-logo--compact {
    width: 34px;
    height: 24px;
    border-radius: 999px;
    background: #ffffff;
}

.marketplace-logo--compact svg {
    width: 92px;
    max-width: none;
    transform: translateX(1px);
}

.marketplace-logo--compact.marketplace-logo--ozon svg {
    width: 78px;
}

.marketplace-logo--compact.marketplace-logo--yandex_maps svg {
    width: 112px;
    transform: translateX(0);
}

.marketplace-logo__fallback {
    padding: 0 .6rem;
    font-size: 11px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.product-page #product-shipping-city-dropdown {
    overscroll-behavior: contain;
}

.product-page #product-shipping-modal .ri-close-line {
    line-height: 1;
}

.product-page .product-review-external-grid .marketplace-logo {
    width: 108px;
    height: 32px;
}

/* Hotfix trust/settings polish */
.admin-card__head--split,
.admin-trust-settings .admin-page__head--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.admin-icon-button--compact {
    width: 38px;
    height: 38px;
    min-width: 38px;
}
.admin-trust-settings-card {
    border: 1px solid rgba(148, 163, 184, .32);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
}
.admin-settings-trust-hero .admin-stat-strip {
    align-self: flex-start;
}
.admin-trust-settings .admin-list-item--card {
    border-color: rgba(148, 163, 184, .28);
}
.product-shipping-status-list {
    display: grid;
    gap: 10px;
}
.product-shipping-status-item {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    background: #f8fafc;
    padding: 14px 16px;
}
.product-shipping-status-item.is-loading {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, .22);
}
.product-shipping-status-item.is-ok {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, .28);
}
.product-shipping-status-item.is-error {
    background: #fff1f2;
    border-color: rgba(220, 38, 38, .28);
}

/* Trust media console v9 — async upload, groups, compact UX */
.admin-segmented-tabs--settings {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
    row-gap: 8px;
}
.admin-segmented-tabs--settings .admin-segmented-tabs__item {
    flex: 0 1 auto;
}
.admin-trust-console {
    --trust-border: rgba(148, 163, 184, .32);
    --trust-soft: #f8fafc;
}
.admin-trust-console__head {
    align-items: flex-start;
    gap: 18px;
}
.admin-trust-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.admin-trust-kpis span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--trust-border);
    border-radius: 999px;
    padding: 7px 10px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}
.admin-trust-kpis strong { color: #0f172a; }
.admin-trust-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.admin-trust-quick-card {
    border: 1px solid var(--trust-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    padding: 14px 16px;
    display: grid;
    gap: 6px;
}
.admin-trust-quick-card b { color: #0f172a; }
.admin-trust-quick-card span { color: #64748b; font-size: 13px; line-height: 1.45; }
.admin-trust-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.admin-trust-sidebar {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 78px;
}
.admin-trust-fold {
    border: 1px solid var(--trust-border);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}
.admin-trust-fold > summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 900;
    color: #0f172a;
    background: #f8fafc;
    user-select: none;
}
.admin-trust-fold__body { padding: 14px; display: grid; gap: 14px; }
.admin-trust-group-list { display: grid; gap: 10px; }
.admin-trust-group-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 8px;
    border: 1px solid var(--trust-border);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
}
.admin-trust-group-row textarea,
.admin-trust-group-row label,
.admin-trust-group-row button { grid-column: 1 / -1; }
.admin-trust-group-row input,
.admin-trust-group-row textarea {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
}
.admin-trust-upload-queue {
    display: grid;
    gap: 8px;
    border-top: 1px dashed var(--trust-border);
    padding-top: 12px;
}
.admin-trust-upload-queue__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--trust-border);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    font-size: 13px;
}
.admin-trust-upload-queue__row progress { grid-column: 1 / -1; width: 100%; height: 8px; }
.admin-trust-upload-queue__row.is-ok { border-color: rgba(22, 163, 74, .35); background: #f0fdf4; }
.admin-trust-upload-queue__row.is-error { border-color: rgba(220, 38, 38, .35); background: #fff1f2; }
.admin-trust-doc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-trust-doc-list a {
    border: 1px solid var(--trust-border);
    border-radius: 999px;
    padding: 7px 10px;
    background: #fff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}
.admin-trust-main { min-width: 0; display: grid; gap: 14px; }
.admin-trust-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--trust-border);
    border-radius: 18px;
    padding: 14px 16px;
    background: #fff;
}
.admin-trust-toolbar div { display: grid; gap: 4px; }
.admin-trust-toolbar span { color: #64748b; font-size: 13px; }
.admin-trust-groups-board { display: grid; gap: 16px; }
.admin-trust-media-group {
    border: 1px solid var(--trust-border);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}
.admin-trust-media-group > header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border-bottom: 1px solid var(--trust-border);
}
.admin-trust-media-group h3 { margin: 0; font-size: 18px; color: #0f172a; }
.admin-trust-media-group p { margin: 4px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.admin-trust-media-group > header > span {
    align-self: flex-start;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}
.admin-trust-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    padding: 14px;
    min-height: 40px;
}
.admin-trust-media-card {
    border: 1px solid var(--trust-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}
.admin-trust-media-card.is-dragging { opacity: .55; outline: 2px dashed #2563eb; }
.admin-trust-media-card.is-muted { opacity: .62; }
.admin-trust-media-card__preview {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
    overflow: hidden;
}
.admin-trust-media-card__preview img,
.admin-trust-media-card__preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.admin-trust-media-card__type {
    position: absolute;
    top: 8px;
    left: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
}
.admin-trust-media-card__body {
    padding: 10px;
    display: grid;
    gap: 8px;
}
.admin-trust-media-card__body input[type="text"],
.admin-trust-media-card__body input[type="number"],
.admin-trust-media-card__body textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
}
.admin-trust-media-card__body label { font-size: 13px; color: #475569; font-weight: 700; }
.admin-trust-media-card__actions { display: flex; gap: 8px; }
@media (max-width: 1180px) {
    .admin-trust-layout { grid-template-columns: 1fr; }
    .admin-trust-sidebar { position: static; }
}
@media (max-width: 760px) {
    .admin-trust-quick-grid { grid-template-columns: 1fr; }
    .admin-trust-toolbar, .admin-trust-media-group > header { align-items: stretch; flex-direction: column; }
}
