:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #f7f9fc;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e17055;
    --info-color: #74b9ff;
    --gradient-start: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px 0;
}

.main-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-start);
}

/* Header styling */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.page-header h1 {
    background: var(--gradient-start);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
    color: var(--dark-color);
    opacity: 0.8;
    font-size: 1.1rem;
}

/* Form styling */
.form-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(108, 92, 231, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-select, .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    outline: none;
}

/* Campos container */
#campos_container {
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border: 2px dashed #e9ecef;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#campos_container.loading {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, #f0f2ff 0%, #f8f9ff 100%);
}

/* Checkboxes styling */
.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.form-check-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-check-label:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-start);
    border: none;
    border-radius: 12px;
    padding: 12px 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.btn-primary:disabled {
    background: #ced4da;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.btn-primary i, .btn-success i, .btn-info i {
    margin-right: 8px;
}

/* Alertas y mensajes */
.text-muted {
    color: #6c757d !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
        margin: 10px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .form-card {
        padding: 1.5rem;
    }
}

/* Reporte page styling */
.report-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
}

.report-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
}

.table {
    background: white;
}

.table th {
    background: var(--gradient-start);
    color: white;
    font-weight: 600;
    border: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(108, 92, 231, 0.05);
}

/* Print improvements */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .main-container {
        box-shadow: none;
        border-radius: 0;
    }

    .btn {
        display: none !important;
    }

    .no-print {
        display: none;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Dashboard styling */
.stat-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.card-title {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.chart-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.chart-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
}
