/* Estilos para Login y Registro - ExpertosCerca */

/* Reset y base */
* {
    box-sizing: border-box;
}

/* Contenedor principal */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* PANTALLA 1: Inicial con tarjetas Cliente/Profesional HORIZONTALES */
.initial-screen {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.4s ease-out;
}

.main-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.main-subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1rem;
    margin-top: 0;
}

/* Selección de tipo de usuario - LAYOUT HORIZONTAL */
.user-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.user-type-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.user-type-card:hover {
    border-color: #007cba;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
}

.user-type-card:active {
    transform: translateY(-2px);
}

.user-type-icon {
    margin-bottom: 0.75rem;
    color: #6b7280;
    transition: color 0.3s ease;
}

.user-type-card:hover .user-type-icon {
    color: #007cba;
}

.user-type-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.user-type-description {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.user-type-features {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.feature {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 500;
}

/* PANTALLA 2: Elección Login/Registro - CORREGIDO PARA HTML REAL */
.choice-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: slideIn 0.3s ease-out;
    padding: 2rem;
}

.choice-header {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 400px;
    width: 100%;
}

.choice-header .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.choice-header .section-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 300px;
    margin-bottom: 2rem;
}

.choice-buttons .auth-btn-primary,
.choice-buttons .auth-btn-secondary {
    background: #007cba;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: block;
}

.choice-buttons .auth-btn-secondary {
    background: #6b7280;
}

.choice-buttons .auth-btn-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.choice-buttons .auth-btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.auth-footer {
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.auth-footer .back-btn {
    background: none;
    border: none;
    color: #007cba;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    width: 100%;
    text-align: center;
}

.auth-footer .back-btn:hover {
    color: #005a87;
    text-decoration: underline;
}

/* PANTALLA 3: Formularios - FORZADO CON !important */
.auth-section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 2rem 1rem !important;
    overflow-y: auto !important;
    z-index: 200 !important;
    animation: slideIn 0.3s ease-out !important;
}

/* Progress bar ARRIBA FORZADO */
.progress-header {
    background: #f8fafc !important;
    padding: 1.25rem 1.5rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    max-width: 420px !important;
    width: 100% !important;
    order: 1 !important;
}

.register-section .progress-header {
    max-width: 600px !important;
}

.progress-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 0.875rem !important;
    text-align: center !important;
}

.progress-text {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    order: 1 !important;
}

.progress-info .back-btn {
    background: none !important;
    border: none !important;
    color: #007cba !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0 !important;
    transition: color 0.2s ease !important;
    order: 2 !important;
}

.progress-info .back-btn:hover {
    color: #005a87 !important;
    text-decoration: underline !important;
}

.progress-bar-container {
    width: 100% !important;
    height: 3px !important;
    background: #e2e8f0 !important;
    border-radius: 2px !important;
    overflow: hidden !important;
}

.progress-bar {
    height: 100% !important;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%) !important;
    width: 25% !important;
    transition: width 0.3s ease !important;
    border-radius: 2px !important;
}

/* Formulario DEBAJO FORZADO */
.auth-form {
    background: white !important;
    border-radius: 0 0 16px 16px !important;
    padding: 0 1.5rem 1.5rem 1.5rem !important;
    max-width: 420px !important;
    width: 100% !important;
    order: 2 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.register-section .auth-form {
    max-width: 600px !important;
}

.auth-header {
    background: white !important;
    padding: 1.5rem 1.5rem 1rem 1.5rem !important;
    margin: 0 !important;
    text-align: center !important;
    max-width: 420px !important;
    width: 100% !important;
    order: 2 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px 16px 0 0 !important;
}

.register-section .auth-header {
    max-width: 600px !important;
}

.section-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

.section-subtitle {
    color: #64748b !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
}

.form-group {
    margin-bottom: 1rem !important;
}

.form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.875rem !important;
}

.form-group.full-width {
    grid-column: 1 / -1 !important;
}

.form-label {
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 0.4rem !important;
}

.form-input,
.form-select,
.form-textarea {
    width: 100% !important;
    padding: 0.6rem 0.875rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    background-color: white !important;
    color: #374151 !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1) !important;
    transform: translateY(-1px) !important;
}

.form-textarea {
    resize: vertical !important;
    min-height: 70px !important;
}

.form-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
}

.form-help {
    font-size: 0.7rem !important;
    color: #6b7280 !important;
    margin-top: 0.4rem !important;
    display: block !important;
}

.checkbox-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

.form-checkbox {
    margin-right: 0.4rem !important;
    width: 14px !important;
    height: 14px !important;
    accent-color: #007cba !important;
}

.checkbox-text {
    font-size: 0.8rem !important;
    color: #64748b !important;
}

.action-selection {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.875rem !important;
    margin: 1rem 0 !important;
}

