/**
 * ESTILOS PRINCIPALES - DIGITAL SMART
 * Sistema de Ventas e Inventario
 * Tema: Blanco y Rojo Moderno
 */

/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
    --primary-color: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #ff4d5a;
    --secondary-color: #ffffff;
    --accent-color: #f8f9fa;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: auto;
    width: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--accent-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: auto;
    min-width: 320px;
}

/* ========================================
   UTILIDADES
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* ========================================
   BOTONES MODERNOS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #a8001a);
    box-shadow: 0 8px 16px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    box-shadow: 0 8px 16px rgba(108, 117, 125, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: white;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 8px 16px rgba(46, 204, 113, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 8px 16px rgba(243, 156, 18, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.4);
}

.btn-outline {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 6px 12px rgba(230, 57, 70, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 10px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 14px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========================================
   FORMULARIOS MODERNOS
   ======================================== */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(to bottom, #ffffff, #fafafa);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    color: var(--text-dark);
}

.form-control:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 
        0 0 0 4px rgba(230, 57, 70, 0.1),
        0 4px 12px rgba(230, 57, 70, 0.15);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #b0b0b0;
    font-weight: 400;
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-control:disabled:hover {
    border-color: #e8e8e8;
    box-shadow: none;
    transform: none;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e63946' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Input con icono */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 48px;
}

.input-icon-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 16px;
    transition: var(--transition);
    pointer-events: none;
}

.input-icon-wrapper .form-control:focus + i,
.input-icon-wrapper .form-control:hover + i {
    color: var(--primary-dark);
}

/* Validación visual */
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%232ecc71' d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.78 5.22a.75.75 0 0 0-1.06 0L7 8.94 5.28 7.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.06 0l4.25-4.25a.75.75 0 0 0 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23e74c3c' d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.22 11.78a.75.75 0 0 0 0 1.06.75.75 0 0 0 1.06 0L8 10.12l2.72 2.72a.75.75 0 0 0 1.06 0 .75.75 0 0 0 0-1.06L9.06 9.06l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 7.94 5.28 5.22a.75.75 0 0 0-1.06 0L6.94 7.94 4.22 10.66v1.12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

/* ========================================
   ALERTAS
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

/* ========================================
   TARJETAS MODERNAS
   ======================================== */
.card {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(230, 57, 70, 0.04);
    padding: 0;
    margin-bottom: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(230, 57, 70, 0.06);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e63946, #c1121f, #e63946);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    box-shadow: 
        0 12px 32px rgba(230, 57, 70, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: rgba(230, 57, 70, 0.12);
}

.card-header {
    padding: 24px 28px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(230, 57, 70, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.02), rgba(230, 57, 70, 0.01));
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    color: var(--primary-color);
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(230, 57, 70, 0.2));
}

.card-body {
    padding: 28px;
}

.card-footer {
    padding: 20px 28px;
    margin-top: 0;
    border-top: 1px solid rgba(230, 57, 70, 0.08);
    background: rgba(230, 57, 70, 0.01);
}

/* ========================================
   TABLAS MODERNAS
   ======================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin: 0;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    margin: 0;
    min-width: 600px;
}

.table thead {
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.table thead th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: none;
}

.table thead th:first-child {
    border-radius: 16px 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 16px 0 0;
}

.table tbody tr {
    border-bottom: 1px solid rgba(230, 57, 70, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background: linear-gradient(to right, rgba(230, 57, 70, 0.04), rgba(230, 57, 70, 0.08));
    transform: scale(1.008);
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.08);
}

.table tbody td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-dark);
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.table tbody td code {
    background: rgba(230, 57, 70, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   VISTA MÓVIL - TARJETAS DE PRODUCTO (COMPACTO)
   ======================================== */
