/* ==========================================================================
   TITANIUM DIGITAL CATALOG - PREMIUM CSS STYLESHEET
   ========================================================================== */

/* Design Tokens & Variables */
:root {
    --bg-primary: #0b0e14;
    --bg-secondary: #121721;
    --bg-card: rgba(22, 28, 38, 0.65);
    --bg-card-hover: rgba(28, 36, 48, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-active: rgba(0, 210, 255, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #00d2ff;
    --accent-blue-rgb: 0, 210, 255;
    --accent-purple: #7000ff;
    --accent-green: #10b981;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(0, 210, 255, 0.25);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides (optional) */
[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-active: rgba(37, 99, 235, 0.3);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-blue: #2563eb;
    --accent-blue-rgb: 37, 99, 235;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 15px rgba(37, 99, 235, 0.15);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    position: relative;
}

/* Full screen blurred company logo watermark */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('public/images/logo.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 35% auto;
    opacity: 0.035;
    filter: blur(8px);
    z-index: -2;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

[data-theme="light"] body::before {
    opacity: 0.02;
}

/* Glowing Background Decorations */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
    transition: opacity var(--transition-slow);
}

.bg-glow-1 {
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
}

.bg-glow-2 {
    bottom: -100px;
    left: -200px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
}

/* App Container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1rem 5rem 1rem;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.app-header {
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
    position: relative; /* Para posicionar los botones en la esquina */
}

.header-main {
    display: flex;
    justify-content: center; /* Centrar el logo en escritorio */
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
    animation: rotateGear 12s linear infinite;
}

@keyframes rotateGear {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.excel-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-loading {
    background-color: #eab308;
    box-shadow: 0 0 8px #eab308;
    animation: pulse 1.5s infinite alternate;
}

.status-online {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.status-offline {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.selected-items-stat .stat-value {
    color: var(--accent-blue);
}

.total-price-stat .stat-value {
    color: var(--accent-green);
}

.stat-divider {
    width: 1px;
    background-color: var(--border-color);
    height: 80%;
    margin: auto 0;
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 1rem 3rem 1rem 3rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

.search-box input:focus {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
    background: rgba(0, 0, 0, 0.35);
}

.search-box input:focus + .search-icon {
    color: var(--accent-blue);
}

.clear-search-btn {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.clear-search-btn:hover {
    color: #ef4444;
}

/* Tabs */
.view-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.35rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
}

.tab-btn .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Category Filter Container */
.category-filter-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    flex-wrap: wrap;
}

.category-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.category-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Custom scrollbar for Webkit browsers */
.category-list::-webkit-scrollbar {
    height: 4px;
}
.category-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.category-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-body);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.category-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
}

.category-btn.active {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

/* Products Section & Grid */
.products-section {
    min-height: 400px;
    position: relative;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
    color: var(--text-secondary);
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 210, 255, 0.1);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    backdrop-filter: blur(12px);
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 280px 420px;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color-active);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    background: var(--bg-card-hover);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background-color: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.15);
    text-align: center;
    padding: 1rem;
}

.image-placeholder i {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--text-muted), rgba(255,255,255,0.05));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-page-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-details {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.product-code {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.07);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 210, 255, 0.12);
}

.product-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.product-desc {
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.45rem;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.75rem;
}

.price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.15rem;
}

.price-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-green);
}

.min-qty-badge {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Quantity controls inside card */
.card-actions {
    margin-top: 0.75rem;
}

.btn-add-cart {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-add-cart:hover {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.qty-control {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.05);
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 35%;
    padding: 0.75rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color var(--transition-fast);
}

.qty-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
}

.qty-input {
    width: 30%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* No results state */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    gap: 1rem;
}

.no-results i {
    font-size: 3.5rem;
    color: #eab308;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.no-results h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Floating Cart Summary Widget */
.floating-cart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--bg-secondary), #0a0d14);
    border: 1px solid var(--accent-blue);
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 210, 255, 0.25);
    z-index: 99;
    backdrop-filter: blur(16px);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.floating-cart-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.floating-cart-icon {
    position: relative;
    color: var(--accent-blue);
    font-size: 1.4rem;
}

