/* --- Prevención de scroll horizontal global --- */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

.container-fluid,
.row,
[class*="col-"] {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* --- Ajuste de placeholders e inputs para evitar desbordes --- */
input.form-control, select.form-select, textarea.form-control {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

input.form-control::placeholder, textarea.form-control::placeholder {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}
/* app/static/css/styles.css */

/* --- Variables CSS --- */
/* NOTA: Estas variables ahora heredan de tema-variables.css para soporte de temas */
:root {
    /* Colores principales - Heredan del tema activo */
    --primary: var(--tema-primario, #1e90ff);
    --secondary: var(--tema-secundario, #4169e1);
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: var(--tema-texto-primario, #2c3e50);
    --success: var(--tema-exito, #2ecc71);
    --warning: var(--tema-advertencia, #f39c12);
    --danger: var(--tema-peligro, #e74c3c);
    --gray: #95a5a6;
    --light-gray: var(--tema-fondo-cuerpo, #f8f9fa);

    /* Variables para medios */
    --media-border-radius: var(--tema-borde-radio-mediano, 12px);
    --media-shadow: var(--tema-sombra-tarjeta, 0 4px 20px rgba(0,0,0,0.05));
    --media-transition: var(--tema-transicion-suave, all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1));
    --media-preview-height: 200px;

    /* Gradientes - Heredan del tema activo */
    --primary-gradient: var(--tema-gradiente-primario, linear-gradient(135deg, #1e90ff 0%, #4169e1 100%));
    --text-gradient: linear-gradient(135deg, #ffffff 0%, #bdc3c7 100%);

    /* Sombras de texto y colores de texto específicos */
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --primary-text: var(--tema-texto-primario, #2c3e50);
    --secondary-text: var(--tema-texto-secundario, #6c757d);
}

/* --- Reseteo Básico --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Estilos Globales --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-text);
    background-color: var(--light-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Main content area - crece para empujar footer abajo */
main, .main-flex-container {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* --- Navbar --- */
.navbar {
    padding: 0.8rem 1rem;
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    color: white !important;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    color: white !important;
}

.nav-link i {
    margin-right: 0.5rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 0.2rem 0;
    display: flex;
    align-items: center;
}

.dropdown-item i {
    margin-right: 0.5rem;
}

/* --- Alertas --- */
.alert {
    border-radius: 8px;
    border: none;
    padding: 0.8rem 1.25rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.alert-dismissible .btn-close {
    padding: 0.8rem 1.25rem;
}

/* --- Botones --- */
.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-sm i {
    margin-right: 0.3rem;
}

.btn-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
}

.btn-lg i {
    margin-right: 0.7rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
}

.btn-primary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white !important;
    border-color: var(--primary);
}

.rounded-pill {
    border-radius: 50px !important;
}

/* --- Formularios --- */
.form-control,
.form-select {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    font-size: 1rem;
    background-color: #fff;
    color: #333;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    background-color: #fff;
    color: #333;
}

/* --- ETIQUETAS CON FONDO GRADIENTE --- */
.label-gradient-bg {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: white !important;
    font-weight: 700;
    background: var(--primary-gradient);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.label-gradient-bg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Tarjetas --- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #fff;
    padding: 1.875rem 1.5rem; /* Cambiado de 1.25rem a 1.875rem (30px) */
    background: var(--primary-gradient); 
    color: white;
}

.card-body {
    padding: 1.5rem;
}

/* --- Tarjetas de Autenticación (Auth) --- */
.auth-card {
    transition: all 0.3s ease;
    border-radius: 15px !important;
    border: none;
    height: 100%;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* --- Sección de Bienvenida --- */
.welcome-section {
    padding: 6rem 0;
}

.display-3 {
    font-size: 3rem;
}

/* --- Pie de Página --- */
footer {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0;
}

/* --- Utilidades --- */
.rounded-lg {
    border-radius: 12px;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.shadow {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* --- Texto con Gradiente --- */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.gradient-text {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: var(--text-shadow);
    font-weight: 600;
}

.gradient-text-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: var(--text-shadow);
    font-weight: 600;
}

/* Efectos hover para texto con gradiente */
.gradient-text:hover {
    background: linear-gradient(135deg, #ffffff 0%, #ecf0f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.gradient-text-primary:hover {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Marco para texto con gradiente */
.text-frame {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* --- Secciones de Formulario --- */
.section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.icon-title {
    margin-right: 10px;
    font-size: 1.1em;
}

.form-section {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* --- MEDIA UPLOAD SECTION - GLOBAL STYLES (Contenedores y Previsualizaciones) --- */
.media-upload-area {
    background: var(--light);
    border-radius: var(--media-border-radius);
    padding: 1.5rem;
    box-shadow: var(--media-shadow);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Contenedor de la imagen principal grande */
.main-media-display {
    position: relative;
    border-radius: var(--media-border-radius);
    overflow: hidden;
    height: var(--media-preview-height); /* Altura fija para la vista principal */
    background-color: #e9ecef; /* Fondo gris mientras no hay imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1.5rem;
    box-shadow: var(--media-shadow);
    text-align: center; /* Centra el texto si no hay imagen */
}

.main-media-display img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre todo el espacio manteniendo el aspecto */
    display: none; /* Oculto por defecto, se muestra con JS cuando hay src */
}

.main-media-display.has-image img {
    display: block;
}

.main-media-display.has-image .main-media-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.main-media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    transition: background 0.3s ease;
}

.main-media-badge {
    background: var(--primary-gradient);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-media-filename-display {
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Contenedor del input de archivo y la lista de miniaturas */
.file-input-and-thumbnails-wrapper {
    background-color: white;
    border-radius: var(--media-border-radius);
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.upload-label {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--secondary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.upload-label:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.upload-label i {
    margin-right: 0.5rem;
}

/* Ocultar el input de archivo nativo, pero mantenerlo funcional */
#media_files {
    display: none; /* Oculta el input nativo */
}

/* Contenedor desplazable de miniaturas */
.thumbnail-scroll-container {
    overflow-x: auto; /* Permite el desplazamiento horizontal */
    white-space: nowrap; /* Evita que los elementos se envuelvan */
    padding-bottom: 10px; /* Espacio para la barra de desplazamiento */
    margin-top: 1rem;
}

/* Estilo de la lista de miniaturas */
.thumbnail-list {
    display: inline-flex; /* Para que los elementos estén en línea y se desplacen */
    gap: 10px; /* Espacio entre miniaturas */
    padding: 5px 0;
}

/* Estilo de cada miniatura */
.media-thumbnail {
    position: relative;
    width: 100px; /* Ancho fijo para las miniaturas */
    height: 100px; /* Alto fijo para las miniaturas */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent; /* Borde para indicar selección */
    flex-shrink: 0; /* Evita que las miniaturas se encojan */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
}

.media-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

.media-thumbnail.selected {
    border-color: var(--secondary); /* Borde azul para la miniatura seleccionada */
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3); /* Resplandor usando valores directos de var(--secondary) */
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos para iconos dentro de miniaturas (video, pdf, archivo) */
.media-thumbnail-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f0f2f5;
    color: var(--gray);
    font-size: 2rem;
}

.media-thumbnail-icon i {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.file-type-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.remove-media-btn, .set-main-btn {
    position: absolute;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 2; /* Por encima de la imagen */
}

.remove-media-btn {
    top: 5px;
    right: 5px;
}

.set-main-btn {
    bottom: 5px;
    left: 5px;
    background: rgba(44, 62, 80, 0.7); /* Color primario para "set as main" */
}

.remove-media-btn:hover { background: var(--danger); }
.set-main-btn:hover { background: var(--success); }

.main-media-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(var(--success-rgb), 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 3;
}

/* Estilos para el placeholder de la imagen principal */
.main-media-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--gray);
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
    /* Oculto por defecto, se muestra si no hay imagen real */
    display: flex; /* Cambiado a flex para que se muestre por defecto */
}

.main-media-placeholder-content i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Reglas para mostrar/ocultar imagen vs. placeholder */
.main-media-display.has-image img {
    display: block; /* Muestra la imagen cuando tiene la clase has-image */
}
.main-media-display.has-image .main-media-placeholder-content {
    display: none; /* Oculta el placeholder cuando hay una imagen real */
}


/* Si no hay imagen (no tiene la clase has-image), la imagen img está oculta por defecto,
   y el placeholder se muestra por defecto (ver .main-media-placeholder-content). */
/* Si la imagen tiene src="#" pero tiene has-image (ej. para PDFs),
   queremos que la imagen img esté oculta y el placeholder se vea. */
.main-media-display.has-image img[src="#"] {
    display: none; /* Oculta la imagen si el src es #, incluso si tiene has-image */
}
.main-media-display.has-image img[src="#"] + .main-media-placeholder-content {
    display: flex; /* Muestra el placeholder si el src de la imagen es # */
}




/* --- Ajustes Responsivos --- */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    .welcome-section {
        padding: 3rem 0;
    }
    .display-4 {
        font-size: 2.5rem; 
    }
    .main-media-display {
        height: 300px; /* Ajusta altura en móviles proporcionalmente */
    }
    .media-upload-area {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .auth-body {
        padding: 1.5rem;
    }
    
    .auth-header {
        padding: 1.2rem;
    }
    .media-upload-area {
        padding: 0.75rem;
    }
    .main-media-display {
        height: 250px; /* Ajusta altura en móviles pequeños */
    }
}

/* styles.css */

/* --- Estilos para el Cargador de Archivos Avanzado --- */

#drag-drop-area {
    border-style: dashed !important;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

#drag-drop-area.bg-primary-subtle {
    border-color: var(--bs-primary) !important;
    border-style: solid !important;
}

.media-card .card {
    position: relative;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.media-card .cancel-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    line-height: 1;
    padding: 0;
    font-size: 14px;
}

.media-card .status-text {
    font-size: 0.8rem;
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}

.media-card.fade-out {
    animation: fadeOut 0.5s forwards;
}


/* --- Estilos para la Galería Swiper --- */

.main-swiper {
    width: 100%;
    height: 200px; /* Altura ajustada */
    background: #eee;
    border-radius: 8px;
}

.thumbnail-swiper {
    height: 80px;
    box-sizing: border-box;
    padding: 10px 0;
}

.thumbnail-swiper .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
}

.thumbnail-swiper .swiper-slide {
    width: 80px !important;
    min-width: 80px;
    height: 80px !important;
    flex-shrink: 0;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.thumbnail-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid var(--bs-primary);
    border-radius: 4px;
}

.swiper-slide img, .swiper-slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- ESTILOS PARA PÁGINAS DE AUTENTICACIÓN (LOGIN/REGISTER) --- */

.auth-section {
    background: linear-gradient(to bottom, rgba(173, 216, 230, 0.7), rgba(255, 255, 255, 0.7)), /* Azul Celeste Degradado a Blanco */
                url("../images/auth-bg.jpg"); /* Asegúrate que la ruta a tu imagen sea correcta */
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.auth-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    transition: transform 0.3s;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 1.8rem;
    text-align: center;
}

.auth-header h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-body {
    padding: 2.5rem;
}

.auth-card .form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.auth-card .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.auth-card .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.auth-card .form-control.with-icon {
    border-left: none;
}

.btn-auth {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #6c757d;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider::before {
    margin-right: 1rem;
}

.divider::after {
    margin-left: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.social-btn i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.google-btn {
    background: #fff;
    color: #757575;
    border: 1px solid #e0e0e0;
}

.google-btn:hover {
    background: #f8f9fa;
}

.facebook-btn {
    background: #3b5998;
    color: white;
}

.facebook-btn:hover {
    background: #344e86;
    color: white;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
}

.auth-footer a {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* --- Estilos específicos para Register --- */
.password-strength {
    height: 4px;
    background: #e9ecef;
    margin-top: 8px;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.strength-weak { background-color: #e74c3c; }
.strength-medium { background-color: #f39c12; }
.strength-strong { background-color: #2ecc71; }

.password-requirements {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
}

.requirement i {
    margin-right: 0.5rem;
    font-size: 0.7rem;
    transition: color 0.3s;
}

.requirement.valid { color: #2ecc71; }
.requirement.invalid { color: #6c757d; } /* Color gris para inválido en lugar de rojo */

.terms-check {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}


/* --- Media Queries para Responsive --- */
@media (max-width: 576px) {
    .auth-body {
        padding: 1.5rem;
    }
    
    .auth-header {
        padding: 1.2rem;
    }
}

/* ================================================= */
/* === ESTILOS PARA LAYOUT DE FORMULARIO CON SCROLL (ÚNICO Y CORRECTO) === */
/* ================================================= */

/* Esta clase contenedora se usará en las plantillas de formulario 
  para asegurar que estos estilos solo se apliquen allí.
*/
.form-page-layout {
    display: flex;
    flex-direction: column;
    /* Ocupa toda la altura disponible menos la altura de la cabecera/pie de página.
       Ajusta '180px' si es necesario para tu diseño. */
    height: calc(100vh - 180px);
}

.form-page-layout .page-title {
    flex-shrink: 0; /* Evita que el título se encoja */
    padding-bottom: 1rem;
}

.form-page-layout .form-scroll-container {
    flex-grow: 1;
    display: flex;
    min-height: 0; /* Clave para que el scroll interno funcione */
}

.form-page-layout .form-column,
.form-page-layout .preview-column {
    overflow-y: auto; /* El scroll vertical individual */
    height: 100%;
    padding: 1rem;
}

/* Estilos opcionales para la barra de scroll */
.form-page-layout .form-column::-webkit-scrollbar,
.form-page-layout .preview-column::-webkit-scrollbar {
  width: 8px;
}
.form-page-layout .form-column::-webkit-scrollbar-track,
.form-page-layout .preview-column::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.form-page-layout .form-column::-webkit-scrollbar-thumb,
.form-page-layout .preview-column::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.form-page-layout .form-column::-webkit-scrollbar-thumb:hover,
.form-page-layout .preview-column::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* --- ESTILOS PARA EL BOTÓN DE EDITAR EN LA GALERÍA --- */

.main-swiper .swiper-slide {
    position: relative; /* Necesario para posicionar el botón dentro */
}

.edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10; /* Asegura que esté sobre la imagen */
    opacity: 0.7;
    transition: opacity 0.3s;
    border-radius: 50%; /* Lo hace redondo */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-swiper .swiper-slide:hover .edit-btn {
    opacity: 1; /* El botón se hace visible al pasar el mouse sobre la imagen */
}

/* ================================================= */
/* === ESTILOS PARA VISTA DE PROPIEDAD ESTILO TARJETA === */
/* ================================================= */

.property-preview-card {
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.property-image-container-large {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.property-image-large {
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 12px 12px 0 0 !important;
    position: relative !important;
}

.property-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.property-status-badge .badge {
    background: linear-gradient(135deg, var(--premium-primary), var(--premium-secondary));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
}

.property-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

.property-body {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.property-title {
    color: var(--premium-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.property-location {
    margin-bottom: 0;
}

.property-location i {
    color: var(--premium-primary);
    font-size: 0.8rem;
}

.property-location span {
    font-size: 0.8rem;
}

.property-description {
    margin-bottom: 0;
}

.property-description p {
    line-height: 1.3;
    margin-bottom: 0;
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Fallback para navegadores que no soportan line-clamp */
    max-height: calc(1.3em * 2); /* line-height * número de líneas */
}

.property-specs {
    margin-bottom: 0;
}

.spec-item {
    display: flex;
    align-items: center;
    padding: 0.25rem;
    background: rgba(30, 144, 255, 0.05);
    border-radius: 6px;
    border-left: 2px solid var(--premium-primary);
}

.spec-item i {
    margin-right: 0.3rem;
    width: 12px;
    text-align: center;
    font-size: 0.7rem;
}

.spec-item small {
    font-weight: 500;
    color: #444;
    font-size: 0.7rem;
}

.property-price {
    margin-bottom: 0;
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.1), rgba(65, 105, 225, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(30, 144, 255, 0.2);
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.currency-symbol {
    font-size: 0.9rem;
    color: var(--premium-primary);
    font-weight: 600;
}

.price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--premium-primary);
    line-height: 1;
}

.currency-code {
    font-size: 0.7rem;
    color: var(--premium-secondary);
    font-weight: 500;
}

.price-consult {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--premium-primary);
    font-weight: 600;
}

.property-contact {
    margin-bottom: 0;
}

.contact-header h5 {
    color: var(--premium-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-spec-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(30, 144, 255, 0.05);
    border-radius: 6px;
    border-left: 2px solid var(--premium-primary);
}

.contact-spec-item i {
    color: var(--premium-primary);
    margin-top: 0.1rem;
    width: 12px;
    text-align: center;
    font-size: 0.7rem;
}

.contact-label {
    display: block;
    font-weight: 600;
    color: #666;
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
}

.contact-value {
    font-size: 0.8rem;
    color: #333;
}

.contact-link {
    color: var(--premium-primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.property-gallery {
    margin-bottom: 0;
}

.gallery-header h5 {
    color: var(--premium-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.gallery-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 1;
    background: #f8f9fa;
}

.gallery-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.gallery-thumb:hover .gallery-thumb-image {
    transform: scale(1.05);
}

.property-actions {
    margin-top: 0;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .property-preview-card {
        height: 350px;
    }
    
    .property-image-container-large {
        height: 140px;
    }
    
    .property-body {
        padding: 0.75rem;
        gap: 0.4rem;
    }
    
    .property-title {
        font-size: 1rem;
    }
    
    .price-amount {
        font-size: 1.1rem;
    }
    
    .currency-symbol {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .property-preview-card {
        height: 320px;
    }
    
    .property-image-container-large {
        height: 120px;
    }
    
    .property-body {
        padding: 0.5rem;
        gap: 0.3rem;
    }
    
    .spec-item {
        margin-bottom: 0.25rem;
        padding: 0.2rem;
    }
    
    .gallery-thumb {
        margin-bottom: 0.25rem;
    }
    
    .property-title {
        font-size: 0.9rem;
    }
    
    .price-amount {
        font-size: 1rem;
    }
}

/* Scrollbar azul para toda la web */
body, .form-scroll-container, .form-column, .preview-column, .form-content, .preview-content {
    scrollbar-width: thin;
    scrollbar-color: #1e90ff #e3f0ff;
}
body::-webkit-scrollbar,
.form-scroll-container::-webkit-scrollbar,
.form-column::-webkit-scrollbar,
.preview-column::-webkit-scrollbar,
.form-content::-webkit-scrollbar,
.preview-content::-webkit-scrollbar {
    width: 8px;
    background: #e3f0ff;
}
body::-webkit-scrollbar-thumb,
.form-scroll-container::-webkit-scrollbar-thumb,
.form-column::-webkit-scrollbar-thumb,
.preview-column::-webkit-scrollbar-thumb,
.form-content::-webkit-scrollbar-thumb,
.preview-content::-webkit-scrollbar-thumb {
    background: #1e90ff;
    border-radius: 8px;
}
body::-webkit-scrollbar-track,
.form-scroll-container::-webkit-scrollbar-track,
.form-column::-webkit-scrollbar-track,
.preview-column::-webkit-scrollbar-track,
.form-content::-webkit-scrollbar-track,
.preview-content::-webkit-scrollbar-track {
    background: #e3f0ff;
    border-radius: 8px;
}