/* ============================================
   AUTH PAGES — Login & Register (split screen)
   ============================================ */

html,
body.page-auth {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #ffffff;
}

body.page-auth #page-wrapper,
body.page-auth #main-content {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Full-page split */
.auth-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* ---- Left promo panel ---- */
.auth-promo {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 40px;
    color: #ffffff;
    background: linear-gradient(155deg, #4E342E 0%, #6D4C41 28%, #A1887F 58%, #D4A574 100%);
}

.auth-promo__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-promo__glow--1 {
    width: 360px;
    height: 360px;
    background: rgba(255, 255, 255, 0.08);
    top: -140px;
    right: -120px;
}

.auth-promo__glow--2 {
    width: 260px;
    height: 260px;
    background: rgba(245, 124, 0, 0.2);
    bottom: -90px;
    left: -80px;
}

.auth-promo__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-promo__logo-wrap {
    display: inline-flex;
    margin-bottom: 28px;
    text-decoration: none;
}

.auth-promo__logo-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.auth-promo__logo-badge {
    width: 142px;
    height: 142px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    padding: 12px;
}

.auth-promo__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-promo__title {
    font-size: clamp(1.85rem, 2.8vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 14px;
    color: #ffffff;
}

.auth-promo__text {
    font-size: 0.98rem;
    line-height: 1.7;
    opacity: 0.94;
    margin: 0 0 30px;
    max-width: 330px;
}

.auth-promo__features {
    display: inline-flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-promo__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.4;
}

.auth-promo__check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #FFB74D;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.auth-promo__check i {
    font-size: 11px;
}

/* ---- Right form side ---- */
.auth-form-side {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.auth-form-side__inner {
    width: 100%;
    max-width: 420px;
}

.auth-form-side__inner--wide {
    max-width: 520px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    margin-bottom: 32px;
}

.auth-brand__logo {
    width: auto;
    height: 64px;
    max-width: 140px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    display: block;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.auth-brand__text {
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.auth-brand__accent {
    color: #F57C00;
}

.auth-brand__dark {
    color: #1A237E;
}

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

.auth-form-side__title {
    font-size: clamp(1.55rem, 2.4vw, 1.85rem);
    font-weight: 800;
    color: #1A237E;
    margin: 0 0 8px;
    line-height: 1.25;
}

.auth-form-side__subtitle {
    font-size: 0.95rem;
    color: #757575;
    margin: 0;
    line-height: 1.5;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-alert--error {
    background: #FFF1F0;
    border: 1px solid #FFCCC7;
    color: #CF1322;
}

.auth-alert--success {
    background: #F6FFED;
    border: 1px solid #B7EB8F;
    color: #389E0D;
}

/* Form controls — matching demo fields */
.auth-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

.auth-form__group {
    margin-bottom: 18px;
}

.auth-form__group--full {
    grid-column: 1 / -1;
}

.auth-form__textarea {
    resize: vertical;
    min-height: 72px;
}

select.auth-form__input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23757575' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.auth-form__radios {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.auth-form__radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #424242;
    cursor: pointer;
}

.auth-form__radio input {
    accent-color: #F57C00;
}

.auth-form__group.is-invalid-group .auth-form__radios {
    outline: 1px solid #FF4D4F;
    outline-offset: 6px;
    border-radius: 8px;
}

.auth-form-side__inner--wide {
    max-width: 640px;
}

.auth-form__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #212121;
    margin-bottom: 8px;
}

.auth-form__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-form__label-row .auth-form__label {
    margin-bottom: 0;
}

.auth-form__link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #F57C00;
    text-decoration: none;
    white-space: nowrap;
}

.auth-form__link:hover {
    color: #E65100;
}

.auth-form__field {
    position: relative;
}

.auth-form__input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-family: var(--font-family, 'Poppins', sans-serif);
    font-size: 0.92rem;
    color: #333333;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form__field .auth-form__input {
    padding-right: 46px;
}

.auth-form__input::placeholder {
    color: #BDBDBD;
}

.auth-form__input:focus {
    outline: none;
    border-color: #F57C00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.12);
}

.auth-form__input.is-invalid {
    border-color: #FF4D4F;
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.12);
}

.auth-form__input.is-valid {
    border-color: #52C41A;
}

.auth-form__toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: #9E9E9E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.auth-form__toggle:hover {
    color: #F57C00;
    background: rgba(245, 124, 0, 0.08);
}

.auth-form__error {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: #CF1322;
    line-height: 1.4;
}

.auth-form__check {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    color: #757575;
    cursor: pointer;
    margin-bottom: 22px;
}

.auth-form__check input {
    margin-top: 2px;
    accent-color: #F57C00;
}

.auth-form__check a {
    color: #F57C00;
    font-weight: 600;
    text-decoration: none;
}

.auth-form__btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 14px 20px;
    background: #F57C00;
    color: #ffffff;
    font-family: var(--font-family, 'Poppins', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(245, 124, 0, 0.28);
}

.auth-form__btn:hover {
    background: #E65100;
    transform: translateY(-1px);
}

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

.auth-form__btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.auth-form-side__footer {
    text-align: center;
    margin: 24px 0 0;
    font-size: 0.9rem;
    color: #757575;
}

.auth-form-side__footer a {
    color: #F57C00;
    font-weight: 700;
    text-decoration: none;
}

.auth-form-side__footer a:hover {
    color: #E65100;
}

/* Password meter */
.auth-password-meter {
    margin-top: 8px;
}

.auth-password-meter__bar {
    height: 4px;
    background: #EEEEEE;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.auth-password-meter__bar span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    transition: width 0.25s ease, background 0.25s ease;
}

.auth-password-meter__bar[data-strength="1"] span { width: 25%; background: #FF4D4F; }
.auth-password-meter__bar[data-strength="2"] span { width: 50%; background: #FA8C16; }
.auth-password-meter__bar[data-strength="3"] span { width: 75%; background: #FADB14; }
.auth-password-meter__bar[data-strength="4"] span { width: 100%; background: #52C41A; }

.auth-password-meter__label {
    font-size: 0.72rem;
    color: #757575;
    margin: 0;
}

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

    .auth-promo {
        min-height: auto;
        padding: 36px 24px 32px;
    }

    .auth-promo__logo-ring {
        width: 110px;
        height: 110px;
    }

    .auth-promo__logo-badge {
        width: 92px;
        height: 92px;
    }

    .auth-promo__title {
        font-size: 1.55rem;
    }

    .auth-promo__features {
        display: none;
    }

    .auth-form-side {
        padding: 32px 20px 40px;
        align-items: flex-start;
    }

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

@media (max-width: 575.98px) {
    .auth-form-side__title {
        font-size: 1.4rem;
    }

    .auth-brand__logo {
        width: auto;
        height: 52px;
        max-width: 120px;
    }

    .auth-brand__text {
        font-size: 1.7rem;
    }
}
