:root {
    --primary-color: #00d2ff;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-red: #ef4444;
    --accent-green: #22c55e;
    --accent-blue: #3b82f6;
    --accent-gold: #eab308;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --text-light: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 20%);
    color: var(--text-light);
    line-height: 1.5;
    background-attachment: fixed;
    font-size: 14px;
    overflow-x: hidden;
    /* Bloqueo de Zoom y Mejoras Mobile */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Skeleton Loader Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Tabla Thumbnails */
.table-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.admin-link-header,
.cart-btn {
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.7rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    text-decoration: none;
    min-width: 44px;
    height: 44px;
}

.admin-link-header ion-icon,
.cart-btn ion-icon {
    font-size: 1.4rem;
}

.admin-link-header:hover,
.cart-btn:hover {
    background: var(--primary-color);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.3);
    border-color: var(--primary-color);
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-red);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Hero Section */
/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(60px);
}

.hero h2 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .hero {
        display: none !important;
        /* Hide red presentation box on mobile */
    }
}

.hero p {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Controls (Search & Filters) */
.controls {
    position: sticky;
    top: 70px;
    z-index: 1900;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--bg-dark);
    padding: 1rem 0;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-container ion-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-container input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.7rem 1rem 0.7rem 2.8rem;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.categories-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.category-pill {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 11px;
    font-weight: 500;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding-bottom: 4rem;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

.product-card {
    background: var(--bg-card);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.3) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1.65;
    /* Balanced height for simplified prices */
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.1);
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 0.75rem;
    /* ~12px */
    margin-bottom: 0.2rem;
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    color: var(--text-light);
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.product-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-add-simple {
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-add-simple:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* Botón Principal (Nuevo Producto) */
/* Botón Principal (Nuevo Producto) */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: var(--transition) !important;
    width: auto !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4) !important;
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Botón Agregar (Storefront) */
.btn-add {
    width: 100%;
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: var(--primary-color);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 6000;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    border-radius: 6px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.cart-item-info p {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.btn-qty {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.free-shipping-bar {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

#shipping-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

#checkout-btn {
    background: var(--accent-green) !important;
    color: white !important;
    font-size: 1rem !important;
    padding: 1rem !important;
    width: 100% !important;
    border-radius: 15px !important;
    font-weight: 700 !important;
    margin-top: 1rem !important;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#checkout-btn:hover {
    background: #0ea571 !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
}

/* Styled Table Action Buttons */
.btn-action-list {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-list ion-icon {
    font-size: 1.1rem;
}

.btn-action-list:hover {
    background: var(--primary-color);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.2);
    border-color: var(--primary-color);
}

.btn-action-list.delete:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 30px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.btn-close-modal {
    position: absolute !important;
    right: 1.2rem !important;
    top: 1.2rem !important;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-close-modal:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-close-modal ion-icon {
    font-size: 1.4rem;
    pointer-events: none;
}



.modal-body,
#admin-info-view .info-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: stretch;
}

.modal-image-container,
.info-image-side {
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    overflow: hidden;
}

#modal-product-image,
#info-img,
#edit-img-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

#modal-view-mode,
#modal-edit-mode {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}

#modal-add-btn,
#modal-save-btn {
    margin-top: auto !important;
}

/* Admin Dashboard Layout */
.admin-dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-dark);
}

.logo {
    padding: 1rem 0.5rem 2rem;
    text-align: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--primary-color);
}

/* Admin Layouts */
.order-creation-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 2rem;
}

.order-summary-card {
    position: sticky;
    top: 1rem;
    height: fit-content;
}

.product-add-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.scheduled-form-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    height: 100vh;
    /* Altura fija para scroll independiente */
    position: sticky;
    top: 0;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.admin-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.admin-main {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    height: 100vh;
    /* Altura fija para scroll independiente */
    position: relative;
    background: var(--bg-dark);
}

/* --- Layout Compresión & Sticky para Escritorio --- */
.admin-sticky-top {
    position: sticky;
    top: -1.5rem;
    /* Ajuste para contraer un poco el margen del padre */
    z-index: 1000;
    background: var(--bg-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
}

.stat-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.view-products-search {
    margin-bottom: 0.8rem;
}

.admin-products-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    /* Reduced padding for better visibility */
}

.product-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.admin-product-card {
    background: var(--bg-card);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.3) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.admin-product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg);
}