.floating-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.5);
}

.floating-cart-text {
    display: flex;
    flex-direction: column;
}

.floating-cart-total {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-green);
}

.floating-cart-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.floating-cart-btn {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.floating-cart-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
    transform: translateX(3px);
}

/* Modal Drawer Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: opacity var(--transition-normal);
    padding: 1rem;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: transform var(--transition-normal);
    overflow: hidden;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.15);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-title i {
    color: var(--accent-blue);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Customer Information Form */
.customer-info-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.customer-info-form h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.customer-info-form h3 i {
    color: var(--accent-blue);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group .required {
    color: #ef4444;
}

.input-group input,
.input-group select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.input-group select option {
    background-color: #161a23;
    color: var(--text-primary);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

/* Order Summary Receipt Area */
.order-summary-table-container h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.order-summary-table-container h3 i {
    color: var(--accent-blue);
}

.receipt-capture-area {
    background: #0f131a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #f8fafc;
}

.receipt-header {
    text-align: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 1rem;
}

.receipt-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.receipt-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

#receiptClient {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

.summary-table th, .summary-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}

.summary-table th {
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.receipt-footer {
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.receipt-total-row.highlight {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-top: 0.25rem;
}

/* Modal Footer & Buttons */
.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.btn:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-secondary);
}

.btn-info {
    background: rgba(0, 210, 255, 0.08);
    border-color: rgba(0, 210, 255, 0.2);
    color: var(--accent-blue);
}

.btn-info:hover {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.2);
}

.btn-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.btn-success:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-primary {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #059669, #047857);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* SweetAlert customization */
.swal2-popup {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    font-family: var(--font-body) !important;
}

.swal2-title {
    font-family: var(--font-heading) !important;
    color: var(--text-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple)) !important;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3) !important;
}

/* Responsive Rules */
@media (max-width: 768px) {
    .app-container {
        padding-bottom: 6rem;
    }
    
    .company-logo-img {
        max-height: 80px;
        width: 90%;
        height: auto;
    }
    
    .header-main {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .logo-area {
        justify-content: center;
        width: 100%;
    }
    
    .header-actions {
        position: static; /* Restablecer posición absoluta en móviles */
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .floating-cart {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        padding-left: 1rem;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }
}

/* Logo Image styles */
.company-logo-img {
    height: auto;
    max-height: 180px; /* Gran tamaño para abarcar la cabecera */
    width: 75%;
    max-width: 750px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.45));
    transition: all var(--transition-normal);
    display: block;
    margin: 0 auto;
}

.company-logo-img:hover {
    transform: scale(1.015);
    filter: drop-shadow(0 6px 20px rgba(0, 210, 255, 0.3));
}

.receipt-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Modal Table Editing and Clear Cart styles */
.summary-table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.summary-table-header-row h3 {
    margin-bottom: 0 !important;
}

.btn-clear-cart {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all var(--transition-fast);
}

.btn-clear-cart:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.receipt-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.receipt-qty-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

.receipt-qty-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.receipt-qty-val {
    font-family: var(--font-body);
    font-weight: 700;
    min-width: 20px;
    display: inline-block;
}

.receipt-del-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin: 0 auto;
}

.receipt-del-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   AUTHENTICATION OVERLAY (LOGIN)
   ========================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95) 0%, rgba(10, 13, 18, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
}

