/* ADMIN CAFETERÍA STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: auto;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    position: relative;
}

/* HEADER */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: #2c3e50;
    padding: 1rem 2rem;
    box-shadow: 0 1px 20px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 70px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-right: 1px solid rgba(0,0,0,0.05);
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-content {
    padding: 2rem 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    padding: 0 1rem 0.75rem;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.sidebar-menu {
    list-style: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin: 0.25rem 1rem;
    font-weight: 500;
    color: #6c757d;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #495057;
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 260px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

.content-section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.content-section.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* DASHBOARD MINIMALISTA */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #eee;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #eee;
}

.chart-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.chart-content {
    height: 200px;
    background: #f9f9f9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
}

/* FILTERS */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: end;
}

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

.filter-group label {
    font-weight: 600;
    color: #333;
}

.filter-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

/* TABLES */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow-x: auto;
    overflow-y: visible;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th {
    background: #f8f9fa;
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e1e5e9;
    font-size: 0.9rem;
}

.data-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.data-table td:nth-child(3) {
    white-space: normal;
    max-height: 60px;
    overflow: hidden;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Anchos específicos para columnas de la tabla de recompensas */
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    padding: 0.5rem;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 15%;
    min-width: 120px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 25%;
    min-width: 150px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 12%;
    min-width: 100px;
    text-align: center;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 10%;
    min-width: 90px;
    text-align: center;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
    width: 10%;
    min-width: 90px;
    text-align: center;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    text-align: center;
    padding: 0.5rem;
}

.product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.table-image {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover;
    display: block;
}

/* Prevenir que las imágenes dentro de la tabla se desborden */
.data-table img {
    max-width: 60px !important;
    max-height: 60px !important;
}

