/*
|--------------------------------------------------------------------------
| MKGO Authentication
|--------------------------------------------------------------------------
|
| File:
| /assets/css/auth.css
|
| Used by:
|
| /auth/login.php
| /auth/register.php
| /auth/forgot-password.php
| /auth/reset-password.php
| /auth/verify-email.php
|
*/


/*
|--------------------------------------------------------------------------
| Authentication Page
|--------------------------------------------------------------------------
*/

.auth-page {
    margin: 0;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #f8fafc 0%,
            #f1f5f9 100%
        );

    color: #0f172a;
}


.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| Authentication Shell
|--------------------------------------------------------------------------
*/

.auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 100vh;

    padding:
        42px
        20px;
}


.auth-shell-register {
    align-items: flex-start;
}


/*
|--------------------------------------------------------------------------
| Authentication Container
|--------------------------------------------------------------------------
*/

.auth-container {
    width: 100%;
    max-width: 460px;

    margin-inline: auto;
}


.auth-container-register {
    max-width: 620px;
}


/*
|--------------------------------------------------------------------------
| Authentication Brand
|--------------------------------------------------------------------------
*/

.auth-brand {
    margin-bottom: 25px;

    text-align: center;
}


.auth-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #0f172a;

    text-decoration: none;
}


.auth-brand-link::before {
    content: "MK";

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;
    height: 44px;

    padding:
        0
        9px;

    border-radius: 13px;

    background: #0f172a;

    color: #ffffff;

    font-size: 0.9rem;
    font-weight: 800;

    line-height: 1;

    letter-spacing: -0.02em;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.auth-brand-link {
    font-size: 0;
}


.auth-brand-link::after {
    content: "GO";

    color: #0f172a;

    font-size: 1.4rem;
    font-weight: 800;

    line-height: 1;

    letter-spacing: -0.04em;
}


.auth-brand-link:hover::before {
    transform: translateY(-1px);

    box-shadow:
        0 8px 20px
        rgba(15, 23, 42, 0.14);
}


.auth-brand-link:focus-visible {
    outline:
        3px solid
        rgba(15, 23, 42, 0.18);

    outline-offset: 5px;

    border-radius: 13px;
}


.auth-brand-tagline {
    margin:
        11px
        0
        0;

    color: #64748b;

    font-size: 0.875rem;

    line-height: 1.5;
}


/*
|--------------------------------------------------------------------------
| Authentication Card
|--------------------------------------------------------------------------
*/

.auth-card {
    width: 100%;

    padding: 34px;

    border:
        1px solid
        #e2e8f0;

    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 18px 50px
        rgba(15, 23, 42, 0.08);
}


.auth-card-header {
    margin-bottom: 28px;
}


.auth-card-header h1 {
    margin: 0;

    color: #0f172a;

    font-size: 1.75rem;
    font-weight: 800;

    line-height: 1.2;

    letter-spacing: -0.035em;
}


.auth-card-header p {
    margin:
        9px
        0
        0;

    color: #64748b;

    font-size: 0.94rem;

    line-height: 1.65;
}


/*
|--------------------------------------------------------------------------
| Authentication Alerts
|--------------------------------------------------------------------------
*/

.auth-alert {
    width: 100%;

    margin-bottom: 20px;

    padding:
        13px
        15px;

    border:
        1px solid
        transparent;

    border-radius: 11px;

    font-size: 0.875rem;

    line-height: 1.55;

    overflow-wrap: break-word;
}


.auth-alert-success {
    border-color: #bbf7d0;

    background: #f0fdf4;

    color: #166534;
}


.auth-alert-error {
    border-color: #fecaca;

    background: #fef2f2;

    color: #991b1b;
}


.auth-alert-warning {
    border-color: #fde68a;

    background: #fffbeb;

    color: #92400e;
}


.auth-alert-info {
    border-color: #bae6fd;

    background: #f0f9ff;

    color: #075985;
}


/*
|--------------------------------------------------------------------------
| Authentication Form
|--------------------------------------------------------------------------
*/

.auth-form {
    display: block;

    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Fields
|--------------------------------------------------------------------------
*/

.auth-field {
    width: 100%;
    min-width: 0;

    margin-bottom: 20px;
}


.auth-field:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Field Grid
|--------------------------------------------------------------------------
*/

.auth-field-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 16px;
}


.auth-field-grid
.auth-field {
    min-width: 0;
}


/*
|--------------------------------------------------------------------------
| Label Row
|--------------------------------------------------------------------------
*/

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}


