/* ============================================
   KEYZES MARKETPLACE - Theme & Styles
   Colors extracted from brand logos:
   - Dark Navy BG:  #0a0e1a / #0f1423
   - Orange:        #f37920 (warm orange)
   - Amber/Yellow:  #f5a623 / #ffc844
   - Blue:          #1a5bbf (royal blue)
   - Cyan:          #33b5e5 (bright cyan)
   - Gradient Orange: #f37920 -> #ffc844
   - Gradient Blue:   #1a5bbf -> #33b5e5
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1423;
    --bg-card: #141929;
    --bg-card-hover: #1a2035;
    --bg-surface: #111627;
    --bg-input: #141929;

    --orange: #f37920;
    --orange-light: #f5a623;
    --amber: #ffc844;
    --blue: #1a5bbf;
    --blue-light: #2d7fe0;
    --cyan: #33b5e5;

    --gradient-orange: linear-gradient(135deg, #f37920, #ffc844);
    --gradient-blue: linear-gradient(135deg, #1a5bbf, #33b5e5);
    --gradient-brand: linear-gradient(135deg, #f37920, #f5a623, #1a5bbf, #33b5e5);

    --text-primary: #edf0f7;
    --text-secondary: #8892a8;
    --text-muted: #5a6380;

    --border: #1e2540;
    --border-hover: #2a3358;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 90px;
}

.logo-img {
    height: 216px;
    width: auto;
    position: relative;
    z-index: 101;
}

.search-wrapper {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(26, 91, 191, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-auth-nav,
.customer-guest-actions,
.customer-session-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-auth-nav {
    margin-left: auto;
}

.nav-auth-btn {
    padding: 9px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.nav-auth-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.nav-auth-btn-primary {
    background: linear-gradient(135deg, #f37920 0%, #ffca55 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(243, 121, 32, 0.18);
}

.nav-auth-btn-primary:hover {
    border-color: transparent;
    background: linear-gradient(135deg, #f07f2f 0%, #ffd469 100%);
}

.customer-session-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 25, 41, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-primary);
}

.customer-session-account-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.customer-session-avatar,
.mobile-session-avatar,
.account-hero-avatar,
.account-avatar-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.14);
    background: #0f1324;
}

.account-hero-avatar,
.account-avatar-preview {
    width: 72px;
    height: 72px;
}

.customer-session-name {
    font-size: 13px;
    font-weight: 700;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
}

.nav-link:hover {
    color: var(--orange);
    background: var(--bg-card-hover);
}

.nav-link.active {
    color: var(--text-secondary);
}

.nav-link.active:hover {
    color: var(--orange);
}

.cart-link {
    position: relative;
}

.cart-link svg {
    flex-shrink: 0;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border);
}

.mobile-nav.open {
    display: flex;
}

.mobile-search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.mobile-search-wrapper .search-icon {
    left: 14px;
}

.mobile-search-wrapper .search-input {
    width: 100%;
}

.mobile-nav-link {
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

.mobile-nav-link.active {
    color: var(--orange);
}

/* === Hero === */
.hero {
    background: transparent;
    border-bottom: none;
    padding: 0 0 52px;
    text-align: center;
    position: relative;
    overflow: visible;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(243,121,32,0.12) 0%, rgba(26,91,191,0.08) 25%, rgba(15,20,35,0.06) 50%, transparent 75%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 400px;
    height: auto;
    margin-bottom: -100px;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 4px 20px rgba(243,121,32,0.3));
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 460px;
    margin: 0 auto;
}

/* === Main Layout === */
.main {
    padding: 32px 0 60px;
}

.main-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 32px;
    align-items: start;
}

/* === Sidebar === */
.sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: sticky;
    top: 96px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.filter-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--orange);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}

.clear-filters-btn:hover {
    color: var(--amber);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.filter-title svg {
    transition: transform 0.2s;
}

.filter-title.collapsed svg {
    transform: rotate(-90deg);
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.filter-list label:hover {
    color: var(--text-primary);
}

/* Custom checkbox */
.filter-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-hover);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.filter-checkbox:checked {
    background: var(--orange);
    border-color: var(--orange);
}

.filter-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Price filter */
.filter-price {
    padding-top: 4px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.price-field {
    flex: 1;
}

.price-field label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-field input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.price-field input:focus {
    outline: none;
    border-color: var(--blue-light);
}

.price-sep {
    color: var(--text-muted);
    padding-top: 18px;
}

.price-slider {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    margin-bottom: 6px;
}

.price-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--orange);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(243,121,32,0.3);
}

.price-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--orange);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* Mobile filter button */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.mobile-filter-btn:hover {
    border-color: var(--orange);
}

/* === Products Area === */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.sort-select {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--blue-light);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.tab.active {
    background: var(--gradient-orange);
    border-color: transparent;
    color: #fff;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--bg-surface);
    overflow: hidden;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-sale {
    background: var(--orange);
    color: #fff;
}

.badge-new {
    background: var(--blue);
    color: #fff;
}

.badge-hot {
    background: linear-gradient(135deg, #f37920, #e03e3e);
    color: #fff;
}

.product-platform {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    background: rgba(10,14,26,0.8);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan);
}

.product-info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--blue-light);
    margin-bottom: 6px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--orange-light);
}