.data-table svg {
    max-width: 60px !important;
    max-height: 60px !important;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.activo {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactivo {
    background: #f8d7da;
    color: #721c24;
}

/* CATEGORIES GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-content {
    padding: 1.5rem;
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.category-description {
    color: #666;
    margin-bottom: 1rem;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

/* ORDERS GRID */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    min-height: 200px;
    width: 100%;
    position: relative;
    z-index: 1;
    background: transparent;
}

.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
    border-left: 4px solid #8c9a7d;
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
    z-index: 2;
    min-height: 200px;
    width: 100%;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-number {
    font-weight: 600;
    color: #333;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.pendiente {
    background: #fff3cd;
    color: #856404;
}

.order-status.preparando {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status.listo {
    background: #d4edda;
    color: #155724;
}

.order-items {
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* CONFIGURATION */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.config-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.config-card h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.2rem;
}

.config-item {
    margin-bottom: 1rem;
}

.config-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.config-item input,
.config-item select,
.config-item textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.config-item input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.config-item input[type="file"] {
    padding: 0.5rem;
}

.logo-preview,
.image-preview {
    margin-top: 1rem;
    text-align: center;
}

.logo-preview img,
.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.config-actions {
    text-align: center;
    padding: 2rem;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.stats-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stats-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* FORM ROWS */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* BUTTONS */
.btn-primary {
    background: linear-gradient(135deg, #8c9a7d, #667eea);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(140, 154, 125, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #218838;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
    padding: 1rem;
}

/* Modal de opciones con z-index más alto para que aparezca sobre otros modales */
#opciones-modal {
    z-index: 10000 !important;
}

#grupo-opciones-modal {
    z-index: 10000 !important;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background: #f8f9fa;
    color: #333;
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* FORMS */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8c9a7d;
    box-shadow: 0 0 0 3px rgba(140, 154, 125, 0.1);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* TIMER STYLES */
.order-timers {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.timer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.timer-item i {
    font-size: 1rem;
}

.timer-label {
    font-weight: 500;
    opacity: 0.8;
}

.timer-value {
    font-weight: 700;
}

/* TIMER COLORS */
.timer-red {
    background: #fee2e2;
    color: #dc2626;
    border: 2px solid #fecaca;
}

.timer-yellow {
    background: #fef3c7;
    color: #d97706;
    border: 2px solid #fde68a;
}

.timer-green {
    background: #d1fae5;
    color: #059669;
    border: 2px solid #a7f3d0;
}

.timer-completed {
    background: #e0e7ff;
    color: #3730a3;
    border: 2px solid #c7d2fe;
    font-weight: 700;
}

/* ESTILOS PARA MODALES DE PRODUCTOS */
.product-detail-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.product-detail-image {
    flex: 0 0 200px;
    text-align: center;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.no-image-placeholder {
    width: 200px;
    height: 200px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.no-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-detail-info {
    flex: 1;
}

.detail-row {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.detail-row label {
    font-weight: 600;
    min-width: 100px;
    margin-right: 1rem;
    color: #495057;
}

.detail-row span.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

.detail-row span.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* ESTILOS PARA FORMULARIOS DE PRODUCTOS */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* ESTILOS PARA TARJETAS DE PRODUCTOS */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    background: #f8f9fa;
}

.no-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.product-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-status.active {
    background: #d4edda;
    color: #155724;
}

.product-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.product-content {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.product-category {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.product-stock.normal {
    background: #d4edda;
    color: #155724;
}

.product-stock.low {
    background: #fff3cd;
    color: #856404;
}

.product-stock.out {
    background: #f8d7da;
    color: #721c24;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-action {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.product-action.primary {
    background: #007bff;
    color: white;
}

.product-action.primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.product-action {
    background: #6c757d;
    color: white;
}

.product-action:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.product-action.danger {
    background: #dc3545;
    color: white;
}

.product-action.danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* ORDER CARD STATES */
.order-card.pendiente {
    border-left-color: #f39c12;
}

.order-card.preparando {
    border-left-color: #3498db;
}

.order-card.listo {
    border-left-color: #27ae60;
}

.order-card.entregado {
    border-left-color: #95a5a6;
}

/* ORDER HEADER IMPROVEMENTS */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-client {
    font-size: 0.9rem;
    color: #666;
}

.order-time {
    font-size: 0.8rem;
    color: #999;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pendiente {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.preparando {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.listo {
    background: #d1fae5;
    color: #059669;
}

.status-badge.entregado {
    background: #f3f4f6;
    color: #6b7280;
}

/* ORDER ITEMS IMPROVEMENTS */
.order-items {
    margin: 1rem 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
    color: #333;
}

.item-quantity {
    color: #666;
    font-size: 0.9rem;
}

.item-price {
    font-weight: 600;
    color: #333;
}

/* ORDER FOOTER */
.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.order-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

.order-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.order-actions .btn-success {
    background: #10b981;
    color: white;
}

.order-actions .btn-success:hover {
    background: #059669;
}

.order-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.order-actions .btn-primary:hover {
    background: #2563eb;
}

.order-actions .btn-info {
    background: #06b6d4;
    color: white;
}

.order-actions .btn-info:hover {
    background: #0891b2;
}

/* CLIENT STYLES */
.client-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vip-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.points-display {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.client-type {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.client-type.vip {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.client-type.regular {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons button {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-action {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Asegurar que los botones de acción sean visibles */
.action-buttons .btn-action {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.action-buttons .btn-action i {
    font-size: 0.9rem;
}
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover {
    background: #0891b2;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* CLIENT MODAL STYLES */
.modal-large {
    max-width: 800px;
    width: 90vw;
}

.client-details-tabs {
    margin-top: 1rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.client-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.info-card h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 600;
    color: #666;
}

.info-item span {
    font-weight: 500;
    color: #333;
}

.points-value {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 700;
}

.client-type {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.client-type.vip {
    background: #fef3c7;
    color: #d97706;
}

.client-type.regular {
    background: #f3f4f6;
    color: #6b7280;
}

.points-management {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.points-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.points-history {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

/* RESPONSIVE CLIENT STYLES */
@media (max-width: 768px) {
    .client-info-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-left-color: #667eea;
        border-bottom-color: transparent;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-buttons button {
        width: 100%;
        justify-content: flex-start;
    }
}

/* RESPONSIVE DESIGN MEJORADO */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 1001;
    }
    
    .sidebar.active {
        transform: translateX(0);
        z-index: 9998;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .grupos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal {
        width: 95%;
        max-width: 95vw;
        margin: 1rem auto;
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 60vh;
    }
    
    .header {
        padding: 0.5rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Previene zoom en iOS */
    }
}

/* GRUPOS VIP */
.grupos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.grupo-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.grupo-card:hover {
    border-color: #007bff;
    box-shadow: 0 8px 25px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.grupo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.grupo-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.grupo-info {
    flex: 1;
}

.grupo-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.grupo-descuento {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-left: auto;
    flex-shrink: 0;
}

.grupo-descripcion {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-style: italic;
}

.grupo-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.875rem;
    color: #6c757d;
}

.grupo-actions {
    display: flex;
    gap: 0.75rem;
}

.grupo-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit-grupo {
    background: #007bff;
    color: white;
}

.btn-edit-grupo:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-delete-grupo {
    background: #dc3545;
    color: white;
}

.btn-delete-grupo:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* FORM ACTIONS */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* MODALES PERSONALIZADOS */
.confirm-modal,
.alert-modal {
    max-width: 450px;
    width: 90%;
}

/* Client Detail Modal */
.client-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.detail-row input, .detail-row select {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.detail-row input:focus, .detail-row select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.detail-row input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Form Help Text */
.form-help {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-style: italic;
}

/* PIN Input Styling */
#client-pin {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.2rem;
    font-weight: 600;
}

#client-pin:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Input Group Styling */
.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-group input {
    flex: 1;
}

.input-group button {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group button:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.confirm-modal .modal-header,
.alert-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.confirm-modal .modal-header h3,
.alert-modal .modal-header h3 {
    color: white;
    font-weight: 600;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    min-width: 100px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===========================================
   ULTRA MODAL - DISEÑO ULTRA MODERNO
   =========================================== */

.ultra-modal {
    max-width: 700px !important;
    max-height: 95vh !important;
    overflow-y: auto !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 32px !important;
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.08),
        0 20px 40px rgba(0,0,0,0.04),
        0 0 0 1px rgba(255,255,255,0.1),
        inset 0 1px 0 rgba(255,255,255,0.6) !important;
    animation: modalSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.ultra-modal::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent) !important;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-60px) scale(0.9) rotateX(10deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-20px) scale(0.98) rotateX(2deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

.ultra-modal .modal-header {
    padding: 2.5rem 2.5rem 1.5rem 2.5rem !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.6) 100%) !important;
    backdrop-filter: blur(10px) !important;
    position: relative !important;
}

.ultra-modal .modal-header::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 2.5rem !important;
    right: 2.5rem !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent) !important;
}

.ultra-modal .modal-header h2 {
    margin: 0 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.ultra-modal .close-btn {
    position: absolute !important;
    top: 2rem !important;
    right: 2rem !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 1.1rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}

.ultra-modal .close-btn:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15) !important;
}

.ultra-modal .modal-body {
    padding: 2.5rem !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(248, 250, 252, 0.2) 100%) !important;
}

.ultra-modal .modal-footer {
    padding: 2rem 2.5rem 2.5rem 2.5rem !important;
    border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%) !important;
    backdrop-filter: blur(10px) !important;
    display: flex !important;
    gap: 1.25rem !important;
    justify-content: flex-end !important;
    position: relative !important;
}

.ultra-modal .modal-footer::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 2.5rem !important;
    right: 2.5rem !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent) !important;
}

.ultra-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
}

.form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.form-group label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin: 0 !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem 1.5rem !important;
    border: 2px solid rgba(226, 232, 240, 0.4) !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.8) !important;
    position: relative !important;
    color: #1e293b !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.9) 100%) !important;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.12),
        0 12px 32px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.9) !important;
    transform: translateY(-2px) scale(1.01) !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.form-group textarea {
    resize: vertical !important;
    min-height: 60px !important;
}

.profitability-group {
    grid-column: span 2 !important;
}

.profitability-display {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1rem 1.5rem !important;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.8) 0%, rgba(219, 234, 254, 0.6) 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: 16px !important;
    font-size: 0.9rem !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 
        0 4px 16px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.profitability-display:hover {
    transform: translateY(-1px) !important;
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

#profitability-percentage {
    font-weight: 600 !important;
    color: #059669 !important;
}

#profitability-amount {
    color: #6b7280 !important;
}

.profitability-display.negative #profitability-percentage {
    color: #dc2626 !important;
}

.profitability-display.zero #profitability-percentage {
    color: #9ca3af !important;
}

.image-section {
    margin: 0 !important;
}

.image-upload {
    border: 3px dashed rgba(59, 130, 246, 0.3) !important;
    border-radius: 24px !important;
    padding: 3rem !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.6) 0%, rgba(219, 234, 254, 0.4) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    position: relative !important;
    min-height: 160px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    overflow: hidden !important;
}

.image-upload::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
    transition: left 0.6s ease !important;
}

.image-upload:hover {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.9) 0%, rgba(219, 234, 254, 0.7) 100%) !important;
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 
        0 16px 48px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.image-upload:hover::before {
    left: 100% !important;
}

.upload-placeholder {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: #6b7280 !important;
}

.upload-placeholder i {
    font-size: 2rem !important;
    color: #9ca3af !important;
}

.upload-placeholder span {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

.upload-preview {
    position: relative !important;
    max-width: 200px !important;
    margin: 0 auto !important;
}

.upload-preview img {
    width: 100% !important;
    height: 120px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

.remove-btn {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 0.75rem !important;
    transition: all 0.2s ease !important;
}

.remove-btn:hover {
    background: #b91c1c !important;
    transform: scale(1.1) !important;
}

.switch-group {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-direction: row !important;
}

.switch {
    position: relative !important;
    display: inline-block !important;
    width: 44px !important;
    height: 24px !important;
}

.switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 24px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1) !important;
}

.slider:before {
    position: absolute !important;
    content: "" !important;
    height: 20px !important;
    width: 20px !important;
    left: 2px !important;
    bottom: 2px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05) !important;
}

