:root {
    color-scheme: light;
    --ancho-menu: 260px;
    --alto-encabezado: 68px;
    --fondo: #f4f6f8;
    --texto: #203047;
    --color-base-top: rgba(22,105,171,1);
}

* { 
    box-sizing: border-box; 
}

body { 
    margin: 0; 
    font-family: system-ui, sans-serif; 
    color: var(--texto); 
    background: var(--fondo); 
}

a { 
    color: #184e79; 
}

button { 
    font: inherit; cursor: pointer; 
}

.encabezado {
    position: fixed; 
    inset: 0 0 auto; 
    z-index: 30; 
    height: var(--alto-encabezado);
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 16px;
    padding-inline: 20px; 
    background: var(--color-base-top); 
    color: white;
}

.encabezado__marca { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    min-width: 0; 
}

.encabezado a { 
    color: white; 
    font-weight: 700; 
    text-decoration: none; 
    font-size: 1.15rem; 
}

.encabezado__descripcion { 
    color: #cbd5e1; 
    font-size: .9rem; 
}

.boton-menu, .cerrar-menu {
    display: grid; 
    place-items: center; 
    flex-shrink: 0; 
    width: 44px; 
    height: 44px;
    border: 1px solid #526279; 
    border-radius: 8px; 
    color: inherit; 
    background: transparent; 
    font-size: 1.35rem;
}

.boton-menu:hover { 
    background: #34465e; 
}

.menu-lateral {
    position: fixed; 
    top: var(--alto-encabezado); 
    bottom: 0; 
    left: 0; 
    z-index: 20;
    width: var(--ancho-menu); 
    display: flex; 
    flex-direction: column;
    background: white; 
    border-right: 1px solid #dce1e7;
}

.menu-lateral__cabecera {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    flex-shrink: 0;
    min-height: 64px; 
    padding: 12px 20px; 
    color: #526279; 
    font-size: .8rem; 
    font-weight: 700;
    text-transform: uppercase; 
    letter-spacing: .08em;
}

.cerrar-menu { 
    display: none; 
}

.navegacion {
    flex: 1; 
    min-height: 0; 
    overflow-y: auto; 
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable; 
    padding: 0 12px max(20px, env(safe-area-inset-bottom));
}

.navegacion a {
    display: block; 
    padding: 13px 16px; 
    margin-bottom: 6px; 
    border-radius: 8px;
    text-decoration: none; 
    color: #40516a; 
    overflow-wrap: anywhere;
}

.navegacion a i {
    margin-right: 10px;
}

.navegacion a:hover { 
    background: #f0f4f8; 
}

.navegacion a[aria-current="page"] { 
    background: #e7eff8; 
    color: #174b78; 
    font-weight: 700; 
    box-shadow: inset 3px 0 #24649b; 
}

.area-contenido {
    margin-left: var(--ancho-menu); 
    padding-top: var(--alto-encabezado);
    min-height: 100vh; 
    min-height: 100dvh; 
    display: flex; 
    flex-direction: column; 
    min-width: 0;
}

main.contenedor { 
    flex: 1; 
    width: 100%; 
    min-width: 0; 
    padding: clamp(16px, 2.5vw, 36px); 
}

.panel { 
    min-width: 0; 
    padding: clamp(20px, 3vw, 36px); 
    background: white; 
    border: 1px solid #dce1e7; 
    border-radius: 12px; 
    overflow-wrap: anywhere; 
    margin-bottom: 24px;
}

.panel-intro { 
    min-width: 0;  
    overflow-wrap: anywhere;
    margin-bottom: 20px;
}

