:root {
    --kj-gold: #c89d42;
    --kj-gold-dark: #9e7426;
    --kj-pink: #efa9b8;
    --kj-pink-soft: #fcebf0;
    --kj-sage: #b9cbbd;
    --kj-sage-soft: #edf4ee;
    --kj-ivory: #f7f2e9;
    --kj-cream: #fffaf3;
    --kj-ink: #29251f;
    --kj-muted: #746d65;
    --kj-white: #ffffff;
    --kj-danger: #9b3a45;
    --kj-danger-soft: #fff0f2;
    --kj-success: #2e6340;
    --kj-success-soft: #edf7ef;
    --kj-border: rgba(164, 125, 57, 0.22);
    --kj-shadow: 0 28px 70px rgba(80, 55, 25, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--kj-ink);
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
    background:
        radial-gradient(
            circle at 10% 12%,
            rgba(239, 169, 184, 0.32) 0,
            rgba(239, 169, 184, 0) 22rem
        ),
        radial-gradient(
            circle at 92% 86%,
            rgba(185, 203, 189, 0.38) 0,
            rgba(185, 203, 189, 0) 24rem
        ),
        linear-gradient(
            135deg,
            #fffaf3 0%,
            #f7f2e9 48%,
            #fbf5ed 100%
        );
}

body::before,
body::after {
    position: fixed;
    z-index: -1;
    content: "";
    pointer-events: none;
}

body::before {
    top: -9rem;
    right: -7rem;
    width: 28rem;
    height: 28rem;
    border: 1px solid rgba(200, 157, 66, 0.22);
    border-radius: 48% 52% 62% 38%;
    transform: rotate(24deg);
    box-shadow:
        0 0 0 2.5rem rgba(200, 157, 66, 0.035),
        0 0 0 5rem rgba(200, 157, 66, 0.025);
}

body::after {
    bottom: -11rem;
    left: -9rem;
    width: 30rem;
    height: 30rem;
    border-radius: 54% 46% 42% 58%;
    background:
        linear-gradient(
            145deg,
            rgba(185, 203, 189, 0.46),
            rgba(185, 203, 189, 0.08)
        );
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
}

.auth-visual {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4rem;
}

.auth-visual::before {
    position: absolute;
    inset: 8% 10%;
    content: "";
    border: 1px solid rgba(200, 157, 66, 0.23);
    border-radius: 46% 54% 50% 50%;
    transform: rotate(-8deg);
}

.auth-visual::after {
    position: absolute;
    right: -3rem;
    bottom: 2rem;
    width: 18rem;
    height: 18rem;
    content: "";
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(239, 169, 184, 0.4) 0 8%,
            transparent 8% 16%,
            rgba(239, 169, 184, 0.22) 16% 28%,
            transparent 28%
        );
    opacity: 0.8;
}

.auth-visual-content {
    position: relative;
    z-index: 1;
    width: min(32rem, 100%);
}

.auth-logo-large {
    display: block;
    width: min(25rem, 82%);
    height: auto;
    margin: 0 auto 2.2rem;
    filter: drop-shadow(
        0 10px 22px rgba(129, 90, 26, 0.15)
    );
}

.auth-visual-copy {
    max-width: 31rem;
    margin: 0 auto;
    text-align: center;
}

.auth-visual-copy h2 {
    margin: 0 0 1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3vw, 3.25rem);
    font-weight: 500;
    line-height: 1.08;
}

.auth-visual-copy p {
    margin: 0;
    color: var(--kj-muted);
    font-size: 1.04rem;
    line-height: 1.75;
}

.auth-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.78);
    border-left: 1px solid rgba(200, 157, 66, 0.14);
    backdrop-filter: blur(18px);
}

.auth-card {
    width: min(31rem, 100%);
    padding: 2.6rem;
    border: 1px solid var(--kj-border);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--kj-shadow);
}

.auth-brand-mobile {
    display: none;
    margin-bottom: 2rem;
}

.auth-brand-mobile img {
    display: block;
    width: min(15rem, 65%);
    height: auto;
    margin: 0 auto;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
    color: var(--kj-gold-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-kicker::before {
    width: 1.8rem;
    height: 1px;
    content: "";
    background: var(--kj-gold);
}

h1 {
    margin: 0 0 0.8rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 500;
    line-height: 1.1;
}

.auth-description {
    margin: 0 0 1.8rem;
    color: var(--kj-muted);
    line-height: 1.65;
}

.field {
    margin-top: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.93rem;
    font-weight: 750;
}

.input-wrap {
    position: relative;
}

input {
    width: 100%;
    min-height: 3.45rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(116, 109, 101, 0.28);
    border-radius: 0.9rem;
    outline: none;
    background: var(--kj-white);
    color: var(--kj-ink);
    font: inherit;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

input[type="password"],
input[data-password-input] {
    padding-right: 3.35rem;
}

input:focus {
    border-color: var(--kj-gold);
    background: #fffdfa;
    box-shadow:
        0 0 0 4px rgba(200, 157, 66, 0.13);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    display: grid;
    width: 2.3rem;
    height: 2.3rem;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--kj-muted);
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--kj-pink-soft);
    color: var(--kj-ink);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    width: 100%;
    min-height: 3.45rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.45rem;
    padding: 0.9rem 1.2rem;
    border-radius: 0.9rem;
    font: inherit;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.primary-button {
    border: 1px solid #2d2924;
    background:
        linear-gradient(
            135deg,
            #29251f,
            #161411
        );
    color: var(--kj-white);
    box-shadow:
        0 12px 25px rgba(30, 25, 18, 0.18);
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 16px 30px rgba(30, 25, 18, 0.22);
}

.secondary-button {
    border: 1px solid var(--kj-border);
    background: var(--kj-white);
    color: var(--kj-ink);
}

.secondary-button:hover {
    background: var(--kj-cream);
}

.auth-link {
    color: var(--kj-gold-dark);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2rem;
}

.auth-link-row {
    margin: 1.4rem 0 0;
    text-align: center;
}

.notice {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    border-radius: 0.95rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.notice-error {
    border: 1px solid rgba(155, 58, 69, 0.16);
    background: var(--kj-danger-soft);
    color: var(--kj-danger);
}

.notice-success {
    border: 1px solid rgba(46, 99, 64, 0.15);
    background: var(--kj-success-soft);
    color: var(--kj-success);
}

.notice-info {
    border: 1px solid rgba(200, 157, 66, 0.2);
    background: var(--kj-cream);
    color: #6d5427;
}

.notice ul {
    margin: 0.7rem 0 0;
    padding-left: 1.2rem;
}

.account-grid {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.account-row {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: var(--kj-cream);
}

.account-label {
    color: var(--kj-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.account-value {
    overflow-wrap: anywhere;
    font-weight: 650;
}

.account-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.auth-footer {
    margin-top: 2rem;
    color: var(--kj-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-shell {
        display: block;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 1.5rem;
        border-left: 0;
    }

    .auth-card {
        padding: 2rem;
    }

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

@media (max-width: 520px) {
    .auth-panel {
        padding: 0;
        background: rgba(255, 255, 255, 0.48);
    }

    .auth-card {
        min-height: 100vh;
        padding: 2rem 1.25rem;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .account-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}