input:checked + .slider {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 0 1px rgba(59, 130, 246, 0.2) !important;
}

input:checked + .slider:before {
    transform: translateX(20px) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.1) !important;
}

.switch-label {
    font-size: 0.875rem !important;
    color: #374151 !important;
    font-weight: 500 !important;
}

.btn-cancel,
.btn-save {
    padding: 1rem 2.5rem !important;
    border-radius: 16px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    min-width: 140px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04) !important;
}

.btn-cancel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #64748b !important;
    border: 2px solid rgba(226, 232, 240, 0.6) !important;
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 
        0 12px 32px rgba(0,0,0,0.12),
        0 8px 20px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    color: #475569 !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
}

.btn-cancel:active {
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.btn-save {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.3),
        0 8px 20px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    position: relative !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
}

.btn-save::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent) !important;
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-save::after {
    content: '✨' !important;
    position: absolute !important;
    top: 50% !important;
    right: 1rem !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 1.1rem !important;
}

.btn-save:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 
        0 20px 48px rgba(59, 130, 246, 0.4),
        0 12px 32px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

.btn-save:hover::before {
    left: 100% !important;
}

.btn-save:hover::after {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.2) !important;
}

.btn-save:active {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.3),
        0 4px 12px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ===========================================
   RENTABILIDAD
   =========================================== */

