/* =====================================================================
   EVMTC · Login (acceso unificado admin + alumno)
   Diseño a dos columnas: panel de marca + formulario.
   ===================================================================== */

:root {
    --brand:        #667eea;
    --brand-lt:     #764ba2;
    --brand-shadow: rgba(118, 75, 162, .35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'DM Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.login-wrap {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1230 0%, #3b2566 50%, #667eea 100%);
    background-size: 200% 200%;
    animation: bgShift 18s ease infinite;
}
@keyframes bgShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Formas decorativas difuminadas */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .45;
    pointer-events: none;
    animation: float 14s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; background: #8b5cf6; top: -120px; left: -100px; }
.blob-2 { width: 360px; height: 360px; background: #6366f1; bottom: -140px; right: -80px; animation-delay: -4s; }
.blob-3 { width: 240px; height: 240px; background: #a78bfa; top: 40%; right: 18%; opacity: .3; animation-delay: -8s; }
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50%      { transform: translateY(-30px) translateX(20px); }
}

/* Contenedor en dos columnas */
.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 880px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(2, 6, 23, .55);
    animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(24px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── Panel de marca (izquierda) ── */
.login-brand {
    position: relative;
    padding: 40px 38px;
    color: #fff;
    background: linear-gradient(160deg, var(--brand) 0%, #6d4aa6 60%, #4c2a7a 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.login-brand::after {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
    border-radius: 50%;
}
.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(4px);
}
.brand-name { font-size: 1.18rem; font-weight: 800; letter-spacing: .01rem; }

.brand-mid { margin-top: auto; padding-top: 28px; }
.brand-mid h2 { font-size: 1.55rem; font-weight: 700; line-height: 1.25; margin: 0; }
.brand-mid p  { margin-top: 12px; font-size: .9rem; opacity: .85; line-height: 1.5; max-width: 38ch; }

.brand-feats { list-style: none; margin: 26px 0 0; padding: 0; }
.brand-feats li { font-size: .85rem; opacity: .92; padding: 5px 0; display: flex; align-items: center; gap: 9px; }
.brand-feats i  { color: #c4b5fd; font-size: .95rem; }

.brand-foot { margin-top: 28px; font-size: .72rem; opacity: .6; }

/* ── Panel de formulario (derecha) ── */
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 44px 40px; }
.form-inner { width: 100%; max-width: 340px; }

.form-mark-mobile { display: none; }

.form-title { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 0; }
.form-sub   { font-size: .86rem; color: #64748b; margin: 6px 0 26px; }

.login-group { margin-bottom: 16px; }
.login-group-last { margin-bottom: 24px; }

.form-label-custom {
    display: block;
    font-size: .74rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04rem; color: #475569; margin-bottom: 7px;
}

.login-field-wrap {
    display: flex; align-items: center;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.login-field-wrap:focus-within {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-shadow);
}
.login-field-icon {
    width: 44px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 1rem;
    transition: color .18s;
}
.login-field-wrap:focus-within .login-field-icon { color: var(--brand); }
.login-field-wrap input {
    border: none; outline: none; background: transparent;
    flex: 1; height: 46px; padding: 0 6px 0 0;
    font-size: .92rem; color: #0f172a;
    font-family: inherit;
}
.login-eye {
    border: none; background: transparent; color: #94a3b8;
    width: 44px; height: 46px; cursor: pointer; font-size: 1rem;
    transition: color .15s;
}
.login-eye:hover { color: var(--brand); }

.login-error {
    display: flex; align-items: center; gap: 8px;
    background: #fde8ea; color: #b42318; border: 1px solid #f7c5cb;
    padding: 10px 12px; border-radius: 10px; font-size: .86rem; margin-bottom: 18px;
}

.btn-login {
    width: 100%; padding: 13px;
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-lt));
    color: #fff; font-size: .96rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 10px 24px var(--brand-shadow);
    transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn-login:hover  { transform: translateY(-2px); box-shadow: 0 16px 32px var(--brand-shadow); }
.btn-login:active { transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 820px) {
    .login-shell { grid-template-columns: 1fr; max-width: 420px; }
    .login-brand { display: none; }
    .login-form-side { padding: 38px 30px; }
    .form-mark-mobile {
        display: flex; align-items: center; gap: 9px;
        font-size: 1.15rem; font-weight: 800; color: var(--brand);
        margin-bottom: 22px;
    }
}
