@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --login-green: #2f7d32;
    --login-green-dark: #1c5c25;
    --login-green-soft: #eef7ed;
    --login-ink: #142019;
    --login-muted: #66736a;
    --login-line: #dce5de;
    --login-panel: #fbfcfb;
}

html { scrollbar-gutter: stable; }
.login-visual, .login-visual * { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: block;
    background: var(--login-panel);
    color: var(--login-ink);
    font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 56%) minmax(420px, 44%); }
.login-visual { position: sticky; top: 0; height: 100vh; min-height: 0; box-sizing: border-box; overflow: hidden; padding: 52px 54px 44px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: #102b18 url('/CropFinder/public/assets/images/cropfinder-login-hero.png') center center / cover no-repeat; isolation: isolate; }
.login-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 20, 10, .9) 0%, rgba(5, 20, 10, .63) 45%, rgba(5, 20, 10, .12) 100%), linear-gradient(0deg, rgba(3, 15, 7, .8) 0%, transparent 56%); }
.login-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.login-brand-mark { width: 43px; height: 43px; display: block; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.35); border-radius: 11px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.login-brand-copy { display: flex; flex-direction: column; gap: 2px; }
.login-brand-copy strong { font-size: 16px; letter-spacing: -.01em; }
.login-brand-copy span { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.login-hero-copy { width: min(610px, 100%); }
.login-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: #a9df7a; font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.login-eyebrow::before { content: ""; width: 32px; height: 2px; background: #84c95f; }
.login-hero-copy h1 { max-width: 570px; margin: 0; font-size: clamp(46px, 4.8vw, 74px); line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
.login-hero-copy > p:not(.login-eyebrow) { max-width: 540px; margin: 24px 0 0; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.7; }
.login-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.22); }
.login-feature { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.86); font-size: 11px; font-weight: 700; }
.login-feature svg { width: 18px; height: 18px; flex: 0 0 auto; color: #9dd777; }

.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 52px clamp(40px, 7vw, 118px); background: var(--login-panel); }
.login-form-wrap { width: min(440px, 100%); }
.login-mobile-brand { display: none; margin-bottom: 38px; color: var(--login-ink); }
.login-mobile-brand .login-brand-copy span { color: var(--login-muted); }
.login-kicker { margin: 0 0 16px; color: var(--login-green); font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.login-form-wrap h2 { margin: 0; font-size: clamp(34px, 3vw, 46px); line-height: 1.05; letter-spacing: -.04em; }
.login-intro { margin: 13px 0 34px; color: var(--login-muted); font-size: 14px; line-height: 1.65; }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { margin-bottom: 8px; color: #34443a; font-size: 11px; font-weight: 700; }
.login-input { position: relative; }
.login-input svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #768179; pointer-events: none; }
.login-input input { height: 52px; padding: 0 48px 0 46px; border: 1px solid var(--login-line); border-radius: 10px; background: #f7f9f7; color: var(--login-ink); font-size: 13px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.login-input input:focus { border-color: var(--login-green); background: #fff; box-shadow: 0 0 0 4px rgba(47,125,50,.1); }
.password-row input { padding-right: 55px; }
.show-password { right: 13px; color: var(--login-green); font-size: 11px; }
.login-button { height: 52px; margin-top: 8px; border-radius: 10px; background: var(--login-green); font-size: 13px; box-shadow: 0 10px 24px rgba(47,125,50,.16); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.login-button:hover { background: var(--login-green-dark); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(47,125,50,.22); }
.login-button-arrow { margin-left: 8px; font-size: 18px; line-height: 0; }
.login-button:disabled { cursor: wait; opacity: .78; transform: none; }
.login-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0 24px; }
.register-link { margin: 0; text-align: left; font-size: 11px; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 23px; color: var(--login-muted); font-size: 10px; }
.login-security svg { width: 14px; height: 14px; color: var(--login-green); }
.login-footer { margin-top: 52px; color: #98a099; font-size: 10px; text-align: center; }
.alert { margin-bottom: 20px; }

@media (max-width: 1040px) {
    .login-shell { grid-template-columns: minmax(0, 50%) minmax(390px, 50%); }
    .login-visual { padding: 38px; }
    .login-hero-copy h1 { font-size: 48px; }
    .login-features { grid-template-columns: 1fr; gap: 11px; }
    .login-panel { padding: 44px; }
}

@media (max-width: 780px) {
    .login-shell { display: block; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; padding: 36px 24px; }
    .login-panel :is(input, select, textarea) { font-size: 16px !important; }
    .login-panel button { min-height: 44px; }
    .login-mobile-brand { display: inline-flex; }
    .login-form-wrap h2 { font-size: 36px; }
    .login-footer { margin-top: 40px; }
}

@media (max-width: 420px) {
    .login-panel { padding: 28px 18px; }
    .login-meta { align-items: flex-start; flex-direction: column; }
}
