/* ========================================================================== */
/* Espacios Únicos — hoja de estilos global                                  */
/* Índice: variables, base, navegación, catálogo, detalle, administración,   */
/* páginas corporativas, utilidades y estilos responsivos/de impresión.       */
/* ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:wght@600;700&display=swap");

/* 1. Variables y estilos base ------------------------------------------------ */
:root {
    --primario: #0d1025;
    --secundario: #3f51ff;
    --blanco: #ffffff;
    --gold: #bd8d44;
    --green: #15231e;
    --cream: #f6f4ef;
    --muted: #6f7772;
    --border: #d9ded9;
    --shadow: 0 3px 15px #17251c14;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--primario);
    background: var(--blanco);
    font-family: "Montserrat", sans-serif;
}

h1,
h2,
h3 {
    font-family: "Montserrat", Georgia, serif;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 5.3rem);
    line-height: 1.05;
}

/* 2. Utilidades --------------------------------------------------------------- */
.bg-primario {
    background: var(--primario) !important;
}

.bg-secundario {
    background: var(--secundario) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.eyebrow {
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.link-gold {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.empty-state {
    padding: 3rem;
    background: var(--blanco);
    text-align: center;
}

/* 3. Navegación y pie de página ---------------------------------------------- */
.navbar {
    padding: 0.7rem 0;
    color: var(--blanco);
    background: linear-gradient(90deg, var(--primario), var(--secundario));
}

.navbar-collapse .nav-link {
    position: relative;
    color: rgb(255 255 255 / 88%);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.navbar-collapse .nav-link::after {
    position: absolute;
    right: 0.5rem;
    bottom: 0.28rem;
    left: 0.5rem;
    height: 1px;
    content: "";
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}

.navbar-collapse .nav-link:hover,
.navbar-collapse .nav-link:focus-visible {
    color: var(--blanco);
    transform: translateY(-1px);
}

.navbar-collapse .nav-link:hover::after,
.navbar-collapse .nav-link:focus-visible::after {
    transform: scaleX(1);
}

.navbar-brand span {
    font-weight: 400;
}

.navbar-toggler,
.navbar-toggler-icon {
    color: var(--blanco) !important;
}

/* Navegación pública adaptable: conserva una cabecera ligera y un menú claro
   cuando Bootstrap cambia al desplegable en tabletas y móviles. */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.55rem 0;
        box-shadow: 0 5px 18px rgb(13 16 37 / 22%);
    }

    .navbar>.container {
        gap: 0.75rem;
    }

    .navbar-brand {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .navbar-brand img {
        display: block;
        width: clamp(154px, 25vw, 178px) !important;
        height: auto;
    }

    .navbar-toggler {
        display: inline-grid;
        width: 44px;
        height: 42px;
        padding: 0;
        place-items: center;
        border: 1px solid rgb(255 255 255 / 62%);
        border-radius: 0.58rem;
        background: rgb(255 255 255 / 8%);
        box-shadow: none;
    }

    .navbar-toggler-icon {
        width: 1.2rem;
        height: 1.2rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255,255,255,.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }

    .navbar-toggler:hover,
    .navbar-toggler:focus-visible {
        background: rgb(255 255 255 / 16%);
        border-color: var(--blanco);
        box-shadow: 0 0 0 0.2rem rgb(255 255 255 / 14%);
    }

    .navbar-collapse {
        margin-top: 0.65rem;
        padding: 0.45rem;
        background: rgb(8 11 34 / 88%);
        border: 1px solid rgb(255 255 255 / 13%);
        border-radius: 0.7rem;
        box-shadow: 0 12px 28px rgb(5 7 25 / 22%);
    }

    .navbar-collapse .navbar-nav {
        align-items: stretch;
        gap: 0.08rem;
    }

    .navbar-collapse .nav-link {
        display: flex;
        align-items: center;
        min-height: 42px;
        padding: 0.55rem 0.72rem;
        border-radius: 0.46rem;
        font-size: 0.82rem;
    }

    .navbar-collapse .nav-link::after {
        display: none;
    }

    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link:focus-visible {
        background: rgb(255 255 255 / 10%);
        transform: none;
    }

    .navbar-collapse .nav-item.ms-lg-3 {
        margin: 0.35rem 0 0.05rem !important;
    }

    .navbar-collapse .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        width: 100%;
        padding: 0.55rem 1rem;
        border-color: rgb(255 255 255 / 78%);
        border-radius: 0.46rem;
        font-size: 0.8rem;
        font-weight: 700;
    }
}

@media (max-width: 575.98px) {
    .navbar>.container {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .navbar-brand img {
        width: min(155px, 48vw) !important;
    }

    .navbar-collapse {
        margin-top: 0.55rem;
        padding: 0.38rem;
        border-radius: 0.6rem;
    }

    .navbar-collapse .nav-link {
        min-height: 40px;
        padding: 0.52rem 0.65rem;
        font-size: 0.79rem;
    }
}

/* Tabletas en horizontal: se mantiene la navegación completa, pero con una
   escala contenida para que el encabezado no domine la primera pantalla. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar {
        padding: 0.55rem 0;
    }

    .navbar-brand img {
        width: 166px !important;
        height: auto;
    }

    .navbar-collapse .nav-link {
        padding-right: 0.43rem;
        padding-left: 0.43rem;
        font-size: 0.76rem;
    }

    .navbar-collapse .nav-link::after {
        right: 0.43rem;
        left: 0.43rem;
    }

    .navbar-collapse .btn {
        padding-right: 0.7rem !important;
        padding-left: 0.7rem !important;
        font-size: 0.75rem;
    }
}

.navbar-solid,
.admin-header {
    background: linear-gradient(90deg, var(--primario), var(--secundario));
}

footer {
    padding: 1.4rem 0;
    color: #aebcb5;
    background: var(--primario);
    font-size: 0.85rem;
}

.site-footer {
    padding: 0;
    background: #090b1c;
}

.footer-brand {
    color: var(--blanco);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
}

.footer-brand span {
    font-weight: 400;
}

.footer-logo {
    display: block;
    width: min(205px, 100%);
    height: auto;
}

.footer-description {
    max-width: 340px;
    margin: 1rem 0;
    color: #aebcb5;
    line-height: 1.7;
}

.footer-title {
    margin: 0 0 1rem;
    color: var(--blanco);
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-links,
.footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a,
.footer-contact a {
    color: #aebcb5;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--blanco);
}

.footer-contact li {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    color: #aebcb5;
    line-height: 1.5;
}

.footer-contact i {
    color: var(--gold);
}

.footer-bottom {
    padding: 1.25rem 0;
    color: #8d949b;
    border-top: 1px solid rgb(255 255 255 / 12%);
    font-size: 0.76rem;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
}

.footer-privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.42rem 0.62rem;
    color: #d8dfda;
    background: rgb(255 255 255 / 5%);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.footer-privacy-link i {
    color: #f0c878;
    font-size: 0.82rem;
}

.footer-privacy-link:hover,
.footer-privacy-link:focus-visible {
    color: var(--blanco);
    background: rgb(255 255 255 / 11%);
    border-color: rgb(240 200 120 / 50%);
    outline: 0;
}

.footer-cookie-preferences {
    font-family: inherit;
    cursor: pointer;
}

/* Consentimiento y configuración de Google Analytics ----------------------- */
.analytics-consent-banner {
    position: fixed;
    right: clamp(1rem, 3vw, 2.25rem);
    bottom: clamp(1rem, 3vw, 2.25rem);
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: min(620px, calc(100vw - 2rem));
    padding: 1rem 1.1rem;
    color: #e8edf3;
    background: rgb(9 11 28 / 96%);
    border: 1px solid rgb(240 200 120 / 32%);
    border-radius: 0.8rem;
    box-shadow: 0 18px 45px rgb(5 8 22 / 30%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.analytics-consent-banner[hidden] {
    display: none !important;
}

.analytics-consent-banner strong {
    display: block;
    margin-bottom: 0.22rem;
    color: #fff;
    font-size: 0.88rem;
}

.analytics-consent-banner strong i,
.analytics-consent-banner a {
    color: var(--gold);
}

.analytics-consent-banner p {
    max-width: 435px;
    margin: 0 0 0.28rem;
    color: #c0c9d1;
    font-size: 0.78rem;
    line-height: 1.45;
}

.analytics-consent-banner a {
    font-size: 0.75rem;
    font-weight: 700;
}

.analytics-consent-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.analytics-admin-card {
    border: 1px solid rgb(199 151 85 / 22%);
}

.analytics-status-badge {
    padding: 0.52rem 0.72rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.analytics-enable-switch {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.analytics-enable-switch .form-check-input {
    float: none;
    margin: 0;
}

.analytics-admin-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.85rem;
    background: #f8f6f1;
    border: 1px solid #ece4d4;
    border-radius: 0.65rem;
}

.analytics-admin-guide > div:not(.analytics-guide-links) {
    display: flex;
    gap: 0.52rem;
    color: #5e675f;
    font-size: 0.78rem;
    line-height: 1.45;
}

.analytics-admin-guide > div > i {
    flex: 0 0 auto;
    color: #b5843c;
    font-size: 1rem;
}

.analytics-admin-guide code {
    color: #695024;
    font-size: 0.75rem;
}

.analytics-guide-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.1rem;
}

html[data-admin-theme="dark"] .analytics-admin-guide {
    background: rgb(255 255 255 / 4%);
    border-color: rgb(255 255 255 / 12%);
}

html[data-admin-theme="dark"] .analytics-admin-guide > div:not(.analytics-guide-links) {
    color: #cbd3d9;
}

html[data-admin-theme="dark"] .analytics-admin-guide code {
    color: #f0c878;
}

@media (max-width: 767.98px) {
    .analytics-consent-banner {
        right: 1rem;
        bottom: 1rem;
        display: block;
    }

    .analytics-consent-actions {
        justify-content: flex-start;
        margin-top: 0.8rem;
    }

    .analytics-admin-guide {
        grid-template-columns: 1fr;
    }
}

.footer-bottom-tagline {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .footer-bottom {
        text-align: center;
    }
}

/* 4. Formularios y botones ---------------------------------------------------- */
.search-card label,
.admin-card label,
.users-edit-modal label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.form-control,
.form-select {
    padding: 0.7rem 0.6rem;
    border-color: var(--border);
}

/* Sistema de acciones: comparte la geometría, tipografía y transición de Salir. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 0.42rem;
    font-family: "Montserrat", sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    text-decoration: none;
    box-shadow: 0 1px 0 rgb(13 16 37 / 4%);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.btn:not(.btn-close):hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 13px rgb(13 16 37 / 14%);
}

.btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.22rem rgb(63 81 255 / 22%);
}

.btn-sm {
    min-height: 32px;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
}

.btn-lg {
    min-height: 44px;
    padding: 0.65rem 1rem;
    font-size: 0.86rem;
}

/* Acción principal: guardar, enviar, crear, filtrar y confirmar. */
.btn.bg-secundario,
.btn-primary {
    color: var(--blanco) !important;
    background: var(--secundario) !important;
    border-color: var(--secundario) !important;
}

.btn.bg-secundario:hover,
.btn-primary:hover {
    color: var(--blanco) !important;
    background: #3242d9 !important;
    border-color: #3242d9 !important;
}

/* Acción destacada: conversiones o acciones comerciales prioritarias. */
.btn-gold {
    color: var(--blanco) !important;
    background: var(--gold) !important;
    border-color: var(--gold) !important;
}

.btn-gold:hover {
    color: var(--blanco) !important;
    background: #af7f40 !important;
    border-color: #af7f40 !important;
}

/* Acciones neutras: regresar, editar, cancelar, ver y gestionar. */
.btn-light {
    color: #242a50 !important;
    background: var(--blanco) !important;
    border-color: #dfe2f0 !important;
}

.btn-light:hover {
    color: #242a50 !important;
    background: #eef0ff !important;
    border-color: #eef0ff !important;
}

.btn.btn-light.text-danger {
    color: #b83d4a !important;
    background: #fffafa !important;
    border-color: #e6c1c5 !important;
}

.btn.btn-light.text-danger:hover {
    color: var(--blanco) !important;
    background: #b83d4a !important;
    border-color: #b83d4a !important;
}

.btn-outline-dark {
    color: #242a50 !important;
    background: var(--blanco) !important;
    border-color: #cbd1e0 !important;
}

.btn-outline-dark:hover {
    color: #242a50 !important;
    background: #eef0ff !important;
    border-color: #bfc6df !important;
}

.btn-outline-light {
    color: var(--blanco) !important;
    background: rgb(255 255 255 / 8%) !important;
    border-color: rgb(255 255 255 / 48%) !important;
}

.btn-outline-light:hover {
    color: var(--blanco) !important;
    background: rgb(255 255 255 / 18%) !important;
    border-color: rgb(255 255 255 / 72%) !important;
}

/* Acciones de estado y acciones destructivas. */
.btn-success {
    color: var(--blanco) !important;
    background: #20744a !important;
    border-color: #20744a !important;
}

.btn-success:hover {
    background: #175e3a !important;
    border-color: #175e3a !important;
}

.btn-danger {
    color: var(--blanco) !important;
    background: #b83d4a !important;
    border-color: #b83d4a !important;
}

.btn-danger:hover {
    background: #98313c !important;
    border-color: #98313c !important;
}

.btn-outline-danger {
    color: #b83d4a !important;
    background: #fffafa !important;
    border-color: #dcaab0 !important;
}

.btn-outline-danger:hover {
    color: var(--blanco) !important;
    background: #b83d4a !important;
    border-color: #b83d4a !important;
}

/* Avisos breves del sistema -------------------------------------------------- */
.app-notification-stack {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    z-index: 1090;
    display: grid;
    width: min(360px, calc(100vw - 2rem));
    gap: 0.65rem;
    pointer-events: none;
}

.admin-page .app-notification-stack {
    top: 8.5rem;
}

.alert.app-floating-notification {
    position: relative;
    min-height: 58px;
    margin: 0 !important;
    padding: 0.85rem 2.65rem 0.85rem 1rem;
    border-width: 1px;
    border-radius: 0.65rem;
    box-shadow: 0 12px 30px rgb(20 32 43 / 18%);
    font-size: 0.84rem;
    line-height: 1.4;
    pointer-events: auto;
    animation: app-notification-enter 0.25s ease-out both;
}

.app-floating-notification.is-hiding {
    animation: app-notification-exit 0.26s ease-in both;
}

.app-notification-close {
    position: absolute;
    top: 0.42rem;
    right: 0.58rem;
    width: 26px;
    height: 26px;
    padding: 0;
    color: currentColor;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
    opacity: 0.72;
}

.app-notification-close:hover,
.app-notification-close:focus-visible {
    background: rgb(0 0 0 / 8%);
    opacity: 1;
}

@keyframes app-notification-enter {
    from {
        opacity: 0;
        transform: translateX(18px) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes app-notification-exit {
    to {
        opacity: 0;
        transform: translateX(16px);
    }
}

@media (max-width: 575px) {
    .app-notification-stack {
        top: 4.8rem;
        right: 0.7rem;
        width: calc(100vw - 1.4rem);
    }

    .admin-page .app-notification-stack {
        top: 7.2rem;
    }
}

/* 5. Portada y catálogo ------------------------------------------------------- */
.hero {
    height: 100vh;
    min-height: 0;
    padding: calc(170px + 2rem) 0 90px;
    color: var(--blanco);
    background:
        linear-gradient(90deg, #3f52ffa9 10%, #0d10259f 46%),
        url("../img/portada04.png") center / cover;
}

.hero>.container>.row {
    transform: translateY(1rem);
}

.hero .eyebrow,
.hero h1,
.hero .lead {
    opacity: 0;
    animation: hero-text-reveal 0.8s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}

.hero .eyebrow {
    animation-delay: 0.08s;
}

.hero h1 {
    animation-delay: 0.2s;
}

.hero .lead {
    animation-delay: 0.36s;
}

.hero-typing {
    display: inline-block;
    min-width: 7.2ch;
}

.hero-typing::after {
    display: inline-block;
    width: 0.08em;
    height: 0.85em;
    margin-left: 0.1em;
    content: "";
    background: var(--gold);
    animation: hero-typing-caret 0.8s steps(1, end) infinite;
}

@keyframes hero-text-reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-typing-caret {
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .hero .eyebrow,
    .hero h1,
    .hero .lead {
        opacity: 1;
        animation: none;
    }
}

.lead {
    width: 100%;
    max-width: none;
    margin-top: 1.4rem;
    color: #e5ebe7;
    font-size: 1.15rem;
}

.search-card {
    margin-top: 1rem;
    padding: 1.25rem;
    color: var(--primario);
    background: var(--blanco);
    border-radius: 5px;
    box-shadow: 0 12px 35px #0003;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 1rem 0 2rem;
}

.section-head h2,
.about h2 {
    font-size: 2.5rem;
}

.section-head>span {
    color: var(--muted);
    font-size: 0.9rem;
}

.property-card {
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #e2e2e2;
    border-radius: 0.5rem;
    box-shadow: 0 4px 22px rgb(23 37 28 / 4%);
    transition:
        transform 0.25s,
        box-shadow 0.25s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgb(23 37 28 / 11%);
}

.property-image {
    position: relative;
    height: 245px;
    background-position: center;
    background-size: cover;
}

.property-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* Protección disuasiva de imágenes públicas: evita arrastre, selección y menú contextual. */
.protected-property-media {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-select: none;
}

img.protected-property-media,
.protected-property-media img {
    -webkit-user-drag: none;
    pointer-events: none;
}

.property-image.property-unavailable {
    filter: grayscale(100%);
}

.badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 6px;
}

.badge-featured,
.badge-status,
.operation {
    padding: 6px 9px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-featured {
    color: var(--blanco);
    background: var(--gold);
}

.badge-status {
    color: var(--green);
    background: var(--blanco);
}

.badge-status.vendida {
    color: var(--blanco);
    background: #434a46;
}

.badge-status.alquilada {
    color: #422e12;
    background: #e2c28f;
}

.operation {
    position: absolute;
    right: 15px;
    bottom: 15px;
    color: var(--blanco);
    background: rgb(21 35 30 / 86%);
}

.property-code {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 6px 9px;
    color: var(--blanco);
    background: rgb(21 35 30 / 86%);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.property-type {
    margin: 0 0 0.35rem;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.property-card h3 {
    margin: 0;
    font-size: 1.48rem;
}

.location {
    color: var(--muted);
    font-size: 0.86rem;
}

.features {
    display: flex;
    gap: 13px;
    padding: 0.8rem 0;
    color: #59635d;
    border-top: 1px solid #edf0ed;
    border-bottom: 1px solid #edf0ed;
    font-size: 0.78rem;
}

.features i {
    color: var(--gold);
    font-size: 1.5rem;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.card-bottom strong,
.price {
    color: var(--green);
    font-size: 1.35rem;
}

/* Tarjetas compactas del catálogo público. */
.catalog-property-card {
    box-shadow: 0 3px 12px rgb(23 37 28 / 7%);
}

.catalog-property-card .property-image {
    height: 218px;
}

.catalog-property-card .property-content {
    padding: 1rem;
}

.catalog-property-card .badges {
    top: 11px;
    left: 11px;
}

.catalog-property-card .operation,
.catalog-property-card .property-code {
    bottom: 11px;
}

.catalog-property-card .operation {
    right: 11px;
}

.catalog-property-card .property-code {
    left: 11px;
}

.catalog-property-card .property-type {
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
}

.catalog-property-card h3 {
    font-size: 1.24rem;
    line-height: 1.25;
}

.catalog-property-card .location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.48rem 0;
    color: #3f4a43;
    font-size: 0.8rem;
    font-weight: 600;
}

.catalog-property-card .location i {
    flex: 0 0 auto;
    color: var(--gold);
    font-size: 0.95rem;
}

.catalog-property-card .property-date {
    margin-bottom: 0.55rem;
    font-size: 0.74rem;
}

.catalog-property-card .features {
    gap: 10px;
    padding: 0.55rem 0;
    font-size: 0.74rem;
}

.catalog-property-card .features i {
    font-size: 1.15rem;
}

.catalog-property-card .card-bottom {
    margin-top: 0.65rem;
}

.catalog-property-card .card-bottom strong {
    font-size: 1.16rem;
}

/* Filtros del inventario en el panel. */
.property-filter-form {
    border-top: 1px solid #e8ece8;
}

.property-filter-form .form-label {
    margin-bottom: 0.28rem;
    color: #536058;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card-bottom a {
    display: grid;
    width: 32px;
    height: 32px;
    color: var(--green);
    border: 1px solid #cfd6cf;
    border-radius: 50%;
    place-items: center;
}

/* 6. Sección institucional y páginas internas -------------------------------- */
.card-unavailable {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #b13f4b;
    background: rgb(220 104 104 / 15%);
    border: 1px solid rgb(190 78 78 / 24%);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* En el catálogo, los avisos de propiedades no disponibles quedan rectos. */
.catalog-property-card .badge-status.vendida,
.catalog-property-card .badge-status.alquilada,
.catalog-property-card .card-unavailable {
    border-radius: 0;
}

.about {
    margin-top: 4rem;
    padding: 5.5rem 0;
    color: var(--blanco);
    background: var(--primario);
}

.about p:not(.eyebrow) {
    color: #ccdad2;
    font-size: 1.1rem;
    line-height: 1.8;
}

.page-header {
    display: flex;
    height: 300px;
    margin-top: 6.5rem;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgb(0 0 0 / 60%), rgb(0 0 0 / 60%)),
        url("../img/carousel-1.jpg") center / cover no-repeat;
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    list-style: none;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--blanco);
    text-decoration: none;
}

.banner-titulo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 6.8vh;
}

/* Política de privacidad: lectura clara, navegación lateral y contenido legal. */
.privacy-page {
    color: #34413b;
    background: linear-gradient(180deg, #f6f8f7 0, #fff 38rem);
}

.privacy-hero {
    position: relative;
    overflow: hidden;
    padding: 9.2rem 0 4.2rem;
    color: var(--blanco);
    background:
        radial-gradient(circle at 88% 24%,
            rgb(240 200 120 / 23%),
            transparent 20rem),
        radial-gradient(circle at 13% 110%,
            rgb(63 81 255 / 34%),
            transparent 25rem),
        linear-gradient(118deg, #0d1025, #1c296a 80%);
}

.privacy-hero::after {
    position: absolute;
    right: 8%;
    bottom: -10rem;
    width: 23rem;
    height: 23rem;
    content: "";
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 50%;
}

.privacy-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.privacy-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: #f0c878;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.privacy-kicker i {
    font-size: 0.9rem;
}

.privacy-hero h1 {
    margin-bottom: 0.9rem;
    color: var(--blanco);
    font-size: clamp(2.3rem, 5vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
}

.privacy-hero-content>p:not(.privacy-kicker) {
    max-width: 650px;
    margin: 0;
    color: rgb(239 243 255 / 86%);
    font-size: 1.02rem;
    line-height: 1.75;
}

.privacy-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.2rem;
    margin-top: 1.6rem;
    color: rgb(255 255 255 / 73%);
    font-size: 0.76rem;
}

.privacy-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.privacy-hero-meta i {
    color: #f0c878;
}

.privacy-content {
    padding-top: 3.4rem;
    padding-bottom: 5.5rem;
}

.privacy-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5.5rem);
    max-width: 1080px;
    margin: 0 auto;
}

.privacy-index {
    position: sticky;
    top: 6.8rem;
    align-self: start;
    padding: 0.3rem 0 0.3rem 1rem;
    border-left: 2px solid #dfe5e0;
}

.privacy-index>p {
    margin: 0 0 0.65rem;
    color: #6d7b73;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.privacy-index-list {
    display: grid;
    gap: 0.15rem;
}

.privacy-index a {
    padding: 0.3rem 0;
    color: #607067;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        color 0.18s ease,
        transform 0.18s ease;
}

.privacy-index a:hover,
.privacy-index a:focus-visible {
    color: var(--secundario);
    outline: 0;
    transform: translateX(3px);
}

.privacy-document {
    min-width: 0;
}

.privacy-notice {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2.25rem;
    padding: 1rem 1.1rem;
    color: #3f4e46;
    background: #f6f5ed;
    border: 1px solid #e8e0ca;
    border-radius: 0.72rem;
}

.privacy-notice>i {
    flex: 0 0 auto;
    color: #a97932;
    font-size: 1.05rem;
}

.privacy-notice p {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.65;
}

.privacy-section {
    padding: 0 0 2.3rem;
    margin-bottom: 2.3rem;
    border-bottom: 1px solid #e6ebe7;
}

.privacy-section-last {
    margin-bottom: 0;
    border-bottom: 0;
}

.privacy-section-heading {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    margin-bottom: 1rem;
}

.privacy-section-heading>span {
    display: grid;
    width: 30px;
    height: 30px;
    color: #9a6e2e;
    background: #f7ecd4;
    border-radius: 0.45rem;
    font-size: 0.68rem;
    font-weight: 800;
    place-items: center;
}

.privacy-section-heading p {
    margin: 0 0 0.15rem;
    color: #8a958f;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.privacy-section h2 {
    margin: 0;
    color: #192b22;
    font-size: clamp(1.22rem, 2vw, 1.52rem);
    font-weight: 700;
    letter-spacing: -0.022em;
}

.privacy-section>p {
    margin: 0 0 0.85rem;
    color: #59665f;
    font-size: 0.9rem;
    line-height: 1.8;
}

.privacy-section>p:last-child {
    margin-bottom: 0;
}

.privacy-list {
    display: grid;
    gap: 0.62rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.privacy-list li {
    display: flex;
    gap: 0.62rem;
    align-items: flex-start;
    color: #526058;
    font-size: 0.87rem;
    line-height: 1.55;
}

.privacy-list i {
    display: grid;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin-top: 0.1rem;
    color: #20744a;
    background: #e5f1e8;
    border-radius: 50%;
    font-size: 0.8rem;
    place-items: center;
}

.privacy-purpose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    margin-top: 1.1rem;
}

.privacy-purpose-grid>div {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    column-gap: 0.58rem;
    padding: 0.85rem;
    background: #f7f9f7;
    border: 1px solid #e5ebe7;
    border-radius: 0.62rem;
}

.privacy-purpose-grid i {
    grid-row: span 2;
    color: #9b7133;
    font-size: 1rem;
}

.privacy-purpose-grid strong {
    color: #33433a;
    font-size: 0.78rem;
}

.privacy-purpose-grid span {
    margin-top: 0.18rem;
    color: #6a766f;
    font-size: 0.72rem;
    line-height: 1.5;
}

.privacy-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.62rem;
    margin-top: 1rem;
    padding: 0.82rem 0.9rem;
    color: #40594d;
    background: #edf6ef;
    border-left: 3px solid #54a46f;
    border-radius: 0 0.48rem 0.48rem 0;
    font-size: 0.8rem;
    line-height: 1.55;
}

.privacy-tip i {
    color: #247548;
    font-size: 1rem;
}

.privacy-contact-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    gap: 0.7rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0.8rem 0.95rem;
    color: #243a2e;
    background: #fbf7ef;
    border: 1px solid #eadfcb;
    border-radius: 0.65rem;
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.privacy-contact-card>i:first-child {
    display: grid;
    width: 38px;
    height: 38px;
    color: #9a6e2e;
    background: #f6e7c8;
    border-radius: 0.48rem;
    font-size: 1.1rem;
    place-items: center;
}

.privacy-contact-card span {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.privacy-contact-card small {
    color: #7b806f;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.privacy-contact-card strong {
    overflow: hidden;
    color: #3b4a3f;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.privacy-contact-arrow {
    color: #967039;
    font-size: 0.9rem;
}

.privacy-contact-card:hover,
.privacy-contact-card:focus-visible {
    color: #243a2e;
    border-color: #d7b980;
    box-shadow: 0 8px 20px rgb(130 95 42 / 10%);
    outline: 0;
    transform: translateY(-1px);
}

.privacy-legal-note {
    padding: 0.85rem 0.95rem;
    color: #795949 !important;
    background: #fff6f0;
    border-radius: 0.5rem;
    font-size: 0.8rem !important;
}

@media (max-width: 991.98px) {
    .privacy-layout {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .privacy-index {
        position: static;
        padding: 0 0 0.85rem;
        border-bottom: 1px solid #dfe5e0;
        border-left: 0;
    }

    .privacy-index-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem 0.95rem;
    }
}

@media (max-width: 575.98px) {
    .privacy-hero {
        padding: 7.2rem 0 3rem;
    }

    .privacy-hero h1 {
        font-size: 2.25rem;
    }

    .privacy-hero-content>p:not(.privacy-kicker) {
        font-size: 0.92rem;
    }

    .privacy-hero-meta {
        display: grid;
        gap: 0.42rem;
        margin-top: 1.25rem;
        font-size: 0.71rem;
    }

    .privacy-content {
        padding-top: 2.2rem;
        padding-bottom: 3.6rem;
    }

    .privacy-notice {
        padding: 0.85rem;
    }

    .privacy-section {
        padding-bottom: 1.9rem;
        margin-bottom: 1.9rem;
    }

    .privacy-purpose-grid {
        grid-template-columns: 1fr;
    }

    .privacy-section>p {
        font-size: 0.85rem;
    }

    .privacy-contact-card strong {
        font-size: 0.75rem;
    }
}

/* 7. Ficha de propiedad ------------------------------------------------------- */
.detail-page {
    background: var(--blanco);
}

.detail-image {
    width: 100%;
    height: 560px;
    object-fit: cover;
}

.detail-title {
    font-size: 3rem;
}

.detail-code {
    position: static;
    display: inline-block;
    margin-bottom: 0.65rem;
    background: #152b23;
}

.bot-property-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.bot-property-summary img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.35rem;
}

.description {
    color: #57635d;
    line-height: 1.5;
}

.property-description-card {
    display: flex;
    gap: 1.1rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-left: 2px solid var(--gold);
    border-radius: 0.45rem;
    background: var(--blanco);
    box-shadow: none;
}

.property-description-card h2 {
    margin: 0 0 0.5rem;
    color: var(--primario);
    font-size: 1.2rem;
}

.property-description-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    color: var(--blanco);
    background: var(--gold);
    border-radius: 50%;
}

.property-description-card .description {
    line-height: 1.75;
}

.detail-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.detail-features div {
    padding: 1rem;
    background: var(--cream);
}

.detail-features i {
    display: block;
    color: var(--gold);
    font-size: 1rem;
}

.detail-features b,
.detail-features small {
    display: block;
}

.detail-features small {
    color: var(--muted);
    font-size: 0.72rem;
}

/* Jerarquía editorial de la ficha: galería, resumen comercial y contenidos. */
.detail-main {
    min-height: 70vh;
    background: #fbfbfc;
}

.detail-shell {
    max-width: 1240px;
}

.detail-utility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
}

.detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    color: #7b857e;
    font-size: 0.73rem;
    list-style: none;
}

.detail-breadcrumb li+li::before {
    margin-right: 0.35rem;
    color: #afb8b2;
    content: "/";
}

.detail-breadcrumb a {
    color: #53655b;
    text-decoration: none;
}

.detail-breadcrumb a:hover {
    color: var(--secundario);
}

.detail-utility-actions {
    display: inline-flex;
    gap: 0.35rem;
}

.detail-utility-button {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 32px;
    padding: 0.35rem 0.55rem;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 0.3rem;
    background: transparent;
    font-size: 0.7rem;
    font-weight: 700;
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.detail-utility-button:hover {
    color: var(--primario);
    border-color: var(--border);
    background: var(--cream);
}

.detail-top {
    margin-top: 1rem;
}

.detail-gallery-panel {
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--blanco);
    box-shadow: none;
}

.detail-gallery-main {
    overflow: hidden;
    border-radius: 0.32rem;
    background: var(--cream);
}

.detail-gallery-panel #propertyGallery {
    position: relative;
}

.detail-gallery-panel .detail-image {
    height: clamp(360px, 48vw, 600px);
}

.detail-gallery-count {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.58rem;
    color: #fff;
    border: 1px solid rgb(255 255 255 / 23%);
    border-radius: 0.32rem;
    background: rgb(13 16 37 / 78%);
    font-size: 0.7rem;
    font-weight: 700;
}

.detail-gallery-panel .gallery-thumbs {
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding: 0.35rem 0.35rem 0.48rem;
    border-radius: 0.38rem;
    background: var(--cream);
    overscroll-behavior-x: contain;
    scrollbar-color: var(--gold) transparent;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    touch-action: pan-y;
    user-select: none;
}

.detail-gallery-panel .gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.detail-gallery-panel .gallery-thumbs::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgb(13 16 37 / 8%);
}

.detail-gallery-panel .gallery-thumbs::-webkit-scrollbar-thumb {
    border: 1px solid var(--cream);
    border-radius: 999px;
    background: var(--gold);
}

.detail-gallery-panel .gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: var(--secundario);
}

