:root {
    --auth-ink: #342d27;
    --auth-muted: #7b746d;
    --auth-cream: #fffaf3;
    --auth-peach: #e7b896;
    --auth-peach-dark: #b87450;
    --auth-olive: #8f9a69;
    --auth-line: #e9dfd4;
}

.auth-modal {
    box-sizing: border-box;
    color: var(--auth-ink);
    font-family: "Prompt", "Noto Sans Thai", Arial, sans-serif;
    padding: 32px 20px;
    z-index: 12000;
}

.auth-modal.auth-modal--fallback {
    align-items: center;
    background: rgba(32, 28, 24, .66);
    display: flex !important;
    inset: 0;
    justify-content: center;
    overflow-y: auto;
    position: fixed;
}

.auth-modal *, .auth-modal *::before, .auth-modal *::after { box-sizing: border-box; }
.auth-modal .uk-modal-dialog { border-radius: 28px; overflow: hidden; }

.auth-modal__dialog {
    background: var(--auth-cream);
    box-shadow: 0 28px 80px rgba(49, 39, 30, .28);
    max-width: 980px;
    position: relative;
    width: min(980px, calc(100vw - 40px));
}

.auth-modal__dialog--signin { display: grid; grid-template-columns: .82fr 1.18fr; }
.auth-modal__dialog--register { margin: 0 auto; max-width: 980px; padding: 32px 46px 22px; width: min(980px, calc(100vw - 40px)); }

.auth-modal__close {
    align-items: center;
    background: rgba(255, 255, 255, .85) !important;
    border: 0 !important;
    border-radius: 50%;
    color: var(--auth-ink) !important;
    display: flex;
    font: 300 30px/1 Arial !important;
    height: 42px;
    justify-content: center;
    padding: 0 0 3px !important;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 42px !important;
    z-index: 3;
}

