/* ================================================================================
   MIL HOUSES - STYLESHEET (ITCSS Architecture)
   ================================================================================ 
   
   Este archivo está organizado según la arquitectura ITCSS (Inverted Triangle CSS)
   La especificidad CSS aumenta gradualmente desde arriba hacia abajo.
   
   01. SETTINGS    - Variables CSS globales
   02. GENERIC     - Resets y normalización
   03. ELEMENTS    - Estilos de elementos HTML base (sin clases)
   04. OBJECTS     - Layouts y estructuras reutilizables
   05. COMPONENTS  - Componentes UI con estilos visuales
   06. UTILITIES   - Clases helper y overrides
   
   ================================================================================ */


/* ================================================================================
   01 - SETTINGS (Variables CSS)
   ================================================================================
   Variables globales para colores, tipografía, espaciado, etc.
   ================================================================================ */

:root {
    /* === Colores Principales (AMARILLO) === */
    --color-primary: #ffdd76;
    --color-primary-dark: #f5c942;
    --color-primary-super-dark: #ff9203;
    --color-primary-medium: #ffdd76;
    --color-primary-light: #ffe699;
    --color-primary-lighter: #fff0c2;
    
    /* === Colores Secundarios (VIOLETA) === */
    --color-secondary: #667eea;
    --color-secondary-dark: #5568d3;
    --color-secondary-medium: #667eea;
    --color-secondary-light: #8896ee;
    --color-secondary-lighter: #b8c1f3;
    
    /* === Colores Terciarios (GRIS) === */
    --color-tertiary: #b0b1b1;
    --color-tertiary-dark: #8a8b8b;
    --color-tertiary-medium: #b0b1b1;
    --color-tertiary-light: #c9caca;
    --color-tertiary-lighter: #e2e2e2;
    
    /* === Colores de Texto === */
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #999;
    --text-lighter: #888;
    --text-white: #fff;
    
    /* === Colores de Fondo === */
    --bg-white: #fff;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafafa;
    --bg-gray: #f5f5f5;
    
    /* === Colores de Estado === */
    --color-success: #28a745;
    --color-success-light: #d4edda;
    --color-danger: #dc3545;
    --color-danger-light: #f8d7da;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    
    /* === Colores de Borde === */
    --border-color: #e0e0e0;
    --border-color-light: #eee;
    --border-color-lighter: #f0f0f0;
    
    /* === Colores de Botones Secundarios === */
    --btn-secondary-bg: #dbdbdb;
    --btn-secondary-hover: #e4e3e3;
    --btn-secondary-text: #303030;
    
    /* === Tipografía === */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    --font-size-4xl: 28px;
    --font-size-5xl: 32px;
    
    /* === Espaciado === */
    --spacing-xs: 5px;
    --spacing-sm: 8px;
    --spacing-md: 10px;
    --spacing-lg: 12px;
    --spacing-xl: 15px;
    --spacing-2xl: 20px;
    --spacing-3xl: 25px;
    --spacing-4xl: 30px;
    --spacing-5xl: 40px;
    
    /* === Border Radius === */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-circle: 50%;
    
    /* === Sombras === */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 8px 25px rgba(0,0,0,0.15);
    --shadow-hover: 0 5px 15px rgba(255, 152, 0, 0.3);
    
    /* === Transiciones === */
    --transition-fast: all 0.2s;
    --transition-normal: all 0.3s;
    --transition-slow: all 0.5s;
    
    /* === Gradientes === */
    --gradient-primary: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-body: linear-gradient(1deg, #fafafa 0%, #b6b5b5 100%);
    
    /* === Z-index === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}


/* ================================================================================
   02 - GENERIC (Resets)
   ================================================================================
   Normalización y resets básicos del navegador
   ================================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ================================================================================
   03 - ELEMENTS (Base HTML)
   ================================================================================
   Estilos para elementos HTML base sin clases
   ================================================================================ */

body {
    font-family: var(--font-family);
    background: var(--gradient-body);
    min-height: 100vh;
    color: var(--text-dark);
    padding-top: 80px;
}


/* ================================================================================
   04 - OBJECTS (Layouts)
   ================================================================================
   Estructuras reutilizables y layouts sin estilos visuales específicos
   ================================================================================ */

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* === Grid Systems === */
.propiedades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.aliados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 25px;
}

.solicitudes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 25px;
}