.admin-product-info {
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-p-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    height: 2.3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.admin-p-price {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Sidebar Fix UI */
.admin-sidebar nav {
    padding: 1rem 0;
}

.admin-sidebar .category-pill {
    width: 100%;
    min-height: 48px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    text-align: left;
    line-height: 1.2;
}

.admin-sidebar .category-pill ion-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.admin-sidebar .category-pill.active {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

/* Overlay Buttons Admin */
.admin-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.50rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.admin-product-card.show-options .admin-card-overlay {
    opacity: 1;
    pointer-events: all;
}

.btn-overlay {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    background: white;
    color: var(--bg-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-overlay.btn-view:hover {
    background: var(--primary-color);
    color: white;
}

.btn-overlay.btn-edit:hover {
    background: var(--accent-green);
    color: white;
}

.btn-overlay.btn-delete:hover {
    background: var(--accent-red);
    color: white;
}

/* Image Preview Modal */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.image-preview-container {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-preview-close:hover {
    transform: rotate(90deg) scale(1.2);
}

@keyframes zoomIn {
    to {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Toast Notifications (Top-Right & Compact) */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    /* Let clicks pass through if not interacting with toast */
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: toastIn 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- View Helpers & Layouts (Desktop First / Global) --- */
.view-header-actions,
.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-rows-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.summary-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

/* Premium Global Styles for Admin Containers */
.view-header-actions,
.dashboard-controls,
.dashboard-list-card,
.kpi-grid,
.stats-cards-container {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.summary-box,
.order-summary-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(15px);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

/* Desktop Specific Layouts */
.view-header-actions,
.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.kpi-grid,
.stats-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 0.6rem !important;
    padding: 0.6rem !important;
}

/* KPI Card Styles for Desktop */
.kpi-card {
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    padding: 0.6rem 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem !important;
    transition: all 0.2s ease !important;
    min-height: auto !important;
    height: auto !important;
}

.kpi-card:hover {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) !important;
}

.kpi-card span {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
}

.kpi-card h3 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: white !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* Extra specificity for KPI numbers */
.kpi-grid .kpi-card h3,
#kpi-orders,
#kpi-delivered,
#kpi-pending,
#kpi-sales,
#kpi-profit,
#kpi-paid,
#kpi-balance {
    font-size: 14px !important;
}

/* Fix for horizontal filters in dashboard/reports */
.dashboard-controls,
.view-header-actions:has(.summary-rows-container) {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
    gap: 2rem !important;
}

.dashboard-controls>.summary-rows-container,
.view-header-actions>.summary-rows-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 2rem !important;
    width: auto !important;
}

.dashboard-controls .summary-row,
.view-header-actions .summary-row {
    width: auto !important;
    gap: 1.5rem !important;
}

/* Force summary boxes to be compact on desktop if they are sidebars */
.order-summary-card,
.summary-box {
    max-width: 400px;
}

.order-creation-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.scheduled-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

/* Mobile Menu & Sidebar Overlay */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 0.8rem;
    left: 1rem;
    z-index: 5000;
    background: var(--primary-color);
    padding: 0.6rem;
    border-radius: 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 5500;
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 6000;
        transition: left 0.3s;
        overflow-y: auto;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .date-group {
        width: 100%;
    }

    .date-input {
        width: 100%;
    }

    .admin-header,
    .view-header-actions,
    .dashboard-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.2rem !important;
        padding: 1.5rem 2rem !important;
    }

    /* Force all nested flex groups to stack on mobile */
    .summary-rows-container,
    .view-header-actions .summary-rows-container>div,
    .dashboard-controls .summary-rows-container>div,
    .summary-row {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 1.2rem !important;
    }

    /* Mobile KPI reorganization to fit 3 in a row */
    .kpi-grid,
    .stats-cards-container {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 0.4rem !important;
        padding: 0 !important;
        display: grid !important;
    }

    .kpi-card {
        padding: 0.5rem 0.2rem !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.2rem !important;
        justify-content: center;
        text-align: center;
        min-height: 55px;
        /* Altura mínima consistente */
    }

    .kpi-card span {
        font-size: 10px !important;
        line-height: 1.1 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    .kpi-card h3 {
        font-size: 12px !important;
        margin: 0 !important;
    }

    .order-summary-card,
    .summary-box {
        max-width: 100% !important;
    }

    .order-creation-area,
    .scheduled-form-grid {
        grid-template-columns: 1fr !important;
    }

    .view-header-actions h2 {
        font-size: 1.4rem !important;
    }

    .admin-header p {
        font-size: 11px !important;
        max-width: 100% !important;
    }

    /* Buttons container in mobile header */
    .admin-header>div:last-child {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 0.8rem !important;
    }

    .btn-logout-header,
    .main-add-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 0.7rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .admin-sticky-top {
        display: none !important;
        /* Totalmente oculta en móvil para ganar espacio */
    }

    .admin-main {
        padding: 1rem;
        padding-top: 2rem !important;
        /* Espacio para que el contenido no pegue arriba */
    }

    .admin-main {
        padding: 1rem;
    }

    /* Global Mobile Layout Enforcements */
    body,
    html,
    .admin-main,
    .view-container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .mobile-hidden {
        display: none !important;
    }

    /* Hide Table Headers on Mobile (Only if explicitly tagged) */
    .mobile-hidden {
        display: none !important;
    }

    /* Restore Standard Tables with Horizontal Scroll */
    .admin-table-container {
        overflow-x: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
        display: block !important;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.02);
    }

    table {
        min-width: 700px !important;
        /* Force width for scroll */
        border-collapse: collapse;
    }

    thead {
        display: table-header-group !important;
    }

    tbody tr {
        display: table-row !important;
    }

    tbody td {
        display: table-cell !important;
        text-align: left !important;
        padding: 0.6rem 0.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        white-space: nowrap;
        font-size: 12px !important;
    }

    tbody td::before {
        content: none !important;
    }

    /* Enforce 1 column on mobile admin grid */
    .admin-products-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .admin-p-name {
        font-size: 12px !important;
    }

    .admin-p-price {
        font-size: 12px !important;
    }

    /* Refinamientos para Pedidos y Agendados */
    .order-creation-area,
    .scheduled-form-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Force all children inside these grids to be full width */
    .order-creation-area>*,
    .scheduled-form-grid>* {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Stack all flex rows inside forms */
    .form-section>div[style*="flex"],
    .order-form>div[style*="flex"],
    .scheduled-form-grid>div>div[style*="flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .form-section>div[style*="flex"]>*,
    .order-form>div[style*="flex"]>* {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .order-form,
    .form-card-container {
        max-height: none !important;
        overflow: visible !important;
        padding: 1.2rem 1.5rem !important;
        width: 100% !important;
        background: rgba(15, 23, 42, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: var(--radius-md) !important;
        backdrop-filter: blur(10px);
        box-sizing: border-box !important;
    }

    /* Ensure form sections inside have no double padding */
    .form-section {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .dashboard-list-card,
    .summary-box,
    .order-summary-card,
    .stats-cards-container {
        position: static !important;
        width: 100% !important;
        margin-top: 1.5rem !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* Standard titles for unified containers */
    .kpi-grid h3,
    .stats-cards-container h3,
    .dashboard-list-card h3 {
        margin-bottom: 0.5rem !important;
    }

    .kpi-card,
    .dashboard-card {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    /* Unified Header for Summaries */
    .summary-box h3,
    .summary-box h4,
    .order-summary-card h3 {
        margin-bottom: 1.2rem !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        color: var(--primary-color) !important;
        text-align: left;
    }

    /* New Utility for Payment/Summary rows */
    .summary-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        gap: 0.8rem !important;
    }

    /* Container for rows to enforce gap */
    .summary-rows-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.8rem !important;
        width: 100% !important;
    }

    .summary-row span {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .summary-row .date-input {
        width: auto !important;
        max-width: 120px !important;
        padding: 0.5rem !important;
        text-align: right !important;
    }

    .summary-row strong {
        text-align: right;
        flex-grow: 1;
        margin-left: 0.5rem;
    }

    .product-add-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .product-add-row>div,
    .product-add-row>button {
        flex: none !important;
        width: 100% !important;
    }

    /* Fix para el botón de menú */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: var(--primary-color) !important;
        color: var(--bg-dark) !important;
        width: 45px;
        height: 45px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
        font-size: 1.5rem;
    }

    .admin-mobile-header {
        padding: 0.8rem 1.2rem;
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Stacking Global Mobile */
    .view-header-actions,
    .dashboard-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    .view-header-actions>div,
    .view-header-actions>button,
    .dashboard-controls>div,
    .dashboard-controls>button {
        width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }

    .admin-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-bottom: 1rem;
        width: calc(100% + 1rem) !important;
    }

    .admin-table-container table {
        min-width: 700px !important;
    }
}

/* Sidebar Stats Refinement (Batch 3) */
.sidebar-stats-consolidated {
    padding: 0 1rem;
    margin-top: 2rem;
}

.stat-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-summary-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

/* Row backgrounds based on content */
.stat-summary-item:nth-child(1) {
    background: rgba(0, 210, 255, 0.08);
    border-color: rgba(0, 210, 255, 0.15);
}

.stat-summary-item:nth-child(2) {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
}

.stat-summary-item:nth-child(3) {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
}

.stat-summary-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-summary-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 11px;
    color: white;
    font-weight: 500;
}

.stat-value {
    font-size: 13px;
    font-weight: 700;
    color: white;
}

/* Sidebar Stats Refinement (Batch 4: Always visible in sidebar) */
.sidebar-stats-consolidated {
    padding: 0 1rem;
    margin-top: 2rem;
}

/* Mobile Modal Enhancements */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }

    #admin-info-view .info-content,
    .modal-body {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .modal-image-container,
    #info-img,
    #edit-img-preview,
    #modal-product-image {
        width: 100% !important;
        max-width: 250px !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
    }

    /* Fix stacking for upload button and status */
    .modal-info div[style*="display: flex; gap: 0.8rem; align-items: center;"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    #upload-status {
        margin-left: 0 !important;
        font-style: italic;
    }

    /* Wide buttons for better touch targets */
    #save-admin-btn,
    .btn-primary[for="upload-image-input"] {
        width: 100% !important;
        padding: 1rem !important;
    }
}

/* Category Text-Only Fix */
#info-category {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: none !important;
}

/* Global Product Square Image Force */
.product-image,
.product-img-wrapper {
    aspect-ratio: 1/1 !important;
    width: 100% !important;
    object-fit: contain !important;
    background: white;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.btn-logout-header {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
}

.btn-logout-header:hover {
    background: var(--accent-red);
    color: white;
}

.edit-input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 0.6rem !important;
    border-radius: 8px !important;
    outline: none !important;
    font-size: 12px !important;
}

.edit-input option {
    background: #1e293b !important;
    color: white !important;
    padding: 10px;
}

/* Footer Styles */
footer {
    background: var(--bg-card);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, white, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-wa-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #25d366;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.footer-wa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

.footer-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Star Toggle for Admin */
.star-toggle {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    z-index: 100 !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(4px) !important;
}

.star-toggle.active {
    background: var(--primary-color) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5) !important;
}

.star-toggle:hover {
    transform: scale(1.1);
    background: rgba(0, 210, 255, 0.2);
}

/* Featured Carousel Styles */
.featured-carousel {
    max-width: 900px;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 350px;
    /* Slightly shorter */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 2rem 4rem;
    gap: 3rem;
    cursor: pointer;
    overflow: hidden;
}

.carousel-slide img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.slide-content {
    flex: 1;
}

.slide-tag {
    background: var(--primary-color);
    color: var(--bg-dark);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
}

.slide-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    max-width: 500px;
    display: block;
}

@media (max-width: 768px) {
    .slide-description {
        display: none !important;
        /* Hide description on mobile */
    }
}

.slide-content h2 {
    font-size: 1.5rem;
    margin: 0;
    margin-bottom: 0.4rem;
    color: white;
}

.slide-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-cta {
    background: var(--primary-color);
    color: var(--bg-dark);
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 10px 20px rgba(0, 243, 255, 0.2);
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 243, 255, 0.3);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.carousel-nav:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

.slide-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .carousel-container {
        height: auto;
    }

    .carousel-slide {
        flex-direction: column;
        padding: 2.5rem 2rem;
        gap: 1.5rem;
        text-align: center;
    }

    .carousel-slide img {
        width: 180px;
        height: 180px;
    }

    .slide-content h2 {
        font-size: 1.6rem;
    }

    .slide-content p {
        font-size: 0.95rem;
    }

    .slide-price {
        font-size: 1.6rem;
    }

    .slide-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .carousel-nav {
        display: none;
    }
}

/* --- Dashboard Styles --- */
.dashboard-top-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.dashboard-controls-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.filters-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.date-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-group label {
    font-size: 11px;
    color: var(--text-muted);
}

.date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white !important;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.date-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.date-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.date-input option {
    background: var(--bg-dark);
    color: white;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.kpi-card {
    background: var(--bg-card);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kpi-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.kpi-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* .kpi-card.wide { grid-column: span 1; } */

.dashboard-lists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-list-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.dashboard-list-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.list-item:last-child {
    border-bottom: none;
}

.rank-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
}

.rank-1 {
    background: #EAB308;
}

/* Gold */
.rank-2 {
    background: #94A3B8;
}

/* Silver */
.rank-3 {
    background: #B45309;
}

/* Bronze */
.rank-other {
    background: rgba(255, 255, 255, 0.1);
}

.item-info {
    flex-grow: 1;
}

.item-name {
    display: block;
    font-weight: 600;
}

.item-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-stats {
    text-align: right;
}

.item-value {
    display: block;
    font-weight: 700;
}

.item-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-view-item {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-view-item:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 1200px) {
    .dashboard-lists-grid {
        grid-template-columns: 1fr;
    }
}


/* --- Admin Login Styles (Migrated) --- */
.admin-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.admin-login-overlay::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    filter: blur(150px);
    opacity: 0.15;
    top: -100px;
    right: -100px;
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.1;
        transform: scale(1);
    }

    100% {
        opacity: 0.2;
        transform: scale(1.2);
    }
}

.login-box {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

/* Note: slideUp animation is already defined in style.css or similar, ensuring it exists here just in case specific variance needed, but better to reuse if possible. Assuming standalone migration for safety. */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.3));
}