.panel-property {
    min-width: 0; 
    background: white; 
    border: 1px solid #dce1e7; 
    border-radius: 12px; 
    overflow-wrap: anywhere; 
    margin: 12px 0;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.property-info {
    display: flex;
    flex-direction: column;
    justify-content: start;
}

.property-acciones {
    display: flex;
    justify-content: end;
    align-items: center;
}

h1 { 
    margin: 0 !important; 
    font-size: clamp(1.5rem, 3vw, 2rem); 
}

h2 {
    font-size: 20px;
    margin-top: 0 !important;
}

p { 
    line-height: 1.6; 
}

.pie { 
    padding: 16px clamp(16px, 2.5vw, 36px) 24px; 
    color: #526279; 
    font-size: .85rem; 
}

.fondo-menu { 
    display: none; 
}

.menu-oculto .menu-lateral { 
    visibility: hidden; 
}

.menu-oculto .area-contenido { 
    margin-left: 0; 
}

:focus-visible { 
    outline: 3px solid #d18a13; 
    outline-offset: 3px; 
}

[role="alert"] {
  color: red;
  font-size: 13px;
  padding: 0 14px;
}

.cont {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.divide {
    flex: 1;
}

label {
    font-size: 13px;
}

input, select {
	width: 100%;
	display: block;
	font-family: inherit;
	font-weight: inherit;
	font-size: inherit;
	padding: 14px;
    margin: 14px 0;
	box-sizing: border-box;
	color: #000;
	background-color: rgba(255,255,255,1);
	border: 1px solid #dce1e7;
	text-overflow: ellipsis;
  	white-space: nowrap; 
  	overflow: hidden;
	appearance: none;
	border-radius: 8px;
}

textarea {
    width: 100%;
    min-height: 100px;
    overflow-y: hidden;
    resize: none;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: inherit;
	font-weight: inherit;
	font-size: inherit;
	padding: 14px;
    margin: 14px 0;
    background-color: rgba(255,255,255,1);
	border: 1px solid #dce1e7;
}

button {
	width: auto;
	font-family: inherit;
	font-weight: inherit;
	font-size: inherit;
	padding: 14px;
    margin: 14px 0;
	box-sizing: border-box;
	background-color: rgba(255,96,0,1);
	color: #FFF;
	border: none !important;
	cursor: pointer !important;
	appearance: none;
	border-radius: 8px;
		
}

button:hover {
	background-color: #666;
	border: none;
	color: #FFF;
}

input:focus, select:focus, textarea:focus {
	border-color: var(--color-base-top);
    outline: 0;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    margin: 14px 0;
    z-index: 1 !important;
    border: 1px solid #dce1e7;
}

#ubicacion-detalles[hidden] {
    display: none !important;
}

#results {
    height: auto;
    padding: 0;
    margin: -20px 0 0 0;
    background: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: 1px solid var(--color-base-top);
    border-left: 1px solid var(--color-base-top);
    border-right: 1px solid var(--color-base-top);
    border-top: none;
    box-sizing: border-box;
}

.address {
    box-sizing: border-box;
    padding: 5px 14px;
    box-sizing: border-box;
    cursor: pointer;
}

.address:hover {
    font-weight: 700;
    color: var(--color-base-top);
}

.pro-foto {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dce1e7; 
    background-color: var(--fondo);
}

@media (max-width: 767px) {

    :root { 
        --alto-encabezado: 60px; 
        --ancho-menu: min(300px, 85vw); 
    }
    
    .encabezado { 
        padding-inline: 12px; 
    }
    
    .encabezado a { 
        font-size: 1rem; 
    }
    
    .encabezado__descripcion { 
        display: none; 
    }
    
    .area-contenido { 
        margin-left: 0; 
    }
    
    .menu-lateral { 
        visibility: hidden; 
        z-index: 50; 
        top: 0; 
        box-shadow: 8px 0 30px #15233530; 
    }
    
    .menu-abierto .menu-lateral { 
        visibility: visible; 
    }
    
    .cerrar-menu { 
        display: grid; 
        border-color: #dce1e7; 
    }
    
    .menu-abierto .fondo-menu { 
        display: block; 
        position: fixed; 
        inset: 0; 
        z-index: 40; 
        background: #101c30a6; 
    }

    body.menu-abierto { 
        overflow: hidden; 
    }

}

.aviso-ejemplo {
    padding: 12px 16px;
    margin-bottom: 0;
    border-radius: 8px;
    background: #fff5da;
    color: #72500b;
    font-size: .9rem;
}

.resumen-modulos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    margin-top: 24px;
}

.tarjeta-resumen {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.tarjeta-resumen__encabezado {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-base-top);
}

.tarjeta-resumen__encabezado h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--texto);
}

