/* Premium platform layer for U.C Hublogs marketplace */
:root {
    --premium-blue: #8bcf26;
    --premium-blue-2: #659b18;
    --premium-navy: #263238;
    --premium-cyan: #b3df54;
    --premium-green: #8bcf26;
    --premium-bg: #f4f7f7;
    --premium-surface: rgba(255, 255, 255, 0.86);
    --premium-border: rgba(101, 155, 24, 0.2);
    --premium-shadow: 0 20px 50px rgba(38, 50, 56, 0.12);
    --premium-shadow-soft: 0 10px 28px rgba(38, 50, 56, 0.1);
    --premium-radius: 8px;
    --premium-motion: 180ms ease;
}

:root.theme-dark {
    --text-primary: #e6edf6;
    --text-secondary: #9fb0c5;
    --bg-primary: #0a1726;
    --bg-secondary: #081421;
    --border-color: rgba(126, 161, 196, 0.22);
    --premium-bg: #081421;
    --premium-surface: rgba(11, 28, 48, 0.82);
    --premium-border: rgba(148, 190, 229, 0.2);
}

body.premium-shell,
.premium-shell {
    background:
        radial-gradient(circle at 14% 10%, rgba(179, 223, 84, 0.16), transparent 28rem),
        radial-gradient(circle at 86% 4%, rgba(139, 207, 38, 0.16), transparent 32rem),
        linear-gradient(180deg, var(--premium-bg), #edf3ed 45%, var(--premium-bg));
    color: var(--text-primary);
}

:root.theme-dark body.premium-shell {
    background:
        radial-gradient(circle at 14% 10%, rgba(34, 211, 238, 0.1), transparent 28rem),
        radial-gradient(circle at 86% 4%, rgba(11, 117, 189, 0.22), transparent 32rem),
        linear-gradient(180deg, #081421, #07111e);
}

.navbar,
.home-nav,
.plp-header {
    border-bottom: 1px solid var(--premium-border) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 12px rgba(7, 29, 51, 0.06) !important;
}

:root.theme-dark .navbar,
:root.theme-dark .home-nav,
:root.theme-dark .plp-header {
    background: rgba(8, 20, 33, 0.82) !important;
}

.home-hero {
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
    linear-gradient(120deg, rgba(101, 155, 24, 0.94), rgba(38, 50, 56, 0.96)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 80px);
    z-index: -2;
}

.home-hero::after {
    content: "";
    position: absolute;
    width: 28rem;
    height: 28rem;
    right: -8rem;
    top: 4rem;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 68%);
    z-index: -1;
    pointer-events: none;
}

.hero-panel,
.home-section,
.home-cta,
.product-filter-bar,
.product-category-block,
.dashboard-section,
.dash-summary-item,
.email-panel,
.admin-section,
.stat-card,
.analytics-card,
.activity-card {
    background: var(--premium-surface) !important;
    border: 1px solid var(--premium-border) !important;
    border-radius: var(--premium-radius) !important;
    box-shadow: var(--premium-shadow-soft);
    backdrop-filter: blur(16px) saturate(135%);
}

.btn,
.btn-buy,
.home-pill,
.auth-btn {
    border-radius: 8px !important;
    transition: transform var(--premium-motion), box-shadow var(--premium-motion), background var(--premium-motion), border-color var(--premium-motion);
}

.btn:hover,
.btn-buy:hover,
.home-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 76, 129, 0.2);
}

.btn-primary,
.btn-buy,
.home-pill {
    background: linear-gradient(135deg, var(--premium-blue), var(--premium-blue-2)) !important;
    color: #fff !important;
    border: 0 !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--premium-green), #059669) !important;
    border: 0 !important;
    color: #fff !important;
}

.plp-container h1,
.container > h1 {
    background: linear-gradient(135deg, var(--premium-navy), var(--premium-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

:root.theme-dark .plp-container h1,
:root.theme-dark .container > h1 {
    background: linear-gradient(135deg, #e6edf6, #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
}

.category-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-top: 0.75rem;
    scrollbar-width: thin;
}

.category-tabs button {
    flex: 0 0 auto;
    border: 1px solid var(--premium-border);
    background: rgba(255, 255, 255, 0.76);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.48rem 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--premium-motion);
}

.category-tabs button.active,
.category-tabs button:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--premium-blue), var(--premium-blue-2));
    border-color: transparent;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: stretch;
}

