/* CRM Sanitas - Estilos */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.container-fluid {
    flex: 1;
}

/* Navbar */
.navbar-brand i {
    margin-right: 5px;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Dashboard Stats */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s;
}

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

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: var(--success-color); }
.stat-card.warning { border-left-color: var(--warning-color); }
.stat-card.danger { border-left-color: var(--danger-color); }
.stat-card.info { border-left-color: var(--info-color); }

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Tables */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-label {
    font-weight: 500;
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

/* Alerts/Badges */
.badge-estado {
    font-size: 0.8rem;
    padding: 0.4em 0.8em;
}

.estado-vigente { background-color: var(--success-color); }
.estado-vencida { background-color: var(--danger-color); }
.estado-cancelada { background-color: var(--secondary-color); }
.estado-suspendida { background-color: var(--warning-color); color: #000; }
.estado-proceso { background-color: var(--info-color); }

.prioridad-alta { background-color: var(--danger-color); }
.prioridad-media { background-color: var(--warning-color); color: #000; }
.prioridad-baja { background-color: var(--info-color); }

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary-color);
}

.login-logo h1 {
    font-size: 1.5rem;
    margin-top: 1rem;
    color: var(--primary-color);
}

/* File Upload */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.file-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-item .file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2rem;
    color: var(--secondary-color);
}

.file-item .file-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
}

/* Calendar/Alertas */
.alerta-item {
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border-radius: 0 0.5rem 0.5rem 0;
}

.alerta-item.alta { border-left-color: var(--danger-color); }
.alerta-item.media { border-left-color: var(--warning-color); }
.alerta-item.baja { border-left-color: var(--info-color); }

.alerta-item.completada {
    opacity: 0.6;
    text-decoration: line-through;
}

/* Timeline/Notas */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
}

.timeline-item .timeline-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* DataTables customization */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
}

/* Print styles */
@media print {
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
}