.login-box h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.login-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-input-wrapper label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    margin-left: 0.5rem;
}

.login-input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-field ion-icon {
    position: absolute;
    left: 1.2rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.login-input-field input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 1rem 1rem 1rem 3.2rem !important;
    border-radius: 15px !important;
    font-size: 1rem !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.login-input-field input:focus {
    border-color: var(--primary-color) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1) !important;
}

.login-input-field input:focus+ion-icon {
    color: var(--primary-color);
}

#login-btn {
    width: 100%;
    margin: 1.5rem auto 0 !important;
    padding: 1.1rem !important;
    font-size: 1.1rem !important;
    justify-content: center !important;
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.2) !important;
}

/* Admin Tables */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--primary-color);
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badge & Admin Table UI Refinement */
.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge.warning {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.badge.info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.btn-icon.small {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon.small:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.admin-view {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* UI Premium Components */
.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.avatar-initials {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.sparkline-container {
    height: 30px;
    width: 100px;
    margin-top: auto;
    opacity: 0.6;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-state ion-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.2;
}

.dashboard-list-card {
    transition: var(--transition);
}

.dashboard-list-card:hover {
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

/* Glassmorphism Refinement */
.glass-deep {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-item {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Botón Secundario (Limpiar, Refrescar) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    padding: 0.7rem 1.4rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: var(--transition) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Layout Organizado para Formularios */
.form-card-container {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.date-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.date-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 0.2rem;
}

/* Tabla temporal de productos */
.temp-table-container {
    margin-top: 1.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.temp-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
}

.temp-table th {
    background: rgba(0, 210, 255, 0.05);
    color: var(--primary-light);
    text-align: left;
    padding: 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.temp-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

/* ============================================
   ADMIN PANEL - LAYOUT FIXES
   ============================================ */

/* Main Layout Grid: Sidebar + Content */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    width: 100%;
}

/* Mobile Header - HIDE on Desktop */
.admin-mobile-header {
    display: none !important;
}

/* Sidebar Navigation Buttons */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 0.8rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-btn.active {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-btn ion-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 4999;
}

.sidebar-overlay.active {
    display: block;
}

/* View Container should fill available space */
.admin-view-container {
    width: 100%;
    min-height: 300px;
}

/* Empty state styling */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-state ion-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-mobile-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 5500;
        background: transparent;
        pointer-events: none;
        /* Dejar pasar clicks al fondo */
    }

    .admin-mobile-header .logo {
        display: none !important;
        /* Ocultar logo en móvil si estorba */
    }

    .mobile-menu-toggle {
        display: flex !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
        background: var(--primary-color) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4) !important;
        z-index: 6000 !important;
        pointer-events: auto !important;
        justify-content: center;
        align-items: center;
        color: white !important;
        border: none !important;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        z-index: 5000;
        transition: left 0.3s ease;
    }

    .admin-sidebar.active {
        left: 0;
    }
}

/* ============================================
   ADMIN LOGIN STYLES
   ============================================ */

.admin-login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.8) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    animation: loginFadeIn 0.5s ease-out;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

.login-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group ion-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1rem 1rem 3.2rem;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.input-group input:focus+ion-icon {
    color: var(--primary-color);
}

#login-btn {
    width: 100%;
    height: 55px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* --- Admin Refinements --- */
.logout-btn-danger {
    color: #ff4d4d !important;
}

.logout-btn-danger:hover {
    background: rgba(255, 77, 77, 0.1) !important;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Button Loading Animation --- */
.btn-loading {
    color: transparent !important;
    position: relative;
    pointer-events: none;
    cursor: not-allowed;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-top: -12px;
    margin-left: -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btn-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 10;
}

@keyframes btn-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- MEJORAS UI/UX --- */

/* Cards Enhanced */
.dashboard-card,
.kpi-card {
    padding: 1.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.kpi-card h3,
.dashboard-card h3 {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.2rem !important;
}

.kpi-card span,
.dashboard-card p {
    font-size: 0.9rem !important;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar Logout Button */
#logout-btn,
#logout-btn-sidebar {
    margin-top: auto;
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--accent-red) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
    font-weight: 600;
}

#logout-btn:hover,
#logout-btn-sidebar:hover {
    background: var(--accent-red) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* Modal Buttons Colors */
.btn-confirm-success {
    background: var(--accent-green) !important;
    color: white !important;
}

.btn-confirm-success:hover {
    background: #16a34a !important;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4) !important;
}

/* --- MOBILE RESPONSIVE STYLES --- */
@media (max-width: 768px) {

    /* Layout Global */
    .admin-dashboard {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 5000;
        transition: left 0.3s ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .admin-sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 4999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* --- MOBILE RESPONSIVE FIXES --- */
    /* Agendados Mobile Layout */
    .scheduled-input-row,
    #entity-form-container .input-group-row {
        /* Asumiendo que estos son los contenedores, si no existen los forzamos globalmente en inputs */
        display: flex;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* Forzar inputs en modales y formularios a 100% */
    .dashboard-controls .date-group,
    .admin-main input,
    .admin-main select,
    .order-creation-area input,
    .order-creation-area select {
        width: 100% !important;
        min-width: 0 !important;
        /* Evita que flex items desborden */
    }

    /* Main Content Area */
    .admin-main {
        padding: 1rem;
        width: 100%;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Grids & Cards */
    .admin-stats-grid,
    .stats-cards-container {
        grid-template-columns: 1fr !important;
        /* Stack cards vertically */
        gap: 0.8rem;
    }

    .admin-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columns for products is okay even on mobile usually */
        gap: 0.5rem;
    }

    .admin-product-card {
        margin-bottom: 0;
    }

    /* Headers & Actions */
    .view-header-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.8rem;
    }

    .search-container,
    .filter-container,
    .btn-primary,
    .date-input {
        width: 100% !important;
        flex: none !important;
        margin: 0 !important;
    }

    /* Forms */
    .order-creation-area {
        grid-template-columns: 1fr !important;
        /* Stack form and totals */
        display: flex !important;
        flex-direction: column;
        max-height: none !important;
        overflow: visible !important;
    }

    .order-form,
    .dashboard-list-card {
        overflow: visible !important;
        padding-right: 0 !important;
        position: static !important;
        /* Remove sticky on mobile if it causes issues, or keep it */
    }

    /* Ensure inputs in forms stack */
    .order-form>div {
        grid-template-columns: 1fr !important;
    }

    .order-form .date-group {
        width: 100%;
    }

    /* Tables - Critical for preventing overflow */
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 1rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    table {
        min-width: 600px;
        /* Force minimum width to trigger scroll */
    }

    /* Modals */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 95vh;
        margin: 1rem;
        border-radius: 20px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        /* Stack image and info */
        gap: 1.5rem;
    }

    .modal-image-container {
        height: 200px;
        /* Smaller image height on mobile */
    }

    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2rem;
    }

    /* Fix specific order creation row to stack */
    .product-add-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .product-add-row button {
        width: 100% !important;
    }
}

/* Animaciones */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 1.5s linear infinite;
    display: inline-block;
}

/* Admin Product List View (New) */
.admin-product-row {
    background: var(--bg-card);
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.3) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.admin-product-row:hover {
    border-color: rgba(0, 210, 255, 0.3);
    background: rgba(30, 41, 59, 0.8);
    transform: translateX(5px);
}

.product-thumb {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    flex-shrink: 0;
}

.product-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.admin-product-details {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.p-main-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 200px;
}

.p-name {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.p-category {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.p-price-info {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.p-price {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.p-cost {
    font-weight: 600;
    color: var(--text-muted);
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-circle:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-icon-circle.delete:hover {
    background: var(--accent-red);
    color: white;
}

.admin-product-row .star-toggle {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    width: 32px !important;
    height: 32px !important;
}

/* Mobile Adjustments for List */
@media (max-width: 768px) {
    .admin-product-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.2rem;
    }

    .admin-product-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }

    .p-price-info {
        gap: 1.5rem;
        width: 100%;
        justify-content: space-between;
    }

    .admin-row-actions {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 1rem;
    }
}

/* ==========================================================================
   VERSION DUALITY: DESKTOP VS MOBILE
   ========================================================================== */

/* Utility Classes */
.show-mobile {
    display: none !important;
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .show-desktop {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    body {
        padding-bottom: 80px;
    }
}

/* Bottom Navigation (Mobile Only) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: #0f172a;
    /* Solid dark background to avoid issues */
    backdrop-filter: blur(15px);
    display: none;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    z-index: 5000;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
    .bottom-nav.show-mobile {
        display: flex !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
}

.nav-item ion-icon {
    font-size: 1.6rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active ion-icon {
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.5));
}

/* Admin Table Styles (Desktop Only) */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
    box-shadow: var(--shadow-lg);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
}

.admin-table th {
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.featured {
    background: rgba(234, 179, 8, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

/* Mobile Product Cards (Optimized Overlay) */
@media (max-width: 768px) {
    .admin-product-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2rem;
        gap: 1.2rem;
        background: var(--bg-card);
        border: 1px solid var(--glass-border);
        margin-bottom: 1rem;
        cursor: pointer;
    }

    .admin-product-row .product-thumb {
        width: 100%;
        height: 220px;
        margin: 0;
    }

    .admin-product-row .product-thumb img {
        width: 100%;
        height: 100%;
        border-radius: var(--radius-md);
    }

    .admin-product-details {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 0;
    }

    .p-main-info {
        gap: 0.4rem;
    }

    .p-name {
        font-size: 1.2rem;
    }

    .p-price-info {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        background: rgba(0, 0, 0, 0.3);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin: 0;
    }

    .admin-row-actions {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--glass-border);
        padding-top: 1.2rem;
        margin: 0;
    }

    .btn-icon-circle {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}

/* Storefront Desktop Layout */
.main-layout-desktop {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.sidebar-desktop {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.content-area {
    flex-grow: 1;
}

.sidebar-block {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-block h3 {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.categories-column {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.category-link {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.category-link:hover,
.category-link.active {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .main-layout-desktop {
        flex-direction: column;
        gap: 0;
    }

    .sidebar-desktop {
        display: none !important;
    }

    #products-grid {
        grid-template-columns: 1fr !important;
        /* Mobile: Single column requested */
        gap: 1.2rem;
    }

    .btn-add {
        width: 100%;
        padding: 1.2rem !important;
        font-size: 1.1rem !important;
        margin-top: 1rem;
        justify-content: center;
        border-radius: 12px;
    }

    .product-card {
        padding: 1.5rem;
    }

    .product-info h3 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .product-price {
        font-size: 1.6rem;
    }
}

.p-category-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--primary-color);
    background: rgba(0, 210, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==========================================================================
   SUPER MOBILE ADMIN UI
   ========================================================================== */

@media (max-width: 768px) {
    .admin-layout {
        display: block;
        /* Stack header and main */
    }

    .admin-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 85%;
        height: 100vh;
        z-index: 9000;
        background: #0f172a;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        transition: left 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        padding-bottom: 90px;
        display: flex !important;
        /* Force display when toggle works */
    }

    .admin-sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: 8500;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .admin-main {
        padding: 1rem;
        margin-bottom: 80px;
        /* Space for bottom nav */
    }

    /* Fixed Mobile Header Hub */
    .admin-mobile-header {
        position: sticky;
        top: 0;
        background: #0f172a;
        padding: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--glass-border);
        z-index: 2000;
    }

    /* Mobile Stats - Vertical Stack */
    .admin-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    .stat-card {
        padding: 1.2rem;
    }

    /* Modern Bottom Navigation */
    .bottom-nav {
        background: #0f172a;
        height: 75px;
        display: flex !important;
        padding-bottom: 15px;
    }

    .nav-item ion-icon {
        font-size: 1.8rem;
    }

    /* Responsive Titles */
    #page-title {
        font-size: 1.8rem;
        margin-bottom: 0.2rem;
    }

    #page-subtitle {
        font-size: 0.85rem;
    }

    /* Product Cards Mobile Optimization */
    .admin-product-row {
        background: rgba(30, 41, 59, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        overflow: hidden;
    }

    .p-price-info {
        background: rgba(0, 0, 0, 0.4);
        padding: 1.2rem;
    }

    /* Better Modal on Mobile */
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 1.5rem;
    }

    .modal-body,
    .info-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .modal-image-container {
        height: 250px;
    }

    .btn-icon-circle-refresh {
        display: none !important;
        /* Hide refresh on mobile as requested */
    }

    .mobile-fab {
        position: fixed;
        right: 1.5rem;
        bottom: 100px;
        width: 60px;
        height: 60px;
        background: var(--primary-color);
        color: var(--bg-dark);
        border-radius: 50%;
        display: none;
        /* Hidden by default */
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        box-shadow: 0 10px 25px rgba(0, 210, 255, 0.4);
        z-index: 4000;
    }

    .mobile-fab.active {
        display: flex !important;
    }

    /* Better Search/Filter on Mobile Admin */
    .view-header-actions {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 0 !important;
        background: transparent !important;
        margin-bottom: 1.5rem !important;
    }

    .view-header-actions h3 {
        display: none !important;
    }

    .summary-rows-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.8rem !important;
        width: 100% !important;
    }

    .summary-rows-container .search-container {
        max-width: none !important;
    }

    .summary-rows-container .search-container input {
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ==========================================================================
   TEMU-STYLE MOBILE STOREFRONT
   ========================================================================== */
@media (max-width: 768px) {

    /* DASHBOARD MOBILE REFINEMENT */
    .dashboard-top-section {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .dashboard-controls-card {
        padding: 1rem !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: 15px !important;
    }

    .filters-grid-vertical {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* side by side dates */
        gap: 0.8rem !important;
    }

    .filters-grid-vertical button {
        grid-column: span 2 !important;
        margin-top: 0.5rem !important;
    }

    .filters-grid-vertical .date-group label {
        font-size: 0.75rem !important;
        /* 12px */
        color: #4facfe !important;
        margin-bottom: 0.2rem !important;
    }

    .filters-grid-vertical .date-input {
        height: 36px !important;
        font-size: 0.75rem !important;
        padding: 0 0.5rem !important;
    }

    #btn-apply-dashboard-filters {
        width: 100% !important;
        height: 38px !important;
        font-size: 0.8rem !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
    }

    /* KPI Grid on Mobile */
    .kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
        padding: 0 !important;
    }

    .kpi-card {
        padding: 0.8rem !important;
        background: #1a2234 !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.2rem !important;
    }

    .kpi-card span {
        font-size: 0.7rem !important;
        /* ~11-12px */
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        color: var(--text-muted) !important;
    }

    .kpi-card h3 {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }

    .kpi-card.wide {
        grid-column: span 2 !important;
    }

    /* END DASHBOARD MOBILE REFINEMENT */

    /* Horizontal Scrolling Categories */
    .categories-container {
        display: flex !important;
        overflow-x: auto;
        padding: 0.5rem 0;
        gap: 0.6rem;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        justify-content: flex-start !important;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    .categories-container::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .category-pill {
        white-space: nowrap;
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        background: rgba(255, 255, 255, 0.05);
    }

    /* 2-Column Product Grid */
    #products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
        padding: 0.5rem;
    }

    .product-card {
        padding: 0.4rem !important;
        border-radius: 10px !important;
        background: var(--bg-card);
        aspect-ratio: 1 / 1.4;
        /* More compact */
        display: flex;
        flex-direction: column;
    }

    .product-image {
        height: 150px !important;
        border-radius: 10px !important;
    }

    .product-info {
        padding: 0.4rem 0.2rem;
    }

    .product-info h3 {
        font-size: 0.8rem !important;
        line-height: 1.2;
        height: 2.4em;
        overflow: hidden;
        margin-bottom: 0.1rem !important;
        /* Closer to price */
    }

    .p-category-tag {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .product-price {
        font-size: 1rem !important;
        margin-top: 0 !important;
        /* Remove auto push */
        margin-bottom: 0.2rem !important;
    }

    .btn-add {
        padding: 0.6rem !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }

    /* Dashboard Lists Mobile */
    .dashboard-list-card {
        padding: 1rem !important;
        border-radius: 15px !important;
    }

    .dashboard-list-card h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
        text-transform: uppercase;
        color: var(--primary-color);
    }

    .list-item {
        padding: 0.6rem 0 !important;
        gap: 0.6rem !important;
    }

    .item-name {
        font-size: 0.75rem !important;
        /* 12px */
    }

    .item-count,
    .item-value {
        font-size: 0.7rem !important;
        /* ~11px */
    }

    .rank-circle {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.7rem !important;
    }

    .avatar,
    .avatar-initials {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   ADMIN ORDERS VIEW (Match Image)
   ========================================================================== */
.order-creation-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 0.8rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .order-creation-area {
        grid-template-columns: 1fr;
    }
}

.order-form {
    background: #1a2234;
    padding: 1.2rem !important;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.order-summary-card {
    background: #1a2234;
    padding: 1.2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.order-summary-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color: white;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.summary-row strong {
    color: white;
    font-size: 1.1rem;
}

.summary-row input.date-input {
    width: 130px;
    text-align: left;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
}

.order-form h4 {
    margin-bottom: 0.8rem;
    color: white;
    font-size: 1.2rem;
}

.date-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: #4facfe;
    font-weight: 600;
}

.date-group input,
.date-group select {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0.5rem 0.8rem !important;
    height: 40px;
    border-radius: 8px !important;
    color: white !important;
}

.product-add-row {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 1rem 0;
}

#btn-save-order {
    background: linear-gradient(135deg, #02aab0 0%, #00cdac 100%) !important;
    padding: 0.8rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 205, 172, 0.3) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: none !important;
    width: 100% !important;
    margin-top: 0.8rem;
}

#btn-add-item-modal {
    background: linear-gradient(135deg, #00d2ff 0%, #3b82f6 100%) !important;
    padding: 0.8rem 2rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none !important;
}

.price-display-red strong {
    color: #ff416c !important;
    /* Saldo red */
}

@media (max-width: 992px) {

    /* Mobile Fixes */
    .admin-products-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .admin-product-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.8rem !important;
        padding: 0.5rem !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        min-height: 70px;
    }

    .admin-product-row .product-thumb {
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0;
        margin-bottom: 0 !important;
    }

    .admin-product-row .product-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }

    .admin-product-details {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 0.2rem !important;
        text-align: left !important;
    }

    .p-main-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }

    .p-name {
        font-size: 13px !important;
        font-weight: 500 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }

    .p-category {
        font-size: 10px !important;
        opacity: 0.7;
    }

    .p-price-info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.8rem !important;
        width: 100%;
        margin-top: 0.2rem;
    }

    .price-box {
        display: flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
    }

    .price-label {
        font-size: 10px !important;
        opacity: 0.7;
        display: none !important;
    }

    .p-price {
        font-size: 12px !important;
        font-weight: 600;
        color: var(--primary-color);
    }

    .p-cost {
        font-size: 11px !important;
        opacity: 0.6;
    }

    .admin-row-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
        min-width: 30px;
        align-items: center;
    }

    .btn-icon-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .kpi-grid,
    .stats-cards-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.3rem !important;
        padding: 0 !important;
    }

    .kpi-card {
        padding: 0.4rem !important;
        min-height: 50px !important;
    }

    .kpi-card h3 {
        font-size: 12px !important;
    }

    .order-form h4 {
        margin-bottom: 0.8rem;
        color: white;
        font-size: 1.2rem;
    }

    .date-group label {
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
        color: #4facfe;
        font-weight: 600;
    }

    .date-group input,
    .date-group select {
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.5rem 0.8rem !important;
        height: 40px;
        border-radius: 8px !important;
        color: white !important;
    }

    .product-add-row {
        background: rgba(0, 0, 0, 0.3);
        padding: 0.8rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin: 1rem 0;
    }

    #btn-save-order {
        background: linear-gradient(135deg, #02aab0 0%, #00cdac 100%) !important;
        padding: 0.8rem !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 25px rgba(0, 205, 172, 0.3) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.8rem;
        border: none !important;
        width: 100% !important;
        margin-top: 0.8rem;
    }

    #btn-add-item-modal {
        background: linear-gradient(135deg, #00d2ff 0%, #3b82f6 100%) !important;
        padding: 0.8rem 2rem !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        border: none !important;
    }

    .price-display-red strong {
        color: #ff416c !important;
        /* Saldo red */
    }

    @media (max-width: 992px) {

        /* Mobile Fixes */
        .admin-products-grid {
            display: flex !important;
            flex-direction: column !important;
            gap: 0.5rem !important;
        }

        .admin-product-row {
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            gap: 0.8rem !important;
            padding: 0.5rem !important;
            background: rgba(255, 255, 255, 0.03) !important;
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
            border-radius: 8px !important;
            min-height: 70px;
        }

        .admin-product-row .product-thumb {
            width: 50px !important;
            height: 50px !important;
            flex-shrink: 0;
            margin-bottom: 0 !important;
        }

        .admin-product-row .product-thumb img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            border-radius: 6px !important;
        }

        .admin-product-details {
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            gap: 0.2rem !important;
            text-align: left !important;
        }

        .p-main-info {
            display: flex !important;
            flex-direction: column !important;
            align-items: flex-start !important;
            gap: 0 !important;
        }

        .p-name {
            font-size: 13px !important;
            font-weight: 500 !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 140px;
        }

        .p-category {
            font-size: 10px !important;
            opacity: 0.7;
        }

        .p-price-info {
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            gap: 0.8rem !important;
            width: 100%;
            margin-top: 0.2rem;
        }

        .price-box {
            display: flex !important;
            align-items: center !important;
            gap: 0.3rem !important;
        }

        .price-label {
            font-size: 10px !important;
            opacity: 0.7;
            display: none !important;
        }

        .p-price {
            font-size: 12px !important;
            font-weight: 600;
            color: var(--primary-color);
        }

        .p-cost {
            font-size: 11px !important;
            opacity: 0.6;
        }

        .admin-row-actions {
            display: flex !important;
            flex-direction: column !important;
            gap: 0.4rem !important;
            padding: 0 !important;
            border: none !important;
            margin: 0 !important;
            min-width: 30px;
            align-items: center;
        }

        .btn-icon-circle {
            width: 28px !important;
            height: 28px !important;
            font-size: 0.9rem !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }

        .kpi-grid,
        .stats-cards-container {
            grid-template-columns: repeat(3, 1fr) !important;
            gap: 0.3rem !important;
            padding: 0 !important;
        }

        .kpi-card {
            padding: 0.4rem !important;
            min-height: 50px !important;
        }

        .kpi-card h3 {
            font-size: 12px !important;
        }

        /* Removed orphan lines */
    }

    .admin-product-details {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 0.2rem !important;
        text-align: left !important;
    }

    .p-main-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }

    .p-name {
        font-size: 13px !important;
        font-weight: 500 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }

    .p-category {
        font-size: 10px !important;
        opacity: 0.7;
    }

    .p-price-info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.8rem !important;
        width: 100%;
        margin-top: 0.2rem;
    }

    .price-box {
        display: flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
    }

    .price-label {
        font-size: 10px !important;
        opacity: 0.7;
        display: none !important;
    }

    .p-price {
        font-size: 12px !important;
        font-weight: 600;
        color: var(--primary-color);
    }

    .p-cost {
        font-size: 11px !important;
        opacity: 0.6;
    }

    .admin-row-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
        min-width: 30px;
        align-items: center;
    }

    .btn-icon-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .kpi-grid,
    .stats-cards-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.3rem !important;
        padding: 0 !important;
    }

    .kpi-card {
        padding: 0.4rem !important;
        min-height: 50px !important;
    }

    .kpi-card h3 {
        font-size: 12px !important;
    }

    .kpi-card span {
        font-size: 9px !important;
    }
}

