/* ================================================================
   login.css — Rediseño split layout (hero + formulario)
   ================================================================ */

body {
    background: #F3F4F6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* ── Layout split ─────────────────────────────────────────────── */
.login-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Panel izquierdo — hero ───────────────────────────────────── */
.login-hero {
    display: flex;
    align-items: center;
    padding: 3rem 4rem;
    background-color: #F8FAFC;
    background-image: radial-gradient(circle, rgba(15,23,42,.08) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-content { max-width: 420px; }

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 3rem;
}


.logo-img {
    width: 42px; height: 42px;
    border-radius: 8px;
    flex-shrink: 0;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.hero-headline h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-headline p {
    font-size: 1rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    margin-top: 0;
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-features li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    width: 36px; height: 36px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366F1;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.hero-features strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.hero-features span {
    font-size: 0.8rem;
    color: #6B7280;
}

.hero-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.hero-badge > i {
    font-size: 1.1rem;
    color: #6366F1;
    margin-top: 2px;
    flex-shrink: 0;
}

.hero-badge strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
}

.hero-badge span {
    font-size: 0.8rem;
    color: #6B7280;
}

.hero-trust {
    margin-top: 2rem;
    padding: 1.25rem;
    background: rgba(255,255,255,.8);
    border: 1px solid #E5E7EB;
    border-radius: 14px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.trust-item + .trust-item {
    margin-top: .85rem;
}

.trust-item i {
    color: #6366F1;
    font-size: 1rem;
}

.trust-item span {
    font-size: .85rem;
    color: #374151;
}

/* ── Panel derecho — formulario ───────────────────────────────── */
.login-form-panel {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.form-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.form-subtitle {
    text-align: center;
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.form-sep {
    border-color: #E5E7EB;
    margin-bottom: 1.75rem;
}

/* ── Labels ───────────────────────────────────────────────────── */
.lbl {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

/* ── Inputs ───────────────────────────────────────────────────── */
.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 0.875rem;
    color: #9CA3AF;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.field-caret {
    position: absolute;
    right: 0.875rem;
    color: #9CA3AF;
    font-size: 0.8rem;
    pointer-events: none;
}

.field-input {
    width: 100%;
    padding: 0.7rem 0.875rem 0.7rem 2.5rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.field-input::placeholder { color: #D1D5DB; }

.field-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.field-select .field-input { padding-right: 2.5rem; }

.btn-eye {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1;
}

.btn-eye:hover { color: #6B7280; }

/* ── Company preview card ─────────────────────────────────────── */
.company-card {
    display: none;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    margin-top: 0.5rem;
    background: #F9FAFB;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
}

.company-card.visible { display: flex; }

.company-avatar {
    width: 40px; height: 40px;
    background: #1E3A5F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.company-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: #111827;
}

.company-nit {
    font-size: 0.775rem;
    color: #6B7280;
    margin-top: 0.1rem;
}

.company-status {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    min-height: 1.2rem;
}

.company-status.found   { color: #16a34a; }
.company-status.error   { color: #dc2626; }
.company-status.loading { color: #6b7280; }

/* ── Remember / Forgot row ────────────────────────────────────── */
.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: #6366F1;
    cursor: pointer;
    flex-shrink: 0;
}

.forgot-link {
    font-size: 0.875rem;
    color: #6366F1;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover { text-decoration: underline; }

/* ── Botón principal ──────────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 0.8rem;
    background: #111827;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.15s;
    font-family: inherit;
}

.btn-login:hover   { background: #1F2937; }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── SSO divider ──────────────────────────────────────────────── */
.sso-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.sso-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: #E5E7EB;
}

.sso-divider span {
    position: relative;
    background: #fff;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    color: #9CA3AF;
}

/* ── Botón Microsoft ──────────────────────────────────────────── */
.btn-microsoft {
    width: 100%;
    padding: 0.75rem;
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.btn-microsoft:hover:not(:disabled) { background: #F9FAFB; border-color: #D1D5DB; }
.btn-microsoft:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Footer ───────────────────────────────────────────────────── */
.form-footer {
    text-align: center;
    font-size: 0.78rem;
    color: #9CA3AF;
    margin-top: 1.5rem;
    margin-bottom: 0;
}
.form-footer a {
    color: #6B7280;
    text-decoration: none;
}

.form-footer a:hover {
    color: #111827;
}

.footer-link {
    color: #6B7280;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all .15s ease;
}

.footer-link:hover {
    color: #111827;
    border-bottom-color: #D1D5DB;
}

/* ── Panel forgot-password ────────────────────────────────────── */
.forgot-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: #6366F1;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.25rem;
    font-family: inherit;
}

.forgot-back:hover { text-decoration: underline; }

.forgot-desc {
    font-size: 0.875rem;
    color: #6B7280;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

/* ── Autocomplete de empresa ──────────────────────────────────── */
#companyWrap { position: relative; }

.suggestions-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    list-style: none;
    padding: 0.35rem 0;
    margin: 0;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
}

.suggestions-list.open { display: block; }

.suggestions-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.875rem;
    font-size: 0.875rem;
    color: #111827;
    cursor: pointer;
    transition: background 0.1s;
}

.suggestions-list li:hover,
.suggestions-list li.active {
    background: #F5F3FF;
    color: #4F46E5;
}

.suggestions-list li .sug-icon {
    color: #9CA3AF;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.suggestions-list li:hover .sug-icon,
.suggestions-list li.active .sug-icon { color: #6366F1; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .login-page { grid-template-columns: 1fr; }
    .login-hero  { display: none; }
    .login-form-panel { padding: 2rem 1.25rem; }
}