.price-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.add-cart-btn {
    padding: 8px 14px;
    background: var(--gradient-blue);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.add-cart-btn:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* === Cart View === */
.cart-view {
    min-height: calc(100vh - 90px);
    padding: 40px 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.cart-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-back-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}

.cart-back-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.cart-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: border-color 0.2s;
}

.cart-item:hover {
    border-color: var(--border-hover);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-category {
    font-size: 12px;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.cart-qty-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

.cart-qty-num {
    font-size: 15px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    min-width: 70px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: #e74c3c;
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

.cart-empty svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.cart-empty h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    margin-left: auto;
}

.cart-auth-notice {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(51, 181, 229, 0.24);
    background: rgba(51, 181, 229, 0.08);
}

.cart-auth-notice strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.cart-auth-notice p {
    font-size: 13px;
    color: var(--text-secondary);
}

.cart-auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.cart-summary-row.cart-total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--gradient-orange);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

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

.checkout-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.checkout-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

.cart-badge {
    background: var(--blue);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -6px;
    pointer-events: none;
    box-shadow: 0 0 0 2px var(--bg-primary);
}

/* === Footer === */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.footer-links a {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-bottom {
    padding: 20px 0;
    margin-top: 12px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Filter overlay for mobile */
.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 90;
}

.filter-overlay.open {
    display: block;
}

.mobile-auth-actions,
.mobile-session-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-auth-btn {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.mobile-auth-btn-primary {
    background: var(--gradient-orange);
    border-color: transparent;
    color: #fff;
}

.mobile-session-copy {
    color: var(--text-secondary);
    font-size: 14px;
}

.mobile-session-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    background: rgba(20, 25, 41, 0.95);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    color: var(--text-primary);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .search-wrapper {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 14px;
    }

    .hero {
        padding: 32px 0 36px;
    }

    .hero-logo {
        width: 60px;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Sidebar becomes a drawer on mobile */
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        z-index: 95;
        border-radius: 0;
        overflow-y: auto;
        animation: slideIn 0.3s ease;
    }

    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }

    .sidebar.open {
        display: block;
    }

    .mobile-filter-btn {
        display: flex;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-title {
        font-size: 13px;
    }

    .price-current {
        font-size: 15px;
    }

    .add-cart-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .product-info {
        padding: 10px 12px 12px;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-tabs {
        gap: 4px;
    }

    .tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

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

/* ===================================================
   ADMIN PANEL STYLES
   =================================================== */

/* === Admin Login Modal === */
.admin-login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.admin-login-overlay.open {
    display: flex;
}

.admin-login-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    margin: 20px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.admin-login-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.admin-login-close:hover {
    color: var(--text-primary);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.admin-login-logo {
    width: 56px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 16px rgba(243,121,32,0.25));
}

.admin-login-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.admin-login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.admin-login-form .admin-form-group {
    margin-bottom: 18px;
}

.admin-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.admin-login-form input[type="text"],
.admin-login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-login-form input:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(26,91,191,0.15);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.admin-login-error {
    color: #e74c3c;
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 8px;
}

.admin-login-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-orange);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.admin-login-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.admin-login-btn:active {
    transform: translateY(0);
}

/* === Admin Layout === */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 76px);
}

/* === Admin Sidebar === */
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    overflow-y: auto;
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.admin-sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.admin-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.admin-nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(243,121,32,0.1);
    color: var(--orange);
}

.admin-nav-item.active svg {
    color: var(--orange);
}

.admin-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 14px;
}

.admin-nav-logout {
    color: #e74c3c;
}

.admin-nav-logout:hover {
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
}

/* Mobile admin topbar */
.admin-mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.admin-mobile-sidebar-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.admin-mobile-sidebar-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

.admin-mobile-title {
    font-size: 15px;
    font-weight: 700;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-mobile-back {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.admin-mobile-back:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 89;
}

.admin-sidebar-overlay.open {
    display: block;
}

/* === Admin Content === */
.admin-content {
    padding: 32px;
    min-height: calc(100vh - 76px);
}

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

.admin-section-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.admin-badge {
    padding: 4px 12px;
    background: rgba(26,91,191,0.15);
    color: var(--cyan);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

/* Stats grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.admin-stat-card:hover {
    border-color: var(--border-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-orange { background: rgba(243,121,32,0.12); color: var(--orange); }
.stat-icon-blue { background: rgba(26,91,191,0.12); color: var(--blue-light); }
.stat-icon-cyan { background: rgba(51,181,229,0.12); color: var(--cyan); }
.stat-icon-amber { background: rgba(255,200,68,0.12); color: var(--amber); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Recent products (dashboard) */
.admin-recent h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Admin tables */
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

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

.admin-table thead {
    background: var(--bg-secondary);
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: middle;
}

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

.admin-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.admin-table .table-product-img {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-surface);
}

.admin-table .table-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.table-btn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-secondary);
}

.table-btn:hover {
    border-color: var(--blue-light);
    color: var(--text-primary);
}

