.auth-page {
    min-height: calc(100vh - var(--turath-fixed-header-height, 0px));
    padding: 44px 0 64px;
    background:
        radial-gradient(circle at 16% 18%, rgba(185, 145, 73, 0.16), transparent 28%),
        linear-gradient(135deg, #eef5f1 0%, #fbfaf6 46%, #edf5f1 100%);
}

.auth-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.auth-stage {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1fr);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(27, 77, 62, 0.14);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 28px 70px rgba(18, 54, 44, 0.16);
}

.auth-media {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    padding: 36px;
    color: #fff;
    background-image:
        linear-gradient(90deg, rgba(4, 28, 20, 0.18), rgba(4, 28, 20, 0.74)),
        url("../images/auth/turath-auth-hero.png");
    background-size: cover;
    background-position: center left;
}

.auth-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(4, 28, 20, 0.02), rgba(4, 28, 20, 0.58)),
        radial-gradient(circle at 82% 20%, rgba(213, 171, 88, 0.22), transparent 24%);
}

.auth-media-copy {
    max-width: 390px;
    margin-right: auto;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #f2d18b;
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-media h1 {
    margin: 0 0 16px;
    font-size: clamp(2.15rem, 4vw, 3.65rem);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-media p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.02rem;
    line-height: 1.9;
}

.auth-media-points {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.auth-media-points span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.auth-media-points i {
    color: #f2d18b;
}

.auth-panel {
    display: flex;
    align-items: center;
    padding: 42px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 249, 244, 0.98)),
        radial-gradient(circle at 18% 14%, rgba(27, 77, 62, 0.08), transparent 26%);
}

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

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #113d30;
    color: #f2d18b;
    box-shadow: 0 12px 30px rgba(17, 61, 48, 0.22);
}

.auth-panel h2 {
    margin: 0 0 8px;
    color: #12372c;
    font-size: clamp(1.65rem, 2.5vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 0 0 24px;
    color: #61766d;
    line-height: 1.8;
}

.auth-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid #e4eee9;
    border-radius: 8px;
    background: #eef6f1;
}

.auth-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #184739;
    font-weight: 800;
    text-decoration: none;
}

.auth-mode-btn.active {
    color: #fff;
    background: #1b5a47;
    box-shadow: 0 10px 22px rgba(27, 90, 71, 0.22);
}

.auth-mode-btn:not(.active):hover {
    color: #12372c;
    background: rgba(255, 255, 255, 0.78);
}

.auth-form label {
    display: block;
    margin-bottom: 7px;
    color: #1d4639;
    font-weight: 800;
}

.auth-form .form-control,
.auth-form .form-select,
.auth-form input,
.auth-form select,
.auth-form textarea {
    border: 1px solid #d7e6df;
    border-radius: 8px;
    min-height: 48px;
    color: #173d31;
    background-color: #fff;
}

.auth-form textarea {
    min-height: 104px;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus,
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    border-color: #1b5a47;
    box-shadow: 0 0 0 0.18rem rgba(27, 90, 71, 0.12);
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #123d30, #226b55);
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(27, 90, 71, 0.2);
}

.auth-submit:hover {
    color: #fff;
    filter: brightness(1.04);
}

.auth-links,
.auth-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.auth-links a,
.auth-action-row a {
    color: #174a3b;
    font-weight: 800;
    text-decoration: none;
}

.auth-links a:hover,
.auth-action-row a:hover {
    color: #0f3328;
    text-decoration: underline;
}

.auth-side-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 24px 0 26px;
}

.auth-side-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 850;
    text-decoration: none;
}

.auth-side-actions .is-primary {
    color: #fff;
    background: #1b5a47;
}

.auth-side-actions .is-secondary {
    color: #174a3b;
    border: 1px solid #d7e6df;
    background: #f3f8f5;
}

.auth-error,
.input-error {
    margin-top: 6px;
    color: #9f1d1d;
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-help,
.auth-form .help-text {
    margin-top: 6px;
    color: #697c74;
    font-size: 0.86rem;
    line-height: 1.65;
}

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

.auth-register-grid .is-wide {
    grid-column: 1 / -1;
}

@media (max-width: 991.98px) {
    .auth-page {
        padding: 24px 0 44px;
    }

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

    .auth-media {
        min-height: 360px;
        align-items: flex-end;
        padding: 28px;
        background-position: center;
    }

    .auth-media-copy {
        margin-right: 0;
    }

    .auth-panel {
        padding: 30px 24px 34px;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        width: min(100% - 20px, 1120px);
    }

    .auth-stage {
        min-height: auto;
    }

    .auth-media {
        min-height: 300px;
        padding: 24px 20px;
    }

    .auth-media h1 {
        font-size: 2rem;
    }

    .auth-panel {
        padding: 26px 18px 30px;
    }

    .auth-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-register-grid,
    .auth-side-actions {
        grid-template-columns: 1fr;
    }

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