.login-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6),
                inset 0 0 30px rgba(255, 255, 255, 0.01);
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: loginSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.login-logo-area {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.login-logo-img {
    height: auto;
    max-height: 110px;
    max-width: 90%;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.login-logo-img:hover {
    transform: scale(1.03);
}

.login-title {
    font-family: var(--font-heading);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 2.25rem;
    letter-spacing: -0.5px;
    width: 100%;
}

/* Spinner Loader */
.login-loader-container {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

.login-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: loginSpin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

@keyframes loginSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-loader-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 500;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    width: 100%;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.login-input-group label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-input-group label i {
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.login-input-group input[type="text"],
.login-input-group input[type="password"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.95rem 1.25rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.login-input-group input[type="text"]::placeholder,
.login-input-group input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-input-group input[type="text"]:focus,
.login-input-group input[type="password"]:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.85);
}

/* Password visibility toggle wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3.25rem !important;
}

.toggle-password-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn:hover {
    color: #ffffff;
}

/* Remember me checkbox style */
.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
    width: 100%;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.remember-me-label:hover {
    color: var(--text-primary);
}

.remember-me-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.7);
    display: inline-block;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.remember-me-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.remember-me-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ffffff;
    font-size: 0.75rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-btn {
    margin-top: 0.75rem;
    padding: 0.95rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    justify-content: center;
    background: linear-gradient(90deg, var(--accent-blue), #0066ff) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.25) !important;
    width: 100%;
}

.login-btn:hover {
    background: linear-gradient(90deg, #0066ff, #0044cc) !important;
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.45) !important;
    transform: translateY(-2px);
}

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

.login-error-msg {
    margin-top: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-weight: 500;
    width: 100%;
    animation: loginShake 0.4s ease;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.logout-btn {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.logout-btn i {
    font-size: 0.85rem;
}

/* ==========================================================================
   ADMIN PANEL & PROMOTIONS STYLES
   ========================================================================== */

/* Admin Button */
.admin-btn {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.25);
    color: var(--accent-blue);
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.admin-btn:hover {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.25);
}

/* Seller Catalog Download Button */
.catalog-download-btn {
    background: rgba(16, 185, 129, 0.09);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.catalog-download-btn:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.catalog-download-btn i {
    color: #ef4444;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.catalog-download-btn:hover i {
    color: #ffffff;
}

/* Admin Modal specific styles */
.admin-modal-content {
    max-width: 1200px !important;
    width: 96vw !important;
    max-height: 92vh !important;
    background: rgba(18, 24, 38, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.admin-modal-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
    padding: 1.25rem 1.5rem 2rem !important;
    flex-grow: 1 !important;
}

/* Sticky Navigation bar for Admin Tabs with side scroll arrows */
.admin-tabs-nav-wrapper {
    position: sticky !important;
    top: -1.25rem !important;
    z-index: 30 !important;
    background: rgba(18, 24, 38, 0.98) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.6rem 0.25rem 0.8rem !important;
    margin: -0.25rem 0 1.25rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.admin-tabs-scroll-btn {
    background: rgba(0, 210, 255, 0.15);
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: var(--accent-blue);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    z-index: 2;
}

.admin-tabs-scroll-btn:hover {
    background: var(--accent-blue);
    color: #000000;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    transform: scale(1.05);
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    flex-grow: 1;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto !important;
    scrollbar-color: #00d2ff rgba(0, 0, 0, 0.7) !important;
    padding-bottom: 0.4rem;
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

.admin-tabs::-webkit-scrollbar {
    height: 10px !important;
}

.admin-tabs::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-tabs::-webkit-scrollbar-thumb {
    background: #00d2ff !important;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.admin-tabs::-webkit-scrollbar-thumb:hover {
    background: #38bdf8 !important;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.9);
}

.admin-tab-btn {
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.admin-tab-btn.active {
    color: #ffffff;
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

.admin-tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.admin-tab-content.active {
    display: block;
}

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

.admin-tab-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

/* Supabase Config Form styling */
.config-instructions {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.config-save-btn {
    margin-top: 1rem;
    width: auto;
    padding: 0.75rem 1.5rem;
}

/* Upload drag and drop zone styling */
.upload-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.03);
    box-shadow: inset 0 0 15px rgba(0, 210, 255, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.upload-dropzone:hover .upload-icon,
.upload-dropzone.dragover .upload-icon {
    color: var(--accent-blue);
    transform: translateY(-3px);
}

.upload-dropzone p {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-file-limit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* File Preview */
.selected-file-preview {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    width: 100%;
}

.preview-img-container {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.preview-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    word-break: break-all;
    max-width: 350px;
}

.preview-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.upload-submit-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem !important;
}

/* Promos grid in admin */
.promos-list-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    gap: 1rem;
}

.promos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    width: 100%;
}

.no-promos {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.no-promos i {
    font-size: 2rem;
    color: var(--text-muted);
}

.promo-item-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-fast);
}

.promo-item-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.promo-item-img-container {
    width: 100%;
    padding-top: 60%;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.promo-item-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.promo-item-actions {
    padding: 0.5rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
}

.promo-item-product-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 6px;
    color: var(--accent-blue);
    font-family: var(--font-heading);
    font-weight: 600;
}

.promo-item-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.promo-item-date {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.promo-item-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.promo-edit-prod-btn {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.25);
    color: var(--accent-blue);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

.promo-edit-prod-btn:hover {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.promo-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

.promo-delete-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   PUBLIC RANDOM PROMOTIONS POPUP OVERLAY
   ========================================================================== */
#promoModal.modal-overlay {
    z-index: 10005; /* higher than anything else */
    background: rgba(10, 13, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.promo-modal-content {
    background: linear-gradient(135deg, rgba(22, 28, 38, 0.95) 0%, rgba(12, 16, 22, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 210, 255, 0.15);
    position: relative;
    text-align: center;
    animation: promoPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

@keyframes promoPopIn {
    0% { opacity: 0; transform: scale(0.7) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.promo-close-x {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.promo-close-x:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.promo-body {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

#promoImage {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform var(--transition-slow);
}

.promo-modal-content:hover #promoImage {
    transform: scale(1.02);
}

/* Promotional Product Card inside Promo Modal */
.promo-product-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.promo-product-info {
    flex: 1;
    min-width: 0;
}

.promo-product-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.promo-product-code {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 210, 255, 0.25);
    letter-spacing: 0.5px;
}

.promo-min-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.promo-product-desc {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.promo-product-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.promo-price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.promo-price-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: #10b981;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.promo-footer {
    width: 100%;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.promo-add-cart-btn {
    flex: 1.2;
    min-width: 160px;
    padding: 0.85rem 1rem !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    background: linear-gradient(90deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35) !important;
    cursor: pointer;
    transition: all var(--transition-fast) !important;
}

.promo-add-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55) !important;
}

.promo-dismiss-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.85rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast) !important;
}

.promo-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
    transform: translateY(-1px);
}

.promo-dismiss-btn.full-width {
    flex: 1;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #0066ff) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25) !important;
}

/* ==========================================================================
   ADMIN ORDERS & GENERAL TABLES STYLES & CONTROLS
   ========================================================================== */

/* Interactive Navigation Arrows for all Admin Tables */
.table-scroll-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
}

.table-scroll-hint {
    font-size: 0.78rem;
    font-weight: 700;
    color: #00d2ff;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
    letter-spacing: 0.2px;
}

.btn-table-scroll {
    background: rgba(0, 210, 255, 0.2);
    border: 1px solid rgba(0, 210, 255, 0.5);
    color: #00d2ff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-table-scroll:hover {
    background: #00d2ff;
    color: #000000;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.7);
    transform: scale(1.08);
}

.btn-table-scroll:active {
    transform: scale(0.95);
}

/* Ensure flex parents do not expand beyond container width */
.admin-tab-content,
.ranking-controls-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.orders-table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: scroll !important;
    overflow-y: auto !important;
    max-height: 54vh !important;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    border: 2px solid rgba(0, 210, 255, 0.35) !important;
    background: rgba(10, 15, 26, 0.75) !important;
    scrollbar-width: auto !important;
    scrollbar-color: #00d2ff rgba(0, 0, 0, 0.8) !important;
    -webkit-overflow-scrolling: touch;
    cursor: default;
}

.orders-table-wrapper.is-dragging {
    cursor: grabbing !important;
    user-select: none !important;
}

.orders-table-wrapper::-webkit-scrollbar {
    height: 14px !important;
    width: 10px !important;
}

.orders-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.orders-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #00d2ff, #0077ff) !important;
    border-radius: 7px;
    border: 2px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.8);
}

.orders-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(0, 210, 255, 1);
}

.admin-orders-table {
    margin-top: 0;
    border-collapse: collapse;
    width: 100%;
    min-width: 850px;
}

.admin-orders-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #111827 !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .admin-orders-table thead th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

.admin-orders-table td {
    vertical-align: middle;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #ffffff;
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.status-select:focus {
    border-color: var(--accent-blue);
}

.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pendiente {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.status-proceso {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 210, 255, 0.25);
}

.status-entregado {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.action-btn-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.order-action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.order-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--accent-blue);
}

.order-action-btn.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.order-action-btn.btn-sync:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.order-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    text-align: left;
}

.order-details-table th, .order-details-table td {
    padding: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.order-details-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
}

/* Floating Search Box for Seller Accounts */
.floating-search-container {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    width: 92%;
    max-width: 480px;
    z-index: 10005; /* Asegurar que esté por encima de la barra flotante del carrito y otros elementos */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.floating-search-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.floating-search-container .search-box {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 210, 255, 0.25);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px) saturate(120%);
    transition: box-shadow var(--transition-fast);
}

.floating-search-container .search-box:focus-within {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent-blue), var(--shadow-glow);
}

/* Seller Client Name Group style */
#sellerClientNameGroup {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    animation: fadeIn 0.3s ease-out;
}

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

/* Stats Bar inside controls panel (moved from header) */
.controls-panel .stats-bar {
    padding: 0.6rem 1rem;
    border-radius: 30px; /* Matching the search bar roundedness */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}
.controls-panel .stats-bar .stat-value {
    font-size: 1.15rem;
}
.controls-panel .stats-bar .stat-label {
    font-size: 0.65rem;
    margin-top: 0.15rem;
}
.controls-panel .stats-bar .stat-divider {
    height: 60%;
}

/* Highlight searched product card animation */
@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px 12px rgba(0, 210, 255, 0.45);
        transform: scale(1.025);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
        transform: scale(1);
    }
}

