:root {
    --bg: #f5f8fc;
    --ink: #152033;
    --muted: #64748b;
    --primary: #2c72e8;
    --line: #e1e8f2;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --accent-teal: #0fba9b;
    --accent-amber: #f6a21a;
    --accent-rose: #f05268;
    --shadow-soft: 0 16px 36px rgba(21, 32, 51, 0.08);
    --shadow-lift: 0 20px 46px rgba(21, 32, 51, 0.13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.45;
}

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

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(44, 114, 232, 0.25), transparent 32%),
        radial-gradient(circle at 82% 14%, rgba(32, 201, 151, 0.18), transparent 28%),
        linear-gradient(135deg, #101a2d, #20324f);
}

.auth-language-menu {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 50;
}

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

.auth-card {
    width: min(100%, 430px);
    padding: 30px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.auth-card--wide {
    width: min(100%, 540px);
}

.auth-logo {
    margin: auto auto 18px auto;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-logo span {
    font-size: 13px;
    margin-left: 4px;
}

.auth-logo--image {
    width: 100px;
    margin: auto auto 20px auto;
}

.auth-logo--image img {
    display: block;
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    object-position: left center;
}

.auth-eyebrow,
.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-card h1,
.dashboard-hero h1 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.18;
}

.auth-copy,
.dashboard-hero p,
.dashboard-grid p {
    color: var(--muted);
    line-height: 1.55;
}

.auth-card label {
    display: block;
    margin: 16px 0 7px;
    font-size: 13px;
    font-weight: 800;
}

.auth-card input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 13px;
}

.auth-card button,
.btn {
    gap: 8px;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 0 18px;
    font-weight: 800;
}

.ui-icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    min-width: 1.1em;
    font-size: 1.04em;
    line-height: 1;
    text-align: center;
}

.btn .ui-icon,
.row-actions .ui-icon,
.inline-link .ui-icon,
.admin-tab-card__head h2 .ui-icon,
.user-product-features .ui-icon {
    margin-right: 7px;
}

.auth-card button {
    width: 100%;
    margin-top: 22px;
    background: var(--primary);
    color: #fff;
}

