/* ============================================================
   SIACEP — Login | Paleta Oficial UAGro
   Azul Principal  #1A3A6B / #2E5FA3
   Azul  #1A3A6B / #2E5FA3
   Rojo  #C8102E  — SOLO acentos mínimos (iconos tab activo, error)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    margin: 0; padding: 0;
    background: #c0392b;
    background-image: linear-gradient(135deg, #c0392b 0%, #8e1a2e 25%, #6a1a6a 50%, #1a2a8b 75%, #1a3a9b 100%);
    position: relative;
    overflow-x: hidden;
}

/* Patrón de puntos sutil */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: none;
    pointer-events: none;
    z-index: 0;
}

/* Círculo decorativo — azul UAGro */
body::after {
    content: '';
    position: fixed;
    bottom: -120px; left: -120px;
    width: 380px; height: 380px;
    border-radius: 50%;
    border: 50px solid rgba(26,58,107,0.12);
    pointer-events: none; z-index: 0;
}

.container { position: relative; z-index: 1; }

/* === TARJETA LOGIN === */
.login-container {
    max-width: 620px;
    width: 100%;
    margin: 4vh auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 40px 90px rgba(0,0,0,0.60), 0 0 0 1px rgba(26,58,107,0.10);
    padding: 44px 48px 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
}

/* Borde izquierdo azul — elegante, sin rojo */
.login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #1A3A6B 0%, #2E5FA3 50%, #1A3A6B 100%);
    border-radius: 24px 0 0 24px;
}

/* Círculo decorativo fondo */
.login-container::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,58,107,0.05) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* === LOGO === */
.logo {
    width: 130px; height: 130px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid #1A3A6B;
    padding: 6px;
    box-shadow: 0 0 0 6px rgba(26,58,107,0.08), 0 10px 30px rgba(0,0,0,0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 9px rgba(26,58,107,0.13), 0 14px 40px rgba(0,0,0,0.22);
}

/* === TEXTOS === */
.login-container h6 {
    font-size: 0.68rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 12px;
    line-height: 1.6;
}
.login-container h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #1A3A6B;
    font-size: 1.6rem;
    letter-spacing: -0.3px;
    margin-top: 4px;
}