.table-btn-edit {
    color: var(--cyan);
    border-color: rgba(51,181,229,0.3);
}

.table-btn-edit:hover {
    background: rgba(51,181,229,0.1);
    border-color: var(--cyan);
}

.table-btn-delete {
    color: #e74c3c;
    border-color: rgba(231,76,60,0.3);
}

.table-btn-delete:hover {
    background: rgba(231,76,60,0.1);
    border-color: #e74c3c;
}

.table-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.table-badge-sale { background: rgba(243,121,32,0.15); color: var(--orange); }
.table-badge-new { background: rgba(26,91,191,0.15); color: var(--blue-light); }
.table-badge-hot { background: rgba(231,76,60,0.15); color: #e74c3c; }

/* Admin toolbar */
.admin-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    flex: 1;
    max-width: 320px;
}

.admin-search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.admin-search-box input {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.admin-search-box input::placeholder {
    color: var(--text-muted);
}

.admin-select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.admin-select:focus {
    outline: none;
    border-color: var(--blue-light);
}

.admin-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 15px;
}

/* Admin buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

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

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

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

.admin-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.admin-btn-outline:hover {
    border-color: var(--blue-light);
    color: var(--cyan);
}

.admin-btn-danger {
    background: rgba(231,76,60,0.12);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.3);
}

.admin-btn-danger:hover {
    background: rgba(231,76,60,0.2);
}

/* === Product Form === */
.admin-product-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 11px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(26,91,191,0.12);
}

.image-preview {
    margin-top: 10px;
    min-height: 20px;
}

.image-preview img {
    max-width: 200px;
    max-height: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* Toggle switch */
.toggle-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

.toggle-input {
    display: none;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.toggle-input:checked + .toggle-switch {
    background: var(--orange);
}

.toggle-input:checked + .toggle-switch::after {
    transform: translateX(20px);
    background: #fff;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Variants Editor */
.variants-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variant-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.variant-row input[type="text"] {
    flex: 1;
}

.variant-row input[type="number"] {
    width: 120px;
}

.variant-remove-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.variant-remove-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

.variant-add-btn {
    align-self: flex-start;
}

/* === Settings === */
.admin-settings-form {
    max-width: 700px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.settings-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.settings-data-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.account-view {
    padding: 36px 0 64px;
}

.account-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.account-side-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: grid;
    gap: 8px;
    position: sticky;
    top: 94px;
}

.account-side-link {
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 12px;
    cursor: pointer;
}

.account-side-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.account-side-link.active {
    border-color: rgba(243, 121, 32, 0.35);
    background: linear-gradient(135deg, rgba(243, 121, 32, 0.18), rgba(255, 202, 85, 0.14));
    color: #ffe0a8;
}

.account-panes {
    min-width: 0;
}

.account-pane {
    display: none;
}

.account-pane.active {
    display: grid;
    gap: 18px;
    animation: accountPaneIn 0.22s ease;
}

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

.account-grid {
    display: grid;
    gap: 18px;
    max-width: none;
}

.settings-card-hero {
    background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(14, 20, 36, 0.95));
}

.account-hero-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.account-hero-name {
    margin: 0 0 4px;
}

.account-balance-grid,
.affiliate-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.account-balance-item {
    border: 1px solid rgba(108, 123, 172, 0.32);
    background: linear-gradient(150deg, rgba(21, 28, 50, 0.9), rgba(11, 17, 31, 0.94));
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-balance-item span {
    font-size: 12px;
    color: #9eaed8;
}

.account-balance-item strong {
    color: #eef3ff;
    font-size: 18px;
}

.account-avatar-editor {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.account-orders-list {
    display: grid;
    gap: 10px;
}

.account-order-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    background: rgba(16, 22, 38, 0.62);
}

.account-order-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.account-order-total {
    color: var(--orange-light);
    font-weight: 700;
}

.account-order-items {
    font-size: 13px;
    color: var(--text-muted);
}

.store-credit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.affiliate-create-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

/* === NEW AFFILIATE REDESIGN === */
.affiliate-section-card {
    padding-bottom: 32px !important;
}

.affiliate-hero-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 20px;
    margin: 24px 0;
    padding: 28px;
    background: linear-gradient(155deg, rgba(45, 52, 90, 0.86), rgba(15, 21, 40, 0.96));
    border: 1px solid rgba(112, 124, 171, 0.35);
    border-radius: 20px;
    align-items: center;
}

.affiliate-hero-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.affiliate-hero-main {
    color: #8cf26f;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.affiliate-hero-sub {
    color: #f8fbff;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.affiliate-code-display {
    border: 2px solid rgba(255, 197, 85, 0.4);
    border-radius: 16px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(52, 42, 19, 0.4), rgba(20, 26, 48, 0.88));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.affiliate-code-label {
    color: #b5c2e6;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.affiliate-code-value-large {
    color: #ffd56d;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 2px;
}

.affiliate-link-display {
    border: 2px solid rgba(107, 157, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(45, 62, 110, 0.4), rgba(20, 26, 48, 0.88));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.affiliate-link-label {
    color: #b5c2e6;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.affiliate-link-input {
    background: #0d1324 !important;
    border: 1px solid rgba(116, 131, 179, 0.46) !important;
    color: #dce4ff !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}

.affiliate-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(15, 22, 40, 0.5);
    border: 1px solid rgba(112, 124, 171, 0.28);
    border-radius: 14px;
}

.affiliate-create-section,
.affiliate-apply-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.affiliate-section-label {
    color: #e5ecff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.affiliate-message-box {
    margin: 12px 0;
    padding: 12px 14px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #c4b5fd;
    font-size: 13px;
    min-height: 20px;
}

.affiliate-user-discount-banner {
    padding: 14px 16px;
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.15), rgba(56, 142, 60, 0.1));
    border: 1px solid rgba(139, 195, 74, 0.3);
    border-radius: 12px;
    color: #c8e6c9;
    font-size: 14px;
    margin: 16px 0;
}

.affiliate-user-discount-banner strong {
    color: #8cf26f;
    font-weight: 700;
}

.affiliate-balance-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(52, 42, 19, 0.56), rgba(14, 20, 35, 0.92));
    border: 1px solid rgba(255, 197, 85, 0.28);
    border-radius: 16px;
    margin: 20px 0;
}