.auth-modal__aside {
    background: linear-gradient(145deg, #9aa478, #727d52);
    color: #fff;
    min-height: 590px;
    overflow: hidden;
    padding: 70px 48px;
    position: relative;
}

.auth-modal__aside::after {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 45% 55% 60% 40%;
    bottom: -110px;
    content: "";
    height: 330px;
    position: absolute;
    right: -95px;
    transform: rotate(22deg);
    width: 330px;
}

.auth-modal__eyebrow, .auth-modal__kicker {
    color: var(--auth-peach-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.auth-modal__aside .auth-modal__eyebrow { color: #f8ddc9; }
.auth-modal__aside h2 { color: #fff; font-size: clamp(42px, 5vw, 68px); font-weight: 600; letter-spacing: -.055em; line-height: .98; margin: 80px 0 26px; }
.auth-modal__aside p { color: rgba(255, 255, 255, .8); font-size: 15px; line-height: 1.8; max-width: 270px; }
.auth-modal__spark { background: #f5cfb2; border-radius: 50%; height: 9px; position: absolute; width: 9px; }
.auth-modal__spark--one { right: 70px; top: 100px; }
.auth-modal__spark--two { height: 5px; right: 120px; top: 145px; width: 5px; }

.auth-modal__content { padding: 72px 68px 40px; }
.auth-modal__heading h2, .auth-register__header h2 { color: var(--auth-ink); font-size: 42px; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; margin: 8px 0 10px; }
.auth-modal__heading p, .auth-register__header p { color: var(--auth-muted); font-size: 14px; margin: 0; }
.auth-form { margin-top: 34px; }

.auth-field { margin-bottom: 18px; }
.auth-field label { color: #504942; display: block; font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: .02em; margin: 0 0 8px; }
.auth-field label em { color: #ba6249; font-style: normal; }
.auth-field__label-row { align-items: center; display: flex; justify-content: space-between; }
.auth-field__label-row label { margin-bottom: 8px; }
.auth-form__muted-link { color: var(--auth-muted); font-size: 11px; }

.auth-field input, .auth-field select, .auth-field textarea {
    appearance: none;
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    color: var(--auth-ink);
    font: inherit;
    font-size: 14px;
    height: 48px;
    outline: none;
    padding: 0 14px;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.auth-field textarea { height: auto; min-height: 48px; padding-bottom: 10px; padding-top: 10px; resize: vertical; }
.auth-field input[readonly] { background: #f3efe9; color: var(--auth-muted); }

.auth-field select { background-image: linear-gradient(45deg, transparent 50%, #8e8175 50%), linear-gradient(135deg, #8e8175 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; padding-right: 36px; }
.auth-field input:focus, .auth-field select:focus { border-color: var(--auth-peach-dark); box-shadow: 0 0 0 4px rgba(184, 116, 80, .11); }
.auth-field__control { position: relative; }
.auth-field__control input { padding-left: 45px; padding-right: 44px; }
.auth-field__control--plain input { padding-left: 14px; }
.auth-field__icon { color: #a59b91; left: 17px; position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.auth-field__reveal { background: transparent !important; border: 0 !important; color: #9d948b; cursor: pointer; height: 40px; padding: 0 !important; position: absolute; right: 4px; top: 4px; width: 40px !important; }

.auth-check { align-items: center; color: var(--auth-muted); cursor: pointer; display: flex; font-size: 12px; gap: 9px; margin: 4px 0 22px; }
.auth-check input { accent-color: var(--auth-olive); height: 16px; margin: 0; padding: 0; width: 16px; }
.auth-check--terms { background: #f3f2e9; border-radius: 12px; padding: 14px 16px; }

.auth-button {
    align-items: center;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
    gap: 12px;
    height: 50px;
    justify-content: center;
    padding: 0 24px;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.auth-button:hover { transform: translateY(-2px); }
.auth-button--primary { background: var(--auth-ink); color: #fff; box-shadow: 0 10px 24px rgba(52, 45, 39, .16); }
.auth-button--primary:hover { background: #211d19; box-shadow: 0 14px 28px rgba(52, 45, 39, .24); }
.auth-button--ghost { background: #eee8df; color: var(--auth-ink); }
.auth-modal__content > .auth-form .auth-button { width: 100%; }
.auth-modal__switch { color: var(--auth-muted); font-size: 12px; margin: 26px 0 0; text-align: center; }
.auth-modal__switch a { color: var(--auth-peach-dark); font-weight: 700; margin-left: 4px; }

.auth-register__header { border-bottom: 1px solid var(--auth-line); margin-bottom: 20px; padding: 0 52px 18px 0; }
.auth-register__header h2 { font-size: 38px; }
.auth-progress { align-items: center; display: flex; gap: 10px; }
.auth-progress__item { align-items: center; color: #aaa097; display: flex; font-size: 11px; font-weight: 600; gap: 7px; white-space: nowrap; }
.auth-progress__item b { align-items: center; border: 1px solid #d9d0c7; border-radius: 50%; display: flex; height: 28px; justify-content: center; width: 28px; }
.auth-progress__item.is-active { color: var(--auth-ink); }
.auth-progress__item.is-active b { background: var(--auth-olive); border-color: var(--auth-olive); color: #fff; }
.auth-progress__line { background: #ddd4ca; height: 1px; width: 40px; }
.auth-form--register { margin-top: 0; }
.auth-form--register .auth-field { margin-bottom: 14px; }
.auth-form__alert { background: #fff0ed; border: 1px solid #efc3ba; border-radius: 12px; color: #9d3f31; font-size: 12px; line-height: 1.5; margin-bottom: 16px; padding: 11px 14px; }
.auth-section-title--address { border-top: 1px solid var(--auth-line); margin-top: 8px; padding-top: 18px; }

.auth-section-title { align-items: center; display: flex; gap: 14px; margin-bottom: 18px; }
.auth-section-title > span { align-items: center; background: #f0d0b9; border-radius: 13px; color: #9c5e3a; display: flex; font-size: 13px; font-weight: 700; height: 46px; justify-content: center; width: 46px; }
.auth-section-title--olive > span { background: #dde2cc; color: #667044; }
.auth-section-title h3 { color: var(--auth-ink); font-size: 18px; font-weight: 650; margin: 0 0 2px; }
.auth-section-title p { color: var(--auth-muted); font-size: 11px; margin: 0; }
.auth-grid { display: grid; gap: 0 16px; }
.auth-grid--two { grid-template-columns: repeat(2, 1fr); }
.auth-grid--three { grid-template-columns: repeat(3, 1fr); }
.auth-grid--four { grid-template-columns: repeat(4, 1fr); }
.auth-step[hidden] { display: none !important; }
.auth-form__actions { align-items: center; border-top: 1px solid var(--auth-line); display: flex; justify-content: space-between; gap: 18px; margin-top: 4px; padding-top: 18px; }
.auth-form__secure { color: var(--auth-muted); font-size: 11px; }
.auth-form__secure i { color: var(--auth-olive); margin-right: 5px; }

@media (max-width: 800px) {
    .auth-modal { padding: 16px 10px; }
    .auth-modal__dialog { width: min(100%, calc(100vw - 20px)); }
    .auth-modal__dialog--signin { display: block; }
    .auth-modal__aside { min-height: 180px; padding: 38px 30px; }
    .auth-modal__aside h2 { font-size: 38px; margin: 30px 0 12px; }
    .auth-modal__aside p { display: none; }
    .auth-modal__content { padding: 38px 28px 30px; }
    .auth-modal__dialog--register { padding: 34px 24px 24px; }
    .auth-register__header { padding-right: 45px; }
    .auth-grid--three, .auth-grid--four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .auth-modal__heading h2, .auth-register__header h2 { font-size: 32px; }
    .auth-grid--two, .auth-grid--three, .auth-grid--four { grid-template-columns: 1fr; }
    .auth-form__actions { align-items: stretch; flex-direction: column; }
    .auth-form__secure { text-align: center; }
    .auth-form__actions .auth-button { flex: 1; padding: 0 15px; }
}
