:root {
    --amora-primary: #9d3f20;
    --amora-primary-dark: #702610;
    --amora-primary-light: #bf623d;
    --amora-accent: #f59e0b;
    --amora-cream: #fff8f2;

    --surface: #ffffff;
    --surface-muted: #f8fafc;

    --text-primary: #182230;
    --text-secondary: #667085;
    --text-light: #ffffff;

    --border: #e4e7ec;
    --border-focus: #b84d29;

    --success: #16803c;
    --success-background: #ecfdf3;
    --success-border: #abefc6;

    --error: #b42318;
    --error-background: #fff1f0;
    --error-border: #fecdca;

    --shadow-large:
        0 32px 80px rgba(31, 24, 20, 0.22);

    --shadow-input:
        0 1px 2px rgba(16, 24, 40, 0.04);

    --radius-large: 30px;
    --radius-medium: 16px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
    background: #55200d;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 36px;
    background:
        linear-gradient(
            125deg,
            rgba(92, 31, 10, 0.97),
            rgba(145, 57, 27, 0.9)
        ),
        url("../images/amor-village-hero.jpg")
            center / cover no-repeat;
}

.auth-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-background::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(
            120deg,
            rgba(67, 19, 5, 0.54),
            rgba(147, 55, 21, 0.28)
        );
}

.auth-shape {
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.auth-shape-one {
    top: -180px;
    right: -120px;
    width: 480px;
    height: 480px;
    background: rgba(255, 255, 255, 0.04);
}

.auth-shape-two {
    bottom: -250px;
    left: -180px;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.025);
}

.auth-shape-three {
    top: 18%;
    left: 8%;
    width: 190px;
    height: 190px;
    border-color: rgba(245, 158, 11, 0.18);
}

.auth-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, 100%);
    min-height: 690px;
    display: grid;
    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(420px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-large);
    background: var(--surface);
    box-shadow: var(--shadow-large);
}

.auth-introduction {
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: var(--text-light);
    background:
        linear-gradient(
            145deg,
            rgba(91, 28, 8, 0.92),
            rgba(165, 66, 31, 0.87)
        ),
        url("../images/amor-village-hero.jpg")
            center / cover no-repeat;
}

.auth-introduction::before {
    position: absolute;
    right: -150px;
    bottom: 90px;
    width: 370px;
    height: 370px;
    border: 40px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
}

.auth-introduction::after {
    position: absolute;
    top: -100px;
    left: -80px;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    content: "";
    background: rgba(245, 158, 11, 0.1);
    filter: blur(2px);
}

.auth-introduction-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(72, 21, 5, 0.12),
            rgba(72, 21, 5, 0.4)
        );
}

.auth-introduction-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 690px;
    display: flex;
    flex-direction: column;
    padding: 48px 52px 40px;
}

.auth-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.auth-logo-frame {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 12px 28px rgba(61, 17, 5, 0.24);
}

.auth-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.auth-brand-copy {
    display: grid;
    gap: 2px;
}

.auth-brand-copy strong {
    font-size: 24px;
    letter-spacing: -0.03em;
}

.auth-brand-copy small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-welcome {
    max-width: 560px;
    margin-top: auto;
    margin-bottom: 38px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    margin-bottom: 18px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffddad;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.auth-welcome h1 {
    max-width: 580px;
    margin: 0;
    font-size: clamp(38px, 4.2vw, 59px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.auth-welcome h1::after {
    width: 66px;
    height: 5px;
    display: block;
    margin-top: 24px;
    border-radius: 999px;
    content: "";
    background: linear-gradient(
        90deg,
        var(--amora-accent),
        #ffd08a
    );
}

.auth-welcome > p {
    max-width: 570px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.75;
}

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

.auth-feature {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(9px);
}

.auth-feature-icon {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffd49b;
    font-size: 19px;
}

.auth-feature strong {
    display: block;
    font-size: 12px;
}

.auth-feature p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    line-height: 1.5;
}

.auth-introduction-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.auth-introduction-footer span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.67);
    font-size: 10px;
    line-height: 1.5;
}

.auth-introduction-footer svg {
    flex: 0 0 auto;
    color: #ffd49b;
    font-size: 16px;
}