.affiliate-balance-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.affiliate-balance-label {
    color: #b4bfdf;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.affiliate-balance-value {
    color: #fff0cd;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.affiliate-balance-min {
    color: #7a8fa8;
    font-size: 12px;
}

.affiliate-stats-grid-large {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.affiliate-stat-card {
    padding: 20px 16px;
    background: linear-gradient(155deg, rgba(30, 38, 66, 0.9), rgba(12, 18, 34, 0.96));
    border: 1px solid rgba(108, 123, 172, 0.32);
    border-radius: 14px;
    text-align: center;
}

.affiliate-stat-label {
    color: #8e97bf;
    font-size: 12px;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.affiliate-stat-value {
    color: #eef3ff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

/* Old styles cleanup (kept for backward compatibility) */

.affiliate-info-card {
    border: 1px solid rgba(109, 123, 171, 0.34);
    border-radius: var(--radius-md);
    background: linear-gradient(155deg, rgba(24, 31, 55, 0.88), rgba(12, 18, 34, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    padding: 12px;
}

.affiliate-info-card h4 {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #eef4ff;
    text-transform: uppercase;
}

.affiliate-info-card p {
    margin: 0;
    font-size: 12px;
    color: #b5c2e6;
}

.affiliate-toolbar {
    display: flex;
    gap: 8px;
    border: 1px solid rgba(117, 132, 183, 0.34);
    border-radius: 14px;
    padding: 8px;
    background: linear-gradient(160deg, rgba(9, 14, 27, 0.96), rgba(16, 23, 44, 0.88));
    margin-bottom: 12px;
}

.affiliate-tab {
    border: 1px solid transparent;
    background: transparent;
    color: #8895bb;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.affiliate-tab.active {
    color: #f8fbff;
    border-color: rgba(255, 200, 88, 0.4);
    background: linear-gradient(145deg, rgba(106, 72, 22, 0.6), rgba(48, 39, 20, 0.82));
}

.affiliate-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 10px;
    margin-bottom: 12px;
}

.affiliate-promo-card,
.affiliate-empty-card {
    border: 1px solid rgba(112, 124, 171, 0.35);
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(155deg, rgba(39, 46, 82, 0.88), rgba(12, 18, 34, 0.94));
}

.affiliate-promo-card {
    position: relative;
    overflow: hidden;
}

.affiliate-promo-card::before {
    content: '';
    position: absolute;
    inset: -60% -35% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 192, 74, 0.3), rgba(255, 192, 74, 0));
    pointer-events: none;
}

.affiliate-promo-card h4 {
    margin: 0 0 8px;
    color: #fff3cf;
    letter-spacing: 0.1em;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.affiliate-promo-sub {
    margin: 0 0 12px;
    color: #d6def9;
    font-size: 12px;
    line-height: 1.45;
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.affiliate-empty-card {
    display: grid;
    place-content: center;
    text-align: center;
    gap: 7px;
    background: linear-gradient(155deg, rgba(22, 28, 50, 0.86), rgba(9, 14, 27, 0.95));
}

.affiliate-empty-card span {
    color: #e9efff;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.affiliate-empty-card small {
    color: #93a2cd;
    line-height: 1.45;
    max-width: 240px;
    margin: 0 auto;
}

.affiliate-create-row input {
    flex: 1;
    min-width: 0;
    background: var(--bg-input);
    border: 1px solid rgba(112, 127, 173, 0.36);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 14px;
}

.affiliate-code-box {
    border: 1px solid rgba(114, 130, 181, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(15, 22, 40, 0.74);
    flex-wrap: wrap;
}

.affiliate-code-box strong {
    display: block;
    color: #ffd56d;
    font-size: 16px;
}

.affiliate-code-rate {
    color: #8cf26f;
    font-weight: 700;
    font-size: 14px;
}

.affiliate-link-box {
    border: 1px solid rgba(114, 130, 181, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: grid;
    gap: 8px;
    background: rgba(15, 22, 40, 0.74);
}

.affiliate-apply-box {
    border: 1px solid rgba(114, 130, 181, 0.35);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    background: linear-gradient(155deg, rgba(20, 27, 49, 0.86), rgba(11, 17, 31, 0.9));
}

.affiliate-withdrawable-card {
    border: 1px solid rgba(255, 197, 85, 0.28);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(52, 42, 19, 0.56), rgba(14, 20, 35, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 224, 165, 0.08);
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.affiliate-withdrawable-card strong {
    display: block;
    margin-top: 4px;
    color: #fff0cd;
    font-size: 24px;
    line-height: 1;
}

.affiliate-withdrawable-card small {
    color: #b4bfdf;
    font-size: 12px;
}

.affiliate-user-discount {
    margin: -4px 0 12px;
    color: #b7c4e8;
    font-size: 13px;
}

.affiliate-user-discount strong {
    color: #8cf26f;
}

.affiliate-link-box input {
    width: 100%;
    background: #0d1324;
    border: 1px solid rgba(116, 131, 179, 0.46);
    border-radius: var(--radius-md);
    color: #dce4ff;
    padding: 10px 12px;
    font-size: 14px;
}

.affiliate-chart {
    margin-top: 16px;
    margin-bottom: 16px;
    min-height: 260px;
    border: 1px solid rgba(92, 107, 158, 0.22);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 50%, rgba(32, 39, 73, 0.56), rgba(20, 24, 44, 0.96)),
        linear-gradient(90deg, rgba(86, 102, 152, 0.16) 1px, transparent 1px),
        linear-gradient(rgba(86, 102, 152, 0.16) 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
    overflow: hidden;
    position: relative;
}

.affiliate-chart svg {
    width: 100%;
    height: 260px;
    display: block;
}

.affiliate-candle-up {
    fill: #45d8ad;
    stroke: #45d8ad;
}

.affiliate-candle-down {
    fill: #ea5757;
    stroke: #ea5757;
}

.affiliate-pattern-line {
    stroke: #5f66ff;
    stroke-width: 2.4;
    fill: none;
    opacity: 0.9;
}

.affiliate-pattern-label {
    fill: #c7c9db;
    font-size: 14px;
    letter-spacing: 0.06em;
    font-weight: 600;
    opacity: 0.8;
}

.affiliate-withdraw-box {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.account-profile-list {
    display: grid;
    gap: 14px;
}

.account-profile-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(16, 22, 38, 0.62);
}

.account-profile-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.settings-card-danger {
    border-color: rgba(231, 76, 60, 0.35);
}

.account-inline-form {
    max-width: 460px;
}

.import-btn {
    cursor: pointer;
}

/* === Confirm Modal === */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 250;
    justify-content: center;
    align-items: center;
}

.confirm-modal-overlay.open {
    display: flex;
}

.confirm-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    margin: 20px;
    text-align: center;
}

.confirm-modal h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.confirm-modal p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.customer-auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(243,121,32,0.14), transparent 32%),
        radial-gradient(circle at 84% 82%, rgba(51,181,229,0.12), transparent 34%),
        rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(12px);
    z-index: 210;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.customer-auth-overlay.open {
    display: flex;
}

.customer-auth-modal {
    width: min(100%, 980px);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), transparent 22%),
        linear-gradient(180deg, #151b31 0%, #12182b 100%);
    border: 1px solid rgba(86, 104, 155, 0.28);
    border-radius: 26px;
    padding: 38px 38px 34px;
    position: relative;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255,255,255,0.03) inset;
    animation: customerAuthFadeIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.customer-auth-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1fr);
    min-height: 620px;
}

.customer-auth-art {
    position: relative;
    padding: 42px 34px 34px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 200, 68, 0.22), transparent 30%),
        radial-gradient(circle at 80% 82%, rgba(51, 181, 229, 0.18), transparent 32%),
        linear-gradient(165deg, #101729 0%, #0d1324 58%, #0e1830 100%);
    border: 1px solid rgba(88, 107, 160, 0.22);
    overflow: hidden;
}