/* === TABS === */
.nav-tabs {
    background: #f4f4f4;
    border-radius: 14px;
    padding: 5px;
    border: none !important;
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: space-between;
    display: flex;
}
.nav-tabs .nav-item { flex: 1; text-align: center; }
.nav-tabs .nav-item .nav-link {
    border-radius: 10px !important;
    border: none !important;
    padding: 9px 4px;
    font-size: 0.73rem;
    width: 100%;
    font-weight: 700;
    color: #1a1a1a;
    background: transparent;
    transition: all 0.22s ease;
    letter-spacing: 0.1px;
}
.nav-tabs .nav-link:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2E5FA3, #1A3A6B) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26,58,107,0.45);
    border-radius: 10px;
}
/* Tab activo: gris oscuro institucional */
.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #1A3A6B, #2E5FA3) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}
/* Ícono rojo — único acento rojo permitido */
.nav-tabs .nav-link.active i { color: #C8102E !important; }

/* === LABELS === */
label {
    font-weight: 700;
    font-size: 0.8rem;
    color: #1a1a1a;
    margin-top: 18px;
    margin-bottom: 5px;
    display: block;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* === INPUTS === */
.form-control {
    border-radius: 10px;
    border: 2px solid #e8e8e8;
    padding: 11px 42px 11px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1a1a1a;
    transition: all 0.2s ease;
    width: 100%;
    background: #fafafa;
}
.form-control:focus {
    border-color: #1A3A6B;
    box-shadow: 0 0 0 4px rgba(26,58,107,0.09);
    outline: none;
    background: #fff;
}
.form-control::placeholder { color: #aaaaaa; font-weight: 400; }

/* === CAMPOS ANIMADOS === */
.campo-animado { position: relative; margin-bottom: 4px; }
.campo-animado .form-control:focus { transform: translateY(-1px); }
.campo-animado .input-icon {
    position: absolute;
    right: 13px; bottom: 12px;
    color: #bbbbbb;
    font-size: 0.83rem;
    pointer-events: none;
    transition: color 0.25s ease;
    background: transparent;
    padding: 2px;
}
.campo-animado:focus-within .input-icon { color: #1A3A6B; }

/* === BOTÓN PRINCIPAL — Azul UAGro === */
button[type="submit"],
.btn-primary {
    background: linear-gradient(135deg, #1A3A6B, #2E5FA3) !important;
    border: none !important;
    padding: 13px;
    border-radius: 11px;
    color: #fff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.28s ease;
    box-shadow: 0 6px 20px rgba(26,58,107,0.35);
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    cursor: pointer;
}
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(26,58,107,0.5) !important;
}
button[type="submit"]:active { transform: translateY(0); }
button[type="submit"]::after {
    content: '';
    position: absolute;
    top: -50%; left: -75%;
    width: 50%; height: 200%;
    background: rgba(255,255,255,0.13);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}
button[type="submit"]:hover::after { left: 125%; }

/* === BOTÓN COORDINADOR — Gris oscuro institucional === */
.btn-coordinador {
    background: linear-gradient(135deg, #1A3A6B, #2E5FA3) !important;
    border: none !important; padding: 13px;
    border-radius: 11px; color: #fff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important; font-size: 0.88rem !important;
    letter-spacing: 1px; text-transform: uppercase;
    transition: all 0.28s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
    display: block; width: 100%; cursor: pointer;
}
.btn-coordinador:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.35) !important; }

/* === BOTÓN TUTOR — Azul medio === */
.btn-tutor {
    background: linear-gradient(135deg, #2E5FA3, #4477BB) !important;
    border: none !important; padding: 13px;
    border-radius: 11px; color: #fff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important; font-size: 0.88rem !important;
    letter-spacing: 1px; text-transform: uppercase;
    transition: all 0.28s ease;
    box-shadow: 0 6px 20px rgba(46,95,163,0.3);
    display: block; width: 100%; cursor: pointer;
}
.btn-tutor:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(46,95,163,0.45) !important; }

/* === BADGES DE ROL === */
.badge-rol {
    display: inline-flex; align-items: center;
    font-size: 0.75rem; font-weight: 700;
    padding: 5px 13px; border-radius: 20px;
    letter-spacing: 0.3px; margin-bottom: 12px;
}
.badge-coordinador { background: rgba(26,58,107,0.08); color: #1A3A6B; border: 1px solid rgba(26,58,107,0.2); }
.badge-tutor       { background: rgba(26,58,107,0.08); color: #1A3A6B; border: 1px solid rgba(26,58,107,0.2); }

#formCoordinador label { color: #1a1a1a; }
#formCoordinador .form-control:focus { border-color: #1A3A6B; box-shadow: 0 0 0 4px rgba(26,58,107,0.1); }
#formCoordinador .campo-animado:focus-within .input-icon { color: #1A3A6B; }

#formTutor label { color: #1a1a1a; }
#formTutor .form-control:focus { border-color: #2E5FA3; box-shadow: 0 0 0 4px rgba(46,95,163,0.1); }
#formTutor .campo-animado:focus-within .input-icon { color: #2E5FA3; }

/* === ALERTAS === */
.alert {
    border-radius: 10px; font-size: 0.84rem; font-weight: 600;
    padding: 10px 14px; border: none;
    animation: alertEntrada 0.38s cubic-bezier(0.34,1.56,0.64,1) both;
}
/* Error: acento rojo UAGro solo en borde */
.alert-danger  { background: #fff5f5; color: #8b0000; border-left: 4px solid #C8102E !important; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #d97706 !important; }
/* Éxito: azul institucional */
.alert-success {
    background: linear-gradient(135deg, #1A3A6B, #2E5FA3) !important;
    color: #fff !important; font-weight: 800 !important; font-size: 0.95rem !important;
    text-align: center; border-radius: 12px !important; padding: 16px !important;
    box-shadow: 0 6px 20px rgba(26,58,107,0.35) !important;
    animation: successEntrada 0.5s cubic-bezier(0.34,1.56,0.64,1) both !important;
}

@keyframes alertEntrada {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes successEntrada {
    0%   { opacity: 0; transform: scale(0.75) translateY(-16px); }
    65%  { transform: scale(1.04) translateY(3px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 576px) {
    .login-container { margin: 2vh 10px; padding: 28px 20px 24px; border-radius: 18px; }
    .login-container::before { width: 4px; border-radius: 18px 0 0 18px; }
    .logo { width: 95px; height: 95px; }
    .login-container h2 { font-size: 1.25rem; }
    .nav-tabs .nav-link { font-size: 0.67rem; padding: 7px 2px; }
}
@media (max-width: 375px) {
    .login-container { margin: 1vh 6px; padding: 20px 12px; }
    .logo { width: 80px; height: 80px; }
}
