/* ==============================
   LOGIN PAGE DESIGN SYSTEM
   Adapted from Article Page Style
============================== */

:root {
    --login-navy: #0B132B;
    --login-gold: #D4A24C;
    --login-white: #FFFFFF;
    --login-soft: #F7F8FA;
    --login-dark: #1E1E1E;
    --login-muted: #64748b;
    --login-border: #e5e7eb;
    --login-shadow: 0 22px 60px rgba(15, 23, 42, .10);
    --login-shadow-soft: 0 14px 34px rgba(15, 23, 42, .08);
}

/* ==============================
   BODY LAYOUT
============================== */

html,
body {
    min-height: 100%;
}

body.login-body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;

    overflow-x: hidden;

    background: #f8fafc;
}

.login-main {
    width: 100%;

    flex: 1 0 auto;
}

/* ==============================
   LOGIN HERO / PAGE
============================== */

.login-page {
    position: relative;

    width: 100%;
    min-height: 760px;

    margin-top: -100px;
    padding: 150px 20px 160px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            rgba(11, 19, 43, .94),
            rgba(30, 30, 30, .82)
        ),
        url('../../assets/img/mta-banner.jpg');

    background-size: cover;
    background-position: center;

    overflow: hidden;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at 20% 20%, rgba(212, 162, 76, .18), transparent 34%),
        radial-gradient(circle at 80% 35%, rgba(255, 255, 255, .08), transparent 28%);

    z-index: 1;
    pointer-events: none;
}

.login-page::after {
    content: "";
    position: absolute;
    inset: auto 0 0;

    height: 150px;

    background: linear-gradient(
        to bottom,
        transparent,
        #f8fafc
    );

    z-index: 1;
    pointer-events: none;
}

.login-overlay {
    display: none;
}

/* ==============================
   ROLE SELECTION
============================== */

.role-container {
    position: relative;
    z-index: 2;

    width: min(100%, 900px);

    margin: 0 auto;
    padding-inline: 20px;

    text-align: center;
}

.role-header h1 {
    margin: 0 auto 18px;

    max-width: 760px;

    color: var(--login-white);

    font-size: clamp(44px, 6vw, 76px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -2px;
}

.role-header p {
    max-width: 680px;

    margin: 0 auto 42px;

    color: rgba(255, 255, 255, .84);

    font-size: clamp(17px, 1.7vw, 21px);
    line-height: 1.75;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 24px;
}

.role-card {
    position: relative;

    overflow: hidden;

    background: rgba(255, 255, 255, .96);

    padding: 38px 34px;

    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 28px;

    cursor: pointer;

    box-shadow: 0 26px 70px rgba(0, 0, 0, .22);

    transition: .22s ease;
}

.role-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at top right, rgba(212, 162, 76, .16), transparent 35%);

    opacity: 0;

    transition: .22s ease;
}