.product-card.highlight-pulse {
    animation: highlightPulse 2.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-color: var(--accent-blue) !important;
    z-index: 10;
    position: relative;
    content-visibility: visible !important;
}

/* ==========================================================================
   ADMIN SALES STATISTICS - PERIOD SELECTOR & TABS
   ========================================================================== */
.stats-period-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
}

.stats-period-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stats-period-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.stats-period-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.stats-period-btn.active {
    color: #ffffff;
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.2);
}

.stats-period-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stats-dropdown-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.stats-period-select {
    background: rgba(11, 14, 20, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.stats-period-select:focus {
    border-color: var(--accent-blue);
}

.stats-period-select option {
    background-color: #121721;
    color: #f8fafc;
}

/* ==========================================================================
   PRODUCT SALES RANKING SECTION STYLES
   ========================================================================== */

.ranking-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.ranking-controls-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.15rem;
    margin-bottom: 1.25rem;
}

[data-theme="light"] .ranking-controls-card {
    background: rgba(255, 255, 255, 0.85);
}

.ranking-filters-grid {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ranking-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ranking-filter-group label {
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.5px;
}

.ranking-period-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.ranking-sort-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.ranking-sort-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--transition-fast);
}

.ranking-sort-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.ranking-sort-btn.active {
    background: rgba(0, 210, 255, 0.18);
    border-color: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.ranking-search-group {
    flex: 1;
    min-width: 240px;
}

.ranking-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.ranking-search-box .search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.ranking-search-box input {
    width: 100%;
    padding: 0.52rem 2.2rem 0.52rem 2.2rem;
    background: rgba(11, 14, 20, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

[data-theme="light"] .ranking-search-box input {
    background: #ffffff;
}

.ranking-search-box input:focus {
    border-color: var(--accent-blue);
}

.ranking-search-box .clear-search-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    font-size: 0.85rem;
}

.ranking-summary-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: rgba(0, 210, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.18);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.ranking-summary-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.ranking-summary-item .label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.ranking-summary-item strong {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
}

.ranking-section-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Podium styling */
.ranking-podium-container {
    margin-bottom: 2rem;
}

.ranking-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

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

.podium-card {
    background: rgba(22, 28, 38, 0.65);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="light"] .podium-card {
    background: #ffffff;
}

.podium-card:hover {
    transform: translateY(-3px);
}

.podium-card-1 {
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.15);
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.08) 0%, rgba(22, 28, 38, 0.75) 100%);
    order: 1;
}