.requerimientos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.caracteristicas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.imagenes-actuales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.modal-imagenes-thumb {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.espacidor{
    height: 20px;
}

/* ================================================================================
   05 - COMPONENTS (UI Components)
   ================================================================================
   Componentes con estilos visuales completos
   ================================================================================ */

/* === 5.1 NAVIGATION === */

.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    margin: 0 auto;
    padding: 5px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    width: 100%;
}
.nav-brand-center {
    display: flex;
    justify-content:center;
    align-items: center;
}
.nav-brand-center h2 {
    font-weight: 500;
    color: #667eea;
    font-size: 30px;
}
.nav-brand-center h2 span {
    color: var(--color-primary-super-dark);
    font-weight: 400;
}
.nav-brand{
    display: flex;
    align-items: center;
}

.nav-brand h2 {
    font-weight: 500;
    color: #667eea;
    font-size: 20px;
}
.nav-brand h2 span {
    color: var(--color-primary-super-dark);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu .borde{
    border-left: 2px solid #667eea;
    padding-left: 10px;
}

.nav-link {
    font-size: 13px;
    color: #555;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: #667eea;
    color: #fff;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid #eee;
}

.nav-user span {
    color: #666;
    font-size: 14px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #667eea;
    margin: 3px 0;
    transition: all 0.3s;
    border-radius: 3px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}


/* === 5.2 BUTTONS === */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    text-align: left;
    background: var(--color-primary);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--text-white);
}