.profitability-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    min-height: 48px;
    justify-content: center;
}

.profitability-display span {
    font-weight: 600;
    font-size: 0.9rem;
}

#profitability-percentage {
    color: #28a745;
    font-size: 1.1rem;
}

#profitability-amount {
    color: #495057;
    font-size: 0.85rem;
}

.profitability-display.negative #profitability-percentage {
    color: #dc3545;
}

.profitability-display.zero #profitability-percentage {
    color: #6c757d;
}

/* ===========================================
   UPLOAD DE IMÁGENES MEJORADO
   =========================================== */

.image-upload-section {
    margin-top: 1rem;
}

.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 3rem;
    color: #dee2e6;
    transition: color 0.3s ease;
}

.image-upload-area:hover .upload-icon {
    color: #667eea;
}

.upload-text p {
    margin: 0;
    font-weight: 500;
    color: #495057;
}

.upload-text small {
    color: #6c757d;
    font-size: 0.8rem;
}

.upload-preview {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.upload-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.remove-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* ===========================================
   SWITCH MEJORADO
   =========================================== */

.switch-label {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

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

.switch-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch-label input[type="checkbox"]:checked + .switch-slider {
    background: #667eea;
}

.switch-label input[type="checkbox"]:checked + .switch-slider::before {
    transform: translateX(26px);
}

/* ===========================================
   CENTRADO PERFECTO DE MODALES
   =========================================== */

/* CENTRADO ABSOLUTO PARA TODOS LOS MODALES */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.8) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    backdrop-filter: blur(5px) !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.modal-overlay.show {
    display: flex !important;
}

/* MODAL CENTRADO PERFECTAMENTE */
.modal {
    background: white !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 600px !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    transform: translateY(0) !important;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* MODALES ESPECÍFICOS CON TAMAÑOS OPTIMIZADOS */
#product-detail-modal .modal {
    max-width: 700px !important;
    width: 90vw !important;
}

#edit-product-modal .modal,
#create-product-modal .modal {
    max-width: 600px !important;
    width: 90vw !important;
}

#client-detail-modal .modal,
#edit-client-modal .modal {
    max-width: 800px !important;
    width: 95vw !important;
}

/* RESPONSIVE PARA MÓVILES */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px !important;
    }
    
    .modal {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 95vh !important;
        border-radius: 12px !important;
    }
    
    #product-detail-modal .modal,
    #edit-product-modal .modal,
    #create-product-modal .modal {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ===========================================
   NOTIFICACIONES MODERNAS
   =========================================== */

.modern-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.08),
        0 10px 20px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    max-width: 400px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
}

.modern-notification.show {
    right: 30px;
    animation: notificationSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.modern-notification i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modern-notification span {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
}

/* Tipos de notificación */
.modern-notification.success {
    border-left: 4px solid #10b981;
}

.modern-notification.success i {
    color: #10b981;
}

.modern-notification.error {
    border-left: 4px solid #ef4444;
}

.modern-notification.error i {
    color: #ef4444;
}

.modern-notification.warning {
    border-left: 4px solid #f59e0b;
}

.modern-notification.warning i {
    color: #f59e0b;
}

.modern-notification.info {
    border-left: 4px solid #3b82f6;
}

.modern-notification.info i {
    color: #3b82f6;
}

/* ===========================================
   TARJETAS DE CATEGORÍAS
   =========================================== */

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

.category-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.05),
        0 5px 15px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.1),
        0 10px 25px rgba(0,0,0,0.06);
    border-color: rgba(59, 130, 246, 0.3);
}

