/* =========================================================
   STUDYQV AUTHENTICATION PAGES
   Shared by Login and Register
========================================================= */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 420px);
    align-items: center;
    justify-content: center;
    gap: 5rem;
    max-width: 1120px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}


/* =========================================================
   AUTH INTRO
========================================================= */

.auth-intro {
    max-width: 560px;
    position: relative;
    padding: 2rem 0;
}

.auth-intro::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    opacity: 0.08;
    top: -2rem;
    left: -3rem;
    pointer-events: none;
}

.heading {
    position: relative;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-intro .section-label {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-intro h2 {
    max-width: 560px;
    margin-bottom: 1.25rem;
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.auth-intro p {
    max-width: 520px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.08rem;
    line-height: 1.8;
}


/* =========================================================
   AUTH CARD
========================================================= */

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.07);
    position: relative;
    z-index: 1;
}

.auth-card::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    margin-bottom: 2rem;
    background-color: var(--color-primary);
    border-radius: 2px;
}


/* =========================================================
   AUTH CARD HEADER
========================================================= */

.auth-card-header {
    margin-bottom: 0.5rem;
}

.auth-card-header .section-label {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-title {
    margin-bottom: 0;
    font-size: 1.9rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.auth-subtitle {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.65;
}


/* =========================================================
   AUTH FORM
========================================================= */

.auth-form {
    margin-top: 1.75rem;
}

.auth-form label {
    margin-top: 1.15rem;
    margin-bottom: 0.45rem;
    color: var(--color-text);
    font-size: 0.86rem;
    font-weight: 600;
}

.auth-form label:first-child {
    margin-top: 0;
}

.auth-form input {
    min-height: 48px;
    padding: 0.75rem 0.85rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-form input:hover {
    border-color: #cbd5e1;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}


/* =========================================================
   FORM ERROR
========================================================= */

.auth-form .form-error {
    margin-top: 0.75rem;
    margin-bottom: 0;
}


/* =========================================================
   AUTH BUTTON
========================================================= */

.auth-form .btn {
    width: 100%;
    min-height: 48px;
    margin-top: 1.5rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.18);
}

.auth-form .btn:active {
    transform: translateY(0);
}


/* =========================================================
   ALTERNATIVE LINK
========================================================= */

.auth-alt-link {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.auth-alt-link a {
    margin-left: 0.35rem;
    color: var(--color-primary);
    font-weight: 600;
}

.auth-alt-link a:hover,
.auth-alt-link a:focus {
    color: var(--color-primary-dark);
}


/* =========================================================
   SUPPORT SECTION
========================================================= */

.auth-support {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 760px;
    margin: 1rem auto 0;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.auth-support .section-label {
    display: inline-block;
    margin-bottom: 0.65rem;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-support h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.auth-support p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 850px) {

    .auth-page {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
        max-width: 680px;
        padding: 3rem 1.5rem;
    }

    .auth-intro {
        max-width: 620px;
        text-align: center;
        margin: 0 auto;
    }

    .auth-intro::before {
        left: 50%;
        transform: translateX(-50%);
        top: -2.5rem;
    }

    .auth-intro h2 {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-intro p {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-card {
        margin: 0 auto;
    }

    .auth-support {
        grid-column: auto;
        margin-top: 0;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 520px) {

    .auth-page {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
        padding: 2.5rem 1rem;
    }

    .auth-intro {
        padding: 1rem 0;
    }

    .heading {
        margin-bottom: 1.25rem;
        font-size: 1.8rem;
    }

    .auth-intro h2 {
        font-size: 2.15rem;
        line-height: 1.12;
    }

    .auth-intro p {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .auth-card {
        max-width: none;
        padding: 1.75rem 1.25rem;
    }

    .auth-title {
        font-size: 1.65rem;
    }

    .auth-support {
        padding: 1.5rem 0;
    }

    .auth-support h2 {
        font-size: 1.15rem;
    }
}


/* =========================================================
   ACTIVE SESSION MODAL
========================================================= */
.session-modal,.modal{
    display: none;
}

.session-modal.showModal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1.5rem;

    background-color: rgba(15, 23, 42, 0.45);
}


/* =========================================================
   ACTIVE SESSION MODAL CONTENT
========================================================= */

.session-modal-content {
    width: 100%;
    max-width: 440px;

    padding: 2rem;

    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    box-shadow: 0 20px 50px rgba(31, 41, 55, 0.18);

    position: relative;
}


/* =========================================================
   MODAL HEADER
========================================================= */

.session-modal-header {
    margin-bottom: 1rem;
}

.session-modal-header .section-label {
    display: inline-block;
    margin-bottom: 0.65rem;

    color: var(--color-primary);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.session-modal-header h2 {
    margin: 0;

    color: var(--color-text);

    font-size: 1.45rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}


/* =========================================================
   MODAL MESSAGE
========================================================= */

.session-modal-content > p {
    margin: 0;

    color: var(--color-text-muted);

    font-size: 0.95rem;
    line-height: 1.7;
}


/* =========================================================
   MODAL ACTIONS
========================================================= */

.session-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;

    margin-top: 1.75rem;
}

.session-modal-actions .btn {
    min-height: 46px;
    padding: 0.7rem 1rem;

    border-radius: var(--radius);

    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.session-modal-actions .btn:hover {
    transform: translateY(-1px);
}

.session-modal-actions .btn:active {
    transform: translateY(0);
}


/* =========================================================
   SECONDARY BUTTON
========================================================= */

.session-modal-actions .btn-secondary {
    color: var(--color-text);

    background-color: var(--color-surface);

    border: 1px solid var(--color-border);
}

.session-modal-actions .btn-secondary:hover {
    background-color: var(--color-background);
}


/* =========================================================
   MODAL ERROR
========================================================= */

#sessionActionError {
    margin-top: 0.85rem;
    margin-bottom: 0;
}


/* =========================================================
   MODAL MOBILE
========================================================= */

@media (max-width: 520px) {

    .session-modal {
        padding: 1rem;
    }

    .session-modal-content {
        max-width: none;
        padding: 1.5rem;
    }

    .session-modal-header h2 {
        font-size: 1.3rem;
    }

    .session-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .session-modal-actions .btn {
        width: 100%;
    }
}