:root {
    --login-green: #0d6b2f;
    --login-green-dark: #094d21;
    --login-bg: #eef3f0;
    --login-surface: #ffffff;
    --login-text: #1f2a24;
    --login-muted: #66736b;
    --login-border: #dbe5df;
    --login-danger: #b42318;
    --login-danger-bg: #fff1f0;
    --login-shadow: 0 22px 60px rgba(20, 48, 32, .14);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body.login-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--login-bg);
    color: var(--login-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.login-shell {
    width: min(900px, 100%);
    min-height: 540px;
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(380px, 1.15fr);
    overflow: hidden;
    border: 1px solid var(--login-border);
    border-radius: 8px;
    background: var(--login-surface);
    box-shadow: var(--login-shadow);
}

.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    padding: 42px;
    background: var(--login-green);
    color: #fff;
}

.admin-login .brand-panel { background: #174b32; }

.brand-lockup {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    font-size: 20px;
}

.brand-label,
.panel-kicker {
    display: block;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-label { color: rgba(255, 255, 255, .72); }

.brand-lockup h1 {
    margin: 7px 0 4px;
    font-size: 29px;
    line-height: 1.1;
    letter-spacing: 0;
}

.brand-lockup p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
}

.access-note {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    line-height: 1.45;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 42px 52px;
    background: var(--login-surface);
}

.auth-content { width: min(390px, 100%); }

.panel-kicker { color: var(--login-green); }

.auth-content h2 {
    margin: 8px 0 0;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.auth-copy {
    margin: 9px 0 28px;
    color: var(--login-muted);
    line-height: 1.5;
}

.alert-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 12px 13px;
    border: 1px solid #f3c7c3;
    border-radius: 7px;
    background: var(--login-danger-bg);
    color: var(--login-danger);
    font-size: 14px;
    line-height: 1.45;
}

.login-form { display: grid; gap: 18px; }

.field label {
    display: block;
    margin-bottom: 7px;
    color: #35443b;
    font-size: 14px;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: center;
    min-height: 46px;
    overflow: hidden;
    border: 1px solid #c8d5cd;
    border-radius: 7px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-shell:focus-within {
    border-color: var(--login-green);
    box-shadow: 0 0 0 3px rgba(13, 107, 47, .12);
}

.input-shell > i {
    width: 44px;
    flex: 0 0 44px;
    color: #738078;
    text-align: center;
}

.input-shell input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px 11px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--login-text);
    font: inherit;
}

.input-shell input::placeholder { color: #98a29c; }

.submit-button {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 11px 16px;
    border: 0;
    border-radius: 7px;
    background: var(--login-green);
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
}

.submit-button:hover { background: var(--login-green-dark); }
.submit-button:active { transform: translateY(1px); }
.submit-button:focus-visible { outline: 3px solid rgba(13, 107, 47, .2); outline-offset: 2px; }

.login-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--login-border);
    color: var(--login-muted);
    font-size: 13px;
}

.login-footer a {
    color: var(--login-green);
    font-weight: 700;
    text-decoration: none;
}

.login-footer a:hover { text-decoration: underline; }

@media (max-width: 760px) {
    body.login-page { padding: 14px; }

    .login-shell {
        width: min(520px, 100%);
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .brand-panel {
        gap: 22px;
        padding: 26px;
    }

    .access-note { display: none; }

    .auth-panel { padding: 34px 26px; }
}

@media (max-width: 420px) {
    body.login-page { padding: 0; background: #fff; }
    .login-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .brand-panel { padding: 22px 20px; }
    .brand-lockup h1 { font-size: 24px; }
    .auth-panel { padding: 30px 20px; place-items: start center; }
    .auth-content h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