.detail-gallery-panel .gallery-thumbs [data-bs-slide-to] {
    position: relative;
    display: grid;
    flex: 0 0 104px;
    width: 104px;
    height: 74px;
    place-items: center;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 0.24rem;
    background: var(--blanco);
    cursor: pointer;
    opacity: 1;
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.detail-gallery-panel .gallery-thumbs [data-bs-slide-to]::after {
    position: absolute;
    right: auto;
    bottom: 0.45rem;
    left: 0.45rem;
    display: grid;
    width: 1.1rem;
    height: 1.1rem;
    place-items: center;
    color: var(--blanco);
    background: transparent;
    content: attr(data-thumbnail-number);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgb(13 16 37 / 72%);
    pointer-events: none;
}

.detail-gallery-panel .gallery-thumbs [data-bs-slide-to]:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

.detail-gallery-panel .gallery-thumbs [data-bs-slide-to].active {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgb(189 141 68 / 14%);
}

.detail-gallery-panel .gallery-thumbs [data-bs-slide-to].active::after {
    color: var(--gold);
}

.detail-gallery-panel .gallery-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    box-sizing: border-box;
    object-fit: contain;
    background: var(--cream);
}

.detail-summary {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--blanco);
    box-shadow: none;
}

.detail-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-bottom: 0.7rem;
}