.btn-secondary {
    background: var(--color-tertiary);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: var(--color-tertiary-dark);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-success:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-danger:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-info {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-info:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-whatsapp {
    background: #dbdbdb !important;
    color: #4e4e4e !important;
    border: none;
}

.btn-whatsapp:hover {
    background: #e4e3e3 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 168, 168, 0.3);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-sm {
    padding: 12px 14px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-quitar-agente {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-quitar-agente:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Botones flotantes móvil */
.btn-mobile-float {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ocultar botones flotantes en desktop */
@media (min-width: 769px) {
    .page-header__actions-mobile {
        display: none !important;
    }
}

.btn-mobile-float:active {
    transform: scale(0.95);
}

/* Icono en botones */
.icono-btn-sm{
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.icono-btn {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.icono-info {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Icono para botones */
.icono-btn {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Sistema de iconos con 3 tamaños */
.icono-sm {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.icono-md {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.icono-lg {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: middle;
}

.btn-mobile-float.btn-primary {
    background: linear-gradient(135deg, #fdbc08 0%, #fad355 100%);
    color: #000000;
}

.btn-mobile-float.btn-secondary {
    background: white;
    color: #161616;
}

.btn-mobile-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}


/* === 5.3 FORMS === */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 2px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.form-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
}

.form-card h2 {
    margin-top: 0;
    color: #333;
}


/* === 5.4 ALERTS === */

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* === 5.5 BADGES === */

.badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    margin-left: 5px;
}

.badge-num {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 0px;
    margin-left: 5px;
}

.badge-success {
    background: #f8f8f7e8;
    color: #313131;
}

.badge-warning {
    background: #ffc107;
    color: #000;
}

.badge-danger {
    background: #dc3545;
    color: #fff;
}

.badge-info {
    background: #667eea;
    color: #fff;
}

.badge-new {
    background: #ff6b6b;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.badge-active {
    background: #667eea;
    color: #fff;
}

.badge-mensajes {
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.badge-guardada {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}


/* === 5.6 CARDS === */

/* --- Propiedad Card --- */
.propiedad-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding-bottom: 10px;
}

.propiedad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.propiedad-card.no-leida {
    border: 2px solid var(--color-primary-dark);
    padding-bottom: 10px;
}

.propiedad-imagen {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #f5f5f5;
}

/* Icono de fondo cuando no hay imagen */
.propiedad-imagen.sin-imagen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-image: url('../images/iconos/foto_houses.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    filter: grayscale(100%);
}

.propiedad-info {
    position: relative;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.propiedad-info h3 {
    font-weight: 400;
    width: 80%;
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
    min-height: 50px;
}

.propiedad-tipo {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.propiedad-precio {
    color: #667eea;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
}

/* === Precios Duales (Venta y Alquiler) === */
.propiedad-precio-dual-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.propiedad-precio-dual-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.precio-dual-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    min-width: 70px;
}

.precio-dual-moneda {
    font-size: 12px;
    color: #667eea;
    font-weight: 400;
}

.precio-dual-valor {
    font-size: 20px;
    font-weight: 400;
    color: #667eea;
}

/* Variante para cards más pequeñas */
.propiedad-precio-dual-compact .propiedad-precio-dual-item {
    gap: 6px;
}

.propiedad-precio-dual-compact .precio-dual-label {
    font-size: 11px;
    min-width: 60px;
}

.propiedad-precio-dual-compact .precio-dual-moneda {
    font-size: 12px;
}

.propiedad-precio-dual-compact .precio-dual-valor {
    font-size: 20px;
}

.propiedad-ubicacion {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.propiedad-caracteristicas {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.propiedad-caracteristicas span {
    font-size: 13px;
    color: #666;
}

.propiedad-agente {
    font-size: 12px;
    color: #666;
    margin-bottom: 60px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.propiedad-estado {
    margin-bottom: 15px;
}

.propiedad-estado label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.propiedad-permiso {
    margin-bottom: 15px;
}

.propiedad-permiso label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.permiso-select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.permiso-select:hover,
.permiso-select:focus {
    border-color: #FF9800;
    outline: none;
}

.propiedad-acciones-ver {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.propiedad-acciones-ver button {
    width: 100%;
}

.propiedad-acciones-compartir {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.propiedad-acciones-compartir button {
    width: 100%;
    padding: 10px;
}

.propiedad-acciones-whatsapp {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.propiedad-acciones-whatsapp button {
    width: 100%;
}

.propiedad-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 15px;
}

.estado-select {
    flex: 1;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 13px;
}

.nav-car-propiedad {
    display: flex;
    flex-direction: column;
    padding: 0 20px 20px 20px;
    margin-top: auto;
}

/* --- Aliado Card --- */
.aliado-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    padding-bottom: 70px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
}

.aliado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.aliado-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.aliado-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.aliado-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    flex-shrink: 0;
}

.aliado-info h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 5px;
}

.aliado-empresa {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.aliado-detalles {
    margin-bottom: 15px;
}

.aliado-ubicacion,
.aliado-contacto,
.aliado-fecha {
    color: #666;
    font-size: 13px;
    margin: 8px 0;
}

.aliado-notas {
    color: #555;
    font-size: 13px;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #FF9800;
}

.aliado-notas strong {
    color: #FF9800;
}

.aliado-fecha {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 10px;
}

.aliado-acciones {
    display: block;
    position: absolute;
    bottom: 10px;
    left: 20px;
    right: 20px;
}

.aliado-acciones button {
    white-space: nowrap;
    font-size: 13px;
}

/* --- Solicitud Card --- */
.solicitud-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 2px solid #FF9800;
    transition: all 0.3s;
}

.solicitud-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.solicitud-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.solicitud-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffdd76 0%, #f5c942 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.solicitud-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.solicitud-info h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 5px;
}

.solicitud-empresa {
    color: #FF9800;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.solicitud-detalles {
    margin-bottom: 15px;
}

.solicitud-contacto,
.solicitud-fecha,
.solicitud-estado {
    color: #666;
    font-size: 13px;
    margin: 8px 0;
}

.solicitud-estado {
    color: #FF9800;
    font-weight: 600;
}

.solicitud-acciones {
    display: flex;
    gap: 10px;
}

/* --- Requerimiento Card --- */
.requerimiento-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    padding-bottom: 140px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 550px;
}

.req-matches-container {
    width: calc(100% - 40px);
}

.requerimiento-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.req-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.req-badge {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.req-badge-venta {
    background: #e3f2fd;
    color: #1976d2;
}

.req-badge-alquiler {
    background: #fff3e0;
    color: #f57c00;
}

.req-fecha {
    font-size: 12px;
    color: #999;
}

.req-titulo {
    font-weight: 400;
    width: 80%;
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
    min-height: 50px;
}

.req-ubicacion {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.req-presupuesto {
    font-size: 20px;
    font-weight: 400;
    color: #667eea;
    margin: 10px 0;
}

.req-caracteristicas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.req-caracteristicas span {
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.req-descripcion {
    color: #555;
    font-size: 14px;
    line-height: 1;
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    max-height: 4.5em; /* 3 líneas × 1.5 line-height = 4.5em */
    overflow-y: auto;
}

.req-agente {
    position: absolute;
    bottom: 10px;
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.req-guardar-accion {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    padding-top: 15px;
}

.req-agente-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.req-agente-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.req-agente-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.req-acciones {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    display: flex;
    gap: 10px;
    padding-top: 15px;
    flex-wrap: wrap;
}

.estado-select-req {
    flex: 1;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.permiso-select-req {
    flex: 1;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.mi-req-card {
    border: 2px solid #f0f0f0;
    position: relative;
    padding-bottom: 180px;
}

/* Estilos para comisiones y splits en requerimientos */
.comision-info-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    border-left: 3px solid #4CAF50;
    position: relative;
}

.comision-info-text {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.comision-info-splits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.comision-split-item {
    background: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-editar-comision {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-editar-comision:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.comision-sin-configurar-container {
    margin: 12px 0;
}

.comision-sin-configurar {
    display: inline-block;
    background: #fff3e0;
    color: #f57c00;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
}

.btn-configurar-comision {
    margin: 12px 0;
}


/* === 5.7 MODALS === */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    padding: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    margin: 20px auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
}

.close {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-large {
    max-width: 900px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-info-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-tipo {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 14px;
}

.modal-precio {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.modal-imagenes {
    margin-bottom: 25px;
}

.modal-imagen-principal {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.modal-imagenes-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.modal-imagenes-thumb img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-ubicacion,
.modal-descripcion,
.modal-caracteristicas {
    margin-bottom: 25px;
}

.modal-ubicacion h3,
.modal-descripcion h3,
.modal-caracteristicas h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
}

.modal-ubicacion p,
.modal-descripcion p {
    color: #666;
    line-height: 1.6;
}


/* === 5.8 TABS === */

.tabs-container {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 5px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding: 10px;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
    position: relative;
}

.tab-button:hover {
    background: #f8f9fa;
    color: #667eea;
}

.tab-button.active {
    background: #667eea;
    color: #fff;
}

.tab-button .badge {
    background: #ff4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 0;
    margin-right: 8px;
    display: none;
}

/* Badge en móvil: solo punto rojo pequeño */
@media (max-width: 768px) {
    .tab-button .badge {
        padding: 6px;
        border-radius: 50%;
        font-size: 0;
        margin-right: 6px;
        min-width: 6px;
        line-height: 0;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.tabs .tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #fff;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.tabs .tab-button.active {
    background: #667eea;
    color: #fff;
}

.tabs .tab-button:hover {
    background: #f0f0f0;
}

.tabs .tab-button.active:hover {
    background: #667eea;
}


/* === 5.9 PAGE COMPONENTS === */

.page-header {
    min-height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 0px 10px 0px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header h1 {
    line-height:1;
    text-transform: uppercase;
    color: #333;
    font-size: 22px;
    font-weight: 400;
    display: flex;
    align-items: center;
}

.page-header-icon {
    margin-right: 20px;
    width: 60px;
    height: 60px;
    background: #fcbc5c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
}

.page-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-header__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Sticky behavior for desktop */
@media (min-width: 769px) {
    .header-tabs-wrapper {
        display: flex;
        gap: 10px;
        position: sticky;
        top: 70px;
        z-index: 900;
        margin-bottom: 20px;
    }
    
    .header-tabs-wrapper .page-header {
        width: 50%;
        max-width: 50%;
        margin-bottom: 0;
    }
    
    .header-tabs-wrapper .tabs {
        background-color: #cececefd;
        width: 50%;
        margin-bottom: 0;
        border-bottom:none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Para page-header sin tabs (como dashboard, match) */
    .page-header {
        position: sticky;
        top: 70px;
        z-index: 900;
        max-width: 50%;
    }
}

.filters-bar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.filters-bar input,
.filters-bar select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
}


/* === 5.10 AUTH PAGES === */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #667eea;
    font-size: 32px;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}
.auth-form {
    padding: 30px;
    background-color: var(--bg-light);
}
.auth-form h2 {
    text-align: center;
    font-weight: 400;
    color: var(--text-medium);
    margin-bottom: 25px;
    font-size: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 13px;
    color: #666;
}

.demo-credentials p {
    margin: 5px 0;
}


/* === 5.11 SEARCH & RESULTS === */

.resultados-busqueda {
    position: relative;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lista-resultados {
    background: #fff;
}

.resultado-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.resultado-item:last-child {
    border-bottom: none;
}

.resultado-item:hover {
    background: #f8f9fa;
    padding-left: 16px;
}

.resultado-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.resultado-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.resultado-info {
    flex: 1;
}

.resultado-nombre {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.resultado-detalles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
}

.agente-id {
    color: #999;
    font-weight: 600;
}

.agente-empresa {
    color: #667eea;
    font-weight: 600;
}

.agente-ubicacion,
.agente-telefono {
    color: #666;
}


/* === 5.12 CHIPS & TAGS === */

.agente-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.agente-chip span {
    display: flex;
    align-items: center;
    gap: 5px;
}

#agentes-seleccionados-container {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 2px dashed #e0e0e0;
}

#buscar_agente {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

#buscar_agente:focus {
    border-color: #FF9800;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}


/* === 5.13 IMAGE COMPONENTS === */

.preview-image {
    height: 150px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imagen-actual-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.imagen-actual-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.imagen-actual-item .btn-eliminar-imagen {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.imagen-actual-item .btn-eliminar-imagen:hover {
    background: #c82333;
    transform: scale(1.1);
}

.imagen-principal-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}


/* === 5.14 MISC COMPONENTS === */

.mensaje-compartir {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 5px;
    font-style: italic;
    margin: 10px 0;
    border-left: 3px solid #667eea;
}

.compartida-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.compartida-info p {
    margin: 5px 0;
    font-size: 13px;
}

.caracteristica-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
}

.caracteristica-icon {
    font-size: 24px;
}

.caracteristica-label {
    font-size: 12px;
    color: #666;
}

.caracteristica-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}


/* ================================================================================
   06 - UTILITIES (Helpers)
   ================================================================================
   Clases de ayuda y estados especiales
   ================================================================================ */

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.loading-text {
    text-align: center;
    color: #999;
    padding: 40px;
}

.loading-resultados,
.no-resultados-busqueda,
.error-busqueda {
    padding: 20px;
    text-align: center;
    color: #666;
    background: #fff;
    border-radius: 5px;
}

.error-busqueda {
    color: #dc3545;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
    background: #fff;
    border-radius: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    width: 64px;
    height: 64px;
    display: inline-block;
}

.empty-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.5;
}

.empty-state p {
    color: #999;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ================================================================================
   06 - POPUP DE MATCHES
   ================================================================================
   Estilos para los popups de matches de propiedades y requerimientos
   ================================================================================ */

/* === Overlay del Popup === */
#popup-matches,
#popup-matches-req {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Clase para mostrar el popup con scroll desde arriba */
#popup-matches.popup-match-show,
#popup-matches-req.popup-match-show {
    display: flex;
    align-items: flex-start;
    padding: 80px 0 0 0;
}

/* === Contenedor del Popup === */
#popup-matches-content,
#popup-matches-req-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-width: 95vw;
    width: 700px;
    position: relative;
    padding: 30px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

/* === Botón Cerrar === */
.popup-match-close {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.popup-match-close:hover {
    color: #333;
}

/* === Título del Popup === */
.popup-match-title {
    display: flex;
    align-items: flex-end;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 400;
    color: #333;
}

.popup-match-icon {
    background-color: var(--color-primary);
    padding: 5px;
    width: 34px;
    height: 34px;
    vertical-align: middle;
    margin-right: 8px;
}

.popup-match-id-badge {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    margin-left: 8px;
}

/* Título de modal de comisión - mismo estilo que popup-match-title */
.modal-comision-title {
    line-height: 1;
    display: flex;
    align-items: flex-end;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 400;
    color: #333;
}

.modal-comision-icon {
    background-color: var(--color-primary);
    padding: 5px;
    width: 34px;
    height: 34px;
    vertical-align: middle;
    margin-right: 8px;
}

.modal-comision-id-badge {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    margin-left: 8px;
}

/* Título de modal de edición - mismo estilo que popup-match-title */
.modal-edit-title {
    line-height: 1;
    display: flex;
    align-items: flex-end;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 400;
    color: #333;
}

.modal-edit-icon {
    background-color: var(--color-primary);
    padding: 5px;
    width: 34px;
    height: 34px;
    vertical-align: middle;
    margin-right: 8px;
}

.modal-edit-id-badge {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    margin-left: 8px;
}

/* === Lista de Matches === */
.popup-match-list {
    max-height: 60vh;
    overflow-y: auto;
    min-width: 100%;
}

.popup-match-empty {
    padding: 30px;
    text-align: center;
    color: #999;
}

/* === Card de Match Individual === */
.popup-match-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* === Badge de Estado === */
.popup-match-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.popup-match-status-badge--nuevo {
    background: #ff6b6b;
    color: #fff;
}

.popup-match-status-badge--ignorado {
    background: #f5f5f5;
    color: #4e4e4e;
}

.popup-match-status-badge--gestionando {
    background: #fcc676;
    color: #4e4e4e;
}

/* === Score Section === */
.popup-match-score-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.popup-match-score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #2c2c2c;
    flex-shrink: 0;
}

.popup-match-score-circle--excelente {
    background: #ff9800;
}

.popup-match-score-circle--bueno {
    background: #fdc36c;
}

.popup-match-score-circle--regular {
    background: #fde5c1;
}

.popup-match-score-bar {
    flex: 1;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    min-width: 0;
}

.popup-match-score-progress {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* === Info Box === */
.popup-match-info-box {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.popup-match-info-title {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-match-info-id {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.popup-match-image {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.popup-match-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-match-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.popup-match-details {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.popup-match-details strong {
    color: #333;
}

.popup-match-agent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.popup-match-agent-photo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* === Action Buttons === */
.popup-match-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.popup-match-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
}

.popup-match-btn--gestionar {
    background: #ffdd76;
    color: #272727;
}

.popup-match-btn--gestionar:hover {
    background: #F57C00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    color: white;
}

.popup-match-btn--ignorar {
    background: #dbdbdb;
    color: #4e4e4e;
}

.popup-match-btn--ignorar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 168, 168, 0.3);
}


/* ================================================================================
   07 - RESPONSIVE (Media Queries)
   ================================================================================
   Ajustes para diferentes tamaños de pantalla
   ================================================================================ */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .nav-container {
        padding: 10px 5px;
    }
    
    .nav-menu {
        gap: 12px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 10px;
    }
    
    .nav-user {
        margin-left: 15px;
        padding-left: 15px;
    }
    
    .nav-user span {
        font-size: 10px;
    }
    
    .container {
        padding: 10px;
    }
}

/* Móviles y tablets pequeñas */
@media (max-width: 768px) {
    /* Ocultar elementos solo en móvil */
    .hide-mobile {
        display: none;
    }
    
    body {
        padding-top: 65px;
        padding-bottom: 150px;
    }
    
    /* Navigation */
    .navbar {
        margin-bottom: 20px;
        width: 100%;
    }
    
    .nav-container {
        padding: 10px 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .nav-brand h2 {
        font-size: 20px;
        margin: 0;
    }
    
    .nav-toggle {
        display: flex;
        order: 3;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0 20px 0;
        box-shadow: -3px 0 15px rgba(0,0,0,0.2);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu .borde {
        border-left: none;
        border-bottom: 2px solid #f0f0f0;
        padding: 15px 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px 25px;
        border-radius: 0;
        border-bottom: 1px solid #f5f5f5;
        margin: 0;
        text-align: left;
        transition: all 0.2s;
    }
    
    .nav-link:hover {
        background: linear-gradient(90deg, #f8f9ff 0%, #fff 100%);
        color: #667eea;
        padding-left: 35px;
        border-left: 4px solid #667eea;
    }
    
    .nav-link.active {
        background: linear-gradient(90deg, #f0f3ff 0%, #fff 100%);
        color: #667eea;
        font-weight: 600;
        border-left: 4px solid #667eea;
        padding-left: 35px;
    }
    
    .nav-user {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 20px 25px;
        border-left: none;
        border-top: 3px solid #667eea;
        gap: 15px;
        background: #fafbff;
    }
    
    .nav-user span {
        width: 100%;
        padding: 12px;
        background: #fff;
        border-radius: 8px;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .nav-user .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .nav-overlay {
        backdrop-filter: blur(2px);
    }
    
    /* Containers */
    .container {
        padding: 15px;
    }
    
    /* Page Header */
    .page-header {
        gap: 15px;
        margin-bottom: 0px;
        flex-wrap: wrap;
    }
    
    .page-header h1 {
        font-size: 18px;
        flex: 1;
        min-width: 0;
    }
    
    /* Nombre de empresa con ellipsis en móvil */
    #empresa-nombre {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px;
    }
    
    /* Badge de nivel que no se empuja */
    .empresa-mi-nivel {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    /* Ocultar botones de header en móvil */
    .page-header__actions {
        display: none !important;
    }
    
    /* Filters */
    .filters-bar {
        flex-direction: column;
    }
    
    .filters-bar input,
    .filters-bar select {
        width: 100%;
    }
    
    /* Grids */
    .propiedades-grid {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }
    
    .requerimientos-grid {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-container {
        padding: 10px 0px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    /* Tabs */
    .tabs {
        gap: 5px;
        padding: 8px;
        transition: all 0.3s ease;
    }
    
    /* Tabs sticky cuando se scrollea en móvil */
    .tabs.tabs-sticky {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        z-index: 900;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        margin: 0;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 40px;
    }
    
    /* Requerimientos */
    .req-agente {
        align-items: flex-start;
        gap: 10px;
    }
    
    .req-acciones {
        flex-direction: column;
    }
    
    /* === Popup de Matches Responsive === */
    #popup-matches-content,
    #popup-matches-req-content {
        width: 95vw;
        max-width: 95vw;
        padding: 20px 15px 15px 15px;
        max-height: 80vh;
    }
    
    .popup-match-list {
        min-width: auto;
        max-height: 70vh;
    }
    
    .popup-match-title {
        font-size: 20px;
        font-weight: 400;
        padding-right: 30px;
    }
    
    .popup-match-id-badge {
        font-size: 14px;
        padding: 2px 6px;
        margin-left: 4px;
        display: inline-block;
        margin-top: 5px;
    }
    
    .popup-match-card {
        padding: 20px 5px;
        margin-bottom: 12px;
    }
    
    .popup-match-score-section {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .popup-match-score-circle {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
    
    .popup-match-score-bar {
        min-width: 0;
        flex: 1;
    }
    
    .popup-match-info-box {
        padding: 20px 5px;
    }
    
    .popup-match-image {
        height: 180px;
    }
    
    .popup-match-name {
        font-size: 15px;
    }
    
    .popup-match-details {
        font-size: 13px;
    }
    
    .popup-match-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .popup-match-btn {
        width: 100%;
        min-width: auto;
    }
    
    .popup-match-status-badge {
        top: 10px;
        right: 10px;
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Modal h2 más pequeño en móvil */
    .modal-content h2 {
        width: 90%;
        font-size: 20px;
    }
    
    /* Auth box con menos padding en móvil */
    .auth-box {
        padding: 10px;
    }
}

/* ================================================================================
   ICONOS Y PLACEHOLDERS
   ================================================================================ */

/* Icono cuando no hay foto disponible */
.no-foto-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    opacity: 0.5;
    filter: grayscale(50%);
}

/* ================================================================================
   PERFIL DE USUARIO
   ================================================================================ 
   Estilos para el modal de perfil y sus componentes
   ================================================================================ */

/* Contenedor principal del perfil */
.perfil-container {
    display: grid;
    gap: 20px;
}

/* Header del perfil con gradiente */
.perfil-header {
    background: linear-gradient(180deg, #eaebec 0%, #7a7a7a 100%);
    padding: 30px;
    text-align: center;
    color: white;
}

/* Input oculto para foto de perfil */
.perfil-foto-input {
    display: none;
}

/* Wrapper clickeable de la foto de perfil */
.perfil-foto-wrapper {
    cursor: pointer;
    display: inline-block;
    position: relative;
    margin-bottom: 10px;
}

/* Imagen de perfil */
.perfil-foto-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Icono de usuario cuando no hay foto */
.perfil-foto-placeholder {
    font-size: 60px;
}

/* Badge de cámara sobre la foto */
.perfil-foto-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    color: #667eea;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 18px;
}

/* Nombre del usuario */
.perfil-nombre {
    margin: 0;
    font-size: 24px;
}

/* Empresa del usuario */
.perfil-empresa {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

/* Botón editar perfil */
.perfil-btn-editar {
    width: 180px;
    background: var(--color-tertiary-dark);
    color: var(--text-white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.perfil-btn-editar:hover {
    background: var(--color-tertiary-light);
}

/* Secciones blancas del perfil */
.perfil-seccion {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

/* Título de sección */
.perfil-seccion-titulo {
    margin-top: 0;
    border-bottom: 2px solid var(--color-tertiary-dark);
    padding-bottom: 10px;
}

/* Contenedor de ubicación */
.perfil-ubicacion-container {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

/* Labels de los campos */
.perfil-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Selects de país y ciudad */
.perfil-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* Botón guardar ubicación */
.perfil-btn-guardar {
    background: #ff9800;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.perfil-btn-guardar:hover {
    background: #e68900;
}

/* Container de información de contacto */
.perfil-info-contacto {
    display: grid;
    gap: 12px;
}

/* Item de información */
.perfil-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Label de info */
.perfil-info-label {
    font-weight: 600;
    min-width: 80px;
}

/* Valor de info */
.perfil-info-valor {
    color: #666;
}

/* Empresa vinculada pendiente */
.perfil-empresa-pendiente {
    color: #ff9800;
    font-weight: 600;
}

/* Empresa vinculada activa (link) */
.perfil-empresa-vinculada {
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* Enlace vincular empresa */
.perfil-vincular-link {
    color: #667eea;
    font-style: italic;
    cursor: pointer;
    text-decoration: underline;
}

/* Badge de estado */
.perfil-badge {
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.perfil-badge-nivel {
    background: var(--color-tertiary-dark);
    color: var(--text-white);
    padding: 2px 8px;
    font-size: 11px;
    text-transform: uppercase;
}

/* Grid de estadísticas */
.perfil-estadisticas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Card de estadística */
.perfil-estadistica-card {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Número de estadística */
.perfil-estadistica-numero {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

/* Label de estadística */
.perfil-estadistica-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Información de fecha de registro */
.perfil-fecha-registro {
    display: flex;
    align-items: center;
    gap: 10px;
}

.perfil-fecha-label {
    font-weight: 600;
}

.perfil-fecha-valor {
    color: #666;
}

/* Avatar en navbar */
.perfil-avatar-navbar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

/* ================================================================================
   PERFIL - RESPONSIVE MÓVIL
   ================================================================================ */

@media (max-width: 768px) {
    /* Contenedor del perfil con padding reducido */
    .perfil-container {
        gap: 15px;
    }
    
    /* Header más compacto en móvil */
    .perfil-header {
        padding: 20px 15px;
    }
    
    /* Foto de perfil más pequeña */
    .perfil-foto-img {
        width: 100px;
        height: 100px;
        border: 3px solid white;
    }
    
    .perfil-foto-placeholder {
        font-size: 50px;
    }
    
    /* Badge de cámara más pequeño */
    .perfil-foto-badge {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    /* Nombre más pequeño */
    .perfil-nombre {
        font-size: 20px;
    }
    
    /* Empresa más pequeña */
    .perfil-empresa {
        font-size: 14px;
    }
    
    /* Botón editar en ancho completo */
    .perfil-btn-editar {
        width: 100%;
        padding: 10px 20px;
        font-size: 15px;
    }
    
    /* Secciones con padding reducido */
    .perfil-seccion {
        padding: 15px;
        border-radius: 8px;
    }
    
    /* Títulos de sección más pequeños */
    .perfil-seccion-titulo {
        font-size: 16px;
        padding-bottom: 8px;
        word-wrap: break-word;
    }
    
    /* Items de información en columna si es necesario */
    .perfil-info-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* Label sin ancho mínimo en móvil */
    .perfil-info-label {
        min-width: auto;
        flex-shrink: 0;
    }
    
    /* Valor que ajusta su ancho */
    .perfil-info-valor {
        word-break: break-word;
        max-width: 100%;
    }
    
    /* Empresa vinculada que ajusta */
    .perfil-empresa-vinculada,
    .perfil-empresa-pendiente {
        word-break: break-word;
        max-width: 100%;
    }
    
    /* Badges que ajustan */
    .perfil-badge,
    .perfil-badge-nivel {
        font-size: 10px;
        padding: 2px 6px;
        white-space: nowrap;
    }
    
    /* Grid de estadísticas adaptativo */
    .perfil-estadisticas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Cards de estadística más compactas */
    .perfil-estadistica-card {
        padding: 12px;
    }
    
    /* Número más pequeño */
    .perfil-estadistica-numero {
        font-size: 28px;
    }
    
    /* Label más pequeña */
    .perfil-estadistica-label {
        font-size: 13px;
    }
    
    /* Fecha de registro en columna si es largo */
    .perfil-fecha-registro {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    /* Botón guardar en ancho completo */
    .perfil-btn-guardar {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Selects con tamaño de fuente más visible */
    .perfil-select {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 12px;
    }
    
    .perfil-label {
        font-size: 14px;
    }
}

/* Extra pequeños (menos de 480px) */
@media (max-width: 480px) {
    /* Container con gap más pequeño */
    .perfil-container {
        gap: 12px;
    }
    
    /* Header aún más compacto */
    .perfil-header {
        padding: 15px 10px;
    }
    
    /* Foto aún más pequeña */
    .perfil-foto-img {
        width: 80px;
        height: 80px;
    }
    
    .perfil-foto-placeholder {
        font-size: 40px;
    }
    
    /* Badge más pequeño */
    .perfil-foto-badge {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    /* Nombre más compacto */
    .perfil-nombre {
        font-size: 18px;
    }
    
    /* Secciones con padding mínimo */
    .perfil-seccion {
        padding: 12px;
    }
    
    /* Títulos más pequeños */
    .perfil-seccion-titulo {
        font-size: 15px;
    }
    
    /* Items en columna completa si es necesario */
    .perfil-info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Grid de estadísticas en columna si es muy pequeño */
    .perfil-estadisticas-grid {
        grid-template-columns: 1fr;
    }
}

/* === RESPONSIVE: AUTH PAGES === */

@media (max-width: 768px) {
    .auth-page {
        padding: 15px 10px;
        align-items: flex-start;
        min-height: 100dvh;

    }

    .auth-container {
        margin-top: 60px;
        max-width: 98%;
    }

    .auth-box {
        padding: 20px 15px;
        border-radius: 10px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    }

    .auth-header h1 {
        font-size: 28px;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-form {
        padding: 20px 15px;
    }

    .auth-form h2 {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .auth-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-form .form-group {
        width: 100%;
    }

    .auth-form .btn-primary {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    .auth-footer {
        margin-top: 15px;
        padding-top: 15px;
        font-size: 14px;
    }
    .nav-brand-center{
        padding: 20px 0;
    }

    .nav-brand-center img {
        width: 40px;
        height: 40px;
    }

    .nav-brand-center h2 {
        font-size: 28px;
    }

    .demo-credentials {
        font-size: 12px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 10px 8px;
    }

    .auth-box {
        padding: 15px 12px;
        border-radius: 8px;
    }

    .auth-form {
        padding: 15px 10px;
    }

    .auth-header h1 {
        font-size: 20px;
    }

    .nav-brand-center h2 {
        font-size: 30px;
    }
}

/* ================================================================================
   FIN DEL ARCHIVO
   ================================================================================ */