.customer-auth-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.9;
}

.customer-auth-particles span {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0) 72%);
    filter: blur(0.2px);
    animation: customerParticleFloat 8s ease-in-out infinite;
}

.customer-auth-particles span:nth-child(1) {
    width: 10px;
    height: 10px;
    top: 16%;
    left: 12%;
    animation-delay: 0s;
}

.customer-auth-particles span:nth-child(2) {
    width: 8px;
    height: 8px;
    top: 24%;
    right: 18%;
    animation-delay: 1.1s;
}

.customer-auth-particles span:nth-child(3) {
    width: 6px;
    height: 6px;
    top: 54%;
    left: 20%;
    animation-delay: 2.3s;
}

.customer-auth-particles span:nth-child(4) {
    width: 9px;
    height: 9px;
    top: 66%;
    right: 22%;
    animation-delay: 3.2s;
}

.customer-auth-particles span:nth-child(5) {
    width: 7px;
    height: 7px;
    bottom: 16%;
    left: 34%;
    animation-delay: 4.1s;
}

.customer-auth-particles span:nth-child(6) {
    width: 5px;
    height: 5px;
    top: 38%;
    left: 58%;
    animation-delay: 5s;
}

@keyframes customerParticleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.55;
    }
    50% {
        transform: translateY(-8px) scale(1.1);
        opacity: 1;
    }
}

