:root {
    --olive-950: #1f2917;
    --olive-900: #2f3c22;
    --olive-800: #41512b;
    --olive-700: #586b36;
    --olive-600: #718548;
    --leaf-500: #24a148;
    --leaf-400: #35c85a;
    --leaf-200: #a7edb7;
    --cream: #f5f3e9;
    --paper: #fffef9;
    --ink: #1d261a;
    --muted: #687062;
    --line: #dfe4d9;
    --danger: #a6332b;
    --warning: #8a5a12;
    --success: #176b35;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(440px, .92fr);
}

.brand-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 100vh;
    color: white;
    background:
        radial-gradient(circle at 18% 14%, rgba(71, 203, 91, .2), transparent 24rem),
        linear-gradient(145deg, var(--olive-950), var(--olive-700));
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.brand-content {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    margin: auto;
    padding: 56px clamp(40px, 7vw, 96px);
}

.brand, .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font: 800 1.15rem Inter, ui-sans-serif, sans-serif;
    letter-spacing: -.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--olive-950);
    border-radius: 15px 15px 15px 4px;
    background: var(--leaf-400);
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    font-size: .88rem;
}

.eyebrow {
    margin-top: clamp(60px, 10vh, 110px);
    color: var(--leaf-200);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.brand-panel h1 {
    max-width: 640px;
    margin: 18px 0;
    font: 800 clamp(2.6rem, 5vw, 5rem)/1.02 Inter, ui-sans-serif, sans-serif;
    letter-spacing: -.055em;
}

.brand-copy {
    max-width: 590px;
    margin: 0;
    color: rgba(255,255,255,.76);
    font-size: 1.08rem;
    line-height: 1.7;
}

.river-scene {
    position: relative;
    height: 170px;
    margin: 28px -96px 12px;
    overflow: hidden;
}

.sun {
    position: absolute;
    top: 28px;
    right: 18%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e7d97f;
    box-shadow: 0 0 45px rgba(231,217,127,.5);
}

.river {
    position: absolute;
    left: -5%;
    width: 110%;
    border-radius: 50% 50% 0 0;
}

.river-back {
    bottom: 18px;
    height: 62px;
    background: rgba(110, 175, 139, .32);
    transform: rotate(-2deg);
}

.river-front {
    bottom: -24px;
    height: 90px;
    background: rgba(184, 222, 196, .18);
    transform: rotate(2deg);
}

.boat {
    position: absolute;
    z-index: 3;
    right: 32%;
    bottom: 55px;
    width: 130px;
    height: 55px;
    animation: drift 4s ease-in-out infinite;
}

.boat-hull {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 24px;
    border-radius: 4px 4px 55px 30px;
    background: #f3edcf;
    transform: skewX(-10deg);
}

.boat-cabin {
    position: absolute;
    right: 32px;
    bottom: 22px;
    width: 54px;
    height: 28px;
    border-radius: 7px 7px 2px 2px;
    background: var(--leaf-400);
    box-shadow: inset -12px 0 rgba(31,41,23,.32);
}

.trust-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: rgba(255,255,255,.76);
    font-size: .92rem;
}

.trust-list span { color: var(--leaf-400); font-weight: 800; margin-right: 8px; }

.leaf {
    position: absolute;
    z-index: 1;
    width: 190px;
    height: 80px;
    border-radius: 100% 0 100% 0;
    background: linear-gradient(135deg, rgba(61,210,91,.44), rgba(29,104,48,.1));
    transform: rotate(28deg);
}

.leaf::after {
    content: "";
    position: absolute;
    top: 40px;
    left: 18px;
    width: 145px;
    height: 2px;
    background: rgba(180,255,193,.35);
    transform: rotate(-22deg);
    transform-origin: left;
}

.leaf-one { top: 8%; right: -55px; }
.leaf-two { bottom: 8%; left: -70px; transform: rotate(205deg) scale(1.35); }
.leaf-three { top: 42%; right: -100px; transform: rotate(155deg) scale(.72); }

.form-panel {
    display: grid;
    place-items: center;
    padding: clamp(28px, 5vw, 76px);
    background:
        radial-gradient(circle at 90% 10%, rgba(53,200,90,.11), transparent 22rem),
        var(--paper);
}

.auth-card { width: min(470px, 100%); }
.mobile-brand { display: none; color: var(--olive-900); margin-bottom: 40px; }

.form-heading .kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--leaf-500);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.form-heading h2 {
    margin: 0;
    font: 800 clamp(2rem, 4vw, 3rem)/1.1 Inter, ui-sans-serif, sans-serif;
    letter-spacing: -.045em;
}

.form-heading p { margin: 12px 0 30px; color: var(--muted); line-height: 1.6; }

.auth-form { display: grid; gap: 20px; }
.auth-form label { display: grid; gap: 8px; color: var(--olive-900); font-weight: 700; font-size: .9rem; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.label-row a { color: var(--leaf-500); font-size: .8rem; font-weight: 800; text-decoration: none; }
.label-row a:hover { text-decoration: underline; }

.auth-form input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 13px;
    outline: none;
    background: white;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.auth-form input:focus {
    border-color: var(--leaf-500);
    box-shadow: 0 0 0 4px rgba(36,161,72,.12);
}

.auth-form input::placeholder { color: #a3aa9d; }

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    margin-top: 4px;
    color: white;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--olive-700), var(--olive-900));
    box-shadow: 0 14px 30px rgba(47,60,34,.2);
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 35px rgba(47,60,34,.28); }
.primary-button:focus-visible { outline: 3px solid var(--leaf-400); outline-offset: 3px; }

.signup-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #dce8d8;
    border-radius: 16px;
    background: #f4f8ef;
}

.signup-callout div { display: grid; gap: 3px; }
.signup-callout strong { font-size: .9rem; }
.signup-callout span { color: var(--muted); font-size: .78rem; }
.signup-callout a { flex: 0 0 auto; color: var(--olive-800); font-weight: 800; font-size: .82rem; }

.security-note { margin: 22px 0 0; color: #879080; text-align: center; font-size: .78rem; }
.security-note span { color: var(--leaf-500); }

.auth-alert {
    margin: 0 0 22px;
    padding: 13px 15px;
    border-radius: 12px;
    background: #f0f3ed;
    font-size: .88rem;
}
.auth-alert-danger { color: var(--danger); background: #fff0ee; }
.auth-alert-warning { color: var(--warning); background: #fff7df; }
.auth-alert-success { color: var(--success); background: #eaf8ed; }

.recovery-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 12%, rgba(53,200,90,.16), transparent 26rem),
        linear-gradient(145deg, #f8f7ef, #eef3e9);
}

.recovery-card {
    width: min(500px, 100%);
    padding: clamp(28px, 6vw, 52px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255,255,251,.96);
    box-shadow: 0 24px 70px rgba(42,55,32,.12);
}

.recovery-card .mobile-brand { display: inline-flex; margin-bottom: 42px; }
.recovery-card .primary-button { width: 100%; }
.recovery-back { display: block; margin-top: 24px; color: var(--olive-700); text-align: center; font-size: .86rem; font-weight: 700; }
.invalid-token { padding: 20px; color: var(--danger); border-radius: 14px; background: #fff0ee; line-height: 1.6; }

@keyframes drift {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-7px) rotate(1deg); }
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .form-panel { min-height: 100vh; padding: 32px 22px; }
    .mobile-brand { display: inline-flex; }
}

@media (max-width: 520px) {
    .signup-callout { align-items: flex-start; flex-direction: column; }
    .signup-callout a { display: inline-block; padding: 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