.auth-label {
    display: inline-block;

    margin-bottom: 8px;

    color: #334155;

    font-size: 0.875rem;
    font-weight: 700;

    line-height: 1.4;
}


.auth-label-optional {
    margin-left: 5px;

    color: #94a3b8;

    font-size: 0.75rem;
    font-weight: 500;
}


/*
|--------------------------------------------------------------------------
| Field Links
|--------------------------------------------------------------------------
*/

.auth-field-link {
    margin-bottom: 8px;

    color: #0f172a;

    font-size: 0.8125rem;
    font-weight: 700;

    text-decoration: none;
}


.auth-field-link:hover {
    text-decoration: underline;

    text-underline-offset: 3px;
}


.auth-field-link:focus-visible {
    outline:
        2px solid
        #0f172a;

    outline-offset: 3px;

    border-radius: 3px;
}


/*
|--------------------------------------------------------------------------
| Inputs
|--------------------------------------------------------------------------
*/

.auth-input {
    display: block;

    width: 100%;
    min-height: 48px;

    padding:
        11px
        13px;

    border:
        1px solid
        #cbd5e1;

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: #0f172a;

    font: inherit;

    font-size: 0.94rem;

    line-height: 1.4;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}


.auth-input::placeholder {
    color: #94a3b8;
}


.auth-input:hover {
    border-color: #94a3b8;
}


.auth-input:focus {
    border-color: #0f172a;

    box-shadow:
        0 0 0 3px
        rgba(15, 23, 42, 0.08);
}


.auth-input:disabled,
.auth-input[readonly] {
    background: #f1f5f9;

    color: #64748b;
}


.auth-input:disabled {
    cursor: not-allowed;
}


/*
|--------------------------------------------------------------------------
| Invalid Inputs
|--------------------------------------------------------------------------
*/

.auth-input.is-invalid {
    border-color: #dc2626;
}


.auth-input.is-invalid:hover {
    border-color: #dc2626;
}


.auth-input.is-invalid:focus {
    border-color: #dc2626;

    box-shadow:
        0 0 0 3px
        rgba(220, 38, 38, 0.09);
}


/*
|--------------------------------------------------------------------------
| Select
|--------------------------------------------------------------------------
*/

.auth-select {
    appearance: auto;

    cursor: pointer;
}


/*
|--------------------------------------------------------------------------
| Field Help
|--------------------------------------------------------------------------
*/

.auth-field-help {
    margin-top: 7px;

    color: #64748b;

    font-size: 0.75rem;

    line-height: 1.5;
}


/*
|--------------------------------------------------------------------------
| Field Errors
|--------------------------------------------------------------------------
*/

.auth-field-error {
    margin-top: 7px;

    color: #b91c1c;

    font-size: 0.8125rem;

    line-height: 1.45;

    overflow-wrap: break-word;
}


/*
|--------------------------------------------------------------------------
| Password Field
|--------------------------------------------------------------------------
*/

.auth-password-wrap {
    position: relative;

    width: 100%;
}


.auth-password-wrap
.auth-input {
    padding-right: 72px;
}


.auth-password-toggle {
    position: absolute;

    top: 50%;
    right: 9px;

    transform: translateY(-50%);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 50px;
    min-height: 34px;

    padding:
        6px
        8px;

    border: 0;

    border-radius: 7px;

    background: transparent;

    color: #475569;

    font: inherit;

    font-size: 0.78rem;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


.auth-password-toggle:hover {
    background: #f1f5f9;

    color: #0f172a;
}


.auth-password-toggle:focus-visible {
    outline:
        2px solid
        #0f172a;

    outline-offset: 2px;
}


/*
|--------------------------------------------------------------------------
| Login Options
|--------------------------------------------------------------------------
*/

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin:
        -2px
        0
        22px;
}