.product-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
        "icon details"
        "price price"
        "action action";
    gap: 0.5rem 0.6rem;
    align-items: start;
    min-height: 132px;
    padding: 0.72rem;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.92));
    border: 1px solid rgba(126, 161, 196, 0.22);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(7, 29, 51, 0.08);
    transition: transform var(--premium-motion), box-shadow var(--premium-motion), border-color var(--premium-motion);
}

:root.theme-dark .product-card {
    background: linear-gradient(180deg, rgba(12, 30, 50, .96), rgba(8, 20, 33, .92));
}

.product-card::before {
    content: "Digital";
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.1);
    color: var(--premium-blue);
    padding: 0.18rem 0.48rem;
    font-size: 0.68rem;
    font-weight: 900;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 76, 129, 0.35);
    box-shadow: var(--premium-shadow);
}

.product-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9f5ff, #ffffff);
    display: grid;
    place-items: center;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.product-card:hover .product-icon img {
    transform: scale(1.08);
}

.product-icon {
    grid-area: icon;
    align-self: center;
}

.product-details {
    grid-area: details;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.22rem;
    min-width: 0;
}

.product-price {
    grid-area: price;
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    margin-top: 0.1rem;
}

.product-action {
    grid-area: action;
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    margin-top: 0.15rem;
}

.product-card .product-name {
    padding-right: 0 !important;
    margin: 0 !important;
    font-size: clamp(0.7rem, 2vw, 0.9rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    max-width: 100% !important;
}

.product-card .availability {
    color: var(--premium-green) !important;
    font-weight: 800 !important;
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    margin: 0 !important;
}

.product-card .product-price {
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    color: var(--premium-blue) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

.product-card .btn-buy,
.product-card .btn-out-of-stock {
    width: 100%;
    max-width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 34px;
    padding: 0.55rem 0.6rem;
    font-size: 0.68rem !important;
    text-decoration: none;
    margin: 0 auto;
}

.dash-balance-card {
    position: relative;
    overflow: hidden;
    box-shadow: var(--premium-shadow) !important;
}

.dash-balance-card::after {
    content: "";
    position: absolute;
    width: 18rem;
    height: 18rem;
    right: -8rem;
    top: -8rem;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 70%);
}

.premium-analytics {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1rem;
    margin: 1rem 0 1.4rem;
}

.analytics-card,
.activity-card {
    padding: 1rem;
}

.analytics-card h2,
.activity-card h2 {
    margin-bottom: 0.35rem;
}

.analytics-card p {
    color: var(--text-secondary);
    margin: 0 0 0.9rem;
}

.mini-chart {
    height: 180px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 0.75rem;
    padding-top: 1rem;
}

.mini-chart div {
    height: 100%;
    display: grid;
    align-items: end;
    gap: 0.45rem;
}

.mini-chart span {
    display: block;
    height: var(--bar-height);
    min-height: 12px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, var(--premium-cyan), var(--premium-blue));
    box-shadow: 0 12px 22px rgba(15, 76, 129, 0.18);
    animation: barRise 700ms ease both;
}

.mini-chart small {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 800;
}

.activity-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--premium-border);
}

.activity-row:last-child {
    border-bottom: 0;
}

.admin-chart-line {
    display: grid;
    gap: 0.7rem;
}

.admin-chart-line span {
    width: var(--line-width);
    min-width: 44px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--premium-blue), var(--premium-cyan));
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.18);
}

.orders-table,
.transactions-table,
.users-table {
    overflow-x: auto;
}

.orders-table table,
.transactions-table table,
.users-table table {
    border-collapse: separate;
    border-spacing: 0;
}

.orders-table tr,
.transactions-table tr,
.users-table tr {
    transition: background var(--premium-motion), transform var(--premium-motion);
}

.orders-table tbody tr:hover,
.transactions-table tbody tr:hover,
.users-table tbody tr:hover {
    background: rgba(15, 76, 129, 0.06);
}

