/* ==========================================================================
   1. RESET GENERAL Y CONTENEDOR BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    background-color: #020719; /* Fondo oscuro base para evitar destellos al cargar */
}

body.login-body {
    background-color: #F4F6F9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Prevenir scrollbar horizontal global en la pantalla de login */
body.login-page,
.login-container {
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    background-color: #FFFFFF;
}

/* ==========================================================================
   2. PANEL IZQUIERDO (FORMULARIO Y SELECCIÓN DE PERFIL)
   ========================================================================== */
.login-form-panel {
    background-color: #FFFFFF;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

/* Contenedor Encabezado Izquierdo */
.login-header-wrapper {
    width: 409px;
    max-width: 100%;
    min-height: 142.38px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Logo Marca */
.login-logo {
    width: 125px;
    height: auto;
}

/* Título y Subtítulo */
.login-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 100%;
    color: #111827;
    margin-bottom: 8px;
}

.login-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 22px;
    line-height: 100%;
    color: #6B7280;
    margin: 0;
}

/* Selector de Perfil */
.profile-selector-wrapper {
    width: 405.57px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.profile-selector-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 100%;
    color: #111827;
    margin: 0;
}

/* Tarjeta contenedora del selector */
.profile-toggle-container {
    width: 405.57px;
    max-width: 100%;
    min-height: 80px; /* Cambiado de height: 108px a min-height para flexibilidad */
    height: auto;
    background-color: #E4EBF5;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 8px; /* Reducido ligeramente de 16px para dar más área interna a las pestañas */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
}

/* Opciones de perfil (Pasajero / Taxista) */
.role-option {
    flex: 1; /* Distribución equitativa 50% / 50% */
    min-width: 0; /* Permite que el contenido interno se ajuste sin salirse */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 64px; /* Ajustado de 76px */
    padding: 6px 10px; /* Reducido de 8px 16px */
    border-radius: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    box-sizing: border-box;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option .role-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0; /* Impide que el ícono se aplaste si el texto es largo */
}

/* Tipografía de los botones */
.role-option .role-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px; /* Ajustado de 24px a 16px para encajar 'Taxista / Conductor' en 1 o 2 líneas */
    line-height: 1.2;
    text-align: center;
    white-space: normal; /* Permite salto de línea si el texto "Taxista / Conductor" es muy ajustado */
}

/* Estado Pasajero Activo */
.role-option.passenger-option {
    color: #6B7280;
}

.role-option.passenger-option.active,
.role-option.passenger-option:has(input:checked) {
    background-color: #FFFFFF;
    color: #0043CE;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.role-option.passenger-option .role-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
}

/* Estado Taxista/Conductor Activo */
.role-option.driver-option {
    color: #6B7280;
}

.role-option.driver-option.active,
.role-option.driver-option:has(input:checked) {
    background-color: #FFFFFF;
    color: #F6AD63;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.role-option.driver-option .role-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
    text-align: left;
}

/* Formulario de Credenciales */
.form-credentials-wrapper {
    width: 405.57px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.input-label {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 100%;
    color: #111827;
    margin-bottom: 8px;
    display: block;
}

.custom-input-group {
    position: relative;
    width: 405.57px;
    max-width: 100%;
    height: 48px;
}

.custom-input-group input {
    width: 100%;
    height: 48px;
    background-color: #F6F7FB;
    border: 1px solid #6B7280;
    border-radius: 12px;
    padding: 0 44px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #111827;
    outline: none;
    box-sizing: border-box;
}

.custom-input-group input:focus {
    border-color: #0043CE;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    opacity: 0.7;
}

.btn-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-password img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Botón Submit Dinámico */
.btn-submit-dynamic {
    width: 405.57px;
    max-width: 100%;
    height: 48px;
    border-radius: 12px;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0.02em;
    text-align: center;
    color: #FBFCFF;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.1s ease;
    margin-top: 8px;
}

.btn-submit-dynamic.passenger-theme {
    background-color: #0043CE;
}

.btn-submit-dynamic.driver-theme {
    background-color: #F6AD63;
}

/* Footer de Registro / Información */
.register-footer {
    width: 405.57px;
    max-width: 100%;
    text-align: center;
    margin-top: 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0.02em;
}

.register-text {
    font-weight: 400;
    color: #6B7280;
}

.register-link {
    font-weight: 700;
    color: #0043CE;
    text-decoration: none;
    margin-left: 4px;
}

.register-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   3. PANEL DERECHO INFORMATIVO (DIAGRAMA)
   ========================================================================== */
.login-info-panel {
    background-color: #020719;
    color: #FFFFFF;
    min-height: 100vh;
    padding: 2rem !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.info-content-wrapper {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* Badge Superior */
.badge-modelo-operacion {
    max-width: 100%;
    height: 56px;
    padding: 12px 32px;
    border-radius: 30px;
    background: #233F63;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 26px;
    line-height: 100%;
    color: #FBFCFF;
}

/* Encabezado y Subtítulo Informativo */
.info-text-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.info-text-container h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 110%;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.info-text-container p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 22px;
    line-height: 120%;
    color: #E2E8F0;
    margin: 0;
}

/* Adaptador del SVG Diagrama */
.info-diagram-adapter {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-diagram-adapter img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}