.customer-auth-art::before {
    content: '';
    position: absolute;
    inset: auto -40px -54px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(243,121,32,0.18), transparent 68%);
    pointer-events: none;
}

.customer-auth-art-logo {
    width: 62px;
    margin-bottom: 24px;
    filter: drop-shadow(0 10px 22px rgba(243,121,32,0.22));
}

.customer-auth-art-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8dd3ff;
}

.customer-auth-art h3 {
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 14px;
}

.customer-auth-art p {
    font-size: 15px;
    line-height: 1.7;
    color: #a3aecb;
    max-width: 28ch;
}

.customer-auth-art-cards {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.customer-auth-art-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(93, 109, 153, 0.24);
    backdrop-filter: blur(6px);
}

.customer-auth-art-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.customer-auth-art-card span {
    color: #9eaaca;
    font-size: 13px;
}

.customer-auth-panel {
    padding: 8px 0 0 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@keyframes customerAuthFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.customer-auth-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(13, 18, 34, 0.75);
    border: 1px solid rgba(72, 84, 120, 0.34);
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s, border-color 0.2s, background 0.2s;
}

.customer-auth-close:hover {
    color: var(--text-primary);
    border-color: rgba(245, 166, 35, 0.35);
    background: rgba(18, 24, 43, 0.95);
    transform: rotate(90deg);
}

.customer-auth-header {
    text-align: center;
    margin-bottom: 18px;
}

.customer-auth-header h2 {
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.customer-auth-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 28ch;
    margin: 0 auto;
}

.customer-auth-meta {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.customer-auth-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(85, 98, 141, 0.26);
    color: #b7c2dd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.customer-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 7px;
    border-radius: 18px;
    background: #0c1120;
    border: 1px solid rgba(58, 69, 103, 0.28);
    margin-bottom: 24px;
}

.customer-verify-box {
    margin: -4px 0 18px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(94, 142, 246, 0.34);
    background: linear-gradient(135deg, rgba(33, 52, 94, 0.5), rgba(24, 37, 68, 0.56));
}

.customer-verify-copy {
    font-size: 13px;
    color: #c4d7ff;
    line-height: 1.5;
    margin-bottom: 10px;
}

.customer-verify-btn {
    border: 1px solid rgba(126, 175, 255, 0.55);
    background: rgba(88, 144, 255, 0.18);
    color: #e7efff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.customer-verify-btn:hover {
    background: rgba(88, 144, 255, 0.3);
    border-color: rgba(142, 188, 255, 0.8);
}

.customer-verify-state {
    margin: 2px 0 18px;
    padding: 24px 18px;
    border-radius: 16px;
    border: 1px solid rgba(107, 151, 255, 0.3);
    background: linear-gradient(140deg, rgba(20, 36, 73, 0.62), rgba(20, 30, 57, 0.66));
    text-align: center;
}

.customer-verify-state-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 1px solid rgba(138, 181, 255, 0.5);
    color: #d6e8ff;
    background: rgba(82, 136, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-verify-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.customer-verify-state p {
    color: #c9daf8;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.55;
}

.customer-verify-state-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.customer-verify-login-btn {
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #f2f5ff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.customer-verify-login-btn:hover {
    background: rgba(255,255,255,0.12);
}

.customer-auth-tab {
    padding: 13px 14px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.customer-auth-tab.active {
    background: var(--gradient-orange);
    color: #fff;
}

.customer-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.customer-auth-form .admin-form-group {
    margin: 0;
}

.customer-auth-form .admin-form-group.has-inline-error label {
    color: #ffb3a7;
}

.customer-auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.customer-input-wrap {
    position: relative;
}

.customer-input-wrap-password input {
    padding-right: 48px;
}

.customer-input-wrap:focus-within .customer-input-icon {
    color: var(--orange-light);
}

.customer-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8190b6;
    pointer-events: none;
}

.customer-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: #7f88a4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.customer-password-toggle:hover {
    color: var(--text-primary);
    border-color: rgba(245, 166, 35, 0.2);
    background: rgba(255,255,255,0.04);
}

.customer-input-wrap:focus-within .customer-password-toggle {
    color: var(--orange-light);
}

.customer-auth-form input {
    width: 100%;
    padding: 14px 14px 14px 46px;
    background: linear-gradient(180deg, #0d1324 0%, #0b1020 100%);
    border: 1px solid #26304f;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.customer-auth-form input::placeholder {
    color: #7f88a4;
}

.customer-auth-form input:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.8);
    box-shadow: 0 0 0 4px rgba(243, 121, 32, 0.14);
    background: #10172c;
}

.customer-auth-form .admin-form-group.has-inline-error input {
    border-color: rgba(238, 97, 82, 0.9);
    box-shadow: 0 0 0 4px rgba(238, 97, 82, 0.12);
}

.customer-auth-form .admin-form-group:last-of-type {
    margin-bottom: 14px;
}

