/* Login — split screen (referencia Runflow / Factory Systems) */

:root {
    /* RunflowPro v1 — Press Green reemplaza el teal; Midnight Slate reemplaza el navy genérico */
    --login-teal: #00a650;
    --login-teal-hover: #009045;
    --login-dark: #0f172a;
    --login-input-bg: #f8fafc;
    --login-input-border: #e2e8f0;
    --login-text-muted: #64748b;
    --login-text-dark: #1e293b;
    --login-font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --login-font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.login-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--login-font-body);
    background: #fff;
}

.login-page {
    display: flex;
    min-height: 100vh;
}

/* —— Panel izquierdo —— */
.login-brand {
    flex: 1;
    background: var(--login-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    position: relative;
}

.login-brand-inner {
    max-width: 420px;
    text-align: center;
}

.login-brand-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.login-brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(280px, 100%);
    height: auto;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.login-brand-img {
    display: block;
    max-height: 48px;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-brand-title {
    font-family: var(--login-font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.login-accent {
    color: var(--login-teal);
}

.login-brand-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

.login-brand-footer {
    position: absolute;
    bottom: 2rem;
    left: 2.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.85);
}

/* —— Panel derecho —— */
.login-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    position: relative;
}

.login-form-wrap {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-empresa-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 240px;
    height: 76px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.login-empresa-logo-img {
    display: block;
    max-height: 58px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-form-header,
.login-form {
    width: 100%;
}

.login-form-header {
    margin-bottom: 2rem;
}

.login-form-title {
    font-family: var(--login-font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--login-text-dark);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.login-form-subtitle {
    font-size: 0.95rem;
    color: var(--login-text-muted);
    margin: 0;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.login-field {
    margin-bottom: 1.35rem;
}

.login-field-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.login-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--login-text-dark);
    margin: 0;
}

.login-forgot {
    font-size: 0.78rem;
    color: var(--login-teal);
    text-decoration: none;
    font-weight: 500;
}

.login-forgot:hover {
    color: var(--login-teal-hover);
    text-decoration: underline;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 1rem;
    color: #a0aec0;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.login-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    background: var(--login-input-bg);
    border: 1px solid var(--login-input-border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--login-text-dark);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
    outline: none;
    border-color: var(--login-teal);
    box-shadow: 0 0 0 3px rgba(0, 166, 80, 0.18);
    background: #fff;
}

.login-input-password {
    padding-right: 2.75rem;
}

.login-toggle-pwd {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #a0aec0;
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
}

.login-toggle-pwd:hover {
    color: var(--login-text-dark);
}

.login-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.95rem 1.5rem;
    background: var(--login-teal);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: background 0.15s, transform 0.1s;
}

.login-submit:hover {
    background: var(--login-teal-hover);
}

.login-submit:active {
    transform: scale(0.99);
}

.login-form-footer {
    position: absolute;
    bottom: 1.75rem;
    font-size: 0.75rem;
    color: #b0b8c4;
    text-align: center;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
}

.login-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.login-footer-links a:hover {
    color: var(--login-text-dark);
    text-decoration: underline;
}

.login-legal-notice {
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.45;
}

.login-legal-notice a {
    color: var(--login-teal);
    text-decoration: none;
    font-weight: 500;
}

.login-legal-notice a:hover {
    text-decoration: underline;
}

.login-back-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.login-back-link a {
    color: var(--login-text-dark);
    text-decoration: none;
    font-weight: 500;
}

.login-back-link a:hover {
    color: var(--login-teal);
}

/* —— Responsive —— */
@media (max-width: 900px) {
    .login-page {
        flex-direction: column;
    }

    .login-brand {
        min-height: auto;
        padding: 2.5rem 1.5rem 3rem;
    }

    .login-brand-footer {
        position: static;
        margin-top: 2rem;
        text-align: center;
        width: 100%;
    }

    .login-form-panel {
        padding: 2rem 1.25rem 4rem;
    }

    .login-form-footer {
        position: static;
        margin-top: 2.5rem;
    }
}

@media (max-width: 480px) {
    .login-brand-title {
        font-size: 1.5rem;
    }

    .login-form-title {
        font-size: 1.65rem;
    }
}
