:root {
    --bg: #f6f3ee;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #667085;
    --brand: #0f5fb8;
    --brand-dark: #0b3f88;
    --line: #e5e7eb;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    padding-top: 103px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px;
}

.site-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    color: var(--text);
    column-gap: clamp(12px, 2vw, 24px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding: 14px 32px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
}

.brand {
    align-items: center;
    display: flex;
    justify-self: start;
}

.brand img {
    height: 74px;
    object-fit: contain;
    width: auto;
}

.header-whatsapp {
    align-items: center;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: inherit;
    display: inline-flex;
    gap: 10px;
    justify-self: center;
    padding: 8px 14px;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-whatsapp:hover {
    background: #ecfdf5;
    border-color: #86efac;
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.18);
}

.header-whatsapp-icon {
    flex-shrink: 0;
}

.header-whatsapp-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
    text-align: left;
}

.header-whatsapp-label {
    color: #15803d;
    font-size: 0.8125rem;
    font-weight: 600;
}

.header-whatsapp-phone {
    color: var(--text);
    font-size: 0.9375rem;
}

.nav {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-self: end;
}

.nav form {
    margin: 0;
}

.nav-link,
.nav .link-button {
    align-items: center;
    background: none;
    border: 0;
    border-radius: 10px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    justify-content: center;
    padding: 8px 12px;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav .link-button:hover {
    background: var(--brand);
    color: #fff;
}

.hero {
    background: linear-gradient(135deg, #0f5fb8, #073b7a);
    border-radius: 28px;
    color: #fff;
    margin-bottom: 24px;
    padding: 48px 48px 56px;
}

.hero-eyebrow {
    margin: 0 0 28px;
}

.hero-inner {
    align-items: stretch;
    display: grid;
    gap: clamp(24px, 4vw, 40px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-aside {
    display: flex;
    flex-direction: column;
}

.hero-copy h1 {
    margin: 0;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.05;
    max-width: none;
}

.hero p {
    color: #dbeafe;
    max-width: 620px;
}

.hero p.hero-tagline {
    color: #fff;
}

.hero-tagline {
    background: rgba(255, 255, 255, 0.14);
    border-left: 5px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    color: #fff;
    flex: 1;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 600;
    line-height: 1.55;
    margin: 0;
    max-width: none;
    padding: 22px 26px;
}

.hero-hint {
    color: #dbeafe;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    max-width: 36rem;
}

.eyebrow {
    color: var(--brand);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #bfdbfe;
}

.panel,
.auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
    margin-bottom: 24px;
    padding: 24px;
}

.label-heading {
    align-items: baseline;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filters-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters-row--location {
    align-items: end;
}

.filters-row--location > button[type="submit"] {
    align-self: end;
    font-size: 0.9rem;
    justify-self: start;
    padding: 10px 18px;
    width: auto;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
    color: var(--muted);
    display: grid;
    font-size: .9rem;
    font-weight: 700;
    gap: 6px;
}

label .required-mark {
    color: #b42318;
    color: var(--danger, #b42318);
    font-weight: 700;
}

label.field-has-error input {
    border-color: var(--danger, #b42318);
}

.stack label small,
.property-contact label small {
    color: var(--danger, #b42318);
    font-weight: 600;
}

.description-field {
    display: grid;
    gap: 6px;
}

.description-label-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.description-field-label {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.button-ai-description {
    flex-shrink: 0;
    font-size: .875rem;
    padding: 8px 14px;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    padding: 12px 14px;
    width: 100%;
}

textarea {
    resize: vertical;
}

button,
.button {
    align-items: center;
    background: var(--brand);
    border: 0;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    padding: 12px 18px;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
}

.button.secondary {
    background: #eff6ff;
    color: var(--brand-dark);
}

.section {
    margin: 42px 0;
}

.section.narrow {
    max-width: 820px;
}

.section-title {
    margin-bottom: 18px;
}

.section-title h2,
.admin-heading h1,
.auth-card h1 {
    margin: 0;
}

.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
}

.property-image {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: #dbe7e4;
    color: var(--muted);
    display: flex;
    font-weight: 700;
    justify-content: center;
}

.property-image.large {
    min-height: 360px;
}

.property-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.property-body {
    padding: 18px;
}

.property-body h3 {
    margin: 10px 0 6px;
}

.property-body p {
    color: var(--muted);
    margin: 0 0 12px;
}

.badge {
    background: #dbeafe;
    border-radius: 999px;
    color: #0b3f88;
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    padding: 6px 10px;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-warn {
    background: #ffedd5;
    color: #9a3412;
}

.analytics-hint {
    color: var(--muted);
    font-size: .92rem;
    margin: 0 0 20px;
}

.analytics-kpis {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.analytics-kpi {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

.analytics-kpi span {
    color: var(--muted);
    display: block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.analytics-kpi strong {
    display: block;
    font-size: 1.6rem;
    margin-top: 6px;
}

.analytics-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.analytics-grid h3,
.panel .section-title h2 {
    margin: 0 0 16px;
}

.source-bars {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.source-bars li {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 110px minmax(0, 1fr) auto;
}

.source-label {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.source-track {
    background: #eef2f6;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.source-fill {
    background: var(--brand);
    display: block;
    height: 100%;
    min-width: 8px;
}

.day-chart {
    align-items: end;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    min-height: 160px;
}

.day-col {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.day-bars {
    align-items: end;
    display: flex;
    gap: 3px;
    height: 140px;
    justify-content: center;
    width: 100%;
}

.day-bar {
    border-radius: 6px 6px 2px 2px;
    display: block;
    min-height: 0;
    width: 8px;
}

.day-bar-views {
    background: var(--brand);
}

.day-bar-inquiries {
    background: #15803d;
}

.day-col small {
    color: var(--muted);
    font-size: .68rem;
}

.chart-legend {
    color: var(--muted);
    display: flex;
    font-size: .85rem;
    font-weight: 700;
    gap: 16px;
    margin: 12px 0 0;
}

.legend-views::before,
.legend-inquiries::before {
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 8px;
    margin-right: 6px;
    width: 8px;
}

.legend-views::before {
    background: var(--brand);
}

.legend-inquiries::before {
    background: #15803d;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.features span {
    background: #f1f5f9;
    border-radius: 999px;
    color: #475467;
    padding: 6px 10px;
}

.prices {
    display: grid;
    gap: 4px;
}

.prices.big {
    font-size: 1.15rem;
    margin: 20px 0;
}

.admin-preview-return {
    margin-block-end: 18px;
}

.property-detail {
    display: grid;
    gap: 28px;
    grid-template-columns: 1.4fr .8fr;
}

.property-detail-main {
    display: grid;
    gap: 28px;
    min-width: 0;
}

.gallery {
    display: grid;
    gap: 12px;
}

.gallery-stage {
    position: relative;
}

.gallery-main {
    background: #e8e4dc;
    border-radius: 20px;
    height: 420px;
    object-fit: cover;
    width: 100%;
}

.gallery-nav {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: grid;
    font-size: 1.6rem;
    height: 42px;
    line-height: 1;
    padding: 0;
    place-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    z-index: 1;
}

.gallery-nav:hover {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand);
}

.gallery-nav-prev {
    left: 12px;
}

.gallery-nav-next {
    right: 12px;
}

.gallery-counter {
    background: rgba(31, 41, 51, .72);
    border-radius: 999px;
    bottom: 14px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 6px 12px;
    position: absolute;
    right: 14px;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.gallery-thumb {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    flex: 0 0 96px;
    overflow: hidden;
    padding: 0;
}

.gallery-thumb img {
    aspect-ratio: 4 / 3;
    display: block;
    height: auto;
    object-fit: cover;
    width: 96px;
}

.gallery-thumb:hover {
    border-color: #c5d4e8;
}

.gallery-thumb.is-active {
    border-color: var(--brand);
}

.property-description h2 {
    margin: 0 0 12px;
}

.detail-panel {
    align-self: start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    padding: 24px;
    position: sticky;
    top: 116px;
}

.property-contact {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    position: relative;
}

.property-contact h2 {
    font-size: 1.15rem;
    margin: 0;
}

.property-contact > p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.property-contact button {
    margin-top: 4px;
    width: 100%;
}

.contact-honeypot {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

.description {
    color: #344054;
    font-size: 1.05rem;
}

.admin-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 24px 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px;
    text-align: left;
    vertical-align: middle;
}

td span {
    color: var(--muted);
    display: block;
}

.actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.actions form {
    margin: 0;
}

.action-icon {
    align-items: center;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    height: 36px;
    justify-content: center;
    padding: 0;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    width: 36px;
}

.action-icon:hover {
    background: #e8f1fb;
    border-color: #c7dbf5;
    box-shadow: 0 4px 12px rgba(15, 95, 184, 0.12);
    color: var(--brand);
    transform: translateY(-1px) scale(1.06);
}

.action-icon:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.action-icon--danger {
    background: #fef3f2;
    color: var(--danger);
}

.action-icon--danger:hover {
    background: #fee4e2;
    border-color: #fecdca;
    box-shadow: 0 4px 12px rgba(180, 35, 24, 0.12);
    color: #912018;
}

.danger {
    background: #fee4e2;
    color: var(--danger);
}

.danger:hover {
    background: #fecdca;
}

.span-2 {
    grid-column: span 2;
}

.admin-form {
    display: grid;
    gap: 20px;
}

.checks,
.stack {
    display: grid;
    gap: 14px;
}

.checkbox {
    align-items: center;
    display: flex;
    font-weight: 600;
    gap: 8px;
}

.checkbox input {
    width: auto;
}

.auth-card {
    margin: 48px auto;
    max-width: 420px;
}

.photo-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.photo-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.photo-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.photo-item form {
    padding: 10px;
}

.flash,
.errors,
.empty {
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.flash {
    background: #eff6ff;
    color: #0b3f88;
}

.errors {
    background: #fff1f3;
    color: #b42318;
}

.empty {
    background: #f8fafc;
    color: var(--muted);
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding-left: 0;
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-aside {
        order: 2;
    }

    .hero-copy {
        order: 1;
    }

    .hero {
        padding: 40px 24px 44px;
    }

    .filters-row,
    .form-grid,
    .grid,
    .property-detail,
    .photo-grid,
    .analytics-kpis,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .gallery-main {
        height: min(58vw, 320px);
    }

    .gallery-thumb {
        flex-basis: 80px;
    }

    .gallery-thumb img {
        width: 80px;
    }

    .span-2 {
        grid-column: span 1;
    }

    .site-header {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        row-gap: 12px;
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .actions {
        justify-content: flex-start;
    }

    .brand,
    .header-whatsapp,
    .nav {
        justify-self: stretch;
    }

    .nav {
        flex-wrap: wrap;
        width: 100%;
    }

    .header-whatsapp {
        align-self: stretch;
        justify-content: center;
    }
}