.detail-operation,
.detail-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.22rem 0.46rem;
    border-radius: 0.22rem;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detail-operation {
    color: #174c3a;
    background: #e3f1e8;
}

.detail-status {
    color: #48534c;
    background: #edf1ee;
}

.detail-status.vendida {
    color: #a13c47;
    background: #fbe8eb;
}

.detail-status.alquilada {
    color: #805719;
    background: #fcf0d9;
}

.detail-property-header .eyebrow {
    margin-bottom: 0.38rem !important;
    font-size: 0.67rem;
}

.detail-property-header .detail-code {
    margin: 0;
    padding: 0.3rem 0.5rem;
    color: #eef5f0;
    border-radius: 0.26rem;
    background: #31433a;
    font-size: 0.67rem;
}

.detail-property-header {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-property-header--page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(160px, 0.65fr) minmax(230px,
            0.86fr);
    grid-template-areas:
        "reference reference price"
        "tags tags price"
        "title title price"
        "location location price"
        "dates dates price";
    column-gap: 0.9rem;
    row-gap: 0.18rem;
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--blanco);
    box-shadow: none;
}

.detail-property-header--page::after {
    display: none;
}

.detail-property-header--page>* {
    position: relative;
    z-index: 1;
}

.detail-property-header--page .detail-summary-tags {
    grid-area: tags;
    align-self: start;
    margin: 0.28rem 0 0.1rem;
}

.detail-property-header--page .detail-type-reference {
    grid-area: reference;
    margin: 0;
}

.detail-property-header--page .detail-title {
    grid-area: title;
    align-self: end;
}

.detail-property-header--page .location {
    grid-area: location;
    align-self: start;
}

.detail-property-header--page .detail-price-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    grid-area: price;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    gap: .58rem;
    min-height: 146px;
    padding: .95rem .85rem;
    margin-top: 0;
    text-align: center;
}

.detail-price-value {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.detail-property-header--page .detail-price-value>span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    letter-spacing: .09em;
}

.detail-property-header--page .detail-price-value>span::before,
.detail-property-header--page .detail-price-value>span::after {
    width: 14px;
    height: 1px;
    background: currentColor;
    content: "";
    opacity: .35;
}

.detail-property-header--page > .detail-date-list {
    display: flex;
    flex-wrap: nowrap;
    grid-area: dates;
    align-items: center;
    width: 100% !important;
    gap: .55rem;
    margin-top: .15rem;
    padding: 0;
    border: 0;
}

.detail-property-header--page > .detail-date-list>span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    width: auto !important;
    flex: 0 0 auto;
    gap: .28rem;
}

.detail-type-reference {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.82rem;
}