.customer-inline-error {
    min-height: 17px;
    margin-top: 6px;
    font-size: 12px;
    color: #ff9a8b;
    line-height: 1.25;
}

.customer-auth-form .admin-login-btn {
    margin-top: 2px;
    padding: 14px;
    font-size: 16px;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(243,121,32,0.2);
}

.customer-auth-form .admin-login-error {
    min-height: 18px;
    margin: -4px 0 -2px;
}

.customer-auth-link-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 6px;
}

.customer-auth-link-btn {
    border: none;
    background: transparent;
    color: var(--blue-light);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.customer-auth-link-btn:hover {
    color: var(--cyan);
}

.customer-secondary-btn {
    margin-top: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(16, 22, 38, 0.72);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.customer-secondary-btn:hover {
    border-color: var(--border-hover);
}

/* === Toast Notification === */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    max-width: 360px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.toast-success {
    border-left: 4px solid #27ae60;
}

.toast.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast.toast-info {
    border-left: 4px solid var(--cyan);
}

/* === Admin trigger (gear icon in nav) === */
.admin-trigger {
    color: var(--text-muted) !important;
    padding: 8px !important;
}

.admin-trigger:hover {
    color: var(--orange) !important;
}

/* === Product Detail Modal === */
.product-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(51,181,229,0.12), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(243,121,32,0.14), transparent 50%),
        rgba(6, 10, 20, 0.82);
    backdrop-filter: blur(12px);
    z-index: 210;
    justify-content: center;
    align-items: center;
    padding: 26px;
}

.product-modal-overlay.open {
    display: flex;
}

.product-modal {
    background:
        linear-gradient(160deg, rgba(255,255,255,0.02), transparent 45%),
        linear-gradient(180deg, #11172d 0%, #10162a 100%);
    border: 1px solid rgba(84, 115, 196, 0.24);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    animation: modalFadeIn 0.25s ease;
}

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

.product-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(14, 20, 38, 0.7);
    border: 1px solid rgba(74, 102, 171, 0.35);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    line-height: 1;
}

.product-modal-close:hover {
    background: rgba(20, 32, 58, 0.85);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.product-modal-body {
    display: grid;
    grid-template-columns: minmax(360px, 1.08fr) minmax(360px, 1fr);
    gap: 0;
    align-items: stretch;
}

.product-modal-image {
    position: relative;
    background:
        radial-gradient(circle at 20% 16%, rgba(51,181,229,0.18), transparent 44%),
        radial-gradient(circle at 80% 84%, rgba(243,121,32,0.16), transparent 52%),
        linear-gradient(160deg, #0b1120 0%, #111a32 100%);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.product-modal-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(6, 10, 22, 0.5), transparent 34%),
        linear-gradient(to right, transparent 70%, rgba(6, 10, 22, 0.45));
    pointer-events: none;
}

.product-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
}

.product-modal-image .product-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1;
}

.product-modal-info {
    padding: 34px 30px 30px;
    display: flex;
    flex-direction: column;
}

.product-modal-info .product-category {
    margin-bottom: 6px;
    font-size: 16px;
    letter-spacing: 0.12em;
    color: var(--blue-light);
}

.product-modal-info h2 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.product-modal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.product-modal-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 18px;
    max-width: 38ch;
}

.product-modal-warranty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #60a5fa;
    background: linear-gradient(135deg, rgba(18, 34, 68, 0.9), rgba(23, 42, 78, 0.65));
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.product-modal-warranty svg {
    flex-shrink: 0;
    stroke: #60a5fa;
}

.variant-selector {
    margin-bottom: 16px;
}