.podium-card-2 {
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.06) 0%, rgba(22, 28, 38, 0.75) 100%);
    order: 0;
}

.podium-card-3 {
    border-color: rgba(217, 119, 6, 0.45);
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.12);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.06) 0%, rgba(22, 28, 38, 0.75) 100%);
    order: 2;
}

.podium-badge {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

.podium-badge-1 {
    background: rgba(234, 179, 8, 0.25);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.5);
}

.podium-badge-2 {
    background: rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.podium-badge-3 {
    background: rgba(217, 119, 6, 0.25);
    color: #fb923c;
    border: 1px solid rgba(217, 119, 6, 0.5);
}

.podium-img-wrapper {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.podium-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.podium-code {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.4rem;
    align-self: flex-start;
}

.podium-desc {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    min-height: 2.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podium-stats-row {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.podium-metric-val {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

[data-theme="light"] .podium-metric-val {
    color: #0f172a;
}

.podium-metric-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Table styling for ranking */
.ranking-table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ranking-count-badge {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.82rem;
}

.rank-badge-1 {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #000;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

.rank-badge-2 {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #000;
}

.rank-badge-3 {
    background: linear-gradient(135deg, #f97316, #c2410c);
    color: #fff;
}

.rank-badge-default {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 600;
}

.rank-thumb-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
}

[data-theme="light"] .rank-thumb-wrapper {
    background: rgba(0, 0, 0, 0.05);
}

.rank-thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.rank-thumb-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.rank-units-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.rank-units-val {
    font-weight: 700;
    color: var(--text-primary);
}

.rank-progress-track {
    width: 80px;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

[data-theme="light"] .rank-progress-track {
    background: rgba(0, 0, 0, 0.08);
}

.rank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #10b981);
    border-radius: 4px;
}

.ranking-access-btn {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.18) 0%, rgba(112, 0, 255, 0.18) 100%);
    border-color: rgba(0, 210, 255, 0.35);
}

.ranking-access-btn:hover {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.28) 0%, rgba(112, 0, 255, 0.28) 100%);
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.pending-carts-access-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.18) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.pending-carts-access-btn:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.28) 100%);
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   CLIENTS MANAGEMENT & SELLER TOGGLE STYLES
   ========================================================================== */