.detail-type-reference::before {
    color: var(--muted);
    content: "Código";
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.detail-property-header--page .detail-code {
    padding: 0.34rem 0.56rem;
    box-shadow: none;
}

.detail-property-header--page .detail-operation,
.detail-property-header--page .detail-status,
.detail-property-header--page .detail-property-type {
    min-height: 25px;
    border-radius: 999px;
    box-shadow: none;
}

.detail-property-header--page .detail-operation {
    color: var(--muted);
    background: var(--cream);
}

.detail-property-header--page .detail-property-type {
    color: var(--primario);
    border-color: var(--border);
    background: var(--cream);
}

.detail-property-header--page .detail-status:not(.vendida):not(.alquilada) {
    color: var(--muted);
    background: var(--cream);
}

.detail-property-type {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.22rem 0.46rem;
    color: #4c5d52;
    border: 1px solid #dce6df;
    border-radius: 0.22rem;
    background: #f7faf7;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detail-property-header .detail-title {
    margin: 0;
    color: var(--primario);
    font-size: clamp(1.55rem, 2.25vw, 2.16rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.13;
}

.detail-property-header--page .detail-title::after {
    display: none;
}

.detail-property-header .location {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0.34rem 0 0;
    padding: 0;
    color: var(--muted);
    border-left: 0;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
}

.detail-property-header .location i {
    flex: 0 0 auto;
    padding: 0;
    color: var(--gold);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1rem;
}

.detail-property-header .location span {
    min-width: 0;
}

.detail-property-header .location small {
    display: block;
    margin-bottom: 0.08rem;
    color: var(--muted);
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-property-header .price {
    margin: 0;
    color: #12231a;
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    font-weight: 800;
    line-height: 1.05;
}

.detail-price-panel {
    margin-top: 0.88rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid #ecdfc9;
    border-left: 4px solid #b3823f;
    background: linear-gradient(90deg, #faf4e8 0%, #fffdf9 100%);
    box-shadow: 0 4px 12px rgb(100 76 35 / 6%);
}

.detail-property-header--page .detail-price-panel {
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 0.35rem;
    background: var(--cream);
    box-shadow: none;
}

.detail-price-value>span {
    display: block;
    margin-bottom: 0.2rem;
    color: #69746d;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.detail-property-header--page .detail-price-value>span {
    color: var(--muted);
}

.detail-property-header--page .detail-price-panel .price {
    color: var(--primario);
    font-size: clamp(1.7rem, 2.25vw, 2.15rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.04em;
    line-height: 1;
}

.detail-date-list {
    display: grid;
    width: 50% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.72rem;


}

.detail-date-list>span {
    display: grid;
    width: 50% !important;
    place-items: center start;
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon label" "icon value";
    column-gap: 0.42rem;
    padding: 0.38rem 0.44rem;
    border: 1px solid var(--border);
    background: var(--blanco);
    margin-top: 0;
    
}

.detail-date-list>span:only-child {
    grid-column: 1 / -1;
}

.detail-date-list i {
    grid-area: icon;
    align-self: center;
    color: #b3823f;
    font-size: 0.8rem;
}

.detail-date-list small {
    grid-area: label;
    color: #748078;
    font-size: 0.59rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.detail-date-list strong {
    grid-area: value;
    color: #344139;
    font-size: 0.7rem;
    line-height: 1.25;
}

.detail-property-header--page .detail-date-list>span {
    padding: .12rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.detail-property-header--page .detail-date-list i {
    color: var(--muted);
    font-size: .68rem;
}

.detail-property-header--page .detail-date-list small {
    color: var(--muted);
    font-size: .54rem;
}

.detail-property-header--page .detail-date-list strong {
    color: var(--muted);
    font-size: .64rem;
    font-weight: 600;
}

.detail-summary>.small {
    padding-top: 0.75rem;
    border-top: 1px solid #edf0ed;
    font-size: 0.71rem;
    line-height: 1.55;
}

.detail-summary .detail-features {
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.35rem;
}

.detail-summary .detail-features div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 70px;
    padding: 0.58rem 0.5rem;
    background: var(--blanco);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.detail-summary .detail-features div:nth-child(3n) {
    border-right: 0;
}

.detail-summary .detail-features div:nth-child(n + 4) {
    border-bottom: 0;
}

.detail-summary .detail-features i {
    margin-bottom: 0.25rem;
    color: var(--gold);
    font-size: 0.9rem;
}

.detail-summary .detail-features b {
    color: var(--primario);
    font-size: 0.82rem;
}

.detail-summary .detail-features small {
    margin-top: 0.08rem;
    font-size: 0.61rem;
}

.detail-contact-actions {
    margin-top: 0.75rem;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: var(--cream);
}

.detail-contact-actions>p {
    margin: 0 0 0.65rem;
    color: var(--primario);
    font-size: 0.8rem;
    font-weight: 800;
}

.detail-contact-actions>p i {
    color: var(--gold);
}

.detail-inline-lead-form {
    display: grid;
    gap: 0.52rem;
}

.detail-inline-lead-form label {
    display: block;
    margin: 0 0 0.2rem;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
}

.detail-inline-lead-form .form-control {
    min-height: 35px;
    padding: 0.38rem 0.55rem;
    border-color: var(--border);
    border-radius: 0.28rem;
    background: var(--blanco);
    font-size: 0.75rem;
}

.detail-inline-lead-form textarea.form-control {
    min-height: 54px;
    resize: vertical;
}

.detail-inline-lead-form .btn {
    margin-top: 0.12rem;
    min-height: 39px;
    font-size: 0.76rem;
}

.detail-contact-print {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.2rem;
    color: #67756c;
    border: 0;
    background: transparent;
    font-size: 0.7rem;
    font-weight: 700;
}

.detail-contact-print:hover {
    color: var(--primario);
    text-decoration: underline;
}

.detail-section-nav {
    display: flex;
    gap: 0.35rem;
    margin-top: 1.6rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
}

.detail-section-nav a {
    padding: 0.3rem 0.5rem;
    color: var(--muted);
    border-radius: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.detail-section-nav a:hover {
    color: var(--primario);
    background: var(--cream);
}

.detail-content-section {
    scroll-margin-top: 1.2rem;
}

.detail-content-section h2 {
    color: var(--primario);
    font-size: clamp(1.28rem, 2vw, 1.65rem);
}

.detail-content-section .ratio {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    box-shadow: none;
}

@media (min-width: 1200px) {

    .detail-section-nav,
    .detail-content-section {
        width: calc(66.666667% - 0.8rem);
    }
}

@media (max-width: 1199.98px) {
    .detail-summary {
        position: static;
    }

    .detail-property-header--page {
        grid-template-columns: minmax(0, 1fr) minmax(235px, 0.58fr);
        grid-template-areas:
            "reference price"
            "tags price"
            "title price"
            "location price"
            "dates dates";
    }
}

@media (max-width: 767.98px) {
    .detail-utility-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-utility-actions {
        align-self: flex-end;
    }

    .detail-property-header--page {
        display: block;
        margin-bottom: 1rem;
        padding: 0.8rem;
    }

    .detail-property-header--page .detail-type-reference {
        margin-top: 0;
    }

    .detail-property-header--page .detail-summary-tags {
        margin-top: 0.42rem;
    }

    .detail-property-header--page .detail-title {
        margin-top: 0.48rem;
    }

    .detail-property-header--page .detail-price-panel {
        margin-top: 0.55rem;
        min-height: 0;
        gap: .45rem;
    }

    .detail-gallery-panel {
        padding: 0.35rem;
    }

    .detail-gallery-panel .detail-image {
        height: min(68vw, 440px);
    }

    .detail-summary {
        padding: 1rem;
    }

    .detail-summary .detail-features {
        margin-right: 0;
        margin-left: 0;
    }

    .detail-summary .detail-features div {
        min-height: 70px;
    }

    .detail-gallery-count {
        left: 0.65rem;
        bottom: 0.65rem;
    }
}

.gallery-thumbs {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.gallery-thumbs button {
    padding: 0;
    background: none;
    border: 2px solid transparent;
}

.gallery-thumbs button.active {
    border-color: var(--gold);
}

.gallery-thumbs img {
    display: block;
    width: 86px;
    height: 62px;
    object-fit: cover;
}

/* 8. Administración ----------------------------------------------------------- */
.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0, rgb(63 81 255 / 6%), transparent 26rem),
        #f5f7f6;
}

.admin-header {
    padding: 1rem 0;
}

.admin-card {
    padding: 1.8rem;
    background: var(--blanco);
    border: 1px solid #e8ece8;
    border-radius: 0.7rem;
    box-shadow: var(--shadow);
}

/* El modal de usuarios conserva la estética de la tarjeta Crear usuario. */
.users-edit-modal .modal-content {
    padding: 1.8rem;
    background: var(--blanco);
    border: 1px solid #e8ece8 !important;
    border-radius: 0.65rem;
    box-shadow: var(--shadow) !important;
}

.users-edit-modal .modal-header,
.users-edit-modal .modal-body,
.users-edit-modal .modal-footer {
    padding-right: 0;
    padding-left: 0;
}

.users-edit-modal .modal-body {
    padding-top: 1rem !important;
    padding-bottom: 1rem;
}

.users-edit-modal .modal-footer {
    padding-bottom: 0;
}

.admin-card h1 {
    font-size: 2rem;
}

/* Marco compartido de gestión: se adapta según el rol del usuario. */
.app-shell-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0;
    color: var(--blanco);
    background: linear-gradient(110deg, #0d1025 0%, #171f50 56%, #3f51ff 150%);
    box-shadow: 0 5px 20px rgb(13 16 37 / 18%);
}

.app-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 72px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    color: var(--blanco);
    text-decoration: none;
}

.app-brand img {
    display: block;
    width: auto;
    max-width: 164px;
    max-height: 38px;
    object-fit: contain;
}

.app-brand>span {
    padding-left: 0.85rem;
    color: rgb(255 255 255 / 68%);
    border-left: 1px solid rgb(255 255 255 / 20%);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.app-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.app-site-link,
.app-theme-toggle,
.app-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    color: rgb(255 255 255 / 88%);
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 0.42rem;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    background: transparent;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.app-site-link:hover,
.app-theme-toggle:hover,
.app-logout:hover {
    color: var(--blanco);
    background: rgb(255 255 255 / 12%);
    border-color: rgb(255 255 255 / 38%);
}

.app-logout {
    color: #242a50;
    background: var(--blanco);
    border-color: var(--blanco);
}

.app-logout:hover {
    color: #242a50;
    background: #eef0ff;
    border-color: #eef0ff;
}

.app-user-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.app-user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    color: #42300f;
    background: #f0c878;
    border-radius: 50%;
    font-size: 0.77rem;
    font-weight: 700;
    place-items: center;
}

.app-user-info {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.app-user-info strong,
.app-user-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-info strong {
    max-width: 170px;
    color: var(--blanco);
    font-size: 0.76rem;
}

.app-user-info small {
    color: rgb(255 255 255 / 65%);
    font-size: 0.66rem;
}

.app-nav-wrap {
    border-top: 1px solid rgb(255 255 255 / 12%);
    background: rgb(0 0 0 / 10%);
}

.app-nav {
    display: flex;
    align-items: stretch;
    gap: 0.2rem;
    min-height: 48px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.app-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.46rem;
    min-height: 48px;
    padding: 0.7rem 0.75rem;
    color: rgb(255 255 255 / 72%);
    border-bottom: 2px solid transparent;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.app-nav-link:hover {
    color: var(--blanco);
    background: rgb(255 255 255 / 8%);
}

.app-nav-link.is-active {
    color: var(--blanco);
    background: rgb(255 255 255 / 10%);
    border-bottom-color: #f0c878;
}

/* Presencia persistente: el equipo conectado se ve desde cualquier módulo. */
.app-presence-wrap {
    border-top: 1px solid rgb(255 255 255 / 10%);
    background: rgb(4 8 29 / 22%);
}

.app-presence {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 52px;
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
}

.app-presence-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    color: rgb(255 255 255 / 92%);
    font-size: 0.72rem;
    white-space: nowrap;
}

.app-presence-label strong {
    font-size: 0.74rem;
}

.app-presence-label small {
    padding-left: 0.45rem;
    color: rgb(255 255 255 / 64%);
    border-left: 1px solid rgb(255 255 255 / 22%);
    font-size: 0.67rem;
}

.app-presence-pulse {
    width: 0.56rem;
    height: 0.56rem;
    border-radius: 50%;
    background: #67d596;
    box-shadow: 0 0 0 0.22rem rgb(103 213 150 / 14%);
    animation: app-presence-pulse 2.4s ease-in-out infinite;
}

.app-presence-list {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    overflow-x: auto;
    padding: 0.12rem 0;
    scrollbar-width: thin;
}

.app-online-user {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.26rem 0.55rem 0.26rem 0.3rem;
    color: rgb(255 255 255 / 94%);
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 999px;
    background: rgb(255 255 255 / 7%);
    white-space: nowrap;
}

.app-online-avatar {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: #163229;
    border: 2px solid rgb(103 213 150 / 72%);
    border-radius: 50%;
    background: #d9f5e5;
    font-size: 0.62rem;
    font-weight: 800;
    place-items: center;
}

.app-online-user>span:last-child {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.app-online-user strong,
.app-online-user small {
    overflow: hidden;
    max-width: 142px;
    text-overflow: ellipsis;
}

.app-online-user strong {
    font-size: 0.68rem;
}

.app-online-user small {
    margin-top: 0.1rem;
    color: rgb(255 255 255 / 64%);
    font-size: 0.58rem;
}

.app-online-empty {
    color: rgb(255 255 255 / 67%);
    font-size: 0.68rem;
    white-space: nowrap;
}

@keyframes app-presence-pulse {
    50% {
        box-shadow: 0 0 0 0.42rem rgb(103 213 150 / 2%);
    }
}

.admin-page .admin-card {
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.admin-page .admin-card:hover {
    border-color: #dce3de;
    box-shadow: 0 8px 24px rgb(23 37 28 / 7%);
}

.admin-page .form-control,
.admin-page .form-select {
    min-height: 43px;
    border-color: #dce2dd;
    border-radius: 0.42rem;
    color: var(--primario);
    font-size: 0.88rem;
}

.admin-page textarea.form-control {
    min-height: auto;
}

.admin-page .form-control:focus,
.admin-page .form-select:focus {
    border-color: var(--secundario);
    box-shadow: 0 0 0 0.2rem rgb(63 81 255 / 12%);
}

.admin-page .form-check-input:checked {
    background-color: var(--secundario);
    border-color: var(--secundario);
}

.admin-page .table-responsive {
    scrollbar-color: #cbd3ce transparent;
}

.admin-page .table> :not(caption)>*>* {
    border-color: #edf0ed;
}

.admin-page .table tbody tr {
    transition: background 0.16s ease;
}

.admin-page .table tbody tr:hover {
    background: #fafcfb;
}

/* Bandeja unificada de formularios públicos. */
.web-forms-panel {
    overflow: hidden;
}

.web-forms-total {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0.5rem 0.85rem;
    color: var(--primario);
    background: var(--cream);
    border: 1px solid #e7e3db;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.web-forms-total i {
    color: var(--secundario);
    font-size: 1rem;
}

.web-form-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 84px;
    padding: 1rem;
    border-radius: 0.55rem;
}

.web-form-stat>i {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    font-size: 1.05rem;
    place-items: center;
}

.web-form-stat span,
.web-form-stat strong {
    display: block;
}

.web-form-stat span {
    margin-bottom: 0.12rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.web-form-stat strong {
    font-size: 1.5rem;
    line-height: 1;
}

.web-form-contact {
    color: #075e9a;
    background: #e8f4ff;
}

.web-form-contact>i {
    color: #075e9a;
    background: #cfeaff;
}

.web-form-job {
    color: #6f4b0c;
    background: #fff4d8;
}

.web-form-job>i {
    color: #6f4b0c;
    background: #ffe8b0;
}

.web-form-claim {
    color: #8a3535;
    background: #fff0f0;
}

.web-form-claim>i {
    color: #8a3535;
    background: #ffdada;
}

.web-forms-table-wrap {
    margin: 0 -1.8rem -1.8rem;
    border-top: 1px solid #e9eeea;
}

.web-forms-table th {
    padding: 0.85rem 1rem;
    color: #66716a;
    background: #f7f9f7;
    border-bottom: 1px solid #e5eae5;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.web-forms-table td {
    padding: 1rem;
    font-size: 0.82rem;
    vertical-align: middle;
}

.web-forms-table td>strong,
.web-forms-table td>small,
.web-forms-table time,
.web-forms-table time small {
    display: block;
}

.web-forms-table td>small,
.web-forms-table td>small a,
.web-forms-table time small {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.55;
    text-decoration: none;
}

.web-forms-table td>small a:hover {
    color: var(--secundario);
    text-decoration: underline;
}

.web-form-source {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.36rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.web-form-source.is-contact {
    color: #075e9a;
    background: #e8f4ff;
}

.web-form-source.is-job {
    color: #6f4b0c;
    background: #fff4d8;
}

.web-form-source.is-claim {
    color: #8a3535;
    background: #fff0f0;
}

.web-form-message {
    min-width: 260px;
    max-width: 430px;
}

.web-form-message>span {
    display: -webkit-box;
    overflow: hidden;
    color: #3d4741;
    line-height: 1.55;
    -webkit-box-orient: vertical;
}

.web-form-message>small {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.71rem;
    line-height: 1.55;
}

.web-form-message>small b {
    color: #58625c;
}

.web-forms-empty {
    padding: 4rem 1rem !important;
    color: var(--muted) !important;
    background: #fcfdfc;
    text-align: center;
}

.web-forms-empty i,
.web-forms-empty span {
    display: block;
}

.web-forms-empty i {
    margin-bottom: 0.65rem;
    color: var(--gold);
    font-size: 1.7rem;
}

@media (max-width: 767px) {
    .app-header-main {
        min-height: 62px;
        gap: 0.65rem;
    }

    .app-brand img {
        max-width: 136px;
        max-height: 32px;
    }

    .app-brand>span,
    .app-site-link span,
    .app-theme-toggle span,
    .app-user-info,
    .app-logout span {
        display: none;
    }

    .app-header-actions {
        gap: 0.35rem;
    }

    .app-site-link,
    .app-theme-toggle,
    .app-logout {
        width: 34px;
        min-height: 34px;
        padding: 0.4rem;
        justify-content: center;
    }

    .app-user-avatar {
        width: 32px;
        height: 32px;
    }

    .app-nav-link {
        min-height: 45px;
        padding: 0.65rem 0.7rem;
        font-size: 0.73rem;
    }

    .app-presence {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.38rem;
        min-height: 0;
        padding-top: 0.55rem;
        padding-bottom: 0.6rem;
    }

    .app-presence-list {
        width: 100%;
        padding-bottom: 0.18rem;
    }

    .admin-page>main.container,
    .admin-page>main.container-fluid {
        padding-top: 1.75rem !important;
        padding-bottom: 2.5rem !important;
    }

    .web-forms-table-wrap {
        margin-right: -1.25rem;
        margin-bottom: -1.25rem;
        margin-left: -1.25rem;
    }
}

.admin-notifications {
    padding: 1.25rem;
    background: var(--blanco);
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    box-shadow: var(--shadow);
}

.admin-notifications .row>[class*="col-"] {
    display: flex;
}

.notification-card {
    display: flex;
    width: 100%;
    min-height: 104px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    color: var(--primario);
    border-radius: 0.5rem;
    text-decoration: none;
}

.notification-card i {
    font-size: 1.8rem;
}

.notification-card strong,
.notification-card span {
    display: block;
}

.notification-card strong {
    font-size: 1.6rem;
    line-height: 1;
}

.notification-card span {
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

.notification-leads {
    background: #e8f4ff;
    color: #075e9a;
}

.notification-new {
    background: #e8f7ee;
    color: #1e6337;
}

.notification-update {
    background: #fff4d8;
    color: #7a5200;
}

.recent-notifications {
    display: grid;
    gap: 0.45rem;
}

.recent-notifications a {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    color: var(--primario);
    background: #fafafa;
    border-radius: 0.35rem;
    text-decoration: none;
    font-size: 0.88rem;
}

.recent-notifications a:hover {
    background: #f1f4f8;
}

.recent-notifications small {
    margin-left: auto;
    color: var(--muted);
    white-space: nowrap;
}

.admin-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    overflow-x: hidden;
    background:
        radial-gradient(circle at 14% 12%, rgb(76 90 255 / 42%), transparent 28rem),
        linear-gradient(135deg, rgb(8 12 33 / 91%), rgb(29 37 73 / 88%)),
        url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1200") center / cover;
    place-items: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    padding: 2.35rem;
    color: #f5f7ff;
    background: linear-gradient(145deg, rgb(18 27 60 / 94%), rgb(10 16 39 / 94%));
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 1rem;
    box-shadow: 0 24px 70px rgb(0 0 0 / 32%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-brand {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 2rem;
    border-radius: 0.55rem;
    -webkit-tap-highlight-color: transparent;
}

.login-brand img {
    display: block;
    width: min(220px, 100%);
    height: auto;
}

.login-intro {
    margin-bottom: 1.8rem;
}

.login-kicker {
    margin: 0 0 0.55rem;
    color: #f0c878;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.3;
}

.login-box h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.45rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.login-box h1 span {
    color: #f0c878;
}

.login-intro>p:last-child {
    max-width: 310px;
    margin: 0.95rem 0 0;
    color: rgb(233 238 255 / 72%);
    font-size: 0.86rem;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-field {
    display: grid;
    gap: 0.42rem;
}

.login-form .form-label {
    margin: 0;
    color: #dbe2ff;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.login-input {
    position: relative;
}

.login-input>i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    z-index: 1;
    color: #9da8dc;
    font-size: 0.9rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.login-input .form-control {
    min-height: 48px;
    padding: 0.72rem 0.85rem 0.72rem 2.45rem;
    color: #f7f9ff;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 0.55rem;
    font-size: 1rem;
    box-shadow: none;
}

.login-input .form-control::placeholder {
    color: #9da8b9;
}

.login-input .form-control:focus {
    color: #fff;
    background: rgb(255 255 255 / 12%);
    border-color: #aeb9ff;
    box-shadow: 0 0 0 0.2rem rgb(129 144 255 / 18%);
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    margin-top: 0.35rem;
    padding: 0.7rem 1rem;
    color: #1b2049;
    background: #f0c878;
    border: 1px solid #f0c878;
    border-radius: 0.55rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.login-submit:hover,
.login-submit:focus-visible {
    color: #1b2049;
    background: #f8d996;
    border-color: #f8d996;
    box-shadow: 0 8px 20px rgb(240 200 120 / 20%);
    transform: translateY(-1px);
}

.login-submit i {
    font-size: 1rem;
}

.login-alert {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.55rem;
    font-size: 0.82rem;
}

.login-footer {
    margin: 1.35rem 0 0;
    color: rgb(220 227 255 / 55%);
    font-size: 0.7rem;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 480px) {
    .admin-login {
        align-items: center;
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .login-box {
        padding: 1.65rem 1.25rem;
        border-radius: 0.85rem;
    }

    .login-brand {
        margin-bottom: 1.35rem;
    }

    .login-brand img {
        width: min(190px, 100%);
    }

    .login-intro {
        margin-bottom: 1.45rem;
    }

    .login-box h1 {
        font-size: clamp(1.9rem, 10vw, 2.25rem);
    }

    .login-intro>p:last-child {
        margin-top: 0.75rem;
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .login-form {
        gap: 0.9rem;
    }

    .login-footer {
        margin-top: 1.1rem;
    }
}

/* Objetivos táctiles cómodos y texto que evita el zoom automático de iOS. */
@media (hover: none), (pointer: coarse) {
    .login-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.2rem 0.45rem;
    }

    .login-input .form-control,
    .login-submit {
        min-height: 52px;
    }

    .login-input .form-control {
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        font-size: 1rem;
    }

    .login-submit:hover {
        color: #1b2049;
        background: #f0c878;
        border-color: #f0c878;
        box-shadow: none;
        transform: none;
    }

    .login-submit:active {
        color: #1b2049;
        background: #f8d996;
        border-color: #f8d996;
        transform: scale(0.985);
    }
}

/* En teléfonos bajos mantiene visibles los campos y el botón sin recortes. */
@media (max-width: 480px) and (max-height: 720px) {
    .login-box {
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
    }

    .login-brand {
        margin-bottom: 0.85rem;
    }

    .login-brand img {
        width: 158px;
    }

    .login-intro {
        margin-bottom: 1rem;
    }

    .login-intro>p:last-child {
        display: none;
    }

    .login-footer {
        margin-top: 0.8rem;
    }
}

.table th {
    color: #77817b;
    background: #f8f9f7;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.table td small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
}

.property-cover-thumb {
    width: 68px;
    height: 52px;
    object-fit: cover;
    border-radius: 0.35rem;
    background: #edf0ed;
}

/* Controles para ordenar manualmente la prioridad del catálogo. */
.catalog-order-cell {
    width: 3.75rem;
    min-width: 3.75rem;
    padding: 0.45rem 0.35rem !important;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.catalog-order-heading {
    width: 3.75rem;
    min-width: 3.75rem;
    padding-right: 0.35rem !important;
    padding-left: 0.35rem !important;
    text-align: center;
    white-space: nowrap;
}

.catalog-order-number {
    display: inline-grid;
    width: 1.9rem;
    height: 1.9rem;
    place-items: center;
    padding: 0;
    color: #365244;
    background: linear-gradient(145deg, #f4f8f5, #e3ece6);
    border: 1px solid rgba(54, 82, 68, 0.12);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(28, 55, 40, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

/* Inventario de propiedades: filas densas y legibles en el panel. */
.property-inventory-card {
    overflow-x: auto;
    overflow-y: hidden;
}

.property-inventory-table {
    min-width: 52rem;
    table-layout: auto;
}

.property-inventory-table> :not(caption)>*>* {
    padding: 0.44rem 0.46rem;
    vertical-align: middle;
}

.property-inventory-table thead th {
    color: #667169;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid #cbd6cf !important;
}

.property-inventory-table tbody td:not(.property-info-cell) {
    white-space: nowrap;
}

.property-inventory-table tbody tr:not(:last-child)>* {
    border-bottom: 1px solid #d1dbd4 !important;
}

.property-inventory-table .property-cover-thumb {
    width: 54px;
    height: 42px;
    border-radius: 0.32rem;
}

.property-info-cell {
    min-width: 12.5rem;
    max-width: 16rem;
}

.property-info-cell .property-modal-trigger {
    width: 100%;
}

.property-list-title {
    font-size: 0.8rem;
    line-height: 1.25;
}

.property-list-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    margin-top: 0.18rem;
    color: #6c786f;
    font-size: 0.66rem;
    line-height: 1.2;
    white-space: nowrap;
}

.property-list-code {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.18rem;
    padding: 0.17rem 0.32rem;
    color: #edf2f5;
    background: #53616c;
    border-radius: 0.22rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.property-list-location {
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-inventory-table .status-pill {
    display: inline-flex;
    padding: 0.24rem 0.4rem;
    font-size: 0.65rem;
    line-height: 1.15;
}

.property-agent-cell small,
.property-date-cell small {
    margin-top: 0;
    color: #58655d;
    font-size: 0.68rem;
    line-height: 1.3;
}

.property-date-value {
    display: block;
    padding-left: 1.05rem;
    font-weight: 700;
}

.property-inventory-actions {
    width: 6.45rem;
    padding-right: 0.55rem !important;
    white-space: nowrap;
}

.property-inventory-actions .btn {
    display: inline-grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
}

.property-inventory-actions .btn.ms-1 {
    margin-left: 0.2rem !important;
}

@media (max-width: 767.98px) {
    .property-inventory-card {
        overflow: visible;
    }

    .property-inventory-heading {
        padding: 1rem !important;
    }

    .property-inventory-heading h2 {
        font-size: 1.25rem;
    }

    .property-inventory-filters {
        padding: 0 1rem 1rem !important;
    }

    .property-inventory-table {
        display: block;
        min-width: 0;
    }

    .property-inventory-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .property-inventory-table tbody {
        display: grid;
        gap: 0.55rem;
        padding: 0.55rem;
    }

    .property-inventory-table tbody tr {
        display: grid;
        grid-template-columns: 2.25rem 3.25rem minmax(0, 1fr) minmax(0, 1fr) auto;
        grid-template-areas:
            "order cover property property actions"
            "order cover status visibility actions"
            "order cover agent date actions";
        gap: 0.2rem 0.36rem;
        align-items: center;
        padding: 0.42rem;
        border: 1px solid #d0dbd4;
        border-radius: 0.55rem;
        box-shadow: 0 2px 8px rgb(35 58 43 / 6%);
    }

    .property-inventory-table tbody tr>* {
        display: block;
        min-width: 0;
        padding: 0 !important;
        background: transparent !important;
        border: 0;
    }

    .property-inventory-table tbody tr.property-row-sold,
    .property-inventory-table tbody tr.property-row-rented,
    .property-inventory-table tbody tr.property-row-hidden {
        border-left-width: 4px;
    }

    .property-inventory-table .catalog-order-cell {
        grid-area: order;
        width: auto;
        min-width: 0;
        align-self: stretch;
        display: grid;
        place-items: center;
    }

    .property-inventory-table .catalog-order-number {
        width: 1.7rem;
        height: 1.7rem;
        font-size: 0.7rem;
    }

    .property-cover-cell {
        grid-area: cover;
        align-self: stretch;
        display: grid !important;
        place-items: center;
    }

    .property-inventory-table .property-cover-thumb {
        width: 48px;
        height: 48px;
    }

    .property-info-cell {
        grid-area: property;
        max-width: none;
        min-width: 0;
    }

    .property-list-title {
        font-size: 0.74rem;
    }

    .property-list-meta {
        gap: 0.25rem;
        font-size: 0.61rem;
    }

    .property-list-code {
        padding: 0.14rem 0.25rem;
        font-size: 0.57rem;
    }

    .property-status-cell {
        grid-area: status;
    }

    .property-visibility-cell {
        grid-area: visibility;
    }

    .property-agent-cell {
        grid-area: agent;
    }

    .property-date-cell {
        grid-area: date;
    }

    .property-agent-cell small,
    .property-date-cell small {
        display: block;
        overflow: hidden;
        margin: 0;
        font-size: 0.61rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .property-date-value {
        display: inline;
        padding-left: 0.18rem;
    }

    .property-inventory-table .status-pill {
        padding: 0.2rem 0.3rem;
        font-size: 0.59rem;
    }

    .property-inventory-actions {
        grid-area: actions;
        align-self: center;
        width: auto;
        padding: 0 !important;
    }

    .property-inventory-actions .btn {
        width: 25px;
        height: 25px;
        font-size: 0.72rem;
    }
}

@media (max-width: 420px) {
    .property-inventory-table tbody {
        padding: 0.42rem;
    }

    .property-inventory-table tbody tr {
        grid-template-columns: 1.9rem 2.85rem minmax(0, 1fr) minmax(0, 0.9fr) auto;
        gap: 0.18rem 0.25rem;
        padding: 0.34rem;
    }

    .property-inventory-table .property-cover-thumb {
        width: 42px;
        height: 42px;
    }

    .property-inventory-actions .btn {
        width: 23px;
        height: 23px;
    }

    .property-inventory-actions .btn.ms-1 {
        margin-left: 0.1rem !important;
    }
}

/* Organizador visual de propiedades: arrastre en escritorio y botones táctiles. */
.catalog-sort-list {
    display: grid;
    gap: 0.55rem;
    max-height: min(56vh, 34rem);
    padding: 0 0.32rem 0 0;
    margin: 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #b5c1b9 transparent;
    scrollbar-width: thin;
}

.catalog-sort-list::-webkit-scrollbar {
    width: 0.5rem;
}

.catalog-sort-list::-webkit-scrollbar-track {
    background: transparent;
}

.catalog-sort-list::-webkit-scrollbar-thumb {
    background: #b5c1b9;
    border: 0.12rem solid transparent;
    border-radius: 1rem;
    background-clip: padding-box;
}

.catalog-sort-item {
    display: grid;
    grid-template-columns: auto 3rem minmax(0, 1fr) auto auto;
    gap: 0.65rem;
    align-items: center;
    min-height: 4.1rem;
    padding: 0.5rem 0.55rem;
    color: #2c3d34;
    background: #f8faf8;
    border: 1px solid #e2e8e3;
    border-radius: 0.65rem;
    cursor: grab;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.catalog-sort-item:hover,
.catalog-sort-item:focus-within {
    border-color: rgb(199 151 85 / 56%);
    box-shadow: 0 0.35rem 0.85rem rgb(26 42 31 / 7%);
}

.catalog-sort-item.is-featured {
    background: linear-gradient(100deg, #fffaf0, #f8faf8 68%);
    border-color: rgb(199 151 85 / 58%);
    box-shadow: inset 0.22rem 0 0 #c79755;
}

.catalog-sort-item.is-dragging {
    opacity: 0.42;
    cursor: grabbing;
}

.catalog-sort-handle {
    display: grid;
    width: 1.45rem;
    height: 2.4rem;
    color: #a3aea6;
    font-size: 1.15rem;
    place-items: center;
}

.catalog-sort-item>img {
    display: block;
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.42rem;
    background: #e7ece8;
}

.catalog-sort-info {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
}

.catalog-sort-info strong,
.catalog-sort-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-sort-info strong {
    color: #263b2e;
    font-size: 0.88rem;
}

.catalog-sort-featured {
    display: inline-flex;
    gap: 0.22rem;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.16rem 0.36rem;
    color: #7d591e;
    background: #f9e6b8;
    border-radius: 0.25rem;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: middle;
}

.catalog-sort-info small {
    color: #78857d;
    font-size: 0.72rem;
}

.catalog-sort-position {
    min-width: 2.45rem;
    color: #65746a;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.catalog-sort-actions {
    display: flex;
    gap: 0.25rem;
}

.catalog-sort-actions .btn {
    display: grid;
    width: 2rem;
    min-height: 2rem;
    padding: 0;
    place-items: center;
}

.catalog-sort-actions .btn:disabled {
    opacity: 0.34;
}

@media (max-width: 575.98px) {
    .catalog-sort-list {
        max-height: 53vh;
    }

    .catalog-sort-item {
        grid-template-columns: 2.6rem minmax(0, 1fr) auto;
        gap: 0.5rem;
    }

    .catalog-sort-handle {
        display: none;
    }

    .catalog-sort-item>img {
        width: 2.6rem;
        height: 2.6rem;
    }

    .catalog-sort-position {
        grid-column: 2;
        justify-self: start;
        min-width: auto;
        font-size: 0.7rem;
    }

    .catalog-sort-actions {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }
}

.property-modal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    max-width: 100%;
    padding: 0;
    color: var(--primario);
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.property-modal-trigger strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-modal-trigger i {
    flex: 0 0 auto;
    color: var(--green);
    font-size: 0.78rem;
    opacity: 0.72;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}

.property-modal-trigger:hover,
.property-modal-trigger:focus-visible {
    color: var(--gold);
    outline: 0;
}

.property-modal-trigger:hover i,
.property-modal-trigger:focus-visible i {
    opacity: 1;
    transform: translate(1px, -1px);
}

.property-modal-trigger:focus-visible {
    box-shadow: 0 0 0 0.18rem rgb(63 81 255 / 20%);
    border-radius: 0.2rem;
}

.property-modal-code {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.5rem;
    color: #e7edf9;
    background: #4d5b68;
    border-radius: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.property-modal-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.55rem;
    background: #edf0ed;
}

.property-modal-price {
    display: grid;
    gap: 0.15rem;
    margin: 0.5rem 0 0.7rem;
    padding: 0.62rem 0.72rem;
    background: #f3f6f4;
    border-left: 3px solid var(--gold);
    border-radius: 0 0.45rem 0.45rem 0;
}

.property-modal-price span,
.property-modal-specs span,
.property-modal-meta dt {
    color: #758078;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.property-modal-price strong {
    color: var(--primario);
    font-size: 1.12rem;
}

.property-modal-featured {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    color: #725111;
    background: #f9ebc6;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
}

.property-modal-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
}

.property-modal-specs>div {
    display: grid;
    gap: 0.12rem;
    min-height: 51px;
    padding: 0.45rem 0.55rem;
    background: #f4f7f5;
    border: 1px solid #e2e9e4;
    border-radius: 0.42rem;
}

.property-modal-specs strong {
    color: #34433a;
    font-size: 0.84rem;
}

.property-modal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.7rem 0 0;
}

.property-modal-meta>div {
    padding-top: 0.45rem;
    border-top: 1px solid #e5ebe6;
}

.property-modal-meta dt {
    margin-bottom: 0.2rem;
}

.property-modal-meta dd {
    margin: 0;
    color: #3d4c43;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {

    .property-modal-specs,
    .property-modal-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-modal-cover {
        aspect-ratio: 16 / 10;
    }
}

.status-pill {
    padding: 0.3rem 0.5rem;
    color: #26623d;
    background: #e7f0eb;
    border-radius: 12px;
    font-size: 0.72rem;
}

.status-pill.vendida {
    color: #b13f4b;
    background: rgb(220 104 104 / 18%);
    border: 1px solid rgb(190 78 78 / 28%);
    font-weight: 800;
    text-transform: uppercase;
}

.status-pill.alquilada {
    color: #815c1c;
    background: #fae9c9;
}

.status-pill.inactivo {
    color: #657079;
    background: #eef1f3;
    border: 1px solid #d6dce1;
}

.admin-card .table tbody tr.property-row-sold>* {
    background-color: rgb(220 104 104 / 14%) !important;
    color: #7a4a4a;
}

.admin-card .table tbody tr.property-row-sold>td:first-child {
    box-shadow: inset 4px 0 0 rgb(190 78 78 / 68%);
}

.admin-card .table tbody tr.property-row-sold .property-cover-thumb {
    filter: saturate(0.76);
    opacity: 0.82;
}

.admin-card .table tbody tr.property-row-hidden>* {
    color: #68737c;
    background-color: rgb(111 123 133 / 15%) !important;
}

.admin-card .table tbody tr.property-row-hidden>td:first-child {
    box-shadow: inset 4px 0 0 rgb(111 123 133 / 42%);
}

.admin-card .table tbody tr.property-row-hidden .property-cover-thumb {
    filter: grayscale(72%);
    opacity: 0.66;
}

.admin-card .table tbody tr.property-row-hidden .status-pill.inactivo {
    color: #4f5b64;
    background: #dfe5e8;
    border-color: #aeb9c0;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.admin-card .table tbody tr.property-row-rented>* {
    color: #765b20;
    background-color: rgb(235 185 73 / 16%) !important;
}

.admin-card .table tbody tr.property-row-rented>td:first-child {
    box-shadow: inset 4px 0 0 rgb(211 157 42 / 68%);
}

.admin-card .table tbody tr.property-row-rented .status-pill.alquilada {
    color: #6c4e0e;
    background: #ffe4a7;
    border: 1px solid #e4b951;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.lead-status-select {
    min-width: 118px;
    font-weight: 600;
    border-width: 1px;
}

.lead-status-select.lead-nuevo {
    color: #1f3612;
    background: #7eddb6;
    border-color: #9ad9f8;
}

.lead-status-select.lead-contactado {
    color: #7a5200;
    background: #d4bd93;
    border-color: #f4cf72;
}

.lead-status-select.lead-cerrado {
    color: #aa3636;
    background: #e2b0b0;
    border-color: #9ed7ad;
}

/* Panel de leads: resumen, filtros, tabla y detalle de consulta. */
.leads-dashboard {
    margin: 0 auto;
}

.leads-shell {
    width: 100%;
}

.leads-page-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 2rem;
    padding: 0.35rem 0.2rem;
}

.leads-page-intro h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(2rem, 3.5vw, 3.1rem);
}

.leads-page-intro>div>p:last-child {
    max-width: 690px;
    color: var(--muted);
}

.leads-total,
.leads-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-shrink: 0;
    color: var(--primario);
    background: var(--cream);
    border: 1px solid #e7e3db;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.leads-total {
    min-height: 48px;
    padding: 0.6rem 1rem;
}

.leads-total i {
    display: grid;
    width: 30px;
    height: 30px;
    color: var(--blanco);
    background: var(--secundario);
    border-radius: 50%;
    place-items: center;
}

.leads-total strong {
    font-size: 1.1rem;
}

.leads-card-heading,
.leads-table-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.leads-card-heading h2,
.leads-table-heading h2 {
    margin: 0 0 0.35rem;
    color: var(--primario);
    font-size: 1.25rem;
}

.leads-card-heading>div>p:last-child,
.leads-table-heading>div>p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.leads-count-badge {
    min-height: 35px;
    padding: 0.45rem 0.8rem;
}

.leads-traffic-card,
.leads-filter-card {
    border: 1px solid #e8ece8;
}

.leads-chart-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(150px, 0.9fr);
    align-items: center;
    gap: 1rem;
}

.leads-chart-legend {
    display: grid;
    gap: 0.6rem;
    min-width: 0;
}

.leads-chart-legend>p {
    margin: 0 0 0.1rem;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.leads-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-width: 0;
}

.leads-legend-item>span {
    width: 10px;
    height: 10px;
    margin-top: 0.25rem;
}

.leads-legend-item div {
    min-width: 0;
}

.leads-legend-item strong,
.leads-legend-item small {
    display: block;
}

.leads-legend-item strong {
    overflow: hidden;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leads-legend-item small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leads-donut-wrap {
    display: grid;
    min-width: 0;
    place-items: center;
}

.leads-donut-wrap svg {
    display: block;
    width: min(100%, 210px);
    height: auto;
}

.leads-chart-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    color: var(--muted);
    border-top: 1px solid #edf0ed;
    font-size: 0.75rem;
    line-height: 1.55;
}

.leads-chart-note i {
    margin-top: 0.08rem;
    color: var(--gold);
}

.leads-empty-chart {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--muted);
    background: #fafbf9;
    border: 1px dashed var(--border);
    border-radius: 0.5rem;
    font-size: 0.84rem;
}

.leads-empty-chart i {
    color: var(--gold);
    font-size: 1.15rem;
}

.leads-filter-card .form-label {
    margin-bottom: 0.4rem;
    color: #58625c;
    font-size: 0.76rem;
    font-weight: 700;
}

.leads-filter-card .form-select {
    min-height: 43px;
    border-color: #dce2dc;
    color: var(--primario);
    font-size: 0.84rem;
}

.leads-filter-card .form-select:focus {
    border-color: var(--secundario);
    box-shadow: 0 0 0 0.2rem rgb(63 81 255 / 12%);
}

.leads-filter-button {
    min-height: 43px;
    font-size: 0.84rem;
    font-weight: 600;
}

.leads-clear-filter {
    color: var(--secundario);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.leads-clear-filter:hover {
    color: var(--primario);
    text-decoration: underline;
}

.leads-table-card {
    overflow: hidden;
    border: 1px solid #e8ece8;
}

.leads-table-heading {
    padding: 1.6rem 1.8rem 1.35rem;
    border-bottom: 1px solid #e9eeea;
}

.leads-table th {
    padding: 0.85rem 0.8rem;
    color: #66716a;
    background: #f7f9f7;
    border-bottom: 1px solid #e5eae5;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.leads-table td {
    padding: 1rem 0.8rem;
    color: var(--primario);
    border-color: #eef1ee;
    font-size: 0.82rem;
    vertical-align: middle;
}

.leads-table tbody tr {
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.leads-table tbody tr:hover {
    background: #fbfcfd;
    box-shadow: inset 3px 0 0 var(--secundario);
}

.leads-client-cell>strong,
.leads-client-cell small,
.leads-property-link strong,
.leads-property-link small,
.leads-date,
.leads-date small {
    display: block;
}

.leads-client-cell>strong,
.leads-property-link strong {
    font-size: 0.81rem;
}

.leads-client-cell small,
.leads-client-cell small a,
.leads-property-link small,
.leads-date small {
    color: var(--muted);
    font-size: 0.71rem;
    line-height: 1.55;
    text-decoration: none;
}

.leads-client-cell small a:hover {
    color: var(--secundario);
    text-decoration: underline;
}

.leads-property-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 175px;
    color: var(--primario);
    text-decoration: none;
}

.leads-property-link:hover strong {
    color: var(--secundario);
}

.leads-property-link span {
    min-width: 0;
}

.leads-property-link small {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leads-table .property-cover-thumb {
    width: 58px;
    height: 46px;
    border: 1px solid #e5e9e5;
    box-shadow: 0 2px 5px rgb(23 37 28 / 8%);
}

.leads-agent {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #536059;
    font-size: 0.76rem;
    white-space: nowrap;
}

.leads-agent i {
    color: var(--gold);
}

.leads-message-button,
.leads-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 32px;
    border-radius: 0.35rem;
    font-size: 0.73rem;
    font-weight: 600;
}

.leads-message-button {
    color: var(--primario);
    background: #f5f7ff;
    border: 1px solid #dbe1ff;
}

.leads-message-button:hover {
    color: var(--blanco);
    background: var(--secundario);
    border-color: var(--secundario);
}

.leads-delete-cell {
    width: 1%;
}

.leads-delete-button {
    width: 32px;
    color: #b33a3a;
    background: #fff8f8;
    border: 1px solid #f0d5d5;
}

.leads-delete-button:hover {
    color: var(--blanco);
    background: #c84949;
    border-color: #c84949;
}

.leads-no-results {
    padding: 4rem 1rem !important;
    color: var(--muted) !important;
    background: #fcfdfc;
    font-size: 0.9rem !important;
    text-align: center;
}

.leads-no-results i,
.leads-no-results span {
    display: block;
}

.leads-no-results i {
    margin-bottom: 0.65rem;
    color: var(--gold);
    font-size: 1.8rem;
}

.leads-message-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 0.7rem;
    box-shadow: 0 18px 50px rgb(13 16 37 / 20%);
}

.leads-message-modal .modal-header,
.leads-message-modal .modal-footer {
    padding: 1.25rem 1.5rem;
    border-color: #e9eeea;
}

.leads-message-modal .modal-body {
    padding: 1.5rem;
}

.leads-message-modal #leadMessageText {
    min-height: 110px;
    padding: 1rem;
    color: #39433d;
    background: #f7f9f7;
    border: 1px solid #e6ebe6;
    border-radius: 0.45rem;
    font-size: 0.9rem;
    line-height: 1.65;
    white-space: pre-line;
}

@media (max-width: 1199px) {
    .leads-chart-content {
        grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr);
    }

    .leads-traffic-card .leads-chart-legend {
        max-height: 250px;
        overflow: auto;
        padding-right: 0.25rem;
    }
}

@media (max-width: 767px) {
    .leads-dashboard {
        padding-top: 1.5rem !important;
    }

    .leads-page-intro,
    .leads-card-heading,
    .leads-table-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .leads-page-intro {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .leads-total,
    .leads-count-badge {
        align-self: flex-start;
    }

    .leads-dashboard .admin-card {
        padding: 1.25rem;
    }

    .leads-table-heading {
        padding: 1.25rem;
    }

    .leads-chart-content {
        grid-template-columns: 1fr;
    }

    .leads-chart-legend {
        order: 2;
    }

    .leads-donut-wrap {
        order: 1;
    }

    .leads-donut-wrap svg {
        width: min(100%, 190px);
    }

    .leads-traffic-card .leads-chart-legend {
        max-height: none;
        overflow: visible;
    }

    .leads-table td {
        padding: 0.85rem 0.7rem;
    }

    .leads-message-button span {
        display: none;
    }

    .leads-message-button {
        width: 32px;
    }
}

.delete-link {
    margin-left: 0.15rem;
}

.image-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.image-picker label {
    position: relative;
    margin: 0;
}

.image-picker input {
    position: absolute;
    opacity: 0;
}

.image-picker img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border: 3px solid transparent;
}

.image-picker input:checked+img {
    border-color: var(--secundario);
}

/* 9. Equipo ------------------------------------------------------------------- */
.team-member {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    color: var(--blanco);
    text-align: left;
    cursor: pointer;
    background: var(--primario);
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgb(23 37 28 / 12%);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.team-member:hover,
.team-member:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 18px 32px rgb(23 37 28 / 20%);
    outline: none;
}

.team-member:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.team-member img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.team-member:hover img,
.team-member:focus-visible img {
    transform: scale(1.04);
}

.team-member-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 0.15rem;
    padding: 1rem 1.15rem;
    color: var(--blanco);
    background: rgb(0 0 0 / 70%);
}

.team-member-caption small {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f0ce91;
}

.team-member-caption strong {
    font-family: "Montserrat", sans-serif;
    font-size: 1.25rem;
    line-height: 1.2;
}

.team-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
}

.team-modal .modal-body {
    position: relative;
}

.team-modal-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 395px;
    object-fit: cover;
}

.team-modal-content {
    padding: 2.25rem;
}

.team-modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primario);
    font-family: "Montserrat", sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
}

.team-modal-content>p:not(.eyebrow) {
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: 0.91rem;
    line-height: 1.7;
    text-align: justify;
}

.team-modal-close {
    position: absolute;
    z-index: 2;
    top: 0.9rem;
    right: 0.9rem;
    padding: 0.7rem;
    background-color: rgb(255 255 255 / 92%);
    border-radius: 50%;
    opacity: 1;
}

.btn-linkedin {
    color: var(--blanco);
    background: #0a66c2;
    border-color: #0a66c2;
}

.btn-linkedin:hover,
.btn-linkedin:focus-visible {
    color: var(--blanco);
    background: #084f96;
    border-color: #084f96;
}

/* Página pública y gestión del equipo comercial. */
.advisers-hero {
    position: relative;
    overflow: hidden;
    color: var(--blanco);
    background:
        radial-gradient(circle at 92% 8%, rgb(189 141 68 / 23%), transparent 31%),
        linear-gradient(128deg, var(--primario) 0%, var(--secundario) 100%);
}

.advisers-hero::after {
    position: absolute;
    inset: auto -4rem -8rem auto;
    width: 19rem;
    height: 19rem;
    content: "";
    border: 1px solid rgb(189 141 68 / 46%);
    border-radius: 50%;
}

.advisers-hero .container {
    position: relative;
    z-index: 1;
}

.advisers-hero h1 {
    max-width: 760px;
    margin-bottom: 1rem;
    font-size: clamp(2.15rem, 4vw, 4rem);
    font-weight: 750;
    letter-spacing: -0.04em;
}

.advisers-hero .lead {
    max-width: 720px;
    color: rgb(255 255 255 / 78%);
}

.advisers-hero-note {
    display: grid;
    gap: 0.5rem;
    padding: 1.35rem;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 0.75rem;
    backdrop-filter: blur(5px);
}

.advisers-hero-note i {
    color: var(--gold);
    font-size: 1.65rem;
}

.advisers-hero-note strong {
    font-size: 1.02rem;
}

.advisers-hero-note span {
    color: rgb(255 255 255 / 72%);
    font-size: 0.86rem;
    line-height: 1.55;
}

.team-member-placeholder,
.team-modal-placeholder {
    display: grid;
    color: var(--gold);
    background:
        radial-gradient(circle at 50% 32%, rgb(189 141 68 / 28%), transparent 20%),
        linear-gradient(145deg, var(--primario), var(--secundario));
    place-items: center;
}

.team-member-placeholder {
    width: 100%;
    height: 100%;
    align-content: center;
    gap: 0.45rem;
}

.team-member-placeholder i {
    font-size: 3.1rem;
}

.team-member-placeholder small {
    color: rgb(255 255 255 / 68%);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.team-modal-placeholder {
    width: 100%;
    min-height: 395px;
}

.team-modal-placeholder i {
    font-size: 4.3rem;
}

.advisers-empty {
    padding: 3.25rem 1.5rem;
    background: var(--cream);
    border: 1px dashed var(--border);
    border-radius: 0.8rem;
}

.advisers-empty>i {
    display: inline-grid;
    width: 3.35rem;
    height: 3.35rem;
    margin-bottom: 0.85rem;
    color: var(--gold);
    background: var(--blanco);
    border-radius: 50%;
    font-size: 1.55rem;
    place-items: center;
}

.advisers-empty h2 {
    color: var(--primario);
}

.advisers-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.4rem, 3vw, 2.3rem);
    color: var(--blanco);
    background: linear-gradient(120deg, var(--primario), var(--secundario));
    border-radius: 0.8rem;
}

.advisers-cta p:not(.eyebrow) {
    color: rgb(255 255 255 / 75%);
}

.team-management-page {
    max-width: 1920px;
}

.team-profile-form-card .form-label {
    margin-bottom: 0.28rem;
    color: var(--primario);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.team-profile-current {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.team-profile-current img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
}

.team-profiles-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.team-profiles-heading>span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.2rem 0.5rem;
    color: var(--primario);
    background: var(--cream);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.team-profiles-list {
    display: grid;
}

.team-profile-row {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.18s ease;
}

.team-profile-row:last-child {
    border-bottom: 0;
}

.team-profile-row:hover {
    background: var(--cream);
}

.team-profile-row>img,
.team-profile-placeholder {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.55rem;
}

.team-profile-placeholder {
    font-size: 1.45rem;
}

.team-profile-row.is-hidden {
    background: rgb(13 16 37 / 6%);
}

.team-profile-info {
    display: grid;
    min-width: 0;
    gap: 0.12rem;
}

.team-profile-info strong {
    overflow: hidden;
    color: var(--primario);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-profile-info>span:not(.status-pill) {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-profile-info small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-profile-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.team-profile-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
}

.team-management-empty {
    padding: 2.4rem 1.25rem;
    text-align: center;
}

.team-management-empty>i {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--gold);
    font-size: 2rem;
}

@media (max-width: 767.98px) {

    .team-member,
    .team-member img {
        min-height: 0;
        height: 100%;
    }

    .team-modal-image {
        min-height: 270px;
        max-height: 320px;
    }

    .team-modal-content {
        padding: 1.5rem;
    }

    .advisers-hero h1 {
        font-size: 2.2rem;
    }

    .advisers-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-profile-row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 0.6rem;
        padding: 0.72rem 0.85rem;
    }

    .team-profile-row>img,
    .team-profile-placeholder {
        width: 44px;
        height: 44px;
    }

    .team-profile-actions .btn span {
        display: none;
    }
}

/* En pantallas táctiles se prioriza mostrar la fotografía completa. */
@media (max-width: 991.98px) {
    .team-member {
        width: 100%;
    }

    .team-member img {
        height: 100%;
        min-height: 0;
        object-fit: contain;
        background: #f2f3f1;
    }

    .team-member-caption {
        width: 100%;
        box-sizing: border-box;
    }

    .team-modal .col-md-5 {
        display: none;
    }

    .team-modal .col-md-7 {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* 11. Reportes CRM: panel compacto y visual ---------------------------------- */
.crm-reports-dashboard {
    max-width: 1920px;
    margin: 0 auto;
}

.crm-reports-heading {
    min-height: 66px;
}

.crm-reports-heading h1 {
    color: #172131;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.crm-reports-period {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.65rem;
    color: #657281 !important;
    background: #f3f6f8;
    border-radius: 0.45rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.crm-reports-period i {
    color: #a97527;
}

.crm-report-filter {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 0.55rem;
    width: 100%;
    max-width: none;
    padding: 0.65rem !important;
    margin-left: 0;
    border: 1px solid #e4e9ef;
    border-radius: 0.65rem;
    box-shadow: 0 3px 12px rgb(24 39 55 / 4%);
}

.crm-report-filter > div {
    width: auto;
    padding: 0;
}

.crm-report-filter .form-label {
    margin: 0 0 0.25rem;
    color: #657281;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.crm-report-filter .form-control,
.crm-report-filter .btn {
    min-height: 37px;
    font-size: 0.8rem;
}

.crm-report-filter .btn {
    padding-inline: 0.9rem;
    white-space: nowrap;
}

.crm-report-metrics > div {
    display: flex;
}

.crm-report-metric {
    position: relative;
    width: 100%;
    min-height: 112px;
    padding: 0.95rem 1rem 0.9rem 4.25rem !important;
    overflow: hidden;
    border: 1px solid #e3e9ef;
    border-radius: 0.7rem;
    box-shadow: 0 4px 13px rgb(27 44 61 / 4%);
}

.crm-report-metric::before,
.crm-report-metric::after {
    position: absolute;
    left: 1rem;
    display: grid;
    place-items: center;
    border-radius: 0.62rem;
}

.crm-report-metric::before {
    top: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: #eeeafe;
    content: "";
}

.crm-report-metric::after {
    top: 1.65rem;
    width: 2.5rem;
    color: #5844bf;
    content: "01";
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.crm-report-metrics > div:nth-child(2) .crm-report-metric::before {
    background: #e3f5ec;
}

.crm-report-metrics > div:nth-child(2) .crm-report-metric::after {
    color: #177850;
    content: "02";
}

.crm-report-metrics > div:nth-child(3) .crm-report-metric::before {
    background: #e5f3ff;
}

.crm-report-metrics > div:nth-child(3) .crm-report-metric::after {
    color: #1976b9;
    content: "03";
}

.crm-report-metrics > div:nth-child(4) .crm-report-metric::before {
    background: #fff2cf;
}

.crm-report-metrics > div:nth-child(4) .crm-report-metric::after {
    color: #9a6a04;
    content: "04";
}

.crm-report-metric.is-alert::before {
    background: #fdebec !important;
}

.crm-report-metric.is-alert::after {
    color: #bd5159 !important;
}

.crm-report-metric small,
.crm-report-metric strong,
.crm-report-metric > span {
    display: block;
}

.crm-report-metric small {
    color: #657281 !important;
    font-size: 0.76rem;
    font-weight: 700;
}

.crm-report-metric strong {
    margin: 0.18rem 0;
    color: #1c2837;
    font-size: 1.72rem !important;
    line-height: 1;
}

.crm-report-metric > span {
    color: #7b8794;
    font-size: 0.69rem;
    font-weight: 600;
}

.crm-property-status-overview {
    padding: 0.95rem 1.1rem 0.8rem !important;
    margin-bottom: 0.9rem;
    border: 1px solid #e3e9ef;
    border-radius: 0.7rem;
    box-shadow: 0 4px 13px rgb(27 44 61 / 4%);
}

.crm-property-status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.crm-property-status-heading h2 {
    color: #263343;
    font-weight: 750;
}

.crm-property-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e6ebef;
    border-radius: 0.58rem;
}

.crm-property-status-grid article {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    min-width: 0;
    padding: 0.72rem 0.82rem;
    background: #fff;
    border-right: 1px solid #e6ebef;
}

.crm-property-status-grid article:last-child {
    border-right: 0;
}

.crm-property-status-grid article > span {
    display: grid;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 2.1rem;
    place-items: center;
    border-radius: 0.52rem;
    font-size: 0.95rem;
}

.crm-property-status-grid article small,
.crm-property-status-grid article strong {
    display: block;
}

.crm-property-status-grid article small {
    overflow: hidden;
    color: #718090;
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1.22;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-property-status-grid article strong {
    margin-top: 0.08rem;
    color: #202e3c;
    font-size: 1.36rem;
    line-height: 1;
}

.crm-property-status-grid .is-total > span {
    color: #5844bf;
    background: #eeeafe;
}

.crm-property-status-grid .is-available > span {
    color: #177850;
    background: #e3f5ec;
}

.crm-property-status-grid .is-sold > span {
    color: #b94c56;
    background: #fdebed;
}

.crm-property-status-grid .is-rented > span {
    color: #9a6a04;
    background: #fff2cf;
}

.crm-property-status-grid .is-inactive > span {
    color: #657281;
    background: #edf0f3;
}

.crm-property-status-note {
    display: flex;
    align-items: flex-start;
    gap: 0.38rem;
    margin: 0.6rem 0 0;
    color: #778391;
    font-size: 0.69rem;
    line-height: 1.35;
}

.crm-property-status-note i {
    margin-top: 0.04rem;
    color: #b5843c;
}

.crm-report-grid > section {
    display: flex;
}

.crm-report-card {
    width: 100%;
    min-height: 0;
    border: 1px solid #e3e9ef;
    border-radius: 0.7rem;
    box-shadow: 0 4px 13px rgb(27 44 61 / 4%);
}

.crm-report-funnel-card {
    padding: 1rem 1.1rem !important;
}

.crm-report-funnel-card .eyebrow,
.crm-report-table-card .eyebrow {
    margin-bottom: 0.16rem !important;
}

.crm-report-funnel-card h2,
.crm-report-table-card h2 {
    color: #263343;
    font-weight: 750;
}

.crm-report-funnel-card .mb-3 {
    margin-bottom: 0.72rem !important;
}

.crm-report-funnel-card .small {
    color: #5d6a78;
    font-size: 0.77rem;
    font-weight: 650;
}

.crm-report-funnel-card .progress {
    height: 7px !important;
    overflow: hidden;
    background: #edf1f4;
    border-radius: 99px;
}

.crm-report-funnel-card .progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, #987039, #d4ad6d) !important;
}

.crm-report-table-card {
    overflow: hidden;
}

.crm-report-table-card > div:first-child {
    padding: 1rem 1.1rem 0.55rem !important;
}

.crm-report-table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f7f9fa;
}

.crm-report-table thead th {
    padding: 0.58rem 1.1rem;
    color: #83909d !important;
    background: #f7f9fa;
    border-bottom: 1px solid #e8edf1;
    font-size: 0.65rem !important;
}

.crm-report-table tbody td {
    padding: 0.68rem 1.1rem;
    color: #394757;
    border-color: #edf0f3;
    font-size: 0.78rem !important;
    font-weight: 600;
}

.crm-report-table tbody td:not(:first-child) {
    width: 1%;
    text-align: center;
    white-space: nowrap;
}

.crm-report-table tbody td strong {
    display: block;
    color: #273543;
    font-size: 0.78rem;
}

.crm-report-table tbody td small {
    display: block;
    margin-top: 0.12rem;
    color: #85919d !important;
    font-size: 0.68rem !important;
    font-weight: 500;
}

.crm-report-table tbody tr:hover td {
    background: #f7f9fa;
}

@media (max-width: 767.98px) {
    .crm-reports-dashboard {
        padding-inline: 0.8rem;
    }

    .crm-reports-heading {
        align-items: flex-start !important;
    }

    .crm-report-filter {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
        max-width: none;
    }

    .crm-report-filter > div:last-of-type {
        grid-column: 1 / -1;
    }

    .crm-report-filter .btn {
        width: 100%;
    }

    .crm-report-metric {
        min-height: 98px;
    }

    .crm-property-status-overview {
        padding: 0.85rem !important;
    }

    .crm-property-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-property-status-grid article {
        border-bottom: 1px solid #e6ebef;
    }

    .crm-property-status-grid article:nth-child(2n) {
        border-right: 0;
    }

    .crm-property-status-grid article:last-child {
        grid-column: 1 / -1;
        border-bottom: 0;
    }

    .crm-report-table thead th,
    .crm-report-table tbody td {
        padding-inline: 0.8rem;
    }
}

html[data-admin-theme="dark"] .admin-page .crm-reports-period,
html[data-admin-theme="dark"] .admin-page .crm-report-filter,
html[data-admin-theme="dark"] .admin-page .crm-report-metric,
html[data-admin-theme="dark"] .admin-page .crm-property-status-overview,
html[data-admin-theme="dark"] .admin-page .crm-report-card {
    color: #e2e9e5;
    background: #1a232b;
    border-color: #32404a;
}

html[data-admin-theme="dark"] .admin-page .crm-reports-heading h1,
html[data-admin-theme="dark"] .admin-page .crm-report-metric strong,
html[data-admin-theme="dark"] .admin-page .crm-property-status-heading h2,
html[data-admin-theme="dark"] .admin-page .crm-property-status-grid article strong,
html[data-admin-theme="dark"] .admin-page .crm-report-funnel-card h2,
html[data-admin-theme="dark"] .admin-page .crm-report-table-card h2,
html[data-admin-theme="dark"] .admin-page .crm-report-table tbody td,
html[data-admin-theme="dark"] .admin-page .crm-report-table tbody td strong {
    color: #e2e9e5;
}

html[data-admin-theme="dark"] .admin-page .crm-report-funnel-card .progress,
html[data-admin-theme="dark"] .admin-page .crm-report-table thead th,
html[data-admin-theme="dark"] .admin-page .crm-report-table tbody tr:hover td {
    background: #202b33;
}

html[data-admin-theme="dark"] .admin-page .crm-report-table thead th,
html[data-admin-theme="dark"] .admin-page .crm-report-table tbody td {
    border-color: #33414a;
}

html[data-admin-theme="dark"] .admin-page .crm-property-status-grid,
html[data-admin-theme="dark"] .admin-page .crm-property-status-grid article {
    background: #202b33;
    border-color: #33414a;
}

/* 12. Pipeline CRM estilo Kanban --------------------------------------------- */
.crm-pipeline-page {
    max-width: 1920px;
    margin: 0 auto;
}

.crm-pipeline-heading,
.crm-heading-actions,
.crm-pipeline-metrics,
.crm-pipeline-metrics>article,
.crm-pipeline-metrics>a,
.crm-toolbar,
.crm-kanban-column>header,
.crm-kanban-column>header>div,
.crm-card-top,
.crm-card-footer,
.crm-card-property {
    display: flex;
}

.crm-pipeline-heading {
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}

.crm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    margin-bottom: 0.45rem;
    color: #778393;
    font-size: 0.77rem;
    font-weight: 600;
}

.crm-breadcrumb i {
    color: #a9b2be;
    font-size: 0.62rem;
}

.crm-breadcrumb strong {
    color: #384655;
}

.crm-pipeline-heading h1 {
    margin: 0;
    color: #172131;
    font-size: clamp(1.8rem, 2.8vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.crm-pipeline-heading p {
    margin: 0.4rem 0 0;
    color: #75818e;
}

.crm-heading-actions {
    flex-wrap: wrap;
    gap: 0.6rem;
}

.crm-pipeline-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.crm-pipeline-metrics>article,
.crm-pipeline-metrics>a {
    align-items: center;
    gap: 0.75rem;
    min-height: 82px;
    padding: 0.9rem 1rem;
    color: #263343;
    background: #fff;
    border: 1px solid #e4e9ef;
    border-radius: 0.7rem;
    box-shadow: 0 3px 12px rgb(24 39 55 / 4%);
    text-decoration: none;
}

.crm-pipeline-metrics>a {
    position: relative;
}

.crm-pipeline-metrics>a>.bi-arrow-right-short {
    margin-left: auto;
    color: #7b8794;
    font-size: 1.25rem;
}

.crm-pipeline-metrics>a.is-warning {
    border-color: #efd79a;
    background: #fffdf8;
}

.crm-pipeline-metrics strong,
.crm-pipeline-metrics small {
    display: block;
}

.crm-pipeline-metrics strong {
    color: #1c2837;
    font-size: 1.45rem;
    line-height: 1.1;
}

.crm-pipeline-metrics small {
    margin-top: 0.18rem;
    color: #778391;
    font-size: 0.75rem;
    font-weight: 600;
}

.crm-metric-icon {
    display: inline-grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    border-radius: 0.55rem;
    font-size: 1.04rem;
}

.crm-metric-icon.is-indigo {
    color: #5844bf;
    background: #eeeafe;
}

.crm-metric-icon.is-blue {
    color: #1976b9;
    background: #e5f3ff;
}

.crm-metric-icon.is-green {
    color: #177850;
    background: #e3f5ec;
}

.crm-metric-icon.is-gold {
    color: #9a6a04;
    background: #fff2cf;
}

.crm-toolbar {
    align-items: center;
    gap: 0.6rem;
    min-height: 64px;
    padding: 0.65rem 0.8rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #e2e8ef;
    border-radius: 0.7rem;
    box-shadow: 0 3px 12px rgb(24 39 55 / 4%);
}

.crm-toolbar .form-select {
    width: min(190px, 100%);
    min-height: 38px;
    font-size: 0.79rem;
}

.crm-toolbar-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: min(290px, 100%);
    padding: 0 0.75rem;
    background: #f7f9fb;
    border: 1px solid #e0e6ec;
    border-radius: 0.43rem;
}

.crm-toolbar-search i {
    color: #83909e;
}

.crm-toolbar-search input {
    width: 100%;
    min-height: 38px;
    color: #303e4d;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.83rem;
}

.crm-kanban-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    min-height: 620px;
    overflow-x: hidden;
}

.crm-kanban-column {
    min-width: 0;
    padding: 0.55rem;
    background: #edf1f5;
    border: 1px solid #e1e6eb;
    border-radius: 0.68rem;
}

.crm-kanban-column>header {
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.1rem 0.1rem 0.72rem;
}

.crm-kanban-column>header>div {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.crm-pipeline-page .crm-kanban-column>header h2 {
    margin: 0;
    color: #273443;
    font-size: 0.85rem !important;
    font-weight: 700;
    line-height: 1.2;
}

.crm-kanban-column header small {
    width: 100%;
    padding-left: 16px;
    color: #7b8794;
    font-size: 0.7rem;
}

.crm-kanban-column header>a {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    color: #687583;
    border-radius: 0.38rem;
    text-decoration: none;
}

.crm-kanban-column header>a:hover {
    color: var(--secundario);
    background: #fff;
}

.crm-stage-marker {
    width: 9px;
    height: 9px;
    background: #7c8a97;
    border-radius: 50%;
}

.crm-stage-nuevo .crm-stage-marker {
    background: #596bfa;
}

.crm-stage-contactado .crm-stage-marker {
    background: #2e9be6;
}

.crm-stage-seguimiento .crm-stage-marker {
    background: #a671e4;
}

.crm-stage-visita .crm-stage-marker {
    background: #f29b3e;
}

.crm-stage-negociacion .crm-stage-marker {
    background: #d5676a;
}

.crm-stage-separacion .crm-stage-marker {
    background: #20a37a;
}

.crm-stage-cerrado .crm-stage-marker {
    background: #438a55;
}

.crm-kanban-cards {
    display: grid;
    align-content: start;
    gap: 0.68rem;
}

.crm-opportunity-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3e8ed;
    border-radius: 0.55rem;
    box-shadow: 0 2px 6px rgb(28 46 61 / 5%);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}

.crm-opportunity-card:hover {
    border-color: #c9d4de;
    box-shadow: 0 8px 18px rgb(28 46 61 / 10%);
    transform: translateY(-2px);
}

.crm-card-main {
    display: block;
    padding: 0.78rem 0.8rem 0.68rem;
    color: inherit;
    text-decoration: none;
}

button.crm-card-main {
    width: 100%;
    border: 0;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.crm-card-main>p,
.crm-card-main .crm-card-property {
    display: none;
}

.crm-card-code {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: #596979;
    background: #f5f7f9;
    border-radius: 999px;
    padding: 0.2rem 0.42rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.crm-card-code i {
    color: #7b65c9;
}

.crm-card-open:hover h3 {
    color: #5262d4;
}

.crm-card-top {
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.crm-source-tag,
.crm-card-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #657384;
    background: #f2f5f7;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
}

.crm-source-tag {
    padding: 0.2rem 0.42rem;
}

.crm-card-counter {
    padding: 0.16rem 0.38rem;
}

.crm-opportunity-card h3 {
    margin: 0;
    color: #263544;
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: capitalize;
}

.crm-opportunity-card p {
    display: -webkit-box;
    min-height: 2.5em;
    margin: 0.36rem 0 0.56rem;
    overflow: hidden;
    color: #778493;
    font-size: 0.76rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.crm-opportunity-card .crm-card-main>p {
    display: none;
}

.crm-card-property {
    align-items: flex-start;
    gap: 0.35rem;
    color: #536374;
    font-size: 0.69rem;
    line-height: 1.3;
}

.crm-card-property i {
    color: #7b65c9;
}

.crm-card-footer {
    align-items: center;
    gap: 0.43rem;
    padding: 0.53rem 0.78rem;
    background: #fcfdfd;
    border-top: 1px solid #eef1f3;
}

.crm-card-owner {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    color: #fff;
    background: #6574d6;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
}

.crm-card-next {
    flex: 1;
    color: #73808d;
    font-size: 0.66rem;
    font-weight: 600;
    white-space: nowrap;
}

.crm-card-next i {
    margin-right: 0.13rem;
}

.crm-card-next.is-overdue {
    color: #c34e55;
}

.crm-card-agent,
.crm-card-date {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: #687788;
    font-size: 0.67rem;
    font-weight: 600;
}

.crm-card-agent {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-card-agent i {
    color: #6574d6;
}

.crm-card-date {
    white-space: nowrap;
}

.crm-card-date i {
    color: #8a98a6;
}

.crm-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.crm-card-delete {
    margin: 0;
}

.crm-card-delete-button {
    display: inline-grid;
    width: 25px;
    height: 25px;
    place-items: center;
    padding: 0;
    color: #bc5058;
    background: #fff5f5;
    border: 1px solid #f2d4d6;
    border-radius: 0.38rem;
    font-size: 0.72rem;
    transition:
        color 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease;
}

.crm-card-delete-button:hover,
.crm-card-delete-button:focus-visible {
    color: #fff;
    background: #bf515a;
    border-color: #bf515a;
}

.crm-lead-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 0.8rem;
    box-shadow: 0 20px 60px rgb(20 34 47 / 18%);
}

.crm-lead-modal .modal-header {
    align-items: flex-start;
    padding: 1.25rem 1.4rem;
    color: #fff;
    background: linear-gradient(120deg, #263d56, #435987);
    border: 0;
}

.crm-lead-modal .btn-close {
    filter: invert(1);
}

.crm-lead-modal .modal-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: capitalize;
}

.crm-modal-kicker {
    margin: 0 0 0.18rem;
    color: #aebbd1;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.crm-lead-modal .modal-body {
    padding: 1.35rem 1.4rem;
    background: #f8fafc;
}

.crm-lead-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.crm-lead-overview>div,
.crm-modal-context,
.crm-related-leads {
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 0.55rem;
}

.crm-lead-overview>div {
    min-height: 72px;
    padding: 0.75rem 0.85rem;
}

.crm-lead-overview span,
.crm-lead-overview small {
    display: block;
    color: #778493;
    font-size: 0.7rem;
}

.crm-lead-overview span {
    margin-bottom: 0.28rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crm-lead-overview strong,
.crm-lead-overview a {
    color: #2c3d4e;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.crm-lead-overview a:hover {
    color: #5262d4;
}

.crm-modal-context {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
}

.crm-modal-context div+div {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #edf0f3;
}

.crm-modal-context h3,
.crm-related-leads h3 {
    margin: 0 0 0.28rem;
    color: #33475b;
    font-size: 0.88rem;
    font-weight: 700;
}

.crm-modal-context p {
    margin: 0;
    color: #687787;
    font-size: 0.78rem;
    line-height: 1.55;
}

.crm-related-leads {
    overflow: hidden;
}

.crm-related-leads-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e9edf1;
}

.crm-related-leads-heading .crm-modal-kicker {
    color: #8492a2;
}

.crm-related-leads-heading h3 {
    margin: 0;
}

.crm-related-leads-heading>span {
    padding: 0.24rem 0.48rem;
    color: #596bfa;
    background: #eef0ff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}

.crm-related-lead {
    padding: 0.9rem 1rem;
    border-top: 1px solid #edf0f3;
}

.crm-related-lead:first-of-type {
    border-top: 0;
}

.crm-related-lead header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.crm-related-lead header strong,
.crm-related-lead header small {
    display: block;
}

.crm-related-lead header strong {
    color: #324456;
    font-size: 0.84rem;
}

.crm-related-lead header small {
    margin-top: 0.14rem;
    color: #84909c;
    font-size: 0.68rem;
}

.crm-related-lead-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    margin-top: 0.55rem;
}

.crm-related-lead-contact a {
    color: #5c6e80;
    font-size: 0.72rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.crm-related-lead-contact i {
    margin-right: 0.28rem;
    color: #7b65c9;
}

.crm-related-lead-property {
    margin: 0.52rem 0 0;
    color: #657486;
    font-size: 0.72rem;
}

.crm-related-lead-property i {
    margin-right: 0.28rem;
    color: #7b65c9;
}

.crm-related-lead blockquote {
    margin: 0.65rem 0 0;
    padding: 0.6rem 0.72rem;
    color: #617080;
    background: #f7f9fb;
    border-left: 3px solid #c7d1dc;
    border-radius: 0 0.32rem 0.32rem 0;
    font-size: 0.76rem;
    line-height: 1.5;
}

.crm-modal-empty {
    display: grid;
    min-height: 115px;
    padding: 1rem;
    color: #84909c;
    place-items: center;
    text-align: center;
    font-size: 0.78rem;
}

.crm-modal-empty i {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.2rem;
}

.crm-stage-move {
    padding: 0.43rem 0.58rem;
    background: #f6f8fa;
    border-top: 1px solid #edf0f2;
}

.crm-stage-move .form-select {
    min-height: 29px;
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
    color: #627181;
    background-color: #fff;
    border-color: #e0e6eb;
    font-size: 0.66rem;
}

.crm-kanban-empty {
    display: grid;
    min-height: 105px;
    padding: 1rem;
    color: #97a2ac;
    place-items: center;
    border: 1px dashed #ccd5dc;
    border-radius: 0.5rem;
    font-size: 0.74rem;
}

.crm-kanban-empty i {
    margin-bottom: -0.6rem;
    color: #aab4bd;
    font-size: 1.3rem;
}

/* El pipeline se ajusta en filas en pantallas pequeñas sin crear desplazamiento horizontal. */
@media (max-width: 991.98px) {
    .crm-kanban-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .crm-kanban-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        min-height: 0;
    }

    .crm-kanban-column {
        padding: 0.45rem;
    }
}

@media (max-width: 460px) {
    .crm-kanban-board {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 12. Adaptación móvil -------------------------------------------------------- */
@media (max-width: 767px) {
    .hero {
        height: 100vh;
        min-height: 0;
        padding-top: calc(135px - 1rem);
    }

    .search-card {
        margin-top: 0;
    }

    .section-head h2,
    .about h2 {
        font-size: 2rem;
    }

    .detail-image {
        height: 330px;
    }

    .detail-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .crm-pipeline-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-pipeline-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-pipeline-metrics>article,
    .crm-pipeline-metrics>a {
        min-height: 72px;
        padding: 0.7rem;
    }

    .crm-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-toolbar .form-select,
    .crm-toolbar-search {
        width: 100%;
    }
}

/* 13. Impresión de fichas ----------------------------------------------------- */
/* Escala tipográfica unificada: títulos, textos auxiliares y tablas. */
:root {
    --text-body: 0.94rem;
    --text-small: 0.78rem;
    --text-caption: 0.7rem;
    --title-page: clamp(1.9rem, 2.8vw, 2.45rem);
    --title-section: clamp(1.35rem, 2vw, 1.7rem);
    --title-card: 1.05rem;
    --table-heading: 0.68rem;
    --table-content: 0.82rem;
}

body {
    font-size: var(--text-body);
    line-height: 1.55;
}

/* Jerarquía estable entre páginas, secciones y tarjetas del panel. */
.admin-page h1,
.admin-page .h1 {
    font-size: var(--title-page) !important;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.admin-page h2,
.admin-page .h2 {
    font-size: var(--title-section) !important;
    line-height: 1.22;
    letter-spacing: -0.015em;
}

.admin-page h3,
.admin-page .h3,
.admin-page h4,
.admin-page .h4,
.admin-page h5,
.admin-page .h5,
.admin-page h6,
.admin-page .h6 {
    font-size: var(--title-card) !important;
    line-height: 1.3;
}

.eyebrow {
    font-size: var(--text-caption);
    letter-spacing: 0.14em;
    line-height: 1.25;
}

.admin-page .form-label,
.admin-page label,
.admin-page .form-text,
.admin-page small,
.admin-page .small {
    font-size: var(--text-small);
}

/* Encabezados y contenido de todas las tablas administrativas. */
.admin-page .table thead th,
.admin-page .table th,
.web-forms-table th,
.leads-table th {
    color: #68736d;
    font-size: var(--table-heading) !important;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1.25;
    text-transform: uppercase;
}

.admin-page .table tbody td,
.web-forms-table td,
.leads-table td {
    font-size: var(--table-content) !important;
    line-height: 1.45;
}

.admin-page .table td small,
.web-forms-table td small,
.leads-table td small {
    font-size: var(--text-caption) !important;
    line-height: 1.35;
}

@media (max-width: 767px) {

    .admin-page h1,
    .admin-page .h1 {
        font-size: 1.8rem !important;
    }

    .admin-page h2,
    .admin-page .h2 {
        font-size: 1.35rem !important;
    }

    .admin-page .table thead th,
    .admin-page .table th {
        font-size: 0.64rem !important;
    }

    .admin-page .table tbody td {
        font-size: 0.78rem !important;
    }
}

/* Tema oscuro exclusivo del área de gestión. */
html[data-admin-theme="dark"] {
    color-scheme: dark;
}

html[data-admin-theme="dark"] .admin-page {
    --bs-body-bg: #11171d;
    --bs-body-color: #e2e9e5;
    --bs-secondary-color: #aeb9b5;
    min-height: 100vh;
    color: #e2e9e5;
    background:
        radial-gradient(circle at 100% 0, rgb(91 112 255 / 14%), transparent 27rem),
        #11171d;
}

html[data-admin-theme="dark"] .admin-page .admin-card,
html[data-admin-theme="dark"] .admin-page .admin-notifications,
html[data-admin-theme="dark"] .admin-page .modal-content,
html[data-admin-theme="dark"] .admin-page .users-edit-modal .modal-content,
html[data-admin-theme="dark"] .admin-page .crm-pipeline-metrics>article,
html[data-admin-theme="dark"] .admin-page .crm-pipeline-metrics>a,
html[data-admin-theme="dark"] .admin-page .crm-toolbar,
html[data-admin-theme="dark"] .admin-page .crm-opportunity-card,
html[data-admin-theme="dark"] .admin-page .crm-lead-overview>div,
html[data-admin-theme="dark"] .admin-page .crm-modal-context,
html[data-admin-theme="dark"] .admin-page .crm-related-leads {
    color: #e2e9e5;
    background: #1a232b;
    border-color: #32404a !important;
    box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

html[data-admin-theme="dark"] .admin-page .admin-card:hover,
html[data-admin-theme="dark"] .admin-page .crm-opportunity-card:hover {
    border-color: #536779 !important;
    box-shadow: 0 10px 28px rgb(0 0 0 / 26%);
}

html[data-admin-theme="dark"] .admin-page .form-control,
html[data-admin-theme="dark"] .admin-page .form-select,
html[data-admin-theme="dark"] .admin-page .input-group-text,
html[data-admin-theme="dark"] .admin-page .crm-toolbar-search {
    color: #e7eeea;
    background: #121a20;
    border-color: #3a4953;
}

html[data-admin-theme="dark"] .admin-page .form-control::placeholder {
    color: #84918b;
}

html[data-admin-theme="dark"] .admin-page .form-select option {
    color: #e7eeea;
    background: #1a232b;
}

html[data-admin-theme="dark"] .admin-page .form-control:focus,
html[data-admin-theme="dark"] .admin-page .form-select:focus {
    color: #eef4f0;
    background: #121a20;
    border-color: #7180ff;
    box-shadow: 0 0 0 0.2rem rgb(113 128 255 / 20%);
}

html[data-admin-theme="dark"] .admin-page .table {
    --bs-table-bg: transparent;
    --bs-table-color: #dfe7e2;
    --bs-table-border-color: #33414a;
    color: #dfe7e2;
}

html[data-admin-theme="dark"] .admin-page .table thead th,
html[data-admin-theme="dark"] .admin-page .table th {
    color: #aebcb5;
}

html[data-admin-theme="dark"] .admin-page .table> :not(caption)>*>* {
    border-color: #33414a;
}

html[data-admin-theme="dark"] .admin-page .table tbody tr:hover>* {
    background: #202b33 !important;
}

html[data-admin-theme="dark"] .admin-page .text-muted,
html[data-admin-theme="dark"] .admin-page .text-secondary,
html[data-admin-theme="dark"] .admin-page .form-text,
html[data-admin-theme="dark"] .admin-page small {
    color: #aeb9b5 !important;
}

html[data-admin-theme="dark"] .admin-page .text-black,
html[data-admin-theme="dark"] .admin-page .text-dark {
    color: #e2e9e5 !important;
}

html[data-admin-theme="dark"] .admin-page .bg-light,
html[data-admin-theme="dark"] .admin-page .bg-white,
html[data-admin-theme="dark"] .admin-page .crm-kanban-column,
html[data-admin-theme="dark"] .admin-page .crm-lead-modal .modal-body {
    color: #e2e9e5 !important;
    background: #202a32 !important;
    border-color: #35434d !important;
}

html[data-admin-theme="dark"] .admin-page .crm-pipeline-heading h1,
html[data-admin-theme="dark"] .admin-page .crm-pipeline-metrics strong,
html[data-admin-theme="dark"] .admin-page .crm-kanban-column h2,
html[data-admin-theme="dark"] .admin-page .crm-opportunity-card h3,
html[data-admin-theme="dark"] .admin-page .crm-lead-overview strong,
html[data-admin-theme="dark"] .admin-page .crm-lead-overview a {
    color: #e5ece7;
}

html[data-admin-theme="dark"] .admin-page .crm-card-delete-button {
    color: #ffb7bc;
    background: #36252a;
    border-color: #75454c;
}

html[data-admin-theme="dark"] .admin-page .crm-card-delete-button:hover,
html[data-admin-theme="dark"] .admin-page .crm-card-delete-button:focus-visible {
    color: #fff;
    background: #be5059;
    border-color: #be5059;
}

html[data-admin-theme="dark"] .admin-page .crm-toolbar-search input {
    color: #e7eeea;
}

html[data-admin-theme="dark"] .admin-page .property-filter-form {
    border-top-color: #35434d;
}

html[data-admin-theme="dark"] .admin-page .property-modal-trigger,
html[data-admin-theme="dark"] .admin-page .property-modal-price strong,
html[data-admin-theme="dark"] .admin-page .property-modal-specs strong,
html[data-admin-theme="dark"] .admin-page .property-modal-meta dd {
    color: #e2e9e5;
}

html[data-admin-theme="dark"] .admin-page .property-modal-price,
html[data-admin-theme="dark"] .admin-page .property-modal-specs>div {
    background: #202a32;
    border-color: #36454f;
}

html[data-admin-theme="dark"] .admin-page .property-modal-meta>div {
    border-top-color: #36454f;
}

html[data-admin-theme="dark"] .admin-page .btn-light,
html[data-admin-theme="dark"] .admin-page .btn-outline-dark {
    color: #e0e8e3;
    background: #27333c;
    border-color: #465660;
}

html[data-admin-theme="dark"] .admin-page .btn-light:hover,
html[data-admin-theme="dark"] .admin-page .btn-outline-dark:hover {
    color: #fff;
    background: #34434d;
    border-color: #61737f;
}

html[data-admin-theme="dark"] .admin-page .btn-close {
    filter: invert(1) grayscale(1);
}

html[data-admin-theme="dark"] .admin-page .notification-leads {
    color: #9bd7ff;
    background: #173247;
}

html[data-admin-theme="dark"] .admin-page .notification-new {
    color: #aee6c1;
    background: #193d2a;
}

html[data-admin-theme="dark"] .admin-page .notification-update {
    color: #ffdc8d;
    background: #4a3b1e;
}

.print-only {
    display: none;
}

/* Ficha exclusiva de impresión: cabe en una hoja A4 con hasta seis fotografías. */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    html,
    body {
        width: 100%;
        min-height: auto;
        color: #1d2b24 !important;
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .detail-page>.navbar,
    .detail-page>main,
    .detail-page>.modal,
    .detail-page>.position-fixed,
    .app-notification-stack {
        display: none !important;
    }

    .property-print-sheet {
        display: block !important;
        width: 100%;
        margin: 0;
        font-family: "Montserrat", Arial, sans-serif;
    }

    .property-print-header {
        display: grid;
        grid-template-columns: 34mm minmax(0, 1fr) auto;
        gap: 6mm;
        align-items: center;
        min-height: 30mm;
        padding: 5.5mm 6mm;
        color: #fff;
        background: linear-gradient(118deg, #0d1025, #1c296a);
        border-radius: 2.4mm;
    }

    .property-print-logo {
        display: block;
        width: 31mm;
        max-height: 16mm;
        object-fit: contain;
        object-position: left center;
    }

    .property-print-title {
        min-width: 0;
    }

    .property-print-title p {
        margin: 0 0 1mm;
        color: #f0c878;
        font-size: 7pt;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .property-print-title h1 {
        margin: 0;
        color: #fff;
        font-family: "Montserrat", Arial, sans-serif;
        font-size: 16pt;
        font-weight: 700;
        line-height: 1.16;
    }

    .property-print-code {
        align-self: start;
        padding: 2mm 2.7mm;
        color: #f7e4b9;
        border: 0.3mm solid rgb(240 200 120 / 65%);
        border-radius: 1.3mm;
        font-size: 7.5pt;
        font-weight: 800;
        letter-spacing: 0.035em;
        white-space: nowrap;
    }

    .property-print-summary {
        margin-top: 4mm;
        padding: 3.8mm 4.5mm;
        background: #fbfcfa;
        border: 0.3mm solid #dfe6e1;
        border-radius: 2mm;
    }

    .property-print-main-data {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 6mm;
    }

    .property-print-main-data>div {
        display: grid;
        gap: 0.6mm;
    }

    .property-print-main-data span,
    .property-print-features span {
        color: #76827a;
        font-size: 6.8pt;
        font-weight: 700;
        letter-spacing: 0.055em;
        text-transform: uppercase;
    }

    .property-print-main-data strong {
        color: #20362a;
        font-size: 10pt;
    }

    .property-print-price {
        text-align: right;
    }

    .property-print-price strong {
        color: #91692e;
        font-size: 12pt;
    }

    .property-print-location {
        margin: 2.5mm 0 2.8mm;
        color: #516058;
        font-size: 8pt;
    }

    .property-print-dates {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5mm 4mm;
        margin: -1.2mm 0 2.8mm;
        color: #68766e;
        font-size: 7pt;
    }

    .property-print-dates strong {
        color: #405046;
        font-weight: 700;
    }

    .property-print-features {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 1.4mm;
    }

    .property-print-features>div {
        display: grid;
        gap: 0.5mm;
        min-width: 0;
        padding: 1.8mm 1.3mm;
        text-align: center;
        background: #f1f4f1;
        border-radius: 1.2mm;
    }

    .property-print-features strong {
        color: #304438;
        font-size: 8.3pt;
        white-space: nowrap;
    }

    .property-print-features span {
        font-size: 5.5pt;
        letter-spacing: 0.01em;
        text-transform: none;
    }

    .property-print-gallery {
        margin-top: 4mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .property-print-gallery-heading {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin: 0 0 2mm;
    }

    .property-print-gallery-heading h2 {
        margin: 0;
        color: #20362a;
        font-family: "Montserrat", Arial, sans-serif;
        font-size: 10pt;
        font-weight: 800;
    }

    .property-print-gallery-heading span {
        color: #7e8983;
        font-size: 6.6pt;
    }

    .property-print-gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(2, 48mm);
        gap: 2.3mm;
    }

    .property-print-gallery-grid figure {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        background: #edf0ed;
        border: 0.3mm solid #d9e0da;
        border-radius: 1.6mm;
    }

    .property-print-gallery-grid img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .property-print-footer {
        display: flex;
        justify-content: space-between;
        margin-top: 3.2mm;
        padding-top: 2.2mm;
        color: #0d1025;
        background: transparent;
        border-top: 0.3mm solid #e1e7e2;
        font-size: 6.5pt;
    }
}