/*
|--------------------------------------------------------------------------
| Checkbox
|--------------------------------------------------------------------------
*/

.auth-check {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    color: #475569;

    font-size: 0.875rem;

    line-height: 1.4;

    cursor: pointer;
}


.auth-check input {
    flex:
        0
        0
        auto;

    width: 17px;
    height: 17px;

    margin: 0;

    accent-color: #0f172a;

    cursor: pointer;
}


.auth-check input:focus-visible {
    outline:
        2px solid
        #0f172a;

    outline-offset: 2px;
}


/*
|--------------------------------------------------------------------------
| Account Type
|--------------------------------------------------------------------------
*/

.auth-account-type {
    min-width: 0;

    margin:
        0
        0
        22px;

    padding: 0;

    border: 0;
}


.auth-account-type legend {
    padding: 0;
}


/*
|--------------------------------------------------------------------------
| Account Type Grid
|--------------------------------------------------------------------------
*/

.auth-choice-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 12px;
}


/*
|--------------------------------------------------------------------------
| Account Type Card
|--------------------------------------------------------------------------
*/

.auth-choice {
    position: relative;

    display: block;

    min-width: 0;

    padding: 16px;

    border:
        1px solid
        #cbd5e1;

    border-radius: 12px;

    background: #ffffff;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        transform 0.15s ease;
}


.auth-choice:hover {
    border-color: #94a3b8;

    background: #f8fafc;
}


.auth-choice:active {
    transform: translateY(1px);
}


.auth-choice.is-selected {
    border-color: #0f172a;

    background: #f8fafc;

    box-shadow:
        0 0 0 2px
        rgba(15, 23, 42, 0.06);
}


/*
|--------------------------------------------------------------------------
| Hidden Account Radio
|--------------------------------------------------------------------------
*/

.auth-choice input {
    position: absolute;

    width: 1px;
    height: 1px;

    margin: -1px;
    padding: 0;

    overflow: hidden;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);

    white-space: nowrap;

    border: 0;
}


.auth-choice:has(input:focus-visible) {
    border-color: #0f172a;

    box-shadow:
        0 0 0 3px
        rgba(15, 23, 42, 0.1);
}


/*
|--------------------------------------------------------------------------
| Account Type Content
|--------------------------------------------------------------------------
*/

.auth-choice-content {
    display: block;
}


.auth-choice-content strong {
    display: block;

    margin-bottom: 5px;

    color: #0f172a;

    font-size: 0.94rem;
    font-weight: 800;

    line-height: 1.35;
}


.auth-choice-content span {
    display: block;

    color: #64748b;

    font-size: 0.8125rem;

    line-height: 1.5;
}


/*
|--------------------------------------------------------------------------
| Selected Account Type
|--------------------------------------------------------------------------
*/

.auth-choice.is-selected
.auth-choice-content strong::before {
    content: "✓";

    display: inline-block;

    margin-right: 7px;

    font-weight: 800;
}


/*
|--------------------------------------------------------------------------
| Terms
|--------------------------------------------------------------------------
*/

.auth-terms-check {
    align-items: flex-start;

    line-height: 1.55;
}


.auth-terms-check input {
    flex:
        0
        0
        auto;

    margin-top: 2px;
}


.auth-terms-check span {
    min-width: 0;
}


.auth-terms-check a {
    color: #0f172a;

    font-weight: 700;

    text-decoration: underline;

    text-decoration-color: #94a3b8;
    text-underline-offset: 3px;
}


.auth-terms-check a:hover {
    text-decoration-color: #0f172a;

    text-decoration-thickness: 2px;
}


.auth-terms-check a:focus-visible {
    outline:
        2px solid
        #0f172a;

    outline-offset: 2px;

    border-radius: 2px;
}


