:root {
    --primary: #39a900;
    --primary-dark: #2d8300;
    --secondary: #00304d;
    --white: #ffffff;
    --black: #000000;
    --gray-text: #6b7280;
    --border: #dbe7db;
    --field-bg: #f6faf6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Work Sans', sans-serif;
    background: var(--white);
    color: var(--black);
    min-height: 100vh;
    padding: 20px;
    display: flex;
}

.login-container {
    display: flex;
    flex: 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border);
}

/* ---------- Lado formulario ---------- */
.form-side {
    flex: 0 0 45%;
    max-width: 620px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 64px;
}

.form-content {
    width: 100%;
}

.logo-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 24px;
}

.logo-mark img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.logo-fallback {
    display: none;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
}

.form-side h1 {
    font-size: 26px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
}

.form-side h1 .highlight {
    color: var(--primary);
}

.subtitle {
    font-size: 14px;
    color: var(--gray-text);
    line-height: 1.5;
    margin-bottom: 28px;
}

form {
    display: flex;
    flex-direction: column;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: var(--black);
    background: var(--field-bg);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input::placeholder {
    color: #9aa89e;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(57, 169, 0, .15);
}

.forgot-row {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-row a {
    font-size: 13px;
    color: var(--secondary);
    text-decoration: none;
}

.forgot-row a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 13px;
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(57, 169, 0, .35);
    transition: box-shadow .15s ease, transform .15s ease;
}

.btn-primary:hover {
    box-shadow: 0 10px 22px rgba(57, 169, 0, .45);
}

.btn-primary:active {
    transform: scale(.97);
}

.signup-row {
    text-align: center;
    font-size: 13px;
    color: var(--gray-text);
    margin-top: 22px;
}

.signup-row a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
}

.signup-row a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    font-size: 11px;
    color: #b3b8bf;
    margin-top: 32px;
}

/* ---------- Lado imagen ---------- */
.image-side {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #1c4d1f 0%, #0f3320 55%, var(--secondary) 100%);
}

.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    z-index: 0;
}

.image-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 55%);
    z-index: 1;
    pointer-events: none;
}

.image-overlay {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 32px;
    z-index: 2;
    max-width: 320px;
    background: rgba(255, 255, 255, .10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    padding: 20px 22px;
    color: var(--white);
}

.overlay-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.overlay-carousel {
    position: relative;
    min-height: 76px;
    overflow: hidden;
}

.overlay-slide {
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    transition: transform .6s ease;
}

.overlay-slide.active {
    transform: translateX(0);
}

.overlay-slide.exit {
    transform: translateX(-100%);
}

.image-overlay h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.image-overlay p {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .85);
}

/* ---------- Responsive: imagen arriba, formulario abajo ---------- */
@media (max-width: 860px) {
    body {
        padding: 16px;
    }

    .login-container {
        flex-direction: column;
        border-radius: 18px;
    }

    .image-side {
        flex: 0 0 240px;
        width: 100%;
    }

    .form-side {
        flex: 1;
        max-width: none;
        padding: 32px 24px;
    }

    .copyright {
        margin-top: 24px;
    }

    .image-overlay {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        padding: 12px 16px;
    }

    .image-overlay h2 {
        font-size: 16px;
    }

    .image-overlay p {
        display: none;
    }

    .overlay-carousel {
        min-height: 24px;
    }
}

@media (max-width: 400px) {
    .image-side {
        flex-basis: 200px;
    }

    .form-side {
        padding: 28px 20px;
    }

    .overlay-badge {
        font-size: 10px;
        padding: 3px 8px;
        margin-bottom: 8px;
    }
}
