/* Estilos personalizados para el Sistema de Proformas */

:root {
    --primary-color: #009238;
    --secondary-color: #ff6600;
    --primary-hover: #007a2e;
    --secondary-hover: #e55c00;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
}

/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Sidebar */
.sidebar {
    background-color: var(--dark-gray);
    color: white;
    min-height: calc(100vh - 56px);
    transition: all 0.3s;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 0;
    padding: 0.8rem 1rem;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: rgba(255, 255, 255, 1);
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.sidebar .active {
    background-color: var(--secondary-color);
    color: white;
    border-left: 4px solid white;
}

/* Botones */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
}

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: rgba(0, 146, 56, 0.1);
    border-bottom: 1px solid rgba(0, 146, 56, 0.2);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

/* Tablas */
.table th {
    background-color: rgba(0, 146, 56, 0.1);
    border-color: rgba(0, 146, 56, 0.2);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 146, 56, 0.05);
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* Formularios */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.2rem rgba(0, 146, 56, 0.25);
}

.form-label {
    font-weight: 500;
}

/* Proforma */
.proforma-details {
    border: 1px solid rgba(0, 146, 56, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    background-color: white;
}

.proforma-details .header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.proforma-details .footer {
    border-top: 2px solid var(--primary-color);
    padding-top: 1rem;
    margin-top: 1.5rem;
}

/* Badges */
.badge {
    padding: 0.4em 0.6em;
    font-weight: 500;
}

/* Toast notifications */
.toast {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        z-index: 1000;
        min-height: auto;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

/* Print styles */
@media print {
    @page {
        size: auto;
        margin: 10mm;
    }
    
    body {
        background-color: #fff !important;
    }
    
    .no-print, .btn-toolbar, .navbar, .sidebar, .alert {
        display: none !important;
    }
    
    .container-fluid {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .printable {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .proforma-details {
        border: none;
    }
}

/* Animation for loading */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}