/* FAB Explicit Styles to Fix Visibility Issues */
.mobile-fab {
    position: fixed !important;
    bottom: 85px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: var(--primary-color) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.4) !important;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.mobile-fab:active {
    transform: scale(0.95);
}

@media(min-width: 992px) {
    .mobile-fab {
        display: none !important;
    }
}

/* Mobile Header Titles */
.admin-mobile-header .header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-mobile-header .logo h1 {
    font-size: 1.1rem !important;
    margin: 0;
}

.mobile-page-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 0.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Estilos para botones pequeños y evitar desbordes */
.small {
    padding: 0.4rem 0.8rem !important;
    font-size: 11px !important;
    min-width: auto !important;
    width: auto !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.btn-primary.small,
.btn-secondary.small {
    padding: 0.4rem 0.8rem !important;
    height: auto !important;
}

   
/* ===== PREMIUM DASHBOARD STYLES ===== */

/* Gráfico de Torta - Container Premium */
.chart-container-premium {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-container-premium:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 210, 255, 0.25);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Filtros Rápidos con Estado Activo */
.filter-preset {
    opacity: 0.7;
    transition: all 0.25s ease;
    border: 1px solid transparent !important;
}

.filter-preset:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.filter-preset.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
    border-color: var(--primary-color) !important;
}