@media (max-width: 768px) {
    .table thead {
        display: none; /* Ocultar encabezados en móvil */
    }
    
    .table tbody tr {
        border-bottom: none;
        background: transparent;
    }
    
    .mobile-product-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid rgba(230, 57, 70, 0.06);
        transition: all 0.3s ease;
    }
    
    .mobile-product-card:active {
        transform: scale(0.98);
    }
    
    .mobile-card-header {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
        border-bottom: 1px solid rgba(230, 57, 70, 0.05);
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-card-image {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 6px;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }
    
    .mobile-card-info {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 120px);
    }
    
    .mobile-product-name {
        margin: 0 0 3px 0;
        font-size: 12px;
        font-weight: 600;
        color: #2d3436;
        line-height: 1.2;
        word-wrap: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    
    .mobile-quick-info {
        display: flex;
        gap: 4px;
        flex-wrap: nowrap;
    }
    
    .mobile-badge {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        padding: 2px 4px;
        border-radius: 4px;
        font-size: 9px;
        font-weight: 600;
        white-space: nowrap;
    }
    
    /* Precios debajo del header */
    .mobile-card-prices {
        padding: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: white;
        gap: 6px;
    }
    
    .mobile-price {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .mobile-price-cost {
        background: rgba(102, 126, 234, 0.05);
        padding: 6px 10px;
        border-radius: 8px;
    }
    
    .price-label {
        font-size: 10px;
        font-weight: 600;
        color: #95a5a6;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .price-value {
        font-size: 16px;
        font-weight: 700;
        color: #2d3436;
    }
    
    .mobile-price-cost .price-value {
        color: #667eea;
    }
    
    /* Botones al lado derecho */
    .mobile-card-actions-side {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex-shrink: 0;
        min-width: 36px;
    }
    
    .btn-mobile-action {
        width: 32px;
        height: 32px;
        min-width: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    }
    
    .btn-mobile-action:active {
        transform: scale(0.92);
    }
    
    .btn-mobile-edit {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .btn-mobile-edit:hover,
    .btn-mobile-edit:active {
        background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    .btn-mobile-delete {
        background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
        color: white;
    }
    
    .btn-mobile-delete:hover,
    .btn-mobile-delete:active {
        background: linear-gradient(135deg, #d32f3c 0%, #a80f1a 100%);
        box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
    }
    
    /* Ajustar tabla para móvil */
    .table-responsive {
        border-radius: 0;
        box-shadow: none;
        padding: 8px;
        background: #f8f9fa;
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .table {
        min-width: 0;
        width: 100%;
    }
    
    .mobile-product-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ========================================
   MODALES MODERNOS
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #fafbfc);
    border-radius: 20px 20px 0 0;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px solid #e8e8e8;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.modal-close:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
    background: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.15);
    transform: scale(1.05);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
    border-radius: 0 0 20px 20px;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner {
    border: 3px solid rgba(230, 57, 70, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ========================================
   GRID SYSTEM
   ======================================== */
.row {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.row-2 { grid-template-columns: repeat(2, 1fr); }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .row-4 { grid-template-columns: repeat(2, 1fr); }
    .row-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .row-2, .row-3, .row-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 10px;
        font-size: 13px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px;
        font-size: 12px;
    }
    
    .form-control {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideUp 0.5s ease;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.08));
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.badge-success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(46, 204, 113, 0.08));
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.08));
    color: #c1121f;
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(243, 156, 18, 0.08));
    color: #e67e22;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.badge-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.08));
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

/* ========================================
   SCROLLBAR PERSONALIZADO
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--accent-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   TOASTS / NOTIFICACIONES
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 24px;
    flex-shrink: 0;
}

.toast span {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

/* Toast de éxito */
.toast-success {
    border-left-color: #2ecc71;
}

.toast-success i {
    color: #2ecc71;
}

/* Toast de error */
.toast-error {
    border-left-color: #e74c3c;
}

.toast-error i {
    color: #e74c3c;
}

/* Toast de advertencia */
.toast-warning {
    border-left-color: #f39c12;
}

.toast-warning i {
    color: #f39c12;
}

/* Toast de información */
.toast-info {
    border-left-color: #3498db;
}

.toast-info i {
    color: #3498db;
}

/* Animación de entrada */
@keyframes slideInRight {
    from {
        transform: translateX(450px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animación de salida */
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 14px 16px;
    }
    
    .toast i {
        font-size: 20px;
    }
    
    .toast span {
        font-size: 13px;
    }
}

/* ========================================
   ALERTAS
   ======================================== */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(46, 204, 113, 0.08));
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.alert-error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.08));
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(243, 156, 18, 0.08));
    color: #e67e22;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.08));
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* ========================================
   MODAL DE IMAGEN DE PRODUCTO
   ======================================== */
#imageModal .modal-content {
    background: transparent;
    box-shadow: none;
    max-width: 95%;
    max-height: 95vh;
    padding: 0;
}

#imageModalContent {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: white;
    padding: 10px;
}

/* Efecto hover en imágenes de productos */
.product-image-clickable:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