.category-image {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-image .no-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 3rem;
}

.category-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.category-content p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.badge-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
}

.category-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.btn-icon {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

.btn-icon.btn-danger:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #ef4444;
    color: #ef4444;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    color: #94a3b8;
}

/* === MODAL DE DETALLES DEL CLIENTE === */
.modal-large {
    max-width: 800px;
    width: 90%;
}

.client-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.detail-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section h4 i {
    color: #8c9a7d;
}

.detail-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.detail-item label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}

.detail-item span {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}

.pin-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 2px;
}

.group-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600 !important;
}

.discount-badge {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 700 !important;
}

.points-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 700 !important;
}

.status-active {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600 !important;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600 !important;
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    .client-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-large {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-item span {
        text-align: left;
    }
}

/* === MODALES DE ALERTA Y CONFIRMACIÓN === */
.alert-modal {
    max-width: 500px;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#alert-icon {
    font-size: 1.5rem;
}

/* Colores según tipo de alerta */
#alert-modal .modal-header.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

#alert-modal .modal-header.success #alert-icon {
    color: white;
}

#alert-modal .modal-header.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

#alert-modal .modal-header.error #alert-icon {
    color: white;
}

#alert-modal .modal-header.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

#alert-modal .modal-header.warning #alert-icon {
    color: white;
}

#alert-modal .modal-header.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

#alert-modal .modal-header.info #alert-icon {
    color: white;
}

#alert-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    text-align: center;
    padding: 1rem 0;
}

.confirm-modal {
    max-width: 500px;
}

#confirm-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    text-align: center;
    padding: 1rem 0;
}

