/* Estilos personalizados para el sistema multitienda */

:root {
    --primary-color: #4e73df;
    --success-color: #0f766e;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --info-color: #36b9cc;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
}

body {
    background-color: var(--light-color);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Navbar personalizado */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Cards personalizadas */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: var(--primary-color);
}

/* Botones personalizados */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Formularios personalizados */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #d1d3e2;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Alertas personalizadas */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
}

.alert-success {
    background-color: rgba(28, 200, 138, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(231, 74, 59, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: rgba(246, 194, 62, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: rgba(54, 185, 204, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* Tablas personalizadas */
.table {
    background-color: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #e3e6f0;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.table tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Badges personalizados */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

/* Badges personalizados para packs y bonos */
.pack-badge {
    background-color: #ff9800 !important;
    color: white !important;
}

.pack-badge-edit {
    cursor: pointer;
    font-size: .65rem !important;
    padding: 3px 6px !important;
}
.pack-badge-edit:hover {
    filter: brightness(1.08);
    box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.55);
}

.cart-item.cart-item-from-pack {
    border-left: 3px solid #ff9800;
}

.bono-badge {
    background-color: #9c27b0 !important;
    color: white !important;
}

.pack-seleccion-badge {
    background-color: #0d9488 !important;
    color: #fff !important;
}

/* Fondo suave pack selección (TPV / listados) */
.item-card.pack-seleccion,
.cart-item.cart-item-pack-seleccion,
tr.row-pack-seleccion > td {
    background-color: #e6f7f5 !important;
    color: #134e4a;
}

.item-card.pack-seleccion {
    border-color: #99f6e4;
    border-left: 4px solid #0d9488;
}

.item-card.pack-seleccion .item-name,
.item-card.pack-seleccion .item-price,
.cart-item.cart-item-pack-seleccion {
    color: #134e4a;
}

.item-card.pack-seleccion:hover {
    border-color: #0d9488;
    background-color: #ccfbf1 !important;
}

/* Sidebar y navegación */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 10%, #224abe 100%);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

/* Dashboard cards */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: var(--dark-color) !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-xs {
    font-size: 0.7rem !important;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .table-responsive {
        border-radius: 0.75rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar - solo para scrollbars horizontales */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

/* Scrollbar vertical con colores neutros */
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Scrollbar horizontal con color primario solo para elementos específicos */
.appointments-grid::-webkit-scrollbar {
    height: 8px;
}

.appointments-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.appointments-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.appointments-grid::-webkit-scrollbar-thumb:hover {
    background: #224abe;
}

/* Alertas estilo modal moderno */
.alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.alert-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.alert-modal-header {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: #000;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.alert-modal-header.warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: #000;
}

.alert-modal-header.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.alert-modal-header.danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74a3b 100%);
    color: #fff;
}

.alert-modal-header.info {
    background: linear-gradient(135deg, #17a2b8 0%, #36b9cc 100%);
    color: #fff;
}

.alert-modal-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.alert-modal-body {
    padding: 32px 24px;
    text-align: center;
}

.alert-modal-icon-large {
    font-size: 4rem;
    color: #ffc107;
    margin-bottom: 20px;
    display: block;
}

.alert-modal-icon-large.success {
    color: #28a745;
}

.alert-modal-icon-large.danger {
    color: #dc3545;
}

.alert-modal-icon-large.info {
    color: #17a2b8;
}

.alert-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.alert-modal-message {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.alert-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.alert-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.alert-modal-btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.alert-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.alert-modal-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.alert-modal-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.alert-modal-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.alert-modal-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.alert-modal-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.alert-modal-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Alertas inline mejoradas */
.alert-enhanced {
    border: none;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    animation: alertFadeIn 0.3s ease-out;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-enhanced .alert-icon {
    font-size: 1.5rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-enhanced .alert-content {
    flex: 1;
}

.alert-enhanced .alert-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.alert-enhanced .alert-message {
    margin-bottom: 0;
    line-height: 1.5;
}

.alert-enhanced .alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

.alert-enhanced .alert-close:hover {
    opacity: 1;
}

.alert-enhanced.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-enhanced.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(231, 74, 59, 0.1) 100%);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-enhanced.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 143, 0, 0.1) 100%);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-enhanced.info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(54, 185, 204, 0.1) 100%);
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Responsive para alertas */
@media (max-width: 768px) {
    .alert-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .alert-modal-body {
        padding: 24px 20px;
    }
    
    .alert-modal-actions {
        flex-direction: column;
    }
    
    .alert-modal-btn {
        width: 100%;
        min-width: auto;
    }
    
    .alert-enhanced {
        padding: 16px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .alert-enhanced .alert-close {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Botones de acción en línea - COLORIDOS */
.d-flex.gap-1 .btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.25rem !important;
    transition: all 0.15s ease-in-out !important;
    font-size: 0.875rem !important;
    border: none !important;
    color: #000 !important;
}

/* Botón Imprimir - Azul */
.d-flex.gap-1 .btn-outline-primary {
    background-color: #007bff !important;
    color: #000 !important;
}

.d-flex.gap-1 .btn-outline-primary:hover {
    background-color: #0056b3 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.3) !important;
}

/* Botón Ticket regalo - Verde */
.d-flex.gap-1 .btn-outline-success {
    background-color: #28a745 !important;
    color: #000 !important;
}

.d-flex.gap-1 .btn-outline-success:hover {
    background-color: #1e7e34 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.25rem 0.5rem rgba(40, 167, 69, 0.3) !important;
}

/* Botón Crear albarán - Azul claro */
.d-flex.gap-1 .btn-outline-info {
    background-color: #17a2b8 !important;
    color: #000 !important;
}

.d-flex.gap-1 .btn-outline-info:hover {
    background-color: #138496 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.25rem 0.5rem rgba(23, 162, 184, 0.3) !important;
}

/* Botón Crear factura - Amarillo */
.d-flex.gap-1 .btn-outline-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.d-flex.gap-1 .btn-outline-warning:hover {
    background-color: #e0a800 !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.25rem 0.5rem rgba(255, 193, 7, 0.3) !important;
}

/* Botón Generar devolución - Rojo */
.d-flex.gap-1 .btn-outline-danger {
    background-color: #dc3545 !important;
    color: #000 !important;
}

.d-flex.gap-1 .btn-outline-danger:hover {
    background-color: #c82333 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.25rem 0.5rem rgba(220, 53, 69, 0.3) !important;
}

.d-flex.gap-1 .btn:active {
    transform: translateY(0) !important;
}

/* Asegurar que los botones se vean bien en la tabla */
.table td .d-flex.gap-1 {
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
}