.auth-form-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 48px 58px 34px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(157, 63, 32, 0.06),
            transparent 31%
        ),
        var(--surface);
}

.auth-mobile-brand {
    display: none;
}

.auth-form-container {
    width: min(100%, 440px);
    margin: auto;
}

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

.auth-form-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 15px;
    background: #fff1eb;
    color: var(--amora-primary);
    font-size: 24px;
}

.auth-form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--amora-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-form-heading h2 {
    margin: 0;
    color: #101828;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.auth-form-heading p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.auth-alert {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-bottom: 17px;
    padding: 12px 13px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 12px;
}

.auth-alert-success {
    border-color: var(--success-border);
    background: var(--success-background);
    color: var(--success);
}

.auth-alert-error {
    border-color: var(--error-border);
    background: var(--error-background);
    color: var(--error);
}

.auth-alert-icon {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 19px;
}

.auth-alert strong {
    display: block;
    font-size: 12px;
}

.auth-alert p {
    margin: 3px 0 0;
    color: inherit;
    line-height: 1.5;
}

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

.auth-field label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 12px;
    font-weight: 750;
}

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

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: #ffffff;
    box-shadow: var(--shadow-input);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.auth-input-wrapper:focus-within {
    border-color: var(--border-focus);
    box-shadow:
        0 0 0 4px rgba(157, 63, 32, 0.11);
}

.auth-input-wrapper.has-error {
    border-color: var(--error);
}

.auth-input-wrapper.has-error:focus-within {
    box-shadow:
        0 0 0 4px rgba(180, 35, 24, 0.1);
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    display: grid;
    place-items: center;
    color: #98a2b3;
    font-size: 19px;
    pointer-events: none;
}

.auth-input-wrapper input {
    width: 100%;
    min-height: 48px;
    padding: 0 46px 0 44px;
    border: none;
    outline: none;
    border-radius: inherit;
    background: transparent;
    color: #101828;
    font-size: 13px;
}

.auth-input-wrapper input::placeholder {
    color: #98a2b3;
}

.auth-password-toggle {
    position: absolute;
    right: 8px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #667085;
    font-size: 19px;
    cursor: pointer;
}

.auth-password-toggle:hover {
    background: #f2f4f7;
    color: #344054;
}

.password-eye-hide {
    display: none;
}

.auth-password-toggle.is-visible .password-eye-show {
    display: none;
}

.auth-password-toggle.is-visible .password-eye-hide {
    display: block;
}

.auth-error-text {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin: 7px 0 0;
    color: var(--error);
    font-size: 11px;
    line-height: 1.4;
}

.auth-error-text svg {
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 14px;
}

.auth-form-options {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: -2px;
}

.auth-checkbox {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #475467;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.auth-checkbox-control {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    background: #ffffff;
    color: #ffffff;
    transition: 0.15s ease;
}

.auth-checkbox-control svg {
    width: 13px;
    height: 13px;
    opacity: 0;
    transform: scale(0.7);
    transition: 0.15s ease;
}

.auth-checkbox input:checked + .auth-checkbox-control {
    border-color: var(--amora-primary);
    background: var(--amora-primary);
}

.auth-checkbox input:checked + .auth-checkbox-control svg {
    opacity: 1;
    transform: scale(1);
}

.auth-checkbox input:focus-visible + .auth-checkbox-control {
    outline: 3px solid rgba(157, 63, 32, 0.18);
    outline-offset: 2px;
}

.auth-submit {
    position: relative;
    min-height: 51px;
    overflow: hidden;
    border: 1px solid var(--amora-primary);
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            var(--amora-primary),
            var(--amora-primary-dark)
        );
    color: #ffffff;
    box-shadow:
        0 11px 22px rgba(126, 43, 17, 0.24);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.auth-submit::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(
            100deg,
            transparent 30%,
            rgba(255, 255, 255, 0.18),
            transparent 70%
        );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 15px 29px rgba(126, 43, 17, 0.28);
}

.auth-submit:hover:not(:disabled)::before {
    transform: translateX(100%);
}

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

.auth-submit:focus-visible {
    outline: 4px solid rgba(157, 63, 32, 0.2);
    outline-offset: 3px;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.78;
}

