/* =========================================
   ECONOS - INMOBILIA 3.0 | PRO DARK THEME
   ========================================= */

:root {
    /* Paleta Oficial */
    --primary-blue: #0F4C81;
    --secondary-blue: #377391;
    --dark-bg: #1F2937;
    
    /* Elementos de UI */
    --glass-bg: rgba(31, 41, 55, 0.95); /* Más opaco para asegurar lectura sobre video brillante */
    --text-main: #ffffff; 
    --text-muted: #d1d5db; 
    --input-bg: #f9fafb;
    --success: #10b981;
}

/* Reset y Tipografía */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center; 
    min-height: 100vh;
    padding: 40px 20px;
    background-color: #000;
}

/* VIDEO DE FONDO (LIMPIO Y VIBRANTE) */
#bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    object-fit: cover;
    /* Eliminados los filtros de gris y contraste para que se vea natural */
    filter: none;
}

/* CAPA TRANSPARENTE (SIN OSCURECER) */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Eliminado el degradado fuerte. Ahora es casi transparente */
    background: rgba(0, 0, 0, 0.1); 
    z-index: -1;
    /* Eliminado el blur para que el video se vea nítido */
    backdrop-filter: none;
}

/* CONTENEDOR PRINCIPAL (ESTILO CRISTAL OSCURO) */
.container {
    background-color: var(--glass-bg);
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
    
    /* Efecto borde de cristal brillante */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    
    backdrop-filter: blur(10px);
}

/* =========================
   CABECERA (HEADER)
   ========================= */
header {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 25px;
    display: flex;
    justify-content: center;
}

/* Contenedor flexible para poner logo y texto en paralelo */
.header-content {
    display: flex;
    align-items: center; 
    gap: 20px; 
}

.logo {
    max-width: 90px; 
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); 
}

/* Bloque para los textos */
.header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

header h1 {
    color: var(--text-main);
    font-size: 36px; 
    font-weight: 700; 
    letter-spacing: 1.5px;
    line-height: 1;
    margin-bottom: 5px;
    /* Sombra de texto profesional multicapa */
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.6),
        0 4px 8px rgba(0,0,0,0.4),
        0 1px 2px rgba(255,255,255,0.1);
}

.subtitle {
    color: #5fa8d3; /* Azul cyan brillante */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .header-text {
        align-items: center;
    }
}

/* =========================
   ESTILOS DEL FORMULARIO
   ========================= */
form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff; /* BLANCO PURO */
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Estilo de Inputs */
input, select, textarea {
    padding: 14px 16px;
    border: 2px solid transparent; 
    border-radius: 8px;
    font-size: 15px;
    background-color: var(--input-bg); 
    color: #1f2937; /* Texto oscuro dentro del input */
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--secondary-blue);
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(55, 115, 145, 0.3); 
}

/* Inputs de Solo Lectura (Código) */
.readonly-input {
    background-color: rgba(15, 76, 129, 0.25); 
    color: #ffffff;
    border: 1px solid rgba(15, 76, 129, 0.5);
    font-family: 'Courier New', monospace; 
    letter-spacing: 1px;
}

/* Layout de Columnas */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 650px) {
    .row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .container {
        padding: 25px;
    }
}

/* Checkboxes Estilizados */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-group label {
    margin-bottom: 0;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 14px;
    text-transform: none;
    transition: color 0.2s;
    text-shadow: none;
}

.checkbox-group label:hover {
    color: #ffffff;
}

input[type="checkbox"] {
    accent-color: var(--secondary-blue);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Icono de Moneda */
.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon input {
    width: 100%;
    padding-right: 35px;
}
.currency {
    position: absolute;
    right: 15px;
    color: #4b5563;
    font-weight: bold;
}

/* BOTÓN DE ACCIÓN */
.btn-save {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(15, 76, 129, 0.5); 
}

.btn-save:hover {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(55, 115, 145, 0.7);
}

.btn-save:disabled {
    background: #4b5563;
    box-shadow: none;
    cursor: not-allowed;
}

/* Separador */
hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 10px 0 20px 0;
}

/* Utilidades */
.hidden { display: none; }
.mt-2 { margin-top: 12px; }

/* =========================
   MODAL DE ÉXITO (POPUP)
   ========================= */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #1f2937;
    border: 1px solid #374151;
    padding: 45px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.05);
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--success);
}

.modal-content h2 {
    color: white;
    margin-bottom: 12px;
    font-size: 24px;
}

.modal-content p {
    color: #9ca3af;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-modal {
    background-color: var(--secondary-blue);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.btn-modal:hover {
    background-color: var(--primary-blue);
}

/* ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}