/*
|--------------------------------------------------------------------------
| Submit Button
|--------------------------------------------------------------------------
*/

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;

    padding:
        12px
        18px;

    border:
        1px solid
        #0f172a;

    border-radius: 10px;

    background: #0f172a;

    color: #ffffff;

    font: inherit;

    font-size: 0.94rem;
    font-weight: 700;

    line-height: 1.4;

    cursor: pointer;

    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.auth-submit:hover:not(:disabled) {
    border-color: #1e293b;

    background: #1e293b;

    box-shadow:
        0 8px 20px
        rgba(15, 23, 42, 0.12);
}


.auth-submit:active:not(:disabled) {
    transform: translateY(1px);
}


.auth-submit:focus-visible {
    outline:
        3px solid
        rgba(15, 23, 42, 0.2);

    outline-offset: 3px;
}


.auth-submit:disabled {
    opacity: 0.6;

    cursor: not-allowed;

    box-shadow: none;
}


/*
|--------------------------------------------------------------------------
| Submit Loading State
|--------------------------------------------------------------------------
*/

.auth-submit-loading[hidden],
.auth-submit-text[hidden] {
    display: none;
}


/*
|--------------------------------------------------------------------------
| Form Footer
|--------------------------------------------------------------------------
*/

.auth-form-footer {
    margin-top: 24px;

    text-align: center;
}


.auth-form-footer p {
    margin: 0;

    color: #64748b;

    font-size: 0.875rem;

    line-height: 1.55;
}


.auth-form-footer a {
    color: #0f172a;

    font-weight: 700;

    text-decoration: none;
}


.auth-form-footer a:hover {
    text-decoration: underline;

    text-underline-offset: 3px;
}


.auth-form-footer a:focus-visible {
    outline:
        2px solid
        #0f172a;

    outline-offset: 3px;

    border-radius: 3px;
}


/*
|--------------------------------------------------------------------------
| Authentication Page Footer
|--------------------------------------------------------------------------
*/

.auth-page-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 22px;

    color: #94a3b8;

    font-size: 0.8125rem;

    line-height: 1.5;
}


.auth-page-footer a {
    color: #64748b;

    text-decoration: none;

    transition:
        color 0.15s ease;
}


.auth-page-footer a:hover {
    color: #0f172a;
}


.auth-page-footer a:focus-visible {
    outline:
        2px solid
        #0f172a;

    outline-offset: 3px;

    border-radius: 3px;
}


/*
|--------------------------------------------------------------------------
| Autofill
|--------------------------------------------------------------------------
*/

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a;

    box-shadow:
        0 0 0 1000px
        #ffffff
        inset;

    transition:
        background-color 9999s ease-out 0s;
}


/*
|--------------------------------------------------------------------------
| Authentication Tablet / Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 640px) {

    .auth-shell {
        align-items: flex-start;

        padding:
            28px
            15px;
    }


    .auth-shell-register {
        align-items: flex-start;
    }


    .auth-container,
    .auth-container-register {
        max-width: 100%;
    }


    .auth-brand {
        margin-bottom: 20px;
    }


    .auth-brand-link::before {
        min-width: 40px;
        height: 40px;

        border-radius: 11px;

        font-size: 0.82rem;
    }


    .auth-brand-link::after {
        font-size: 1.25rem;
    }


    .auth-card {
        padding:
            25px
            20px;

        border-radius: 16px;
    }


    .auth-card-header {
        margin-bottom: 24px;
    }


    .auth-card-header h1 {
        font-size: 1.55rem;
    }


    .auth-field-grid {
        grid-template-columns: 1fr;

        gap: 0;
    }


    .auth-choice-grid {
        grid-template-columns: 1fr;
    }

}


/*
|--------------------------------------------------------------------------
| Authentication Small Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 420px) {

    .auth-shell {
        padding:
            22px
            12px;
    }


    .auth-card {
        padding:
            23px
            17px;
    }


    .auth-card-header h1 {
        font-size: 1.45rem;
    }


    .auth-options {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }


    .auth-choice {
        padding: 14px;
    }


    .auth-submit {
        min-height: 48px;
    }

}


/*
|--------------------------------------------------------------------------
| Reduced Motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {

    .auth-brand-link::before,
    .auth-input,
    .auth-choice,
    .auth-submit,
    .auth-password-toggle,
    .auth-page-footer a {
        transition: none;
    }

}