/* KeyForge V2 - Green & White High-Trust Design System */

:root {
    --color-primary: #008060; /* Shopify Green - very soothing, premium high trust */
    --color-primary-hover: #006b50;
    --color-primary-light: #f0fdf4; /* Calming sage-white glow */
    --color-primary-glow: rgba(0, 128, 96, 0.12);
    
    --color-accent: #eab308; /* Amber-Gold for ratings, badges, and accents */
    --color-accent-light: #fef9c3;
    
    --color-bg: #f8fafc; /* Soothing Clean Slate-White background */
    --color-bg-surface: #ffffff; /* Pure white panels */
    --color-bg-secondary: #f1f5f9; /* Soft cool grey secondary bg */
    
    --color-text: #0f172a; /* Slate dark text */
    --color-text-light: #475569; /* Slate grey medium text */
    --color-text-muted: #94a3b8;
    
    --color-border: #cbd5e1;
    --color-border-hover: #94a3b8;
    
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    
    --font-heading: 'Cairo', 'Inter', sans-serif;
    --font-body: 'Cairo', 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-trust: 0 20px 25px -5px rgba(0, 128, 96, 0.04), 0 10px 10px -5px rgba(0, 128, 96, 0.02);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

/* Reset & Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html[dir="rtl"] * {
    letter-spacing: normal !important;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Helper Class for Panels */
.glass-panel {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

/* Main Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.2);
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.header-top-row {
    display: contents;
}

.logo-area {
    order: 1;
}

.nav-links {
    order: 2;
}

.header-actions {
    order: 3;
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.mobile-nav-toggle svg {
    width: 22px;
    height: 22px;
}

.mobile-nav-toggle:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9996;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.admin-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    min-height: 44px;
    padding: 0.65rem 1rem;
    margin-bottom: 0;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-sidebar-toggle svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-sidebar-toggle:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    width: 260px;
}

.search-box input {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.55rem 2.6rem 0.55rem 0.85rem;
    color: var(--color-text);
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

html[dir="rtl"] .search-box input {
    padding: 0.55rem 0.85rem 0.55rem 2.6rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.cart-toggle-btn {
    position: relative;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cart-toggle-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.cart-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.cart-count {
    position: absolute;
    top: -6px;
    left: -6px;
    background: var(--color-danger);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Main Content Area */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    min-height: calc(100vh - 150px);
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content {
    max-width: 780px;
}

.badge {
    display: inline-flex;
    align-items: center;
    background: #dcfce7;
    color: #15803d;
    padding: 0.3rem 0.85rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-desc {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Category filter */
.store-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.8rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 1rem;
}

.filter-headline h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

.filter-headline p {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
}

.cat-tab {
    background: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    padding: 0.5rem 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.cat-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.cat-tab.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.15);
}

/* Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.8rem;
}

.product-card {
    position: relative;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--color-primary-light);
    border-color: var(--color-primary);
}

.product-card-visual {
    height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition-smooth);
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

.product-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Trust Rich Modern Gradients */
.gradient-cyan { background: linear-gradient(135deg, #0f766e 0%, #115e59 100%); color: #ffffff; }
.gradient-purple { background: linear-gradient(135deg, #581c87 0%, #4c1d95 100%); color: #ffffff; }
.gradient-rose { background: linear-gradient(135deg, #9f1239 0%, #881337 100%); color: #ffffff; }
.gradient-emerald { background: linear-gradient(135deg, #065f46 0%, #064e3b 100%); color: #ffffff; }

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid var(--color-border);
}

/* ========================================================================
   PRODUCT TYPE BADGE (product-types.js refactor)
   Shows a small chip on the product card when the product is a digital
   account (or any future non-default type). For the default
   activation_key type the renderer returns "" so the card layout
   stays exactly the same as before the refactor.
   ======================================================================== */

.product-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 2;
}

.product-type-badge-digital_account {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(56, 189, 248, 0.92));
}

.product-type-features {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.product-type-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--color-text);
    font-weight: 600;
}

.product-type-feature-icon {
    font-size: 0.85rem;
}

.product-purchase-facts {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.96));
}

.product-purchase-facts h4 {
    margin: 0 0 0.75rem;
    color: #065f46;
    font-size: 0.95rem;
}

.product-purchase-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.product-purchase-fact {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.55;
}

.customer-ticket-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.support-ticket-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.65rem 0;
}

.support-ticket-context span {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.09);
    color: #047857;
    font-size: 0.78rem;
    font-weight: 700;
}

.customer-ticket-submit-row,
.admin-support-ticket-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.customer-ticket-submit-row .dash-btn-submit {
    flex: 1;
}

.admin-support-tickets-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-support-ticket {
    padding: 1.1rem;
}

.admin-support-ticket-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-support-ticket-head h3,
.admin-support-ticket-head p {
    margin: 0;
}

.admin-support-ticket-head p {
    margin-top: 0.3rem;
    color: var(--color-text-muted);
}

.admin-support-ticket-message {
    padding: 0.8rem;
    border-radius: 10px;
    background: #f8fafc;
    line-height: 1.7;
}

.admin-support-replies {
    display: grid;
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.admin-support-reply {
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem;
    border-inline-start: 3px solid #94a3b8;
    background: #f8fafc;
}

.admin-support-reply.is-admin {
    border-inline-start-color: #059669;
    background: #ecfdf5;
}

.admin-support-reply-input {
    flex: 1;
    min-width: 180px;
}

@media (max-width: 680px) {
    .admin-support-ticket-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.type-specific-fields-grid .type-specific-field-wide {
    grid-column: 1 / -1;
}

.type-specific-fields-grid textarea {
    min-height: 68px;
    resize: vertical;
}

@media (max-width: 680px) {
    .product-purchase-facts-grid,
    .customer-ticket-context-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================
   DIGITAL ACCOUNT DELIVERY (order success / verify modal)
   Used by showInstantCheckoutSuccess + the admin verify modal. Each
   field is its own row so the customer can copy one value at a time
   without the rest of the credentials being copied too.
   ======================================================================== */

.delivered-account-item {
    border-color: rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(56, 189, 248, 0.05));
}

.delivered-account-rows {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.delivered-account-row,
.account-delivery-block .key-value-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.85rem;
}

.delivered-account-label {
    flex: 0 0 110px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(248, 250, 252, 0.6);
    font-weight: 700;
}

.delivered-account-value {
    flex: 1 1 auto;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.delivered-account-row .btn-copy-instant {
    flex: 0 0 auto;
    background: rgba(56, 189, 248, 0.18);
    color: #e0f2fe;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.delivered-account-row .btn-copy-instant:hover {
    background: rgba(56, 189, 248, 0.3);
}

.delivered-account-notes {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid #6366f1;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--color-text);
    line-height: 1.5;
}

.product-card-icon {
    width: 52px;
    height: 52px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.product-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}

.stock-pill {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--color-success-light);
    color: #065f46;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.stock-pill.out-of-stock {
    background: var(--color-danger-light);
    color: #991b1b;
}

.stock-pill.low-stock {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.stock-pill.stock-pill-loading {
    background: rgba(148, 163, 184, 0.2);
    color: var(--color-text-light);
    animation: stock-pill-pulse 1.2s ease-in-out infinite;
}

@keyframes stock-pill-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#modal-product-stock.stock-loading {
    color: var(--color-text-light) !important;
    opacity: 0.7;
}

.product-card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.product-card-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-accent);
    font-size: 0.8rem;
    margin-bottom: 0.85rem;
}

.product-card-rating span {
    color: var(--color-text-muted);
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    padding-top: 0.85rem;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.original-price {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.sale-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Button UI Components */
.btn {
    background: none;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.2);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--color-text);
}

.btn-emerald {
    background: var(--color-success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-emerald:hover {
    background: var(--color-success);
    color: #ffffff;
    border-color: var(--color-success);
}

.btn-danger {
    background: var(--color-danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: var(--color-danger);
    color: #ffffff;
    border-color: var(--color-danger);
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    border: 1px solid #22c55e;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: #ffffff;
    border-color: #128C7E;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.btn-block { width: 100%; }
.btn-lg {
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Modal and Drawers overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    /* Must outrank the sticky site header (z-index: 9999) or the modal gets
       partially hidden behind it on tall content. */
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top, 0px))
             max(1rem, env(safe-area-inset-right, 0px))
             max(1rem, env(safe-area-inset-bottom, 0px))
             max(1rem, env(safe-area-inset-left, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 780px;
    max-height: min(85vh, calc(100vh - 60px));
    position: relative;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    margin: auto;
}

.modal-header-block {
    flex-shrink: 0;
}

.modal-scroll-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 128, 96, 0.45) rgba(0, 128, 96, 0.06);
}

.modal-scroll-body::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll-body::-webkit-scrollbar-track {
    background: rgba(0, 128, 96, 0.04);
    border-radius: 3px;
}

.modal-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(0, 128, 96, 0.35);
    border-radius: 3px;
}

.modal-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 128, 96, 0.55);
}

.modal-footer-actions {
    flex-shrink: 0;
    padding-top: 1rem;
}

.modal-footer-actions.admin-product-modal-footer,
.modal-footer-actions.review-action-btns,
.modal-footer-actions.custom-gw-modal-footer {
    padding-top: 0;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #f1f5f9;
    border: none;
    color: var(--color-text-light);
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 2;
}

html[dir="ltr"] .modal-close-btn {
    left: auto;
    right: 1rem;
}

#checkout-modal .checkout-step {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#checkout-modal .modal-content {
    max-height: min(90vh, calc(100vh - 48px));
    max-height: min(90dvh, calc(100dvh - 48px));
    min-height: min(72vh, 680px);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

#checkout-modal .payment-options {
    max-height: none;
    overflow: visible;
}

.checkout-payment-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#admin-verify-payment-modal .review-action-btns {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #ffffff 100%);
    border-top: 1px solid var(--color-border);
    margin: 0 -2rem -2rem;
    padding: 1rem 2rem 1.25rem;
    z-index: 2;
}

html[dir="rtl"] .cart-drawer {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--color-border);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    animation: slideInRight 0.25s ease-out forwards;
}

html[dir="ltr"] .cart-drawer {
    left: 0;
    right: auto;
    animation: slideInLeft 0.25s ease-out forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: var(--color-text);
}

.animated-scale {
    animation: scaleIn 0.2s ease-out forwards;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Product Detail Grid Layout */
.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

.product-modal-visual {
    height: 100%;
    min-height: 220px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-visual svg {
    width: 80px;
    height: 80px;
}

.product-modal-info {
    display: flex;
    flex-direction: column;
}

.category-badge {
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.product-modal-info h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.modal-rating {
    color: var(--color-accent);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.product-modal-desc {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

.modal-activation-guide {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
}

.modal-activation-guide h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--color-primary);
}

.modal-activation-guide ol {
    padding-right: 1.1rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--color-text-light);
}

.modal-activation-guide li {
    margin-bottom: 0.3rem;
}

.modal-stock-status {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.modal-stock-status strong {
    color: #059669;
}

.modal-footer-action {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1.2rem;
    margin-top: auto;
}

.modal-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.modal-price-area {
    display: flex;
    flex-direction: column;
}

.modal-price-area .original-price,
.modal-price-area .sale-price {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.modal-price-area .original-price.price-updating,
.modal-price-area .sale-price.price-updating {
    opacity: 0.35;
    transform: translateY(-4px);
}

.modal-price-area .original-price { font-size: 0.8rem; }
.modal-price-area .sale-price { font-size: 1.5rem; }

/* Duration selector — product detail modal */
.duration-selector-wrap {
    width: 100%;
}

.duration-selector-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 0.55rem;
}

.duration-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.duration-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.duration-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.duration-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    background: #ffffff;
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    white-space: nowrap;
    line-height: 1.3;
}

.duration-pill .duration-pill-price {
    font-weight: 800;
    color: var(--color-primary);
}

.duration-pill input:checked + span .duration-pill-price,
.duration-pill.active span .duration-pill-price {
    color: #ffffff;
}

.duration-pill:hover span {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.duration-pill input:checked + span,
.duration-pill.active span {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(0, 128, 96, 0.18);
}

html[dir="rtl"] .duration-selector {
    flex-direction: row;
}

/* Admin pricing mode toggle */
.admin-pricing-mode-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    background: rgba(16, 185, 129, 0.04);
}

.admin-pricing-mode-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text);
}

.admin-pricing-mode-option input[type="radio"] {
    accent-color: #10b981;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.admin-fixed-pricing-wrap.hidden,
#admin-duration-pricing-wrap.hidden {
    display: none;
}

/* Admin duration pricing tiers */
.duration-pricing-section {
    padding: 1.1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
}

.duration-pricing-heading {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.duration-pricing-desc {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.55;
}

.duration-pricing-tier {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    margin-bottom: 0.65rem;
}

.duration-pricing-tier:last-child {
    margin-bottom: 0;
}

.duration-pricing-tier-lifetime {
    border-color: rgba(0, 128, 96, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.duration-tier-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px dashed var(--color-border);
}

.duration-tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.4rem;
    border-radius: 6px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 800;
}

.duration-tier-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
}

.admin-duration-pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.admin-duration-pricing-grid .duration-pricing-tier {
    margin-bottom: 0;
}

/* Admin product modal — scrollable body + sticky footer */
#admin-product-modal .modal-content {
    padding: 0;
}

#admin-product-modal .admin-product-modal-header {
    flex-shrink: 0;
    padding: 2rem 2rem 0.75rem;
    padding-left: 3rem;
}

#admin-product-modal .admin-product-modal-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: 0.65rem;
}

#admin-product-modal .admin-product-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#admin-product-modal .admin-product-modal-body {
    padding: 0.5rem 2rem 1rem;
}

.modal-footer-btns {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#admin-product-modal .admin-product-modal-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: 1rem 2rem 1.25rem;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-top: 1px solid rgba(0, 128, 96, 0.22);
    box-shadow: 0 -4px 12px rgba(0, 128, 96, 0.06);
}

.price-from-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.1rem;
}

.cart-item-duration {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 600;
    margin-top: 0.1rem;
}

/* Cart drawer sliding layout */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1000;
}

.cart-drawer {
    position: absolute;
    top: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: #ffffff;
    border-right: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.cart-drawer-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-close-btn {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.2rem 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.cart-item-visual {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-visual svg {
    width: 20px;
    height: 20px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.15rem;
}

.cart-item-info .price {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 600;
}

.cart-item-remove-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0.3rem;
}

.cart-item-remove-btn:hover {
    color: var(--color-danger);
}

.cart-drawer-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: #f8fafc;
}

.coupon-section {
    margin-bottom: 1rem;
}

.coupon-input {
    display: flex;
    gap: 0.4rem;
}

.coupon-input input {
    flex-grow: 1;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    font-size: 0.875rem;
}

.coupon-input input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.feedback-msg {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    margin-top: 0.25rem;
}

.feedback-msg.success { color: var(--color-success); }
.feedback-msg.error { color: var(--color-danger); }

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.discount-row { color: var(--color-success); font-weight: 600; }
.total-row {
    border-top: 1px solid var(--color-border);
    padding-top: 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Forms CSS elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.4rem;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    color: var(--color-text);
    font-size: 0.9375rem;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(21, 128, 61, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.helper-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-top: 0.25rem;
    display: block;
}

.max-width-md { max-width: 680px; }
.text-center { text-align: center; }

/* Checkout methods panel */
.checkout-step {
    animation: fadeIn 0.2s ease forwards;
}

.checkout-step h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.checkout-step > p,
.checkout-step .modal-header-block p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.payment-methods {
    margin-bottom: 1.5rem;
}

.payment-methods > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
    max-height: min(48vh, 380px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Global constraint so every official/CDN logo stays compact & crisp */
.payment-logo {
    max-height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}

.payment-logo-fallback {
    max-height: none;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--color-text);
    white-space: nowrap;
}

/* Moroccan Cash Plus / Wafacash styled badge (no public CDN logo) */
.cashplus-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #c1272d, #006233);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.1;
}

.cashplus-badge .cashplus-flag {
    font-size: 0.85rem;
    line-height: 1;
}

.checkout-no-gateway-msg {
    color: var(--color-danger);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem;
    background: var(--color-danger-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.pay-option input { display: none; }

/* Gateway instructions layout */
.gateway-instruction-box {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
}

.gateway-instruction-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.gateway-instruction-box p {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.copy-input {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.copy-input input {
    flex-grow: 1;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    font-family: monospace;
    font-size: 0.9375rem;
    font-weight: 500;
}

.instruction-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.55;
    border-top: 1px solid var(--color-border);
    padding-top: 0.6rem;
    margin-top: 0.6rem;
}

/* File Upload Mock Field */
.file-upload-wrapper {
    position: relative;
    height: 38px;
    background: #ffffff;
    border: 1px dashed var(--color-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 0.8rem;
    cursor: pointer;
    overflow: hidden;
}

.file-input-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-btn-mock {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 0.5rem;
    z-index: 1;
}

.file-upload-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 180px;
    z-index: 1;
}

/* Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.neon-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(21, 128, 61, 0.1);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success details styles */
.success-icon-badge {
    width: 60px;
    height: 60px;
    background: var(--color-success-light);
    border: 2px solid var(--color-success);
    color: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem auto;
}

.success-icon-badge svg {
    width: 32px;
    height: 32px;
}

.success-icon-badge.pending-icon {
    background: var(--color-warning-light);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

.delivered-keys-box {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
}

.delivered-keys-box h3 {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: 0.8rem;
}

.key-display-item {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.key-display-item:last-child { margin-bottom: 0; }

.key-title {
    font-size: 0.875rem;
    font-weight: 700;
}

.key-value-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.key-string {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.pending-info-box {
    background: var(--color-primary-light);
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.pending-info-box p {
    margin-bottom: 0.4rem;
}

.activation-guide-box {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--color-text-light);
}

.activation-guide-box h4 {
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

/* Tracker Result Layout */
.tracker-container {
    max-width: 650px;
    margin: 3rem auto;
}

/* Redesigned tracker search card (scoped to the tracker view only) */
.tracker-card {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    padding: 48px 40px;
    background: #ffffff;
    border: none;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.tracker-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #008060;
    border-radius: 24px 24px 0 0;
}

.tracker-header {
    text-align: center;
    margin-bottom: 0;
}

.tracker-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #006048, #008060);
    border: none;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.tracker-icon svg {
    width: 36px;
    height: 36px;
}

.tracker-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 8px;
}

.tracker-header p {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
    margin-bottom: 28px;
}

.tracker-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tracker-form input {
    width: 100%;
    height: 52px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 0 20px;
    color: var(--color-text);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tracker-form input:focus {
    outline: none;
    border-color: #008060;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.1);
}

.tracker-form .btn {
    width: 100%;
    height: 52px;
    margin-top: 12px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #006048, #008060);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.tracker-form .btn:hover {
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

@media (max-width: 560px) {
    .tracker-card {
        padding: 36px 22px;
    }
}

.tracker-results {
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
}

.tracked-order-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.tracked-order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.tracked-order-header strong {
    color: var(--color-text);
}

.tracked-order-items {
    border-top: 1px dashed var(--color-border);
    border-bottom: 1px dashed var(--color-border);
    padding: 0.85rem 0;
    margin-bottom: 0.85rem;
}

.tracked-item-row {
    margin-bottom: 0.85rem;
}

.tracked-item-row:last-child { margin-bottom: 0; }

.tracked-item-info {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.4rem;
}

.tracked-key-line {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tracked-key-line span {
    font-family: monospace;
    color: var(--color-primary);
    font-weight: 700;
}

/* Admin Dashboard Portal */
body.admin-page .admin-layout,
.admin-layout {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 0.85rem;
    /* LTR flex axis: row-reverse + DOM (toggle, sidebar, main) → main left, sidebar right */
    direction: ltr;
}

html[dir="ltr"] body.admin-page .admin-layout,
html[dir="ltr"] .admin-layout {
    flex-direction: row;
    direction: ltr;
}

.admin-sidebar {
    flex: 0 0 280px;
    direction: rtl;
    padding: 1.2rem;
    height: fit-content;
    position: sticky;
    top: 4.75rem;
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(236, 253, 245, 0.96) 50%,
        rgba(209, 250, 229, 0.92) 100%
    );
    border-inline-start: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow: -4px 0 24px rgba(6, 78, 59, 0.06);
}

html[dir="ltr"] .admin-sidebar {
    direction: ltr;
    border-inline-start: none;
    border-inline-end: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow: 4px 0 24px rgba(6, 78, 59, 0.06);
}

.admin-main-panel {
    flex: 1;
    min-width: 0;
    min-height: 480px;
    direction: rtl;
}

html[dir="ltr"] .admin-main-panel {
    direction: ltr;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.2rem;
}

.admin-profile .avatar {
    width: 38px;
    height: 38px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.admin-profile .avatar svg {
    width: 18px;
    height: 18px;
}

.admin-profile h4 {
    font-size: 0.85rem;
    font-weight: 700;
}

.admin-profile p {
    font-size: 0.875rem;
    color: #10b981;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.menu-item {
    position: relative;
    display: block;
    color: var(--color-text-light);
    text-decoration: none;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.admin-sidebar .menu-item:hover {
    background: rgba(236, 253, 245, 0.85);
    color: var(--color-primary);
}

.menu-item.active {
    background: var(--color-primary-light);
    border-inline-end: 3px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
}

.logout-btn { margin-top: 0.85rem; }

/* Admin Content Panel */
body.admin-page .admin-main-panel {
    padding-inline-end: 0.25rem;
}

.admin-tab-content {
    display: none;
    /* When scrollIntoView() jumps to a tab, leave enough room above for
       the sticky sidebar (top: 4.75rem ≈ 76px) plus a small breathing gap
       so the tab header doesn't tuck under the sidebar border. */
    scroll-margin-top: 6.5rem;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.tab-header {
    margin-bottom: 1.5rem;
}

.tab-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.15rem;
}

.tab-header p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Stats counter cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.bg-green { background: var(--color-primary); }
.bg-blue { background: #3b82f6; }
.bg-emerald { background: #10b981; }
.bg-orange { background: #f97316; }

.border-green { border-color: rgba(21, 128, 61, 0.1); }
.border-blue { border-color: rgba(59, 130, 246, 0.1); }
.border-emerald { border-color: rgba(16, 185, 129, 0.1); }
.border-orange { border-color: rgba(249, 115, 22, 0.1); }

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.15rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Charts + lists dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 1.5rem;
}

.chart-box, .notifications-box {
    padding: 1.5rem;
}

.chart-box h3, .notifications-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.6rem;
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.alert-item.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.alert-item.warning {
    border-color: #fef3c7;
    background: #fffbeb;
}

.alert-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.alert-item.danger .alert-dot { background: var(--color-danger); }
.alert-item.warning .alert-dot { background: var(--color-warning); }


.alert-text {
    flex-grow: 1;
}

/* Overview analytics layout */
.overview-analytics-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.overview-analytics-charts-grid {
    margin-top: 0;
}

.overview-analytics-stats-row {
    margin-bottom: 0;
}

.overview-alerts-wrap {
    margin-top: 1.5rem;
}

.overview-alerts-wrap .notifications-box {
    padding: 1.5rem;
}

.overview-alerts-wrap .notifications-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.6rem;
}

#overview-sales-dots circle {
    fill: #10b981;
    stroke: #fff;
    stroke-width: 2;
}

/* Analytics dashboard */
.analytics-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.analytics-compare {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.35rem;
}

.analytics-compare.positive { color: #10b981; }
.analytics-compare.negative { color: #ef4444; }

.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.analytics-chart-wide {
    grid-column: 1 / -1;
}

.analytics-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 180px;
}

.analytics-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1fr auto;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.analytics-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
    font-weight: 600;
}

.analytics-bar-track {
    height: 10px;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.analytics-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    border-radius: 999px;
    min-width: 4px;
    transition: width 0.4s ease;
}

.analytics-bar-value {
    font-weight: 700;
    color: #059669;
    min-width: 2.5rem;
    text-align: left;
}

.analytics-bar-empty {
    text-align: center;
    color: var(--color-text-light);
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

#analytics-sales-dots circle {
    fill: #10b981;
    stroke: #fff;
    stroke-width: 2;
}

@media (max-width: 900px) {
    .analytics-charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Tables design */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th, td {
    padding: 0.9rem 1.2rem;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--color-border);
}

th {
    color: var(--color-text-light);
    font-weight: 700;
}

.table-container tbody td {
    font-weight: 500;
    color: var(--color-text-light);
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: #f8fafc;
}

.badge-pill {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}

.badge-completed {
    background: var(--color-success-light);
    color: #065f46;
}

.badge-refunded {
    background: var(--color-danger-light);
    color: #991b1b;
}

.product-row-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
}

.product-row-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-row-icon svg {
    width: 16px;
    height: 16px;
}

.actions-cell {
    display: flex;
    gap: 0.4rem;
}

.admin-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.btn-delete-order {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-delete-order:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.btn-whatsapp-delivery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #ffffff;
    border: 1px solid #1da851;
    padding: 0.28rem 0.5rem;
    min-width: 2rem;
    line-height: 1;
}

.btn-whatsapp-delivery:hover,
.btn-whatsapp-delivery:focus-visible {
    background: #1ebe57;
    color: #ffffff;
    border-color: #1a9e4a;
}

.btn-whatsapp-delivery .admin-whatsapp-icon {
    color: currentColor;
}

/* Settings Form grids */
.settings-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
}

.settings-form, .settings-coupons {
    padding: 1.5rem;
}

.settings-form h3, .settings-coupons h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.coupon-input-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr auto;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.coupon-input-row input {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    font-size: 0.875rem;
}

.coupons-list-container {
    max-height: 220px;
    overflow-y: auto;
}

.coupons-list-container th, .coupons-list-container td {
    padding: 0.55rem 0.85rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Payment Gateways Dashboard */
.gateways-setup-section {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.gateways-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-add-custom-gw {
    flex-shrink: 0;
    font-weight: 700;
    white-space: nowrap;
}

.gateways-section-header h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
}

.gateways-section-header p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.gateways-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gateway-setup-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 128, 96, 0.12);
    border-inline-start: 4px solid var(--color-primary);
    border-radius: 16px;
    padding: 1.1rem 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gateway-setup-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08), var(--shadow-sm);
}

.gateway-setup-card.is-disabled {
    opacity: 0.72;
    background: rgba(248, 250, 252, 0.95);
    border-inline-start-color: #cbd5e1;
}

.gw-logo {
    width: 30px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(0, 128, 96, 0.08), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(0, 128, 96, 0.12);
    padding: 2px 4px;
    overflow: hidden;
    line-height: 0;
}

.gw-logo svg,
.gw-logo .gw-logo-img,
.gw-logo-img {
    max-height: 22px;
    max-width: 40px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 3px;
}

.gateway-setup-card.is-custom {
    border-color: rgba(0, 128, 96, 0.22);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.5), rgba(255, 255, 255, 0.95));
}

/* ---- Delete button: absolute positioned top-left on custom gateway card ---- */
.gateway-delete-btn {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #fee2e2;
    background: #fff;
    color: #ef4444;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10;
}
.gateway-delete-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    transform: scale(1.1);
}

/* ---- Section header action wrapper (so we can add more buttons later) ---- */
.gateways-section-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Quick gateway toggle cards (prominent section at top of Tab 10) ---- */
#admin-gateways-section.settings-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 16px;
}
#admin-gateways-section h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.3rem;
}
#admin-gateways-section .settings-card-sub {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1.1rem;
    line-height: 1.5;
}
.gateway-toggle-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
    gap: 1rem;
}
.gateway-toggle-card.gateway-enabled {
    border-inline-start: 4px solid #008060;
    background: #f0fdf4;
}
.gateway-toggle-card .gateway-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.gateway-toggle-card .gateway-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.gateway-toggle-card .gateway-icon .gw-logo,
.gateway-toggle-card .gateway-icon .gw-logo-toggle,
.gateway-toggle-card .gateway-icon .gw-logo-img,
.gateway-toggle-card .gateway-icon svg,
.gateway-toggle-card .gateway-icon img {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.gateway-toggle-card .gateway-icon .payment-logo,
.gateway-toggle-card .gateway-icon .payment-logo-fallback {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text);
}
/* Hide the entire card when the admin has hard-deleted the built-in so the
   Quick Toggles section stays in sync with the detail cards below. */
.gateway-toggle-card.is-deleted {
    display: none;
}
.gateway-toggle-card .gateway-info strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}
.gateway-toggle-card .gateway-info small {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-light);
    line-height: 1.3;
}

.gateway-type-badge {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 128, 96, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(0, 128, 96, 0.18);
}

.gateway-type-badge.type-wallet { background: rgba(59, 130, 246, 0.1); color: #2563eb; border-color: rgba(59, 130, 246, 0.2); }
.gateway-type-badge.type-bank { background: rgba(0, 128, 96, 0.1); color: var(--color-primary); }
.gateway-type-badge.type-crypto { background: rgba(245, 158, 11, 0.12); color: #d97706; border-color: rgba(245, 158, 11, 0.25); }

.gateway-card-btns {
    display: flex;
    gap: 0.35rem;
}

.btn-gw-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: #fff;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.85rem;
    line-height: 1;
}

.btn-gw-icon:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.btn-gw-icon.btn-gw-delete:hover {
    border-color: var(--color-danger);
    background: var(--color-danger-light);
    color: var(--color-danger);
}

/* Emerald ON/OFF toggle switch */
.gw-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.gw-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gw-switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: var(--transition-fast);
}

.gw-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: var(--transition-fast);
}

html[dir="rtl"] .gw-switch-track::after {
    left: auto;
    right: 3px;
}

.gw-switch input:checked + .gw-switch-track {
    background: linear-gradient(135deg, #10b981, #008060);
}

.gw-switch input:checked + .gw-switch-track::after {
    transform: translateX(20px);
}

html[dir="rtl"] .gw-switch input:checked + .gw-switch-track::after {
    transform: translateX(-20px);
}

.gw-switch-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 1.75rem;
}

.gw-switch input:checked ~ .gw-switch-label {
    color: var(--color-primary);
}

/* ===== Refactored admin gateway row: [Logo][Name+Desc][Toggle] ===== */
.gateway-row-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(0, 128, 96, 0.15);
}

.gateway-row-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 32px;
    flex-shrink: 0;
}

.gateway-row-logo .gw-logo {
    width: auto;
    height: auto;
    max-width: 44px;
    background: none;
    border: none;
    padding: 0;
}

.gateway-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.gateway-row-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gateway-row-desc {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gateway-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ===== Premium emerald pill toggle switch ===== */
.emerald-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.emerald-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.emerald-switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.emerald-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.emerald-switch input:checked + .emerald-switch-track {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 2px 8px rgba(16, 185, 129, 0.25);
}

.emerald-switch input:checked + .emerald-switch-track::after {
    transform: translateX(20px);
}

.emerald-switch-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 1.75rem;
}

.emerald-switch input:checked ~ .emerald-switch-label {
    color: #047857;
}

/* RTL-safe knob travel */
html[dir="rtl"] .emerald-switch-track::after {
    left: auto;
    right: 3px;
}

html[dir="rtl"] .emerald-switch input:checked + .emerald-switch-track::after {
    transform: translateX(-20px);
}

.gateway-details-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gateway-details-inputs .mini-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.gateway-details-inputs label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gateway-details-inputs input,
.gateway-details-inputs textarea {
    padding: 0.55rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    transition: var(--transition-fast);
    font-family: inherit;
}

.gateway-details-inputs input:focus,
.gateway-details-inputs textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.gateway-details-inputs textarea {
    resize: vertical;
    min-height: 64px;
}

/* Admin gateway logo upload */
.gw-logo-upload-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.gw-logo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    border: 1px dashed rgba(0, 128, 96, 0.25);
    background: #f8fafc;
    flex-shrink: 0;
}

.gw-logo-preview .gw-logo-preview-img,
.gw-logo-preview .gw-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.gw-logo-preview svg,
.gw-logo-preview .payment-logo,
.gw-logo-preview .gw-logo-img {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.gw-logo-upload-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}

.gw-logo-upload-hint {
    margin: 0;
    font-size: 0.72rem;
    color: var(--color-text-light);
    line-height: 1.35;
}

.gw-logo-file-input.hidden {
    display: none;
}

.gateways-save-sticky {
    position: sticky;
    bottom: 0;
    margin-top: 1.5rem;
    padding: 1rem 0 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 70%, transparent);
    border-top: 1px solid rgba(0, 128, 96, 0.1);
    z-index: 2;
}

.gateways-save-sticky .btn-lg {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Custom Gateway Modal */
.custom-gw-modal-shell {
    max-width: 520px;
}

.custom-gw-modal-header h2 {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    color: var(--color-primary);
}

.custom-gw-type-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 128, 96, 0.04);
    border: 1px dashed rgba(0, 128, 96, 0.15);
}

.custom-gw-enabled-row {
    margin-top: 0.25rem;
}

.custom-gw-enabled-switch {
    justify-content: flex-start;
}

.custom-gw-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.custom-gw-modal-footer {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.required-mark {
    color: var(--color-danger);
}

/* Checkout payment option cards — emerald theme */
.pay-option {
    position: relative;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 16px;
    padding: 1rem 0.75rem 0.85rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 132px;
    flex: 1 1 auto;
}

.payment-method-card {
    min-width: 0;
}

.pay-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
}

.pay-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-bottom: 0.15rem;
}

.pay-logo-wrap .pay-logo,
.pay-logo-wrap .gw-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    line-height: 0;
}

.pay-logo-wrap svg,
.pay-logo-wrap .payment-logo,
.pay-logo-wrap .gw-logo-img {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

.pay-option-check {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #008060;
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 128, 96, 0.35);
}

.pay-option-check-icon {
    width: 13px;
    height: 13px;
}

.pay-option.active .pay-option-check {
    display: inline-flex;
}

.pay-option .pay-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
    width: 100%;
}

.pay-option .pay-desc {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.35;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pay-option .wallet-balance-chip {
    margin-top: 0.15rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-primary);
}

.pay-option .wallet-insufficient-hint {
    font-size: 0.625rem;
    color: var(--color-danger);
    line-height: 1.3;
}

.pay-option:hover {
    border-color: #008060;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.pay-option.active {
    border: 2px solid #008060;
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(0, 128, 96, 0.12), 0 8px 20px rgba(0, 128, 96, 0.14);
}

.pay-option.active .pay-title {
    color: var(--color-primary);
}

.pay-option.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.pay-option.paypal-gateway:hover,
.pay-option.paypal-gateway.active {
    border-color: #003087;
    background: linear-gradient(145deg, rgba(0, 48, 135, 0.06), #ffffff);
    box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.18), 0 4px 14px rgba(0, 48, 135, 0.12);
}

.pay-option.paypal-gateway.active .pay-title,
.pay-option.paypal-gateway:hover .pay-title {
    color: #003087;
}

.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
}

.checkout-copy-btn {
    flex-shrink: 0;
}

.pay-option .pay-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.pay-option.cryptomus-gateway:hover,
.pay-option.cryptomus-gateway.active {
    border-color: rgba(34, 211, 238, 0.55);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.04), #ffffff);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.18), 0 4px 14px rgba(34, 211, 238, 0.1);
}

.pay-option.cryptomus-gateway.active .pay-title,
.pay-option.cryptomus-gateway:hover .pay-title {
    color: #0f766e;
}

.checkout-gw-panel.cryptomus-checkout-panel {
    border-color: rgba(34, 211, 238, 0.25);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.05), rgba(16, 185, 129, 0.03));
}

.checkout-cryptomus-note,
.admin-gw-cryptomus-note {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.cryptomus-checkout-summary .checkout-gw-field-value {
    font-weight: 700;
    color: var(--color-primary);
}

/* Cryptomus card badges & checkout crypto promo */
.pay-option.cryptomus-gateway.has-top-badge {
    padding-top: 1.65rem;
}

.pay-option-top-badge {
    position: absolute;
    top: 0;
    inset-inline: 0;
    padding: 0.28rem 0.45rem;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(90deg, #059669, #10b981);
    border-radius: 11px 11px 0 0;
    letter-spacing: 0.01em;
}

.cryptomus-instant-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    line-height: 1.25;
}

.cryptomus-card-desc {
    font-size: 0.625rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.35;
    width: 100%;
    display: block;
    margin-top: 0.05rem;
}

.checkout-crypto-promo-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.85rem 0 1rem;
}

.checkout-crypto-why-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 2px dashed rgba(16, 185, 129, 0.45);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(236, 253, 245, 0.95));
}

.checkout-crypto-why-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.checkout-crypto-why-body {
    flex: 1;
    min-width: 0;
}

.checkout-crypto-why-title {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.3;
}

.checkout-crypto-why-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem 0.65rem;
}

.checkout-crypto-why-checks li {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
}

.checkout-crypto-best-choice {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    border-radius: 999px;
}

.checkout-crypto-discount-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), #ffffff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-crypto-discount-section.is-active {
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.checkout-crypto-discount-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.12);
}

.checkout-crypto-discount-text {
    flex: 1;
    min-width: 0;
}

.checkout-crypto-discount-text strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.checkout-crypto-discount-text p {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.4;
}

.checkout-crypto-discount-amount {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #059669;
    white-space: nowrap;
}

.checkout-crypto-discount-amount.is-muted {
    color: #94a3b8;
    font-size: 0.8125rem;
}

/* Admin crypto checkout settings */
.admin-settings-hint {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.crypto-checkout-settings-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px dashed var(--color-border);
    background: rgba(248, 250, 252, 0.7);
}

@media (max-width: 720px) {
    .checkout-crypto-why-banner {
        flex-wrap: wrap;
    }

    .checkout-crypto-why-checks {
        grid-template-columns: 1fr;
    }

    .checkout-crypto-best-choice {
        width: 100%;
    }
}

.checkout-gw-panel.paypal-checkout-panel {
    border-color: rgba(0, 48, 135, 0.25);
    background: linear-gradient(145deg, #f5f8fc, #ffffff);
}

.tracked-payment-paypal {
    color: #003087;
}

.checkout-gw-panel {
    border-color: rgba(0, 128, 96, 0.2);
    background: linear-gradient(145deg, #f8fffe, #ffffff);
}

.checkout-gw-details {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.checkout-gw-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkout-gw-field-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.checkout-gw-field-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
}

.checkout-gw-instructions,
#checkout-payment-instructions {
    margin-top: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--color-border);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

html[dir="ltr"] .checkout-gw-instructions,
html[dir="ltr"] #checkout-payment-instructions,
html[dir="ltr"] .checkout-payment-form .checkout-submit-btn,
html[dir="ltr"] .product-card-footer .btn-buy-now {
    text-align: left;
}

html[dir="rtl"] .checkout-gw-instructions,
html[dir="rtl"] #checkout-payment-instructions,
html[dir="rtl"] .checkout-payment-form .checkout-submit-btn,
html[dir="rtl"] .product-card-footer .btn-buy-now {
    text-align: right;
}

.product-card-footer .btn-buy-now,
.checkout-payment-form .checkout-submit-btn {
    white-space: normal;
    line-height: 1.35;
    min-height: 2.5rem;
}

/* Checkout payment proof fields (anti-fraud) */
.checkout-proof-fields {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 128, 96, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.checkout-proof-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.checkout-proof-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    background: #ffffff;
    border: 1px solid rgba(0, 128, 96, 0.18);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-proof-input::placeholder {
    color: var(--color-text-light);
    opacity: 0.75;
}

.checkout-proof-input:hover {
    border-color: rgba(16, 185, 129, 0.35);
}

.checkout-proof-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.checkout-receipt-upload.premium-upload {
    height: auto;
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    border: 1px dashed rgba(0, 128, 96, 0.28);
    border-radius: 8px;
    background: linear-gradient(145deg, #f8fffe, #ffffff);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.checkout-receipt-upload.premium-upload:hover,
.checkout-receipt-upload.premium-upload:focus-within {
    border-color: var(--color-primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.checkout-receipt-upload .file-upload-btn-mock {
    color: var(--color-primary);
    font-weight: 700;
}

.checkout-receipt-preview {
    position: relative;
    margin-top: 0.5rem;
    display: inline-flex;
    align-self: flex-start;
}

.checkout-receipt-preview-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 96, 0.2);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.checkout-receipt-preview-remove {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Anti-fraud proof required alert */
.proof-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.proof-alert-card {
    width: 100%;
    max-width: 480px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.proof-alert-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.proof-alert-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.85rem;
}

.proof-alert-message {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.75;
    text-align: start;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: rgba(254, 243, 199, 0.45);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
}

.proof-alert-dismiss {
    font-weight: 700;
}

html[dir="rtl"] .proof-alert-message {
    text-align: right;
}

/* NEW: Verification Review Popup Receipt Layout (Drawing realistic receipt) */
.payment-review-details {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.review-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.review-row-grid:last-child { margin-bottom: 0; }

.review-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-light);
    display: block;
    margin-bottom: 0.15rem;
}

.review-value {
    font-size: 0.9375rem;
    color: var(--color-text);
}

.review-value.highlight-price {
    font-size: 1.15rem;
    color: var(--color-primary);
    font-weight: 700;
}

.review-value.highlight-ref {
    font-family: monospace;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 0.5px;
}

.receipt-preview-box h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.receipt-image-container {
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    min-height: 280px;
    max-height: 380px;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
    gap: 0.5rem;
}

.receipt-preview-thumb-btn {
    border: none;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.receipt-preview-thumb-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

.receipt-preview-thumb {
    max-width: 100%;
    max-height: 280px;
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 96, 0.2);
    display: block;
    margin: 0 auto;
    object-fit: contain;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.receipt-preview-hint {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0;
}

.review-action-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1.25rem;
}

/* Toast container styling */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--color-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    color: #ffffff;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    z-index: 10000;
    display: flex;
    align-items: center;
    animation: slideInRight 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideInRight {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}

.toast-container.hidden { display: none; }

/* Premium White & Green Footer styling */
.main-footer {
    border-top: 3px solid #008060;
    background: #ffffff;
    margin-top: 4.5rem;
    padding: 60px 0 0 0;
    box-shadow: 0 -10px 40px rgba(0, 128, 96, 0.02);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 1. PRODUCT SLIDER CAROUSEL SECTION */
.footer-slider-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.25rem 1.5rem 1rem;
}

.footer-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 0.9rem;
    border-bottom: 2px solid var(--color-border);
}

/* Keep the nav arrows visually on the RIGHT of the title row in both directions */
html[dir="rtl"] .footer-slider-header {
    flex-direction: row-reverse;
}

.footer-slider-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text);
    position: relative;
    margin: 0;
    padding-bottom: 0.6rem;
    display: inline-block;
    line-height: 1.2;
}

.footer-slider-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

html[dir="rtl"] .footer-slider-title::after { right: 0; }
html[dir="ltr"] .footer-slider-title::after { left: 0; }

.footer-slider-nav {
    display: flex;
    gap: 0.5rem;
}

.footer-slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: #ffffff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.footer-slider-nav-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 128, 96, 0.22);
}

.footer-slider-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* RTL layout fixes for arrows */
html[dir="rtl"] .footer-slider-nav-btn.prev-btn svg,
html[dir="ltr"] .footer-slider-nav-btn.next-btn svg {
    transform: rotate(0deg);
}
html[dir="rtl"] .footer-slider-nav-btn.next-btn svg,
html[dir="ltr"] .footer-slider-nav-btn.prev-btn svg {
    transform: rotate(180deg);
}

.footer-slider-container {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.75rem 0.25rem 1.75rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.footer-slider-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.footer-slider-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 16px;
    min-width: 280px;
    width: 280px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.footer-slider-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--color-primary-light);
}

.slider-card-visual {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.slider-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.footer-slider-card:hover .slider-card-image {
    transform: scale(1.08);
}

.slider-card-icon {
    color: var(--color-primary);
    opacity: 0.85;
}

.slider-card-icon svg {
    width: 26px;
    height: 26px;
}

.slider-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex-grow: 1;
    min-width: 0;
}

.slider-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
    text-align: start;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-card-rating {
    font-size: 12px;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin: 0.15rem 0;
}

.slider-card-price {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    gap: 0.4rem;
}

.slider-card-price .price-from-label {
    margin-bottom: 0;
    flex-basis: 100%;
}

.slider-card-price .original-price,
.slider-card-price .sale-price {
    display: inline;
}

.slider-card-price .original-price {
    font-size: 13px;
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.slider-card-price .sale-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-primary);
}

.slider-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 0.4rem;
}

.slider-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.slider-action-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.25);
}

.slider-action-btn svg {
    width: 16px;
    height: 16px;
}

/* 2. SOCIAL MEDIA SECTION ROW */
.footer-social-row {
    background: var(--color-primary-light);
    border-top: 1px solid rgba(0, 128, 96, 0.06);
    border-bottom: 1px solid rgba(0, 128, 96, 0.06);
    padding: 1.75rem 0;
}

.footer-social-row.hidden {
    display: none;
}

.footer-social-icons .social-icon-btn.hidden {
    display: none;
}

.footer-social-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.footer-social-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social-icons .social-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    outline: none;
}

.footer-social-icons .social-icon-btn svg {
    transition: transform 0.3s ease;
}

/* Unified brand-neutral green hover for every social icon */
.footer-social-icons .social-icon-btn:hover,
.footer-social-icons .social-facebook:hover,
.footer-social-icons .social-tiktok:hover,
.footer-social-icons .social-instagram:hover,
.footer-social-icons .social-twitter:hover,
.footer-social-icons .social-youtube:hover,
.footer-social-icons .social-whatsapp:hover,
.footer-social-icons .social-telegram:hover,
.footer-social-icons .social-snapchat:hover {
    background: #ffffff;
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 128, 96, 0.18);
}

.footer-social-icons .social-icon-btn:hover svg {
    transform: scale(1.1);
}

/* Admin social platform toggles */
.social-platform-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-platform-row {
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    background: rgba(255, 255, 255, 0.02);
}

.social-platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.social-platform-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-text);
}

.social-platform-url-wrap {
    margin-top: 0.65rem;
}

.social-platform-url-wrap.hidden {
    display: none;
}

.social-platform-url-wrap input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 8px);
    background: var(--color-bg, #0f172a);
    color: var(--color-text);
    font-size: 0.9rem;
}

.social-platform-url-wrap input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}


/* 3. FOOTER 4-COLUMNS GRID */
.footer-main-grid {
    padding: 64px 0 32px;
    background: #ffffff;
}

.main-grid-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 2.5rem;
}

@media (max-width: 980px) {
    .main-grid-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 560px) {
    .main-grid-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

html[dir="rtl"] .main-grid-inner {
    text-align: right;
}

html[dir="ltr"] .main-grid-inner {
    text-align: left;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

/* About Column Details */
.footer-col-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.footer-col-about .footer-logo-icon {
    width: 46px;
    height: 46px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 128, 96, 0.15);
}

.footer-col-about .footer-logo-icon svg {
    width: 26px;
    height: 26px;
}

.footer-col-about .footer-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
}

.footer-col-about .footer-highlight {
    color: var(--color-primary);
}

.footer-col-about .footer-about-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.footer-col-about .footer-trust-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.footer-col-about .trust-pill {
    background: #f0fdf4;
    color: #008060;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

/* Col Titles with Underlines */
.footer-col-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.footer-col-title::after {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: #008060;
    margin-top: 8px;
    border-radius: 2px;
}

/* Links lists */
.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0;
    margin: 0;
}

.footer-links-list li a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 2.4;
    transition: color 0.2s, padding-inline-start 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-inline-start: 0;
}

.footer-links-list li a:hover {
    color: #008060;
    padding-inline-start: 4px;
}

/* Newsletter styling */
.footer-col-newsletter .newsletter-desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-col-newsletter .newsletter-input-group {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    height: 48px;
    padding: 0;
    transition: var(--transition-smooth);
}

.footer-col-newsletter .newsletter-input-group input {
    flex: 1;
}

.footer-col-newsletter .newsletter-input-group:focus-within {
    border-color: #008060;
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.1);
}

.footer-col-newsletter .newsletter-input-group input {
    border: none;
    outline: none;
    background: transparent;
    height: 48px;
    padding: 0 0.85rem;
    font-size: 0.9rem;
    flex-grow: 1;
    color: var(--color-text);
    min-width: 0;
}

.footer-col-newsletter .newsletter-submit-btn {
    border: none;
    outline: none;
    background: #008060;
    color: #ffffff;
    height: 48px;
    padding: 0 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.footer-col-newsletter .newsletter-submit-btn:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 10px rgba(0, 128, 96, 0.22);
}

.footer-col-newsletter .newsletter-submit-btn svg {
    transform: rotate(0deg);
}

html[dir="rtl"] .footer-col-newsletter .newsletter-submit-btn svg {
    transform: rotate(180deg);
}

.footer-col-newsletter .newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.85rem;
    cursor: pointer;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.footer-col-newsletter .newsletter-consent input {
    margin-top: 0.15rem;
    accent-color: #008060;
    flex-shrink: 0;
}

/* 4. BOTTOM COPYRIGHT & PAYMENTS BAR */
.footer-bottom-bar {
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
    padding: 20px 0;
}

.bottom-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .bottom-bar-inner {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .footer-bottom-left {
        align-items: center;
    }

    .footer-legal-links {
        justify-content: center;
    }
}

.footer-bottom-bar .copyright-text {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 13px;
}

.footer-legal-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-fast);
}

.footer-legal-links a:hover {
    color: #008060;
}

.footer-legal-sep {
    color: var(--color-border);
    user-select: none;
}

.modal-policy-hint {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
}

.modal-policy-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.modal-policy-link:hover {
    text-decoration: underline;
}

.policy-modal-text-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.footer-bottom-bar .payment-badges-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-bar .payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--color-text-light);
    height: 36px;
    min-width: 48px;
    transition: var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.footer-bottom-bar .payment-badge:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 128, 96, 0.12);
}

.footer-bottom-bar .payment-badge .payment-logo,
.footer-bottom-bar .payment-badge .payment-mark {
    max-height: 20px;
    width: auto;
    display: block;
}

.footer-bottom-bar .payment-badge .payment-mark {
    height: 20px;
}

.footer-bottom-bar .payment-badge:hover .payment-logo {
    opacity: 1;
}

.footer-bottom-bar .payment-badge.hidden {
    display: none;
}

.footer-bottom-bar .payment-badge.border-visa {
    border-color: #e5e7eb;
    background: #ffffff;
}

.footer-bottom-bar .payment-badge.border-visa:hover {
    border-color: #1a1f71;
    box-shadow: 0 4px 10px rgba(26, 31, 113, 0.18);
}

.footer-bottom-bar .payment-badge.border-mastercard {
    border-color: #e5e7eb;
    background: #ffffff;
}

.footer-bottom-bar .payment-badge.border-mastercard:hover {
    border-color: #eb001b;
    box-shadow: 0 4px 10px rgba(235, 0, 27, 0.18);
}

.footer-bottom-bar .payment-badge.border-paypal {
    border-color: #e5e7eb;
    background: #ffffff;
}

.footer-bottom-bar .payment-badge.border-paypal:hover {
    border-color: #009cde;
    box-shadow: 0 2px 8px rgba(0, 48, 135, 0.15);
}

.footer-bottom-bar .payment-badge.border-paypal .payment-logo {
    max-height: 20px;
}

.footer-bottom-bar .payment-badge.border-cryptomus {
    border-color: #e5e7eb;
    background: #ffffff;
}

.footer-bottom-bar .payment-badge.border-cryptomus:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.08);
}

.footer-bottom-bar .payment-badge.border-cryptomus .payment-logo {
    max-height: 20px;
}

html[dir="ltr"] .admin-sidebar .menu-item.active {
    border-inline-end: none;
    border-inline-start: 3px solid var(--color-primary);
}

.footer-bottom-bar .ssl-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #065f46;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ═══ Dark-green footer theme (matches homepage-v2 preview) ═══
   Scoped overrides only — no IDs/classes are removed or renamed, so
   renderFooterFromSettings() and the JS toggle logic keep working. */
.main-footer {
    background: var(--hp-green-deep);
    border-top: none;
}

/* Slider section: dark backdrop, keep cards white */
.footer-slider-section { background: var(--hp-green-deep); }
.footer-slider-title {
    color: #ffffff;
}
.footer-slider-title::after {
    background: #6ee7b7;
}

/* Social row: slightly lighter strip for separation */
.footer-social-row {
    background: rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.footer-social-title { color: #d9f2e9; }
.footer-social-icons .social-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}
.footer-social-icons .social-icon-btn:hover,
.footer-social-icons .social-facebook:hover,
.footer-social-icons .social-tiktok:hover,
.footer-social-icons .social-instagram:hover,
.footer-social-icons .social-twitter:hover,
.footer-social-icons .social-youtube:hover,
.footer-social-icons .social-whatsapp:hover,
.footer-social-icons .social-telegram:hover,
.footer-social-icons .social-snapchat:hover {
    background: #ffffff;
    color: var(--color-primary);
    border-color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Main 4-column grid: dark background, light text */
.footer-main-grid {
    background: var(--hp-green-deep);
    color: #cfe8df;
}
.footer-col-about .footer-logo-text { color: #ffffff; }
.footer-col-about .footer-highlight { color: #6ee7b7; }
.footer-col-about .footer-about-text { color: #a8cfc2; }

/* Trust pills: glassy on dark */
.footer-col-about .trust-pill {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
}

/* Column titles: white with light-green underline */
.footer-col-title { color: #ffffff; }
.footer-col-title::after { background: #6ee7b7; }

/* Link lists: light gray, white on hover */
.footer-links-list li a { color: #a8cfc2; }
.footer-links-list li a:hover { color: #ffffff; }

/* Newsletter column: keep input white for contrast, soften labels */
.footer-col-newsletter .newsletter-desc { color: #a8cfc2; }
.footer-col-newsletter .newsletter-input-group {
    background: #ffffff;
}
.footer-col-newsletter .newsletter-input-group input { color: var(--color-text); }
.footer-col-newsletter .newsletter-consent { color: #a8cfc2; }

/* Bottom bar: subtle top border */
.footer-bottom-bar {
    background: var(--hp-green-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-bottom-bar .copyright-text { color: #8fbcae; }
.footer-bottom-bar .footer-legal-links a { color: #a8cfc2; }
.footer-bottom-bar .footer-legal-links a:hover { color: #ffffff; }

/* Payment badges & SSL: glassy chips on dark (keeps .hidden JS toggle) */
.footer-bottom-bar .payment-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: none;
}
.footer-bottom-bar .payment-badge.border-visa { border-color: rgba(255, 255, 255, 0.20); }
.footer-bottom-bar .payment-badge.border-mastercard { border-color: rgba(255, 255, 255, 0.20); }
.footer-bottom-bar .payment-badge.border-paypal { border-color: rgba(255, 255, 255, 0.20); }
.footer-bottom-bar .payment-badge.border-cryptomus { border-color: rgba(255, 255, 255, 0.20); }
.footer-bottom-bar .payment-badge:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #6ee7b7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.footer-bottom-bar .ssl-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: none;
}
/* ═══ End dark-green footer theme ═══ */

/* ═══ Reveal-on-scroll (progressive enhancement) ═══
   Guarded by .reveal-ready (added by an inline head script). Without JS
   or if the guard is absent, content stays fully visible. */
.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.32, 1);
    will-change: opacity, transform;
}
.reveal-ready .reveal.reveal-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal-ready .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
/* ═══ End reveal-on-scroll ═══ */


/* Policy modal custom formatting content */
.policy-modal-text-content p {
    margin-bottom: 1rem;
}

.policy-modal-text-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.policy-modal-text-content ul {
    margin-bottom: 1.25rem;
    list-style-type: disc;
}

html[dir="rtl"] .policy-modal-text-content ul {
    padding-right: 1.25rem;
    padding-left: 0;
}

html[dir="ltr"] .policy-modal-text-content ul {
    padding-left: 1.25rem;
    padding-right: 0;
}

.policy-modal-text-content li {
    margin-bottom: 0.45rem;
}


/* Order Timeline Stepper Styling */
.stepper-container {
    margin: 1.5rem 0 2rem 0;
    padding: 1.5rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.stepper-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.stepper-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-border);
    z-index: 1;
    border-radius: 2px;
}

/* Connective active progress line overlay */
.stepper-progress-line {
    position: absolute;
    top: 20px;
    right: 0;
    height: 4px;
    background: var(--color-primary);
    z-index: 2;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%; /* Dynamic from JS */
}

/* Modifier color states for the active progress line */
.stepper-progress-line.warning {
    background: var(--color-warning);
}
.stepper-progress-line.danger {
    background: var(--color-danger);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    width: 25%;
    text-align: center;
}

.step-bubble {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-bg-surface);
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.step-label {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    transition: var(--transition-smooth);
}

.step-subtext {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.45;
    margin-top: 0.2rem;
}

/* Completed Step state */
.step-item.completed .step-bubble {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 128, 96, 0.2);
}
.step-item.completed .step-label {
    color: var(--color-primary);
}

/* Active Pending Step state */
.step-item.active-pending .step-bubble {
    background: var(--color-warning);
    border-color: var(--color-warning);
    color: #ffffff;
    animation: pulse-orange 2s infinite;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.step-item.active-pending .step-label {
    color: var(--color-warning);
}

/* Active Failed / Rejected Step state */
.step-item.active-failed .step-bubble {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}
.step-item.active-failed .step-label {
    color: var(--color-danger);
}

/* Active Normal state (e.g. for final step when active but not finalized or just highlight) */
.step-item.active-success .step-bubble {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 128, 96, 0.1);
}
.step-item.active-success .step-label {
    color: var(--color-primary);
}

/* Disabled state */
.step-item.disabled .step-bubble {
    background: var(--color-bg-secondary);
    border-color: var(--color-border);
    color: var(--color-text-muted);
}
.step-item.disabled .step-label {
    color: var(--color-text-muted);
}

/* Animations */
@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Responsive vertical layout for mobile */
@media (max-width: 600px) {
    .stepper-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .stepper-steps::before {
        left: auto;
        right: 20px;
        top: 0;
        bottom: 0;
        width: 4px;
        height: 100%;
    }
    
    .stepper-progress-line {
        left: auto;
        right: 20px;
        top: 0;
        width: 4px;
        height: 0%;
        transition: height 0.4s ease;
    }
    
    .step-item {
        flex-direction: row;
        width: 100%;
        text-align: right;
        gap: 1rem;
    }
    
    .step-label {
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
}

.hidden { display: none !important; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .gateways-grid {
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        position: sticky;
        top: 0;
        z-index: 9999;
    }

    .header-container {
        display: block;
        padding: 0.65rem 1rem;
    }

    .header-top-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        position: relative;
        z-index: 2;
    }

    .mobile-nav-toggle {
        display: flex;
        order: unset;
    }

    .logo-area {
        flex: unset;
        min-width: 0;
        max-width: 100%;
        order: unset;
        justify-self: center;
        overflow: hidden;
    }

    .logo-icon {
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 1.15rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.4rem;
        flex-shrink: 0;
        order: unset;
    }

    .lang-selector-container {
        order: 1;
    }

    .cart-toggle-btn {
        order: 2;
    }

    .customer-auth-btn {
        order: 3;
    }

    .search-box {
        order: 99;
    }

    /* Nav fully out of header flow until drawer opens */
    .nav-links,
    .navbar-menu {
        display: none !important;
        position: fixed;
        top: 0;
        inset-inline-end: 0;
        width: min(85vw, 320px);
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        gap: 0.35rem;
        padding: 4.75rem 1rem 1.5rem;
        margin: 0;
        background: linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(236, 253, 245, 0.94) 45%,
            rgba(209, 250, 229, 0.9) 100%
        );
        border-inline-start: 1px solid rgba(16, 185, 129, 0.28);
        box-shadow: -8px 0 32px rgba(6, 78, 59, 0.14);
        z-index: 10001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        pointer-events: none;
        visibility: hidden;
    }

    html[dir="ltr"] .nav-links,
    html[dir="ltr"] .navbar-menu {
        inset-inline-end: auto;
        inset-inline-start: 0;
        border-inline-start: none;
        border-inline-end: 1px solid var(--color-border);
    }

    body.mobile-nav-open .nav-links,
    body.mobile-nav-open .navbar-menu {
        display: flex !important;
        pointer-events: auto;
        visibility: visible;
    }

    .nav-link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.65rem 1rem;
        font-size: 1rem;
        width: 100%;
    }

    .search-box {
        display: none;
    }

    .customer-auth-btn span:not(.customer-auth-name) {
        display: none;
    }

    .customer-auth-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }

    .lang-selector-btn {
        min-height: 44px;
        padding: 0.5rem 0.65rem;
    }

    .lang-selector-btn #current-lang-text {
        display: none;
    }

    .cart-toggle-btn {
        width: 44px;
        height: 44px;
    }

    .main-content {
        padding: 1.25rem 1rem;
    }

    .hero-section {
        padding: 2rem 1.25rem;
    }

    .hero-content h1 {
        font-size: 1.65rem;
    }

    .trust-badges-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .guarantee-badges {
        flex-direction: column;
        gap: 0.75rem;
    }

    .store-filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 0.4rem;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .cat-tab {
        flex-shrink: 0;
        min-height: 44px;
        padding: 0.55rem 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .product-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .product-card-body h3 {
        font-size: 0.95rem;
    }

    .product-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .product-card-footer .btn-buy-now {
        width: 100%;
        min-height: 44px;
    }

    .product-modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: calc(100vw - 1.5rem);
        max-height: 90vh;
        max-height: 90dvh;
        padding: 1.25rem;
        margin: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer-row {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-footer-row .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .duration-selector {
        gap: 0.4rem;
    }

    .duration-pill span {
        white-space: normal;
        text-align: center;
        min-width: calc(50% - 0.25rem);
        flex: 1 1 calc(50% - 0.25rem);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .payment-options {
        flex-direction: column;
    }

    .payment-options .pay-option {
        flex: 1 1 100%;
    }

    #checkout-modal .modal-content {
        min-height: 0;
        max-height: min(90vh, calc(100vh - 32px));
        max-height: min(90dvh, calc(100dvh - 32px));
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    #checkout-modal .payment-options {
        max-height: none;
        overflow: visible;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-duration-pricing-grid {
        grid-template-columns: 1fr;
    }

    body.admin-page .admin-sidebar-toggle {
        display: flex;
        position: fixed;
        top: 4.25rem;
        z-index: 9998;
        width: auto;
        min-width: 44px;
        margin: 0;
        box-shadow: var(--shadow-sm);
        direction: ltr;
        right: 0.75rem;
        left: auto;
        inset-inline-end: auto;
        inset-inline-start: auto;
    }

    html[dir="ltr"] body.admin-page .admin-sidebar-toggle {
        right: auto;
        left: 0.75rem;
    }

    #view-admin,
    body.admin-page .admin-layout,
    #admin-dashboard.admin-layout {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    body.admin-page .admin-layout,
    #admin-dashboard.admin-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 0;
        direction: ltr;
    }

    .admin-sidebar-overlay {
        z-index: 9999;
    }

    body.admin-page .admin-main-panel {
        padding-top: 3.25rem;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        flex: none;
        inset-inline-end: 0;
        inset-inline-start: auto;
        width: min(85vw, 320px);
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        z-index: 10000;
        margin: 0;
        padding: 1rem 0.85rem 1.25rem;
        box-sizing: border-box;
        transform: translate3d(100%, 0, 0);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition:
            transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.3s,
            opacity 0.3s;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(236, 253, 245, 0.94) 45%,
            rgba(209, 250, 229, 0.9) 100%
        );
        border-inline-start: 1px solid rgba(16, 185, 129, 0.28);
        box-shadow: -8px 0 32px rgba(6, 78, 59, 0.14);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    html[dir="rtl"] .admin-sidebar {
        inset-inline-end: 0;
        inset-inline-start: auto;
        transform: translate3d(100%, 0, 0);
    }

    html[dir="ltr"] .admin-sidebar {
        inset-inline-end: auto;
        inset-inline-start: 0;
        transform: translate3d(-100%, 0, 0);
    }

    body.admin-sidebar-open .admin-sidebar {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-menu {
        gap: 0;
        margin-bottom: 1rem;
    }

    .sidebar-menu li {
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-menu li:last-child {
        border-bottom: none;
    }

    .sidebar-menu .menu-item {
        display: block;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.92rem;
        gap: 0.45rem;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .admin-main-panel {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        margin: 0;
        overflow-x: hidden;
        padding-inline: 0.75rem;
        box-sizing: border-box;
    }

    .admin-tab-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .tab-header h2,
    .tab-header p {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .flex-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .flex-header .btn {
        width: 100%;
        min-height: 44px;
    }

    .tab-header h2 {
        font-size: 1.25rem;
    }

    .table-container,
    .admin-orders-table-wrap,
    .admin-products-table-wrap,
    .admin-customers-table-wrap,
    .admin-deposits-table-wrap,
    .admin-freeze-appeals-table-wrap,
    .purchased-keys-table-wrap {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    /* Universal fluidity — prevent horizontal bleed on mobile */
    .header-container,
    .main-content,
    .hero-section,
    .store-filter-container,
    .max-width-md,
    .footer-slider-section,
    .footer-main-grid,
    .footer-bottom-bar {
        max-width: 100%;
        box-sizing: border-box;
    }

    img,
    .payment-logo,
    .gw-logo-img {
        max-width: 100%;
        height: auto;
    }

    /* Product card images must always fill their container (cover), even on
       mobile — exempted from the generic img { height:auto } rule above so
       they don't distort or leave the container unfilled. */
    .product-card-image,
    .product-modal-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-content h1 {
        word-wrap: break-word;
    }

    #admin-product-modal .admin-product-modal-header,
    #admin-product-modal .admin-product-modal-body,
    #admin-product-modal .admin-product-modal-footer {
        padding-inline: 1.25rem;
    }

    #admin-product-modal .admin-product-modal-header {
        padding-top: 1.5rem;
        padding-inline-start: 2.75rem;
    }

    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 40px;
    }

    .footer-slider-section {
        padding: 2rem 1rem 1rem;
    }

    .footer-slider-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer-slider-card {
        min-width: min(275px, calc(100vw - 3rem));
        width: min(275px, calc(100vw - 3rem));
    }

    .footer-slider-nav-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 420px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .hero-content h1 {
        font-size: 1.45rem;
    }

    .footer-slider-card {
        min-width: calc(100vw - 2.5rem);
        width: calc(100vw - 2.5rem);
    }

    .header-top-row {
        gap: 0.35rem;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .responsive-data-table tbody td {
        padding: 0.65rem 0.85rem;
        font-size: 0.875rem;
    }
}

/* Header Lang Dropdown Selector Styles */
.lang-selector-container {
    position: relative;
    display: inline-block;
}
.lang-selector-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.85rem;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.lang-selector-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text-light);
}
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 130px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.lang-dropdown.hidden {
    display: none;
}
.lang-option {
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    text-align: right;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    width: 100%;
}
html[dir="ltr"] .lang-option {
    text-align: left;
}
.lang-option:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
/* RTL support for lang switcher placement */
html[dir="ltr"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* --- Customer Auth Button --- */
.customer-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #00a67e 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.25);
    white-space: nowrap;
    font-family: inherit;
}

.customer-auth-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-hover) 0%, #008f6b 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 128, 96, 0.3);
}

.customer-auth-name {
    opacity: 0.92;
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-auth-name.hidden {
    display: none;
}

/* --- Auth Modal (Premium Emerald Glass) --- */
.auth-modal-overlay {
    background: rgba(6, 24, 20, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-modal-shell {
    max-width: 440px;
    width: min(92vw, 440px);
    padding: 2.25rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(240, 253, 244, 0.88) 45%,
        rgba(236, 253, 245, 0.9) 100%
    );
    box-shadow:
        0 24px 48px rgba(6, 78, 59, 0.18),
        0 0 0 1px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(52, 211, 153, 0.12), rgba(16, 185, 129, 0.35));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.auth-modal-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 55%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.22) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.auth-modal-close {
    z-index: 2;
}

.auth-modal-header,
.auth-tabs,
.auth-modal-body {
    position: relative;
    z-index: 1;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.85rem;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 95, 70, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.2);
    animation: authIconPulse 3s ease-in-out infinite;
}

@keyframes authIconPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 28px rgba(16, 185, 129, 0.35); }
}

.auth-modal-icon svg {
    width: 26px;
    height: 26px;
}

.auth-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #047857 0%, #10b981 55%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.auth-modal-header p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.55;
    max-width: 32ch;
    margin-inline: auto;
}

.auth-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.35rem;
    background: rgba(6, 78, 59, 0.06);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.12);
    flex-shrink: 0;
}

.auth-modal-body {
    padding-bottom: 0.35rem;
}

.auth-tab {
    flex: 1;
    padding: 0.62rem 0.85rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: calc(var(--radius-md) - 2px);
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: 0.01em;
}

.auth-tab:hover:not(.active) {
    color: #059669;
    background: rgba(16, 185, 129, 0.06);
}

.auth-tab.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow:
        0 4px 14px rgba(5, 150, 105, 0.35),
        0 0 12px rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.auth-form .form-group,
.auth-input-group {
    margin-bottom: 1.05rem;
    text-align: start;
}

.auth-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #065f46;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.auth-form input,
.auth-input {
    width: 100%;
    padding: 0.72rem 0.95rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.75);
    color: var(--color-text);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

.auth-form input::placeholder,
.auth-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.75;
}

.auth-form input:hover,
.auth-input:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(255, 255, 255, 0.9);
}

.auth-form input:focus,
.auth-input:focus {
    outline: none;
    border-color: #10b981;
    background: #fff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s ease;
}

.password-toggle-btn:hover {
    color: #6b7280;
}

.password-toggle-btn:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.45);
    outline-offset: 1px;
}

[dir="rtl"] .password-toggle-btn {
    right: auto;
    left: 0.65rem;
}

[dir="rtl"] .password-input-wrap input {
    padding-right: 0.95rem;
    padding-left: 2.75rem;
}

[dir="rtl"] .customer-settings-form .password-input-wrap input {
    padding-right: 0.85rem;
    padding-left: 2.75rem;
}

.auth-remember-me {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 1.15rem;
    padding: 0.35rem 0;
}

.auth-remember-me .emerald-checkbox-label {
    display: flex;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.auth-or-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0 0.95rem;
    color: var(--color-text-light);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.04em;
}

.auth-or-divider::before,
.auth-or-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.28), transparent);
}

.btn-google-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.72rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #3c4043;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn-google-signin:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow: 0 2px 6px rgba(60, 64, 67, 0.16);
}

.btn-google-signin:active:not(:disabled) {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
}

.btn-google-signin:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.btn-google-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.btn-google-signin.is-loading .btn-google-icon {
    opacity: 0.35;
}

.btn-google-signin.is-loading .btn-google-label::after {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-inline-start: 0.45rem;
    border: 2px solid rgba(66, 133, 244, 0.25);
    border-top-color: #4285f4;
    border-radius: 50%;
    vertical-align: -0.12em;
    animation: btn-google-spin 0.7s linear infinite;
}

@keyframes btn-google-spin {
    to { transform: rotate(360deg); }
}

.auth-submit-btn {
    margin-top: 0.25rem;
    padding: 0.78rem 1rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.auth-submit-signin {
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

.auth-submit-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(5, 150, 105, 0.45), 0 0 16px rgba(16, 185, 129, 0.25);
}

.auth-submit-signup {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: 0 6px 20px rgba(6, 95, 70, 0.3);
}

.auth-submit-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(6, 95, 70, 0.4), 0 0 16px rgba(16, 185, 129, 0.2);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Registration DOB & Gender */
.reg-dob-group {
    margin-bottom: 1.05rem;
}

.reg-dob-fieldset {
    margin: 0;
    padding: 20px;
    background: rgba(16, 185, 129, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    text-align: start;
}

.reg-dob-legend {
    display: block;
    width: 100%;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding: 0;
    color: #065f46;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: start;
}

.reg-dob-segments {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    direction: inherit;
}

.reg-dob-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.reg-dob-segment-year {
    flex: 1.35;
}

.reg-dob-input {
    width: 100%;
    padding: 0.72rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    letter-spacing: 0.06em;
    color: var(--color-text);
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.15s ease;
    outline: none;
}

.reg-dob-input::placeholder {
    color: rgba(100, 116, 139, 0.55);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.reg-dob-input:hover {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.05);
}

.reg-dob-input:focus {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.07);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.reg-dob-separator {
    flex-shrink: 0;
    align-self: center;
    padding-block-end: 1.65rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: rgba(16, 185, 129, 0.45);
    user-select: none;
    line-height: 1;
}

.reg-dob-segment-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(6, 95, 70, 0.75);
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

.auth-gender-group {
    margin-bottom: 1.05rem;
}

.auth-gender-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #065f46;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: start;
}

.reg-gender-pills {
    display: flex;
    flex-direction: row;
    gap: 0.55rem;
    width: 100%;
    direction: inherit;
}

.reg-gender-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--color-text-light);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    user-select: none;
}

.reg-gender-pill:hover {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.06);
    color: #047857;
}

.reg-gender-pill.active {
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    border-color: rgba(16, 185, 129, 0.5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3), 0 0 10px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.reg-dob-group,
.auth-gender-group {
    text-align: start;
}

html[dir="ltr"] .reg-dob-fieldset,
html[dir="ltr"] .reg-dob-segments,
html[dir="ltr"] .reg-gender-pills {
    direction: ltr;
}

html[dir="rtl"] .reg-dob-fieldset,
html[dir="rtl"] .reg-dob-segments,
html[dir="rtl"] .reg-gender-pills {
    direction: rtl;
}

html[dir="rtl"] .reg-dob-input {
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: center;
}

/* Registration validation modal */
.reg-validation-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.reg-validation-modal-card {
    width: 100%;
    max-width: 460px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 20px rgba(16, 185, 129, 0.12);
}

.reg-validation-modal-icon {
    font-size: 2.1rem;
    margin-bottom: 0.65rem;
}

.reg-validation-modal-card h3 {
    font-size: 1.08rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 0.85rem;
}

.reg-validation-message {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.7;
    text-align: start;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
}

.reg-validation-dismiss {
    font-weight: 700;
}

.reg-validation-shake {
    animation: reg-validation-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes reg-validation-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Security tamper modal (emerald shake) */
.security-tamper-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.security-tamper-modal-card {
    width: 100%;
    max-width: 460px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 0 24px rgba(16, 185, 129, 0.18);
}

.security-tamper-modal-icon {
    font-size: 2.1rem;
    margin-bottom: 0.65rem;
}

.security-tamper-modal-card h3 {
    font-size: 1.08rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 0.85rem;
}

.security-tamper-message {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.7;
    text-align: start;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
}

.security-tamper-dismiss {
    font-weight: 700;
}

.security-tamper-shake {
    animation: reg-validation-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@media (max-width: 480px) {
    .reg-gender-pills {
        flex-direction: column;
    }

    .reg-dob-fieldset {
        padding: 16px 12px;
    }

    .reg-dob-segments {
        gap: 0.2rem;
    }

    .reg-dob-input {
        padding: 0.62rem 0.35rem;
        font-size: 0.95rem;
    }

    .reg-dob-separator {
        font-size: 1rem;
        padding-block-end: 1.5rem;
    }

    .reg-dob-segment-label {
        font-size: 0.6rem;
    }

    .auth-modal-shell {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .auth-modal-header h2 {
        font-size: 1.2rem;
    }

    .auth-tab {
        font-size: 0.78rem;
        padding: 0.55rem 0.5rem;
    }
}

/* ===== Admin password gate modal (emerald glass) ===== */
.admin-auth-modal-overlay {
    background: rgba(6, 24, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1100;
}

.admin-auth-modal-shell {
    max-width: 400px;
    width: min(92vw, 400px);
    padding: 2.25rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(240, 253, 244, 0.9) 45%,
        rgba(236, 253, 245, 0.92) 100%
    );
    box-shadow:
        0 24px 48px rgba(6, 78, 59, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.admin-auth-glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(52, 211, 153, 0.15), rgba(16, 185, 129, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.admin-auth-modal-glow {
    position: absolute;
    top: -42%;
    left: 50%;
    transform: translateX(-50%);
    width: 125%;
    height: 58%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.24) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.admin-auth-modal-header,
.admin-auth-form {
    position: relative;
    z-index: 1;
}

.admin-auth-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.admin-auth-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 95, 70, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.38);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.22);
}

.admin-auth-modal-icon svg {
    width: 26px;
    height: 26px;
}

.admin-auth-modal-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    background: linear-gradient(135deg, #047857 0%, #10b981 55%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.admin-auth-modal-header p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.55;
    max-width: 30ch;
    margin-inline: auto;
}

.admin-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.admin-auth-remember-me {
    display: flex;
    align-items: center;
    margin: -0.35rem 0 0;
    padding: 0.1rem 0;
}

.admin-auth-remember-me .emerald-checkbox-label {
    font-size: 0.82rem;
    color: var(--color-text-light);
    gap: 8px;
}

.admin-auth-submit-btn {
    margin-top: 0.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.admin-auth-lockout {
    margin: 0.75rem 0 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(220, 38, 38, 0.28);
    border-radius: var(--radius-md);
    background: rgba(254, 242, 242, 0.94);
    color: #b91c1c;
    font-weight: 700;
    text-align: center;
    direction: inherit;
}

@media (max-width: 480px) {
    .admin-auth-modal-shell {
        padding: 1.85rem 1.35rem 1.65rem;
    }

    .admin-auth-modal-header h2 {
        font-size: 1.25rem;
    }
}

/* ===== Admin keys view protection ===== */
.admin-keys-view-wrap {
    position: relative;
    border-radius: var(--radius-md);
}

.admin-keys-view-wrap.admin-keys-locked .admin-keys-textarea {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.admin-keys-textarea {
    width: 100%;
    display: block;
    transition: filter 0.25s ease;
}

.admin-keys-unlock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    background: rgba(240, 253, 244, 0.72);
    color: var(--color-emerald-dark, #065f46);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.admin-keys-unlock-overlay:hover,
.admin-keys-unlock-overlay:focus-visible {
    background: rgba(236, 253, 245, 0.92);
    border-color: rgba(16, 185, 129, 0.65);
    outline: none;
}

.admin-keys-view-modal-overlay {
    background: rgba(6, 24, 20, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1125;
}

.admin-keys-view-modal-shell {
    max-width: 380px;
    width: min(92vw, 380px);
    padding: 2.25rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(240, 253, 244, 0.9) 45%,
        rgba(236, 253, 245, 0.92) 100%
    );
    box-shadow:
        0 24px 48px rgba(6, 78, 59, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.admin-keys-view-error {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    font-size: 0.88rem;
    text-align: center;
}

/* ===== Checkout auth gate modal (emerald glass) ===== */
.checkout-gate-modal-overlay {
    background: rgba(6, 24, 20, 0.58);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1050;
}

.checkout-gate-modal-shell {
    max-width: 420px;
    width: min(92vw, 420px);
    padding: 2.25rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(240, 253, 244, 0.9) 45%,
        rgba(236, 253, 245, 0.92) 100%
    );
    box-shadow:
        0 24px 48px rgba(6, 78, 59, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.checkout-gate-modal-glow {
    position: absolute;
    top: -42%;
    left: 50%;
    transform: translateX(-50%);
    width: 125%;
    height: 58%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.24) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.checkout-gate-modal-close {
    z-index: 2;
}

.checkout-gate-modal-header,
.checkout-gate-modal-actions {
    position: relative;
    z-index: 1;
}

.checkout-gate-modal-header {
    text-align: center;
    margin-bottom: 1.65rem;
}

.checkout-gate-modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.85rem;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.16) 0%, rgba(6, 95, 70, 0.09) 100%);
    border: 1px solid rgba(16, 185, 129, 0.36);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.22);
    animation: authIconPulse 3s ease-in-out infinite;
}

.checkout-gate-modal-icon svg {
    width: 26px;
    height: 26px;
}

.checkout-gate-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #047857 0%, #10b981 55%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.checkout-gate-modal-header p {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.55;
    max-width: 32ch;
    margin-inline: auto;
}

.checkout-gate-quick-note {
    font-size: 13px;
    color: var(--color-primary);
    text-align: center;
    margin: 0 0 1rem;
    animation: fadeIn 0.4s ease-out forwards;
}

.checkout-gate-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-gate-register-btn {
    font-weight: 700;
}

@media (max-width: 480px) {
    .checkout-gate-modal-shell {
        padding: 1.85rem 1.35rem 1.65rem;
    }

    .checkout-gate-modal-header h2 {
        font-size: 1.22rem;
    }
}

/* ===== Checkout contact modal (emerald glass) ===== */
.checkout-contact-modal-overlay {
    background: rgba(6, 24, 20, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Opened from checkout, so this must outrank .modal-overlay (100000). */
    z-index: 100100;
}

.checkout-contact-modal-shell {
    max-width: 440px;
    width: min(92vw, 440px);
    padding: 2rem 1.75rem 1.75rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(240, 253, 244, 0.9) 45%,
        rgba(236, 253, 245, 0.92) 100%
    );
    box-shadow:
        0 24px 48px rgba(6, 78, 59, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.checkout-contact-modal-glow {
    position: absolute;
    top: -42%;
    left: 50%;
    transform: translateX(-50%);
    width: 125%;
    height: 58%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.24) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.checkout-contact-modal-header,
.checkout-contact-form,
.checkout-contact-modal-actions {
    position: relative;
    z-index: 1;
}

.checkout-contact-modal-header {
    text-align: center;
    margin-bottom: 1.35rem;
}

.checkout-contact-modal-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    background: linear-gradient(135deg, #047857 0%, #10b981 55%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.checkout-contact-modal-header p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.55;
    max-width: 34ch;
    margin-inline: auto;
}

.checkout-contact-form .form-group {
    margin-bottom: 0.85rem;
}

.checkout-contact-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.35rem;
    display: block;
}

.checkout-contact-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.admin-order-contact-block {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--color-text-light);
    line-height: 1.45;
}

.admin-order-contact-line {
    margin-top: 0.15rem;
}

@media (max-width: 480px) {
    .checkout-contact-modal-shell {
        padding: 1.65rem 1.25rem 1.5rem;
    }

    .checkout-contact-modal-header h2 {
        font-size: 1.18rem;
    }
}

.emerald-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    user-select: none;
    text-align: start;
}

.emerald-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.emerald-checkbox-custom {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid #34d399;
    border-radius: 0.3rem;
    background: linear-gradient(145deg, rgba(6, 95, 70, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    box-shadow: inset 0 1px 2px rgba(6, 78, 59, 0.06);
    transition: var(--transition-fast);
    position: relative;
}

.emerald-checkbox-custom::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 45%;
    width: 0.3rem;
    height: 0.55rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.emerald-checkbox-input:focus-visible + .emerald-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.emerald-checkbox-input:checked + .emerald-checkbox-custom {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.emerald-checkbox-input:checked + .emerald-checkbox-custom::after {
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.emerald-checkbox-label:hover .emerald-checkbox-custom {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.admin-product-gateways-group {
    margin-top: 0.25rem;
}

.admin-product-gateways-group > label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--color-text);
}

.admin-product-gateways-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    direction: rtl;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.admin-product-gw-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.admin-product-gw-row:last-child {
    border-bottom: none;
}

.admin-product-gw-row:hover {
    background: #f9fafb;
}

.admin-product-gw-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-product-gw-logo .gw-logo {
    width: auto;
    height: auto;
    max-width: 36px;
    background: none;
    border: none;
    padding: 0;
}

.admin-product-gw-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: start;
    color: var(--color-text);
}

.admin-product-gw-toggle {
    flex-shrink: 0;
    border: none;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-product-gw-toggle.is-on {
    background: #10b981;
    color: #fff;
}

.admin-product-gw-toggle.is-off {
    background: #e5e7eb;
    color: #6b7280;
}

.admin-product-gw-toggle:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.admin-product-image-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.55rem;
}

.admin-product-image-preview {
    position: relative;
    margin-top: 0.75rem;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.admin-product-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-image-clear {
    position: absolute;
    top: 0.2rem;
    inset-inline-end: 0.2rem;
    width: 1.35rem;
    height: 1.35rem;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-sidebar {
    padding: 1.2rem;
    height: fit-content;
    position: sticky;
    top: 5rem;
}

.customer-avatar {
    width: 44px;
    height: 44px;
    background: var(--color-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.customer-avatar svg {
    width: 22px;
    height: 22px;
}

.customer-sidebar-menu {
    list-style: none;
    margin-bottom: 1rem;
}

.customer-menu-item {
    position: relative;
    display: block;
    padding: 0.65rem 0.85rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: var(--transition-fast);
}

.customer-menu-item:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.customer-menu-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-inline-end: 3px solid var(--color-primary);
}

html[dir="ltr"] .customer-menu-item.active {
    border-inline-end: none;
    border-inline-start: 3px solid var(--color-primary);
}

.customer-dashboard-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.customer-welcome-message {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(120deg, #047857, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #047857;
    line-height: 1.3;
}

.customer-notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.9), #ffffff);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    box-shadow: var(--shadow-sm);
}

.customer-notif-bell-btn:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}

.notification-badge-unread {
    position: absolute;
    top: -0.35rem;
    inset-inline-end: -0.35rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(239, 68, 68, 0.65);
    animation: notif-badge-pulse 2s ease-in-out infinite;
}

@keyframes notif-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(239, 68, 68, 0.85); }
}

.customer-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.customer-notifications-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

.notification-card {
    position: relative;
    padding: 1rem 1.15rem;
    padding-inline-end: 2.75rem;
    font-size: 0.9375rem;
    border-inline-start: 3px solid transparent;
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(236, 253, 245, 0.45));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.18);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08);
}

.notification-card.unread {
    border-inline-start-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.72), rgba(255, 255, 255, 0.88));
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.22), 0 4px 20px rgba(16, 185, 129, 0.12);
    animation: notification-unread-glow 2.4s ease-in-out infinite;
}

.notification-card.read {
    opacity: 0.82;
    border-inline-start-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.85), rgba(255, 255, 255, 0.7));
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.notification-card.dismissing {
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
}

@keyframes notification-unread-glow {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.22), 0 4px 20px rgba(16, 185, 129, 0.1);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.38), 0 0 18px rgba(16, 185, 129, 0.28);
    }
}

.notification-dismiss-btn {
    position: absolute;
    top: 0.55rem;
    inset-inline-end: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.notification-dismiss-btn:hover,
.notification-dismiss-btn:focus-visible {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    outline: none;
}

.notification-dismiss-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
}

.notification-dismiss-icon {
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 700;
}

.notification-dismiss-tooltip {
    position: absolute;
    top: calc(100% + 0.35rem);
    inset-inline-end: 0;
    padding: 0.3rem 0.55rem;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.92);
    color: #f9fafb;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.notification-dismiss-btn:hover .notification-dismiss-tooltip,
.notification-dismiss-btn:focus-visible .notification-dismiss-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-card.customer-flash-pulse {
    animation: notification-unread-glow 1.2s ease-in-out infinite, customer-flash-pulse 1.5s ease-in-out infinite;
}

.notification-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.notification-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
    min-width: 0;
}

.notification-unread-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.notification-card-body {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 0.65rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.notification-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.notification-card-from {
    font-weight: 600;
    color: #047857;
}

.notification-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: stretch;
}

.notification-card-actions .btn-sm {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
}

.notification-reply-form .notif-reply-btn {
    flex-shrink: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
}

.tab-badge-dot {
    position: absolute;
    top: 0.45rem;
    inset-inline-end: 0.5rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(239, 68, 68, 0.75);
    animation: tab-badge-dot-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.tab-badge-dot.hidden {
    display: none;
}

.tab-badge-count {
    position: absolute;
    top: 0.35rem;
    inset-inline-end: 0.45rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(239, 68, 68, 0.65);
    animation: tab-badge-dot-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.tab-badge-count.hidden {
    display: none;
}

@keyframes tab-badge-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 6px rgba(239, 68, 68, 0.55); transform: scale(1); }
    50% { box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(239, 68, 68, 0.9); transform: scale(1.12); }
}

.admin-customer-chat-btn {
    position: relative;
}

.button-badge-dot {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.75);
    animation: badge-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 6px rgba(239, 68, 68, 0.55); transform: scale(1); }
    50% { box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(239, 68, 68, 0.9); transform: scale(1.12); }
}

.notification-thread {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(16, 185, 129, 0.12);
}

.notification-thread-message {
    max-width: 92%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.55;
    word-break: break-word;
}

.chat-bubble-admin {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #065f46;
}

.chat-bubble-customer {
    align-self: flex-end;
    background: linear-gradient(135deg, #374151, #1f2937);
    border: 1px solid rgba(55, 65, 81, 0.5);
    color: #f9fafb;
}

html[dir="rtl"] .chat-bubble-admin {
    align-self: flex-end;
}

html[dir="rtl"] .chat-bubble-customer {
    align-self: flex-start;
}

.notification-thread-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.88;
}

.notification-thread-sender {
    font-weight: 700;
}

.notification-thread-text {
    margin: 0;
    white-space: pre-wrap;
    font-size: 0.875rem;
}

.notification-reply-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
    margin-bottom: 0.65rem;
}

.chat-reply-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
    width: 100%;
}

.chat-attach-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(5, 150, 105, 0.1));
    color: #047857;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
}

.chat-attach-btn:hover {
    border-color: var(--color-primary);
    background: rgba(16, 185, 129, 0.22);
}

.chat-image-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    width: fit-content;
    max-width: 100%;
    font-size: 0.875rem;
}

.chat-image-preview.hidden {
    display: none;
}

.chat-image-preview-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.chat-image-preview-remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.12);
    color: var(--color-text);
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
}

.chat-image-preview-remove:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
}

.chat-bubble-image {
    display: block;
    max-width: 200px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-top: 0.35rem;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: var(--transition-fast);
}

.chat-bubble-image:hover {
    opacity: 0.92;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.chat-bubble-customer .chat-bubble-image {
    border-color: rgba(255, 255, 255, 0.15);
}

.notification-reply-input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
    transition: var(--transition-fast);
}

.notification-reply-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.admin-chat-modal-shell {
    background: linear-gradient(160deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(16, 185, 129, 0.22);
    max-width: 640px;
}

.admin-chat-scroll-body {
    max-height: min(62vh, 520px);
    overflow-y: auto;
}

.admin-chat-conversations-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-chat-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

.admin-chat-thread-card {
    padding: 0.9rem 1rem;
    font-size: 0.9375rem;
}

.admin-chat-thread-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.admin-chat-thread-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
}

.admin-chat-thread-date {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.admin-chat-thread-body {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.55;
    margin: 0 0 0.5rem;
    white-space: pre-wrap;
}

.admin-chat-reply-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(16, 185, 129, 0.12);
}

.admin-chat-reply-input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
}

.admin-chat-reply-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.frozen-account-appeal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.frozen-account-appeal-overlay.hidden {
    display: none;
    pointer-events: none;
}

body.frozen-appeal-locked {
    overflow: hidden;
}

.frozen-account-appeal-card {
    position: relative;
    max-width: 520px;
    width: 100%;
    max-height: min(92vh, 640px);
    overflow-y: auto;
    padding: 1.5rem 1.35rem;
    padding-top: 2.75rem;
    border: 1px solid rgba(220, 38, 38, 0.28);
    background: linear-gradient(160deg, rgba(254, 242, 242, 0.96), #ffffff);
    font-size: 0.875rem;
    box-shadow: 0 24px 48px rgba(127, 29, 29, 0.18);
}

.frozen-appeal-logout-btn {
    position: absolute;
    top: 0.85rem;
    inset-inline-end: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: linear-gradient(145deg, #ffffff, rgba(248, 250, 252, 0.95));
    color: var(--color-text);
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.35;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    z-index: 1;
}

.frozen-appeal-logout-btn:hover {
    border-color: rgba(16, 185, 129, 0.45);
    color: #047857;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.frozen-appeal-logout-btn:active {
    transform: translateY(0);
}

.frozen-account-appeal-card h2 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
    color: #b91c1c;
    line-height: 1.45;
}

.frozen-appeal-desc {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0 0 1rem;
}

.frozen-appeal-compose {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.frozen-appeal-input {
    width: 100%;
    min-height: 5.5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(220, 38, 38, 0.22);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.55;
    resize: vertical;
    background: #fff;
    transition: var(--transition-fast);
}

.frozen-appeal-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.frozen-appeal-actions-row {
    margin-top: 0.15rem;
}

.frozen-appeal-submit-btn {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
}

.frozen-appeals-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(220, 38, 38, 0.14);
    max-height: min(38vh, 260px);
    overflow-y: auto;
}

.frozen-appeals-thread {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.frozen-appeals-empty {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.admin-freeze-appeals-table-wrap {
    overflow-x: auto;
}

.admin-freeze-appeals-table {
    width: 100%;
    font-size: 0.875rem;
}

.admin-freeze-appeals-table td,
.admin-freeze-appeals-table th {
    font-size: 0.875rem;
}

.admin-freeze-appeals-empty-cell {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.admin-freeze-appeal-message-cell {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-freeze-appeal-unread-row td {
    background: rgba(220, 38, 38, 0.04);
}

.admin-freeze-appeal-modal-shell {
    background: linear-gradient(160deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.97));
    border: 1px solid rgba(220, 38, 38, 0.22);
    max-width: 640px;
}

.admin-freeze-appeal-modal-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.admin-freeze-appeal-scroll-body {
    max-height: min(52vh, 420px);
    overflow-y: auto;
}

.admin-freeze-appeal-thread {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.25rem 0;
}

.admin-freeze-appeal-reply-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
}

#image-lightbox-modal.image-lightbox-overlay {
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#image-lightbox-modal.image-lightbox-overlay.hidden {
    display: none;
}

.lightbox-close-btn {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 95vh;
    pointer-events: none;
}

/* Firestore boot progress — thin top bar + delayed corner spinner */
.firestore-boot-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 100000;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.firestore-boot-progress.is-hiding {
    opacity: 0;
}

.firestore-boot-progress-bar {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    box-shadow: 0 0 8px var(--color-primary-glow);
    animation: firestore-boot-indeterminate 1.15s ease-in-out infinite;
}

@keyframes firestore-boot-indeterminate {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(420%); }
}

.firestore-boot-spinner-wrap {
    position: fixed;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    animation: firestore-boot-spinner-in 0.25s ease forwards;
}

@keyframes firestore-boot-spinner-in {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.firestore-boot-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 128, 96, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: firestore-boot-spin 0.75s linear infinite;
}

@keyframes firestore-boot-spin {
    to { transform: rotate(360deg); }
}

#products-list.storefront-syncing {
    opacity: 0.72;
    transition: opacity 0.35s ease;
}

#products-list.storefront-synced {
    opacity: 1;
    transition: opacity 0.35s ease;
}

.lightbox-image,
#image-lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.admin-freeze-appeal-reply-input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
}

.admin-freeze-appeal-reply-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

@media (max-width: 640px) {
    .frozen-account-appeal-card {
        padding: 1.15rem 1rem;
        padding-top: 2.65rem;
        max-height: 94vh;
    }

    .frozen-appeal-logout-btn {
        top: 0.65rem;
        inset-inline-end: 0.65rem;
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .frozen-appeals-preview {
        max-height: min(32vh, 200px);
    }
}

.customer-mobile-tabs {
    display: none;
    gap: 0.35rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.customer-mobile-tab {
    position: relative;
    flex-shrink: 0;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}

.customer-mobile-tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.customer-tab-content {
    display: none;
}

.customer-tab-content.active {
    display: block;
}

.customer-inventory-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.inventory-key-code {
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
    background: var(--color-bg-secondary);
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--color-border);
    word-break: break-all;
}

.inventory-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-light);
}

.customer-orders-table-wrap {
    overflow-x: auto;
}

.customer-pending-orders-section {
    margin-bottom: 1.5rem;
}

.customer-pending-orders-header h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.customer-pending-orders-header p {
    margin: 0 0 1rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.customer-pending-orders-list {
    display: grid;
    gap: 1rem;
}

.customer-pending-order-card {
    padding: 1rem 1.15rem;
}

.customer-pending-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.customer-pending-order-products {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.customer-pending-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.customer-pending-order-expiry {
    font-size: 0.82rem;
    color: var(--color-warning, #f59e0b);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.customer-pending-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-badge.pending-payment {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.customer-orders-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.customer-orders-table th,
.customer-orders-table td {
    padding: 0.75rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.customer-orders-table th {
    background: var(--color-bg-secondary);
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

.customer-orders-table td {
    color: var(--color-text-light);
    font-weight: 500;
}

.customer-order-products {
    max-width: 200px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.45;
}

/* Purchased Keys & Licenses table (cyber-emerald glassmorphism) */
.purchased-keys-table-wrap {
    overflow-x: auto;
    padding: 0.35rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: linear-gradient(160deg, rgba(236, 253, 245, 0.55), rgba(255, 255, 255, 0.85));
    box-shadow: 0 18px 40px -28px rgba(4, 120, 87, 0.55);
}

.purchased-keys-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.purchased-keys-table th,
.purchased-keys-table td {
    padding: 0.8rem 1rem;
    text-align: start;
    border-bottom: 1px solid rgba(16, 185, 129, 0.16);
    font-size: 0.9375rem;
    vertical-align: middle;
}

.purchased-keys-table thead th {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.06));
    font-weight: 700;
    color: #065f46;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.purchased-keys-table tbody td {
    color: var(--color-text-light);
    font-weight: 500;
}

.purchased-keys-table tbody tr {
    transition: background 0.18s ease;
}

.purchased-keys-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.07);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35), 0 0 18px -6px rgba(16, 185, 129, 0.45);
}

.purchased-keys-table tbody tr:last-child td {
    border-bottom: none;
}

.inventory-key-product {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.inventory-key-product-name {
    font-weight: 700;
    color: var(--color-text);
}

.inventory-key-duration {
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

/* License key cell: monospace + clipping safety */
.purchased-keys-table .inventory-key-code {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    background: rgba(15, 23, 42, 0.04);
    border: 1px dashed rgba(16, 185, 129, 0.4);
}

.inventory-key-action-cell {
    text-align: end;
    white-space: nowrap;
}

.purchased-keys-action-col {
    width: 1%;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.completed {
    background: var(--color-success-light);
    color: #047857;
}

.status-badge.pending {
    background: var(--color-warning-light);
    color: #b45309;
}

.status-badge.rejected {
    background: var(--color-danger-light);
    color: #b91c1c;
}

.status-badge.refunded {
    background: #e0e7ff;
    color: #4338ca;
}

/* Purchased keys table — responsive stacked cards on mobile */
@media (max-width: 640px) {
    .purchased-keys-table-wrap {
        overflow-x: hidden;
    }

    .purchased-keys-table {
        min-width: 0;
    }

    .purchased-keys-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .purchased-keys-table,
    .purchased-keys-table tbody,
    .purchased-keys-table tr,
    .purchased-keys-table td {
        display: block;
        width: 100%;
    }

    .purchased-keys-table tbody tr {
        margin-bottom: 0.85rem;
        border: 1px solid rgba(16, 185, 129, 0.25);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.6);
        padding: 0.35rem 0.15rem;
    }

    .purchased-keys-table tbody td {
        border-bottom: 1px solid rgba(16, 185, 129, 0.12);
        padding: 0.6rem 0.9rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        text-align: end;
    }

    .purchased-keys-table tbody td:last-child {
        border-bottom: none;
    }

    .purchased-keys-table tbody td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        font-weight: 700;
        color: #065f46;
        text-align: start;
        flex-shrink: 0;
    }

    .purchased-keys-table .inventory-key-code {
        max-width: 60%;
    }

    .inventory-key-action-cell {
        justify-content: stretch;
    }

    .inventory-key-action-cell .copy-key-btn {
        width: 100%;
    }
}

/* Support tickets */
.customer-ticket-form {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.customer-ticket-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
}

.customer-ticket-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.customer-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.support-ticket-card {
    padding: 1rem 1.15rem;
}

.support-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--color-border);
}

.support-ticket-id {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
}

.support-ticket-date {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.support-ticket-message {
    font-size: 0.88rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.support-ticket-replies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.support-reply {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.support-reply.admin {
    background: var(--color-primary-light);
    border-inline-start: 3px solid var(--color-primary);
}

.support-reply-meta {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.customer-settings-form {
    padding: 1.5rem;
    max-width: 520px;
}

.customer-settings-form .form-group {
    margin-bottom: 1rem;
}

.customer-settings-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.customer-settings-form input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
}

.customer-settings-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

@media (max-width: 900px) {
    .customer-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .customer-sidebar {
        display: none;
    }

    .customer-mobile-tabs {
        display: flex;
    }

    .customer-auth-btn span:not(.customer-auth-name) {
        display: none;
    }

    .customer-auth-btn {
        padding: 0.5rem;
    }
}

/* --- KeyForge Customer Wallet --- */
.wallet-header-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.wallet-header-row .wallet-status-card {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.wallet-topup-btn {
    align-self: center;
    white-space: nowrap;
    padding: 0.85rem 1.35rem;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-md);
}

.wallet-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(255, 255, 255, 0.72));
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
}

.wallet-status-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #10b981, #047857);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.wallet-status-icon svg {
    width: 26px;
    height: 26px;
}

.wallet-status-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.2rem;
}

.wallet-status-amount-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.wallet-status-amount {
    font-size: 1.65rem;
    font-weight: 800;
    color: #047857;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.wallet-status-currency {
    font-size: 0.95rem;
    font-weight: 700;
    color: #10b981;
}

.pay-option.wallet {
    flex: 1 1 100%;
    min-height: auto;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.95), #ffffff);
}

.pay-option.wallet.active {
    border: 1px solid #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 8px 24px rgba(16, 185, 129, 0.12);
}

.pay-option.wallet.disabled {
    opacity: 0.72;
    cursor: not-allowed;
    pointer-events: none;
    border-style: dashed;
    border-color: rgba(16, 185, 129, 0.22);
    background: linear-gradient(145deg, #f8fafc, #ffffff);
}

.pay-option.wallet .wallet-pay-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #047857;
}

.wallet-balance-chip {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.wallet-balance-chip.muted {
    background: rgba(100, 116, 139, 0.1);
    color: var(--color-text-light);
}

.wallet-insufficient-hint {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #b45309;
    line-height: 1.45;
    margin-top: 0.15rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wallet-checkout-summary .wallet-balance-value {
    color: #047857;
    font-weight: 800;
}

.wallet-logo-emerald svg {
    max-height: 22px;
    max-width: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.delivered-key-item {
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--color-border);
}

.delivered-key-item:last-child {
    border-bottom: none;
}

.delivered-key-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.delivered-key-duration {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.delivered-key-code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9375rem;
    padding: 0.5rem 0.65rem;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    word-break: break-all;
}

/* --- Admin Customer Accounts --- */
.customer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--color-border);
}

.admin-customer-name-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.admin-customer-name-text {
    min-width: 0;
}

.badge-login-google,
.badge-login-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-login-google {
    color: #fff;
    background: #dc2626;
}

.badge-login-email {
    color: #fff;
    background: #2563eb;
}

.admin-customer-login-method-cell {
    white-space: nowrap;
}

.admin-customers-table-wrap {
    overflow-x: auto;
}

.admin-customers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.admin-customers-table th,
.admin-customers-table td {
    padding: 0.85rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--color-border);
}

.admin-customers-table td,
.admin-deposits-table td {
    font-weight: 500;
    color: var(--color-text-light);
}

.admin-customers-table th {
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(16, 185, 129, 0.06);
}

.admin-customer-password-cell {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-customer-password-text {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    letter-spacing: 0.04em;
}

.admin-password-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-password-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.22);
    color: #047857;
}

.admin-location-cell,
.admin-geo-bot-cell {
    max-width: 14rem;
    vertical-align: middle;
    transition: all 0.2s ease-out;
}

.admin-location-cell-inner,
.admin-geo-bot-cell-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: nowrap;
    padding: 0.32rem 0.62rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(16, 185, 129, 0.55);
    box-shadow:
        0 0 0 1px rgba(16, 185, 129, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 10px rgba(16, 185, 129, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease-out;
}

.admin-geo-bot-cell:hover .admin-geo-bot-cell-inner {
    background: rgba(255, 255, 255, 0.38);
    border-color: rgba(16, 185, 129, 0.72);
    box-shadow:
        0 0 0 1px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 0 14px rgba(16, 185, 129, 0.16);
}

[dir="rtl"] .admin-location-cell-inner,
[dir="rtl"] .admin-geo-bot-cell-inner {
    flex-direction: row-reverse;
}

.admin-location-text,
.admin-geo-bot-text {
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #065f46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
    transition: color 0.2s ease-out;
}

.admin-location-flag,
.admin-location-flag-img {
    flex-shrink: 0;
    font-size: 1.05em;
    line-height: 1;
    transition: transform 0.2s ease-out;
}

.admin-location-flag-img {
    display: block;
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.admin-geo-bot-cell[title] {
    cursor: help;
}

.admin-geo-bot-cell[title]:hover .admin-geo-bot-text {
    color: #047857;
}

@media (max-width: 900px) {
    .admin-location-cell,
    .admin-geo-bot-cell {
        max-width: none;
    }

    .admin-location-text,
    .admin-geo-bot-text {
        max-width: 7rem;
    }
}

.auth-country-group {
    margin-bottom: 1.05rem;
}

.country-select {
    position: relative;
    width: 100%;
}

.country-select-trigger {
    width: 100%;
    padding: 0.72rem 0.95rem;
    padding-inline-end: 2.25rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    background: rgba(20, 20, 20, 0.85);
    color: #ecfdf5;
    cursor: pointer;
    text-align: start;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2310b981' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 12px 8px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
}

[dir="rtl"] .country-select-trigger {
    background-position: left 0.85rem center;
    padding-inline-start: 2.25rem;
    padding-inline-end: 0.95rem;
}

.country-select-trigger:hover {
    border-color: rgba(16, 185, 129, 0.55);
    background-color: rgba(24, 24, 24, 0.92);
}

.country-select-trigger:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45), 0 0 4px rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.country-select-trigger-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

.country-select-trigger:not(.has-value) .country-select-trigger-text {
    color: rgba(236, 253, 245, 0.55);
}

.country-select-options-panel {
    position: absolute;
    z-index: 9999;
    width: 100%;
    margin-top: 0.35rem;
    max-height: 280px;
    overflow: hidden;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 16px rgba(16, 185, 129, 0.08);
}

#country-search-input {
    width: 100%;
    padding: 0.72rem 0.95rem;
    border: none;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px 12px 0 0;
    font-size: 0.92rem;
    font-family: inherit;
    background: transparent;
    color: #ecfdf5;
    text-align: start;
}

#country-search-input::placeholder {
    color: rgba(236, 253, 245, 0.45);
}

#country-search-input:focus {
    outline: none;
    box-shadow: inset 0 -2px 0 rgba(16, 185, 129, 0.55), 0 0 12px rgba(16, 185, 129, 0.2);
}

.country-select-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}

.country-select-list::-webkit-scrollbar {
    width: 8px;
}

.country-select-list::-webkit-scrollbar-track {
    background: rgba(10, 10, 10, 0.85);
    border-radius: 4px;
}

.country-select-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.45);
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.country-select-list::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.65);
}

html[dir="rtl"] .country-select-list,
html[lang="ar"] .country-select-list {
    direction: rtl;
}

html[dir="ltr"] .country-select-list,
html[lang="en"] .country-select-list,
html[lang="fr"] .country-select-list {
    direction: ltr;
}

.country-option-row {
    padding: 0.62rem 0.95rem;
    font-size: 0.92rem;
    color: #ecfdf5;
    cursor: pointer;
    text-align: start;
    overflow-wrap: anywhere;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.country-option-row:hover,
.country-option-row.focused {
    background: rgba(16, 185, 129, 0.14);
    color: #d1fae5;
}

.country-option-row.selected {
    background: rgba(16, 185, 129, 0.22);
    color: #a7f3d0;
    font-weight: 600;
}

.country-option-row.hidden {
    display: none;
}

html[dir="rtl"] .auth-country-group,
html[lang="ar"] .auth-country-group {
    text-align: start;
}

html[dir="rtl"] .country-select-trigger,
html[dir="rtl"] #country-search-input,
html[dir="rtl"] .country-option-row,
html[lang="ar"] .country-select-trigger,
html[lang="ar"] #country-search-input,
html[lang="ar"] .country-option-row {
    text-align: start;
    direction: rtl;
}

html[dir="ltr"] .country-select-trigger,
html[dir="ltr"] #country-search-input,
html[dir="ltr"] .country-option-row,
html[lang="en"] .country-select-trigger,
html[lang="en"] #country-search-input,
html[lang="en"] .country-option-row,
html[lang="fr"] .country-select-trigger,
html[lang="fr"] #country-search-input,
html[lang="fr"] .country-option-row {
    text-align: start;
    direction: ltr;
}

.auth-whatsapp-block {
    margin-bottom: 1.05rem;
}

#auth-whatsapp-container {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(12, 18, 16, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(16, 185, 129, 0.08), 0 0 18px rgba(16, 185, 129, 0.06);
}

.auth-whatsapp-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.55rem;
    margin-top: 0.35rem;
    text-align: start;
}

html[dir="rtl"] .auth-whatsapp-row,
html[lang="ar"] .auth-whatsapp-row {
    direction: rtl;
}

html[dir="ltr"] .auth-whatsapp-row,
html[lang="en"] .auth-whatsapp-row,
html[lang="fr"] .auth-whatsapp-row {
    direction: ltr;
}

.auth-dial-code-select {
    flex: 0 0 auto;
    min-width: 5.5rem;
    max-width: 6.5rem;
    padding: 0.72rem 0.65rem;
    padding-inline-end: 1.75rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    background: rgba(20, 20, 20, 0.85);
    color: #ecfdf5;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2310b981' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 12px 8px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

[dir="rtl"] .auth-dial-code-select {
    background-position: left 0.55rem center;
    padding-inline-start: 1.75rem;
    padding-inline-end: 0.65rem;
}

.auth-dial-code-select:hover {
    border-color: rgba(16, 185, 129, 0.55);
    background-color: rgba(24, 24, 24, 0.92);
}

.auth-dial-code-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45), 0 0 4px rgba(16, 185, 129, 0.25);
}

.auth-phone-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.72rem 0.95rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    background: rgba(20, 20, 20, 0.85);
    color: #ecfdf5;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.auth-phone-input::placeholder {
    color: rgba(236, 253, 245, 0.4);
}

.auth-phone-input:hover {
    border-color: rgba(16, 185, 129, 0.55);
    background-color: rgba(24, 24, 24, 0.92);
}

.auth-phone-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45), 0 0 4px rgba(16, 185, 129, 0.25);
}

.auth-whatsapp-caption {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(110, 231, 183, 0.72);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.18);
    text-align: start;
    overflow-wrap: anywhere;
}

html[dir="rtl"] .auth-whatsapp-caption,
html[lang="ar"] .auth-whatsapp-caption {
    direction: rtl;
}

html[dir="ltr"] .auth-whatsapp-caption,
html[lang="en"] .auth-whatsapp-caption,
html[lang="fr"] .auth-whatsapp-caption {
    direction: ltr;
}

#auth-whatsapp-container label {
    text-align: start;
    display: block;
}

/* ═══ Auth modal: convert dark sub-controls to white/green (matches card) ═══
   Scoped under #auth-modal so this never affects the admin panel or any
   other usage of these shared classes. No IDs/classes renamed — JS hooks
   (has-value, country-select-trigger-text, country-option-row, selected,
   country-select-options-panel) keep working unchanged. */
#auth-modal .country-select-trigger,
#auth-modal .reg-country-select .country-select-trigger {
    background: #ffffff;
    color: var(--color-text);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
}
#auth-modal .country-select-trigger.has-value {
    border-color: var(--color-primary);
}
#auth-modal .country-select-trigger-text {
    color: var(--color-text);
}
#auth-modal .country-select-trigger-text:empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-muted);
}
#auth-modal .country-select-trigger:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}
#auth-modal .country-select-trigger:focus,
#auth-modal .country-select-trigger:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.12);
}
#auth-modal .country-select-options-panel {
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: 0 12px 28px -6px rgba(15, 40, 32, 0.18);
}
#auth-modal #country-search-input {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}
#auth-modal #country-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.12);
}
#auth-modal .country-option-row {
    color: var(--color-text);
    background: transparent;
}
#auth-modal .country-option-row:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
#auth-modal .country-option-row.selected {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 700;
}
#auth-modal #auth-whatsapp-container,
#auth-modal .auth-whatsapp-block {
    background: rgba(240, 253, 244, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-md);
}
#auth-modal .auth-dial-code-select {
    background: #ffffff;
    color: var(--color-text);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
}
#auth-modal .auth-dial-code-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.12);
    outline: none;
}
#auth-modal .auth-phone-input {
    background: #ffffff;
    color: var(--color-text);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
}
#auth-modal .auth-phone-input::placeholder {
    color: var(--color-text-muted);
}
#auth-modal .auth-phone-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.12);
    outline: none;
}
#auth-modal .auth-whatsapp-caption {
    color: var(--color-text-light);
}
#auth-modal #auth-whatsapp-container label {
    color: #065f46;
}
/* ═══ End auth modal dark-control overrides ═══ */

/* ═══════════════════════════════════════════════════════════════════
   Auth modal + checkout-gate redesign (green-header card)
   Scoped under #auth-modal and #checkout-auth-gate-modal only, so the
   admin panel and any other usage of these shared classes are untouched.
   No IDs/classes renamed — JS hooks (auth-modal-shell shake, auth-tab,
   btn-google-signin.is-loading, reg-gender-pill.active, etc.) intact.
   ═══════════════════════════════════════════════════════════════════ */

/* ---- Overlay — anchored below navbar, never centers upward ---- */
#auth-modal {
    display: flex;
    align-items: flex-start;     /* card always anchors at top padding */
    justify-content: center;
    padding: 80px 16px 24px;     /* 80px clears the sticky navbar */
    background: rgba(6, 24, 20, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

/* ---- Card shell — flex column, scrollable body, no floating icon ---- */
#auth-modal .auth-modal-shell {
    max-width: 520px;
    width: min(94vw, 520px);
    border-radius: 24px;
    overflow: hidden;           /* safe now — icon is in-flow */
    background: #ffffff;
    border: none;
    box-shadow:
        0 32px 72px -8px rgba(0, 40, 30, 0.28),
        0 0 0 1px rgba(0, 128, 96, 0.08);
    display: flex;
    flex-direction: column;
    max-height: 90vh;           /* never overflows viewport */
    overflow-y: auto;           /* scroll inside the card if content is tall */
    margin: 0;                  /* no negative margin — never clip under navbar */
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: authModalEnter 0.32s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
#checkout-auth-gate-modal .checkout-gate-modal-shell {
    max-width: 480px;
    width: min(92vw, 480px);
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 128, 96, 0.10);
    box-shadow: 0 28px 60px -12px rgba(0, 60, 45, 0.32),
                0 10px 24px -8px rgba(0, 60, 45, 0.18);
    padding: 0;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* Checkout-gate overlay: same anchor-below-navbar treatment */
#checkout-auth-gate-modal {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 16px 24px;
    overflow-y: auto;
}
/* Remove the gradient-border ::before ring (inherited from .auth-glass-card) */
#auth-modal .auth-modal-shell::before,
#checkout-auth-gate-modal .checkout-gate-modal-shell::before {
    display: none;
}
/* Glow no longer needed (green header replaces it) */
#auth-modal .auth-modal-glow,
#checkout-auth-gate-modal .checkout-gate-modal-glow {
    display: none;
}

/* ---- Entry animation ---- */
@keyframes authModalEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ---- Green gradient header ---- */
#auth-modal .auth-modal-header {
    background: linear-gradient(135deg, #006048 0%, #008060 100%);
    color: #ffffff;
    text-align: center;
    padding: 1.75rem 1.75rem 1.5rem;  /* no extra top padding — icon is in-flow */
    margin-bottom: 0;
    border-radius: 0;           /* shell clips the corners */
    overflow: visible;
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}
#checkout-auth-gate-modal .checkout-gate-modal-header {
    background: linear-gradient(135deg, #006048 0%, #008060 100%);
    color: #ffffff;
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    margin-bottom: 0;
    border-radius: 24px 24px 0 0;
    position: relative;
    z-index: 1;
}
#auth-modal .auth-modal-icon {
    position: relative;         /* back in-flow — no floating above the card */
    top: auto;
    left: auto;
    transform: none;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    animation: none;
    display: grid;
    place-items: center;
}
#checkout-auth-gate-modal .checkout-gate-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    box-shadow: none;
    animation: none; /* disable authIconPulse */
    display: grid;
    place-items: center;
}
#auth-modal .auth-modal-header h2,
#checkout-auth-gate-modal .checkout-gate-modal-header h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    /* override gradient text */
    background: none;
    -webkit-text-fill-color: currentColor;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}
#auth-modal .auth-modal-header p,
#checkout-auth-gate-modal .checkout-gate-modal-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    max-width: none;
    margin: 0 auto;
}
/* Close button over green header */
#auth-modal .auth-modal-close,
#checkout-auth-gate-modal .checkout-gate-modal-close {
    z-index: 3;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
#auth-modal .auth-modal-close:hover,
#checkout-auth-gate-modal .checkout-gate-modal-close:hover {
    background: rgba(255, 255, 255, 0.38);
    color: #ffffff;
}

/* ---- Body — scrolls internally, header/tabs stay fixed ---- */
#auth-modal .auth-modal-body {
    background: #ffffff;
    padding: 1.25rem 1.75rem 1.75rem;
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
#checkout-auth-gate-modal .checkout-gate-modal-actions {
    background: #ffffff;
    padding: 1.5rem 1.75rem 1.75rem;
}
#checkout-auth-gate-modal .checkout-gate-quick-note {
    background: #ffffff;
    padding: 0 1.75rem;
    margin-bottom: 0;
}

/* ---- Pill tab switcher — flex-shrink:0 so it never scrolls away ---- */
#auth-modal .auth-tabs {
    flex-shrink: 0;
    background: #f1f5f9;
    border: none;
    padding: 4px;
    border-radius: 999px;
    gap: 2px;
    margin: 0 1.75rem 0;
    position: relative;
    z-index: 1;
}
#auth-modal .auth-tab {
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 12px;
    border-radius: 999px;
    transform: none;
    box-shadow: none;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
#auth-modal .auth-tab:hover:not(.active) {
    background: transparent;
    color: #008060;
}
#auth-modal .auth-tab.active {
    background: #ffffff;
    color: #008060;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 60, 45, 0.12);
    transform: none;
}

/* ---- Labels ---- */
#auth-modal .auth-form label,
#auth-modal .reg-dob-legend,
#auth-modal .auth-gender-label,
#auth-modal #auth-whatsapp-container label {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

/* ---- Inputs ---- */
#auth-modal .auth-input {
    height: 52px;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    padding: 0 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#auth-modal .auth-input::placeholder {
    color: #94a3b8;
}
#auth-modal .auth-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    transform: none;
}
#auth-modal .auth-input:focus,
#auth-modal .auth-input:focus-visible {
    outline: none;
    border-color: #008060;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.15);
    transform: none;
}
/* password field keep room for the eye toggle */
#auth-modal .password-input-wrap .auth-input {
    padding-inline-end: 44px;
}
#auth-modal .password-toggle-btn {
    color: #94a3b8;
}
#auth-modal .password-toggle-btn:hover {
    color: #008060;
}

/* DOB segmented inputs */
#auth-modal .reg-dob-fieldset {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}
#auth-modal .reg-dob-segments {
    gap: 8px;
}
#auth-modal .reg-dob-input {
    height: 52px;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
    padding: 0 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#auth-modal .reg-dob-input:hover {
    border-color: #cbd5e1;
}
#auth-modal .reg-dob-input:focus,
#auth-modal .reg-dob-input:focus-visible {
    outline: none;
    border-color: #008060;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.15);
    background: #ffffff;
}
#auth-modal .reg-dob-segment-label {
    text-transform: none;
    letter-spacing: 0;
    color: #6b7280;
    font-weight: 600;
}
#auth-modal .reg-dob-separator {
    color: #cbd5e1;
}

/* ---- Gender pill toggles ---- */
#auth-modal .reg-gender-pills {
    gap: 10px;
}
#auth-modal .reg-gender-pill {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    padding: 0 12px;
    transition: all 0.2s ease;
    transform: none;
    box-shadow: none;
}
#auth-modal .reg-gender-pill:hover {
    border-color: #008060;
    color: #008060;
    background: #ffffff;
    transform: none;
}
#auth-modal .reg-gender-pill.active {
    background: #008060;
    border-color: #008060;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.25);
    transform: none;
}

/* ---- Divider ---- */
#auth-modal .auth-or-divider,
#checkout-auth-gate-modal .auth-or-divider {
    color: #94a3b8;
    font-weight: 600;
    margin: 1.1rem 0;
}
#auth-modal .auth-or-divider::before,
#auth-modal .auth-or-divider::after,
#checkout-auth-gate-modal .auth-or-divider::before,
#checkout-auth-gate-modal .auth-or-divider::after {
    background: #e5e7eb;
}

/* ---- Submit buttons (signin + signup) ---- */
#auth-modal .auth-submit-btn {
    height: 52px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    padding: 0 16px;
    border: none;
    box-shadow: 0 6px 16px -4px rgba(0, 128, 96, 0.35);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
#auth-modal .auth-submit-signin,
#auth-modal .auth-submit-signup {
    background: linear-gradient(135deg, #006048 0%, #008060 100%);
    color: #ffffff;
    border: none;
}
#auth-modal .auth-submit-signin:hover,
#auth-modal .auth-submit-signup:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 24px -4px rgba(0, 128, 96, 0.45);
    transform: translateY(-1px);
}
#auth-modal .auth-submit-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

/* ---- Google button ---- */
#auth-modal .btn-google-signin,
#checkout-auth-gate-modal .btn-google-signin {
    height: 48px;
    border-radius: 14px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
    box-shadow: none;
}
#auth-modal .btn-google-signin:hover,
#checkout-auth-gate-modal .btn-google-signin:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
}
#auth-modal .btn-google-signin:active,
#checkout-auth-gate-modal .btn-google-signin:active {
    background: #f3f4f6;
}

/* ---- Remember-me keeps its emerald checkbox (already green) ---- */
#auth-modal .auth-remember-me {
    justify-content: flex-start;
}

/* ---- Checkout-gate action buttons (login/register) ---- */
#checkout-auth-gate-modal .checkout-gate-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#checkout-auth-gate-modal .checkout-gate-modal-actions .btn {
    height: 48px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#checkout-auth-gate-modal #checkout-gate-register-btn {
    background: linear-gradient(135deg, #006048 0%, #008060 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 16px -4px rgba(0, 128, 96, 0.35);
}
#checkout-auth-gate-modal #checkout-gate-register-btn:hover {
    filter: brightness(1.1);
}
#checkout-auth-gate-modal #checkout-gate-login-btn {
    background: #ffffff;
    color: #008060;
    border: 1.5px solid #008060;
}
#checkout-auth-gate-modal #checkout-gate-login-btn:hover {
    background: var(--color-primary-light);
}

/* ---- Mobile tweaks ---- */
/* ---- Responsive — tablet ---- */
@media (max-width: 640px) {
    #auth-modal {
        padding: 80px 12px 16px;
    }
    #auth-modal .auth-modal-shell {
        max-height: calc(100vh - 92px);
    }
}

/* ---- Responsive — phone ---- */
@media (max-width: 480px) {
    #auth-modal {
        padding: 68px 0 0;
        align-items: flex-start;
    }
    #auth-modal .auth-modal-shell {
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: calc(100vh - 68px);
    }
    #auth-modal .auth-modal-header,
    #checkout-auth-gate-modal .checkout-gate-modal-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    #auth-modal .auth-modal-header h2,
    #checkout-auth-gate-modal .checkout-gate-modal-header h2 {
        font-size: 19px;
    }
    #auth-modal .auth-tabs {
        margin: 0 1.25rem 0;
    }
    #auth-modal .auth-tab {
        font-size: 13px;
        padding: 8px 8px;
    }
    #auth-modal .auth-modal-body,
    #checkout-auth-gate-modal .checkout-gate-modal-actions {
        padding: 1.1rem 1.25rem 1.4rem;
    }
}
/* ═══════════ End auth modal + checkout-gate redesign ═══════════ */

.admin-customer-whatsapp-cell {
    white-space: nowrap;
}

.admin-whatsapp-na {
    color: rgba(148, 163, 184, 0.75);
    font-size: 0.8125rem;
}

.admin-whatsapp-link {
    display: inline-flex;
    text-decoration: none;
    color: inherit;
}

.admin-whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
}

.admin-whatsapp-icon {
    flex-shrink: 0;
    color: #22c55e;
}

.admin-whatsapp-link:hover .admin-whatsapp-badge,
.admin-whatsapp-link:focus-visible .admin-whatsapp-badge {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.admin-chat-meta-whatsapp .admin-whatsapp-badge {
    font-size: 0.75rem;
}

.admin-device-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-device-badge-desktop {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.admin-device-badge-mobile {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.admin-customer-dob-cell {
    white-space: nowrap;
    font-weight: 600;
    color: var(--color-text);
}

.admin-customer-gender-cell {
    white-space: nowrap;
}

.admin-gender-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.admin-chat-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.admin-chat-meta-item strong {
    color: #047857;
    font-weight: 700;
}

html[dir="rtl"] .admin-customers-table th,
html[dir="rtl"] .admin-customers-table td {
    text-align: start;
}

.admin-customer-actions-cell {
    white-space: normal;
    min-width: 12rem;
}

.admin-customer-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.admin-customer-name-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.admin-frozen-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    white-space: nowrap;
}

.admin-customer-row-frozen {
    background: rgba(59, 130, 246, 0.04);
}

.admin-customer-row-frozen td {
    opacity: 0.92;
}

.admin-notify-modal-shell {
    background: linear-gradient(160deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.admin-wallet-balance {
    font-weight: 600;
    color: #047857;
}

.admin-wallet-modal-shell h2 {
    margin-bottom: 0.75rem;
}

.admin-wallet-current-row {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.admin-wallet-mode-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-wallet-mode-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

/* --- Wallet Top-Up Modal --- */
.wallet-topup-modal-shell {
    background: linear-gradient(160deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(16, 185, 129, 0.22);
    /* Slightly tighter padding so the whole modal fits within the viewport
       even on shorter laptop screens, without its top getting clipped. */
    padding: 1.25rem 1.5rem;
}

.wallet-topup-modal-desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

#wallet-topup-modal .modal-header-block h2 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
}

.wallet-topup-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#wallet-topup-modal .form-group {
    margin-bottom: 0.7rem;
}

#wallet-topup-modal .form-group label {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

#wallet-topup-modal input[type="number"],
#wallet-topup-modal input[type="text"] {
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
}

/* Wallet top-up payment grid — same compact horizontal badges as checkout */
.wallet-topup-gateway-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: min(32vh, 240px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wallet-topup-gateway-list .topup-gateway-option {
    flex: 0 1 auto;
    max-width: 100%;
}

.wallet-topup-gateway-list .topup-gateway-option .pay-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: auto;
    flex-shrink: 0;
    line-height: 0;
}

.wallet-topup-gateway-list .topup-gateway-option .pay-logo svg,
.wallet-topup-gateway-list .topup-gateway-option .pay-logo .payment-logo,
.wallet-topup-gateway-list .topup-gateway-option .pay-logo .gw-logo-img {
    max-height: 24px;
    max-width: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.wallet-topup-gw-panel {
    margin-top: 0.5rem;
    padding: 0.75rem 0.9rem;
}

.wallet-topup-gw-panel h4 {
    font-size: 0.95rem;
    margin: 0 0 0.4rem;
}

.wallet-topup-gw-panel .checkout-gw-field {
    font-size: 0.85rem;
    padding: 0.3rem 0;
}

.wallet-topup-gw-panel .checkout-cryptomus-note {
    font-size: 0.82rem;
    margin: 0.4rem 0 0;
    line-height: 1.5;
}

.wallet-topup-gw-panel .checkout-gw-instructions {
    font-size: 0.8rem;
    line-height: 1.55;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.wallet-topup-submit-btn {
    margin-top: 0;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
}

#wallet-topup-modal .modal-footer-actions {
    padding-top: 0.85rem;
    margin-top: 0;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
}

#wallet-topup-modal .modal-close-btn {
    top: 8px;
    inset-inline-end: 10px;
    font-size: 1.4rem;
    width: 28px;
    height: 28px;
}

.policy-modal-title {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    color: var(--color-primary);
}

.policy-modal-text-content {
    text-align: justify;
    line-height: 1.8;
    font-size: 0.95rem;
    color: var(--color-text-light);
    padding-inline-end: 0.5rem;
}

@media (max-height: 700px) {
    .pay-option {
        min-height: 40px;
        padding: 6px 12px;
    }

    .pay-option .pay-logo {
        height: 20px;
    }

    .pay-option .pay-logo svg,
    .pay-option .pay-logo .payment-logo,
    .pay-option .pay-logo .gw-logo-img {
        max-height: 20px;
    }

    .wallet-topup-gateway-list .topup-gateway-option {
        min-height: 40px;
        padding: 6px 12px;
    }

    .wallet-topup-gateway-list .topup-gateway-option .pay-logo {
        height: 20px;
    }

    .wallet-topup-gateway-list .topup-gateway-option .pay-logo svg,
    .wallet-topup-gateway-list .topup-gateway-option .pay-logo .payment-logo,
    .wallet-topup-gateway-list .topup-gateway-option .pay-logo .gw-logo-img {
        max-height: 20px;
    }

    .modal-content {
        max-height: min(90vh, calc(100vh - 40px));
        padding: 1.25rem;
    }

    .wallet-topup-gateway-list {
        max-height: min(32vh, 240px);
    }
}

.wallet-topup-no-gateway {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 2px dashed var(--color-border);
    border-radius: 16px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    grid-column: 1 / -1;
}
.wallet-topup-no-gateway::before {
    content: "💳";
    font-size: 2rem;
    line-height: 1;
    opacity: 0.6;
}

/* --- Admin Wallet Deposits Table --- */
.admin-deposits-table-wrap {
    overflow-x: auto;
}

.admin-deposits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.admin-deposits-table th,
.admin-deposits-table td {
    padding: 0.85rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.admin-deposits-table th {
    font-weight: 700;
    color: var(--color-primary);
    background: rgba(16, 185, 129, 0.06);
}

.admin-deposits-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-deposit-amount {
    font-weight: 800;
    color: #047857;
}

@media (max-width: 600px) {
    .wallet-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wallet-topup-btn {
        width: 100%;
        align-self: stretch;
    }

    .wallet-status-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: start;
    }

    .wallet-status-amount {
        font-size: 1.45rem;
    }

    .wallet-topup-gateway-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-customers-table th,
    .admin-customers-table td,
    .admin-deposits-table th,
    .admin-deposits-table td {
        padding: 0.7rem 0.55rem;
        font-size: 0.875rem;
    }

    .admin-customer-action-group {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-customer-action-group .btn-sm {
        width: 100%;
        font-size: 0.8125rem;
    }

    .notification-card {
        padding: 0.85rem;
        font-size: 0.875rem;
    }

    .notification-card-title {
        font-size: 0.875rem;
    }

    .customer-dashboard-top-bar {
        margin-bottom: 0.5rem;
    }

    .loyalty-header-row {
        flex-direction: column;
    }

    .admin-loyalty-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-loyalty-leaderboard-header,
    .admin-loyalty-leaderboard-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* --- Loyalty Points & Wallet Integration --- */

.loyalty-badge {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #047857;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
    line-height: 1.4;
    white-space: nowrap;
}

html[dir="rtl"] .loyalty-badge {
    text-align: right;
}

html[dir="ltr"] .loyalty-badge {
    text-align: left;
}

.loyalty-header-row {
    display: flex;
    margin-bottom: 1.25rem;
}

.loyalty-glass-card {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 253, 244, 0.88));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.loyalty-card-icon {
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(16, 185, 129, 0.35));
}

.loyalty-card-balance {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.loyalty-card-balance > span:first-child {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.loyalty-card-points-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.loyalty-points-counter {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-success);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.loyalty-card-points-row span:last-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.loyalty-redeem-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-md);
    cursor: not-allowed;
    opacity: 0.55;
    transition: var(--transition-smooth);
}

.loyalty-redeem-btn:disabled {
    pointer-events: none;
}

.loyalty-redeem-btn.ready {
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
    animation: loyalty-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 12px #10b981;
}

.loyalty-redeem-btn.ready:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

@keyframes loyalty-pulse {
    0%, 100% { box-shadow: 0 0 12px #10b981; }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.65); }
}

.loyalty-celebration-modal {
    max-width: 420px;
    text-align: center;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(209, 250, 229, 0.95));
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.2);
}

.loyalty-celebration-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.4));
}

.loyalty-celebration-modal h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 0.65rem;
}

.loyalty-celebration-desc {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* --- Admin Loyalty Control Center (Cyberpunk Emerald) --- */

.admin-loyalty-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
}

.admin-loyalty-section::before {
    content: "";
    position: absolute;
    inset: -0.5rem -0.25rem auto;
    height: 120px;
    background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.admin-loyalty-section > * {
    position: relative;
    z-index: 1;
}

.admin-loyalty-header h2 {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-loyalty-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.6fr);
    gap: 1.25rem;
    margin-top: 0.25rem;
}

.admin-loyalty-config,
.admin-loyalty-leaderboard,
.admin-loyalty-notifications-section {
    padding: 1.35rem 1.5rem;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.06) 0%, rgba(4, 120, 87, 0.02) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.admin-loyalty-config:hover,
.admin-loyalty-leaderboard:hover,
.admin-loyalty-notifications-section:hover {
    border-color: rgba(16, 185, 129, 0.38);
    box-shadow: 0 6px 28px rgba(16, 185, 129, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-loyalty-config h3,
.admin-loyalty-leaderboard h3,
.admin-loyalty-notifications-section h3 {
    font-size: 1.02rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.admin-loyalty-section-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.admin-loyalty-config-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.admin-loyalty-config-fields .form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 0.35rem;
    display: block;
}

.admin-loyalty-config-fields input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    background: rgba(0, 0, 0, 0.15);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-loyalty-config-fields input:hover {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.04);
}

.admin-loyalty-config-fields input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 10px #10b981;
    background: rgba(16, 185, 129, 0.06);
}

.admin-loyalty-save-btn {
    margin-top: 0.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35), 0 4px 12px rgba(4, 120, 87, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.admin-loyalty-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.55), 0 6px 16px rgba(4, 120, 87, 0.35);
    filter: brightness(1.08);
}

.admin-loyalty-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.admin-loyalty-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 320px;
    overflow-y: auto;
}

.admin-loyalty-leaderboard-header,
.admin-loyalty-leaderboard-row {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
}

.admin-loyalty-leaderboard-header {
    font-weight: 700;
    color: var(--color-text-light);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.admin-loyalty-leaderboard-row {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.admin-loyalty-leaderboard-row:hover {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.2);
}

.admin-loyalty-leaderboard-customer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.admin-loyalty-leaderboard-customer strong {
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-loyalty-leaderboard-email {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-loyalty-leaderboard-points {
    font-weight: 800;
    color: var(--color-success);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

html[dir="rtl"] .admin-loyalty-leaderboard-points {
    text-align: center;
}

.admin-loyalty-leaderboard-remaining {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-light);
}

html[dir="rtl"] .admin-loyalty-leaderboard-remaining {
    text-align: start;
}

html[dir="ltr"] .admin-loyalty-leaderboard-remaining {
    text-align: end;
}

.admin-loyalty-notifications-stream {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 0.25rem;
    scroll-behavior: smooth;
}

.admin-loyalty-notifications-stream::-webkit-scrollbar {
    width: 5px;
}

.admin-loyalty-notifications-stream::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.35);
    border-radius: 4px;
}

.admin-loyalty-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    animation: admin-loyalty-slide-in 0.35s ease-out;
}

.admin-loyalty-notification:hover {
    transform: translateX(2px);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

html[dir="rtl"] .admin-loyalty-notification:hover {
    transform: translateX(-2px);
}

@keyframes admin-loyalty-slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-loyalty-notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
    margin-top: 0.35rem;
    animation: loyalty-pulse 2s ease-in-out infinite;
}

.admin-loyalty-notification-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #047857;
    line-height: 1.45;
}

.admin-loyalty-notification-time {
    display: block;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.admin-loyalty-empty {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 1.5rem 0.5rem;
}

@media (max-width: 1024px) {
    .admin-loyalty-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-loyalty-config-fields {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    .admin-loyalty-config-fields {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-loyalty-config-fields .form-group:last-child {
        grid-column: 1 / -1;
    }
}

/* --- Sensory Alert: neon emerald pulse (admin + customer) --- */
.admin-flash-pulse,
.customer-flash-pulse {
    will-change: transform, box-shadow;
    animation: admin-flash-pulse 1.1s ease-in-out infinite;
}

@keyframes admin-flash-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(16, 185, 129, 0.55),
            0 0 12px 2px rgba(16, 185, 129, 0.35),
            inset 0 0 0 1px rgba(52, 211, 153, 0.25);
        transform: scale(1);
        border-color: rgba(16, 185, 129, 0.45);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(16, 185, 129, 0.2),
            0 0 22px 8px rgba(16, 185, 129, 0.65),
            0 0 36px 12px rgba(52, 211, 153, 0.35),
            inset 0 0 0 1px rgba(110, 231, 183, 0.55);
        transform: scale(1.02);
        border-color: rgba(52, 211, 153, 0.85);
    }
}

@keyframes customer-flash-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(16, 185, 129, 0.5),
            0 0 14px 3px rgba(16, 185, 129, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(16, 185, 129, 0.18),
            0 0 24px 10px rgba(16, 185, 129, 0.6),
            0 0 40px 14px rgba(52, 211, 153, 0.3);
        transform: scale(1.03);
    }
}

.customer-flash-pulse {
    animation-name: customer-flash-pulse;
}

.admin-order-row.admin-flash-pulse {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    outline: 2px solid rgba(16, 185, 129, 0.55);
    outline-offset: -2px;
}

.admin-order-row.admin-flash-pulse td {
    background: rgba(16, 185, 129, 0.06);
}

#admin-nav-orders.admin-flash-pulse {
    border-radius: 10px;
}

#customer-notif-bell.customer-flash-pulse {
    border-radius: 50%;
}

.customer-menu-item.customer-flash-pulse,
.customer-mobile-tab.customer-flash-pulse {
    border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
    .admin-flash-pulse,
    .customer-flash-pulse {
        animation: none;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.65);
    }

}

/* --- Responsive admin tables → card layout on mobile --- */
@media (max-width: 768px) {
    .responsive-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .responsive-data-table,
    .responsive-data-table tbody,
    .responsive-data-table tr,
    .responsive-data-table td {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .responsive-data-table {
        min-width: 0;
        border-collapse: separate;
    }

    .responsive-data-table tbody tr {
        margin-bottom: 0.85rem;
        border: 1px solid rgba(16, 185, 129, 0.22);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 12px 28px -22px rgba(4, 120, 87, 0.45);
        padding: 0.25rem 0;
        overflow: hidden;
    }

    .responsive-data-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 14px 32px -20px rgba(4, 120, 87, 0.5);
    }

    .responsive-data-table tbody td {
        border-bottom: 1px solid rgba(16, 185, 129, 0.12);
        padding: 0.7rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        text-align: start;
        font-size: 0.9rem;
        word-break: break-word;
        min-width: 0;
    }

    .responsive-data-table tbody td:last-child {
        border-bottom: none;
    }

    .responsive-data-table tbody td[colspan] {
        display: block;
        text-align: center;
        justify-content: center;
    }

    .responsive-data-table tbody td[colspan]::before {
        content: none;
    }

    .responsive-data-table tbody td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--color-primary);
        text-align: start;
        flex-shrink: 0;
        max-width: 100%;
        font-size: 0.78rem;
        letter-spacing: 0.01em;
    }

    .responsive-data-table .admin-customer-action-group,
    .responsive-data-table .admin-deposits-actions,
    .responsive-data-table .admin-order-actions,
    .responsive-data-table .actions-cell {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }

    .responsive-data-table .admin-customer-action-group .btn-sm,
    .responsive-data-table .admin-deposits-actions .btn-sm,
    .responsive-data-table .admin-order-actions .btn,
    .responsive-data-table .admin-order-actions .btn-sm,
    .responsive-data-table .actions-cell .btn,
    .responsive-data-table tbody td[data-label] .btn-sm,
    .responsive-data-table tbody td[data-label] .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .admin-customer-actions-cell {
        min-width: 0;
    }

    .admin-freeze-appeal-message-cell {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        max-width: none;
    }

    .admin-orders-table tbody td:nth-child(4) {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        max-width: none;
    }

    .admin-order-row {
        cursor: default;
    }
}

/* Dedicated /admin page shell */
body.admin-page {
    min-height: 100vh;
    font-family: var(--font-body);
}

body.admin-page .main-content.admin-page-main {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

body.admin-page #view-admin.content-view {
    display: block;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
    box-sizing: border-box;
}

.admin-page-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.admin-page-header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
}

html[dir="ltr"] .admin-page-header-inner {
    direction: ltr;
}

/* Override storefront .logo-area { order: 1 } — logo first in DOM sits on the right in RTL */
.admin-page-header-inner .logo-area {
    order: 0;
    flex-shrink: 0;
}

.admin-page-header-inner .lang-selector-container {
    order: 0;
    margin-inline: auto;
}

.admin-page-header-inner .admin-page-back-link {
    order: 0;
    flex-shrink: 0;
}

.admin-page-back-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-page-back-link:hover {
    text-decoration: underline;
    color: var(--color-primary-hover);
}

.admin-page-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-inline-start: 0.35rem;
}

@media (max-width: 768px) {
    body.admin-page #view-admin.content-view {
        padding: 0 0.75rem 1.5rem;
    }

    .admin-page-header-inner {
        padding: 0.65rem 1rem;
        flex-wrap: nowrap;
    }

    .admin-page-header-inner .logo-area {
        flex: 1 1 auto;
        min-width: 0;
    }

    .admin-page-header-inner .admin-page-back-link {
        font-size: 0.82rem;
    }

    .admin-page-header-inner .lang-selector-container {
        margin-inline: 0.5rem;
    }
}

/* --- Trustpilot Integration ---
   Visual language mirrors Trustpilot's actual widget: 5 solid green
   stars, "Excellent" rating text, the green star-in-box brand mark,
   and a white pill on the dark hero. The link targets the store's
   review page so a click takes the customer straight to the rating
   form (no extra "click to leave a review" friction). */
:root {
    --tp-green: #00B67A;        /* Trustpilot's brand green */
    --tp-green-dark: #00875A;   /* hover / depth */
    --tp-ink: #191919;          /* Trustpilot wordmark color */
    --tp-ink-soft: #454f5b;
}

.trustpilot-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding: 0.55rem 0.95rem 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 182, 122, 0.25);
    background: #ffffff;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    color: inherit;
    font-family: 'Inter', 'Cairo', system-ui, sans-serif;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    will-change: transform;
}

.trustpilot-banner:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 182, 122, 0.5);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45);
}

.trustpilot-banner:focus-visible {
    outline: 2px solid var(--tp-green);
    outline-offset: 2px;
}

.trustpilot-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    line-height: 1;
}

.trustpilot-star {
    width: 1.35rem;
    height: 1.35rem;
    fill: var(--tp-green);
    display: block;
    /* Trustpilot's stars have a subtle inner highlight; mimic with a
       soft drop shadow that respects the green rather than a generic
       black drop. */
    filter: drop-shadow(0 1px 0 rgba(0, 135, 90, 0.18));
}

.trustpilot-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    line-height: 1;
}

.trustpilot-excellent {
    font-size: 0.95rem;
    font-weight: 800;
    color: #191919;
    letter-spacing: -0.005em;
}

.trustpilot-divider {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
}

.trustpilot-reviews-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #454f5b;
    letter-spacing: 0.01em;
}

.trustpilot-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding-inline-start: 0.75rem;
    border-inline-start: 1px solid #e5e7eb;
    margin-inline-start: 0.15rem;
    line-height: 1;
}

.trustpilot-brand-star {
    width: 1.05rem;
    height: 1.05rem;
    fill: var(--tp-green);
    display: block;
    flex-shrink: 0;
}

.trustpilot-brand-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #191919;
    letter-spacing: -0.01em;
}

/* Customer Reviews Section */
.customer-reviews {
    margin-bottom: 2.5rem;
}

.reviews-section-header {
    margin-bottom: 1.25rem;
}

.reviews-section-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.reviews-section-header p {
    font-size: 0.88rem;
    color: var(--color-text-light);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.review-card {
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.88));
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.14);
}

.review-card-stars {
    color: #00b67a;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    line-height: 1;
}

.review-card-text {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--color-text);
    flex: 1;
}

.review-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
    font-size: 0.78rem;
}

.review-card-author {
    font-weight: 700;
    color: #047857;
}

.review-card-date {
    color: var(--color-text-light);
    white-space: nowrap;
}

.admin-review-stars-cell {
    color: #00b67a;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.admin-reviews-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Under Construction / Beta Purchase Warning Modal */
.beta-warning-modal {
    max-width: 440px;
    text-align: center;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(209, 250, 229, 0.95));
    box-shadow: var(--shadow-lg, 0 20px 50px rgba(16, 185, 129, 0.2));
    border-radius: 16px;
}

.beta-warning-modal-icon {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.35));
}

.beta-warning-modal h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 0.65rem;
}

.beta-warning-modal-text {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Trustpilot Review Modal */
.trustpilot-review-modal {
    max-width: 420px;
    text-align: center;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(209, 250, 229, 0.95));
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.2);
}

.trustpilot-review-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.35));
}

.trustpilot-review-modal h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 0.65rem;
}

.trustpilot-review-modal-text {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.trustpilot-review-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .trustpilot-banner {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .trustpilot-logo-svg {
        height: 1.1rem;
    }

    .trustpilot-excellent {
        font-size: 0.85rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Homepage Design v2 — merged from design-preview/
   ═══════════════════════════════════════════════════════════════ */

:root {
    --hp-container: 1240px;
    --hp-grad-hero: linear-gradient(140deg, #00996f 0%, #008060 38%, #005c44 78%, #00473a 100%);
    --hp-grad-btn: linear-gradient(135deg, #009a72, #007355);
    --hp-green-deep: #00473a;
    --hp-green-soft: #e6f4f0;
    --hp-green-mist: #f2faf7;
    --hp-ink: #0f2820;
    --hp-ink-2: #3d5a4f;
    --hp-ink-3: #7d968c;
    --hp-line: #e2ece8;
    --hp-gold: #eab308;
    --hp-shadow-primary: 0 12px 28px -8px rgba(0, 128, 96, 0.4);
    --hp-shadow-md: 0 6px 16px -4px rgba(15, 40, 32, 0.1), 0 2px 6px -2px rgba(15, 40, 32, 0.06);
    --hp-shadow-lg: 0 20px 40px -12px rgba(15, 40, 32, 0.16), 0 8px 16px -8px rgba(15, 40, 32, 0.08);
    --hp-radius: 20px;
    --hp-radius-xl: 24px;
    --hp-radius-round: 28px;
    --hp-t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
    max-width: var(--hp-container);
    margin: 0 auto;
    padding: 0 20px;
}

.homepage-fullbleed {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
}

#view-store {
    padding-bottom: 0;
}

.mobile-only {
    display: none;
}

/* Announcement bar */
.announcement-bar {
    position: relative;
    background: var(--hp-green-deep);
    color: #d9f2e9;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 600;
    height: 40px;
    display: flex;
    align-items: center;
}

.announcement-bar::before,
.announcement-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 2;
    pointer-events: none;
}

.announcement-bar::before {
    inset-inline-start: 0;
    background: linear-gradient(to left, transparent, var(--hp-green-deep));
}

[dir="rtl"] .announcement-bar::before {
    background: linear-gradient(to right, transparent, var(--hp-green-deep));
}

.announcement-bar::after {
    inset-inline-end: 0;
    background: linear-gradient(to right, transparent, var(--hp-green-deep));
}

[dir="rtl"] .announcement-bar::after {
    background: linear-gradient(to left, transparent, var(--hp-green-deep));
}

.announcement-track {
    display: flex;
    gap: 48px;
    white-space: nowrap;
    animation: hp-scrollX 28s linear infinite;
    padding-inline-start: 100%;
}

.announcement-bar:hover .announcement-track {
    animation-play-state: paused;
}

@keyframes hp-scrollX {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

[dir="rtl"] .announcement-track {
    animation-direction: reverse;
}

/* Header v2 */
.main-header {
    background: var(--color-bg-surface);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.main-header .header-container {
    max-width: var(--hp-container);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.main-header .header-row-1,
.main-header .header-top-row.header-row-1 {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 72px;
    padding: 0 20px;
    width: 100%;
}

.main-header .logo-area {
    flex-shrink: 0;
    order: unset;
}

.main-header .logo-icon {
    width: 42px;
    height: 42px;
    background: var(--hp-grad-hero);
    box-shadow: var(--hp-shadow-primary);
}

.main-header .logo-icon svg {
    width: 22px;
    height: 22px;
}

.main-header .logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.main-header .logo-text .highlight,
.main-header .logo-accent {
    color: var(--color-primary);
}

.search-wrap {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-ico {
    position: absolute;
    inset-inline-start: 14px;
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input,
.search-wrap .search-input,
#store-search.search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    border: 1.5px solid transparent;
    font-size: 0.92rem;
    transition: all var(--hp-t);
    color: var(--color-text);
}

[dir="rtl"] .search-input,
[dir="rtl"] #store-search.search-input {
    padding: 0 44px 0 16px;
}

.search-input:focus,
#store-search.search-input:focus {
    outline: none;
    background: var(--color-bg-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.main-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    order: unset;
    flex-shrink: 0;
}

.icon-btn-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--hp-t);
    background: none;
    border: none;
    cursor: pointer;
}

.icon-btn-text svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.icon-btn-text:hover,
.customer-auth-btn.icon-btn-text:hover,
.lang-selector-btn.icon-btn-text:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
}

/* ---- Premium outlined auth button ---- */
.customer-auth-btn.icon-btn-text {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 0.88rem;
    color: var(--color-text);
    background: var(--color-bg-surface);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.customer-auth-btn.icon-btn-text:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.cart-toggle-btn.icon-btn.cart {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all var(--hp-t);
}

.cart-toggle-btn.icon-btn.cart:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
}

.cart-toggle-btn.icon-btn.cart svg {
    width: 20px;
    height: 20px;
}

.cart-toggle-btn .cart-count {
    top: -2px;
    inset-inline-end: -2px;
    background: var(--color-accent);
    min-width: 19px;
    height: 19px;
    font-size: 0.7rem;
    border: 2px solid var(--color-bg-surface);
}

.main-header .header-row-2.nav-links {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    border-top: 1px solid #e2e8f0;
    background: var(--color-bg-surface);
    order: unset;
    padding: 0;
    margin: 0;
    box-shadow: none;
    pointer-events: auto;
    visibility: visible;
}

.nav-container {
    max-width: var(--hp-container);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.main-header .header-row-2.nav-links[hidden] { display: none !important; }
/* Keep the desktop header's original visual rhythm after moving its links
   into the customer account. The reserved white row preserves the former
   header height, while its old centre links remain invisible. */
@media (min-width: 769px) {
    .main-header .header-row-2.nav-links[hidden] {
        display: block !important;
        min-height: 56px;
    }
    .main-header .header-row-2.nav-links[hidden] .nav-container {
        visibility: hidden;
        pointer-events: none;
    }
}

.customer-context-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.customer-context-actions[hidden] { display: none !important; }
.customer-context-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.customer-context-link svg { width: 17px; height: 17px; color: #008060; }
.customer-context-link:hover { color: #006247; background: #ecfdf5; border-color: #86efac; }
@media (max-width: 900px) {
    .customer-context-link span { display: none; }
    .customer-context-link { width: 38px; justify-content: center; padding: 0; }
}

.main-header .nav-link.nav-link-prominent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 178px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 800;
    border: 1px solid #d1fae5;
    background: #f0fdf4;
    color: #006247;
    box-shadow: 0 2px 8px rgba(0, 128, 96, 0.08);
}
.main-header .nav-link.nav-link-prominent svg { width: 19px; height: 19px; flex: 0 0 19px; }
.main-header .nav-link.nav-link-prominent:hover,
.main-header .nav-link.nav-link-prominent.active {
    color: #fff;
    background: linear-gradient(135deg, #006247, #008060);
    border-color: #008060;
    box-shadow: 0 6px 16px rgba(0, 128, 96, 0.24);
    transform: translateY(-1px);
}

/* ══ Auth modal — header slide-up, scroll-lock, overlay animations ══ */

/* 1. Give the header smooth transition capability */
.main-header {
    transition: transform 0.3s ease-in-out, opacity 0.28s ease-in-out;
    will-change: transform;
}

/* 2. When auth modal is open: lock scroll + slide header off-screen */
body.auth-modal-open {
    overflow: hidden;
}
body.auth-modal-open .main-header {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* 3. Overlay fade-in — replays every time .hidden is removed */
#auth-modal:not(.hidden) {
    animation: authOverlayFadeIn 0.3s ease-out forwards;
}

/* 4. Overlay + shell fade-out (JS adds .is-closing before hiding) */
#auth-modal.is-closing {
    animation: authOverlayFadeOut 0.26s ease-in forwards;
    pointer-events: none;
}
#auth-modal.is-closing .auth-modal-shell {
    animation: authModalExit 0.26s ease-in forwards;
}

@keyframes authOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes authOverlayFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes authModalExit {
    from { opacity: 1; transform: translateY(0)    scale(1);    }
    to   { opacity: 0; transform: translateY(16px)  scale(0.97); }
}
/* ══ End auth modal slide-up ══ */

/* Hero — v2 gradient with floating product cards */
#view-store .hero {
    position: relative;
    padding: 64px 0 0;
    overflow: hidden;
    background: var(--hp-grad-hero);
    color: #fff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
    margin-bottom: 0;
}

#view-store .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(720px 420px at 12% -10%, rgba(255, 255, 255, 0.14), transparent 60%),
        radial-gradient(560px 420px at 90% 110%, rgba(234, 179, 8, 0.12), transparent 60%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    max-width: var(--hp-container);
    margin: 0 auto;
    padding: 0 20px 88px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
    z-index: 1;
}

.hero-badge,
#view-store .badge.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
    box-shadow: none;
    margin-bottom: 20px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.25);
    animation: hp-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes hp-pulse {
    50% { box-shadow: 0 0 0 8px rgba(110, 231, 183, 0); }
}

#view-store .hero-text h1 {
    font-size: clamp(2rem, 4.2vw, 3.3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 18px;
    max-width: none;
    color: #fff;
}

#view-store .hero-desc {
    font-size: 1.06rem;
    max-width: 540px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.hero-cta .btn-lg {
    padding: 15px 32px;
    font-size: 1.02rem;
    font-weight: 800;
    border-radius: 16px;
}

.hero-cta .hero-btn-solid.btn-primary {
    background: #fff;
    color: #006048;
    border: none;
    box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.35);
}

.hero-cta .hero-btn-solid.btn-primary:hover {
    background: #fff;
    color: #00473a;
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

.hero-cta .hero-btn-ghost.btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-cta .hero-btn-ghost.btn-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
    transform: translateY(-3px);
}

.btn-outline {
    background: var(--color-bg-surface);
    color: var(--color-primary);
    border: 1.5px solid #cbd5e1;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.btn-white {
    background: #fff;
    color: var(--color-primary);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Trustpilot banner sits on the dark hero — keep it readable as a white pill */
.hero-trustpilot.trustpilot-banner {
    margin-bottom: 26px;
    background: #ffffff;
    border-color: transparent;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 560px;
    flex-wrap: wrap;
}

.hero-stats .stat-num {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.2;
}

.hero-stats .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}

.stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

/* Floating product cards */
.hero-visual {
    position: relative;
    min-height: 460px;
}

.hero-glow {
    position: absolute;
    inset: 12% 8%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent);
    filter: blur(8px);
}

.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--hp-ink);
    border-radius: var(--hp-radius);
    box-shadow: var(--hp-shadow-lg);
    padding: 18px;
    width: 218px;
    transition: transform var(--hp-t), box-shadow var(--hp-t);
    animation: hp-floaty 6s ease-in-out infinite;
}

.float-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 30px 60px -16px rgba(15, 40, 32, 0.3);
    z-index: 5;
    animation-play-state: paused;
}

.float-card img {
    display: block;
    height: 120px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto 10px;
}

.float-card .fc-name {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.4;
}

.float-card .fc-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
}

.float-card .fc-new {
    color: var(--color-primary);
    font-weight: 900;
    font-size: 1.15rem;
    font-family: 'Inter', sans-serif;
}

.float-card .fc-old {
    color: var(--hp-ink-3);
    font-size: 0.8rem;
    text-decoration: line-through;
}

.float-card .fc-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--hp-gold);
    color: #4a3a00;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    z-index: 1;
}

.fc-1 { top: 8%; inset-inline-start: 6%; z-index: 3; animation-delay: 0s; }
.fc-2 { top: 34%; inset-inline-end: 2%; z-index: 2; animation-delay: 1.6s; }
.fc-3 { bottom: 2%; inset-inline-start: 20%; z-index: 1; animation-delay: 3.2s; }

@keyframes hp-floaty {
    50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
    .float-card,
    .hero-badge-dot,
    .announcement-track {
        animation: none;
    }
}

/* Wave transition at hero bottom */
.hero-wave {
    display: block;
    width: 100%;
    height: 70px;
    position: relative;
    z-index: 1;
    margin-bottom: -1px;
}

/* Trust cards strip (overlapping the hero wave) */
.features {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: -46px;
    position: relative;
    z-index: 5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--color-bg-surface);
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    padding: 22px 20px;
    box-shadow: var(--hp-shadow-md);
    transition: transform var(--hp-t), box-shadow var(--hp-t), border-color var(--hp-t);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--hp-shadow-lg);
    border-color: var(--color-primary);
}

.feature-ico {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: var(--hp-green-soft);
    border-radius: 15px;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.feature-txt h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
    font-weight: 800;
}

.feature-txt p {
    font-size: 0.8rem;
    color: var(--hp-ink-3);
    font-weight: 600;
}

/* Products section */
.store-products-section.products {
    padding: 72px 0 0;
}

.section-head {
    margin-bottom: 28px;
}

.section-head.center {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    background: var(--hp-green-soft);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 999px;
    padding: 6px 18px;
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.section-head p {
    color: var(--hp-ink-2);
    font-size: 0.98rem;
}

.store-filter-container.section-head {
    display: block;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 32px;
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
}

/* Category chips */
.store-products-section .cat-tabs.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding-bottom: 0;
    border-bottom: none;
}

.store-products-section .cat-tab {
    padding: 11px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--hp-ink-2);
    background: var(--color-bg-surface);
    border: 1.5px solid var(--hp-line);
    transition: all var(--hp-t);
    cursor: pointer;
}

.store-products-section .cat-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.store-products-section .cat-tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: var(--hp-shadow-primary);
    transform: none;
}

.store-products-section .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* Product cards — v2 styling for JS-generated markup */
.store-products-section .product-card {
    border-radius: var(--hp-radius);
    border: 1px solid var(--hp-line);
    box-shadow: 0 1px 3px rgba(15, 40, 32, 0.06), 0 1px 2px rgba(15, 40, 32, 0.04);
    cursor: pointer;
    overflow: hidden;
}

.store-products-section .product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hp-shadow-lg);
    border-color: rgba(0, 128, 96, 0.35);
}

.store-products-section .product-card-visual {
    height: 210px;
    /* Keep one neutral canvas behind every uploaded cover.  Many supplier
       images already include a white studio background; using the same canvas
       removes the visible green/white split around them. */
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 40, 32, 0.06);
    isolation: isolate;
}

.store-products-section .product-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 18px;
    background: #ffffff;
    filter: drop-shadow(0 14px 20px rgba(15, 40, 32, 0.18));
    /* Supplier covers are a mix of transparent PNGs and JPGs with a baked-in
       white studio background. Multiply makes that white merge into the card
       canvas, giving both kinds the same clean cut-out appearance. */
    mix-blend-mode: multiply;
    position: relative;
    z-index: 1;
    transition: transform var(--hp-t);
}

.store-products-section .product-card:hover .product-card-image {
    transform: scale(1.07);
}

.store-products-section .product-badge {
    top: 14px;
    inset-inline-end: 14px;
    inset-inline-start: auto;
    right: auto;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-primary-hover);
    background: rgba(255, 255, 255, 0.92);
    padding: 4px 11px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(15, 40, 32, 0.08);
    z-index: 3;
}

[dir="ltr"] .store-products-section .product-badge {
    right: 14px;
    left: auto;
}

[dir="rtl"] .store-products-section .product-badge {
    left: 14px;
    right: auto;
}

.store-products-section .stock-pill {
    top: 14px;
    bottom: auto;
    left: auto;
    inset-inline-start: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    z-index: 3;
}

/* The image must never sit over stock/type labels.  This fixes long Arabic
   availability text being visually hidden behind an uploaded product image. */
.store-products-section .product-type-badge {
    z-index: 3;
}

/* Product details use a fixed, clean visual frame.  Every uploaded image is
   centred and contained within it, so portrait, landscape, white-background,
   and transparent images all remain professional without being stretched or
   spilling outside the modal. */
#product-detail-modal .product-modal-visual {
    align-self: start;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: min(580px, 68vh);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 40, 32, 0.08);
    isolation: isolate;
}

#product-detail-modal .product-modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 14px;
    background: #ffffff;
    border-radius: inherit;
    mix-blend-mode: multiply;
}

/* Product details are intentionally presented as a spacious page-like sheet,
   not a cramped alert. It keeps the storefront identity while giving the
   customer room to review the image, facts, duration and delivery guidance. */
#product-detail-modal {
    align-items: flex-start;
    padding: clamp(1.25rem, 4vh, 3rem) clamp(1rem, 4vw, 4rem);
    background: rgba(241, 247, 244, 0.92);
    backdrop-filter: blur(8px);
}

#product-detail-modal .modal-content {
    max-width: 1180px;
    max-height: min(920px, calc(100vh - 2rem));
    border-radius: 24px;
    padding: 0;
    border: 1px solid rgba(0, 128, 96, 0.16);
    box-shadow: 0 24px 70px rgba(15, 40, 32, 0.18);
}

#product-detail-modal .modal-scroll-body {
    padding: clamp(1.25rem, 3vw, 3rem);
}

#product-detail-modal .product-modal-grid {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

#product-detail-modal .product-modal-info h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.35rem);
    line-height: 1.25;
    margin-top: 0.35rem;
}

#product-detail-modal .product-modal-desc {
    font-size: 1rem;
    line-height: 1.9;
}

#product-detail-modal .modal-footer-action {
    position: sticky;
    bottom: 0;
    margin-inline: -0.25rem;
    padding: 1rem 0 0.25rem;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 18%);
}

#product-detail-modal .modal-footer-row {
    gap: 1rem;
}

#product-detail-modal .modal-add-to-cart-btn,
#product-detail-modal #modal-add-to-cart-btn {
    min-height: 50px;
    padding-inline: 1.4rem;
    font-size: 1rem;
}

.store-products-section .stock-pill:not(.out-of-stock):not(.low-stock):not(.stock-pill-loading) {
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
}

.store-products-section .stock-pill.low-stock {
    background: rgba(245, 158, 11, 0.95);
    color: #fff;
}

.store-products-section .stock-pill.out-of-stock {
    background: rgba(100, 116, 139, 0.95);
    color: #fff;
}

.store-products-section .product-card-body {
    padding: 20px 22px 24px;
}

.store-products-section .product-card-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.45;
}

.store-products-section .product-card-desc {
    font-size: 0.86rem;
    color: var(--hp-ink-3);
}

.store-products-section .product-card-rating {
    color: var(--hp-gold);
}

.store-products-section .product-card-footer {
    padding-top: 16px;
}

.store-products-section .original-price {
    color: var(--hp-ink-3);
}

.store-products-section .sale-price {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    color: var(--color-primary);
}

.store-products-section .btn-buy-now {
    background: var(--hp-grad-btn);
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 6px 14px -4px rgba(0, 128, 96, 0.35);
}

.store-products-section .btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: var(--hp-shadow-primary);
    filter: brightness(1.05);
}

/* Flash sale strip */
.flash-sale {
    margin-top: 64px;
}

.flash-sale-inner {
    position: relative;
    background: var(--hp-grad-hero);
    border-radius: var(--hp-radius-round);
    color: #fff;
    padding: 44px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    overflow: hidden;
    box-shadow: var(--hp-shadow-primary);
}

.flash-sale-inner::before {
    content: "⚡";
    position: absolute;
    inset-inline-end: -30px;
    top: -50px;
    font-size: 15rem;
    opacity: 0.08;
    transform: rotate(-12deg);
    pointer-events: none;
}

.flash-sale-txt h3 {
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 900;
    margin-bottom: 6px;
    color: #fff;
}

.flash-sale-txt p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.94rem;
}

.flash-countdown {
    display: flex;
    gap: 12px;
    direction: ltr;
}

.cd-cell {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    min-width: 72px;
    padding: 12px 10px 9px;
    text-align: center;
}

.cd-cell b {
    display: block;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    font-family: 'Inter', sans-serif;
}

.cd-cell span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 700;
}

.btn-flash-sale {
    display: inline-block;
    background: var(--hp-gold);
    color: #4a3a00;
    font-weight: 900;
    font-size: 1rem;
    padding: 15px 34px;
    border-radius: 16px;
    box-shadow: 0 12px 26px -6px rgba(234, 179, 8, 0.5);
    transition: transform var(--hp-t);
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.btn-flash-sale:hover {
    transform: translateY(-3px) scale(1.02);
    color: #4a3a00;
}

/* How it works */
.how-it-works {
    padding: 72px 0;
}

.steps-wrap {
    position: relative;
    padding-top: 20px;
}

.steps-link {
    position: absolute;
    top: 50%;
    inset-inline: 12%;
    border-top: 2px dashed rgba(0, 128, 96, 0.3);
}

.steps-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    counter-reset: hp-step;
}

.step {
    position: relative;
    background: var(--color-bg-surface);
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    padding: 40px 28px 32px;
    text-align: center;
    transition: transform var(--hp-t), box-shadow var(--hp-t), border-color var(--hp-t);
    box-shadow: 0 1px 3px rgba(15, 40, 32, 0.06);
}

.step:hover {
    transform: translateY(-6px);
    box-shadow: var(--hp-shadow-lg);
    border-color: rgba(0, 128, 96, 0.3);
}

.step::before {
    counter-increment: hp-step;
    content: counter(hp-step);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    background: var(--hp-grad-btn);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: var(--hp-shadow-primary);
    border: 3px solid #fff;
}

.step-ico {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    background: var(--hp-green-soft);
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    transition: transform var(--hp-t);
}

.step:hover .step-ico {
    transform: rotate(-6deg) scale(1.06);
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.step p {
    font-size: 0.88rem;
    color: var(--hp-ink-2);
}

/* Reviews section v2 — quote cards */
#reviews-section.reviews {
    padding: 72px 0;
    background: var(--color-bg-surface);
    border-block: 1px solid var(--hp-line);
    margin-bottom: 0;
}

#reviews-section .reviews-grid {
    gap: 26px;
}

#reviews-section .review-card {
    background: var(--color-bg);
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    padding: 28px;
    box-shadow: 0 1px 3px rgba(15, 40, 32, 0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform var(--hp-t), box-shadow var(--hp-t);
}

#reviews-section .review-card:hover {
    box-shadow: var(--hp-shadow-lg);
    transform: translateY(-6px);
}

#reviews-section .review-card-stars {
    font-size: 1rem;
    color: var(--hp-gold);
    letter-spacing: 2px;
    margin-bottom: 0;
}

#reviews-section .review-card-text {
    font-size: 0.92rem;
    color: var(--hp-ink-2);
    line-height: 1.7;
    flex: 1;
}

#reviews-section .review-card-footer {
    border-top: none;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#reviews-section .review-card-author {
    color: var(--hp-ink);
    font-weight: 800;
    display: block;
    font-size: 0.9rem;
    line-height: 1.3;
}

#reviews-section .review-card-author-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

#reviews-section .review-card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--hp-grad-hero);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 128, 96, 0.22);
    text-transform: uppercase;
}

#reviews-section .review-card-author-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

#reviews-section .review-card-verified {
    font-size: 0.76rem;
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.3;
}

#reviews-section .review-card-date {
    color: var(--hp-ink-3);
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    #reviews-section .review-card-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }
    #reviews-section .review-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* CTA */
.store-cta.cta {
    background: var(--hp-grad-hero);
    color: #fff;
    padding: 56px 0;
    position: relative;
    overflow: hidden;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-text h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
    font-weight: 800;
    color: #fff;
}

.cta-text p {
    opacity: 0.9;
    color: #fff;
}

/* Homepage responsive */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-bottom: 72px;
    }

    .hero-visual {
        min-height: 420px;
        max-width: 560px;
        width: 100%;
        margin-inline: auto;
    }

    .store-products-section .products-grid,
    #reviews-section .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flash-sale-inner {
        justify-content: center;
        text-align: center;
    }
}

@media (min-width: 769px) {
    .main-header .header-row-2.nav-links {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .mobile-only.mobile-nav-toggle {
        display: flex;
    }

    .main-header .header-row-1 {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        height: auto;
        min-height: 56px;
        padding: 0.65rem 1rem;
    }

    .search-wrap.search-box {
        display: none;
    }

    .main-header .header-row-2.nav-links {
        display: none !important;
    }

    .icon-btn-text #customer-auth-label,
    .lang-selector-btn #current-lang-text {
        display: none;
    }

    .customer-auth-btn.icon-btn-text {
        min-width: 44px;
        min-height: 44px;
        padding: 9px;
        justify-content: center;
    }

    #view-store .hero {
        padding: 44px 0 0;
    }

    #view-store .hero-text h1 {
        font-size: 1.9rem;
    }

    .hero-stats {
        gap: 16px;
        flex-wrap: wrap;
    }

    .stat-sep {
        display: none;
    }

    .hero-visual {
        min-height: 440px;
    }

    .float-card {
        width: 176px;
        padding: 14px;
    }

    .float-card img {
        height: 90px;
    }

    .fc-1 { inset-inline-start: 0; }
    .fc-2 { inset-inline-end: 0; }
    .fc-3 { inset-inline-start: 12%; }

    .store-products-section.products {
        padding: 52px 0 0;
    }

    .how-it-works {
        padding: 52px 0;
    }

    #reviews-section.reviews {
        padding: 52px 0;
    }

    .store-products-section .products-grid,
    #reviews-section .reviews-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .steps-link {
        display: none;
    }

    .flash-sale {
        margin-top: 48px;
    }

    .flash-sale-inner {
        padding: 36px 24px;
    }

    .cd-cell {
        min-width: 60px;
    }

    .cta-inner {
        flex-direction: column;
        text-align: center;
        align-items: stretch;
    }

    .cta-inner .btn-white {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .main-header .logo-text {
        font-size: 1.05rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Tracker/dashboard views keep main-content padding */
#view-tracker,
#view-customer-dashboard {
    padding-top: 0.5rem;
}


/* ================================================================
   Customer Dashboard Redesign - applies the Homepage Design v2
   system (Shopify green, gold accent, Cairo/Inter, soft shadows,
   product-card-like surfaces) to the customer account area.
   Pure CSS overlay: NO HTML IDs/structure or JS selectors changed.
   ================================================================ */

#view-customer-dashboard {
    background:
        radial-gradient(circle at 85% 0%, var(--color-primary-light) 0%, transparent 35%),
        radial-gradient(circle at 0% 100%, var(--color-accent-light) 0%, transparent 30%),
        var(--color-bg);
}

/* Sidebar */
#view-customer-dashboard .customer-sidebar {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    padding: 1.5rem 1.25rem;
    top: 6rem;
    overflow: hidden;
}

#view-customer-dashboard .customer-avatar {
    width: 48px;
    height: 48px;
    background: var(--hp-grad-hero, var(--color-primary));
    color: #fff;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

/* Sidebar menu items - pill style matching homepage category tabs */
#view-customer-dashboard .customer-sidebar-menu {
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .customer-menu-item {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.35rem;
    border: 1.5px solid transparent;
    background: var(--color-bg-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#view-customer-dashboard .customer-menu-item:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: #e2e8f0;
}

#view-customer-dashboard .customer-menu-item.active,
html[dir="rtl"] #view-customer-dashboard .customer-menu-item.active,
html[dir="ltr"] #view-customer-dashboard .customer-menu-item.active {
    background: var(--hp-grad-hero, var(--color-primary));
    color: #fff;
    border: none;
    border-inline-end: none;
    border-inline-start: none;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#view-customer-dashboard .logout-btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* Top bar */
#view-customer-dashboard .customer-dashboard-top-bar {
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .customer-welcome-message {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

#view-customer-dashboard .customer-notif-bell-btn {
    background: var(--color-bg-surface);
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Wallet card */
#view-customer-dashboard .wallet-header-row {
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-wrap: wrap;
}

#view-customer-dashboard .wallet-status-card {
    background: var(--hp-grad-hero, var(--color-primary));
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 15px -3px rgba(0, 128, 96, 0.18), 0 4px 6px -4px rgba(0, 128, 96, 0.12);
    padding: 1.25rem 1.5rem;
    flex: 1;
    min-width: 0;
}

#view-customer-dashboard .wallet-status-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: var(--radius-md);
}

#view-customer-dashboard .wallet-status-label {
    color: rgba(255, 255, 255, 0.85);
}

#view-customer-dashboard .wallet-status-amount {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#view-customer-dashboard .wallet-topup-btn {
    border-radius: var(--radius-lg);
    align-self: center;
    font-weight: 700;
}

/* Loyalty card */
#view-customer-dashboard .loyalty-header-row {
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .loyalty-glass-card {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    padding: 1.5rem;
}

#view-customer-dashboard .loyalty-card-icon {
    background: var(--color-accent-light);
    border-radius: var(--radius-md);
}

#view-customer-dashboard .loyalty-card-points-row {
    align-items: baseline;
}

#view-customer-dashboard .loyalty-points-counter {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

#view-customer-dashboard .loyalty-redeem-btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#view-customer-dashboard .loyalty-redeem-btn:not(:disabled) {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(234, 179, 8, 0.3);
}

#view-customer-dashboard .loyalty-redeem-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(234, 179, 8, 0.4);
}

/* Mobile tabs - hidden on desktop, shown via media query */
#view-customer-dashboard .customer-mobile-tabs {
    display: none;
}

/* Section / tab headers */
#view-customer-dashboard .tab-header {
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .tab-header h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#view-customer-dashboard .tab-header p {
    color: var(--color-text-light);
}

/* Generic card surfaces (product-card-like treatment) */
#view-customer-dashboard .glass-panel {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tables (orders + purchased keys) */
#view-customer-dashboard .table-container.glass-panel {
    padding: 0.5rem;
    overflow: hidden;
}

#view-customer-dashboard .customer-orders-table,
#view-customer-dashboard .purchased-keys-table {
    border-collapse: collapse;
}

#view-customer-dashboard .customer-orders-table thead th,
#view-customer-dashboard .purchased-keys-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

#view-customer-dashboard .customer-orders-table tbody tr,
#view-customer-dashboard .purchased-keys-table tbody tr {
    transition: background 0.15s ease;
}

#view-customer-dashboard .customer-orders-table tbody tr:hover,
#view-customer-dashboard .purchased-keys-table tbody tr:hover {
    background: var(--color-primary-light);
}

#view-customer-dashboard .inventory-key-code {
    background: var(--color-bg-secondary);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    color: var(--color-text);
    border: 1px solid #e2e8f0;
}

#view-customer-dashboard .inventory-key-row td,
#view-customer-dashboard .customer-orders-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

#view-customer-dashboard .inventory-key-product {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

#view-customer-dashboard .inventory-key-action-cell {
    text-align: end;
}

#view-customer-dashboard .inventory-key-product-name {
    font-weight: 700;
    color: var(--color-text);
}

#view-customer-dashboard .inventory-key-duration {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Status badges - reuse the homepage badge look */
#view-customer-dashboard .status-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
}

#view-customer-dashboard .status-badge.completed {
    background: var(--color-success-light);
    color: #047857;
}

#view-customer-dashboard .status-badge.pending,
#view-customer-dashboard .status-badge.pending-payment {
    background: var(--color-warning-light);
    color: #b45309;
}

#view-customer-dashboard .status-badge.rejected,
#view-customer-dashboard .status-badge.refunded {
    background: var(--color-danger-light);
    color: #b91c1c;
}

/* Empty states */
#view-customer-dashboard .inventory-empty,
#view-customer-dashboard .customer-notifications-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--color-text-muted);
    background: var(--color-bg-surface);
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
}

/* Pending order cards */
#view-customer-dashboard .customer-pending-orders-section {
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .customer-pending-orders-header {
    margin-bottom: 1rem;
}

#view-customer-dashboard .customer-pending-order-card {
    padding: 1.25rem;
    margin-bottom: 0.85rem;
    border-inline-start: 4px solid var(--color-warning);
}

#view-customer-dashboard .customer-pending-order-card:hover {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

#view-customer-dashboard .customer-pending-order-header strong {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--color-text);
}

#view-customer-dashboard .customer-pending-order-products {
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0.5rem 0;
}

#view-customer-dashboard .customer-pending-order-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

#view-customer-dashboard .customer-pending-order-expiry {
    color: var(--color-warning);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* Support tickets */
#view-customer-dashboard .customer-ticket-form {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .customer-settings-form {
    padding: 1.5rem;
}

#view-customer-dashboard .form-group label {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    display: block;
}

#view-customer-dashboard input[type="text"],
#view-customer-dashboard input[type="email"],
#view-customer-dashboard input[type="password"],
#view-customer-dashboard input[type="number"],
#view-customer-dashboard textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#view-customer-dashboard input:focus,
#view-customer-dashboard textarea:focus {
    outline: none;
    background: var(--color-bg-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

#view-customer-dashboard .support-ticket-card {
    padding: 1.25rem;
    margin-bottom: 0.85rem;
}

#view-customer-dashboard .support-ticket-card:hover {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
}

#view-customer-dashboard .support-ticket-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

#view-customer-dashboard .support-ticket-id {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--color-primary);
}

#view-customer-dashboard .support-ticket-date {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    margin-inline-start: auto;
}

#view-customer-dashboard .support-ticket-message {
    color: var(--color-text-light);
    line-height: 1.7;
}

#view-customer-dashboard .support-ticket-replies {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#view-customer-dashboard .support-reply {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

#view-customer-dashboard .support-reply.admin {
    background: var(--color-primary-light);
    border-inline-start: 3px solid var(--color-primary);
}

#view-customer-dashboard .support-reply-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Notifications */
#view-customer-dashboard .notification-card {
    position: relative;
    padding: 1.25rem 3rem 1.25rem 1.25rem;
    margin-bottom: 0.85rem;
    border-inline-start: 4px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] #view-customer-dashboard .notification-card {
    padding: 1.25rem 1.25rem 1.25rem 3rem;
}

#view-customer-dashboard .notification-card.unread {
    border-inline-start-color: var(--color-primary);
    background: var(--color-primary-light);
}

#view-customer-dashboard .notification-card.read {
    opacity: 0.92;
}

#view-customer-dashboard .notification-card:hover {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

#view-customer-dashboard .notification-dismiss-btn {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--color-text-muted);
    background: transparent;
    transition: all 0.15s ease;
}

#view-customer-dashboard .notification-dismiss-btn:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

#view-customer-dashboard .notification-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

#view-customer-dashboard .notification-unread-tag {
    background: var(--color-accent);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}

#view-customer-dashboard .notification-card-body {
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0.5rem 0 0.75rem;
}

#view-customer-dashboard .notification-card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Buttons: harmonize with homepage .btn system */
#view-customer-dashboard .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#view-customer-dashboard .btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

#view-customer-dashboard .btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#view-customer-dashboard .btn-emerald {
    background: var(--color-primary);
    color: #fff;
}

#view-customer-dashboard .btn-emerald:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

#view-customer-dashboard .btn-danger {
    background: var(--color-danger);
    color: #fff;
}

#view-customer-dashboard .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(239, 68, 68, 0.35);
}

#view-customer-dashboard .btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
}

#view-customer-dashboard .btn-block {
    width: 100%;
}

#view-customer-dashboard .btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* Responsive: collapse sidebar into mobile tabs */
@media (max-width: 980px) {
    #view-customer-dashboard .customer-dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    #view-customer-dashboard .customer-sidebar {
        display: none;
    }

    #view-customer-dashboard .customer-mobile-tabs {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }

    #view-customer-dashboard .customer-mobile-tab {
        flex-shrink: 0;
        padding: 0.6rem 1rem;
        border-radius: 999px;
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--color-text-light);
        background: var(--color-bg-surface);
        border: 1.5px solid #e2e8f0;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #view-customer-dashboard .customer-mobile-tab:hover {
        border-color: var(--color-primary);
        color: var(--color-primary);
    }

    #view-customer-dashboard .customer-mobile-tab.active {
        background: var(--hp-grad-hero, var(--color-primary));
        color: #fff;
        border-color: transparent;
        box-shadow: var(--hp-shadow-primary, var(--shadow-md));
    }

    #view-customer-dashboard .wallet-header-row {
        flex-direction: column;
    }

    #view-customer-dashboard .wallet-topup-btn {
        align-self: stretch;
    }
}


/* ================================================================
   ADMIN REDESIGN — Tab 1: Overview
   Applies the Homepage Design v2 / Customer Dashboard Redesign
   system to the admin Overview tab. Reuses --color-*, --radius-*,
   --shadow-*, --hp-grad-hero, --hp-shadow-primary. Scoped to
   #admin-tab-overview (high specificity, no !important).
   Frozen contract: no JS-facing IDs changed; new widgets use NEW ids
   (stat-overview-pending-actions, stat-overview-customers,
   stat-overview-avg-order, stat-overview-pending-breakdown).
   ================================================================ */

#admin-tab-overview {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        radial-gradient(circle at 0% 100%, var(--color-accent-light) 0%, transparent 30%),
        var(--color-bg);
}

/* Tab header — match section-head scale */
#admin-tab-overview .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-overview .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-overview .tab-header p {
    color: var(--color-text-light);
}

/* Primary stat cards row (the 4 existing cards) */
#admin-tab-overview .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

#admin-tab-overview .stat-card {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 1.35rem;
    gap: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#admin-tab-overview .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(15, 23, 42, 0.1), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
}

#admin-tab-overview .stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    opacity: 0.85;
}

#admin-tab-overview .stat-card.border-green::before { background: var(--color-primary); }
#admin-tab-overview .stat-card.border-blue::before { background: #3b82f6; }
#admin-tab-overview .stat-card.border-emerald::before { background: #10b981; }
#admin-tab-overview .stat-card.border-orange::before { background: #f97316; }
#admin-tab-overview .stat-card.border-amber::before { background: var(--color-warning); }
#admin-tab-overview .stat-card.border-violet::before { background: #8b5cf6; }

/* New color tokens used only by the new secondary widgets */
#admin-tab-overview .bg-amber { background: var(--color-warning); }
#admin-tab-overview .bg-violet { background: #8b5cf6; }

#admin-tab-overview .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.15);
}

#admin-tab-overview .stat-icon svg {
    width: 22px;
    height: 22px;
}

#admin-tab-overview .stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.2rem;
}

#admin-tab-overview .stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-overview .stat-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

#admin-tab-overview .stat-sub-warn {
    color: var(--color-warning);
    font-weight: 700;
}

/* Secondary (new) stat row — 3 cards */
#admin-tab-overview .overview-extra-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 1.75rem;
}

/* Chart boxes */
#admin-tab-overview .overview-analytics-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#admin-tab-overview .chart-box,
#admin-tab-overview .notifications-box {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

#admin-tab-overview .chart-box:hover,
#admin-tab-overview .notifications-box:hover {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
}

#admin-tab-overview .chart-box h3,
#admin-tab-overview .notifications-box h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--color-text);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
}

#admin-tab-overview .analytics-chart-wide .chart-container {
    height: 220px;
}

#admin-tab-overview .analytics-charts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

#admin-tab-overview .analytics-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Bar charts (top products) — restyle the JS-injected rows */
#admin-tab-overview .analytics-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

#admin-tab-overview .analytics-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

#admin-tab-overview .analytics-bar-label {
    color: var(--color-text-light);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#admin-tab-overview .analytics-bar-track {
    background: var(--color-bg-secondary);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

#admin-tab-overview .analytics-bar-fill {
    background: var(--hp-grad-hero, var(--color-primary));
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-overview .analytics-bar-value {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--color-text);
    min-width: 2ch;
    text-align: end;
}

#admin-tab-overview .analytics-bar-empty {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1.5rem 0;
}

/* Weekly revenue compare tag */
#admin-tab-overview .analytics-compare {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

#admin-tab-overview .analytics-compare.positive {
    color: var(--color-success);
}

#admin-tab-overview .analytics-compare.negative {
    color: var(--color-danger);
}

/* Stock alerts list — restyle injected alert-item */
#admin-tab-overview .notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    max-height: 260px;
    overflow-y: auto;
    padding-inline-end: 0.25rem;
}

#admin-tab-overview .alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--color-bg-secondary);
    border: 1px solid transparent;
}

#admin-tab-overview .alert-item.warning {
    background: var(--color-warning-light);
    border-color: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

#admin-tab-overview .alert-item.danger {
    background: var(--color-danger-light);
    border-color: rgba(239, 68, 68, 0.25);
    color: #991b1b;
}

#admin-tab-overview .alert-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-success);
}

#admin-tab-overview .alert-item.warning .alert-dot {
    background: var(--color-warning);
}

#admin-tab-overview .alert-item.danger .alert-dot {
    background: var(--color-danger);
}

#admin-tab-overview .alert-text {
    color: inherit;
    line-height: 1.5;
}

#admin-tab-overview .alert-text strong {
    font-weight: 800;
}

#admin-tab-overview .overview-alerts-wrap {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 980px) {
    #admin-tab-overview .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #admin-tab-overview .overview-extra-stats-grid {
        grid-template-columns: 1fr;
    }

    #admin-tab-overview .analytics-charts-grid,
    #admin-tab-overview .analytics-stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    #admin-tab-overview .stats-grid {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   ADMIN REDESIGN — Tab 2: Licenses/Products management
   Matches Tab 1 polish. Reuses the shared design system.
   Scoped to #admin-tab-products + #admin-product-modal.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-products {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

/* Tab header */
#admin-tab-products .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-products .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-products .tab-header p {
    color: var(--color-text-light);
}

/* "Add product" button — already .btn .btn-primary, add hover-lift */
#admin-tab-products #btn-add-product-modal {
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-products #btn-add-product-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

/* Product table container — card surface */
#admin-tab-products .admin-products-table-wrap {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    overflow: hidden;
}

#admin-tab-products .admin-products-table {
    border-collapse: collapse;
    width: 100%;
}

#admin-tab-products .admin-products-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
}

#admin-tab-products .admin-products-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

#admin-tab-products .admin-products-table tbody tr:hover {
    background: var(--color-primary-light);
}

#admin-tab-products .admin-products-table tbody tr:last-child {
    border-bottom: none;
}

#admin-tab-products .admin-products-table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Product name cell — icon + name */
#admin-tab-products .product-row-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
}

#admin-tab-products .product-row-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.15);
}

#admin-tab-products .product-row-icon svg {
    width: 22px;
    height: 22px;
}

/* Category badge — pill */
#admin-tab-products .admin-products-table td:nth-child(2) {
    font-size: 0.82rem;
}

#admin-tab-products .admin-products-table td:nth-child(2)::after {
    /* no-op guard if cell empty */
}

/* Price cells — original strikethrough look + sale emphasis */
#admin-tab-products .admin-products-table td:nth-child(3) {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    text-decoration: line-through;
}

#admin-tab-products .admin-products-table td:nth-child(4) {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

/* Keys count — pill via the strong element (inline color stays, we add chrome) */
#admin-tab-products .admin-products-table td:nth-child(5) strong {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid currentColor;
}

/* Actions cell — icon buttons */
#admin-tab-products .actions-cell {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

#admin-tab-products .btn-admin-edit,
#admin-tab-products .btn-admin-delete {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Use data-i18n text hidden via font-size:0; show an icon via background.
   Edit pencil icon */
#admin-tab-products .btn-admin-edit::before {
    content: "";
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/><path d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/><path d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/></svg>") center / contain no-repeat;
}

#admin-tab-products .btn-admin-delete::before {
    content: "";
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><line x1='10' y1='11' x2='10' y2='17'/><line x1='14' y1='11' x2='14' y2='17'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><line x1='10' y1='11' x2='10' y2='17'/><line x1='14' y1='11' x2='14' y2='17'/></svg>") center / contain no-repeat;
}

#admin-tab-products .btn-admin-edit {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    border: 1.5px solid #e2e8f0;
}

#admin-tab-products .btn-admin-edit:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

#admin-tab-products .btn-admin-delete {
    background: var(--color-bg-secondary);
    color: var(--color-danger);
    border: 1.5px solid #e2e8f0;
}

#admin-tab-products .btn-admin-delete:hover {
    background: var(--color-danger-light);
    border-color: var(--color-danger);
    transform: translateY(-2px);
}

/* Empty table state */
#admin-tab-products .admin-products-table tbody:empty::before,
#admin-tab-products .admin-products-table-wrap:has(tbody:empty)::after {
    content: "";
}

/* ─── Add/Edit Product Modal ─── */
#admin-product-modal .modal-content,
#admin-product-modal .admin-product-modal-shell {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(15, 23, 42, 0.1));
    overflow: hidden;
}

#admin-product-modal .admin-product-modal-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, transparent 100%);
}

#admin-product-modal .admin-product-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-product-modal .modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--color-text-muted);
    font-size: 1.4rem;
    line-height: 1;
    transition: all 0.15s ease;
}

#admin-product-modal .modal-close-btn:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

#admin-product-modal .admin-product-modal-body {
    padding: 1.5rem 1.75rem;
}

#admin-product-modal .modal-scroll-body {
    max-height: 65vh;
    overflow-y: auto;
}

#admin-product-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#admin-product-modal .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.1rem;
}

#admin-product-modal .form-group label {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

#admin-product-modal input[type="text"],
#admin-product-modal input[type="number"],
#admin-product-modal select,
#admin-product-modal textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-product-modal input:focus,
#admin-product-modal select:focus,
#admin-product-modal textarea:focus {
    outline: none;
    background: var(--color-bg-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

#admin-product-modal textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'Inter', monospace;
}

#admin-product-modal select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: left 0.85rem center;
    background-size: 18px;
    padding-inline-start: 2.4rem;
}

/* Pricing section card */
#admin-product-modal .duration-pricing-section {
    background: var(--color-bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.1rem;
}

#admin-product-modal .duration-pricing-heading {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 1rem;
}

#admin-product-modal .duration-pricing-desc {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Multilingual content (name + description per language) */
#admin-product-modal .multilingual-content-section {
    background: var(--color-bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.1rem;
}

#admin-product-modal .multilingual-content-heading {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

#admin-product-modal .multilingual-content-desc {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
    line-height: 1.5;
}

#admin-product-modal .multilingual-lang-group {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem 0.4rem;
    margin-bottom: 0.85rem;
    background: #fff;
}

#admin-product-modal .multilingual-lang-group:last-child {
    margin-bottom: 0;
}

#admin-product-modal .multilingual-lang-ar {
    border-inline-start: 4px solid #008060;
}

#admin-product-modal .multilingual-lang-en {
    border-inline-start: 4px solid #1e40af;
}

#admin-product-modal .multilingual-lang-fr {
    border-inline-start: 4px solid #4f46e5;
}

#admin-product-modal .multilingual-lang-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

#admin-product-modal .multilingual-lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

#admin-product-modal .multilingual-lang-name {
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.95rem;
}

#admin-product-modal .multilingual-lang-required,
#admin-product-modal .multilingual-lang-optional {
    margin-inline-start: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#admin-product-modal .multilingual-lang-required {
    background: rgba(0, 128, 96, 0.12);
    color: #008060;
}

#admin-product-modal .multilingual-lang-optional {
    background: #f1f5f9;
    color: #64748b;
}

/* ═══ Tab 11: Visual Live Homepage Editor ═══ */

/* ---- Admin toolbar + iframe layout ---- */
#admin-tab-homepage-design .hpve-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}
#admin-tab-homepage-design .hpve-toolbar-title {
    font-weight: 800;
    color: var(--color-text);
    font-size: 0.95rem;
    margin-inline-end: auto;
}
#admin-tab-homepage-design .hpve-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    border: 1.5px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}
#admin-tab-homepage-design .hpve-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
#admin-tab-homepage-design .hpve-btn.hpve-edit-active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
#admin-tab-homepage-design .hpve-btn.hpve-save {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
#admin-tab-homepage-design .hpve-banner {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--color-primary-light);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #008060;
    font-size: 0.88rem;
}
#admin-tab-homepage-design .hpve-banner.hpve-banner-visible { display: flex; }
#admin-tab-homepage-design #homepage-designer-frame {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 500px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
}
#admin-tab-homepage-design .hpve-frame-wrap { position: relative; }

/* ---- Floating products side panel ---- */
#admin-tab-homepage-design .hpve-side-panel {
    display: none;
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    border-inline-start: 1px solid var(--color-border);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    z-index: 2000;
    padding: 1.5rem;
    overflow-y: auto;
}
#admin-tab-homepage-design .hpve-side-panel.hpve-side-open { display: block; }
#admin-tab-homepage-design .hpve-side-panel h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
#admin-tab-homepage-design .hpve-side-panel .form-group { margin-bottom: 1rem; }
#admin-tab-homepage-design .hpve-side-panel select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
}
#admin-tab-homepage-design .hpve-side-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
}
#admin-tab-homepage-design .hpve-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1999;
}
#admin-tab-homepage-design .hpve-overlay.hpve-side-open { display: block; }

/* ═══ Storefront edit-mode indicators (active only inside iframe when body.hp-edit-mode) ═══ */
body.hp-edit-mode [data-hp-field] {
    outline: 2px dashed #008060;
    outline-offset: 2px;
    cursor: pointer;
    transition: background 0.2s ease, outline-color 0.2s ease;
    position: relative;
}
body.hp-edit-mode [data-hp-field]:hover {
    background: rgba(0, 128, 96, 0.06);
    outline-color: #006048;
}
body.hp-edit-mode [data-hp-field]::after {
    content: "✏️ تعديل";
    position: absolute;
    top: -26px;
    inset-inline-end: 0;
    background: #008060;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 99998;
}
body.hp-edit-mode [data-hp-field]:hover::after { opacity: 1; }

/* ---- Edit popup (floating card near clicked element) ---- */
.hp-edit-popup {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
    border-top: 3px solid #008060;
    font-family: 'Cairo', 'Inter', sans-serif;
}
.hp-edit-popup-head {
    font-weight: 800;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.hp-edit-popup-field { margin-bottom: 0.7rem; }
.hp-edit-popup-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}
.hp-edit-popup-field input,
.hp-edit-popup-field textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hp-edit-popup-field input:focus,
.hp-edit-popup-field textarea:focus {
    outline: none;
    border-color: #008060;
    box-shadow: 0 0 0 3px rgba(0,128,96,0.15);
}
.hp-edit-popup-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
.hp-edit-popup-actions button {
    flex: 1;
    padding: 0.55rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.hp-edit-popup-actions .hp-edit-save {
    background: #008060;
    color: #fff;
}
.hp-edit-popup-actions .hp-edit-save:hover { filter: brightness(1.1); }
.hp-edit-popup-actions .hp-edit-cancel {
    background: #f1f5f9;
    color: #475569;
}
.hp-edit-popup-actions .hp-edit-cancel:hover { background: #e2e8f0; }
.hp-edit-popup-warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}
/* ═══ End Tab 11 CSS ═══ */

#admin-product-modal .admin-pricing-mode-toggle {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

#admin-product-modal .admin-pricing-mode-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-product-modal .admin-pricing-mode-option:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

#admin-product-modal .admin-pricing-mode-option input {
    accent-color: var(--color-primary);
}

#admin-product-modal .admin-duration-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

#admin-product-modal .duration-pricing-tier {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 1rem;
}

#admin-product-modal .duration-tier-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

#admin-product-modal .duration-tier-badge {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--hp-grad-hero, var(--color-primary));
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

#admin-product-modal .duration-tier-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-light);
}

/* Image upload group */
#admin-product-modal .admin-product-image-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

#admin-product-modal .admin-product-image-upload-btn {
    border-radius: var(--radius-sm);
}

#admin-product-modal .helper-text {
    color: var(--color-text-muted);
    font-size: 0.78rem;
}

#admin-product-modal .admin-product-image-preview {
    margin-top: 0.85rem;
    position: relative;
    display: inline-block;
}

#admin-product-modal .admin-product-image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid #e2e8f0;
}

#admin-product-modal .admin-product-image-clear {
    position: absolute;
    top: -8px;
    inset-inline-end: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-danger);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
    box-shadow: var(--shadow-sm);
}

/* Keys field */
#admin-product-modal .admin-keys-view-wrap {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

#admin-product-modal .admin-keys-textarea {
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    background: var(--color-bg-secondary);
}

#admin-product-modal .admin-keys-unlock-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(4px);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--radius-sm);
}

#admin-product-modal .admin-keys-unlock-overlay:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Gateways list */
#admin-product-modal .admin-product-gateways-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Modal footer */
#admin-product-modal .admin-product-modal-footer {
    padding: 1.1rem 1.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--color-bg-secondary);
}

#admin-product-modal .admin-product-modal-footer .btn {
    min-width: 120px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

#admin-product-modal .admin-product-modal-footer .btn-primary {
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#admin-product-modal .admin-product-modal-footer .btn-secondary {
    background: var(--color-bg-surface);
    color: var(--color-text-light);
    border: 1.5px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 760px) {
    #admin-product-modal .form-row,
    #admin-product-modal .admin-duration-pricing-grid {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   ADMIN REDESIGN — Tab 3: Sales & verification
   Matches Tab 1/2 polish. Scoped to #admin-tab-orders + verify modal.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-orders {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

#admin-tab-orders .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-orders .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-orders .tab-header p {
    color: var(--color-text-light);
}

/* Orders table card */
#admin-tab-orders .admin-orders-table-wrap {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    overflow: hidden;
}

#admin-tab-orders .admin-orders-table {
    border-collapse: collapse;
    width: 100%;
}

#admin-tab-orders .admin-orders-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
    white-space: nowrap;
}

#admin-tab-orders .admin-orders-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

#admin-tab-orders .admin-orders-table tbody tr:hover {
    background: var(--color-primary-light);
}

#admin-tab-orders .admin-orders-table tbody tr:last-child {
    border-bottom: none;
}

#admin-tab-orders .admin-orders-table td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Order id column — bold */
#admin-tab-orders .admin-order-row td:first-child strong {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

/* Total column — emphasis */
#admin-tab-orders .admin-orders-table td:nth-child(5) strong {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--color-primary);
    font-size: 1.05rem;
}

/* Gateway column — chip styling */
#admin-tab-orders .admin-orders-table td:nth-child(6) {
    font-size: 0.8rem;
}

#admin-tab-orders .admin-orders-table td:nth-child(6)::before {
    content: "💳 ";
    font-size: 0.85rem;
}

/* Status pills — color coded */
#admin-tab-orders .badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}

#admin-tab-orders .badge-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

#admin-tab-orders .badge-completed {
    background: var(--color-success-light);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

#admin-tab-orders .badge-warning {
    background: var(--color-warning-light);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.3);
}

#admin-tab-orders .badge-danger {
    background: var(--color-danger-light);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.3);
}

#admin-tab-orders .badge-refunded {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

/* Actions cell */
#admin-tab-orders .admin-order-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#admin-tab-orders .admin-order-actions .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-orders .admin-order-actions .btn-sm {
    padding: 0.42rem 0.8rem;
    font-size: 0.78rem;
}

#admin-tab-orders .btn-verify-order,
#admin-tab-orders .btn-emerald {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px -1px rgba(0, 128, 96, 0.25);
}

#admin-tab-orders .btn-verify-order:hover,
#admin-tab-orders .btn-emerald:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 128, 96, 0.4);
}

#admin-tab-orders .btn-view-receipt,
#admin-tab-orders .btn-secondary {
    background: var(--color-bg-surface);
    color: var(--color-text-light);
    border: 1.5px solid #e2e8f0;
}

#admin-tab-orders .btn-view-receipt:hover,
#admin-tab-orders .btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

#admin-tab-orders .btn-refund,
#admin-tab-orders .btn-delete-order {
    background: transparent;
    color: var(--color-danger);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

#admin-tab-orders .btn-refund:hover,
#admin-tab-orders .btn-delete-order:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.35);
}

/* WhatsApp delivery button */
#admin-tab-orders .btn-whatsapp-delivery-send {
    background: #25d366;
    color: #fff;
    padding: 0.42rem 0.6rem;
    border-radius: var(--radius-sm);
    line-height: 0;
}

#admin-tab-orders .btn-whatsapp-delivery-send svg {
    width: 16px;
    height: 16px;
}

#admin-tab-orders .btn-whatsapp-delivery-send:hover {
    background: #1ebe5a;
    transform: translateY(-1px);
}

/* ─── Verify payment modal ─── */
#admin-verify-payment-modal .modal-content,
#admin-verify-payment-modal .admin-verify-modal-shell {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(15, 23, 42, 0.1));
    overflow: hidden;
}

#admin-verify-payment-modal .modal-header-block {
    padding: 1.5rem 1.75rem 1rem;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, transparent 100%);
}

#admin-verify-payment-modal .modal-header-block h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

#admin-verify-payment-modal .modal-header-block p {
    color: var(--color-text-light);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

#admin-verify-payment-modal .modal-scroll-body {
    padding: 0 1.75rem 1rem;
    max-height: 55vh;
    overflow-y: auto;
}

/* Review details grid */
#admin-verify-payment-modal .review-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

#admin-verify-payment-modal .review-row-grid:last-child {
    border-bottom: none;
}

#admin-verify-payment-modal .review-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

#admin-verify-payment-modal .review-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    word-break: break-word;
}

#admin-verify-payment-modal .highlight-price {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    color: var(--color-primary);
}

#admin-verify-payment-modal .highlight-ref {
    background: var(--color-bg-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
}

/* Receipt preview box */
#admin-verify-payment-modal .receipt-preview-box {
    background: var(--color-bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

#admin-verify-payment-modal .receipt-preview-box h4 {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

/* Receipt image — clickable thumbnail */
#admin-verify-payment-modal .receipt-image-container {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

#admin-verify-payment-modal .receipt-image-container img {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--radius-md);
    border: 3px solid var(--color-bg-surface);
    box-shadow: var(--shadow-md);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

#admin-verify-payment-modal .receipt-image-container img:hover {
    transform: scale(1.02);
}

/* Modal footer actions */
#admin-verify-payment-modal .review-action-btns {
    padding: 1.1rem 1.75rem;
    border-top: 1px solid #f1f5f9;
    background: var(--color-bg-secondary);
    display: flex;
    gap: 0.75rem;
}

#admin-verify-payment-modal .review-action-btns .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-verify-payment-modal #btn-verify-approve {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#admin-verify-payment-modal #btn-verify-approve:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

#admin-verify-payment-modal #btn-verify-reject {
    background: var(--color-bg-surface);
    color: var(--color-danger);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

#admin-verify-payment-modal #btn-verify-reject:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 760px) {
    #admin-verify-payment-modal .review-row-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}


/* ================================================================
   ADMIN REDESIGN — Tab 4: Customer accounts
   Matches Tab 1/2/3 polish. Scoped to #admin-tab-customers.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-customers {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

#admin-tab-customers .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-customers .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-customers .tab-header p {
    color: var(--color-text-light);
}

/* Table card */
#admin-tab-customers .admin-customers-table-wrap {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    overflow: hidden;
}

#admin-tab-customers .admin-customers-table {
    border-collapse: collapse;
    width: 100%;
}

#admin-tab-customers .admin-customers-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
    white-space: nowrap;
}

#admin-tab-customers .admin-customers-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

#admin-tab-customers .admin-customers-table tbody tr:hover {
    background: var(--color-primary-light);
}

#admin-tab-customers .admin-customers-table tbody tr:last-child {
    border-bottom: none;
}

#admin-tab-customers .admin-customers-table td {
    padding: 0.9rem 0.85rem;
    vertical-align: middle;
    font-size: 0.86rem;
    color: var(--color-text-light);
}

/* Frozen row tint */
#admin-tab-customers .admin-customer-row-frozen {
    background: rgba(239, 68, 68, 0.04);
}

#admin-tab-customers .admin-customer-row-frozen:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Name cell — avatar + name */
#admin-tab-customers .admin-customer-name-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#admin-tab-customers .admin-customer-name-text {
    font-weight: 700;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Avatar — reuse the reviews/dashboard .customer-avatar look */
#admin-tab-customers .customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
}

/* Frozen badge — pill */
#admin-tab-customers .admin-frozen-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--color-danger-light);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Login method badges */
#admin-tab-customers .badge-login-google,
#admin-tab-customers .badge-login-email {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

#admin-tab-customers .badge-login-google {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

#admin-tab-customers .badge-login-email {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    border: 1px solid #e2e8f0;
}

/* Password cell */
#admin-tab-customers .admin-customer-password-cell {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#admin-tab-customers .admin-customer-password-text {
    font-family: 'Inter', monospace;
    font-size: 0.82rem;
    color: var(--color-text);
    letter-spacing: 0.05em;
}

#admin-tab-customers .admin-password-toggle-btn {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--color-text-muted);
    transition: all 0.15s ease;
}

#admin-tab-customers .admin-password-toggle-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Location cell */
#admin-tab-customers .admin-location-cell-inner {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

#admin-tab-customers .admin-location-flag {
    font-size: 1.05rem;
    line-height: 1;
}

#admin-tab-customers .admin-location-text {
    font-size: 0.82rem;
}

/* Device badge */
#admin-tab-customers .admin-device-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

#admin-tab-customers .admin-device-badge-mobile {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

#admin-tab-customers .admin-device-badge-desktop {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    border: 1px solid #e2e8f0;
}

/* Gender badge */
#admin-tab-customers .admin-gender-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    border: 1px solid #e2e8f0;
}

/* Wallet balance chip — inline stat */
#admin-tab-customers .admin-wallet-balance {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(0, 128, 96, 0.2);
}

/* Actions cell — icon button group */
#admin-tab-customers .admin-customer-action-group {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#admin-tab-customers .admin-customer-action-group .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-customers .admin-customer-action-group .btn-sm {
    padding: 0.42rem 0.75rem;
    font-size: 0.76rem;
}

#admin-tab-customers .admin-adjust-wallet-btn {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px -1px rgba(0, 128, 96, 0.25);
}

#admin-tab-customers .admin-adjust-wallet-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 128, 96, 0.4);
}

#admin-tab-customers .admin-freeze-user-btn,
#admin-tab-customers .admin-notify-user-btn,
#admin-tab-customers .admin-chat-user-btn {
    background: var(--color-bg-surface);
    color: var(--color-text-light);
    border: 1.5px solid #e2e8f0;
}

#admin-tab-customers .admin-freeze-user-btn:hover,
#admin-tab-customers .admin-notify-user-btn:hover,
#admin-tab-customers .admin-chat-user-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

#admin-tab-customers .admin-delete-user-btn {
    background: transparent;
    color: var(--color-danger);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

#admin-tab-customers .admin-delete-user-btn:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
    transform: translateY(-1px);
}

/* Chat unread dot */
#admin-tab-customers .button-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-inline-start: 0.3rem;
    box-shadow: 0 0 0 2px var(--color-bg-surface);
}


/* ================================================================
   ADMIN REDESIGN — Tab 5: Wallet deposit requests
   Matches prior tabs. Scoped to #admin-tab-wallet-deposits.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-wallet-deposits {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

#admin-tab-wallet-deposits .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-wallet-deposits .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-wallet-deposits .tab-header p {
    color: var(--color-text-light);
}

/* Table card */
#admin-tab-wallet-deposits .admin-deposits-table-wrap {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    overflow: hidden;
}

#admin-tab-wallet-deposits .admin-deposits-table {
    border-collapse: collapse;
    width: 100%;
}

#admin-tab-wallet-deposits .admin-deposits-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
}

#admin-tab-wallet-deposits .admin-deposits-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

#admin-tab-wallet-deposits .admin-deposits-table tbody tr:hover {
    background: var(--color-primary-light);
}

#admin-tab-wallet-deposits .admin-deposits-table tbody tr:last-child {
    border-bottom: none;
}

#admin-tab-wallet-deposits .admin-deposits-table td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.88rem;
    color: var(--color-text-light);
}

/* Customer name cell */
#admin-tab-wallet-deposits .admin-deposits-table td:first-child strong {
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.92rem;
}

/* Amount chip — green emphasis */
#admin-tab-wallet-deposits .admin-deposit-amount {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(0, 128, 96, 0.2);
}

/* Method + reference cells */
#admin-tab-wallet-deposits .admin-deposits-table td:nth-child(3)::before {
    content: "💳 ";
    font-size: 0.85rem;
}

#admin-tab-wallet-deposits .admin-deposits-table td:nth-child(4) {
    font-family: 'Inter', monospace;
    font-size: 0.82rem;
    color: var(--color-text);
}

/* Status badges (uses .status-badge.completed/.pending/.rejected injected by JS) */
#admin-tab-wallet-deposits .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid transparent;
    line-height: 1.4;
}

#admin-tab-wallet-deposits .status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

#admin-tab-wallet-deposits .status-badge.completed {
    background: var(--color-success-light);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

#admin-tab-wallet-deposits .status-badge.pending {
    background: var(--color-warning-light);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.3);
}

#admin-tab-wallet-deposits .status-badge.rejected {
    background: var(--color-danger-light);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Actions */
#admin-tab-wallet-deposits .admin-deposits-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#admin-tab-wallet-deposits .admin-deposits-actions .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-wallet-deposits .admin-deposits-actions .btn-sm {
    padding: 0.42rem 0.8rem;
    font-size: 0.78rem;
}

#admin-tab-wallet-deposits .admin-deposit-approve-btn {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px -1px rgba(0, 128, 96, 0.25);
}

#admin-tab-wallet-deposits .admin-deposit-approve-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 128, 96, 0.4);
}

#admin-tab-wallet-deposits .admin-deposit-reject-btn {
    background: transparent;
    color: var(--color-danger);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

#admin-tab-wallet-deposits .admin-deposit-reject-btn:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
    transform: translateY(-1px);
}

/* Empty state — the renderer injects a <tr><td colspan="7"> with text.
   Restyle it as a proper centered empty card. */
#admin-tab-wallet-deposits .admin-deposits-table tbody tr:first-child:last-child td {
    text-align: center !important;
    padding: 3.5rem 1.5rem !important;
    color: var(--color-text-muted) !important;
    font-size: 0.95rem !important;
}

#admin-tab-wallet-deposits .admin-deposits-table tbody tr:first-child:last-child td::before {
    content: "👛";
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}


/* ================================================================
   ADMIN REDESIGN — Tab 6: Frozen account appeals
   Matches prior tabs. Scoped to #admin-tab-freeze-appeals + modal.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-freeze-appeals {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

#admin-tab-freeze-appeals .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-freeze-appeals .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-freeze-appeals .tab-header p {
    color: var(--color-text-light);
}

/* Table card */
#admin-tab-freeze-appeals .admin-freeze-appeals-table-wrap {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    overflow: hidden;
}

#admin-tab-freeze-appeals .admin-freeze-appeals-table {
    border-collapse: collapse;
    width: 100%;
}

#admin-tab-freeze-appeals .admin-freeze-appeals-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
}

#admin-tab-freeze-appeals .admin-freeze-appeals-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

#admin-tab-freeze-appeals .admin-freeze-appeals-table tbody tr:hover {
    background: var(--color-primary-light);
}

#admin-tab-freeze-appeals .admin-freeze-appeals-table tbody tr:last-child {
    border-bottom: none;
}

#admin-tab-freeze-appeals .admin-freeze-appeals-table td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.88rem;
    color: var(--color-text-light);
}

/* Name cell bold */
#admin-tab-freeze-appeals .admin-freeze-appeals-table td:first-child {
    font-weight: 700;
    color: var(--color-text);
}

/* Unread row — accent left border via box-shadow (no layout shift) */
#admin-tab-freeze-appeals .admin-freeze-appeal-unread-row {
    background: rgba(234, 179, 8, 0.05);
    box-shadow: inset 4px 0 0 var(--color-accent);
}

#admin-tab-freeze-appeals .admin-freeze-appeal-unread-row:hover {
    background: rgba(234, 179, 8, 0.1);
}

/* Message preview cell — truncated */
#admin-tab-freeze-appeals .admin-freeze-appeal-message-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Review button */
#admin-tab-freeze-appeals .admin-review-freeze-appeal-btn {
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    box-shadow: 0 2px 4px -1px rgba(0, 128, 96, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-freeze-appeals .admin-review-freeze-appeal-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 128, 96, 0.4);
}

/* Empty state — injected as td.admin-freeze-appeals-empty-cell (colspan=5) */
#admin-tab-freeze-appeals .admin-freeze-appeals-empty-cell {
    text-align: center !important;
    padding: 3.5rem 1.5rem !important;
    color: var(--color-text-muted) !important;
    font-size: 0.95rem !important;
}

#admin-tab-freeze-appeals .admin-freeze-appeals-empty-cell::before {
    content: "🛡️";
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

/* Empty inside modal thread */
#admin-freeze-appeal-modal .frozen-appeals-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: 2rem 1rem;
}

/* ─── Freeze appeal modal ─── */
#admin-freeze-appeal-modal .modal-content,
#admin-freeze-appeal-modal .admin-freeze-appeal-modal-shell {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(15, 23, 42, 0.1));
    overflow: hidden;
}

#admin-freeze-appeal-modal .modal-header-block {
    padding: 1.5rem 1.75rem 1rem;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, transparent 100%);
}

#admin-freeze-appeal-modal .modal-header-block h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 0.3rem;
}

#admin-freeze-appeal-modal .admin-freeze-appeal-modal-subtitle {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

/* Thread container */
#admin-freeze-appeal-modal .admin-freeze-appeal-scroll-body {
    padding: 1rem 1.75rem;
    max-height: 50vh;
    overflow-y: auto;
}

#admin-freeze-appeal-modal .admin-freeze-appeal-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Chat bubbles (shared .notification-thread-message pattern) */
#admin-freeze-appeal-modal .notification-thread-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    max-width: 85%;
    line-height: 1.6;
    word-wrap: break-word;
}

#admin-freeze-appeal-modal .chat-bubble-customer {
    background: var(--color-bg-secondary);
    color: var(--color-text);
    align-self: flex-start;
    border: 1px solid #e2e8f0;
}

#admin-freeze-appeal-modal .chat-bubble-admin {
    background: var(--color-primary-light);
    color: var(--color-text);
    align-self: flex-end;
    border: 1px solid rgba(0, 128, 96, 0.2);
}

#admin-freeze-appeal-modal .notification-thread-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

#admin-freeze-appeal-modal .notification-thread-sender {
    font-weight: 700;
}

#admin-freeze-appeal-modal .notification-thread-text {
    color: inherit;
}

/* Reply form */
#admin-freeze-appeal-modal .admin-freeze-appeal-reply-form {
    padding: 1rem 1.75rem;
    border-top: 1px solid #f1f5f9;
    background: var(--color-bg-secondary);
}

#admin-freeze-appeal-modal .chat-reply-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#admin-freeze-appeal-modal .admin-freeze-appeal-reply-input {
    flex: 1;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-freeze-appeal-modal .admin-freeze-appeal-reply-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

#admin-freeze-appeal-modal .chat-attach-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    border: 1.5px solid #e2e8f0;
    font-size: 1.1rem;
    transition: all 0.15s ease;
}

#admin-freeze-appeal-modal .chat-attach-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

#admin-freeze-appeal-modal .chat-image-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

#admin-freeze-appeal-modal .chat-image-preview-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1.5px solid #e2e8f0;
}

#admin-freeze-appeal-modal .chat-image-preview-remove {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-danger);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
}

/* Modal footer */
#admin-freeze-appeal-modal .modal-footer-actions {
    padding: 1.1rem 1.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

#admin-freeze-appeal-modal #btn-admin-unfreeze-account {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-freeze-appeal-modal #btn-admin-unfreeze-account:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

#admin-freeze-appeal-modal #btn-cancel-admin-freeze-appeal {
    background: var(--color-bg-surface);
    color: var(--color-text-light);
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

#admin-freeze-appeal-modal #btn-cancel-admin-freeze-appeal:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}


/* ================================================================
   ADMIN REDESIGN — Tab 7: Loyalty Control Center
   "Emerald Command Bridge" — premium admin dashboard for the
   loyalty program. All existing JS-facing IDs and classes preserved
   (admin-loyalty-save-btn, admin-loyalty-leaderboard-list, …).
   New IDs are additive (admin-loyalty-kpi-*, admin-loyalty-podium-*,
   admin-loyalty-eq-*) and have safe no-op fallbacks if missing.
   ================================================================ */

#admin-tab-loyalty {
    position: relative;
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(0, 128, 96, 0.08) 0%, transparent 60%),
        radial-gradient(900px 500px at 0% 0%, rgba(234, 179, 8, 0.05) 0%, transparent 55%),
        var(--color-bg);
}

#admin-tab-loyalty::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
    z-index: 0;
}

#admin-tab-loyalty > * { position: relative; z-index: 1; }

/* ---------------- Header ---------------- */

#admin-tab-loyalty .admin-loyalty-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

#admin-tab-loyalty .admin-loyalty-header-main { flex: 1 1 auto; min-width: 0; }

#admin-tab-loyalty .admin-loyalty-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

#admin-tab-loyalty .admin-loyalty-header p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 64ch;
}

/* LIVE pulse badge */
.admin-loyalty-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.04) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #b91c1c;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.08);
}

.admin-loyalty-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    animation: admin-loyalty-pulse-dot 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.admin-loyalty-live-label { line-height: 1; }

@keyframes admin-loyalty-pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------------- KPI strip ---------------- */

.admin-loyalty-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-loyalty-kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px -6px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.admin-loyalty-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--kpi-accent, var(--color-primary));
    opacity: 0.85;
}

html[dir="rtl"] .admin-loyalty-kpi-card::before { left: auto; right: 0; }

.admin-loyalty-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05), 0 12px 24px -10px rgba(15, 23, 42, 0.18);
    border-color: #cbd5e1;
}

.admin-loyalty-kpi-card--emerald { --kpi-accent: var(--color-primary); }
.admin-loyalty-kpi-card--amber   { --kpi-accent: var(--color-warning); }
.admin-loyalty-kpi-card--violet  { --kpi-accent: #8b5cf6; }
.admin-loyalty-kpi-card--blue    { --kpi-accent: #3b82f6; }

.admin-loyalty-kpi-card--live {
    background:
        linear-gradient(135deg, rgba(139, 92, 246, 0.04) 0%, transparent 60%),
        var(--color-bg-surface);
}

.admin-loyalty-kpi-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--kpi-accent, var(--color-primary));
    color: #fff;
    box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--kpi-accent, var(--color-primary)) 50%, transparent);
}

.admin-loyalty-kpi-icon svg { width: 22px; height: 22px; }

.admin-loyalty-kpi-body { flex: 1 1 auto; min-width: 0; }

.admin-loyalty-kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.admin-loyalty-kpi-value {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.admin-loyalty-kpi-sub {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0;
    line-height: 1.3;
}

.admin-loyalty-kpi-sub--live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #7c3aed;
    font-weight: 600;
}

.admin-loyalty-kpi-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7c3aed;
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6);
    animation: admin-loyalty-pulse-dot 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ---------------- Card heads (shared by config / radar / leaderboard) ---------------- */

.admin-loyalty-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-loyalty-card-head-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.admin-loyalty-card-head-icon svg { width: 20px; height: 20px; }

.admin-loyalty-card-head-icon--gold {
    background: var(--color-accent-light);
    color: #a16207;
}

.admin-loyalty-card-head-icon--live {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.04) 100%);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.admin-loyalty-card-head h3 {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.005em;
    color: var(--color-text);
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

#admin-tab-loyalty .admin-loyalty-section-desc {
    color: var(--color-text-light);
    font-size: 0.83rem;
    line-height: 1.5;
    margin: 0;
    max-width: 56ch;
}

/* ---------------- Dashboard grid: config + radar ---------------- */

#admin-tab-loyalty .admin-loyalty-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

#admin-tab-loyalty .admin-loyalty-config,
#admin-tab-loyalty .admin-loyalty-radar,
#admin-tab-loyalty .admin-loyalty-leaderboard {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px -6px rgba(15, 23, 42, 0.06);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-loyalty .admin-loyalty-config:hover,
#admin-tab-loyalty .admin-loyalty-radar:hover,
#admin-tab-loyalty .admin-loyalty-leaderboard:hover {
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05), 0 12px 24px -10px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

/* ---------------- Config form ---------------- */

#admin-tab-loyalty .admin-loyalty-config-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#admin-tab-loyalty .admin-loyalty-form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
    letter-spacing: -0.005em;
}

#admin-tab-loyalty .admin-loyalty-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#admin-tab-loyalty .admin-loyalty-input-wrap:hover {
    border-color: #94a3b8;
    background: var(--color-bg-surface);
}

#admin-tab-loyalty .admin-loyalty-input-wrap:focus-within {
    border-color: var(--color-primary);
    background: var(--color-bg-surface);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.admin-loyalty-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-primary);
    background: linear-gradient(180deg, rgba(0, 128, 96, 0.05) 0%, rgba(0, 128, 96, 0.02) 100%);
    border-inline-end: 1px solid rgba(0, 128, 96, 0.12);
}

.admin-loyalty-input-suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    background: rgba(241, 245, 249, 0.6);
    border-inline-start: 1px solid #e2e8f0;
    letter-spacing: 0.04em;
}

#admin-tab-loyalty .admin-loyalty-form-group input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.7rem 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    -moz-appearance: textfield;
}

#admin-tab-loyalty .admin-loyalty-form-group input::-webkit-outer-spin-button,
#admin-tab-loyalty .admin-loyalty-form-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#admin-tab-loyalty .admin-loyalty-form-group input:focus { outline: none; }

/* Live equation preview */
.admin-loyalty-equation {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(0, 128, 96, 0.04) 0%, rgba(234, 179, 8, 0.04) 100%);
    border: 1px dashed rgba(0, 128, 96, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.admin-loyalty-equation-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
}

.admin-loyalty-equation-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    font-family: 'Inter', sans-serif;
}

.admin-loyalty-equation-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease;
}

.admin-loyalty-equation-chip--gold {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    color: #854d0e;
    border-color: #fcd34d;
}

.admin-loyalty-equation-symbol {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--color-text-light);
}

.admin-loyalty-equation-arrow {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
    flex-shrink: 0;
}

html[dir="rtl"] .admin-loyalty-equation-arrow { transform: scaleX(-1); }

/* Save button — premium emerald with shine, white text always */
#admin-tab-loyalty .admin-loyalty-save-btn,
#admin-tab-loyalty .admin-loyalty-save-btn.btn,
#admin-tab-loyalty .admin-loyalty-save-btn.btn-emerald,
#admin-tab-loyalty .admin-loyalty-save-btn.btn-block {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

#admin-tab-loyalty .admin-loyalty-save-btn {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #006b50 100%);
    border: 1px solid rgba(0, 128, 96, 0.35);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px -2px rgba(0, 128, 96, 0.35);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#admin-tab-loyalty .admin-loyalty-save-btn > span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

#admin-tab-loyalty .admin-loyalty-save-btn svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none;
}

#admin-tab-loyalty .admin-loyalty-save-btn::after {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
    transition: inset-inline-start 0.6s ease;
    pointer-events: none;
}

#admin-tab-loyalty .admin-loyalty-save-btn:hover,
#admin-tab-loyalty .admin-loyalty-save-btn:focus,
#admin-tab-loyalty .admin-loyalty-save-btn:focus-visible,
#admin-tab-loyalty .admin-loyalty-save-btn:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -4px rgba(0, 128, 96, 0.5);
    filter: brightness(1.08);
}

#admin-tab-loyalty .admin-loyalty-save-btn:hover::after,
#admin-tab-loyalty .admin-loyalty-save-btn:focus-visible::after {
    inset-inline-start: 150%;
}

#admin-tab-loyalty .admin-loyalty-save-btn:disabled {
    color: rgba(255, 255, 255, 0.7) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.2) brightness(0.9);
}

#admin-tab-loyalty .admin-loyalty-save-btn:active { transform: translateY(0); }

#admin-tab-loyalty .admin-loyalty-save-btn svg { width: 18px; height: 18px; }

/* ============================================================
   GLOBAL SEARCH (Cmd+K / Ctrl+K)
   Search modal overlay + sidebar trigger button.
   ============================================================ */

/* Sidebar trigger — sits between the profile block and the menu list. */
.admin-global-search-trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.85rem;
    background: var(--color-bg-elev, rgba(255, 255, 255, 0.55));
    color: var(--color-text-muted, #64748b);
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    border-radius: var(--radius-sm, 8px);
    font: inherit;
    font-size: 0.82rem;
    text-align: start;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-global-search-trigger:hover,
.admin-global-search-trigger:focus-visible {
    background: rgba(0, 128, 96, 0.06);
    border-color: rgba(0, 128, 96, 0.25);
    color: var(--color-text, #0f172a);
    transform: translateY(-1px);
    outline: none;
}

.admin-global-search-trigger > svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.admin-global-search-trigger > span:not(.admin-global-search-trigger-kbd-group) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-global-search-trigger-kbd-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0.6;
}

.admin-global-search-trigger-kbd-group kbd {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-text-light, #475569);
}

html[dir="rtl"] .admin-global-search-trigger-kbd-group { flex-direction: row-reverse; }

/* Modal overlay — same backdrop as other admin modals. */
.admin-global-search-overlay {
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(60px, 12vh, 140px);
    padding-inline: 1rem;
    z-index: 110000;
}

.admin-global-search-overlay[hidden] { display: none !important; }

.admin-global-search-shell {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    border-radius: 14px;
    box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.4),
                0 0 0 1px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(70vh, 560px);
    animation: adminGlobalSearchIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminGlobalSearchIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .admin-global-search-shell { animation: none; }
}

/* Input bar at the top of the modal. */
.admin-global-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    background: linear-gradient(180deg, rgba(0, 128, 96, 0.025) 0%, transparent 100%);
}

.admin-global-search-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary, #008060);
    flex-shrink: 0;
}

.admin-global-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font: inherit;
    font-size: 1rem;
    color: var(--color-text, #0f172a);
    padding: 0;
}

.admin-global-search-input::placeholder {
    color: var(--color-text-muted, #94a3b8);
}

.admin-global-search-kbd {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-text-muted, #64748b);
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

/* Results area — scrollable list grouped by type. */
.admin-global-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

.admin-global-search-group {
    padding: 0.5rem 0;
}

.admin-global-search-group + .admin-global-search-group {
    border-top: 1px solid var(--color-border, rgba(15, 23, 42, 0.06));
}

.admin-global-search-group-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted, #94a3b8);
    padding: 0.4rem 1rem 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-global-search-group-label-count {
    font-weight: 500;
    color: var(--color-text-muted, #94a3b8);
    opacity: 0.7;
}

/* Result row. */
.admin-global-search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: background 0.1s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: start;
    font: inherit;
    color: inherit;
    position: relative;
}

.admin-global-search-result:hover,
.admin-global-search-result.is-active {
    background: rgba(0, 128, 96, 0.06);
}

.admin-global-search-result.is-active::before {
    content: "";
    position: absolute;
    inset-block: 6px;
    inset-inline-start: 0;
    width: 3px;
    background: var(--color-primary, #008060);
    border-radius: 0 2px 2px 0;
}

.admin-global-search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 128, 96, 0.08);
    color: var(--color-primary, #008060);
    flex-shrink: 0;
    font-size: 1rem;
}

.admin-global-search-result-icon--customer { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.admin-global-search-result-icon--order    { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.admin-global-search-result-icon--product  { background: rgba(168, 85, 247, 0.1); color: #9333ea; }
.admin-global-search-result-icon--tab      { background: rgba(15, 23, 42, 0.06); color: var(--color-text, #0f172a); }
.admin-global-search-result-icon--setting  { background: rgba(15, 23, 42, 0.06); color: var(--color-text-light, #475569); }

.admin-global-search-result-icon svg {
    width: 16px;
    height: 16px;
}

.admin-global-search-result-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-global-search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-global-search-result-title mark {
    background: rgba(0, 128, 96, 0.18);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.admin-global-search-result-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: start;
}

.admin-global-search-result-arrow {
    color: var(--color-text-muted, #94a3b8);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.1s ease, transform 0.1s ease;
    font-size: 0.85rem;
}

.admin-global-search-result.is-active .admin-global-search-result-arrow,
.admin-global-search-result:hover .admin-global-search-result-arrow {
    opacity: 1;
}

html[dir="rtl"] .admin-global-search-result.is-active .admin-global-search-result-arrow { transform: scaleX(-1); }

/* Empty / no-results state. */
.admin-global-search-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.85rem;
}

.admin-global-search-empty-icon {
    display: block;
    margin: 0 auto 0.75rem;
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

/* Initial state — recent searches + suggestions. */
.admin-global-search-initial {
    padding: 0.5rem 0;
}

.admin-global-search-suggestion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.1s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: start;
    font: inherit;
    font-size: 0.85rem;
    color: var(--color-text-light, #475569);
}

.admin-global-search-suggestion:hover,
.admin-global-search-suggestion.is-active {
    background: rgba(0, 128, 96, 0.06);
    color: var(--color-text, #0f172a);
}

.admin-global-search-suggestion-icon {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* Footer hint bar. */
.admin-global-search-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 1rem;
    border-top: 1px solid var(--color-border, rgba(15, 23, 42, 0.06));
    background: rgba(15, 23, 42, 0.02);
    font-size: 0.7rem;
    color: var(--color-text-muted, #64748b);
}

.admin-global-search-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.admin-global-search-hint kbd {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--color-text, #0f172a);
}

/* Mobile: trigger button shows only the icon, modal is full-width. */
@media (max-width: 640px) {
    .admin-global-search-trigger > span:not(.admin-global-search-trigger-kbd-group) { display: none; }
    .admin-global-search-trigger-kbd-group { display: none; }
    .admin-global-search-overlay { padding-top: 16px; }
    .admin-global-search-shell { max-height: calc(100vh - 32px); }
}

/* ---------------- Radar (live notifications) ---------------- */

#admin-tab-loyalty .admin-loyalty-radar { position: relative; overflow: hidden; }

#admin-tab-loyalty .admin-loyalty-radar::before {
    content: "";
    position: absolute;
    top: -40px;
    inset-inline-end: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#admin-tab-loyalty .admin-loyalty-radar > * { position: relative; z-index: 1; }

/* Radar scope animation */
.admin-loyalty-radar-scope {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-block;
}

.admin-loyalty-radar-scope-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid #ef4444;
    opacity: 0;
    animation: admin-loyalty-radar-ring 3.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.admin-loyalty-radar-scope-ring--mid  { animation-delay: 1s; }
.admin-loyalty-radar-scope-ring--inner { animation-delay: 2s; }

@keyframes admin-loyalty-radar-ring {
    0%   { transform: scale(0.3); opacity: 0.9; }
    80%  { opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

.admin-loyalty-radar-scope-sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(239, 68, 68, 0.45) 30deg, transparent 60deg);
    animation: admin-loyalty-radar-sweep 2.6s linear infinite;
    -webkit-mask: radial-gradient(circle at center, transparent 25%, #000 30%, #000 100%);
            mask: radial-gradient(circle at center, transparent 25%, #000 30%, #000 100%);
}

@keyframes admin-loyalty-radar-sweep {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

#admin-tab-loyalty .admin-loyalty-notifications-stream {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 340px;
    overflow-y: auto;
    padding: 0.25rem 0.4rem 0.25rem 0.25rem;
}

html[dir="rtl"] #admin-tab-loyalty .admin-loyalty-notifications-stream {
    padding: 0.25rem 0.25rem 0.25rem 0.4rem;
}

#admin-tab-loyalty .admin-loyalty-notifications-stream::-webkit-scrollbar { width: 6px; }
#admin-tab-loyalty .admin-loyalty-notifications-stream::-webkit-scrollbar-track { background: transparent; }
#admin-tab-loyalty .admin-loyalty-notifications-stream::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 999px;
}

#admin-tab-loyalty .admin-loyalty-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.6) 0%, rgba(241, 245, 249, 0.3) 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    animation: admin-loyalty-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: border-color 0.2s ease, background 0.2s ease;
}

#admin-tab-loyalty .admin-loyalty-notification:hover {
    background: linear-gradient(135deg, rgba(0, 128, 96, 0.04) 0%, rgba(241, 245, 249, 0.3) 100%);
    border-color: rgba(0, 128, 96, 0.2);
}

@keyframes admin-loyalty-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

#admin-tab-loyalty .admin-loyalty-notification-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, #ca8a04 100%);
    margin-top: 0.45rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18), 0 0 12px rgba(234, 179, 8, 0.4);
}

#admin-tab-loyalty .admin-loyalty-notification-body { flex: 1; min-width: 0; }

#admin-tab-loyalty .admin-loyalty-notification-text {
    font-size: 0.86rem;
    color: var(--color-text);
    line-height: 1.5;
    margin: 0;
}

#admin-tab-loyalty .admin-loyalty-notification-time {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
    font-variant-numeric: tabular-nums;
}

/* Empty state */
#admin-tab-loyalty .admin-loyalty-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: 2.5rem 1rem;
    font-size: 0.9rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: 1px dashed #e2e8f0;
    margin: 0;
}

/* ---------------- Top-3 Podium ---------------- */

.admin-loyalty-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem 1rem 0;
    align-items: end;
}

.admin-loyalty-podium[hidden] { display: none !important; }

.admin-loyalty-podium-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.75rem 0;
    background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg-surface) 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: 0;
    min-height: 110px;
}

.admin-loyalty-podium-slot--gold {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.14) 0%, rgba(234, 179, 8, 0.02) 80%);
    border-color: #fcd34d;
    min-height: 140px;
}

.admin-loyalty-podium-slot--silver {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.14) 0%, rgba(148, 163, 184, 0.02) 80%);
    border-color: #cbd5e1;
}

.admin-loyalty-podium-slot--bronze {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.12) 0%, rgba(217, 119, 6, 0.02) 80%);
    border-color: #fdba74;
}

.admin-loyalty-podium-crown {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ca8a04;
    filter: drop-shadow(0 2px 4px rgba(202, 138, 4, 0.4));
}

.admin-loyalty-podium-crown svg { width: 100%; height: 100%; }

.admin-loyalty-podium-medal {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.55rem;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15), inset 0 -2px 4px rgba(0,0,0,0.15), inset 0 1px 2px rgba(255,255,255,0.3);
}

.admin-loyalty-podium-slot--gold .admin-loyalty-podium-medal {
    background: linear-gradient(135deg, #fcd34d 0%, #ca8a04 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(202, 138, 4, 0.4), inset 0 -2px 4px rgba(0,0,0,0.15), inset 0 1px 2px rgba(255,255,255,0.4);
}

.admin-loyalty-podium-slot--bronze .admin-loyalty-podium-medal {
    background: linear-gradient(135deg, #fb923c 0%, #c2410c 100%);
}

.admin-loyalty-podium-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.admin-loyalty-podium-points {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.admin-loyalty-podium-slot--gold .admin-loyalty-podium-points {
    color: #b45309;
}

.admin-loyalty-podium-base {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.08) 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.admin-loyalty-podium-slot--gold .admin-loyalty-podium-base { background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%); }
.admin-loyalty-podium-slot--silver .admin-loyalty-podium-base { background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%); }
.admin-loyalty-podium-slot--bronze .admin-loyalty-podium-base { background: linear-gradient(180deg, #fdba74 0%, #ea580c 100%); }

/* ---------------- Leaderboard list ---------------- */

#admin-tab-loyalty .admin-loyalty-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-header {
    display: grid;
    grid-template-columns: 1.6fr 0.6fr 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin-bottom: 0.4rem;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-header span:nth-child(2) { text-align: center; }
#admin-tab-loyalty .admin-loyalty-leaderboard-header span:nth-child(3) { text-align: end; }

#admin-tab-loyalty .admin-loyalty-leaderboard-row {
    display: grid;
    grid-template-columns: 1.6fr 0.6fr 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-row:nth-child(odd) {
    background: rgba(241, 245, 249, 0.5);
}

#admin-tab-loyalty .admin-loyalty-leaderboard-row:hover {
    background: var(--color-primary-light);
    border-color: rgba(0, 128, 96, 0.15);
    transform: translateX(-2px);
}

html[dir="rtl"] #admin-tab-loyalty .admin-loyalty-leaderboard-row:hover {
    transform: translateX(2px);
}

#admin-tab-loyalty .admin-loyalty-leaderboard-customer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-customer strong {
    display: block;
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-email {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-points {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#admin-tab-loyalty .admin-loyalty-leaderboard-remaining {
    font-size: 0.78rem;
    color: var(--color-text-light);
    text-align: end;
    font-weight: 500;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1100px) {
    .admin-loyalty-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    #admin-tab-loyalty .admin-loyalty-dashboard-grid { grid-template-columns: 1fr; }
    .admin-loyalty-podium { gap: 0.6rem; padding: 1.25rem 0.5rem 0; }
    .admin-loyalty-podium-slot { min-height: 100px; }
    .admin-loyalty-podium-slot--gold { min-height: 120px; }
    #admin-tab-loyalty .admin-loyalty-leaderboard-header,
    #admin-tab-loyalty .admin-loyalty-leaderboard-row {
        grid-template-columns: 1fr 0.5fr 0.8fr;
        gap: 0.5rem;
    }
}

@media (max-width: 560px) {
    .admin-loyalty-kpi-strip { grid-template-columns: 1fr; }
    .admin-loyalty-podium { grid-template-columns: 1fr; gap: 0.5rem; }
    .admin-loyalty-podium-slot,
    .admin-loyalty-podium-slot--gold { min-height: auto; padding: 0.85rem 0.5rem 0.95rem; }
    #admin-tab-loyalty .admin-loyalty-leaderboard-header { display: none; }
    #admin-tab-loyalty .admin-loyalty-leaderboard-row {
        grid-template-columns: 1fr;
        gap: 0.3rem;
        padding: 0.65rem 0.85rem;
    }
    #admin-tab-loyalty .admin-loyalty-leaderboard-points,
    #admin-tab-loyalty .admin-loyalty-leaderboard-remaining { text-align: start; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-loyalty-live-dot,
    .admin-loyalty-kpi-pulse,
    .admin-loyalty-radar-scope-ring,
    .admin-loyalty-radar-scope-sweep,
    #admin-tab-loyalty .admin-loyalty-notification { animation: none !important; }
}


/* ================================================================
   ADMIN REDESIGN — Tab 8: Analytics & reports
   Reuses the EXACT chart/stat components from Tab 1 by mirroring the
   #admin-tab-overview rules onto #admin-tab-analytics. The two tabs share
   identical injected classes (.analytics-bar-*, .stat-card, .chart-box,
   .analytics-compare), so one shared selector set keeps them visually
   identical without duplication. NO HTML or index.js changes.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-analytics {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        radial-gradient(circle at 0% 100%, var(--color-accent-light) 0%, transparent 30%),
        var(--color-bg);
}

#admin-tab-analytics .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-analytics .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-analytics .tab-header p {
    color: var(--color-text-light);
}

/* Stat cards — mirror Tab 1 treatment */
#admin-tab-analytics .stats-grid,
#admin-tab-analytics .analytics-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

#admin-tab-analytics .stat-card {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 1.35rem;
    gap: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#admin-tab-analytics .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(15, 23, 42, 0.1), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
}

#admin-tab-analytics .stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    opacity: 0.85;
}

#admin-tab-analytics .stat-card.border-green::before { background: var(--color-primary); }
#admin-tab-analytics .stat-card.border-blue::before { background: #3b82f6; }
#admin-tab-analytics .stat-card.border-emerald::before { background: #10b981; }
#admin-tab-analytics .stat-card.border-orange::before { background: #f97316; }
#admin-tab-analytics .stat-card.border-amber::before { background: var(--color-warning); }
#admin-tab-analytics .stat-card.border-violet::before { background: #8b5cf6; }

#admin-tab-analytics .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

#admin-tab-analytics .stat-icon svg {
    width: 22px;
    height: 22px;
}

#admin-tab-analytics .stat-info {
    min-width: 0;
}

#admin-tab-analytics .stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.2rem;
}

#admin-tab-analytics .stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-analytics .analytics-compare {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

#admin-tab-analytics .analytics-compare.positive { color: var(--color-success); }
#admin-tab-analytics .analytics-compare.negative { color: var(--color-danger); }

/* Chart boxes */
#admin-tab-analytics .chart-box {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

#admin-tab-analytics .chart-box:hover {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
}

#admin-tab-analytics .chart-box h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--color-text);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
}

#admin-tab-analytics .analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

#admin-tab-analytics .analytics-chart-wide {
    grid-column: 1 / -1;
}

/* ============================================================
   CONVERSION FUNNEL (analytics tab)
   Horizontal funnel with 6 stages + drop-off labels + insights.
   ============================================================ */

.funnel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.funnel-header h3 {
    margin: 0 0 0.25rem;
}

.funnel-subtitle {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-muted, #64748b);
}

.funnel-period-toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.06));
}

.funnel-period-btn {
    background: transparent;
    border: none;
    padding: 0.4rem 0.8rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted, #64748b);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.funnel-period-btn:hover {
    color: var(--color-text, #0f172a);
}

.funnel-period-btn.is-active {
    background: #ffffff;
    color: var(--color-primary, #008060);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.funnel-stage {
    display: grid;
    grid-template-columns: 200px 1fr 110px;
    align-items: center;
    gap: 0.85rem;
    position: relative;
}

@media (max-width: 720px) {
    .funnel-stage {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
}

.funnel-stage-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text, #0f172a);
}

.funnel-stage-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.funnel-stage-icon svg {
    width: 14px;
    height: 14px;
}

.funnel-stage-icon--visit   { background: rgba(15, 23, 42, 0.06);   color: #475569; }
.funnel-stage-icon--view    { background: rgba(59, 130, 246, 0.1);  color: #2563eb; }
.funnel-stage-icon--cart    { background: rgba(245, 158, 11, 0.1);  color: #d97706; }
.funnel-stage-icon--checkout{ background: rgba(168, 85, 247, 0.1);  color: #9333ea; }
.funnel-stage-icon--paid    { background: rgba(34, 197, 94, 0.1);   color: #16a34a; }
.funnel-stage-icon--delivered{ background: rgba(0, 128, 96, 0.1);  color: #008060; }

.funnel-bar-wrap {
    position: relative;
    height: 36px;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.funnel-bar {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    border-radius: 8px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(90deg, var(--funnel-color, #008060) 0%, rgba(0, 128, 96, 0.65) 100%);
    display: flex;
    align-items: center;
    padding-inline-end: 0.5rem;
    justify-content: flex-end;
    min-width: 2px;
}

.funnel-bar-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    padding: 0 0.4rem;
}

.funnel-stage-conversion {
    text-align: end;
    font-size: 0.78rem;
    color: var(--color-text-muted, #64748b);
    font-family: 'Inter', sans-serif;
}

.funnel-stage-conversion-rate {
    font-weight: 700;
    color: var(--color-text, #0f172a);
    font-size: 0.95rem;
    display: block;
}

.funnel-stage-conversion-rate.is-good { color: #16a34a; }
.funnel-stage-conversion-rate.is-bad  { color: #dc2626; }

.funnel-dropoff {
    margin-inline-start: 244px;
    font-size: 0.72rem;
    color: #dc2626;
    font-family: 'Inter', sans-serif;
    margin-top: -2px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

@media (max-width: 720px) {
    .funnel-dropoff { margin-inline-start: 0; }
}

.funnel-dropoff.is-good {
    color: #16a34a;
}

.funnel-dropoff::before {
    content: "↓";
    font-weight: 700;
}

.funnel-insights {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(0, 128, 96, 0.04) 0%, rgba(234, 179, 8, 0.04) 100%);
    border: 1px dashed rgba(0, 128, 96, 0.25);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.funnel-insight {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text, #0f172a);
    line-height: 1.5;
}

.funnel-insight-bullet {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary, #008060);
    margin-top: 0.55rem;
}

.funnel-insight.is-warning .funnel-insight-bullet { background: #f59e0b; }
.funnel-insight.is-strong  .funnel-insight-bullet { background: #16a34a; }

.funnel-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.85rem;
}

/* ============================================================
   NOTIFICATION CENTER (admin bell)
   ============================================================ */

.admin-notif-bell-row {
    position: relative;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.admin-notif-bell {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg-elev, rgba(255, 255, 255, 0.55));
    color: var(--color-text-muted, #64748b);
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-notif-bell:hover,
.admin-notif-bell:focus-visible {
    background: rgba(0, 128, 96, 0.08);
    color: var(--color-primary, #008060);
    outline: none;
    transform: translateY(-1px);
}

.admin-notif-bell[aria-expanded="true"] {
    background: rgba(0, 128, 96, 0.1);
    color: var(--color-primary, #008060);
    border-color: rgba(0, 128, 96, 0.3);
}

.admin-notif-bell > svg {
    width: 18px;
    height: 18px;
}

.admin-notif-bell-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px var(--color-bg, #ffffff);
    font-family: 'Inter', sans-serif;
}

.admin-notif-bell-badge[hidden] { display: none !important; }

.admin-notif-panel {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    max-height: 480px;
    background: #ffffff;
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    border-radius: 12px;
    box-shadow: 0 24px 60px -16px rgba(15, 23, 42, 0.25),
                0 0 0 1px rgba(15, 23, 42, 0.04);
    z-index: 105000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: adminNotifPanelIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-notif-panel[hidden] { display: none !important; }

@keyframes adminNotifPanelIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .admin-notif-panel { animation: none; }
}

.admin-notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border, rgba(15, 23, 42, 0.06));
    background: linear-gradient(180deg, rgba(0, 128, 96, 0.03) 0%, transparent 100%);
}

.admin-notif-panel-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text, #0f172a);
}

.admin-notif-refresh-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted, #64748b);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-notif-refresh-btn:hover,
.admin-notif-refresh-btn:focus-visible {
    background: rgba(15, 23, 42, 0.04);
    color: var(--color-text, #0f172a);
    outline: none;
}

.admin-notif-refresh-btn > svg {
    width: 16px;
    height: 16px;
}

.admin-notif-panel-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
}

.admin-notif-group + .admin-notif-group {
    border-top: 1px solid var(--color-border, rgba(15, 23, 42, 0.04));
}

.admin-notif-group-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted, #94a3b8);
}

.admin-notif-group-label-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 5px;
    letter-spacing: 0;
    text-transform: none;
}

.admin-notif-group-label-count.is-zero {
    background: rgba(15, 23, 42, 0.05);
    color: var(--color-text-muted, #94a3b8);
}

.admin-notif-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: start;
    font: inherit;
    color: inherit;
    transition: background 0.1s ease;
}

.admin-notif-row:hover,
.admin-notif-row:focus-visible {
    background: rgba(0, 128, 96, 0.04);
    outline: none;
}

.admin-notif-row-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-notif-row-icon--order   { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.admin-notif-row-icon--deposit { background: rgba(34, 197, 94, 0.12);  color: #16a34a; }
.admin-notif-row-icon--freeze  { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.admin-notif-row-icon--message { background: rgba(168, 85, 247, 0.12); color: #9333ea; }
.admin-notif-row-icon--review  { background: rgba(239, 68, 68, 0.12);  color: #dc2626; }
.admin-notif-row-icon--stock   { background: rgba(234, 179, 8, 0.15);  color: #ca8a04; }

.admin-notif-row-icon svg {
    width: 14px;
    height: 14px;
}

.admin-notif-row-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.admin-notif-row-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-notif-row-subtitle {
    font-size: 0.72rem;
    color: var(--color-text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: start;
}

.admin-notif-row-time {
    font-size: 0.7rem;
    color: var(--color-text-muted, #94a3b8);
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.admin-notif-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.85rem;
}

.admin-notif-empty-icon {
    display: block;
    margin: 0 auto 0.5rem;
    width: 32px;
    height: 32px;
    opacity: 0.4;
}

.admin-notif-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--color-border, rgba(15, 23, 42, 0.06));
    background: rgba(15, 23, 42, 0.02);
    font-size: 0.7rem;
    color: var(--color-text-muted, #64748b);
}

.admin-notif-sound-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--color-text-muted, #64748b);
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-notif-sound-btn:hover,
.admin-notif-sound-btn:focus-visible {
    background: rgba(15, 23, 42, 0.04);
    color: var(--color-text, #0f172a);
    outline: none;
}

.admin-notif-sound-btn > svg {
    width: 13px;
    height: 13px;
}

.admin-notif-sound-btn .admin-notif-sound-off { display: none; }
.admin-notif-sound-btn[aria-pressed="true"] .admin-notif-sound-on { display: none; }
.admin-notif-sound-btn[aria-pressed="true"] .admin-notif-sound-off { display: inline-block; }

.admin-notif-toast-stack {
    position: fixed;
    top: 16px;
    inset-inline-end: 16px;
    z-index: 200000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 360px;
}

.admin-notif-toast {
    background: #ffffff;
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.25);
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    pointer-events: auto;
    animation: adminNotifToastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-inline-start: 3px solid var(--color-primary, #008060);
}

.admin-notif-toast--order   { border-inline-start-color: #f59e0b; }
.admin-notif-toast--deposit { border-inline-start-color: #16a34a; }
.admin-notif-toast--freeze  { border-inline-start-color: #2563eb; }
.admin-notif-toast--message { border-inline-start-color: #9333ea; }
.admin-notif-toast--review  { border-inline-start-color: #dc2626; }

@keyframes adminNotifToastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .admin-notif-toast { animation: none; }
}

.admin-notif-toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text, #0f172a);
    margin: 0 0 2px;
}

.admin-notif-toast-msg {
    font-size: 0.78rem;
    color: var(--color-text-muted, #64748b);
    margin: 0;
}

.admin-notif-toast-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted, #94a3b8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    margin-inline-start: auto;
    flex-shrink: 0;
}

.admin-notif-toast-close:hover { color: var(--color-text, #0f172a); background: rgba(15, 23, 42, 0.05); }
.admin-notif-toast-close > svg { width: 14px; height: 14px; display: block; }

#admin-tab-analytics .analytics-chart-wide .chart-container {
    height: 220px;
}

/* Bar charts — restyle JS-injected rows (same as Tab 1) */
#admin-tab-analytics .analytics-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

#admin-tab-analytics .analytics-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

#admin-tab-analytics .analytics-bar-label {
    color: var(--color-text-light);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#admin-tab-analytics .analytics-bar-track {
    background: var(--color-bg-secondary);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

#admin-tab-analytics .analytics-bar-fill {
    background: var(--hp-grad-hero, var(--color-primary));
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-analytics .analytics-bar-value {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: var(--color-text);
    min-width: 2ch;
    text-align: end;
}

#admin-tab-analytics .analytics-bar-empty {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1.5rem 0;
}

/* Responsive */
@media (max-width: 860px) {
    #admin-tab-analytics .stats-grid,
    #admin-tab-analytics .analytics-stats-row,
    #admin-tab-analytics .analytics-charts-grid {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   ADMIN REDESIGN — Tab 9: Reviews management
   Matches prior tabs. Scoped to #admin-tab-reviews + #admin-review-modal.
   Frozen contract: no JS-facing IDs changed.
   ================================================================ */

#admin-tab-reviews {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

#admin-tab-reviews .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-reviews .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-reviews .tab-header p {
    color: var(--color-text-light);
}

/* Add review button — primary green with glow */
#admin-tab-reviews #btn-add-review-modal {
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-reviews #btn-add-review-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

/* Table card */
#admin-tab-reviews .admin-reviews-table-wrap {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    overflow: hidden;
}

#admin-tab-reviews .admin-reviews-table {
    border-collapse: collapse;
    width: 100%;
}

#admin-tab-reviews .admin-reviews-table thead th {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
}

#admin-tab-reviews .admin-reviews-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

#admin-tab-reviews .admin-reviews-table tbody tr:hover {
    background: var(--color-primary-light);
}

#admin-tab-reviews .admin-reviews-table tbody tr:last-child {
    border-bottom: none;
}

#admin-tab-reviews .admin-reviews-table td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.88rem;
    color: var(--color-text-light);
}

/* Customer name cell */
#admin-tab-reviews .admin-reviews-table td:first-child strong {
    font-weight: 700;
    color: var(--color-text);
}

/* Stars cell — accent gold */
#admin-tab-reviews .admin-review-stars-cell {
    color: var(--color-accent);
    font-size: 1rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Text preview cell — muted */
#admin-tab-reviews .admin-reviews-table td:nth-child(3) {
    max-width: 360px;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* Date cell */
#admin-tab-reviews .admin-reviews-table td:nth-child(4) {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Order cell — small chip */
#admin-tab-reviews .admin-reviews-table td:nth-child(5) {
    text-align: center;
}

#admin-tab-reviews .admin-reviews-table td:nth-child(5)::after {
    content: "";
}

/* Actions cell */
#admin-tab-reviews .admin-reviews-actions-cell {
    text-align: end;
}

#admin-tab-reviews .admin-reviews-actions-cell .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-inline-start: 0.4rem;
}

#admin-tab-reviews .admin-reviews-actions-cell .btn-sm {
    padding: 0.42rem 0.8rem;
    font-size: 0.78rem;
}

#admin-tab-reviews .btn-edit-review {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px -1px rgba(0, 128, 96, 0.25);
}

#admin-tab-reviews .btn-edit-review:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(0, 128, 96, 0.4);
}

#admin-tab-reviews .btn-delete-review {
    background: transparent;
    color: var(--color-danger);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

#admin-tab-reviews .btn-delete-review:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
    transform: translateY(-1px);
}

/* Empty state */
#admin-tab-reviews .admin-reviews-table tbody tr:first-child:last-child td {
    text-align: center !important;
    padding: 3.5rem 1.5rem !important;
    color: var(--color-text-muted) !important;
    font-size: 0.95rem !important;
}

#admin-tab-reviews .admin-reviews-table tbody tr:first-child:last-child td::before {
    content: "⭐";
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

/* ─── Review add/edit modal ─── */
#admin-review-modal .modal-content,
#admin-review-modal .admin-review-modal-shell {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(15, 23, 42, 0.1));
    overflow: hidden;
}

#admin-review-modal .modal-header-block {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, transparent 100%);
}

#admin-review-modal .modal-header-block h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-review-modal .modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--color-text-muted);
    font-size: 1.4rem;
    line-height: 1;
    transition: all 0.15s ease;
}

#admin-review-modal .modal-close-btn:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

#admin-review-modal .modal-scroll-body {
    padding: 1.5rem 1.75rem;
    max-height: 55vh;
    overflow-y: auto;
}

#admin-review-modal .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.1rem;
}

#admin-review-modal .form-group label {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

#admin-review-modal input[type="text"],
#admin-review-modal input[type="number"],
#admin-review-modal select,
#admin-review-modal textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-review-modal input:focus,
#admin-review-modal select:focus,
#admin-review-modal textarea:focus {
    outline: none;
    background: var(--color-bg-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

#admin-review-modal textarea {
    resize: vertical;
    min-height: 100px;
}

#admin-review-modal select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: left 0.85rem center;
    background-size: 18px;
    padding-inline-start: 2.4rem;
}

#admin-review-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#admin-review-modal .modal-footer-actions {
    padding: 1.1rem 1.75rem;
    border-top: 1px solid #f1f5f9;
    background: var(--color-bg-secondary);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

#admin-review-modal .modal-footer-actions .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-review-modal .modal-footer-actions .btn-emerald {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#admin-review-modal .modal-footer-actions .btn-emerald:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

#admin-review-modal .modal-footer-actions .btn-secondary {
    background: var(--color-bg-surface);
    color: var(--color-text-light);
    border: 1.5px solid #e2e8f0;
}

#admin-review-modal .modal-footer-actions .btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

@media (max-width: 640px) {
    #admin-review-modal .form-row {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   ADMIN REDESIGN — Tab 10: General settings
   Matches prior tabs. Scoped to #admin-tab-settings.
   Frozen contract: no JS-facing IDs changed.
   NOTE: a few !important used ONLY to override inline styles on <h4>
   section headers (inline color/border from the original markup);
   these cannot be restyled otherwise without editing HTML.
   ================================================================ */

#admin-tab-settings {
    background:
        radial-gradient(circle at 90% 0%, var(--color-primary-light) 0%, transparent 35%),
        var(--color-bg);
}

#admin-tab-settings .tab-header {
    margin-bottom: 1.75rem;
}

#admin-tab-settings .tab-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

#admin-tab-settings .tab-header p {
    color: var(--color-text-light);
}

/* Layout grid */
#admin-tab-settings .settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Each settings card */
#admin-tab-settings .settings-form,
#admin-tab-settings .gateways-setup-section,
#admin-tab-settings .settings-coupons {
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    padding: 1.75rem;
    transition: box-shadow 0.3s ease;
}

#admin-tab-settings .settings-form:hover,
#admin-tab-settings .gateways-setup-section:hover,
#admin-tab-settings .settings-coupons:hover {
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
}

/* Card title (h3) */
#admin-tab-settings .settings-form h3,
#admin-tab-settings .gateways-setup-section h3,
#admin-tab-settings .settings-coupons h3 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary-light);
}

/* Subsection headers — override inline styles with !important (only place) */
#admin-tab-settings .settings-form h4 {
    color: var(--color-primary) !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.85rem !important;
    padding-bottom: 0.4rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Form groups */
#admin-tab-settings .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.1rem;
}

#admin-tab-settings .form-group label {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

#admin-tab-settings .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Inputs */
#admin-tab-settings input[type="text"],
#admin-tab-settings input[type="email"],
#admin-tab-settings input[type="password"],
#admin-tab-settings input[type="url"],
#admin-tab-settings input[type="number"],
#admin-tab-settings textarea,
#admin-tab-settings select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-settings input:focus,
#admin-tab-settings textarea:focus,
#admin-tab-settings select:focus {
    outline: none;
    background: var(--color-bg-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

#admin-tab-settings input[readonly] {
    background: #f1f5f9;
    color: var(--color-text-muted);
    cursor: not-allowed;
}

#admin-tab-settings textarea {
    resize: vertical;
    min-height: 70px;
}

#admin-tab-settings .admin-settings-hint {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* ─── Emerald toggle switches ─── */
#admin-tab-settings .emerald-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}

#admin-tab-settings .emerald-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#admin-tab-settings .emerald-switch-track {
    width: 42px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

#admin-tab-settings .emerald-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-settings .emerald-switch input:checked + .emerald-switch-track {
    background: var(--color-primary);
}

#admin-tab-settings .emerald-switch input:checked + .emerald-switch-track::after {
    transform: translateX(-18px);
}

html[dir="ltr"] #admin-tab-settings .emerald-switch input:checked + .emerald-switch-track::after {
    transform: translateX(18px);
}

#admin-tab-settings .emerald-switch-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text-muted);
    min-width: 2.5ch;
}

#admin-tab-settings .emerald-switch input:checked ~ .emerald-switch-label {
    color: var(--color-primary);
}

/* ─── Social platform rows ─── */
#admin-tab-settings .social-platform-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

#admin-tab-settings .social-platform-row {
    background: var(--color-bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease;
}

#admin-tab-settings .social-platform-row:hover {
    border-color: var(--color-primary);
}

#admin-tab-settings .social-platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

#admin-tab-settings .social-platform-name {
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.9rem;
}

#admin-tab-settings .social-platform-url-wrap {
    margin-top: 0.6rem;
}

#admin-tab-settings .social-platform-url-wrap.hidden {
    display: none;
}

/* ─── Gateways section ─── */
#admin-tab-settings .gateways-section-header {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
}

#admin-tab-settings .gateways-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

#admin-tab-settings .admin-toggle-row {
    background: var(--color-bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

#admin-tab-settings .admin-toggle-row:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Crypto checkout block */
#admin-tab-settings .crypto-checkout-settings-block {
    background: var(--color-bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

/* Sticky save bar */
#admin-tab-settings .gateways-save-sticky {
    position: sticky;
    bottom: 0;
    background: var(--color-bg-surface);
    border-top: 1px solid #e2e8f0;
    padding: 1rem 0 0;
    margin-top: 1.25rem;
    z-index: 5;
}

#admin-tab-settings .gateways-save-sticky .btn {
    width: 100%;
    border-radius: var(--radius-sm);
    font-weight: 700;
    padding: 0.85rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-settings .gateways-save-sticky .btn-primary,
#admin-tab-settings .gateways-save-sticky .btn-emerald {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#admin-tab-settings .gateways-save-sticky .btn-primary:hover,
#admin-tab-settings .gateways-save-sticky .btn-emerald:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

/* Buttons generally */
#admin-tab-settings .btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-tab-settings .btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--hp-shadow-primary, var(--shadow-md));
}

#admin-tab-settings .btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 128, 96, 0.45);
}

#admin-tab-settings .btn-emerald {
    background: var(--color-primary);
    color: #fff;
}

#admin-tab-settings .btn-add-custom-gw {
    background: var(--color-bg-surface);
    color: var(--color-primary);
    border: 1.5px dashed var(--color-primary);
    padding: 0.6rem 1rem;
    margin-top: 0.75rem;
}

#admin-tab-settings .btn-add-custom-gw:hover {
    background: var(--color-primary-light);
}

/* Coupons section */
#admin-tab-settings .coupon-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

#admin-tab-settings .coupons-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Responsive */
@media (max-width: 860px) {
    #admin-tab-settings .settings-grid,
    #admin-tab-settings .gateways-grid {
        grid-template-columns: 1fr;
    }

    #admin-tab-settings .form-row {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   NAVBAR POLISH — alignment + pill buttons + compact lang dropdown
   Scoped under .main-header (high specificity, no !important).
   ================================================================ */

/* Row 1: lock vertical alignment + consistent spacing */
.main-header .header-row-1,
.main-header .header-top-row.header-row-1 {
    align-items: center;
    gap: 16px;
    height: 70px;
}

/* Logo: bold + properly sized, vertically centered */
.main-header .logo-area.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.main-header .logo-icon {
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
}

.main-header .logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.18rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--color-text);
    white-space: nowrap;
}

/* Header actions: even spacing, all children centered */
.main-header .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-inline-start: auto;
    flex-shrink: 0;
}

/* ---- Login button: pill, green-tinted, prominent ---- */
.main-header .customer-auth-btn.icon-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px; /* pill */
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px -2px rgba(0, 128, 96, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.main-header .customer-auth-btn.icon-btn-text svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.main-header .customer-auth-btn.icon-btn-text:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -4px rgba(0, 128, 96, 0.45);
    color: #fff;
}

/* When logged in, soften to outline style */
.main-header .customer-auth-btn.icon-btn-text:has(.customer-auth-name:not(.hidden)) {
    background: var(--color-bg-surface);
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    box-shadow: none;
}

/* ---- Language selector: compact pill dropdown ---- */
.main-header .lang-selector-container {
    position: relative;
    flex-shrink: 0;
}

.main-header .lang-selector-btn.icon-btn-text.lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px; /* pill */
    background: var(--color-bg-secondary);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.main-header .lang-selector-btn.icon-btn-text.lang:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.main-header .lang-selector-btn #current-lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.main-header .lang-selector-btn #current-lang-text {
    font-size: 0.82rem;
}

/* Compact dropdown panel */
.main-header .lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 140px;
    background: var(--color-bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 4px 10px -3px rgba(15, 23, 42, 0.08);
    padding: 6px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.main-header .lang-dropdown.hidden {
    display: none;
}

.main-header .lang-option {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 0.88rem;
    text-align: start;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.main-header .lang-option:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ---- Cart icon: green pill, badge prominent ---- */
.main-header .cart-toggle-btn.icon-btn.cart {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    position: relative;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px; /* pill */
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px -2px rgba(0, 128, 96, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.main-header .cart-toggle-btn.icon-btn.cart:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -4px rgba(0, 128, 96, 0.45);
    color: #fff;
}

.main-header .cart-toggle-btn.icon-btn.cart svg {
    width: 20px;
    height: 20px;
}

.main-header .cart-toggle-btn .cart-count {
    position: absolute;
    top: -3px;
    inset-inline-end: -3px;
    background: var(--color-accent);
    color: #fff;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    display: grid;
    place-items: center;
    border: 2px solid var(--color-bg-surface);
}

/* Search wrap: keep flexible but bounded */
.main-header .search-wrap {
    flex: 1;
    max-width: 460px;
    min-width: 0;
}

/* Mobile: tighten gaps, hide labels */
@media (max-width: 860px) {
    .main-header .header-row-1,
    .main-header .header-top-row.header-row-1 {
        gap: 10px;
    }

    .main-header .customer-auth-btn.icon-btn-text {
        padding: 0 12px;
        height: 40px;
    }

    .main-header .lang-selector-btn #current-lang-text {
        display: none;
    }

    .main-header .lang-selector-btn.icon-btn-text.lang {
        padding: 0 10px;
        height: 40px;
    }

    .main-header .cart-toggle-btn.icon-btn.cart {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 560px) {
    .main-header .customer-auth-btn span:not(.customer-auth-name):not(#customer-auth-name) {
        /* keep label visible but allow it to shrink */
        font-size: 0.82rem;
    }

    .main-header .logo-text {
        font-size: 1.02rem;
    }
}


/* ================================================================
   ADMIN PRODUCT IMAGE SECTION — prominence + visible placeholder
   Scoped under #admin-product-modal (high specificity, no !important).
   NO HTML or JS changes — pure CSS.
   The .admin-product-image-group is now a clearly visible card with a
   persistent dashed placeholder when no image is set.
   ================================================================ */

#admin-product-modal .admin-product-image-group {
    background: var(--color-bg-secondary);
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.1rem;
    margin-bottom: 1.1rem;
}

#admin-product-modal .admin-product-image-group > label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    color: var(--color-text);
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
}

#admin-product-modal .admin-product-image-group > label::before {
    content: "🖼️";
    font-size: 1rem;
    line-height: 1;
}

/* URL input — full width, prominent */
#admin-product-modal .admin-product-image-group input#admin-p-image {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-product-modal .admin-product-image-group input#admin-p-image:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

#admin-product-modal .admin-product-image-group input#admin-p-image::placeholder {
    color: var(--color-text-muted);
}

/* Upload button row — prominent primary-tinted */
#admin-product-modal .admin-product-image-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

#admin-product-modal .admin-product-image-upload-btn {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1.5px dashed var(--color-primary);
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

#admin-product-modal .admin-product-image-upload-btn::before {
    content: "📤";
    font-size: 0.95rem;
}

#admin-product-modal .admin-product-image-upload-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-style: solid;
    transform: translateY(-1px);
}

#admin-product-modal .admin-product-image-upload .helper-text {
    color: var(--color-text-muted);
    font-size: 0.76rem;
    flex: 1;
    min-width: 140px;
}

/* Preview area — when an image IS set */
#admin-product-modal .admin-product-image-preview {
    margin-top: 0.85rem;
    position: relative;
    display: inline-flex;
    padding: 0.5rem;
    background: var(--color-bg-surface);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px -3px rgba(0, 128, 96, 0.2);
}

#admin-product-modal .admin-product-image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
}

#admin-product-modal .admin-product-image-clear {
    position: absolute;
    top: -8px;
    inset-inline-end: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-danger);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease;
}

#admin-product-modal .admin-product-image-clear:hover {
    transform: scale(1.15);
}

/* Placeholder box — always visible when no preview is set.
   Uses :has() to detect the hidden preview and show a dashed prompt. */
#admin-product-modal .admin-product-image-group:has(.admin-product-image-preview.hidden)::after {
    content: "📷 لم يتم اختيار صورة بعد — ارفع ملفاً أو الصق رابطاً أعلاه";
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0.85rem;
    padding: 1.75rem 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 100px;
    line-height: 1.6;
}

#admin-product-modal .admin-product-image-group:has(.admin-product-image-preview:not(.hidden))::after {
    content: none;
}

/* ══════════════════════════════════════════════════════════════════════
   PREMIUM CUSTOMER DASHBOARD REDESIGN
   Pure CSS, scoped to #view-customer-dashboard — zero HTML/JS changes.
   Design system: Green/Emerald brand · Inter/Cairo · Apple+Stripe quality
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. Page canvas ── */
#view-customer-dashboard {
    background:
        radial-gradient(ellipse 60% 40% at 90% -5%, rgba(0,128,96,0.08) 0%, transparent 55%),
        radial-gradient(ellipse 50% 35% at 5%  95%, rgba(234,179,8,0.06) 0%, transparent 50%),
        #f8fafc;
    min-height: 100vh;
    padding-top: 0;
}

/* ── 3. Sidebar card ── */
#view-customer-dashboard .customer-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 24px -8px rgba(0, 40, 30, 0.10);
    padding: 1.75rem 1.5rem;
    top: 5.5rem;
    backdrop-filter: none;
    overflow: hidden;
}

#view-customer-dashboard .customer-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #006048, #008060);
    color: #ffffff;
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.30);
}

#view-customer-dashboard .customer-avatar svg {
    width: 24px;
    height: 24px;
}

/* Nav menu */
#view-customer-dashboard .customer-sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .customer-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.72rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

#view-customer-dashboard .customer-menu-item:hover {
    background: #f0fdf4;
    color: #008060;
    border-color: #dcfce7;
    transform: translateX(-2px);
}

html[dir="rtl"] #view-customer-dashboard .customer-menu-item:hover {
    transform: translateX(2px);
}

#view-customer-dashboard .customer-menu-item.active,
html[dir="rtl"] #view-customer-dashboard .customer-menu-item.active,
html[dir="ltr"] #view-customer-dashboard .customer-menu-item.active {
    background: linear-gradient(135deg, #006048 0%, #008060 100%);
    color: #ffffff;
    border: none;
    border-inline-start: none;
    border-inline-end: none;
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.30);
    transform: none;
}

/* Logout button */
#view-customer-dashboard .logout-btn {
    width: 100%;
    border-radius: 12px;
    background: #fff1f2;
    color: #b91c1c;
    border: 1.5px solid #fecdd3;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

#view-customer-dashboard .logout-btn:hover {
    background: #fee2e2;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.15);
}

/* ── 4. Top bar ── */
#view-customer-dashboard .customer-dashboard-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 1.75rem;
    margin-bottom: 0;
    border-bottom: none;
}

#view-customer-dashboard .customer-welcome-message {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #0f172a;
    background: none;
    -webkit-text-fill-color: unset;
}

#view-customer-dashboard .customer-notif-bell-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
}

#view-customer-dashboard .customer-notif-bell-btn:hover {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.10);
}

/* ── 5. Wallet area ── */
#view-customer-dashboard .wallet-header-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

#view-customer-dashboard .wallet-status-card {
    background: linear-gradient(135deg, #004d3a 0%, #006048 40%, #008060 80%, #009970 100%);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    box-shadow:
        0 12px 32px -8px rgba(0, 96, 72, 0.40),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    padding: 1.5rem 2rem;
    flex: 1;
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

#view-customer-dashboard .wallet-status-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
    pointer-events: none;
}

#view-customer-dashboard .wallet-status-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: #ffffff;
    flex-shrink: 0;
}

#view-customer-dashboard .wallet-status-icon svg {
    width: 20px;
    height: 20px;
}

#view-customer-dashboard .wallet-status-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 4px;
}

#view-customer-dashboard .wallet-status-amount {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1;
}

#view-customer-dashboard .wallet-status-currency {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    margin-inline-start: 4px;
}

#view-customer-dashboard .wallet-topup-btn {
    height: 52px;
    padding: 0 1.5rem;
    border-radius: 14px;
    background: #ffffff;
    color: #008060;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    align-self: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 40, 30, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#view-customer-dashboard .wallet-topup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 40, 30, 0.20);
    background: #f0fdf4;
}

/* ── 6. Loyalty card ── */
#view-customer-dashboard .loyalty-header-row {
    margin-bottom: 1.75rem;
}

#view-customer-dashboard .loyalty-glass-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08);
    padding: 1.5rem 2rem;
    backdrop-filter: none;
}

#view-customer-dashboard .loyalty-card-icon {
    width: 48px;
    height: 48px;
    background: #fef9c3;
    border-radius: 14px;
    border: 1px solid #fde68a;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#view-customer-dashboard .loyalty-card-balance {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1.25rem;
}

#view-customer-dashboard #loyalty-card-balance-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

#view-customer-dashboard .loyalty-card-points-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

#view-customer-dashboard .loyalty-points-counter {
    font-family: 'Inter', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #008060;
    background: none;
    padding: 0;
    border-radius: 0;
}

#view-customer-dashboard #loyalty-card-points-unit {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
}

#view-customer-dashboard .loyalty-redeem-btn {
    width: 100%;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    height: 46px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#view-customer-dashboard .loyalty-redeem-btn:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.30);
}

#view-customer-dashboard .loyalty-redeem-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.40);
}

#view-customer-dashboard .loyalty-redeem-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    cursor: not-allowed;
}

/* ── 7. Mobile tabs ── */
#view-customer-dashboard .customer-mobile-tabs {
    background: #f1f5f9;
    border-radius: 999px;
    padding: 4px;
    gap: 3px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

#view-customer-dashboard .customer-mobile-tab {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: #64748b;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#view-customer-dashboard .customer-mobile-tab.active {
    background: #ffffff;
    color: #008060;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 60, 45, 0.12);
}

/* ── 8. Tab section headers ── */
#view-customer-dashboard .tab-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

#view-customer-dashboard .tab-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 4px;
}

#view-customer-dashboard .tab-header p {
    font-size: 0.875rem;
    color: #64748b;
}

/* ── 9. Content cards (glass-panel inside tabs) ── */
#view-customer-dashboard .glass-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06),
                0 4px 16px -4px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
}

/* ── 10. Purchased keys table ── */
#view-customer-dashboard .purchased-keys-table-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05),
                0 4px 16px -4px rgba(15, 23, 42, 0.06);
    padding: 0;
}

#view-customer-dashboard .purchased-keys-table {
    min-width: 580px;
}

#view-customer-dashboard .purchased-keys-table thead th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 18px;
    white-space: nowrap;
}

#view-customer-dashboard .purchased-keys-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.875rem;
    vertical-align: middle;
}

#view-customer-dashboard .purchased-keys-table tbody tr:last-child td {
    border-bottom: none;
}

#view-customer-dashboard .purchased-keys-table tbody tr {
    transition: background 0.15s ease;
}

#view-customer-dashboard .purchased-keys-table tbody tr:hover {
    background: #f8fffe;
    box-shadow: none;
}

#view-customer-dashboard .purchased-keys-table .inventory-key-code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 5px 10px;
    color: #065f46;
    max-width: 240px;
}

#view-customer-dashboard .inventory-key-product-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.875rem;
}

#view-customer-dashboard .inventory-key-duration {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ── 11. Orders table ── */
#view-customer-dashboard .customer-orders-table-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05),
                0 4px 16px -4px rgba(15, 23, 42, 0.06);
}

#view-customer-dashboard .customer-orders-table {
    min-width: 520px;
}

#view-customer-dashboard .customer-orders-table th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

#view-customer-dashboard .customer-orders-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.875rem;
}

#view-customer-dashboard .customer-orders-table tbody tr:last-child td {
    border-bottom: none;
}

#view-customer-dashboard .customer-orders-table tbody tr {
    transition: background 0.15s ease;
}

#view-customer-dashboard .customer-orders-table tbody tr:hover {
    background: #f8fafc;
}

/* Status badges */
#view-customer-dashboard .status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

#view-customer-dashboard .status-badge.completed {
    background: #dcfce7;
    color: #15803d;
}

#view-customer-dashboard .status-badge.pending,
#view-customer-dashboard .status-badge.pending-payment {
    background: #fef9c3;
    color: #a16207;
}

#view-customer-dashboard .status-badge.rejected {
    background: #fee2e2;
    color: #b91c1c;
}

#view-customer-dashboard .status-badge.refunded {
    background: #e0e7ff;
    color: #4338ca;
}

/* Copy / action buttons */
#view-customer-dashboard .copy-key-btn,
#view-customer-dashboard .inventory-key-action-cell .btn {
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    padding: 0 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#view-customer-dashboard .copy-key-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 128, 96, 0.20);
}

/* ============================================================
   DASHBOARD REDESIGN — Segment 4: Forms + Pending Orders + Responsive
   ============================================================ */

/* ── Support Ticket Form ────────────────────────────────────── */
#view-customer-dashboard .customer-ticket-form {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1.5px solid #e5f0eb;
    box-shadow: 0 2px 12px rgba(0, 96, 72, 0.06);
}

#view-customer-dashboard .customer-ticket-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#view-customer-dashboard .customer-ticket-form input[type="text"],
#view-customer-dashboard .customer-ticket-form select {
    width: 100%;
    height: 52px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    padding: 0 16px;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

#view-customer-dashboard .customer-ticket-form input[type="text"]:focus,
#view-customer-dashboard .customer-ticket-form select:focus {
    border-color: #008060;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.12);
    outline: none;
    background: #fff;
}

#view-customer-dashboard .customer-ticket-form textarea {
    width: 100%;
    min-height: 140px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    padding: 14px 16px;
    background: #f9fafb;
    color: #111827;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

#view-customer-dashboard .customer-ticket-form textarea:focus {
    border-color: #008060;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.12);
    outline: none;
    background: #fff;
}

#view-customer-dashboard .customer-ticket-form .btn,
#view-customer-dashboard .customer-ticket-form button[type="submit"] {
    height: 48px;
    padding: 0 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #006048, #008060);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

#view-customer-dashboard .customer-ticket-form .btn:hover,
#view-customer-dashboard .customer-ticket-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 128, 96, 0.30);
}

/* ── Ticket List ────────────────────────────────────────────── */
#view-customer-dashboard .customer-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#view-customer-dashboard .support-ticket-card {
    background: #fff;
    border: 1.5px solid #e5f0eb;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 96, 72, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#view-customer-dashboard .support-ticket-card:hover {
    box-shadow: 0 6px 20px rgba(0, 96, 72, 0.10);
    border-color: #b3d9cc;
}

#view-customer-dashboard .support-ticket-card .ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

#view-customer-dashboard .support-ticket-card .ticket-subject {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

#view-customer-dashboard .support-ticket-card .ticket-status {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#view-customer-dashboard .support-ticket-card .ticket-status.open,
#view-customer-dashboard .support-ticket-card .ticket-status.pending {
    background: #fff7e6;
    color: #b45309;
}

#view-customer-dashboard .support-ticket-card .ticket-status.resolved,
#view-customer-dashboard .support-ticket-card .ticket-status.closed {
    background: #e8f5ee;
    color: #006048;
}

#view-customer-dashboard .support-ticket-card .ticket-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

#view-customer-dashboard .support-ticket-card .ticket-message {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

/* ── Settings Form ──────────────────────────────────────────── */
#view-customer-dashboard .customer-settings-form {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 540px;
    border: 1.5px solid #e5f0eb;
    box-shadow: 0 2px 12px rgba(0, 96, 72, 0.06);
}

#view-customer-dashboard .customer-settings-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#view-customer-dashboard .customer-settings-form input {
    width: 100%;
    height: 52px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    padding: 0 16px;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

#view-customer-dashboard .customer-settings-form input:focus {
    border-color: #008060;
    box-shadow: 0 0 0 4px rgba(0, 128, 96, 0.15);
    outline: none;
    background: #fff;
}

#view-customer-dashboard .customer-settings-form .password-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

#view-customer-dashboard .customer-settings-form .password-input-wrapper input {
    margin-bottom: 0;
    padding-right: 52px;
}

#view-customer-dashboard .customer-settings-form .password-toggle-btn,
#view-customer-dashboard .customer-settings-form [class*="toggle-password"],
#view-customer-dashboard .customer-settings-form [id*="toggle-password"] {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

#view-customer-dashboard .customer-settings-form .password-toggle-btn:hover,
#view-customer-dashboard .customer-settings-form [class*="toggle-password"]:hover,
#view-customer-dashboard .customer-settings-form [id*="toggle-password"]:hover {
    color: #008060;
}

#view-customer-dashboard .customer-settings-form .btn,
#view-customer-dashboard .customer-settings-form button[type="submit"] {
    height: 48px;
    padding: 0 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #006048, #008060);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#view-customer-dashboard .customer-settings-form .btn:hover,
#view-customer-dashboard .customer-settings-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 128, 96, 0.30);
}

/* ── Pending Orders Section ─────────────────────────────────── */
#view-customer-dashboard .customer-pending-orders-section {
    margin-bottom: 1.5rem;
}

#view-customer-dashboard .customer-pending-order-card {
    background: #fff;
    border: 1.5px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
    transition: box-shadow 0.2s ease;
}


#view-customer-dashboard .customer-pending-order-card:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.14);
}

#view-customer-dashboard .customer-pending-order-card .pending-order-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#view-customer-dashboard .customer-pending-order-card .pending-order-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

#view-customer-dashboard .customer-pending-order-card .pending-order-meta {
    font-size: 12px;
    color: #9ca3af;
}

#view-customer-dashboard .customer-pending-order-card .pending-order-amount {
    font-size: 18px;
    font-weight: 900;
    color: #b45309;
    white-space: nowrap;
}

/* === Responsive: Tablet / Small Screens (<=900px) === */
@media (max-width: 900px) {
    #view-customer-dashboard .customer-dashboard-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 0;
    }

    #view-customer-dashboard .customer-sidebar {
        display: none !important;
    }

    #view-customer-dashboard .customer-mobile-tabs {
        display: flex !important;
    }

    #view-customer-dashboard .customer-main-content {
        padding: 1.25rem 1rem;
    }

    #view-customer-dashboard .customer-top-bar {
        padding: 0 1rem;
        height: 60px;
    }

    #view-customer-dashboard .dashboard-wallet-card,
    #view-customer-dashboard .dashboard-loyalty-card,
    #view-customer-dashboard .customer-pending-order-card {
        padding: 1rem 1.25rem;
    }

    #view-customer-dashboard .wallet-balance-amount {
        font-size: 2rem;
    }

    #view-customer-dashboard .dashboard-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    #view-customer-dashboard .customer-settings-form {
        max-width: 100%;
    }
}

/* === Responsive: Mobile (<=640px) === */
@media (max-width: 640px) {
    #view-customer-dashboard .customer-main-content {
        padding: 1rem 0.75rem;
    }

    #view-customer-dashboard .customer-top-bar {
        padding: 0 0.75rem;
    }

    #view-customer-dashboard .dashboard-section-title {
        font-size: 18px;
    }

    #view-customer-dashboard .wallet-balance-amount {
        font-size: 1.75rem;
    }

    #view-customer-dashboard .dashboard-wallet-card,
    #view-customer-dashboard .dashboard-loyalty-card {
        padding: 1.25rem 1rem;
    }

    #view-customer-dashboard .dashboard-stats-row {
        grid-template-columns: 1fr;
    }

    #view-customer-dashboard .customer-tab-header {
        font-size: 20px;
    }

    #view-customer-dashboard .customer-table th,
    #view-customer-dashboard .customer-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    #view-customer-dashboard .support-ticket-card,
    #view-customer-dashboard .customer-pending-order-card {
        padding: 1rem;
    }

    #view-customer-dashboard .customer-ticket-form,
    #view-customer-dashboard .customer-settings-form {
        padding: 1.25rem;
    }

    #view-customer-dashboard .customer-mobile-tabs {
        padding: 0 0.75rem;
        gap: 0.25rem;
    }

    #view-customer-dashboard .customer-mobile-tab-btn {
        font-size: 12px;
        padding: 0 14px;
    }

    #view-customer-dashboard .customer-pending-order-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* === END DASHBOARD REDESIGN === */

/* ==============================================================================
   PREMIUM DASHBOARD v3 — Complete Redesign
   Dark sidebar + light main + clean cards + modern SaaS aesthetic
   ============================================================================== */

/* ── Page Canvas ────────────────────────────────────────────────────────── */
#view-customer-dashboard {
    background: #f0f4f8;
    min-height: 100vh;
    padding-top: 0 !important;
}

/* ── Layout Grid ───────────────────────────────────────────────────────── */
.dash-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    gap: 0;
    max-width: 100%;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR (Dark Green)
   ══════════════════════════════════════════════════════════════════════════ */
.dash-sidebar {
    background: linear-gradient(180deg, #006048 0%, #005040 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.15);
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
}

.dash-sidebar-inner {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    flex: 1;
}

/* Brand */
.dash-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.dash-brand-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.dash-brand span {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Profile */
.dash-profile {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.15);
}

.dash-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.dash-profile-info {
    flex: 1;
    min-width: 0;
}

.dash-profile-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-profile-info p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Nav */
.dash-nav {
    flex: 1;
    margin-bottom: 1rem;
}

.dash-nav-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.customer-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.customer-sidebar-menu li {
    margin: 0;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
    border: 1px solid transparent !important;
    background: transparent !important;
    margin-bottom: 0.25rem !important;
}

.dash-nav-icon {
    flex-shrink: 0;
    color: #ffffff !important;
    transition: color 0.25s ease;
}

.dash-nav-item:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.22) !important;
    transform: translateX(2px);
}

.dash-nav-item:hover .dash-nav-icon {
    color: #ffffff !important;
}

.dash-nav-item.active,
.customer-menu-item.active {
    background: #d1fae5 !important;
    color: #006048 !important;
    border-color: #a7f3d0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.4) !important;
    font-weight: 700;
}

.dash-nav-item.active .dash-nav-icon {
    color: #006048 !important;
}

.dash-nav-item.active:hover {
    background: #a7f3d0 !important;
    color: #004030 !important;
}

/* Logout */
.dash-logout-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dash-logout-btn:hover {
    background: rgba(239,68,68,0.85);
    border-color: rgba(239,68,68,0.5);
    color: #fff;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════════════
   MAIN PANEL
   ══════════════════════════════════════════════════════════════════════════ */
.dash-main {
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.dash-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dash-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

.dash-bell-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    color: #64748b;
}

.dash-bell-btn:hover {
    background: #f0fdf4;
    border-color: #86efac;
    color: #008060;
}

/* Summary Cards Row */
.dash-summary-row {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.dash-wallet-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-wallet-card {
    background: linear-gradient(135deg, #006048 0%, #008060 100%);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: none;
    box-shadow: 0 4px 16px rgba(0,96,72,0.25), 0 1px 4px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.dash-wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.wallet-status-info {
    flex: 1;
}

.wallet-status-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin: 0 0 4px 0;
}

.wallet-status-amount-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.wallet-status-amount {
    font-size: 1.75rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
}

.wallet-status-currency {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}

.dash-topup-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    background: #fff;
    color: #008060;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dash-topup-btn:hover {
    background: #f0fdf4;
    border-color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,128,96,0.15);
}

.dash-loyalty-wrap {
    display: flex;
}

.dash-loyalty-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex: 1;
}

.dash-loyalty-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.dash-loyalty-text {
    flex: 1;
}

.dash-loyalty-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 4px 0;
}

.loyalty-card-points-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.loyalty-points-counter {
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.dash-loyalty-unit {
    font-size: 0.85rem;
    color: #94a3b8;
}

.dash-redeem-btn {
    padding: 0.625rem 1rem;
    border-radius: 10px;
    background: #f0fdf4;
    color: #008060;
    border: 1px solid #86efac;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dash-redeem-btn:not(:disabled):hover {
    background: #dcfce7;
    transform: translateY(-1px);
}

.dash-redeem-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dash-mobile-tabs {
    display: none;
    padding: 1rem 2rem 0 2rem;
    gap: 0.5rem;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.customer-mobile-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: #64748b;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.customer-mobile-tab.active {
    background: #f0fdf4;
    color: #008060;
    border-bottom-color: #008060;
}

.dash-content {
    padding: 2rem;
    flex: 1;
}

.dash-tab-header {
    margin-bottom: 1.5rem;
}

.dash-tab-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.dash-tab-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.dash-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

.dash-table-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.customer-orders-table,
.purchased-keys-table {
    width: 100%;
    border-collapse: collapse;
}

.customer-orders-table thead th,
.purchased-keys-table thead th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.customer-orders-table tbody td,
.purchased-keys-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #334155;
}

.customer-orders-table tbody tr:hover,
.purchased-keys-table tbody tr:hover {
    background: #f8fafc;
}

.customer-orders-table tbody tr:last-child td,
.purchased-keys-table tbody tr:last-child td {
    border-bottom: none;
}

.dash-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-form-group {
    margin-bottom: 1rem;
}

.dash-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.dash-form-group input,
.dash-form-group textarea,
.dash-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.dash-form-group input:focus,
.dash-form-group textarea:focus,
.dash-form-group select:focus {
    outline: none;
    border-color: #008060;
    box-shadow: 0 0 0 3px rgba(0,128,96,0.1);
}

.dash-form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.dash-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #006048, #008060);
    color: #fff;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,128,96,0.2);
}

.dash-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,128,96,0.35);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.completed {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending,
.status-badge.pending-payment {
    background: #fef9c3;
    color: #854d0e;
}

.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.refunded {
    background: #e0e7ff;
    color: #4338ca;
}

@media (max-width: 980px) {
    .dash-layout {
        grid-template-columns: 1fr;
    }
    .dash-sidebar {
        display: none;
    }
    .dash-mobile-tabs {
        display: flex;
    }
    .dash-summary-row {
        padding: 1rem;
        gap: 1rem;
    }
    .dash-content {
        padding: 1rem;
    }
    .dash-topbar {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .dash-page-title {
        font-size: 1.2rem;
    }
    .dash-summary-row {
        grid-template-columns: 1fr;
    }
    .dash-wallet-wrap {
        flex-direction: column;
    }
    .dash-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================================================
   ADMIN PANEL REDESIGN — matches customer dashboard design system
   CSS-only: sidebar + navbar + stat cards + chart cards
   ============================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN TOP NAVBAR
   ══════════════════════════════════════════════════════════════════════════ */
.admin-page-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    height: 64px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

.admin-page-header-inner {
    height: 64px !important;
    max-width: 100% !important;
    padding: 0 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
}

/* Logo area */
.admin-page-header-inner .logo-area {
    display: flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
}

.admin-page-header-inner .logo-icon {
    width: 36px !important;
    height: 36px !important;
    background: linear-gradient(135deg, #006048, #008060) !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    flex-shrink: 0 !important;
}

.admin-page-header-inner .logo-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.admin-page-header-inner .logo-text {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.admin-page-header-inner .logo-text .highlight {
    color: #008060 !important;
}

.admin-page-badge {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    background: #f0fdf4 !important;
    color: #008060 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    border: 1px solid #bbf7d0 !important;
    letter-spacing: 0 !important;
}

/* Language selector pill */
.admin-page-header-inner .lang-selector-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 7px 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.admin-page-header-inner .lang-selector-btn:hover {
    border-color: #86efac !important;
    color: #008060 !important;
    background: #f0fdf4 !important;
}

/* Back to store button */
.admin-page-back-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 7px 16px !important;
    border: 1.5px solid #008060 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #008060 !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.admin-page-back-link:hover {
    background: #008060 !important;
    color: #ffffff !important;
    border-color: #008060 !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN SIDEBAR
   ══════════════════════════════════════════════════════════════════════════ */
.admin-sidebar {
    background: #ffffff !important;
    border: none !important;
    border-left: 1px solid #e5e7eb !important;
    width: 260px !important;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04) !important;
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
}

html[dir="ltr"] .admin-sidebar {
    border-left: none !important;
    border-right: 1px solid #e5e7eb !important;
}

.admin-sidebar.glass-panel {
    background: #ffffff !important;
    backdrop-filter: none !important;
}

/* Sidebar profile header */
.admin-profile {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
    margin-bottom: 1.25rem !important;
    background: #f8fafc !important;
    border-radius: 14px !important;
    border: 1px solid #f1f5f9 !important;
}

.admin-profile .avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #006048, #008060) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(0,128,96,0.25) !important;
}

.admin-profile .avatar svg {
    width: 22px !important;
    height: 22px !important;
}

.admin-profile h4 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 2px 0 !important;
    letter-spacing: -0.01em !important;
}

.admin-profile p {
    font-size: 0.72rem !important;
    color: #008060 !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

/* Sidebar nav menu */
.sidebar-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
}

.sidebar-menu li {
    margin: 0 !important;
}

/* Nav items — default */
.admin-sidebar .menu-item,
#admin-sidebar .menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    color: #6b7280 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
    border: none !important;
    background: transparent !important;
    margin-bottom: 0 !important;
    line-height: 1.4 !important;
}

/* Nav items — hover */
.admin-sidebar .menu-item:hover,
#admin-sidebar .menu-item:hover {
    background: #f0fdf4 !important;
    color: #008060 !important;
}

/* Nav items — active */
.admin-sidebar .menu-item.active,
#admin-sidebar .menu-item.active,
html[dir="rtl"] .admin-sidebar .menu-item.active,
html[dir="ltr"] .admin-sidebar .menu-item.active,
html[dir="rtl"] #admin-sidebar .menu-item.active,
html[dir="ltr"] #admin-sidebar .menu-item.active {
    background: linear-gradient(135deg, #006048, #008060) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0,128,96,0.3) !important;
    border: none !important;
    border-inline-end: none !important;
    border-inline-start: none !important;
}

/* Logout button */
.admin-sidebar .logout-btn,
#admin-sidebar .logout-btn,
#admin-logout-btn {
    margin-top: 1rem !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    border: 1.5px solid #fecaca !important;
    background: #ffffff !important;
    color: #ef4444 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

#admin-logout-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

/* STAT CARDS */
.stat-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    padding: 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    position: relative !important;
    overflow: hidden !important;
    border: none !important;
}

.stat-card.glass-panel {
    background: #ffffff !important;
    backdrop-filter: none !important;
}

.stat-card.border-green { border-left: 4px solid #008060 !important; }
.stat-card.border-blue { border-left: 4px solid #3b82f6 !important; }
.stat-card.border-emerald { border-left: 4px solid #10b981 !important; }
.stat-card.border-orange { border-left: 4px solid #f59e0b !important; }
.stat-card.border-purple { border-left: 4px solid #8b5cf6 !important; }

html[dir="rtl"] .stat-card.border-green { border-left: none !important; border-right: 4px solid #008060 !important; }
html[dir="rtl"] .stat-card.border-blue { border-left: none !important; border-right: 4px solid #3b82f6 !important; }
html[dir="rtl"] .stat-card.border-emerald { border-left: none !important; border-right: 4px solid #10b981 !important; }
html[dir="rtl"] .stat-card.border-orange { border-left: none !important; border-right: 4px solid #f59e0b !important; }
html[dir="rtl"] .stat-card.border-purple { border-left: none !important; border-right: 4px solid #8b5cf6 !important; }

.stat-card .stat-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
}

.stat-card .stat-icon svg { width: 20px !important; height: 20px !important; }
.stat-card .bg-green { background: linear-gradient(135deg, #006048, #008060) !important; }
.stat-card .bg-blue { background: linear-gradient(135deg, #2563eb, #3b82f6) !important; }
.stat-card .bg-emerald { background: linear-gradient(135deg, #059669, #10b981) !important; }
.stat-card .bg-orange { background: linear-gradient(135deg, #d97706, #f59e0b) !important; }
.stat-card .bg-purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6) !important; }

.stat-card .stat-info { flex: 1; min-width: 0; }
.stat-card .stat-label { font-size: 0.78rem !important; color: #6b7280 !important; font-weight: 500 !important; margin: 0 0 4px 0 !important; }
.stat-card .stat-value { font-size: 1.4rem !important; font-weight: 800 !important; color: #0f172a !important; margin: 0 !important; letter-spacing: -0.02em !important; }

/* CHART CARDS */
.chart-box {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    padding: 24px !important;
    border: 1px solid #f1f5f9 !important;
}

.chart-box.glass-panel { background: #ffffff !important; backdrop-filter: none !important; }

.chart-box h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important;
    letter-spacing: -0.01em !important;
}

.chart-box h3 + p {
    font-size: 13px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

/* TAB HEADER */
.admin-tab-content .tab-header { margin-bottom: 1.5rem !important; }
.admin-tab-content .tab-header h2 { font-size: 1.5rem !important; font-weight: 800 !important; color: #0f172a !important; margin: 0 0 4px 0 !important; letter-spacing: -0.02em !important; }
.admin-tab-content .tab-header p { font-size: 0.9rem !important; color: #6b7280 !important; margin: 0 !important; }

/* SIDEBAR TOGGLE */
.admin-sidebar-toggle {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
    color: #374151 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.admin-sidebar-toggle:hover {
    background: #f0fdf4 !important;
    color: #008060 !important;
    border-color: #86efac !important;
}

/* ==========================================================================
   CUSTOMER DASHBOARD v2 (cdv2) � modern redesign
   Prefix: cdv2-* (avoids conflicts with existing dash-* classes)
   ========================================================================== */

/* ---------- Design tokens ---------- */
#view-customer-dashboard.cdv2-active {
  --cdv2-emerald-50:  #ecfdf5;
  --cdv2-emerald-100: #d1fae5;
  --cdv2-emerald-200: #a7f3d0;
  --cdv2-emerald-400: #34d399;
  --cdv2-emerald-500: #10b981;
  --cdv2-emerald-600: #059669;
  --cdv2-emerald-700: #047857;
  --cdv2-emerald-800: #065f46;
  --cdv2-emerald-900: #064e3b;

  --cdv2-amber-50:  #fffbeb;
  --cdv2-amber-100: #fef3c7;
  --cdv2-amber-400: #fbbf24;
  --cdv2-amber-500: #f59e0b;
  --cdv2-amber-600: #d97706;

  --cdv2-slate-50:  #f8fafc;
  --cdv2-slate-100: #f1f5f9;
  --cdv2-slate-200: #e2e8f0;
  --cdv2-slate-300: #cbd5e1;
  --cdv2-slate-400: #94a3b8;
  --cdv2-slate-500: #64748b;
  --cdv2-slate-600: #475569;
  --cdv2-slate-700: #334155;
  --cdv2-slate-800: #1e293b;
  --cdv2-slate-900: #0f172a;

  --cdv2-rose-50:   #fff1f2;
  --cdv2-rose-500:  #f43f5e;
  --cdv2-rose-600:  #e11d48;

  --cdv2-blue-50:   #eff6ff;
  --cdv2-blue-500:  #3b82f6;
  --cdv2-blue-600:  #2563eb;

  --cdv2-violet-50:  #f5f3ff;
  --cdv2-violet-500: #8b5cf6;
  --cdv2-violet-600: #7c3aed;

  --cdv2-bg:        #f6f8fb;
  --cdv2-card:      #ffffff;
  --cdv2-text:      #0f172a;
  --cdv2-text-soft: #475569;
  --cdv2-text-mute: #94a3b8;
  --cdv2-border:    #e2e8f0;
  --cdv2-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --cdv2-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --cdv2-shadow-lg: 0 10px 30px -4px rgba(15, 23, 42, 0.10), 0 4px 12px -2px rgba(15, 23, 42, 0.06);

  --cdv2-radius-sm: 8px;
  --cdv2-radius:    12px;
  --cdv2-radius-lg: 16px;
  --cdv2-radius-xl: 22px;
  --cdv2-radius-2xl: 28px;
}

/* ---------- Layout ---------- */
#view-customer-dashboard.cdv2-active .dash-layout {
  display: grid;
  grid-template-columns: 296px 1fr;
  min-height: 100vh;
  background: var(--cdv2-bg);
}

#view-customer-dashboard.cdv2-active .dash-sidebar {
  background: linear-gradient(180deg, #064e3b 0%, #022c22 100%);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
  color: #ecfdf5;
  border: none;
}
#view-customer-dashboard.cdv2-active .dash-sidebar::-webkit-scrollbar { width: 6px; }
#view-customer-dashboard.cdv2-active .dash-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.08); border-radius: 3px;
}
#view-customer-dashboard.cdv2-active .dash-sidebar-inner {
  display: flex; flex-direction: column; gap: 22px;
  padding: 0;
  background: transparent;
}

/* ---------- Brand ---------- */
#view-customer-dashboard.cdv2-active .dash-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px;
  margin-bottom: 0;
  color: white;
}
#view-customer-dashboard.cdv2-active .dash-brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #34d399);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .35);
  color: white;
}
#view-customer-dashboard.cdv2-active .dash-brand span {
  color: white;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.01em;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .dash-brand .cdv2-brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6ee7b7;
  margin-top: 2px;
}

/* ---------- Profile card (new) ---------- */
#view-customer-dashboard.cdv2-active .cdv2-profile {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--cdv2-radius-lg);
  padding: 16px;
  text-align: center;
}
#view-customer-dashboard.cdv2-active .cdv2-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #f43f5e);
  display: grid; place-items: center;
  color: white;
  font-weight: 800;
  font-size: 26px;
  position: relative;
  box-shadow: 0 8px 24px rgba(245, 158, 11, .35);
  line-height: 1;
}
#view-customer-dashboard.cdv2-active .cdv2-avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #fbbf24, #f43f5e);
  z-index: -1;
  animation: cdv2-rotate 6s linear infinite;
  opacity: .6;
  filter: blur(8px);
}
@keyframes cdv2-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
#view-customer-dashboard.cdv2-active .cdv2-profile-name {
  color: white; font-weight: 700; font-size: 15px; margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .cdv2-profile-email {
  color: #6ee7b7; font-size: 12px; margin-bottom: 10px;
  direction: ltr;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .cdv2-profile-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(251,191,36,.2), rgba(245,158,11,.1));
  border: 1px solid rgba(251,191,36,.3);
  border-radius: 999px;
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
}

/* Hide old avatar in cdv2 mode */
#view-customer-dashboard.cdv2-active .dash-profile { display: none; }

/* ---------- Nav ---------- */
#view-customer-dashboard.cdv2-active .dash-nav { padding: 0; }
#view-customer-dashboard.cdv2-active .dash-nav-section-label {
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 12px 8px;
  background: transparent;
  margin: 0;
  border: none;
}
#view-customer-dashboard.cdv2-active .dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--cdv2-radius);
  color: #d1fae5;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .15s;
  position: relative;
  min-width: 0;
  background: transparent;
  border: none;
}
#view-customer-dashboard.cdv2-active .dash-nav-item > span {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .dash-nav-item:hover {
  background: rgba(255,255,255,.05);
  color: white;
}
#view-customer-dashboard.cdv2-active .dash-nav-item.active {
  background: linear-gradient(135deg, rgba(16,185,129,.2), rgba(52,211,153,.1));
  color: white;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.3);
}
#view-customer-dashboard.cdv2-active .dash-nav-item.active::before {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  background: #34d399;
  border-radius: 0 4px 4px 0;
}
#view-customer-dashboard.cdv2-active .cdv2-nav-badge {
  margin-inline-start: auto;
  background: #f43f5e;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}

/* ---------- Logout button (redesigned) ---------- */
#view-customer-dashboard.cdv2-active .dash-logout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 11px;
  background: rgba(244, 63, 94, .12);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, .25);
  border-radius: var(--cdv2-radius);
  font-weight: 600;
  font-size: 14px;
  transition: all .15s;
}
#view-customer-dashboard.cdv2-active .dash-logout-btn:hover {
  background: rgba(244, 63, 94, .22);
  color: white;
  transform: none;
  box-shadow: none;
}

/* ---------- Main area ---------- */
#view-customer-dashboard.cdv2-active .dash-main {
  padding: 28px 36px 60px;
  min-width: 0;
  background: var(--cdv2-bg);
}

/* ---------- Top bar (greeting) ---------- */
#view-customer-dashboard.cdv2-active .dash-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  background: transparent;
  border: none;
  padding: 0;
  height: auto;
  position: static;
  box-shadow: none;
}
#view-customer-dashboard.cdv2-active .cdv2-greeting h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--cdv2-text);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
#view-customer-dashboard.cdv2-active .cdv2-wave {
  display: inline-block;
  animation: cdv2-wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
  font-size: 28px;
}
@keyframes cdv2-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
#view-customer-dashboard.cdv2-active .cdv2-greeting p {
  color: var(--cdv2-text-soft);
  font-size: 14px;
  margin: 4px 0 0;
}
#view-customer-dashboard.cdv2-active .cdv2-badge-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cdv2-emerald-50);
  color: var(--cdv2-emerald-700);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: middle;
}
#view-customer-dashboard.cdv2-active .cdv2-badge-new::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--cdv2-emerald-500);
  border-radius: 50%;
  animation: cdv2-pulse 2s ease-in-out infinite;
}
@keyframes cdv2-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}
#view-customer-dashboard.cdv2-active .cdv2-topbar-actions {
  display: flex; align-items: center; gap: 10px;
}
#view-customer-dashboard.cdv2-active .cdv2-icon-btn {
  width: 42px; height: 42px;
  border-radius: var(--cdv2-radius);
  background: var(--cdv2-card);
  border: 1px solid var(--cdv2-border);
  display: grid; place-items: center;
  color: var(--cdv2-text-soft);
  position: relative;
  transition: all .15s;
  cursor: pointer;
}
#view-customer-dashboard.cdv2-active .cdv2-icon-btn:hover {
  background: var(--cdv2-slate-50);
  color: var(--cdv2-text);
  border-color: var(--cdv2-slate-300);
}
#view-customer-dashboard.cdv2-active .cdv2-icon-btn .cdv2-icon-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: var(--cdv2-rose-500);
  color: white;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  display: grid; place-items: center;
  padding: 0 5px;
  border: 2px solid var(--cdv2-bg);
}

/* ---------- Hero cards (Wallet + Loyalty) ---------- */
#view-customer-dashboard.cdv2-active .cdv2-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-card {
  position: relative;
  border-radius: var(--cdv2-radius-2xl);
  padding: 26px 28px;
  overflow: hidden;
  color: white;
  box-shadow: var(--cdv2-shadow-lg);
  min-width: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -10%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-card.cdv2-wallet {
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 211, 153, .35) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(16, 185, 129, .25) 0%, transparent 60%),
    linear-gradient(135deg, #047857 0%, #064e3b 100%);
}
#view-customer-dashboard.cdv2-active .cdv2-hero-card.cdv2-loyalty {
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, .35) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(245, 158, 11, .2) 0%, transparent 60%),
    linear-gradient(135deg, #92400e 0%, #451a03 100%);
}
#view-customer-dashboard.cdv2-active .cdv2-hero-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  display: grid; place-items: center;
  color: white;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-head h3 {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .02em;
  margin: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-live {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.1);
  padding: 3px 8px;
  border-radius: 999px;
}
#view-customer-dashboard.cdv2-active .cdv2-live::before {
  content: ''; width: 6px; height: 6px;
  background: #34d399; border-radius: 50%;
  box-shadow: 0 0 8px #34d399;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-amount {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 4px;
  display: flex; align-items: baseline; gap: 8px;
  direction: ltr;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-amount .cdv2-hero-num {
  font-size: 44px;
  font-weight: 900;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-amount .cdv2-hero-currency {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
}
#view-customer-dashboard.cdv2-active .cdv2-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin-bottom: 18px;
}
#view-customer-dashboard.cdv2-active .cdv2-hero-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}
#view-customer-dashboard.cdv2-active .cdv2-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
}
#view-customer-dashboard.cdv2-active .cdv2-pill:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-1px);
  color: white;
}
#view-customer-dashboard.cdv2-active .cdv2-pill.cdv2-pill-solid {
  background: white;
  color: var(--cdv2-emerald-800);
  font-weight: 700;
}
#view-customer-dashboard.cdv2-active .cdv2-pill.cdv2-pill-solid:hover {
  background: var(--cdv2-emerald-50);
  color: var(--cdv2-emerald-800);
}
#view-customer-dashboard.cdv2-active .cdv2-points-row {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 4px;
}
#view-customer-dashboard.cdv2-active .cdv2-points-row .cdv2-num {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}
#view-customer-dashboard.cdv2-active .cdv2-points-row .cdv2-unit {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
}
#view-customer-dashboard.cdv2-active .cdv2-progress {
  margin-top: 14px;
  background: rgba(0,0,0,.25);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  position: relative;
}
#view-customer-dashboard.cdv2-active .cdv2-progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #fde68a, #fbbf24, #f59e0b);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(251, 191, 36, .6);
  width: 0%;
  position: relative;
  transition: width 1s ease;
}
#view-customer-dashboard.cdv2-active .cdv2-progress-label {
  display: flex; justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  margin-top: 6px;
  font-weight: 600;
}
#view-customer-dashboard.cdv2-active .cdv2-progress-label .cdv2-remain {
  color: #fde68a;
}

/* ---------- Quick stats (4 cards) ---------- */
#view-customer-dashboard.cdv2-active .cdv2-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
#view-customer-dashboard.cdv2-active .cdv2-stat {
  background: var(--cdv2-card);
  border: 1px solid var(--cdv2-border);
  border-radius: var(--cdv2-radius-lg);
  padding: 18px;
  box-shadow: var(--cdv2-shadow-sm);
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
#view-customer-dashboard.cdv2-active .cdv2-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--cdv2-shadow-md);
  border-color: var(--cdv2-slate-300);
}
#view-customer-dashboard.cdv2-active .cdv2-stat-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
#view-customer-dashboard.cdv2-active .cdv2-stat-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--cdv2-text-soft);
}
#view-customer-dashboard.cdv2-active .cdv2-stat-ico.emerald { background: var(--cdv2-emerald-50); color: var(--cdv2-emerald-600); }
#view-customer-dashboard.cdv2-active .cdv2-stat-ico.amber   { background: var(--cdv2-amber-50);   color: var(--cdv2-amber-600); }
#view-customer-dashboard.cdv2-active .cdv2-stat-ico.blue    { background: var(--cdv2-blue-50);    color: var(--cdv2-blue-600); }
#view-customer-dashboard.cdv2-active .cdv2-stat-ico.violet  { background: var(--cdv2-violet-50);  color: var(--cdv2-violet-600); }
#view-customer-dashboard.cdv2-active .cdv2-trend {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 7px;
  border-radius: 999px;
}
#view-customer-dashboard.cdv2-active .cdv2-trend.up   { color: var(--cdv2-emerald-700); background: var(--cdv2-emerald-50); }
#view-customer-dashboard.cdv2-active .cdv2-trend.down { color: var(--cdv2-rose-600);    background: var(--cdv2-rose-50); }
#view-customer-dashboard.cdv2-active .cdv2-trend.flat { color: var(--cdv2-slate-600);   background: var(--cdv2-slate-100); }
#view-customer-dashboard.cdv2-active .cdv2-stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--cdv2-text);
  display: flex; align-items: baseline; gap: 4px;
}
#view-customer-dashboard.cdv2-active .cdv2-stat-value .cdv2-stat-unit {
  font-size: 13px; font-weight: 600; color: var(--cdv2-text-mute);
}
#view-customer-dashboard.cdv2-active .cdv2-stat-label {
  font-size: 13px; color: var(--cdv2-text-soft); font-weight: 500;
}

/* ---------- Two-col: Actions + Activity ---------- */
#view-customer-dashboard.cdv2-active .cdv2-two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  margin-bottom: 22px;
}
#view-customer-dashboard.cdv2-active .cdv2-panel {
  background: var(--cdv2-card);
  border: 1px solid var(--cdv2-border);
  border-radius: var(--cdv2-radius-xl);
  padding: 22px;
  box-shadow: var(--cdv2-shadow-sm);
  min-width: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  gap: 8px;
}
#view-customer-dashboard.cdv2-active .cdv2-panel-head h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--cdv2-text);
  letter-spacing: -.01em;
  margin: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-panel-head a {
  color: var(--cdv2-emerald-600);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}

/* Quick actions grid */
#view-customer-dashboard.cdv2-active .cdv2-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
#view-customer-dashboard.cdv2-active .cdv2-qa {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--cdv2-slate-50);
  border: 1px solid var(--cdv2-border);
  border-radius: var(--cdv2-radius-lg);
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
#view-customer-dashboard.cdv2-active .cdv2-qa:hover {
  background: white;
  border-color: var(--cdv2-emerald-200);
  transform: translateY(-1px);
  box-shadow: var(--cdv2-shadow-md);
  color: inherit;
}
#view-customer-dashboard.cdv2-active .cdv2-qa .cdv2-qa-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-qa .cdv2-qa-text {
  min-width: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-qa .cdv2-qa-text h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cdv2-text);
  margin: 0 0 2px;
}
#view-customer-dashboard.cdv2-active .cdv2-qa .cdv2-qa-text p {
  font-size: 11.5px;
  color: var(--cdv2-text-mute);
  margin: 0;
}

/* Activity timeline */
#view-customer-dashboard.cdv2-active .cdv2-timeline {
  position: relative;
}
#view-customer-dashboard.cdv2-active .cdv2-tl-item {
  display: flex; gap: 14px;
  padding: 12px 0;
  position: relative;
}
#view-customer-dashboard.cdv2-active .cdv2-tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  right: 19px;
  top: 46px;
  bottom: -10px;
  width: 2px;
  background: var(--cdv2-slate-100);
}
#view-customer-dashboard.cdv2-active .cdv2-tl-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  z-index: 1;
  color: var(--cdv2-text-soft);
}
#view-customer-dashboard.cdv2-active .cdv2-tl-body { flex: 1; min-width: 0; }
#view-customer-dashboard.cdv2-active .cdv2-tl-body .cdv2-tl-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-bottom: 2px;
}
#view-customer-dashboard.cdv2-active .cdv2-tl-body h4 {
  font-size: 14px; font-weight: 700; color: var(--cdv2-text);
  margin: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-tl-body .cdv2-tl-time {
  font-size: 11.5px; color: var(--cdv2-text-mute); font-weight: 500;
  white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .cdv2-tl-body p {
  font-size: 12.5px; color: var(--cdv2-text-soft);
  margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .cdv2-tl-dot.delivery { background: var(--cdv2-emerald-50); color: var(--cdv2-emerald-600); }
#view-customer-dashboard.cdv2-active .cdv2-tl-dot.points   { background: var(--cdv2-amber-50);   color: var(--cdv2-amber-600); }
#view-customer-dashboard.cdv2-active .cdv2-tl-dot.order    { background: var(--cdv2-blue-50);    color: var(--cdv2-blue-600); }
#view-customer-dashboard.cdv2-active .cdv2-tl-dot.support  { background: var(--cdv2-violet-50);  color: var(--cdv2-violet-600); }
#view-customer-dashboard.cdv2-active .cdv2-tl-empty {
  text-align: center;
  color: var(--cdv2-text-mute);
  font-size: 13px;
  padding: 30px 10px;
}

/* ---------- Keys preview ---------- */
#view-customer-dashboard.cdv2-active .cdv2-keys-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card {
  background: linear-gradient(135deg, var(--cdv2-slate-50) 0%, white 100%);
  border: 1px solid var(--cdv2-border);
  border-radius: var(--cdv2-radius-lg);
  padding: 14px;
  position: relative;
  overflow: hidden;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card::before {
  content: '';
  position: absolute;
  inset-inline-start: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cdv2-emerald-400), var(--cdv2-emerald-600));
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-product {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9, #1e40af);
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 12px;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-info {
  min-width: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-info h4 {
  font-size: 13.5px; font-weight: 700; color: var(--cdv2-text);
  margin: 0 0 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-info p {
  font-size: 11px; color: var(--cdv2-text-mute);
  margin: 0;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-lic {
  background: white;
  border: 1px dashed var(--cdv2-slate-300);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 12px;
  color: var(--cdv2-text-soft);
  letter-spacing: .02em;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  direction: ltr;
  text-align: left;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-lic button {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--cdv2-emerald-50);
  color: var(--cdv2-emerald-700);
  display: grid; place-items: center;
  transition: all .15s;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
}
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-lic button:hover { background: var(--cdv2-emerald-100); }
#view-customer-dashboard.cdv2-active .cdv2-keys-empty {
  text-align: center;
  color: var(--cdv2-text-mute);
  font-size: 13px;
  padding: 30px 10px;
  grid-column: 1 / -1;
}

/* ---------- Override summary row in cdv2 mode (hide it, we use our own) ---------- */
#view-customer-dashboard.cdv2-active .dash-summary-row { display: none; }

/* ---------- Override wallet/loyalty to use new hero card design ---------- */
#view-customer-dashboard.cdv2-active .cdv2-wallet-inner,
#view-customer-dashboard.cdv2-active .cdv2-loyalty-inner {
  display: contents;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  #view-customer-dashboard.cdv2-active .dash-layout {
    grid-template-columns: 1fr;
  }
  #view-customer-dashboard.cdv2-active .dash-sidebar {
    position: static;
    height: auto;
    padding: 18px 14px;
  }
  #view-customer-dashboard.cdv2-active .dash-main { padding: 20px 18px 60px; }
  #view-customer-dashboard.cdv2-active .cdv2-stats { grid-template-columns: repeat(2, 1fr); }
  #view-customer-dashboard.cdv2-active .cdv2-two-col { grid-template-columns: 1fr; }
  #view-customer-dashboard.cdv2-active .cdv2-hero-grid { grid-template-columns: 1fr; }
  #view-customer-dashboard.cdv2-active .cdv2-keys-grid { grid-template-columns: 1fr; }
  #view-customer-dashboard.cdv2-active .cdv2-hero-amount,
  #view-customer-dashboard.cdv2-active .cdv2-hero-amount .cdv2-hero-num { font-size: 36px; }
  #view-customer-dashboard.cdv2-active .cdv2-points-row .cdv2-num { font-size: 36px; }
}
@media (max-width: 640px) {
  #view-customer-dashboard.cdv2-active .dash-main { padding: 16px 14px 60px; }
  #view-customer-dashboard.cdv2-active .cdv2-greeting h1 { font-size: 20px; }
  #view-customer-dashboard.cdv2-active .cdv2-wave { font-size: 22px; }
  #view-customer-dashboard.cdv2-active .cdv2-topbar-actions { gap: 6px; }
  #view-customer-dashboard.cdv2-active .cdv2-icon-btn { width: 38px; height: 38px; }
  #view-customer-dashboard.cdv2-active .cdv2-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  #view-customer-dashboard.cdv2-active .cdv2-stat { padding: 14px; }
  #view-customer-dashboard.cdv2-active .cdv2-stat-value { font-size: 22px; }
  #view-customer-dashboard.cdv2-active .cdv2-qa-grid { grid-template-columns: 1fr; }
  #view-customer-dashboard.cdv2-active .cdv2-hero-card { padding: 22px 20px; }
  #view-customer-dashboard.cdv2-active .cdv2-hero-amount,
  #view-customer-dashboard.cdv2-active .cdv2-hero-amount .cdv2-hero-num { font-size: 32px; }
  #view-customer-dashboard.cdv2-active .cdv2-points-row .cdv2-num { font-size: 32px; }
}

/* Customer dashboard typography: all tabs inherit a balanced, more legible
   scale without changing the storefront header or the admin sidebar. */
#view-customer-dashboard .customer-menu-item { font-size: 0.98rem; font-weight: 700; }
#view-customer-dashboard .dash-tab-header h2 { font-size: clamp(1.35rem, 2vw, 1.65rem); font-weight: 800; }
#view-customer-dashboard .dash-tab-header p,
#view-customer-dashboard .cdv2-greeting p,
#view-customer-dashboard .customer-notifications-empty { font-size: 1rem; }
#view-customer-dashboard .dash-card,
#view-customer-dashboard .notification-card,
#view-customer-dashboard .customer-ticket-form,
#view-customer-dashboard .customer-orders-table { font-size: 0.98rem; }
#view-customer-dashboard .customer-orders-table th { font-size: 0.92rem; font-weight: 800; }
#view-customer-dashboard .customer-orders-table td { font-size: 0.98rem; }
#view-customer-dashboard .dash-form-group label,
#view-customer-dashboard .customer-ticket-form label { font-size: 0.95rem; font-weight: 700; }
#view-customer-dashboard .dash-form-group input,
#view-customer-dashboard .dash-form-group textarea,
#view-customer-dashboard .dash-form-group select { font-size: 1rem; }
#view-customer-dashboard .cdv2-quick-label,
#view-customer-dashboard .cdv2-activity-title { font-size: 1rem; font-weight: 750; }
#view-customer-dashboard .cdv2-quick-sub,
#view-customer-dashboard .cdv2-activity-meta { font-size: 0.86rem; }
@media (max-width: 768px) {
  .main-header .nav-link.nav-link-prominent { min-width: 0; flex: 1; }
  #view-customer-dashboard .customer-menu-item { font-size: 0.94rem; }
}

/* Approved desktop header scale: fills the restored white header band with
   a calmer, more proportional logo and controls. */
@media (min-width: 769px) {
  .main-header .header-row-1,
  .main-header .header-top-row.header-row-1 { height: 84px; gap: 20px; }
  .main-header .logo-area.logo { gap: 12px; }
  .main-header .logo-icon { width: 46px; height: 46px; border-radius: 11px; }
  .main-header .logo-icon svg { width: 24px; height: 24px; }
  .main-header .logo-text { font-size: 1.35rem; }
  .main-header .search-wrap { max-width: 500px; }
  .main-header .search-input,
  .main-header .search-wrap .search-input,
  .main-header #store-search.search-input { height: 48px; font-size: 0.96rem; }
  .main-header .customer-auth-btn.icon-btn-text,
  .main-header .lang-selector-btn.icon-btn-text.lang { height: 46px; font-size: 0.92rem; }
  .main-header .customer-auth-btn.icon-btn-text { padding-inline: 20px; }
  .main-header .cart-toggle-btn.icon-btn.cart { width: 48px; height: 48px; }
}

/* --------------------------------------------------------------------------
   Full-width customer workspace
   The storefront is intentionally constrained for comfortable shopping, but
   the signed-in dashboard is an application workspace. Do not inherit the
   storefront's 1200px content cap or its side gutters here.
   -------------------------------------------------------------------------- */
@supports selector(body:has(#view-customer-dashboard.active)) {
  body:has(#view-customer-dashboard.active) .main-content {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 150px);
    margin: 0;
    padding: 0;
  }

  body:has(#view-customer-dashboard.active) .header-container {
    max-width: none;
    padding-inline: clamp(1rem, 3vw, 4rem);
  }
}

/* --------------------------------------------------------------------------
   Customer dashboard type scale
   Keep the hierarchy deliberate: strong titles and figures, readable labels,
   and only a modest lift for supporting copy. This avoids a uniformly heavy
   interface while fixing the thin appearance of Arabic dashboard text.
   -------------------------------------------------------------------------- */
#view-customer-dashboard.cdv2-active .dash-nav-item { font-weight: 600; }
#view-customer-dashboard.cdv2-active .dash-nav-item.active { font-weight: 700; }
#view-customer-dashboard.cdv2-active .dash-logout-btn { font-weight: 700; }
#view-customer-dashboard.cdv2-active .cdv2-profile-name { font-weight: 800; }
#view-customer-dashboard.cdv2-active .cdv2-profile-email { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-greeting p { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-hero-head h3 { font-weight: 700; }
#view-customer-dashboard.cdv2-active .cdv2-hero-sub { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-pill { font-weight: 700; }
#view-customer-dashboard.cdv2-active .cdv2-points-row .cdv2-unit,
#view-customer-dashboard.cdv2-active .cdv2-progress-label { font-weight: 700; }
#view-customer-dashboard.cdv2-active .cdv2-stat-label { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-stat-value .cdv2-stat-unit { font-weight: 700; }
#view-customer-dashboard.cdv2-active .cdv2-panel-head a { font-weight: 700; }
#view-customer-dashboard.cdv2-active .cdv2-qa .cdv2-qa-text p { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-tl-body .cdv2-tl-time { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-tl-body p { font-weight: 600; }
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-info p,
#view-customer-dashboard.cdv2-active .cdv2-key-card .cdv2-key-lic { font-weight: 600; }