/* Indicador Offline Elegante */
.offline-indicator {
    position: fixed;
    bottom: 85px;
    left: 1.5rem;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.95), rgba(251, 191, 36, 0.95));
    color: #000;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 5000;
    box-shadow: 0 8px 25px rgba(234, 179, 8, 0.4);
    animation: slideInUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    backdrop-filter: blur(10px);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Avatar con Iniciales Premium */
.avatar-initials {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
    flex-shrink: 0;
}

/* KPI Cards con Hover Premium */
.kpi-card {
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 210, 255, 0.3) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Dashboard Row Responsivo */
@media (max-width: 992px) {
    .dashboard-top-section>div[style*="grid-template-columns: 1fr 340px"] {
        display: flex !important;
        flex-direction: column !important;
    }

    .chart-container-premium {
        width: 100% !important;
        min-height: 280px;
    }

    .offline-indicator {
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
    }
}

/* Glass Effect para Modales de Historial */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Progress Bar para Top Products */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* List Items Premium */
.list-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 210, 255, 0.2);
}

.list-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.list-item .item-info {
    flex: 1;
}

.list-item .item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.list-item .item-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.list-item .item-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.list-item .item-value {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Rank Circles para Top Lists */
.rank-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.rank-circle.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.rank-circle.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.rank-circle.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}

