/* ==========================================================================
   DENTREX - Activación de clínica (login_tenant.html)
   Layout de dos columnas idéntico a pventa (ventapos).
   ========================================================================== */

:root {
    --brand-blue: #0076DB;
    --brand-blue-dark: #0060B3;
    --text-dark: #1a202c;
    --text-muted: #64748b;
    --border-color: #cbd5e0;
    --error-red: #dc2626;
    --error-bg: #fee2e2;
    --success-green: #16a34a;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
    background: #f0f6fa;
}

/* ---- Layout de dos columnas ---- */
.login-split-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.login-left-col {
    flex: 0 0 50%;
    width: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    z-index: 10;
    border-radius: 0 30px 30px 0;
    overflow-y: auto;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.login-logo {
    height: 84px;
    width: auto;
    object-fit: contain;
}

.login-company-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.login-subtitle {
    display: block;
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ---- Pasos (active-view / hidden-view mantienen la lógica de activation.js) ---- */
.active-view {
    display: block;
}

.hidden-view {
    display: none;
}

@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.view,
.active-view {
    animation: viewFadeIn 0.25s ease;
}

/* ---- Badge de paso ---- */
.login-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 118, 219, 0.12);
    border: 1px solid rgba(0, 118, 219, 0.3);
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.login-step-badge i {
    color: var(--brand-blue);
}

.login-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.login-step-header .login-step-badge {
    margin-bottom: 0;
    flex: 1;
}

.btn-back {
    background: #e2e8f0;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #cbd5e0;
}

/* ---- Grupos de formulario / inputs con icono ---- */
.login-form-group {
    position: relative;
    margin-bottom: 16px;
    width: 100%;
    text-align: left;
}

.login-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 5px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: #718096;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.login-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.login-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 118, 219, 0.12);
    outline: none;
}

.login-input.input-invalid {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.helper-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ---- Licencia (9 dígitos) ---- */
.license-label {
    display: block;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.license-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.code-box {
    width: 34px !important;
    height: 46px;
    padding: 0 !important;
    text-align: center;
    font-size: 20px !important;
    font-weight: 700;
    border: 2px solid #cbd5e1 !important;
    border-radius: 7px !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05) inset;
    background: #ffffff;
    color: var(--text-dark);
}

.code-box:focus {
    border-color: var(--brand-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 118, 219, 0.16) !important;
}

.code-separator {
    color: var(--text-muted);
    font-weight: 700;
    margin: 0 2px;
}

/* ---- Subdominio con sufijo .dentrex.cl ---- */
.domain-suffix-wrap {
    align-items: center;
}

.domain-suffix-wrap .login-input {
    padding-right: 92px;
}

.domain-suffix {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ---- Botón mostrar/ocultar contraseña ---- */
.btn-toggle-pw {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-toggle-pw i {
    position: static;
    color: inherit;
}

/* ---- Botón principal ---- */
.btn-login-submit {
    width: 100%;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-login-submit:hover {
    background: var(--brand-blue-dark);
}

.btn-login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ---- Mensaje de error / éxito ---- */
.error-msg {
    background: var(--error-bg);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.84rem;
    color: var(--error-red);
    text-align: left;
    line-height: 1.4;
}

/* ---- Footer / contacto ---- */
.login-footer-links {
    margin-top: 28px;
    font-size: 0.9rem;
    color: #4a5568;
}

.contact-card {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
}

.login-version {
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* ---- Columna derecha: carrusel promocional ---- */
.login-right-col {
    flex: 0 0 50%;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    background: #e7eff3;
    overflow: hidden;
}

.login-promo-slide {
    display: none;
    width: 100%;
    animation: loginPromoFade 0.4s ease;
}

.login-promo-slide.active {
    display: block;
}

@keyframes loginPromoFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.promo-content {
    max-width: 600px;
    text-align: center;
}

.promo-content h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.3;
}

.promo-image-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.promo-mockup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.promo-mockup-body {
    padding: 20px;
    text-align: center;
}

.promo-mockup-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px;
}

.promo-mockup-body p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.promo-icon {
    width: 64px;
    height: 64px;
    color: var(--brand-blue);
    margin-bottom: 20px;
}

.btn-promo-cta {
    background: var(--brand-blue) !important;
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 118, 219, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-promo-cta:hover {
    background: var(--brand-blue-dark) !important;
}

.login-promo-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.login-promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.login-promo-dot.active {
    background: var(--brand-blue);
    transform: scale(1.2);
}

.login-software-info {
    position: absolute;
    bottom: 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    width: 100%;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .login-split-layout {
        flex-direction: column;
    }
    .login-left-col {
        flex: none;
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }
    .login-right-col {
        display: none;
    }
}

@media (max-width: 480px) {
    .license-code-container {
        gap: 4px;
    }
    .code-box {
        width: 28px !important;
        height: 40px;
    }
}