.table-search {
    width: min(100%, 360px);
    margin: 0 0 0.75rem;
    border: 1px solid var(--premium-border);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.86);
}

.footer {
    background: linear-gradient(135deg, #263238, #3d4b50) !important;
    color: rgba(255, 255, 255, 0.88) !important;
    border-top: 1px solid rgba(255,255,255,.12);
}

.footer a {
    color: #dff6ff !important;
}

.floating-support {
    position: fixed;
    z-index: 10020;
    border: 0;
    box-shadow: var(--premium-shadow);
}

.floating-support {
    right: 1rem;
    bottom: 5.4rem;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--premium-green), #059669);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

.floating-whatsapp-group {
    position: fixed;
    left: 1rem;
    bottom: 1.8rem;
    z-index: 10020;
    min-height: 52px;
    max-width: min(280px, calc(100vw - 2rem));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 999px;
    padding: 0.72rem 1rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.15;
    text-decoration: none;
    box-shadow: var(--premium-shadow);
    transition: transform var(--premium-motion), box-shadow var(--premium-motion);
}

.floating-whatsapp-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(18, 140, 126, 0.28);
}

.floating-whatsapp-group i {
    flex: 0 0 auto;
    font-size: 1.25rem;
}

.floating-whatsapp-group span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10030;
    display: grid;
    gap: 0.5rem;
}

.premium-toast {
    transform: translateY(-8px);
    opacity: 0;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 2rem));
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    background: rgba(7, 29, 51, 0.94);
    color: #fff;
    box-shadow: var(--premium-shadow);
    transition: all 220ms ease;
}

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

/* Keep page-specific legacy layouts on the shared logo palette. */
.auth-card-top,
.dash-balance-card,
.balance-summary,
.wallet-card,
.receipt-top-band {
    background: linear-gradient(135deg, var(--primary-dark), var(--text-primary)) !important;
}

.auth-btn,
.wallet-card button,
.product-action .btn-buy,
.btn-buy {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border-color: transparent !important;
}

.auth-form-modern input:focus,
.auth-form-modern select:focus,
.auth-form-modern textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(139, 207, 38, 0.2) !important;
}

.receipt-notes-card a,
.auth-switch a,
.product-card a {
    color: var(--primary-dark) !important;
}

.order-login-rule.static,
.order-extra-details.static {
    background: var(--secondary-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-primary) !important;
}

.premium-reveal {
    animation: premiumReveal 520ms ease both;
}

@keyframes premiumReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes barRise {
    from {
        height: 0;
        opacity: 0.5;
    }
}

@media (max-width: 900px) {
    .premium-analytics,
    .dash-top {
        grid-template-columns: 1fr !important;
    }

    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .home-hero-inner,
    .plp-container,
    .container {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .product-card {
        min-height: 148px;
    }

    .floating-support {
        bottom: 9.2rem;
        right: 0.8rem;
    }

    .floating-whatsapp-group {
        left: 0.8rem;
        bottom: 5.2rem;
        min-height: 46px;
        max-width: min(250px, calc(100vw - 6.2rem));
        padding: 0.62rem 0.82rem;
        font-size: 0.78rem;
    }

    .toast-stack {
        left: 0.8rem;
        right: 0.8rem;
    }
}

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

/* Responsive polish layer: keeps shared headers, product cards, and dense panels from overlapping. */
html {
    overflow-x: hidden;
}

body {
    overflow-x: clip;
}

img,
svg,
video {
    max-width: 100%;
}

.container,
.plp-container,
.home-hero-inner,
.header-content,
.nav-container {
    width: min(100%, 1280px);
}

.navbar {
    width: 100%;
}

.nav-container {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding-inline: clamp(0.7rem, 2vw, 1.1rem);
}

.nav-logo {
    min-width: 0;
    justify-self: center;
    overflow: hidden;
}

.nav-logo img,
.logo-link img,
.drawer-brand img {
    display: block;
    max-width: clamp(128px, 42vw, 190px) !important;
    height: auto;
    max-height: 42px;
}

.nav-right-spacer {
    width: auto;
    min-width: 40px;
}

.nav-toggle,
.nav-profile-icon,
.profile-icon,
.drawer-close {
    flex: 0 0 auto;
}

.header-content {
    gap: 0.75rem;
    min-height: 64px;
}

.header-left,
.header-right,
.logo-link {
    min-width: 0;
}

.marketplace-page .plp-container {
    padding-top: clamp(1rem, 3vw, 2rem);
}

.product-filter-bar,
.product-category-block,
.dashboard-section,
.analytics-card,
.activity-card,
.dash-summary-item,
.product-detail {
    min-width: 0;
}

.filter-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.8fr) auto;
}