.indicadores-resumen {
    margin: 24px 0 0;
}

.indicadores-resumen > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-block: 12px;
    border-bottom: 1px solid #e8edf2;
}

.indicadores-resumen dt {
    color: #526279;
    font-size: .9rem;
}

.indicadores-resumen dd {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.tarjeta-resumen__nota {
    color: #526279;
    font-size: .85rem;
    margin-block: 20px;
}

.tarjeta-resumen__enlace {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-block: 12px;
    font-weight: 600;
    text-decoration: none;
}

.tarjeta-resumen__enlace:hover {
    text-decoration: underline;
}

.pagina-acceso {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.formulario-acceso {
    width: min(100%, 420px);
}

.formulario-acceso form {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.formulario-acceso input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #b8c4d2;
    border-radius: 8px;
    font: inherit;
}

.formulario-acceso button {
    min-height: 46px;
    margin-top: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--color-base-top);
    color: white;
}

.sesion-usuario {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sesion-usuario button {
    padding: 8px 12px;
    background: transparent;
    color: white;
    border: 1px solid currentColor;
    border-radius: 8px;
}

/* Selectores con búsqueda: estilos compartidos por todos los módulos. */
.ts-wrapper {
    width: 100%;
    min-width: 0;
    margin-block: 8px 20px;
}

.ts-control {
    min-height: 44px;
    padding: 11px 14px;
    border: 1px solid #b8c4d2;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    box-shadow: none;
}

.ts-wrapper.single .ts-control {
    background: white;
    background-image: none;
}

.ts-control input {
    font-size: 1rem;
}

.ts-dropdown {
    font-size: 1rem;
    border-color: #b8c4d2;
    border-radius: 8px;
}

.ts-dropdown-content {
    max-height: 240px;
    overscroll-behavior: contain;
}

.ts-dropdown .option {
    padding: 10px 14px;
    overflow-wrap: anywhere;
}

.ts-wrapper.focus .ts-control {
    outline: 2px solid var(--color-base-top);
    outline-offset: 2px;
}

/* Preparación de fotografías de propiedades. */
.fotos-zona {
    position: relative;
    padding: 24px;
    border: 1px dashed #aabdd0;
    border-radius: 8px;
    background: #f5f8fc;
    margin: 14px 0;
}

.fotos-zona label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 140px;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.fotos-zona input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.fotos-selector i {
    font-size: 3rem;
    color: var(--color-base-top);
}

.fotos-zona:focus-within {
    outline: 3px solid var(--color-base-top);
    outline-offset: 3px;
}

.fotos-zona input:disabled {
    cursor: wait;
}

.fotos-zona input:disabled + label {
    opacity: .55;
}

.fotos-zona--activa {
    border-color: var(--color-base-top);
    background: #e7eff8;
}

#progreso-fotos {
    width: 100%;
    margin-top: 16px;
}

.fotos-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
}

.foto-tarjeta {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dce1e7;
    border-radius: 12px;
}

.foto-tarjeta:first-child {
    border: 1px solid var(--color-base-top);
}

.foto-tarjeta img {
    display: block;
    width: 100%;
    height: 190px;
    background: #edf1f5;
    border-radius: 8px;
    object-fit: cover;
}

.foto-acciones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-top: 12px;
}

.foto-acciones button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 0;
    font-size: .8rem;
}

.foto-acciones button:disabled {
    opacity: .45;
    cursor: default;
}

.fotos-errores {
    color: #a12626;
}

.foto-tarjeta img {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.foto-elegida img {
    cursor: grabbing;
}

.foto-destino {
    opacity: .35;
    background: #dceaf7;
    border-style: dashed;
}

#editor-fotos[aria-busy="true"] .foto-tarjeta img {
    cursor: wait;
}

.fotos-guardadas .foto-tarjeta:first-child {
    border: 1px solid #dce1e7;
}

.fotos-guardadas .foto-tarjeta img {
    cursor: default;
}

.paginacion {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: end;
    gap: 8px;
    margin-block: 24px;
}

.paginacion a {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: white;
    text-decoration: none;
}

.paginacion a[aria-current="page"] {
    background: var(--color-base-top);
    color: white;
    font-weight: 700;
}
