/* ==========================================================================
   MMDU Student Portal - Login
   ========================================================================== */
:root {
    --brand: #9b1c2c;
    --brand-600: #7f1624;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f5f6fa;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
}
.hide { display: none !important; }

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }

/* Left brand panel */
.auth-hero {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(circle at 15% 10%, rgba(255,255,255,.14) 0, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(255,255,255,.10) 0, transparent 45%),
        linear-gradient(140deg, #5e0f1a, var(--brand) 55%, #c2414f);
}
.auth-hero::before, .auth-hero::after {
    content: ""; position: absolute; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
}
.auth-hero::before { width: 520px; height: 520px; right: -180px; top: -160px; }
.auth-hero::after { width: 380px; height: 380px; left: -140px; bottom: -140px; }
.hero-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.hero-brand img { width: 58px; height: 68px; object-fit: contain; background: #fff; border-radius: 14px; padding: 4px 6px; }
.hero-brand b { display: block; font-size: 17px; }
.hero-brand small { opacity: .8; }
.hero-copy { position: relative; z-index: 1; max-width: 460px; }
.hero-copy h1 { margin: 0 0 14px; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.hero-copy p { margin: 0; font-size: 15.5px; line-height: 1.6; opacity: .88; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.hero-badges span {
    padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
}

/* Right form panel */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.mobile-brand { display: none; }
.auth-card h2 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.subtitle { margin: 0 0 28px; color: var(--muted); font-size: 14.5px; }

.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input-wrap { position: relative; }
.input-wrap > i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 14px; pointer-events: none;
}
.form-control {
    width: 100%;
    padding: 13px 14px 13px 42px;
    font: inherit; font-size: 14.5px; color: var(--ink);
    background: #fff;
    border: 1px solid var(--line); border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #a0aec0; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(155, 28, 44, .12); }
.input-wrap .form-control.has-toggle { padding-right: 48px; }
.toggle-pass {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 10px;
    background: transparent; color: #94a3b8; cursor: pointer;
}
.toggle-pass:hover { color: var(--ink-2); background: #f1f5f9; }

.btn-primary {
    width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 8px; padding: 14px;
    font: inherit; font-size: 15px; font-weight: 700; color: #fff;
    background: var(--brand); border: 0; border-radius: 12px;
    box-shadow: 0 10px 22px rgba(155, 28, 44, .25);
    cursor: pointer; transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--brand-600); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .75; cursor: wait; }

.alert {
    display: flex; gap: 10px; align-items: flex-start;
    margin-bottom: 18px; padding: 12px 14px;
    font-size: 13.5px; color: #9f1239;
    background: #fff1f2; border: 1px solid #fecdd3; border-radius: 12px;
}
.help { margin-top: 22px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-main { align-items: flex-start; padding-top: 56px; }
    .mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
    .mobile-brand img { width: 44px; height: 56px; object-fit: contain; }
    .mobile-brand b { display: block; color: var(--brand); font-size: 16px; }
    .mobile-brand small { color: var(--muted); }
}
@media (max-width: 420px) {
    .auth-main { padding: 40px 16px; }
    .auth-card h2 { font-size: 24px; }
}
