:root {
    --bg: #f8f3ed;
    --text: #1f1d1b;
    --muted: #6e625a;
    --primary: #1f3744;
    --primary-hover: #142732;
    --accent: #ea8f47;
    --surface: rgba(255, 255, 255, 0.86);
    --line: rgba(39, 28, 22, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background:
        radial-gradient(circle at top left, rgba(234, 143, 71, 0.11), transparent 24%),
        radial-gradient(circle at right center, rgba(31, 55, 68, 0.08), transparent 20%),
        linear-gradient(180deg, #fffdfa 0%, var(--bg) 100%);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    background: none;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.brand-wordmark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.brand-wordmark img {
    display: block;
    width: auto;
    height: 50px;
    object-fit: contain;
}

.auth-shell {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(100%, 1260px);
    min-height: min(760px, calc(100vh - 170px));
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(420px, 0.95fr);
    gap: 24px;
    align-items: stretch;
    padding: 18px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 28px 70px rgba(39, 28, 22, 0.1);
    backdrop-filter: blur(10px);
}

.auth-media {
    height: 100%;
    min-height: 0;
}

.auth-media-surface {
    position: relative;
    height: 100%;
    min-height: 560px;
    padding: 44px 40px;
    border-radius: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 214, 176, 0.85), transparent 20%),
        radial-gradient(circle at bottom left, rgba(255, 243, 230, 0.78), transparent 26%),
        linear-gradient(145deg, #203746 0%, #182a34 48%, #f1c293 170%);
    color: #fff9f3;
    box-shadow: 0 24px 54px rgba(17, 28, 35, 0.18);
}

.auth-media-surface::before,
.auth-media-surface::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.auth-media-surface::before {
    width: 280px;
    height: 280px;
    right: -70px;
    top: -80px;
    background: radial-gradient(circle, rgba(255, 237, 220, 0.42), transparent 68%);
}

.auth-media-surface::after {
    width: 360px;
    height: 360px;
    left: -120px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(234, 143, 71, 0.18), transparent 68%);
}

.auth-media-kicker {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 240, 225, 0.78);
    margin-bottom: 18px;
}

.auth-media-script {
    position: relative;
    z-index: 1;
    font-family: "Parisienne", cursive;
    font-size: clamp(3.2rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 0.95;
    color: #fff6ed;
    margin-bottom: 18px;
}

.auth-media-title {
    position: relative;
    z-index: 1;
    max-width: 430px;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 3.6vw, 3.25rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.auth-media-copy {
    position: relative;
    z-index: 1;
    max-width: 420px;
    color: rgba(255, 245, 237, 0.82);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 34px;
}

.auth-media-cards {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: end;
}

.auth-media-card {
    min-height: 126px;
    padding: 18px 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    display: grid;
    align-content: start;
    gap: 10px;
}

.auth-media-card-large {
    grid-column: 1 / -1;
    min-height: 138px;
}

.auth-media-card span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 234, 216, 0.72);
}

.auth-media-card strong {
    font-size: 1rem;
    line-height: 1.55;
    font-weight: 600;
}

.auth-panel {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 22px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 246, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 22px 48px rgba(39, 28, 22, 0.08);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 34px;
}

.auth-brand img {
    display: block;
    width: auto;
    height: 62px;
    object-fit: contain;
}

.auth-copy h1 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    margin-bottom: 16px;
}

.auth-copy p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-width: 0;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.auth-field span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #5b514b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-field input {
    width: 100%;
    min-height: 54px;
    border-radius: 18px;
    border: 1px solid rgba(200, 183, 169, 0.7);
    background: linear-gradient(180deg, #fffefc, #faf4ef);
    color: var(--text);
    padding: 0 18px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input::placeholder {
    color: #a29488;
}

.auth-field input:focus {
    border-color: rgba(234, 143, 71, 0.58);
    box-shadow: 0 0 0 4px rgba(234, 143, 71, 0.12);
}

.password-field-wrap {
    position: relative;
}

.password-field-wrap input {
    padding-right: 56px;
}

.password-field-wrap input::-ms-reveal,
.password-field-wrap input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #8f8379;
    cursor: pointer;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-link {
    color: #915121;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-link-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.align-right {
    align-self: flex-end;
    margin-top: -2px;
}

.auth-primary {
    min-height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #152832);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: 0 18px 28px rgba(31, 55, 68, 0.18);
}

.auth-primary:hover {
    background: var(--primary-hover);
}

.auth-secondary {
    min-height: 50px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffefc, #fbf6f1);
    border: 1px solid rgba(188, 180, 171, 0.72);
    color: #2f3a46;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0 18px;
}

.auth-secondary-muted {
    color: #7e6f64;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #8d8177;
    margin: 20px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d4dde7;
}

.auth-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-message[data-state="success"] {
    background: rgba(73, 159, 107, 0.12);
    color: #2f6f49;
}

.auth-message[data-state="error"] {
    background: rgba(199, 83, 74, 0.12);
    color: #9b332a;
}

.auth-message[data-state="info"] {
    background: rgba(31, 55, 68, 0.08);
    color: #365164;
}

.forgot-password-panel {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(250, 244, 238, 0.94));
    border: 1px solid rgba(214, 193, 177, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.forgot-password-head {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.forgot-password-head strong {
    font-size: 1rem;
    color: #2b241f;
}

.forgot-password-head p {
    color: #72675f;
    font-size: 0.93rem;
    line-height: 1.6;
}

.forgot-password-form {
    display: grid;
    gap: 16px;
}

.forgot-password-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.social-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-btn {
    min-height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fffefc, #fbf8f4);
    border: 1px solid rgba(188, 180, 171, 0.72);
    color: #2f3a46;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    padding: 0 18px;
    box-shadow: 0 10px 24px rgba(53, 40, 31, 0.06);
}

.social-btn:disabled,
.auth-primary:disabled,
.auth-secondary:disabled {
    opacity: 0.68;
    cursor: wait;
}

.social-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
}

.social-icon.google {
    background: transparent;
}

.social-icon.google img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-switch {
    text-align: center;
    color: #5a514b;
    font-size: 0.98rem;
    margin-top: 22px;
}

.auth-switch a {
    color: #915121;
    text-decoration: none;
    font-weight: 700;
}

.auth-footer-note {
    text-align: center;
    color: #ac9c90;
    font-size: 0.92rem;
    margin-top: 34px;
}

.consent-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #6e625a;
    font-size: 0.93rem;
    line-height: 1.5;
}

.consent-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

@media (max-width: 1100px) {
    .auth-card {
        grid-template-columns: 1fr;
        gap: 20px;
        min-height: auto;
    }

    .auth-panel {
        max-width: 560px;
        padding-bottom: 28px;
    }

    .auth-brand {
        margin-bottom: 28px;
    }

    .auth-media-surface {
        min-height: 420px;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        padding: 20px 16px;
    }

    .auth-card {
        width: min(100%, 560px);
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 14px;
    }

    .auth-media {
        display: none;
    }

    .auth-panel {
        max-width: 100%;
        padding: 22px 18px;
    }
}

@media (max-width: 680px) {
    .auth-shell {
        padding: 18px;
    }

    .auth-card {
        gap: 22px;
    }

    .auth-copy h1 {
        font-size: 2.2rem;
    }

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

    .auth-footer-note {
        margin-top: 36px;
    }

    .forgot-password-actions {
        grid-template-columns: 1fr;
    }
}