.filter-control,
.filter-action,
.filter-control input,
.filter-control select {
    min-width: 0;
}

.category-head-row {
    min-width: 0;
}

.category-title {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.category-count {
    flex: 0 0 auto;
}

.products-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    align-items: stretch;
}

.product-card {
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-areas:
        "icon details"
        "price price"
        "action action";
    align-content: start;
    min-width: 0;
    min-height: 0;
    row-gap: 0.8rem;
}

.product-card::before {
    content: none;
}

.product-icon {
    grid-area: icon;
    flex-shrink: 0;
}

.product-details {
    grid-area: details;
    grid-column: auto;
    min-width: 0;
    min-height: 0;
    align-self: center;
}

.product-name {
    padding-right: 0;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.availability {
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.product-price {
    grid-area: price;
    grid-column: auto;
    min-width: 0;
    text-align: left;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.product-action {
    grid-area: action;
    grid-column: auto;
    min-width: 0;
}

.btn,
.btn-buy,
.btn-out-of-stock,
.auth-btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

.section-head {
    min-width: 0;
}

.section-head h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dash-top,
.premium-analytics,
.dash-summary-grid {
    min-width: 0;
}

.dash-balance-card,
.dash-summary-item {
    min-width: 0;
}

.dash-balance-card h1,
.dash-summary-item strong,
.activity-row strong {
    overflow-wrap: anywhere;
}

.dash-top-actions {
    flex-wrap: wrap !important;
}

.dash-top-actions .btn {
    flex: 1 1 150px;
    width: auto !important;
}

.activity-row {
    align-items: flex-start;
}

.activity-row span,
.activity-row strong {
    min-width: 0;
}

.product-detail-page .container {
    padding-top: 1rem;
}

.product-detail {
    display: grid;
    gap: 0.95rem;
    padding: clamp(1rem, 3vw, 1.6rem);
    overflow: hidden;
}

.product-detail h1 {
    margin: 0;
    text-align: left;
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.product-detail .description,
.product-detail .price,
.product-detail .stock,
.product-detail .category,
.product-detail form,
.product-detail p {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.product-detail .description {
    margin-bottom: 0.25rem;
}

.product-detail .price,
.product-detail .stock,
.product-detail .category {
    margin-bottom: 0;
}

.product-detail .category {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
}

.product-detail form {
    display: grid;
    gap: 0.85rem;
}

.product-detail .form-group {
    margin-bottom: 0;
}

.product-detail .btn,
.product-back-btn {
    width: fit-content;
    min-width: min(100%, 180px);
}

.product-back-btn {
    margin-top: 1rem;
}

@media (min-width: 760px) {
    .products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-card {
        grid-template-columns: 66px minmax(0, 1fr) minmax(120px, auto) minmax(128px, auto);
        grid-template-areas: "icon details price action";
        align-items: center;
        min-height: 96px;
    }

    .product-price {
        text-align: right;
    }
}

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

    .filter-action .btn {
        width: 100%;
    }

    .category-head-row,
    .section-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

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

    .product-card {
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-areas:
            "icon details"
            "price price"
            "action action";
        gap: 0.45rem 0.5rem;
        padding: 0.7rem;
        min-height: 120px;
    }

    .product-icon {
        width: 42px;
        height: 42px;
    }

    .product-card .product-name {
        font-size: clamp(0.58rem, 2vw, 0.7rem) !important;
        -webkit-line-clamp: 3 !important;
        padding-right: 0 !important;
        word-break: break-all !important;
    }

    .product-card .availability {
        font-size: 0.62rem !important;
    }

    .product-card .product-price {
        font-size: 0.74rem !important;
        margin-top: 0.2rem;
        width: 100% !important;
    }

    .product-card .btn-buy,
    .product-card .btn-out-of-stock {
        font-size: 0.64rem !important;
        min-height: 32px;
        width: 100% !important;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .nav-container {
        min-height: 58px;
    }

    .nav-logo img,
    .logo-link img {
        max-width: clamp(116px, 48vw, 168px) !important;
        max-height: 38px;
    }

    .header-content {
        min-height: 58px;
        padding-inline: 0.85rem;
    }

    .product-category-block {
        padding: 0.85rem;
    }

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

    .product-card {
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-areas:
            "icon details"
            "price price"
            "action action";
        gap: 0.4rem 0.45rem;
        padding: 0.62rem;
        min-height: 116px;
    }

    .product-icon {
        width: 38px;
        height: 38px;
    }

    .product-name {
        font-size: clamp(0.62rem, 2.2vw, 0.74rem);
        -webkit-line-clamp: 3;
    }

    .availability {
        font-size: 0.64rem;
    }

    .product-price {
        font-size: 0.76rem;
    }

    .btn-buy,
    .btn-out-of-stock {
        font-size: 0.66rem;
        min-height: 30px;
    }

    .product-detail .btn,
    .product-back-btn {
        width: 100%;
    }

    .activity-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 420px) {
    .nav-container {
        gap: 0.45rem;
        padding-inline: 0.6rem;
    }

    .nav-profile-icon,
    .profile-icon {
        width: 34px;
        height: 34px;
    }

    .nav-toggle {
        padding: 0.45rem;
    }

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

    .product-card {
        grid-template-columns: 34px minmax(0, 1fr);
        grid-template-areas:
            "icon details"
            "price price"
            "action action";
        gap: 0.35rem 0.4rem;
        padding: 0.52rem;
        min-height: 110px;
    }

    .product-icon {
        width: 34px;
        height: 34px;
    }

    .product-card .product-name {
        font-size: 0.54rem !important;
        -webkit-line-clamp: 3 !important;
        word-break: break-all !important;
    }

    .product-card .availability {
        font-size: 0.58rem !important;
    }

    .product-card .product-price {
        font-size: 0.62rem !important;
        margin-top: 0.2rem;
        width: 100% !important;
    }

    .product-card .btn-buy,
    .product-card .btn-out-of-stock {
        min-height: 28px;
        font-size: 0.58rem !important;
        padding: 0.45rem 0.5rem;
        width: 100% !important;
        margin: 0 auto;
    }
}

/* Admin dashboard final overrides */
body.admin-dashboard-page.premium-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.94)),
        radial-gradient(circle at 8% 8%, rgba(139, 207, 38, 0.16), transparent 26rem),
        radial-gradient(circle at 92% 0%, rgba(38, 50, 56, 0.12), transparent 24rem),
        #f6f8f5;
}

.admin-dashboard-page .container {
    max-width: 1180px;
}

.admin-dashboard-page .admin-navbar {
    position: sticky;
}

.admin-dashboard-page .admin-navbar .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 74px;
    height: auto;
    padding-block: 0.75rem;
}

.admin-dashboard-page .admin-navbar .nav-menu {
    position: static;
    width: auto;
    max-height: none;
    height: auto;
    transform: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.admin-dashboard-page .admin-navbar .nav-menu a {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.admin-dashboard-page .navbar-spacer {
    height: 1rem;
}

.admin-dashboard-page .admin-dashboard {
    display: grid;
    gap: 1rem;
}

.admin-dashboard-page .admin-dashboard-hero,
.admin-dashboard-page .admin-panel,
.admin-dashboard-page .admin-stat-card {
    border-radius: 8px !important;
    border: 1px solid #e1e8dd !important;
    box-shadow: 0 12px 28px rgba(38, 50, 56, 0.07) !important;
    backdrop-filter: none !important;
}

.admin-dashboard-page .admin-dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.4rem);
    background: linear-gradient(135deg, #ffffff, #f8fbf2) !important;
}

.admin-dashboard-page .admin-kicker {
    display: inline-flex;
    margin-bottom: 0.35rem;
    color: #659b18;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-dashboard-page h1 {
    margin: 0;
    color: #263238;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
    line-height: 1.12;
    text-align: left;
}

.admin-dashboard-page .admin-dashboard-hero p {
    max-width: 560px;
    margin: 0.45rem 0 0;
    color: #5d686d;
    font-size: 0.96rem;
}

.admin-dashboard-page .admin-hero-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-dashboard-page .btn {
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    padding: 0.68rem 0.95rem;
    background: #ffffff !important;
    border: 1px solid #dce4df !important;
    color: #263238 !important;
    box-shadow: none !important;
}

.admin-dashboard-page .btn-primary {
    background: linear-gradient(135deg, #8bcf26, #659b18) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

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

.admin-dashboard-page .admin-stat-card {
    display: grid;
    gap: 0.25rem;
    min-height: 126px;
    padding: 1rem;
    text-align: left;
    background: #ffffff !important;
}

.admin-dashboard-page .admin-stat-card span,
.admin-dashboard-page .provider-balance-card span {
    color: #677477;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-dashboard-page .admin-stat-card strong {
    color: #263238;
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.admin-dashboard-page .admin-stat-card small,
.admin-dashboard-page .provider-balance-card small {
    color: #69777a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.admin-dashboard-page .admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
    gap: 1rem;
}

.admin-dashboard-page .admin-panel {
    min-width: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.94) !important;
}

.admin-dashboard-page .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.admin-dashboard-page .section-head h2 {
    margin: 0;
    color: #263238;
    font-size: 1rem;
    line-height: 1.2;
}

.admin-dashboard-page .section-head a {
    color: #659b18;
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

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

.admin-dashboard-page .admin-actions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 0.72rem 0.8rem;
    border: 1px solid #e0e8dc;
    border-radius: 8px;
    background: #f9fbf7;
    color: #263238;
    font-weight: 900;
    text-decoration: none;
}

.admin-dashboard-page .admin-actions a::after {
    content: ">";
    color: #8bcf26;
    font-weight: 900;
}

.admin-dashboard-page .provider-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.65rem;
}

.admin-dashboard-page .provider-balance-card {
    display: grid;
    align-content: start;
    gap: 0.32rem;
    min-height: 112px;
    padding: 0.85rem;
    border-radius: 8px;
    border: 1px solid #e1e8dd;
    background: #f9fbf7;
}

.admin-dashboard-page .provider-balance-card.is-ok {
    border-color: rgba(22, 163, 74, 0.24);
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.admin-dashboard-page .provider-balance-card.is-warning {
    border-color: rgba(217, 119, 6, 0.28);
    background: linear-gradient(135deg, #ffffff, #fff8eb);
}

.admin-dashboard-page .provider-balance-card strong {
    color: #263238;
    font-size: 1.25rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.admin-dashboard-page .orders-table {
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.admin-dashboard-page .orders-table table {
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-dashboard-page .orders-table th {
    background: #f3f7eb;
    color: #5d686d;
    font-size: 0.74rem;
    letter-spacing: 0;
}

.admin-dashboard-page .orders-table th:first-child {
    border-top-left-radius: 8px;
}

.admin-dashboard-page .orders-table th:last-child {
    border-top-right-radius: 8px;
}

.admin-dashboard-page .orders-table td {
    color: #384447;
    font-size: 0.9rem;
}

.admin-dashboard-page .order-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: #eef7dd;
    color: #4d7c0f;
    font-size: 0.78rem;
    font-weight: 900;
}

.admin-dashboard-page .admin-empty-state {
    text-align: center;
    color: #788487;
    font-weight: 800;
}

@media (max-width: 980px) {
    .admin-dashboard-page .admin-navbar .nav-container {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-dashboard-page .admin-navbar .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
    }

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

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

@media (max-width: 640px) {
    .admin-dashboard-page .container {
        padding-inline: 0.7rem;
    }

    .admin-dashboard-page .admin-dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-dashboard-page .admin-hero-actions,
    .admin-dashboard-page .admin-hero-actions .btn {
        width: 100%;
    }

    .admin-dashboard-page .admin-stat-grid,
    .admin-dashboard-page .admin-actions {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-page .admin-panel,
    .admin-dashboard-page .admin-dashboard-hero,
    .admin-dashboard-page .admin-stat-card {
        padding: 0.85rem;
    }

    .admin-dashboard-page .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-dashboard-page .orders-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-dashboard-page .orders-table table {
        min-width: 620px;
    }
}

/* Admin slide navigation */
.admin-page .admin-navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10010;
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid rgba(220, 228, 223, 0.95) !important;
    box-shadow: 0 8px 24px rgba(38, 50, 56, 0.08) !important;
}

.admin-page .admin-navbar .nav-container,
.admin-dashboard-page .admin-navbar .nav-container {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: min(100%, 1180px);
    min-height: 68px !important;
    height: auto !important;
    padding: 0.65rem 1rem !important;
}

.admin-page .admin-navbar .nav-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    justify-self: start;
    min-width: 0;
    overflow: hidden;
}

.admin-page .admin-navbar .admin-site-logo {
    width: 44px;
    height: 44px;
    max-width: 44px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.admin-page .admin-navbar .logo-text {
    min-width: 0;
}

.admin-page .admin-nav-toggle,
.admin-page .admin-sidebar-close {
    border: 1px solid #dce4df;
    background: #ffffff;
    color: #263238;
    cursor: pointer;
    box-shadow: none;
}

.admin-page .admin-nav-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-content: center;
    gap: 5px;
    border-radius: 8px;
}

.admin-page .admin-nav-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: #263238;
}

.admin-page .admin-top-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.56rem 0.8rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #8bcf26, #659b18);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.admin-page .admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.admin-page .admin-sidebar {
    position: fixed;
    top: 0.7rem;
    left: 0.7rem;
    bottom: 0.7rem;
    z-index: 10030;
    width: min(340px, calc(100vw - 1.4rem));
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
    border: 1px solid rgba(220, 228, 223, 0.95);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    transform: translateX(calc(-100% - 1.2rem));
    transition: transform 220ms ease;
    overflow: hidden;
}

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

.admin-page.admin-sidebar-open .admin-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

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

.admin-page .admin-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.25rem 0.8rem;
    border-bottom: 1px solid #edf2e9;
}

.admin-page .admin-sidebar-head div {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
}

.admin-page .admin-sidebar-kicker {
    color: #659b18;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-page .admin-sidebar-head strong {
    color: #263238;
    font-size: 1.02rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-page .admin-sidebar-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 900;
}

.admin-page .admin-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    margin: 0;
    padding: 0.8rem 0 0;
    list-style: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-page .admin-sidebar-menu a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0.65rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #4a575b;
    font-size: 0.95rem;
    font-weight: 850;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.admin-page .admin-sidebar-menu a:hover {
    background: #f3f7eb;
    border-color: #dcebc8;
    color: #263238;
}

.admin-page .admin-sidebar-menu a.active {
    background: linear-gradient(135deg, #8bcf26, #659b18);
    border-color: transparent;
    color: #ffffff;
}

.admin-page .admin-sidebar-logout {
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid #edf2e9;
}

.admin-page .admin-sidebar-logout a {
    color: #b42318;
    background: #fff7f6;
    border-color: #ffe1dd;
}

.admin-page .navbar-spacer,
.admin-dashboard-page .navbar-spacer {
    height: 76px !important;
}

@media (max-width: 640px) {
    .admin-page .admin-navbar .nav-container,
    .admin-dashboard-page .admin-navbar .nav-container {
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        min-height: 62px !important;
        padding: 0.55rem 0.7rem !important;
    }

    .admin-page .admin-top-action {
        min-height: 38px;
        padding-inline: 0.68rem;
        font-size: 0.8rem;
    }

    .admin-page .admin-navbar .logo-brand {
        font-size: 0.95rem;
    }

    .admin-page .admin-navbar .admin-site-logo {
        width: 38px;
        height: 38px;
        max-width: 38px;
    }

    .admin-page .admin-sidebar {
        inset: 0;
        width: min(86vw, 340px);
        border-radius: 0 8px 8px 0;
    }

    .admin-page .navbar-spacer,
    .admin-dashboard-page .navbar-spacer {
        height: 68px !important;
    }
}