.auth-submit-content,
.auth-submit-loading {
    position: relative;
    z-index: 2;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.auth-submit-content svg {
    font-size: 19px;
}

.auth-submit-loading {
    display: none;
}

.auth-submit.is-loading .auth-submit-content {
    display: none;
}

.auth-submit.is-loading .auth-submit-loading {
    display: inline-flex;
}

.auth-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.75s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-security-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 11px 12px;
    border: 1px solid #e9d7cf;
    border-radius: 12px;
    background: #fffaf7;
    color: #6d4a3d;
    font-size: 10px;
    line-height: 1.55;
}

.auth-security-note svg {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--amora-primary);
    font-size: 17px;
}

.auth-divider {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0 15px;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    content: "";
    background: var(--border);
}

.auth-bottom-links {
    display: grid;
    gap: 9px;
    justify-items: center;
    text-align: center;
}

.auth-bottom-links a {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--amora-primary);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

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

.auth-bottom-links a svg {
    font-size: 16px;
}

.auth-bottom-links > span {
    color: #98a2b3;
    font-size: 10px;
}

.auth-mobile-footer {
    margin-top: 28px;
    color: #98a2b3;
    font-size: 9px;
    text-align: center;
}

.auth-password-toggle:focus-visible,
.auth-bottom-links a:focus-visible,
.auth-logo-link:focus-visible,
.auth-mobile-brand a:focus-visible {
    outline: 3px solid rgba(157, 63, 32, 0.2);
    outline-offset: 3px;
    border-radius: 8px;
}

@media (max-width: 980px) {
    .auth-page {
        padding: 25px;
    }

    .auth-shell {
        grid-template-columns:
            minmax(0, 0.9fr)
            minmax(390px, 1.1fr);
    }

    .auth-introduction-content {
        padding: 40px 35px 32px;
    }

    .auth-welcome h1 {
        font-size: 43px;
    }

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

    .auth-feature:nth-child(2) {
        display: none;
    }

    .auth-form-section {
        padding-inline: 42px;
    }
}

@media (max-width: 760px) {
    body {
        background: #fffaf7;
    }

    .auth-page {
        display: block;
        min-height: 100vh;
        padding: 0;
        overflow: visible;
        background:
            linear-gradient(
                180deg,
                rgba(119, 39, 13, 0.98) 0,
                rgba(154, 58, 25, 0.94) 220px,
                #fffaf7 220px
            );
    }

    .auth-shape-one {
        width: 290px;
        height: 290px;
    }

    .auth-shell {
        min-height: 100vh;
        display: block;
        overflow: visible;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .auth-introduction {
        display: none;
    }

    .auth-form-section {
        min-height: 100vh;
        justify-content: flex-start;
        padding: 28px 20px 25px;
        background: transparent;
    }

    .auth-mobile-brand {
        display: block;
        margin-bottom: 30px;
    }

    .auth-mobile-brand a {
        display: inline-flex;
        gap: 10px;
        align-items: center;
        color: #ffffff;
        font-size: 21px;
        font-weight: 800;
        letter-spacing: -0.03em;
        text-decoration: none;
    }

    .auth-mobile-brand img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        border-radius: 15px;
        background: #ffffff;
        box-shadow:
            0 9px 20px rgba(73, 22, 5, 0.2);
    }

    .auth-form-container {
        width: 100%;
        padding: 28px 22px 24px;
        border: 1px solid rgba(228, 231, 236, 0.88);
        border-radius: 22px;
        background: #ffffff;
        box-shadow:
            0 19px 48px rgba(70, 32, 18, 0.14);
    }

    .auth-form-icon {
        display: none;
    }

    .auth-form-heading {
        margin-bottom: 24px;
    }

    .auth-form-heading h2 {
        font-size: 28px;
    }

    .auth-mobile-footer {
        color: #8f725f;
    }
}

@media (max-width: 430px) {
    .auth-form-section {
        padding-inline: 13px;
    }

    .auth-form-container {
        padding: 25px 17px 21px;
        border-radius: 19px;
    }

    .auth-form-heading h2 {
        font-size: 26px;
    }

    .auth-input-wrapper input {
        min-height: 47px;
    }

    .auth-submit {
        min-height: 49px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}