/* ============================================
   PLATAFORMA ACADÉMICA UTH - ESTILOS PRINCIPALES
   Paleta de colores institucional verde
   ============================================ */

:root {
    /* Colores Institucionales UTH - Paleta Profesional Mejorada */
    --primary-dark: #0d4a35;
    --primary: #1e6b4f;
    --primary-light: #2e8c6a;
    --primary-lighter: #3dad86;
    --primary-pale: #e8f5f0;
    
    /* Colores de acento profesionales */
    --accent-gold: #c9a959;
    --accent-orange: #e07a5f;
    --accent-blue: #3d5a80;
    --accent-purple: #6d597a;
    --accent-teal: #52796f;
    
    /* Colores neutros modernos */
    --bg-body: #f0f4f2;
    --bg-card: #ffffff;
    --bg-soft: #f8faf9;
    --text-primary: #1a2e2a;
    --text-secondary: #4a5f5a;
    --text-muted: #7a8f8a;
    --border-color: #e0e8e4;
    
    /* Sombras sofisticadas con tono verde */
    --shadow-sm: 0 2px 4px rgba(13, 74, 53, 0.08);
    --shadow-md: 0 4px 12px rgba(13, 74, 53, 0.12);
    --shadow-lg: 0 8px 24px rgba(13, 74, 53, 0.15);
    --shadow-xl: 0 12px 32px rgba(13, 74, 53, 0.18);
    
    /* Bordes modernos */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    
    /* Transiciones fluidas */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Gradientes institucionales */
    --gradient-primary: linear-gradient(135deg, var(--primary-dark), var(--primary));
    --gradient-light: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    --gradient-soft: linear-gradient(135deg, var(--primary-pale), #ffffff);
}

/* ============================================
   RESET Y BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.3; }
h3 { font-size: 1.75rem; line-height: 1.4; }
h4 { font-size: 1.5rem; line-height: 1.4; }
h5 { font-size: 1.25rem; line-height: 1.5; }
h6 { font-size: 1rem; line-height: 1.5; }

.text-gradient {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */

.navbar-custom {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
    color: white !important;
}

.navbar-brand:hover {
    color: var(--primary-pale) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
}

.user-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: white;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-fast);
}

.user-pill:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   TARJETAS Y PANELES
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-pale), white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 16px rgba(45, 106, 79, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    color: white;
    box-shadow: 0 4px 12px rgba(64, 145, 108, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 6px 16px rgba(64, 145, 108, 0.4);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.btn-rounded {
    border-radius: 50px;
}

.btn-pill {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    background: var(--bg-card);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
    background: white;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    background: var(--bg-card);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
    background: white;
}

/* ============================================
   TABLAS
   ============================================ */

.table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--primary-pale);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, var(--accent-orange), #e63946);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, var(--accent-blue), #48cae4);
    color: white;
}

.badge-secondary {
    background: var(--text-secondary);
    color: white;
}

/* ============================================
   ALERTAS
   ============================================ */

.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, var(--primary-pale), #e8f5e9);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: var(--accent-orange);
    border-left: 4px solid var(--accent-orange);
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: var(--accent-blue);
    border-left: 4px solid var(--accent-blue);
}

/* ============================================
   SPINNERS Y CARGANDO
   ============================================ */

.spinner-border {
    border-color: var(--primary);
    border-right-color: transparent;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

/* ============================================
   UTILIDADES
   ============================================ */

.text-primary-custom {
    color: var(--primary) !important;
}

.bg-primary-custom {
    background: var(--primary) !important;
}

.border-primary-custom {
    border-color: var(--primary) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md);
}

.rounded-custom {
    border-radius: var(--radius-md);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 2rem 0;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

.pulse-on-hover:hover {
    animation: pulse 0.5s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .card {
        border-radius: var(--radius-md);
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--radius-sm);
    }
}