/* =============================================================
   YDI Student Portal — login page
   Scoped under .login-v2; nothing here may leak elsewhere.
============================================================= */

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

.login-v2 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-v2 .frame {
    display: flex;
    width: 100%;
    max-width: 1080px;
    min-height: 600px;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

/* =============================================================
   Hero (left side)
============================================================= */
.login-v2 .hero {
    position: relative;
    flex: 1.05;
    color: #fff;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 35%, #3b82f6 100%);
    overflow: hidden;
}
.login-v2 .hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(80% 60% at 80% 20%, rgba(255, 255, 255, .18), transparent 60%),
        radial-gradient(60% 80% at 10% 100%, rgba(0, 0, 0, .20), transparent 60%);
    pointer-events: none;
}
.login-v2 .hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
.login-v2 .hero > * { position: relative; z-index: 2; }

.login-v2 .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; font-size: 15px; }
.login-v2 .brand-mark {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: #fff;
    color: #6d28d9;
    display: grid; place-items: center;
    font-weight: 800; font-size: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.login-v2 .hero-title { margin: 0 0 14px; font-size: 34px; line-height: 1.1; letter-spacing: -.025em; font-weight: 700; max-width: 420px; }
.login-v2 .hero-lede  { margin: 0; font-size: 14px; line-height: 1.55; opacity: .9; max-width: 380px; }
.login-v2 .hero-foot  { font-size: 11.5px; opacity: .75; }

/* =============================================================
   Form panel (right side)
============================================================= */
.login-v2 .panel {
    flex: .95;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-v2 .eyebrow      { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 6px; }
.login-v2 .panel-title  { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 700; }
.login-v2 .panel-sub    { color: #64748b; font-size: 13.5px; line-height: 1.5; margin: 0 0 28px; }

.login-v2 .field { margin-bottom: 14px; }
.login-v2 .field label {
    display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 6px;
}

.login-v2 .input { position: relative; }
.login-v2 .input input {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0 44px 0 14px;
    font: inherit; font-size: 14px; color: #0f172a;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-v2 .input input:focus {
    border-color: #7c3aed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .12);
}
.login-v2 .input .icon {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: #94a3b8;
    pointer-events: none;
}
.login-v2 .input .toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: transparent; border: 0; padding: 6px 8px;
    color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .04em;
    cursor: pointer; border-radius: 6px;
}
.login-v2 .input .toggle:hover { color: #6d28d9; background: #f1f5f9; }

.login-v2 .btn {
    width: 100%;
    margin-top: 8px;
    height: 46px;
    border-radius: 10px;
    border: 0;
    font: inherit; font-weight: 600; font-size: 14.5px; letter-spacing: .01em;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .1s, box-shadow .15s, opacity .15s;
}
.login-v2 .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 8px 22px rgba(124, 58, 237, .32);
}
.login-v2 .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(124, 58, 237, .38); }
.login-v2 .btn:disabled,
.login-v2 .btn.is-loading {
    cursor: not-allowed; opacity: .7; transform: none;
    box-shadow: 0 4px 12px rgba(124, 58, 237, .18);
}

.login-v2 .help-line {
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 12.5px; color: #64748b; text-align: center;
}
.login-v2 .help-line a { color: #6d28d9; font-weight: 600; text-decoration: none; }
.login-v2 .help-line a:hover { text-decoration: underline; }

/* =============================================================
   Alerts (validation_errors + flash_alert output)
============================================================= */
.login-v2 .alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px; line-height: 1.45;
}
.login-v2 .alert-danger  { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.login-v2 .alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.login-v2 .alert p  { margin: 0; }
.login-v2 .alert ul { margin: 0; padding-left: 18px; }

/* =============================================================
   Responsive: stack the split below 900px
============================================================= */
@media (max-width: 900px) {
    .login-v2 { padding: 0; align-items: stretch; }
    .login-v2 .frame {
        flex-direction: column;
        min-height: 100vh;
        max-width: none;
        border-radius: 0;
        box-shadow: none;
    }
    .login-v2 .hero { flex: 0 0 auto; padding: 24px 22px 28px; }
    .login-v2 .hero-mid  { display: none; }
    .login-v2 .hero-foot { display: none; }
    .login-v2 .hero-top  { margin-bottom: 4px; }
    .login-v2 .panel { padding: 28px 22px 36px; }
    .login-v2 .panel-title { font-size: 22px; }
}
@media (max-width: 480px) {
    .login-v2 .panel { padding: 24px 18px 32px; }
    .login-v2 .hero  { padding: 22px 18px 26px; }
}