.seller-role-toggle-card {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 0.85rem 1.15rem;
    margin-top: 0.5rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.seller-role-toggle-card:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.5);
}

.seller-switch-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.seller-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seller-switch-slider {
    position: relative;
    width: 46px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.seller-switch-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.seller-switch-input:checked + .seller-switch-slider {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.seller-switch-input:checked + .seller-switch-slider::before {
    transform: translateX(22px);
}

.seller-switch-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.seller-switch-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.35;
}

.seller-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.seller-badge-tag.is-seller {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.seller-badge-tag.is-client {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-toggle-role {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-toggle-role.make-seller {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
}

.btn-toggle-role.make-seller:hover {
    background: #f59e0b;
    color: #000;
}

.btn-toggle-role.remove-seller {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-toggle-role.remove-seller:hover {
    background: #ef4444;
    color: #fff;
}

/* ==========================================================================
   PENDING CARTS MANAGEMENT STYLES
   ========================================================================== */

.pending-carts-tab-badge {
    background: #f59e0b;
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    margin-left: 0.45rem;
    display: inline-block;
    line-height: 1.1;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.btn-whatsapp-cart {
    background: #25D366;
    color: #ffffff;
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp-cart:hover {
    background: #1eb956;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    color: #ffffff;
}

.btn-view-cart {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 210, 255, 0.35);
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-view-cart:hover {
    background: var(--accent-blue);
    color: #000000;
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.btn-clear-client-cart {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-clear-client-cart:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}