.rank-circle.rank-other {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Dashboard Lists Grid */
.dashboard-lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-list-card {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-list-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

.dashboard-list-card .list-content {
    max-height: 350px;
    overflow-y: auto;
}


/* ===== MOBILE RESPONSIVE LAYOUTS ===== */

/* --- Dashboard Responsive --- */
@media (max-width: 768px) {
    .dashboard-top-section>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .chart-container-premium {
        width: 100% !important;
        margin-top: 1rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .kpi-card {
        padding: 0.8rem !important;
        min-height: 70px !important;
    }

    .kpi-card span {
        font-size: 0.65rem !important;
    }

    .kpi-card h3 {
        font-size: 1.2rem !important;
    }
}

/* --- Mobile Products Layout --- */
.mobile-products-list,
.mobile-orders-container,
.mobile-only-list {
    display: none;
}

@media (max-width: 768px) {

    .mobile-products-list,
    .mobile-orders-container,
    .mobile-only-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Solo ocultar la tabla si hay una alternativa móvil activa en el DOM */
    .admin-table-container:has(.mobile-products-list) table,
    .admin-table-container:has(.mobile-orders-container) table,
    .admin-table-container:has(.mobile-only-list) table {
        display: none;
    }
}

.mobile-product-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-product-card:hover,
.mobile-product-card:active {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-color);
}

.mobile-product-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
}

.mobile-product-info {
    flex: 1;
    min-width: 0;
}

.mobile-product-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.mobile-product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mobile-product-prices {
    text-align: right;
    flex-shrink: 0;
}

.mobile-product-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

.mobile-product-cost {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Mobile Orders Layout --- */
.orders-header-mobile,
.mobile-orders-container {
    display: none;
}

@media (max-width: 768px) {
    .orders-header-desktop {
        display: none !important;
    }

    .orders-table-desktop {
        display: none !important;
    }

    .orders-header-mobile {
        display: block;
    }

    .mobile-orders-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
}

.mobile-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.mobile-filter-tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-tab.active {
    background: var(--primary-color);
    color: #0f172a;
    border-color: var(--primary-color);
}

.mobile-order-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-order-card:hover,
.mobile-order-card:active {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-color);
}

.mobile-order-img {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
}

.mobile-order-info {
    flex: 1;
    min-width: 0;
}

.mobile-order-client {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.mobile-order-articles {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0.2rem 0;
}

.mobile-order-date {
    font-size: 0.7rem;
    color: #64748b;
}

.mobile-order-right {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.mobile-order-total {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.mobile-order-saldo {
    font-size: 0.7rem;
    color: #f43f5e;
    font-weight: 600;
}


/* --- Action Modal (Bottom Sheet for Mobile) --- */
.mobile-actions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: flex-end;
}

.mobile-actions-content {
    width: 100%;
    background: #0f172a;
    border-radius: 24px 24px 0 0;
    padding: 2rem 1.5rem;
    padding-bottom: 2.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-actions-modal.active {
    display: flex;
}

.mobile-actions-modal.active .mobile-actions-content {
    transform: translateY(0);
}

.mobile-actions-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.mobile-actions-list {
    display: grid;
    gap: 1rem;
}

.mobile-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.mobile-action-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.mobile-action-item ion-icon {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.mobile-action-item.danger ion-icon {
    color: #ff3b30;
}

/* --- Generic Mobile Card Layout --- */
.mobile-entity-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-entity-avatar {
    width: 50px;
    height: 50px;
}

.mobile-entity-info {
    flex: 1;
}

.mobile-entity-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.mobile-entity-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.mobile-entity-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}@keyframes pulse-video { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } } .btn-video { background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%); color: white; border: none; padding: 0.8rem 1.5rem; border-radius: 12px; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3); animation: pulse-video 2s infinite; } .btn-video:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4); filter: brightness(1.1); } .btn-video ion-icon { font-size: 1.4rem; } #video-modal .modal-content { background: #000; padding: 0; max-width: 900px; width: 95%; } .video-container { background: #000; border-radius: 0 0 12px 12px; } #close-video-modal { transition: all 0.2s ease; } #close-video-modal:hover { transform: rotate(90deg); background: rgba(255, 255, 255, 0.2); } @media (max-width: 768px) { .btn-video { width: 100%; justify-content: center; padding: 1rem; } }