.auth-links {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-links a {
    color: var(--primary);
    font-weight: 800;
}

.auth-links__separator {
    margin: 0 5px;
}

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

.auth-form-grid .auth-form-grid__full {
    grid-column: 1 / -1;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}

.auth-check input {
    width: 17px;
    min-height: 17px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.auth-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .auth-language-menu {
        top: 12px;
        right: 12px;
    }

    .auth-wrap {
        padding: 70px 16px 20px;
    }

    .auth-card {
        padding: 24px 20px;
    }

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

.role-choice-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.role-choice-list form {
    margin: 0;
}

.auth-card .role-choice {
    width: 100%;
    min-height: 72px;
    margin-top: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
    color: var(--ink);
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.auth-card .role-choice:hover {
    border-color: rgba(44, 114, 232, 0.45);
    box-shadow: 0 12px 28px rgba(44, 114, 232, 0.13);
    transform: translateY(-1px);
}

.auth-card .role-choice strong,
.auth-card .role-choice span {
    display: block;
}

.auth-card .role-choice span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.alert {
    margin: 16px 0;
    padding: 12px;
    border-radius: 10px;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.app-topbar {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.app-brand {
    font-weight: 900;
}

.app-brand--logo {
    display: inline-flex;
    width: 170px;
    min-width: 150px;
    align-items: center;
}

.app-brand--logo img {
    display: block;
    width: 100%;
    max-height: 42px;
    object-fit: contain;
    object-position: left center;
}

.app-topbar nav,
.app-nav {
    display: flex;
    flex: 1 1 auto;
    gap: 8px;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.app-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 12px;
    white-space: nowrap;
}

.app-nav a .ui-icon {
    color: #7c8ca5;
}

.app-nav a:hover,
.app-nav a.is-active {
    border-color: rgba(44, 114, 232, 0.18);
    background: linear-gradient(135deg, #edf4ff, #effaf6);
    color: #1f5ec7;
    box-shadow: 0 10px 22px rgba(44, 114, 232, 0.12);
}

.app-nav a:hover .ui-icon,
.app-nav a.is-active .ui-icon {
    color: var(--primary);
}

.topbar-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.app-lang-switcher {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-lang-switcher a {
    display: inline-flex;
    min-width: 34px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.app-lang-switcher a.active {
    border-color: rgba(44, 114, 232, 0.35);
    background: #edf4ff;
    color: var(--primary);
}

.language-menu,
.role-switcher {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.language-menu__button,
.role-switcher__button,
.topbar-icon-link {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(210, 221, 237, 0.95);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    box-shadow: 0 10px 22px rgba(21, 32, 51, 0.07);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.language-menu__button:hover,
.role-switcher__button:hover,
.topbar-icon-link:hover,
.language-menu:focus-within .language-menu__button,
.role-switcher:focus-within .role-switcher__button {
    border-color: rgba(44, 114, 232, 0.28);
    background: #f8fbff;
    box-shadow: 0 14px 28px rgba(44, 114, 232, 0.14);
    transform: translateY(-1px);
}

.language-menu__flag {
    display: inline-flex;
    min-width: 24px;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    line-height: 1;
}

.language-menu__list,
.role-switcher__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 35;
    display: grid;
    min-width: 178px;
    gap: 6px;
    border: 1px solid rgba(210, 221, 237, 0.95);
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 22px 44px rgba(21, 32, 51, 0.17);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.language-menu:hover .language-menu__list,
.language-menu:focus-within .language-menu__list,
.language-menu.is-open .language-menu__list,
.role-switcher:hover .role-switcher__menu,
.role-switcher:focus-within .role-switcher__menu,
.role-switcher.is-open .role-switcher__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.language-menu__item,
.role-switcher__menu a {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    border-radius: 9px;
    padding: 0 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.language-menu__item:hover,
.language-menu__item.is-active,
.role-switcher__menu a:hover {
    background: linear-gradient(135deg, #edf4ff, #effaf6);
    color: #1f5ec7;
}

.role-switcher__button {
    gap: 8px;
    padding: 0 13px;
    color: #0f1d32;
    font-weight: 900;
}

.topbar-icon-link {
    color: #ef4444;
}

.app-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto;
}

.dashboard-hero,
.dashboard-grid article {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(21, 32, 51, 0.06);
}

.dashboard-hero {
    padding: 30px;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

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

.btn.ghost {
    border: 1px solid var(--line);
    background: #fff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.dashboard-stats article,
.dashboard-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(21, 32, 51, 0.06);
}

.dashboard-stats article {
    padding: 18px;
}

.dashboard-stats span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.dashboard-stats strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.user-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.user-product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(21, 32, 51, 0.06);
}

.user-product-card__media {
    display: grid;
    height: 190px;
    place-items: center;
    border-bottom: 1px solid var(--line);
    background: #f8fbff;
    isolation: isolate;
}

.user-product-card__media img {
    width: min(78%, 220px);
    height: min(78%, 150px);
    padding: 0;
    object-fit: contain;
}

.payment-shell {
    max-width: 860px;
}

.user-product-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.user-product-card__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.user-product-card__title h2 {
    margin: 0;
    color: #0f1d32;
    font-size: 18px;
    line-height: 1.25;
}

.user-product-card__title span {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #edf4ff;
    color: #1f5ec7;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
}

.user-product-card__body p,
.user-product-meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.user-product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 10px;
    background: #f8fbff;
    padding: 11px 12px;
}

.user-product-price span,
.user-product-options > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.user-product-price strong {
    color: #0f1d32;
    font-size: 20px;
}

.user-product-features {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.user-product-features li {
    display: flex;
    align-items: center;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

.user-product-options {
    display: grid;
    gap: 8px;
}

.user-product-options div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-product-options i,
.user-product-options img {
    width: 34px;
    height: 34px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    background: #fff;
}

.user-product-options img {
    object-fit: cover;
}

.user-product-card .btn {
    margin-top: auto;
}

.user-activation-panel {
    max-width: 720px;
    margin-right: auto;
    margin-left: auto;
}

.purchase-layout {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.purchase-product-head {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.purchase-product-head img {
    width: 112px;
    height: 92px;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #f8fbff;
    object-fit: contain;
}

.purchase-product-head strong,
.purchase-product-head span {
    display: block;
}

.purchase-product-head strong {
    color: #0f1d32;
    font-size: 20px;
}

.purchase-product-head span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.purchase-features {
    margin-bottom: 16px;
}

.purchase-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.purchase-option {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}

.purchase-option__preview {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.purchase-option__preview img,
.purchase-option__preview i {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    background: #f8fbff;
}

.purchase-option__preview img {
    object-fit: cover;
}

.purchase-option__preview strong {
    overflow: hidden;
    color: #0f1d32;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-option input {
    width: 82px;
    min-height: 38px;
}

.purchase-coupon {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.payment-status-hero.is-success {
    border-color: #bbf7d0;
}

.payment-status-hero.is-fail {
    border-color: #fecaca;
}

.dashboard-announcement {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 14px;
    background: #eff6ff;
    color: #1e3a8a;
}

.dashboard-announcement span {
    color: #1e40af;
}

.dashboard-grid--actions .inline-link,
.dashboard-panel .inline-link {
    display: inline-flex;
    margin-top: 4px;
    color: var(--primary);
    font-weight: 800;
}

.dashboard-panel {
    margin-top: 16px;
    padding: 22px;
}

.dashboard-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-panel__head h2 {
    margin: 0;
    font-size: 19px;
}

.dashboard-panel__head a {
    color: var(--primary);
    font-weight: 800;
}

.dashboard-card-list {
    display: grid;
    gap: 10px;
}

.dashboard-card-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
}

.dashboard-card-list strong,
.dashboard-card-list span {
    display: block;
}

.dashboard-card-list span {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-grid article {
    padding: 20px;
}

.dashboard-grid strong {
    display: block;
    margin-bottom: 8px;
}

@media (max-width: 760px) {
    .app-topbar,
    .dashboard-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-card-list article {
        grid-template-columns: 1fr;
    }
}

.admin-page {
    min-height: 100vh;
    background: #f4f7fb;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: 260px;
    border-right: 1px solid #dfe7f1;
    background: #0f1d32;
    color: #fff;
}

.admin-logo {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    justify-content: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logo img {
    display: block;
    width: 156px;
    max-height: 46px;
    object-fit: contain;
    object-position: left center;
    filter: brightness(0) invert(1);
}

.admin-logo span {
    font-size: 25px;
    font-weight: 900;
}

.admin-logo small {
    margin-top: 2px;
    color: #9fb0c8;
    font-size: 12px;
    font-weight: 700;
}

.admin-nav {
    display: grid;
    max-height: calc(100vh - 76px);
    gap: 16px;
    overflow-y: auto;
    padding: 16px 12px 22px;
}

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

.admin-nav-group__title {
    padding: 0 12px 4px;
    color: #8190aa;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-nav a {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 9px 12px;
    color: #c5d2e5;
    font-size: 14.5px;
    font-weight: 800;
}

.admin-nav a .ui-icon {
    width: 17px;
    color: #8190aa;
    font-size: 13px;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    background: rgba(44, 114, 232, 0.2);
    color: #fff;
}

.admin-nav a:hover .ui-icon,
.admin-nav a.is-active .ui-icon {
    color: #fff;
}

.admin-main {
    min-height: 100vh;
    margin-left: 260px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #dfe7f1;
    background: rgba(255, 255, 255, 0.92);
    padding: 0 28px;
    backdrop-filter: blur(12px);
}

.admin-topbar strong {
    display: block;
    margin-top: 3px;
    font-size: 20px;
}

.admin-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.admin-lang-switcher {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-lang-switcher a {
    display: inline-flex;
    min-width: 34px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe7f1;
    border-radius: 999px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.admin-lang-switcher a.active {
    border-color: var(--primary);
    background: #edf4ff;
    color: #1f5ec7;
}

.admin-user a {
    color: var(--primary);
}

.admin-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-content {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.admin-hero,
.admin-page-head,
.admin-panel,
.admin-stat {
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 29, 50, 0.06);
}

.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding: 24px;
}

.admin-page-head h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.18;
}

.admin-page-head p:last-child {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
}

.admin-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.18;
}

.admin-hero p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.admin-stat {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.admin-stat::after {
    position: absolute;
    right: -24px;
    bottom: -30px;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--stat-color, #2c72e8);
    content: "";
    opacity: 0.13;
}

.admin-stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-stat strong {
    display: block;
    margin-top: 10px;
    color: #0f1d32;
    font-size: 30px;
    line-height: 1;
}

.admin-stat--green { --stat-color: #16a34a; }
.admin-stat--red { --stat-color: #ef4444; }
.admin-stat--amber { --stat-color: #f59e0b; }
.admin-stat--blue { --stat-color: #2c72e8; }
.admin-stat--violet { --stat-color: #7c3aed; }
.admin-stat--slate { --stat-color: #475569; }

.admin-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 16px;
    margin-top: 16px;
}

.admin-panel {
    padding: 18px;
}

.admin-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-panel__head h2 {
    margin: 0;
    font-size: 18px;
}

.admin-panel__head a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

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

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

.admin-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

.admin-table .dataTables_length,
.admin-table .dataTables_filter,
.admin-table .dataTables_info,
.admin-table .dataTables_paginate {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-table .dataTables_length,
.admin-table .dataTables_filter {
    margin-bottom: 14px;
}

.admin-table .dataTables_filter input,
.admin-table .dataTables_length select {
    min-height: 36px;
    border: 1px solid #d9e2ee;
    border-radius: 8px;
    background: #fff;
    color: #0f1d32;
    padding: 0 10px;
}

.admin-table .dataTables_paginate .paginate_button {
    border: 1px solid #dfe7f1 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #0f1d32 !important;
    font-weight: 800;
}

.admin-table .dataTables_paginate .paginate_button.current {
    border-color: var(--primary) !important;
    background: #edf4ff !important;
    color: #1f5ec7 !important;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #edf1f7;
    padding: 9px 10px;
    text-align: left;
    white-space: nowrap;
}

.table-thumb {
    width: 46px;
    height: 34px;
    border: 1px solid #dfe7f1;
    border-radius: 6px;
    background: #edf2f8;
    object-fit: cover;
}

.option-thumb {
    width: 64px;
    height: 44px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    background: #edf2f8;
    object-fit: cover;
}

.option-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f1d32;
    font-size: 13px;
    font-weight: 800;
}

.color-swatch {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px #fff;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-next {
    display: grid;
    gap: 10px;
}

.admin-next a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    padding: 13px 14px;
    color: #0f1d32;
    font-weight: 800;
}

.admin-shortcuts-panel {
    margin-bottom: 18px;
}

.admin-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-shortcut {
    display: flex;
    min-width: 0;
    min-height: 72px;
    align-items: center;
    gap: 18px;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    color: #0f1d32;
}

.admin-shortcut:hover {
    border-color: #b8cff7;
    box-shadow: 0 12px 26px rgba(44, 114, 232, 0.2);
}

.admin-shortcut__icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: #edf4ff;
    color: #1f5ec7;
}

.admin-shortcut strong {
    font-size: 14px;
    text-overflow: ellipsis;
}

.admin-shortcut small {
    overflow: hidden;
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.admin-tabs a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    background: #fff;
    color: #0f1d32;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 900;
}

.admin-tabs a.is-active {
    border-color: var(--primary);
    background: #edf4ff;
    color: #1f5ec7;
}

.admin-tabs--form {
    position: sticky;
    top: 86px;
    z-index: 4;
    border-bottom: 1px solid #edf1f7;
    background: #fff;
    padding-bottom: 14px;
}

.admin-tabs span {
    border-radius: 999px;
    background: #0f1d32;
    color: #fff;
    padding: 3px 7px;
    font-size: 11px;
}

.admin-table td strong,
.admin-table td small {
    display: block;
}

.admin-table td small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.admin-table--cards td {
    vertical-align: top;
}

.table-link {
    color: var(--primary);
    font-weight: 900;
}

.price-stack {
    display: grid;
    gap: 3px;
}

.price-stack small {
    color: var(--muted);
    font-weight: 800;
    text-decoration: line-through;
}

.price-stack strong {
    color: #0f1d32;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
}

.detail-item {
    min-height: 74px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.detail-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.detail-item strong {
    display: block;
    margin-top: 7px;
    color: #0f1d32;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.status-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.status-pill.is-green {
    background: #dcfce7;
    color: #166534;
}

.status-pill.is-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.is-amber {
    background: #fef3c7;
    color: #92400e;
}

.status-pill.is-red {
    background: #fee2e2;
    color: #991b1b;
}

.status-pill.is-slate {
    background: #e2e8f0;
    color: #334155;
}

.count-pill,
.score-pill {
    display: inline-flex;
    min-width: 30px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 900;
}

.count-pill.is-green {
    background: #dcfce7;
    color: #166534;
}

.count-pill.is-red {
    background: #fee2e2;
    color: #991b1b;
}

.count-pill.is-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.count-pill.is-amber {
    background: #fef3c7;
    color: #92400e;
}

.count-pill.is-slate {
    background: #e2e8f0;
    color: #334155;
}

.score-pill {
    background: #fef3c7;
    color: #92400e;
}

.log-insight-list,
.log-rank-list {
    display: grid;
    gap: 10px;
}

.log-insight {
    display: grid;
    gap: 5px;
    border: 1px solid #dfe7f1;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.log-insight strong {
    color: #0f1d32;
    font-size: 14px;
}

.log-insight span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.log-insight--green { border-left-color: #16a34a; }
.log-insight--red { border-left-color: #ef4444; }
.log-insight--amber { border-left-color: #f59e0b; }
.log-insight--blue { border-left-color: #2c72e8; }
.log-insight--violet { border-left-color: #7c3aed; }
.log-insight--slate { border-left-color: #475569; }

.log-rank {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    overflow: hidden;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
}

.log-rank span,
.log-rank strong {
    position: relative;
    z-index: 1;
}

.log-rank i {
    position: absolute;
    inset: auto auto 0 0;
    height: 3px;
    border-radius: 999px;
    background: #2c72e8;
}

.log-counter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 220px;
}

.log-counter-list span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 8px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.row-actions a,
.row-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    background: #fff;
    padding: 7px 9px;
    color: #0f1d32;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.row-actions a:last-child {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.inline-action-form {
    margin: 0;
}

.inline-action-form button {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.muted {
    color: var(--muted);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.theme-card {
    overflow: hidden;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #fff;
}

.theme-card__media {
    display: grid;
    aspect-ratio: 4 / 3;
    place-items: center;
    overflow: hidden;
    background: #edf2f8;
}

.theme-card__media img {
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    object-fit: contain;
}

.theme-card__body {
    display: flex;
    min-height: 104px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 15px;
}

.theme-card__body h2 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.25;
}

.theme-card__body p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.theme-card__body span {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #edf4ff;
    color: #1f5ec7;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.theme-card__actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid #edf1f7;
    padding: 12px 15px 15px;
}

.theme-card__actions a {
    flex: 1;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    padding: 10px 8px;
    color: #0f1d32;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.theme-card__actions a:first-child {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.theme-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.theme-admin-card {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(210, 221, 237, 0.9);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.theme-admin-card:hover {
    border-color: rgba(44, 114, 232, 0.25);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.theme-admin-card__media {
    display: grid;
    aspect-ratio: 16 / 10;
    place-items: center;
    border-bottom: 1px solid #e5edf7;
    background: linear-gradient(135deg, #f8fbff, #eef8f4);
}

.theme-admin-card__media img {
    width: calc(100% - 22px);
    height: calc(100% - 22px);
    object-fit: contain;
}

.theme-admin-card__body {
    display: grid;
    gap: 14px;
    padding: 16px;
}

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

.theme-admin-card__title span:first-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.theme-admin-card__title h2 {
    margin: 3px 0 0;
    color: #0f1d32;
    font-size: 18px;
    line-height: 1.25;
}

.theme-admin-meta {
    display: grid;
    gap: 9px;
    margin: 0;
}

.theme-admin-meta div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #eef3f8;
    padding-bottom: 8px;
}

.theme-admin-meta dt,
.theme-admin-meta dd {
    margin: 0;
    font-size: 13px;
}

.theme-admin-meta dt {
    color: var(--muted);
    font-weight: 850;
}

.theme-admin-meta dd {
    color: #0f1d32;
    font-weight: 900;
    text-align: right;
}

.theme-admin-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.theme-admin-badges span {
    border-radius: 999px;
    background: #edf4ff;
    color: #1f5ec7;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
}

.theme-admin-card__actions {
    display: flex;
    justify-content: flex-end;
}

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

.admin-form__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-form__grid--compact {
    grid-template-columns: minmax(220px, 360px);
}

.admin-tab-card {
    display: grid;
    gap: 14px;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #f8fbff;
    box-shadow: 0 10px 26px rgba(15, 29, 50, 0.05);
    padding: 18px;
    scroll-margin-top: 156px;
}

.admin-tab-card__head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    border-bottom: 1px solid #e7edf5;
    padding-bottom: 12px;
}

.admin-tab-card__head h2 {
    margin: 0;
    color: #0f1d32;
    font-size: 18px;
}

.admin-form-section {
    display: grid;
    gap: 12px;
    border: 1px solid #edf1f7;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
}

.admin-form-section h3 {
    margin: 0;
    color: #0f1d32;
    font-size: 15px;
}

.admin-form-section--placeholder {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    padding: 18px;
}

.admin-form-section--placeholder p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-empty-state {
    margin: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--muted);
    padding: 16px;
    font-weight: 800;
    line-height: 1.5;
}

.admin-subsection {
    display: grid;
    gap: 12px;
    border: 1px solid #edf1f7;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
}

.admin-subsection + .admin-subsection {
    margin-top: 4px;
}

.admin-subsection__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-subsection__head h3 {
    margin: 0;
    font-size: 15px;
}

.admin-inline-check {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    border: 1px solid #d9e2ee;
    border-radius: 999px;
    padding: 0 10px;
    min-height: 28px;
    font-size: 12px;
}

.admin-form-wide {
    grid-column: 1 / -1;
}

.admin-form label {
    display: grid;
    gap: 8px;
}

.admin-form label span,
.admin-form-preview span {
    color: #0f1d32;
    font-size: 12px;
    font-weight: 900;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d9e2ee;
    border-radius: 7px;
    background: #fff;
    color: #0f1d32;
    padding: 0 10px;
    font: inherit;
}

.admin-form textarea {
    min-height: 74px;
    padding: 10px;
    resize: vertical;
}

.admin-form input[type="file"] {
    display: flex;
    align-items: center;
    padding: 7px 10px;
}

.admin-form-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-form-switches label {
    position: relative;
    display: inline-flex !important;
    min-height: 28px;
    align-items: center;
    border: 1px solid #d9e2ee;
    border-radius: 999px;
    background: #fff;
    padding: 0 10px;
    font-size: 12px;
}

.admin-form-switches input[type="checkbox"],
.admin-inline-check input[type="checkbox"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    appearance: none !important;
}

.admin-form-switches input[type="checkbox"] + span,
.admin-inline-check input[type="checkbox"] + span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0f1d32;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.admin-form-switches input[type="checkbox"] + span::before,
.admin-inline-check input[type="checkbox"] + span::before {
    display: inline-flex;
    width: 14px;
    height: 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8c6d8;
    border-radius: 4px;
    background: #fff;
    color: #fff;
    content: "";
    font-family: FontAwesome;
    font-size: 9px;
    line-height: 1;
}

.admin-form-switches input[type="checkbox"]:checked + span::before,
.admin-inline-check input[type="checkbox"]:checked + span::before {
    border-color: var(--primary);
    background: var(--primary);
    content: "\f00c";
}

.theme-picker {
    display: grid;
    gap: 12px;
}

.theme-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.theme-editor-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.theme-picker__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.theme-picker__head span {
    color: #0f1d32;
    font-size: 13px;
    font-weight: 900;
}

.theme-picker__head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.theme-picker-card {
    position: relative;
    display: grid;
    overflow: hidden;
    border: 2px solid #dce6f2;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.theme-picker-card:hover,
.theme-picker-card:has(input:checked),
.theme-picker-card.is-selected {
    border-color: #2563eb;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 18px 36px rgba(37, 99, 235, 0.18);
    transform: translateY(-2px);
}

.theme-picker-card.is-selected::after,
.theme-picker-card:has(input:checked)::after {
    position: absolute;
    top: 9px;
    right: 9px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    content: "\f00c";
    font-family: FontAwesome;
    font-size: 12px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

.theme-picker-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.theme-picker-card__preview {
    display: grid;
    aspect-ratio: 16 / 10;
    min-height: 92px;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #edf4ff, #eef8f4);
}

.theme-picker-card.is-selected .theme-picker-card__preview,
.theme-picker-card:has(input:checked) .theme-picker-card__preview {
    background: linear-gradient(135deg, #e8f0ff, #eef8ff);
}

.theme-picker-card__preview img {
    width: calc(100% - 18px);
    height: calc(100% - 18px);
    object-fit: contain;
    object-position: center;
}

.theme-picker-card__preview--empty .ui-icon {
    width: 30px;
    height: 30px;
    color: #2c72e8;
}

.theme-picker-card__body {
    display: grid;
    gap: 4px;
    padding: 11px 12px 12px;
}

.theme-picker-card__body strong {
    overflow: hidden;
    color: #0f1d32;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-picker-card__body small {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-picker-card__body em {
    width: max-content;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.theme-picker-card__body em.is-ready {
    background: #e9f8ef;
    color: #14834f;
}

.theme-picker-card__body em.is-missing {
    background: #fff0f0;
    color: #b42318;
}

.theme-live-preview {
    position: sticky;
    top: 94px;
    display: grid;
    overflow: hidden;
    border: 1px solid #dce6f2;
    border-radius: 14px;
    background: #0f1d32;
    box-shadow: var(--shadow-soft);
}

.theme-live-preview.is-loading {
    box-shadow: 0 0 0 4px rgba(44, 114, 232, 0.16), var(--shadow-soft);
}

.theme-live-preview.is-loading::after {
    position: absolute;
    inset: 42px 0 0;
    display: grid;
    place-items: center;
    background: rgba(15, 29, 50, 0.2);
    color: #fff;
    content: "";
    pointer-events: none;
}

.theme-live-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
}

.theme-live-preview__head span {
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.theme-live-preview__head a {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.theme-live-preview__head .ui-icon {
    width: 15px;
    height: 15px;
}

.theme-live-preview iframe {
    width: 100%;
    height: 520px;
    border: 0;
    background: #fff;
}

.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-media-field {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: center;
    max-width: 320px;
}

.admin-media-field img {
    width: 78px;
    height: 54px;
    border: 1px solid #dfe7f1;
    border-radius: 6px;
    background: #edf2f8;
    object-fit: cover;
}

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

.admin-media-field input[type="file"] {
    min-width: 0;
}

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

.admin-market-link {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid #edf1f7;
    border-radius: 10px;
    background: #fbfdff;
    padding: 12px;
}

.admin-market-link__icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #fff;
}

.admin-market-link__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.admin-market-link__body {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.admin-market-link__body strong {
    overflow: hidden;
    color: #0f1d32;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-form-preview {
    display: grid;
    gap: 8px;
    width: min(100%, 240px);
}

.admin-form-preview img {
    width: 100%;
    height: 130px;
    border: 1px solid #dfe7f1;
    border-radius: 8px;
    object-fit: cover;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-form-actions--sticky {
    position: sticky;
    top: 76px;
    z-index: 14;
    align-items: center;
    justify-content: flex-end;
    margin: -2px 0 18px;
    padding: 12px;
    border: 1px solid rgba(196, 210, 229, 0.86);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 36px rgba(21, 32, 51, 0.12);
    backdrop-filter: blur(14px);
}

.admin-form-actions__hint {
    margin-right: auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .admin-form-actions--sticky {
        top: 64px;
        justify-content: stretch;
    }

    .admin-form-actions__hint {
        display: none;
    }

    .admin-form-actions--sticky .btn {
        flex: 1 1 140px;
        justify-content: center;
    }
}

.admin-stats--compact {
    grid-template-columns: repeat(2, minmax(0, 220px));
}

.language-table-name {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 900;
}

/* Visual refresh for customer and admin workspaces. */
body.panel-page {
    background:
        linear-gradient(180deg, rgba(44, 114, 232, 0.07) 0, rgba(15, 186, 155, 0.06) 38%, rgba(245, 248, 252, 0) 72%),
        var(--bg);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    border-bottom-color: rgba(189, 202, 222, 0.7);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(21, 32, 51, 0.06);
    backdrop-filter: blur(14px);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f1d32;
}

.app-brand::before {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--accent-teal));
    color: #fff;
    content: "D";
    font-size: 14px;
    font-weight: 950;
}

.app-brand--logo::before {
    display: none;
}

.app-topbar nav a,
.app-lang-switcher a,
.admin-lang-switcher a {
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.app-topbar nav a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.app-lang-switcher a:hover,
.admin-lang-switcher a:hover {
    border-color: rgba(44, 114, 232, 0.38);
    box-shadow: 0 8px 18px rgba(44, 114, 232, 0.12);
}

.dashboard-hero,
.dashboard-grid article,
.dashboard-panel,
.dashboard-stats article,
.user-product-card {
    border-color: rgba(210, 221, 237, 0.9);
    box-shadow: var(--shadow-soft);
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 255, 0.96) 52%, rgba(239, 250, 246, 0.92)),
        #fff;
}

.dashboard-hero::before,
.admin-hero::before,
.admin-page-head::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent-teal), var(--accent-amber), var(--accent-rose));
    content: "";
}

.dashboard-hero h1,
.admin-hero h1,
.admin-page-head h1 {
    color: #0f1d32;
    letter-spacing: 0;
}

.dashboard-actions .btn,
.user-product-card .btn,
.admin-head-actions .btn,
.admin-form-actions .btn {
    box-shadow: 0 10px 22px rgba(44, 114, 232, 0.13);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.dashboard-actions .btn:hover,
.user-product-card .btn:hover,
.admin-head-actions .btn:hover,
.admin-form-actions .btn:hover {
    box-shadow: 0 14px 30px rgba(44, 114, 232, 0.19);
    transform: translateY(-1px);
}

.dashboard-stats article,
.admin-stat {
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-stats article::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--stat-color, var(--primary));
    content: "";
}

.dashboard-stats article:nth-child(1) { --stat-color: var(--primary); }
.dashboard-stats article:nth-child(2) { --stat-color: var(--accent-teal); }
.dashboard-stats article:nth-child(3) { --stat-color: var(--accent-amber); }
.dashboard-stats article:nth-child(4) { --stat-color: var(--accent-rose); }

.dashboard-stats article:hover,
.admin-stat:hover,
.dashboard-grid article:hover,
.user-product-card:hover {
    border-color: rgba(44, 114, 232, 0.24);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.dashboard-stats span,
.admin-stat span {
    letter-spacing: 0;
}

.dashboard-stats strong {
    color: #0f1d32;
    font-size: clamp(24px, 3vw, 34px);
}

.dashboard-grid article {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, #fff, #fbfdff),
        #fff;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-grid article::after {
    position: absolute;
    right: 14px;
    bottom: 12px;
    width: 58px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(44, 114, 232, 0.25), rgba(15, 186, 155, 0.35));
    content: "";
}

.dashboard-card-list article {
    background: #fbfdff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-card-list article:hover {
    border-color: rgba(15, 186, 155, 0.35);
    box-shadow: 0 12px 24px rgba(15, 186, 155, 0.12);
    transform: translateX(2px);
}

.user-product-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.user-product-card__media {
    background:
        linear-gradient(135deg, rgba(44, 114, 232, 0.08), rgba(15, 186, 155, 0.08)),
        #f8fbff;
}

.user-product-card__media img {
    filter: drop-shadow(0 12px 20px rgba(15, 29, 50, 0.13));
    transition: transform 0.18s ease;
}

.user-product-card:hover .user-product-card__media img {
    transform: scale(1.035);
}

.user-product-price {
    border: 1px solid rgba(223, 231, 241, 0.9);
    background: linear-gradient(135deg, #f8fbff, #f2fbf7);
}

.admin-page {
    background:
        linear-gradient(180deg, #eef5fb 0, #f5f8fc 46%, #f7fafc 100%);
}

.admin-sidebar {
    border-right-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, #0c1828 0, #102b3a 50%, #111f35 100%);
    box-shadow: 12px 0 34px rgba(15, 29, 50, 0.18);
}

.admin-logo {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.admin-logo span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.admin-logo span::before {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-teal), var(--primary));
    content: "A";
    font-size: 14px;
    font-weight: 950;
}

.admin-logo img + small {
    margin-top: 8px;
}

.admin-nav {
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.admin-nav-group__title {
    color: #8ed9c9;
    letter-spacing: 0.04em;
}

.admin-nav a {
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    border-color: rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(135deg, rgba(44, 114, 232, 0.28), rgba(15, 186, 155, 0.18));
    color: #fff;
    transform: translateX(2px);
}

.admin-topbar {
    border-bottom-color: rgba(210, 221, 237, 0.82);
    box-shadow: 0 10px 24px rgba(21, 32, 51, 0.06);
}

.admin-hero,
.admin-page-head,
.admin-panel,
.admin-stat,
.admin-tab-card {
    border-color: rgba(210, 221, 237, 0.9);
    box-shadow: var(--shadow-soft);
}

.admin-hero,
.admin-page-head {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 255, 0.96) 55%, rgba(244, 250, 255, 0.96)),
        #fff;
}

.admin-stat {
    border-left: 4px solid var(--stat-color, var(--primary));
    background:
        linear-gradient(135deg, #fff, #fbfdff),
        #fff;
}

.admin-stat::after {
    right: -18px;
    bottom: -28px;
    opacity: 0.11;
}

.admin-stat strong {
    font-size: clamp(26px, 2.6vw, 36px);
}

.admin-panel,
.admin-tab-card {
    background: rgba(255, 255, 255, 0.96);
}

.admin-panel__head h2,
.admin-tab-card__head h2 {
    color: #0f1d32;
}

.admin-table table {
    border-spacing: 0;
}

.admin-table table thead th {
    background: #f2f7fc;
    color: #223149;
}

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

.admin-table table tbody tr:hover {
    background: #f8fbff;
    box-shadow: inset 3px 0 0 rgba(44, 114, 232, 0.55);
}

.theme-card,
.admin-market-link,
.purchase-option {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.theme-card:hover,
.admin-market-link:hover,
.purchase-option:hover {
    border-color: rgba(44, 114, 232, 0.28);
    box-shadow: 0 14px 28px rgba(21, 32, 51, 0.1);
    transform: translateY(-1px);
}

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

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

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

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

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

    .purchase-options {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .theme-live-preview {
        position: static;
        max-width: 420px;
    }
}

@media (max-width: 820px) {
    .app-topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 16px;
    }

    .app-brand--logo {
        width: 150px;
        min-width: 140px;
    }

    .app-topbar nav {
        order: 3;
        width: 100%;
        flex: 1 0 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .app-lang-switcher,
    .topbar-tools {
        margin-left: auto;
    }

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

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

    .admin-logo {
        min-height: 68px;
    }

    .admin-nav {
        display: flex;
        max-height: none;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px 12px 14px;
    }

    .admin-nav-group {
        display: flex;
        flex: 0 0 auto;
        gap: 6px;
    }

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

    .admin-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

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

    .admin-topbar,
    .admin-page-head,
    .admin-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-topbar {
        padding: 16px 20px;
    }

    .admin-user {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .admin-logo img {
        width: 138px;
    }

    .admin-content {
        width: min(100% - 24px, 1240px);
        padding-top: 16px;
    }

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

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

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

    .theme-live-preview {
        max-width: 100%;
    }

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

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

    .admin-tabs--form {
        position: static;
    }

    .admin-tab-card {
        padding: 14px;
        scroll-margin-top: 24px;
    }

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

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

    .admin-media-field {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .dashboard-stats,
    .dashboard-grid,
    .user-product-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: 22px;
    }

    .purchase-product-head {
        grid-template-columns: 1fr;
    }

    .purchase-product-head img {
        width: 100%;
        height: 150px;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-hero h1 {
        font-size: 23px;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-tab-card__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .theme-picker__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .theme-picker__head small {
        text-align: left;
    }

    .theme-picker-grid {
        grid-template-columns: 1fr;
    }

    .theme-live-preview iframe {
        height: 460px;
    }
}
