:root {
    --dark-green: #173d2b;
    --medium-green: #587443;
    --light-green: #a9c46c;
    --cream: #f2f0e7;
    --white: #ffffff;
    --text: #253c31;
    --muted: #66756d;
    --border: #d1d8d0;
    --danger: #9b2929;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: #edf0eb;
    font-family: Arial, Helvetica, sans-serif;
}

body.auth-loading .login-shell {
    visibility: hidden;
}

body.auth-loading::before {
    content: "Checking client access…";
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--dark-green);
    font-weight: bold;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.brand-panel {
    padding: clamp(32px, 6vw, 80px);
    color: var(--white);
    background:
        linear-gradient(rgb(23 61 43 / 90%), rgb(23 61 43 / 94%)),
        url("/images/pacific-background.png") center / cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-family: Georgia, serif;
    font-size: 1.3rem;
    text-decoration: none;
}

.brand-link img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.brand-link strong {
    color: var(--light-green);
}

.eyebrow {
    margin: 0;
    color: var(--light-green);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-panel h1 {
    max-width: 620px;
    margin: 14px 0 20px;
    font-family: Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.02;
}

.brand-panel div > p:last-child {
    max-width: 560px;
    color: #dce7df;
    font-size: 1.05rem;
    line-height: 1.7;
}

.home-link {
    color: var(--white);
    font-weight: bold;
    text-decoration: none;
}

.login-panel {
    padding: 40px 24px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(100%, 480px);
    padding: clamp(28px, 5vw, 50px);
    background: var(--white);
    border-top: 6px solid var(--medium-green);
    box-shadow: 0 18px 55px rgb(23 61 43 / 13%);
}

.login-card h2 {
    margin: 8px 0 12px;
    color: var(--dark-green);
    font-family: Georgia, serif;
    font-size: 2.35rem;
}

.intro {
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 1.6;
}

.login-card label {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--dark-green);
    font-size: 0.9rem;
    font-weight: bold;
}

.login-card input {
    width: 100%;
    padding: 14px;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    font: inherit;
}

.login-card input:focus {
    border-color: var(--medium-green);
    outline: 3px solid rgb(88 116 67 / 15%);
}

.login-card button {
    width: 100%;
    padding: 15px 18px;
    color: var(--white);
    background: var(--dark-green);
    border: 0;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.login-card button:hover {
    background: #295941;
}

.login-card .forgot-password-button {
    margin-top: 10px;
    padding: 10px;
    color: var(--medium-green);
    background: transparent;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-card .forgot-password-button:hover {
    color: var(--dark-green);
    background: #f3f6f0;
}


.login-card button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.login-status {
    min-height: 22px;
    margin: 15px 0 0;
    color: var(--danger);
    font-size: 0.9rem;
}

.login-status.success {
    color: var(--medium-green);
}

.help-text {
    margin: 22px 0 0;
    padding-top: 20px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    line-height: 1.6;
}

.help-text a {
    color: var(--medium-green);
    font-weight: bold;
}

@media (max-width: 800px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 360px;
        gap: 45px;
    }

    .brand-panel h1 {
        font-size: clamp(2.4rem, 11vw, 4rem);
    }
}
