/* =========================
   Auth Page
========================= */

.auth-page {
    position: relative;
    overflow: hidden;


    min-height: calc(100vh - 78px);

    background:
        radial-gradient(circle at 12% 14%, rgba(213, 173, 40, 0.12), transparent 30%),
        radial-gradient(circle at 82% 20%, rgba(7, 19, 38, 0.10), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f4f4f1 100%);
}

.auth-shell {
    min-height: calc(100vh - 78px);

    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
}


/* =========================
   Left Form Side
========================= */

.auth-form-side {
    position: relative;
    z-index: 2;

    padding: 38px clamp(28px, 5vw, 72px);

    display: flex;
    flex-direction: column;

    background: rgba(255, 255, 255, 0.84);
    border-right: 1px solid rgba(222, 222, 216, 0.9);
}

.auth-logo-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.auth-logo {
    display: block;
    width: 230px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-form-wrap {
    width: 100%;
    max-width: 520px;
    margin: auto;
    padding: 38px 0;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-header h1 {
    color: var(--text-main);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
    font-weight: 900;
}

.auth-form-header p {
    max-width: 460px;
    margin-top: 14px;

    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}


/* =========================
   OAuth Buttons
========================= */

.oauth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.oauth-button {
    min-height: 52px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(222, 222, 216, 1);

    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 800;

    box-shadow: 0 12px 26px rgba(31, 31, 31, 0.045);
    transition: all 0.2s ease;
}

.oauth-button:hover {
    border-color: rgba(213, 173, 40, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(31, 31, 31, 0.07);
}

.oauth-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}


/* =========================
   Divider
========================= */

.auth-divider {
    position: relative;
    margin: 24px 0;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;

    width: 100%;
    height: 1px;

    background: rgba(222, 222, 216, 1);
}

.auth-divider span {
    position: relative;
    z-index: 2;

    display: inline-flex;
    padding: 0 12px;

    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);

    font-size: 0.82rem;
    font-weight: 750;
}


/* =========================
   Form
========================= */

.auth-form {
    display: grid;
    gap: 17px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 800;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.label-row a {
    color: var(--gold-dark);
    font-size: 0.86rem;
    font-weight: 800;
}

.label-row a:hover {
    text-decoration: underline;
}

.auth-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;

    border: 1px solid rgba(222, 222, 216, 1);
    border-radius: 15px;

    background: #ffffff;
    color: var(--text-main);

    font-size: 0.96rem;
    font-family: inherit;
    outline: none;

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

.auth-form input:focus {
    border-color: rgba(213, 173, 40, 0.68);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(213, 173, 40, 0.13);
}

.auth-form input::placeholder {
    color: rgba(104, 104, 104, 0.68);
}


/* =========================
   Submit
========================= */

.auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;

    border: none;
    border-radius: 16px;

    background: var(--navy);
    color: #ffffff;

    font-size: 0.98rem;
    font-weight: 850;
    cursor: pointer;

    box-shadow: 0 16px 34px rgba(7, 19, 38, 0.18);
    transition: all 0.22s ease;
}

.auth-submit:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(167, 131, 24, 0.24);
}

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


/* =========================
   Messages
========================= */

.auth-message-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.auth-alert {
    padding: 13px 15px;

    border-radius: 16px;
    border: 1px solid rgba(190, 60, 60, 0.22);
    background: rgba(190, 60, 60, 0.08);

    color: #8a2d2d;
    font-size: 0.88rem;
    line-height: 1.5;
    font-weight: 700;
}

.auth-alert.success {
    border-color: rgba(55, 145, 92, 0.22);
    background: rgba(55, 145, 92, 0.08);
    color: #25704a;
}

.auth-alert.info {
    border-color: rgba(213, 173, 40, 0.28);
    background: rgba(213, 173, 40, 0.10);
    color: #7a6112;
}

.auth-alert p {
    margin: 0;
}


/* =========================
   Bottom Switch
========================= */

.auth-switch {
    margin-top: 24px;
    text-align: center;

    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-switch a {
    color: var(--gold-dark);
    font-weight: 850;
}

.auth-switch a:hover {
    text-decoration: underline;
}


/* =========================
   Right Visual Side
========================= */

.auth-visual-side {
    position: relative;
    overflow: hidden;

    padding: 48px;

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

    background:
        radial-gradient(circle at 18% 18%, rgba(213, 173, 40, 0.20), transparent 28%),
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #101827 0%, #071326 100%);

    color: #ffffff;
}

.auth-visual-side::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 84%);
    pointer-events: none;
}

.auth-visual-side::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -160px;

    width: 460px;
    height: 460px;

    border-radius: 999px;
    background: rgba(213, 173, 40, 0.14);
    filter: blur(60px);
    pointer-events: none;
}

.auth-visual-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 680px;
}

.auth-visual-badge {
    display: inline-flex;
    align-items: center;

    padding: 8px 12px;
    margin-bottom: 22px;

    border-radius: 999px;
    background: rgba(213, 173, 40, 0.14);
    border: 1px solid rgba(213, 173, 40, 0.28);

    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-visual-content h2 {
    max-width: 620px;

    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.075em;
    font-weight: 900;
}

.auth-visual-content > p {
    max-width: 560px;
    margin-top: 22px;

    color: rgba(255, 255, 255, 0.68);
    font-size: 1.05rem;
    line-height: 1.75;
}


/* =========================
   Preview Card
========================= */

.auth-preview-card {
    overflow: hidden;
    margin-top: 38px;

    border-radius: 24px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.auth-preview-header {
    min-height: 52px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    gap: 7px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.auth-preview-header span {
    width: 10px;
    height: 10px;

    border-radius: 999px;
    background: rgba(255, 255, 255, 0.30);
}

.auth-preview-header span:nth-child(2) {
    background: rgba(213, 173, 40, 0.85);
}

.auth-preview-header p {
    margin-left: auto;

    color: rgba(255, 255, 255, 0.58);
    font-size: 0.8rem;
    font-weight: 750;
}

.auth-preview-card pre {
    margin: 0;
    padding: 24px;

    overflow-x: auto;

    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    line-height: 1.7;
}

.auth-preview-card code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    white-space: pre;
}


/* =========================
   Visual Stats
========================= */

.auth-visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;

    margin-top: 18px;
}

.auth-visual-grid div {
    padding: 18px;

    border-radius: 20px;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-visual-grid strong {
    display: block;

    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 850;
    margin-bottom: 6px;
}

.auth-visual-grid span {
    display: block;

    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
}


/* =========================
   Responsive
========================= */

@media (max-width: 1120px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-form-side {
        border-right: none;
    }

    .auth-form-wrap {
        margin: 40px auto 0;
        padding: 0;
    }

    .auth-visual-side {
        min-height: auto;
        padding: 54px 32px 76px;
    }
}

@media (max-width: 760px) {


    .auth-form-side {
        padding: 30px 24px 46px;
    }

    .auth-logo {
        width: 210px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .auth-visual-side {
        padding: 48px 24px 64px;
    }

    .auth-visual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {

    .auth-form-side {
        padding: 26px 20px 42px;
    }

    .auth-logo {
        width: 190px;
    }

    .auth-form-header h1 {
        letter-spacing: -0.055em;
    }

    .label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .oauth-button,
    .auth-form input,
    .auth-submit {
        min-height: 50px;
    }

    .auth-visual-side {
        display: none;
    }
}


.auth-legal-note {
    margin-top: 10px;
    text-align: center;

    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.auth-legal-note a {
    color: var(--gold-dark);
    font-weight: 800;
}

.auth-legal-note a:hover {
    text-decoration: underline;
}