/* ==========================================================================
   ReferencIA - Aplicación de Gestión de Casos Médicos
   ========================================================================== */

/* Variables CSS Globales */
:root {
    /* Colores Primarios - Fintech Premium */
    --primary-color: #0A2540;
    --primary-dark: #081d33;
    --primary-light: #1A4B7C;
    
    --secondary-color: #6B7A90;
    --accent-color: #5B8DEF;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    /* Colores de Texto */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --dark-color: #0A2540;
    --light-color: #F8FAFB;
    
    /* Gradientes - Navy Premium */
    --gradient-primary: linear-gradient(135deg, #0A2540 0%, #1A4B7C 50%, #5B8DEF 100%);
    --gradient-accent: linear-gradient(135deg, #5B8DEF 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-info: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Bordes */
    --border-radius: 15px;
    --border-radius-lg: 25px;
    --border-color: #E8ECF1;
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Fuentes */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
}

/* Reset y Base */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--light-color);
    line-height: 1.6;
}

/* Contenedor Principal con espaciado */
.main-container {
    padding: 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem 1.5rem;
    }
}

/* Componentes Globales */

/* Cards Modernos */
.modern-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Botones Modernos */
.btn-modern-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-modern-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-modern-secondary {
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-modern-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Alertas Modernas */
.alert-modern-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-modern-danger {
    background: linear-gradient(135deg, #ffcccb 0%, #ffa8a5 100%);
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-modern-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-modern-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Formularios Modernos */
.form-modern {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group-modern .input-group-text {
    background: var(--light-color);
    border: none;
    color: var(--primary-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group-modern .form-control {
    background: var(--light-color);
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Títulos Modernos */
.modern-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.modern-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Navegación Moderna */
.modern-navbar {
    background: var(--gradient-primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 3rem;
    margin: 0;
}

@media (max-width: 768px) {
    .modern-navbar {
        padding: var(--spacing-md) 1.5rem;
    }
}

.modern-navbar .navbar-brand {
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: white !important;
}

.logo-container {
    background: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-navbar .navbar-logo {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.modern-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    margin: 0 var(--spacing-xs);
}

.modern-navbar .nav-link:hover,
.modern-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    transform: translateY(-1px);
}

/* Tablas Modernas */
.table-modern {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-modern thead {
    background: var(--light-color);
}

.table-modern th {
    border: none;
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--spacing-lg);
}

.table-modern td {
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.table-modern tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Modales Modernos */
.modal-modern .modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-modern .modal-header {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: var(--spacing-xl);
}

.modal-modern .modal-body {
    padding: var(--spacing-xl);
}

.modal-modern .modal-footer {
    background: var(--light-color);
    border: none;
    padding: var(--spacing-lg) var(--spacing-xl);
}

/* Navegación Pills - Reportes */
.nav-pills .nav-link {
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 0.75rem 1.25rem;
}

.nav-pills .nav-link:hover {
    background: rgba(10, 37, 64, 0.1);
    color: var(--primary-color);
}

.nav-pills .nav-link.active {
    background: var(--gradient-primary);
    color: white !important;
    box-shadow: var(--shadow-sm);
}

.nav-pills .nav-link i {
    transition: transform 0.3s ease;
}

.nav-pills .nav-link.active i,
.nav-pills .nav-link:hover i {
    transform: scale(1.1);
}

/* Badges Modernos */
.badge-modern {
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: var(--font-size-xs);
}

.badge-modern-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-modern-danger {
    background: var(--gradient-accent);
    color: white;
}

.badge-modern-success {
    background: var(--gradient-success);
    color: white;
}

/* Avatar Circle */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: var(--font-size-sm);
}

.avatar-circle-lg {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-lg);
}

/* Estadísticas Cards */
.stats-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-lg);
}

.stats-card-icon-primary {
    background: var(--gradient-primary);
}

.stats-card-icon-danger {
    background: var(--gradient-accent);
}

.stats-card-icon-success {
    background: var(--gradient-success);
}

.stats-card-icon-info {
    background: var(--gradient-info);
}

/* Utilidades de Responsive */
@media (max-width: 768px) {
    .modern-card {
        border-radius: var(--border-radius);
        margin-bottom: var(--spacing-md);
    }
    
    .btn-modern-primary,
    .btn-modern-secondary {
        width: 100%;
        justify-content: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .modern-title {
        font-size: var(--font-size-2xl);
    }
}