/* Animación de entrada */
.modal-overlay.show .modal {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ====================================
   MODAL MODERNO PARA CREAR CATEGORÍA
   ==================================== */

.modal-modern {
    max-width: 600px;
    width: 90%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: none;
}

.modal-header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.modal-header-text {
    flex: 1;
}

.modal-header-text h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.modal-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

.modal-close-modern {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-modern:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-content-modern {
    padding: 2rem;
    background: #f8f9fa;
}

.form-group-modern {
    margin-bottom: 1.75rem;
}

.form-group-modern label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.form-group-modern label i {
    color: #667eea;
    font-size: 1.1rem;
}

.label-optional {
    font-size: 0.85rem;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 0.25rem;
}

.input-modern,
.textarea-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.input-modern:focus,
.textarea-modern:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-modern::placeholder,
.textarea-modern::placeholder {
    color: #94a3b8;
}

.textarea-modern {
    resize: vertical;
    min-height: 100px;
}

.input-hint {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* ==== ZONA DE SUBIDA DE IMAGEN ==== */

.image-upload-zone {
    width: 100%;
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.image-upload-zone:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.image-upload-zone.drag-over {
    border-color: #667eea;
    background: #f1f5f9;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.upload-placeholder i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.image-upload-zone:hover .upload-placeholder i {
    color: #667eea;
    transform: translateY(-5px);
}

.upload-placeholder h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.upload-placeholder p {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}

.upload-hint {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* ==== VISTA PREVIA DE IMAGEN ==== */

.image-preview-modern {
    width: 100%;
    height: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
}

.image-preview-modern img {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.remove-image-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-image-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ==== FOOTER MODERNO ==== */

.modal-footer-modern {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cancel-modern,
.btn-save-modern {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel-modern {
    background: #e2e8f0;
    color: #475569;
}

.btn-cancel-modern:hover {
    background: #cbd5e1;
    transform: translateY(-2px);
}

.btn-save-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-save-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-save-modern:active {
    transform: translateY(0);
}

/* ==== RESPONSIVE ==== */

@media (max-width: 768px) {
    .modal-modern {
        width: 95%;
        max-width: none;
        margin: 1rem;
    }
    
    .modal-header-gradient {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .modal-header-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .modal-header-text h3 {
        font-size: 1.5rem;
    }
    
    .modal-content-modern {
        padding: 1.5rem;
    }
    
    .modal-footer-modern {
        flex-direction: column-reverse;
    }
    
    .btn-cancel-modern,
    .btn-save-modern {
        width: 100%;
        justify-content: center;
    }
    
    .image-preview-modern img {
        max-height: 200px;
    }
}

/* ==== ANIMACIONES ==== */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-overlay.show .modal-modern {
    animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== MODAL ULTRA MODERNO ===== */

/* Modal Ultra */
.ultra-modal {
    max-width: 900px !important;
    max-height: 95vh !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: none !important;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    animation: ultraModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    backdrop-filter: blur(20px) !important;
}

@keyframes ultraModalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.9) rotateX(10deg);
    }
    50% {
        transform: translateY(-10px) scale(0.98) rotateX(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* Header Ultra */
.modal-header-ultra {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-bottom: none !important;
    padding: 32px 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    overflow: hidden !important;
}

.modal-header-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-icon i {
    font-size: 24px;
    color: white;
}

.header-text h2 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-text p {
    margin: 4px 0 0 0 !important;
    font-size: 16px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 400;
}

.close-btn-ultra {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    cursor: pointer !important;
    padding: 12px !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 18px !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    position: relative !important;
    z-index: 1 !important;
}

.close-btn-ultra:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05) rotate(90deg) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Form Ultra */
.ultra-form {
    padding: 40px !important;
    max-height: calc(95vh - 200px) !important;
    overflow-y: auto !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
}

.form-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.section-header i {
    font-size: 20px;
    color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

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

.form-group-ultra {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-ultra {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.label-ultra i {
    font-size: 16px;
    color: #667eea;
}

.input-ultra,
.select-ultra,
.textarea-ultra {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
    position: relative;
}

.input-ultra:focus,
.select-ultra:focus,
.textarea-ultra:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    z-index: 1;
}

.price-input {
    padding-left: 40px !important;
}

.textarea-ultra {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Image Upload Ultra */
.image-upload-ultra {
    margin-top: 8px;
}

.upload-zone-ultra {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-zone-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-zone-ultra:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.upload-zone-ultra:hover::before {
    opacity: 1;
}

.upload-placeholder-ultra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: #64748b;
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.upload-icon i {
    font-size: 36px;
    color: white;
}

.upload-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.upload-text p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #64748b;
}

.upload-text small {
    font-size: 12px;
    color: #94a3b8;
}

.image-preview-ultra {
    position: relative;
    display: inline-block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.image-preview-ultra img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 16px;
}

.image-preview-ultra:hover .image-overlay {
    opacity: 1;
}

.remove-btn-ultra,
.change-btn-ultra {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.remove-btn-ultra {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.remove-btn-ultra:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.change-btn-ultra {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.change-btn-ultra:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

/* Options Container Ultra */
.options-container-ultra {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.options-container-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    pointer-events: none;
}

.options-grid-ultra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.option-card-ultra {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.option-card-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-card-ultra:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.option-card-ultra:hover::before {
    opacity: 0.05;
}

.option-card-ultra input[type="checkbox"] {
    display: none;
}

.card-content {
    padding: 24px;
    position: relative;
    z-index: 1;
}

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

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.card-icon i {
    font-size: 20px;
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    margin-left: 16px;
}

.card-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    flex-shrink: 0;
}

.option-card-ultra input[type="checkbox"]:checked + .card-content .card-checkbox {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: scale(1.1);
}

.option-card-ultra input[type="checkbox"]:checked + .card-content .card-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.card-body {
    margin-top: 16px;
}

.option-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
}

.option-count i {
    font-size: 12px;
    color: #667eea;
}

/* Switch Ultra */
.switch-container-ultra {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.switch-ultra {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    position: relative;
}

.switch-ultra input[type="checkbox"] {
    display: none;
}

.slider-ultra {
    width: 60px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 16px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-ultra::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.switch-ultra input[type="checkbox"]:checked + .slider-ultra {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.switch-ultra input[type="checkbox"]:checked + .slider-ultra::before {
    transform: translateX(28px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.switch-content {
    flex: 1;
}

.switch-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    display: block;
}

.switch-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Footer Ultra */
.modal-footer-ultra {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-top: 1px solid #e2e8f0;
    padding: 32px 40px;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.modal-footer-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    pointer-events: none;
}

.btn-cancel-ultra,
.btn-save-ultra {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.btn-cancel-ultra {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-cancel-ultra:hover {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-save-ultra {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border: 2px solid transparent;
}

.btn-save-ultra:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-save-ultra:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Responsive Ultra */
@media (max-width: 768px) {
    .ultra-modal {
        max-width: 95vw !important;
        margin: 10px !important;
        max-height: 95vh !important;
        border-radius: 16px !important;
    }
    
    .ultra-form {
        padding: 24px !important;
    }
    
    .form-grid-ultra {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-footer-ultra {
        flex-direction: column;
        padding: 24px !important;
    }
    
    .btn-cancel-ultra,
    .btn-save-ultra {
        width: 100%;
        min-width: auto;
    }
    
    .upload-zone-ultra {
        padding: 24px !important;
        min-height: 150px !important;
    }
    
    .image-preview-ultra img {
        width: 150px !important;
        height: 150px !important;
    }
    
    .options-grid-ultra {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        gap: 16px;
    }
    
    .header-icon {
        width: 50px;
        height: 50px;
    }
    
    .header-text h2 {
        font-size: 24px !important;
    }
    
    .header-text p {
        font-size: 14px !important;
    }
}

/* MODAL ULTRA STYLES */
.modal-ultra {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.modal-header-ultra {
    background: linear-gradient(135deg, #8c9a7d, #6b7c5a);
    color: white;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-icon-ultra {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title-section h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.modal-desc-ultra {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.modal-content-ultra {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.form-ultra {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group-ultra {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label-ultra {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-input-ultra, .form-textarea-ultra {
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input-ultra:focus, .form-textarea-ultra:focus {
    outline: none;
    border-color: #8c9a7d;
    background: white;
    box-shadow: 0 0 0 3px rgba(140, 154, 125, 0.1);
}

.form-textarea-ultra {
    resize: vertical;
    min-height: 100px;
}

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

.form-help-ultra {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

.image-upload-ultra {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-ultra:hover {
    border-color: #8c9a7d;
    background: #f9fafb;
}

.image-input-ultra {
    display: none;
}

.image-preview-ultra {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder-ultra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6b7280;
}

.image-placeholder-ultra svg {
    opacity: 0.5;
}

.form-switch-ultra {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.form-switch-ultra input[type="checkbox"] {
    display: none;
}

.form-switch-slider {
    width: 50px;
    height: 26px;
    background: #d1d5db;
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.form-switch-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch-ultra input[type="checkbox"]:checked + .form-switch-slider {
    background: #8c9a7d;
}

.form-switch-ultra input[type="checkbox"]:checked + .form-switch-slider::before {
    transform: translateX(24px);
}

.form-switch-label {
    font-weight: 500;
    color: #374151;
}

.modal-footer-ultra {
    padding: 30px;
    background: #f9fafb;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-ultra {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-ultra {
    background: linear-gradient(135deg, #8c9a7d, #6b7c5a);
    color: white;
}

.btn-primary-ultra:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(140, 154, 125, 0.3);
}

.btn-secondary-ultra {
    background: #6b7280;
    color: white;
}

.btn-secondary-ultra:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.modal-close-float {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-float:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .modal-ultra {
        width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header-ultra {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .modal-content-ultra {
        padding: 20px;
    }
    
    .modal-footer-ultra {
        padding: 20px;
        flex-direction: column;
    }
    
    .form-row-ultra {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ========================================
   REWARDS SECTION - ULTRA MODERN UI/UX
   ======================================== */

/* === SECTION HEADER === */
#recompensas-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#recompensas-section .section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

#recompensas-section .section-header h2::before {
    content: '🎁';
    font-size: 2rem;
}

/* === FILTERS SECTION === */
.filters-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.filter-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.search-input,
.filter-select {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    padding-left: 48px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

.search-input::placeholder {
    color: #94a3b8;
}

/* === TABLE IMPROVEMENTS === */
#recompensas-section .table-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

#recompensas-section .data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#recompensas-section .data-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#recompensas-section .data-table th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}

#recompensas-section .data-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

#recompensas-section .data-table tbody tr:hover {
    background: #f8fafc;
}

#recompensas-section .data-table td {
    padding: 16px;
    color: #64748b;
    font-size: 0.9rem;
    vertical-align: middle;
}

/* === TABLE IMAGE STYLING === */
#recompensas-section .table-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#recompensas-section .table-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover;
    display: block;
}

/* === BADGES STYLING === */
.points-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(140, 154, 125, 0.08);
    color: #6b7c5a;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(140, 154, 125, 0.15);
}

.points-badge::before {
    content: '⭐';
    font-size: 0.9rem;
}

.stock-unlimited,
.stock-limited,
.stock-out {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
}

.stock-unlimited {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.stock-unlimited::before {
    content: '∞';
    font-size: 1.1rem;
    font-weight: 700;
}

.stock-limited {
    background: rgba(251, 191, 36, 0.08);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.stock-limited::before {
    content: '📦';
    font-size: 0.9rem;
}

.stock-out {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.stock-out::before {
    content: '❌';
    font-size: 0.9rem;
}

#recompensas-section .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
}

#recompensas-section .status-badge.active {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

#recompensas-section .status-badge.active::before {
    content: '✓';
    font-weight: 700;
}

#recompensas-section .status-badge.inactive {
    background: rgba(107, 114, 128, 0.08);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.15);
}

#recompensas-section .status-badge.inactive::before {
    content: '○';
}

/* === ACTION BUTTONS === */
#recompensas-section .action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

#recompensas-section .btn-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

#recompensas-section .btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

#recompensas-section .btn-edit:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#recompensas-section .btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

#recompensas-section .btn-delete:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* === PAGINATION === */
.pagination-container {
    background: #ffffff;
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-pagination {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.btn-pagination:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-pagination:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#rewards-page-numbers {
    display: flex;
    gap: 4px;
    padding: 0 8px;
}

/* === PRIMARY BUTTON === */
#recompensas-section .btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8c9a7d 0%, #6b7c5a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(140, 154, 125, 0.2);
}

#recompensas-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(140, 154, 125, 0.3);
}

#recompensas-section .btn-primary:active {
    transform: translateY(0px);
}

#recompensas-section .btn-primary i {
    font-size: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .filter-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #recompensas-section .data-table {
        font-size: 0.85rem;
    }
    
    #recompensas-section .data-table th,
    #recompensas-section .data-table td {
        padding: 12px 10px;
    }
}

@media (max-width: 768px) {
    #recompensas-section .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    #recompensas-section .section-header h2 {
        font-size: 1.5rem;
    }
    
    .filters-section {
        padding: 16px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 16px;
    }
    
    #recompensas-section .table-image {
        width: 50px;
        height: 50px;
    }
    
    #recompensas-section .btn-action {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* ===== ESTILOS PARA BOTONES DE PRODUCTOS ===== */
.products-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-export,
.btn-import,
.btn-template,
.btn-bulk {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-export {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-export:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-import {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-import:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-template {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.btn-template:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-bulk {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-bulk:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-export i,
.btn-import i,
.btn-template i,
.btn-bulk i {
    font-size: 1.1rem;
}

/* ===== ESTADÍSTICAS ===== */
.stats-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.stat-card.blue { border-left: 4px solid #3b82f6; }
.stat-card.green { border-left: 4px solid #10b981; }
.stat-card.purple { border-left: 4px solid #8b5cf6; }
.stat-card.orange { border-left: 4px solid #f59e0b; }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.stat-card.purple .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.stats-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stats-panel.full-width {
    grid-column: 1 / -1;
}

.panel-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.panel-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #1e293b;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.panel-body {
    min-height: 200px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #94a3b8;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-rank-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.product-rank-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8c9a7d, #6b7c5a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.rank-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.rank-info {
    flex: 1;
}

.rank-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.rank-quantity {
    font-size: 0.85rem;
    color: #64748b;
}

.rank-sales {
    font-weight: 700;
    color: #10b981;
    font-size: 1.1rem;
}

.category-bar {
    margin-bottom: 1rem;
}

.category-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: #1e293b;
}

.category-amount {
    font-weight: 700;
    color: #10b981;
}

.category-bar-fill {
    height: 32px;
    background: linear-gradient(90deg, #8c9a7d, #6b7c5a);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: width 0.6s ease;
}

.stock-alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.stock-alert-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.stock-alert-info {
    flex: 1;
}

.stock-alert-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stock-alert-quantity {
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 600;
}

.weekly-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 200px;
    padding: 1rem 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, #8c9a7d, #6b7c5a);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: translateY(-4px);
}

.chart-bar-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

.chart-bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .products-actions {
        flex-wrap: wrap;
    }
    
    .btn-export,
    .btn-import,
    .btn-template {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* ===== ESTILOS PARA MODAL DE IMPORTACIÓN ===== */
#import-csv-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.import-instructions {
    margin-bottom: 24px;
}

.info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    align-items: flex-start;
}

.info-box i {
    font-size: 1.5rem;
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box strong {
    color: #1e40af;
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.info-box p {
    color: #1e3a8a;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-box code {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #1e40af;
}

.upload-drop-zone {
    margin: 24px 0;
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
}

.upload-area i {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 16px;
    display: block;
}

.upload-drop-zone:hover .upload-area i,
.upload-drop-zone.drag-over .upload-area i {
    color: #3b82f6;
    transform: scale(1.1);
}

.upload-area h4 {
    font-size: 1.25rem;
    color: #1e293b;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.upload-area p {
    color: #64748b;
    margin: 0 0 12px 0;
    font-size: 0.95rem;
}

.upload-area small {
    color: #94a3b8;
    font-size: 0.85rem;
}

.csv-preview-container {
    margin-top: 24px;
    animation: slideDown 0.3s ease;
}

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

.csv-preview-container h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.csv-preview-container h4 i {
    color: #3b82f6;
}

.csv-preview-table {
    max-height: 400px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    background: white;
}

.csv-preview-table table {
    width: 100%;
    border-collapse: collapse;
}

.csv-preview-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.csv-preview-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.csv-preview-table tr:hover {
    background: #f8fafc;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.progress-container {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    animation: slideDown 0.3s ease;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.import-results {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    animation: slideDown 0.3s ease;
}

.import-results .success-content,
.import-results .error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.import-results .success-content {
    color: #059669;
}

.import-results .error-content {
    color: #dc2626;
}

.import-results i {
    font-size: 2rem;
}

.import-results h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.import-results p {
    margin: 0;
    color: #64748b;
}

@media (max-width: 768px) {
    .upload-drop-zone {
        padding: 32px 16px;
    }
    
    .upload-area i {
        font-size: 3rem;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .preview-actions button {
        width: 100%;
    }
}