.role-card:hover {
    transform: translateY(-4px);

    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.role-card:hover::before {
    opacity: 1;
}

.role-card h2,
.role-card p {
    position: relative;
    z-index: 1;
}

.role-card h2 {
    margin: 0 0 12px;

    color: var(--login-navy);

    font-size: 26px;
    line-height: 1.25;
    font-weight: 950;
    letter-spacing: -.5px;
}

.role-card p {
    margin: 0;

    color: var(--login-muted);

    font-size: 16px;
    line-height: 1.75;
}

/* ==============================
   LOGIN MODAL
============================== */

.login-modal {
    display: none;

    position: absolute;
    inset: 0;

    align-items: center;
    justify-content: center;

    padding: 140px 20px 95px;

    z-index: 5;

    overflow: auto;
}

.login-box {
    position: relative;
    z-index: 6;

    width: 100%;
    max-width: 430px;

    background: rgba(255, 255, 255, .97);

    backdrop-filter: blur(14px);

    padding: 30px 34px;

    border: 1px solid rgba(255, 255, 255, .40);
    border-radius: 28px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.login-header {
    text-align: center;

    margin-bottom: 20px;
}

.login-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;
    padding: 8px 14px;

    border: 1px solid rgba(212, 162, 76, .38);
    border-radius: 999px;

    background: rgba(212, 162, 76, .10);
    color: var(--login-gold);

    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-header h1 {
    margin: 0 0 8px;

    color: var(--login-navy);

    font-size: 32px;
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -1px;
}

.login-header p {
    margin: 0;

    color: var(--login-muted);

    font-size: 14px;
    line-height: 1.65;
}

/* ==============================
   ALERT
============================== */

.login-alert {
    margin-bottom: 14px;
    padding: 12px 14px;

    border-radius: 16px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.login-alert.error {
    background: #fee2e2;
    color: #991b1b;

    border: 1px solid #fecaca;
}

/* ==============================
   LOGIN FORM
============================== */

.login-form {
    display: flex;
    flex-direction: column;

    gap: 13px;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.form-group label {
    color: var(--login-navy);

    font-size: 13px;
    font-weight: 900;
}

.form-group input {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #cbd5e1;
    border-radius: 14px;

    outline: none;

    background: var(--login-white);
    color: var(--login-dark);

    font-size: 14px;

    box-sizing: border-box;

    transition: .22s ease;
}

.form-group input:focus {
    border-color: var(--login-gold);

    box-shadow: 0 0 0 4px rgba(212, 162, 76, .14);
}

.login-options {
    text-align: right;

    line-height: 1;
}

.login-options a {
    color: var(--login-navy);

    font-size: 13px;
    font-weight: 800;

    text-decoration: none;

    transition: .22s ease;
}

.login-options a:hover {
    color: var(--login-gold);
}

.login-button {
    min-height: 46px;

    padding: 12px 16px;

    border: none;
    border-radius: 999px;

    background: var(--login-gold);
    color: var(--login-navy);

    font-size: 14px;
    font-weight: 950;

    cursor: pointer;

    transition: .22s ease;
}

.login-button:hover {
    transform: translateY(-1px);

    background: #c5923d;
}

.back-button {
    min-height: 44px;

    padding: 11px 16px;

    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 999px;

    background: var(--login-white);
    color: var(--login-navy);

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;

    transition: .22s ease;
}

.back-button:hover {
    background: #f1f5f9;

    transform: translateY(-1px);
}

/* ==============================
   FOOTER SAFE
============================== */

body.login-body footer,
body.login-body .footer,
body.login-body .site-footer {
    position: relative;
    z-index: 10;

    width: 100%;

    flex-shrink: 0;

    margin-top: 0;
}

/* ==============================
   ACCESSIBILITY
============================== */

.role-card:focus,
.login-button:focus,
.back-button:focus,
.login-options a:focus,
.form-group input:focus {
    outline: 3px solid rgba(212, 162, 76, .35);
    outline-offset: 3px;
}

/* ==============================
   RESPONSIVE - TABLET
============================== */

@media screen and (max-width: 992px) {
    .login-page {
        min-height: 700px;
        padding: 160px 20px 120px;
    }

    .login-modal {
        padding: 150px 20px 80px;
    }
}

/* ==============================
   RESPONSIVE - MOBILE
============================== */

@media screen and (max-width: 768px) {
    .login-page {
        min-height: 720px;
        margin-top: -96px;
        padding: 205px 18px 90px;
    }

    .role-container {
        padding-inline: 0;
    }

    .role-header h1 {
        font-size: clamp(38px, 11vw, 56px);
        letter-spacing: -1px;
    }

    .role-header p {
        margin-bottom: 32px;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }

    .role-card {
        padding: 30px 26px;
        border-radius: 24px;
    }

    .login-modal {
        position: relative;
        inset: auto;

        padding: 0;

        overflow: visible;
    }

    .login-box {
        max-width: 100%;

        padding: 28px 22px;

        border-radius: 24px;
    }

    .login-header h1 {
        font-size: 30px;
    }
}

@media screen and (max-width: 480px) {
    .login-page {
        min-height: 700px;
    }

    .login-box {
        padding: 26px 20px;
    }

    .role-card h2 {
        font-size: 24px;
    }
}