:root {
    --lp-navy: #2f4325;
    --lp-navy-dark: #24351d;
    --lp-blue: #526b3b;
    --lp-bg: #f5f8f2;
    --lp-text: #2f4325;
    --lp-muted: #75836c;
    --lp-border: #d8e1d1;
    --lp-white: #ffffff;
    --lp-danger-bg: #fff1f1;
    --lp-danger: #b42318;
    --lp-success-bg: #edf9f1;
    --lp-success: #18794e;
}

* { box-sizing: border-box; }

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

body.login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--lp-text);
    background: var(--lp-bg);
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(330px, 40%) minmax(0, 1fr);
}

.login-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 42px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(155deg, var(--lp-navy) 0%, var(--lp-navy-dark) 100%);
}

.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.045);
}

.login-brand::before {
    width: 360px;
    height: 360px;
    top: -170px;
    right: -150px;
}

.login-brand::after {
    width: 280px;
    height: 280px;
    bottom: -130px;
    left: -120px;
}

.brand-content {
    position: relative;
    z-index: 1;
    width: min(100%, 360px);
    text-align: center;
}

.brand-logo {
    width: 132px;
    height: 106px;
    object-fit: contain;
    display: block;
    margin: 0 auto 30px;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(36, 53, 29, .22);
}

.brand-title {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.6px;
}

.brand-subtitle {
    margin: 10px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 16px;
}

.brand-line {
    width: 58px;
    height: 3px;
    margin: 26px auto 0;
    border-radius: 99px;
    background: rgba(255,255,255,.75);
}

.login-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
}

.login-card {
    width: min(100%, 480px);
    background: var(--lp-white);
    border: 1px solid rgba(219,229,239,.95);
    border-radius: 18px;
    padding: 36px 38px;
    box-shadow: 0 16px 42px rgba(47, 67, 37, .10);
}

.login-heading {
    margin-bottom: 28px;
}

.login-heading h1 {
    margin: 0 0 7px;
    color: var(--lp-text);
    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;
}

.login-heading p {
    margin: 0;
    color: var(--lp-muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-alert {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.login-alert.error {
    color: var(--lp-danger);
    background: var(--lp-danger-bg);
    border: 1px solid #f5cccc;
}

.login-alert.success {
    color: var(--lp-success);
    background: var(--lp-success-bg);
    border: 1px solid #c8ead5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    color: #3f552f;
    font-size: 13px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--lp-border);
    border-radius: 9px;
    outline: none;
    color: var(--lp-text);
    background: #fff;
    font: inherit;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control::placeholder { color: #98a390; }

.form-control:focus {
    border-color: #667f4a;
    box-shadow: 0 0 0 3px rgba(82,107,59,.13);
}

.login-button {
    width: 100%;
    min-height: 47px;
    margin-top: 4px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: var(--lp-navy);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}

.login-button:hover { background: var(--lp-navy-dark); }
.login-button:active { transform: translateY(1px); }

.login-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e8ede4;
    text-align: center;
    color: #8b9783;
    font-size: 12px;
}

.first-access-note {
    margin: -8px 0 4px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #526b3b;
    background: #f5f8f2;
    border: 1px solid #dce5d5;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { min-height: 265px; padding: 34px 24px; }
    .brand-logo { width: 100px; height: 80px; margin-bottom: 18px; }
    .brand-title { font-size: 28px; }
    .brand-subtitle { font-size: 14px; }
    .brand-line { margin-top: 16px; }
    .login-content { padding: 26px 18px 34px; align-items: flex-start; }
    .login-card { padding: 28px 24px; }
}

@media (max-width: 480px) {
    .login-brand { min-height: 225px; }
    .brand-logo { width: 86px; height: 69px; border-radius: 15px; padding: 8px; }
    .brand-title { font-size: 25px; }
    .brand-subtitle { font-size: 13px; }
    .login-content { padding: 18px 12px 28px; }
    .login-card { border-radius: 14px; padding: 24px 18px; }
    .login-heading h1 { font-size: 22px; }
}