.action-card {
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 1.25rem 0.875rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    position: relative !important;
}

.action-card:hover {
    border-color: #007cba !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15) !important;
}

.action-card.selected {
    border-color: #007cba !important;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2) !important;
}

.step-content {
    margin-bottom: 1.25rem !important;
}

.step-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 0.875rem !important;
    margin-top: 20px !important;
}

.step-description {
    color: #64748b !important;
    margin-bottom: 1rem !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
}

.auth-btn-primary,
.auth-btn-secondary {
    background: #007cba !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
}

.auth-btn-secondary {
    background: #6b7280 !important;
}

.full-width {
    width: 100% !important;
}

.form-navigation {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 1.25rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #e5e7eb !important;
    gap: 0.875rem !important;
    flex-wrap: wrap !important;
}

.nav-btn {
    padding: 0.625rem 1rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    flex-shrink: 0 !important;
}

.nav-btn-primary {
    background: #007cba !important;
    color: white !important;
}

.nav-btn-secondary {
    background: white !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
}

.nav-btn-outline {
    background: white !important;
    color: #f59e0b !important;
    border: 1px solid #f59e0b !important;
}

.forgot-password,
.link {
    color: #007cba !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.auth-footer {
    background: white !important;
    padding: 1rem !important;
    text-align: center !important;
    max-width: 420px !important;
    width: 100% !important;
    order: 3 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 0 16px 16px !important;
}

.register-section .auth-footer {
    max-width: 600px !important;
}

.auth-footer .back-btn {
    background: none !important;
    border: none !important;
    color: #007cba !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
    padding: 0.5rem !important;
    transition: color 0.2s ease !important;
}

.info-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.terms-group {
    margin-bottom: 1rem !important;
}

.messages {
    padding: 0.75rem !important;
    border-radius: 6px !important;
    margin-bottom: 0.875rem !important;
    font-size: 0.8rem !important;
}

.messages.success {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

.messages.error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
}

.summary-content {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
}

.hidden {
    display: none !important;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive CORREGIDO - Una columna en móvil */
@media (max-width: 768px) {
    .auth-container {
        padding: 0.5rem !important;
    }
    
    .choice-content {
        width: 95% !important;
        padding: 2.5rem 1.5rem !important;
        max-width: 350px !important;
    }
    
    .progress-header {
        padding: 1rem 1.25rem !important;
        max-width: 95% !important;
    }
    
    .auth-header {
        padding: 1.25rem 1.25rem 0.75rem 1.25rem !important;
        max-width: 95% !important;
    }
    
    .auth-form {
        padding: 0 1.25rem 1.25rem 1.25rem !important;
        max-width: 95% !important;
    }
    
    .auth-footer {
        padding: 1rem !important;
        max-width: 95% !important;
    }
    
    .register-section .progress-header,
    .register-section .auth-header,
    .register-section .auth-form,
    .register-section .auth-footer {
        max-width: 95% !important;
    }
    
    .initial-screen {
        padding: 2.5rem 1.5rem !important;
        max-width: 450px !important;
    }
    
    /* FORZAR UNA SOLA COLUMNA */
    .form-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        grid-template-columns: none !important;
    }
    
    .form-group {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .form-group.full-width {
        width: 100% !important;
    }
    
    .user-type-selection,
    .action-selection {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .form-navigation {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .nav-btn,
    .choice-btn {
        width: 100% !important;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .main-title,
    .section-title,
    .choice-title {
        font-size: 1.5rem !important;
    }
    
    .step-title {
        font-size: 1.25rem !important;
    }
    
    .user-type-card,
    .action-card {
        padding: 1.25rem 0.875rem !important;
    }
    
    .user-type-title,
    .action-title {
        font-size: 1rem !important;
    }
    
    .user-type-description,
    .action-description {
        font-size: 0.75rem !important;
    }
    
    .choice-content {
        width: 98% !important;
        padding: 2rem 1.25rem !important;
        max-width: 320px !important;
    }
    
    .progress-header {
        padding: 1rem 1rem !important;
        max-width: 98% !important;
    }
    
    .auth-header {
        padding: 1rem 1rem 0.5rem 1rem !important;
        max-width: 98% !important;
    }
    
    .auth-form {
        padding: 0 1rem 1rem 1rem !important;
        max-width: 98% !important;
    }
    
    .auth-footer {
        padding: 0.75rem !important;
        max-width: 98% !important;
    }
    
    .register-section .progress-header,
    .register-section .auth-header,
    .register-section .auth-form,
    .register-section .auth-footer {
        max-width: 98% !important;
    }
    
    /* CAMPOS MÁS GRANDES EN MÓVIL */
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.875rem 1rem !important;
        font-size: 1.1rem !important;
    }
    
    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
}