.variant-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-btn {
    padding: 10px 16px;
    background: rgba(11, 18, 34, 0.9);
    border: 1px solid rgba(70, 87, 132, 0.42);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.variant-btn:hover {
    border-color: rgba(117, 148, 224, 0.6);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.variant-btn.active {
    border-color: rgba(255, 182, 73, 0.95);
    color: #ffb54a;
    background: linear-gradient(135deg, rgba(243,121,32,0.2), rgba(255,200,68,0.08));
    box-shadow: 0 8px 20px rgba(243,121,32,0.12);
}

.variant-orig {
    text-decoration: line-through;
    opacity: 0.55;
    font-size: 12px;
}

.product-modal-pricing {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 4px 0 18px;
    flex-wrap: wrap;
}

.product-modal-pricing .price-current {
    font-size: 52px;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #f3a53e, #ffd061);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-modal-pricing .price-original {
    font-size: 18px;
}

.product-modal-discount {
    padding: 3px 10px;
    background: rgba(243,121,32,0.15);
    color: var(--orange);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
}

.product-modal-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #e58b3e, #f0c34f 85%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(245, 166, 35, 0.28);
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.product-modal-cart-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(245, 166, 35, 0.32);
}

.product-modal-cart-btn:active {
    transform: translateY(0);
}

@media (max-width: 980px) {
    .product-modal {
        max-width: 920px;
    }

    .product-modal-body {
        grid-template-columns: 1fr;
    }

    .product-modal-image {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        min-height: 300px;
    }
}

@media (max-width: 640px) {
    .product-modal-overlay {
        padding: 12px;
    }

    .product-modal-body {
        grid-template-columns: 1fr;
    }

    .product-modal-image {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        min-height: 220px;
    }

    .product-modal-info {
        padding: 20px 16px 16px;
    }

    .product-modal-info h2 {
        font-size: 30px;
    }

    .product-modal-pricing .price-current {
        font-size: 44px;
    }

    .variant-label,
    .product-modal-description,
    .product-modal-warranty {
        font-size: 15px;
    }

    .variant-btn {
        font-size: 13px;
        padding: 9px 14px;
    }

    .product-modal-cart-btn {
        font-size: 16px;
    }
}

/* ===========================
   Admin Responsive
   =========================== */

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

    .admin-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 90;
        animation: slideIn 0.3s ease;
    }

    .admin-sidebar.open {
        display: block;
    }

    .admin-mobile-topbar {
        display: flex;
    }

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

    .admin-section-header h2 {
        font-size: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

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

    .admin-stat-card {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-value {
        font-size: 20px;
    }

    .settings-data-actions {
        flex-direction: column;
    }

    .account-view {
        padding: 24px 0 52px;
    }

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

    .account-side-menu {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 10px;
    }

    .account-side-link {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .account-profile-list > div {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-balance-grid,
    .affiliate-stats-grid,
    .affiliate-stats-grid-large {
        grid-template-columns: 1fr;
    }

    .affiliate-hero-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }

    .affiliate-hero-main {
        font-size: 36px;
    }

    .affiliate-hero-sub {
        font-size: 24px;
    }

    .affiliate-actions-row {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    .affiliate-balance-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .affiliate-code-display,
    .affiliate-link-display {
        width: 100%;
    }

    .affiliate-code-value-large {
        font-size: 32px;
    }

    .affiliate-balance-value {
        font-size: 28px;
    }

    .affiliate-stat-card {
        padding: 16px 12px;
    }

    .affiliate-stat-value {
        font-size: 24px;
    }

    .affiliate-info-grid,
    .affiliate-main-grid {
        grid-template-columns: 1fr;
    }

    .affiliate-toolbar {
        overflow-x: auto;
    }

    .affiliate-tab {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .affiliate-withdrawable-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .affiliate-create-row {
        flex-direction: column;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }

    .customer-auth-modal {
        width: min(100%, 520px);
        padding: 30px 20px 22px;
        border-radius: 22px;
    }

    .customer-auth-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .customer-auth-art {
        padding: 24px 20px;
        margin-bottom: 18px;
    }

    .customer-auth-art h3 {
        font-size: 26px;
    }

    .customer-auth-panel {
        padding: 0;
    }

    .customer-auth-header h2 {
        font-size: 28px;
    }

    .customer-auth-header p {
        font-size: 15px;
    }

    .customer-auth-meta {
        gap: 8px;
        justify-content: center;
    }

    .customer-auth-pill {
        font-size: 10px;
        letter-spacing: 0.06em;
    }

    .cart-auth-actions {
        flex-wrap: wrap;
    }

    .cart-auth-actions .nav-auth-btn {
        flex: 1 1 140px;
    }
}

/* === Image Input Row === */
.image-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.image-input-row input[type="text"] {
    flex: 1;
}

.image-upload-label {
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* === Image Cropper Modal === */
.cropper-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 260;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cropper-overlay.open {
    display: flex;
}

.cropper-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.25s ease;
}

.cropper-header {
    padding: 20px 24px 12px;
}

.cropper-header h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.cropper-canvas-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    overflow: hidden;
    min-height: 200px;
    max-height: 60vh;
}

.cropper-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    border-radius: var(--radius-sm);
}

.cropper-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
}

/* ===========================
   Email Confirmation Overlay
=========================== */

.email-confirm-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(8, 14, 28, 0.72);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.email-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.email-confirm-overlay.closing {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.email-confirm-card {
    text-align: center;
    padding: 48px 32px;
    max-width: 420px;
    width: 100%;
    animation: fadeInUp 0.45s ease;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    z-index: 100000;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.email-confirm-logo {
    height: 52px;
    margin-bottom: 40px;
    object-fit: contain;
}

.email-confirm-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Spinner */
.email-confirm-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid var(--border);
    border-top-color: #f37920;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Icon badge (success / error) */
.email-confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.email-confirm-icon-success {
    background: linear-gradient(135deg, #f37920, #ffc844);
    color: #fff;
    animation: emailConfirmSuccessPop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.email-confirm-icon-error {
    background: var(--bg-card);
    border: 2px solid #e53e3e;
    color: #e53e3e;
}

.email-confirm-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.email-confirm-sub {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 320px;
}

.email-confirm-btn {
    background: linear-gradient(135deg, #f37920, #ffc844);
    color: #fff;
    border: none;
    padding: 15px 44px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.1px;
    transition: opacity 0.2s;
}

.email-confirm-btn:hover {
    opacity: 0.88;
}

.email-confirm-btn-ghost {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.email-confirm-btn-ghost:hover {
    opacity: 1;
    background: var(--bg-card-hover);
}

@keyframes emailConfirmSuccessPop {
    0% {
        transform: scale(0.78);
        opacity: 0;
    }
    65% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}
