:root {
    --bg: #f7f4ef;
    --surface: #ffffff;
    --surface-soft: #f1eee8;
    --text: #1f2933;
    --muted: #64707d;
    --border: #ddd6cc;
    --primary: #0d5c57;
    --primary-dark: #083f3c;
    --accent: #c69b4f;
    --danger: #b42318;
    --success: #177245;
    --shadow: 0 18px 45px rgba(31, 41, 51, 0.10);
    --radius: 8px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 244, 239, 0.94);
    border-bottom: 1px solid rgba(221, 214, 204, 0.8);
    backdrop-filter: blur(14px);
}

.site-header-admin {
    background: rgba(255, 255, 255, 0.96);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-size: 14px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 8px 10px;
    color: var(--muted);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(13, 92, 87, 0.08);
}

.flash-stack {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.flash {
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
}

.flash-success {
    color: var(--success);
    border-color: rgba(23, 114, 69, 0.25);
}

.flash-error {
    color: var(--danger);
    border-color: rgba(180, 35, 24, 0.25);
}

.hero-section {
    padding: 62px 0 52px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 48px;
    align-items: center;
}

.hero-copy h1 {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 18px;
}

.hero-panel {
    position: relative;
    min-height: 420px;
}

.hero-photo-stack {
    position: relative;
    height: 420px;
}

.hero-photo {
    position: absolute;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-photo-large {
    inset: 0 54px 48px 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='650' viewBox='0 0 900 650'%3E%3Crect width='900' height='650' fill='%23d8d6cc'/%3E%3Crect x='80' y='90' width='740' height='420' rx='8' fill='%23f6f1e8'/%3E%3Crect x='130' y='145' width='260' height='260' fill='%23b8c6bd'/%3E%3Crect x='430' y='145' width='330' height='52' fill='%236f8d88'/%3E%3Crect x='430' y='226' width='250' height='34' fill='%23c69b4f'/%3E%3Crect x='430' y='292' width='330' height='114' fill='%23d7d0c4'/%3E%3Crect x='0' y='535' width='900' height='115' fill='%230d5c57'/%3E%3C/svg%3E");
}

.hero-photo-small {
    right: 0;
    bottom: 0;
    width: 45%;
    height: 42%;
    border: 8px solid var(--bg);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.02)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='360' viewBox='0 0 520 360'%3E%3Crect width='520' height='360' fill='%23e7e1d7'/%3E%3Crect x='46' y='68' width='428' height='210' rx='8' fill='%23ffffff'/%3E%3Crect x='82' y='96' width='150' height='150' fill='%23c6b07a'/%3E%3Crect x='260' y='96' width='170' height='42' fill='%230d5c57'/%3E%3Crect x='260' y='162' width='118' height='28' fill='%23aebbb7'/%3E%3Crect x='260' y='216' width='170' height='28' fill='%23d7d0c4'/%3E%3C/svg%3E");
}

.hero-card {
    position: absolute;
    left: 28px;
    bottom: 28px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.hero-card span {
    color: var(--muted);
    font-size: 14px;
}

.listing-section,
.detail-content {
    padding: 34px 0 72px;
}

.section-heading,
.admin-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-heading h2,
.admin-title-row h1 {
    margin: 0 0 4px;
    font-size: 30px;
    line-height: 1.15;
}

.section-heading p,
.admin-title-row p,
.muted {
    margin: 0;
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(31, 41, 51, 0.06);
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 92, 87, 0.12);
}

small {
    color: var(--muted);
    font-weight: 400;
}

.filter-actions,
.form-actions,
.detail-actions,
.title-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.btn-primary {
    color: #fff;
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    color: var(--primary);
    background: rgba(13, 92, 87, 0.08);
    border-color: rgba(13, 92, 87, 0.18);
}

.btn-outline {
    color: var(--primary);
    background: #fff;
    border-color: rgba(13, 92, 87, 0.28);
}

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

.btn-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

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

.property-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(31, 41, 51, 0.07);
}

.property-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
}

.property-media img,
.detail-media img,
.gallery-grid img,
.interest-detail-card img,
.interest-property img,
.table-property img,
.admin-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-placeholder,
.thumb-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    color: var(--muted);
    background: linear-gradient(135deg, #e6e0d6, #f6f2eb);
    font-weight: 700;
}

.status-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #fff;
}

.status-badge.inline {
    position: static;
    color: inherit;
    margin-bottom: 12px;
}

.available {
    background: rgba(23, 114, 69, 0.12);
    color: var(--success);
}

.status-badge.available {
    background: var(--success);
    color: #fff;
}

.unavailable {
    background: rgba(100, 112, 125, 0.14);
    color: #4c5661;
}

.status-badge.unavailable {
    background: #4c5661;
    color: #fff;
}

.featured {
    background: rgba(198, 155, 79, 0.18);
    color: #8a621f;
}

.neutral {
    background: rgba(13, 92, 87, 0.10);
    color: var(--primary);
}

.property-content {
    padding: 18px;
}

.property-price,
.detail-price {
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
}

.property-card h3 {
    margin: 8px 0 6px;
    font-size: 20px;
    line-height: 1.2;
}

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

.property-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.property-meta span,
.detail-meta span {
    padding: 7px 9px;
    background: var(--surface-soft);
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.room-card-summary {
    margin: -4px 0 14px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.room-detail-summary,
.room-availability {
    padding: 14px;
    background: rgba(13, 92, 87, 0.07);
    border: 1px solid rgba(13, 92, 87, 0.16);
    border-radius: var(--radius);
}

.room-detail-summary {
    display: grid;
    gap: 4px;
    margin: 0 0 18px;
}

.room-detail-summary strong {
    color: var(--primary);
}

.room-detail-summary span {
    color: var(--muted);
    font-size: 14px;
}

.empty-state {
    padding: 44px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.empty-state.compact {
    padding: 28px;
}

.empty-state h2,
.empty-state h3,
.empty-state h1 {
    margin: 0 0 8px;
}

.page-block {
    padding: 60px 0;
}

.detail-hero {
    padding: 38px 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 34px;
    align-items: center;
}

.detail-media {
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: var(--surface-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-placeholder {
    min-height: 420px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--primary);
    font-weight: 700;
}

.detail-summary h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
}

.detail-summary p {
    color: var(--muted);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.detail-main,
.interest-panel,
.panel,
.auth-card,
.receipt-document {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(31, 41, 51, 0.06);
}

.detail-main,
.interest-panel,
.panel {
    padding: 22px;
}

.detail-main h2,
.interest-panel h2,
.panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-main h2:not(:first-child) {
    margin-top: 30px;
}

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

.gallery-grid a {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    background: var(--surface-soft);
}

.video-grid {
    display: grid;
    gap: 14px;
}

.video-grid video,
.admin-media-item video {
    width: 100%;
    background: #111827;
    border-radius: 6px;
}

.interest-panel {
    position: sticky;
    top: 94px;
}

.interest-property {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: 6px;
}

.interest-property img {
    aspect-ratio: 1;
    border-radius: 6px;
}

.interest-property span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 14px;
}

.admin-page {
    background: #f3f5f3;
}

.admin-main {
    padding: 32px 0 70px;
}

.stats-grid,
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-actions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.admin-action {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-card span,
.admin-action span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
}

.admin-action strong {
    display: block;
    margin-bottom: 8px;
}

.admin-two-col {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

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

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 27px;
}

.checkbox-label input {
    width: 18px;
    min-height: 18px;
}

.room-availability {
    display: grid;
    gap: 14px;
}

.room-availability-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.room-availability h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.room-availability p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.room-summary {
    flex: 0 0 auto;
    padding: 8px 10px;
    color: var(--primary);
    background: #fff;
    border: 1px solid rgba(13, 92, 87, 0.18);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
}

.room-check-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.room-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 700;
}

.room-check input {
    width: 18px;
    min-height: 18px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.table-property {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.table-property img,
.thumb-placeholder {
    width: 62px;
    height: 52px;
    flex: 0 0 62px;
    border-radius: 6px;
    overflow: hidden;
    font-size: 11px;
}

.table-property span,
.table-note {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

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

.admin-media-item {
    display: grid;
    gap: 8px;
}

.admin-media-item img {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
}

.auth-page {
    min-height: calc(100vh - 148px);
    display: grid;
    place-items: center;
    padding: 48px 0;
}

.auth-card {
    width: min(440px, 100%);
    padding: 28px;
}

.auth-card h1 {
    margin: 0 0 8px;
}

.auth-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

.auth-card form,
.auth-card {
    display: grid;
    gap: 16px;
}

.auth-link {
    color: var(--primary);
    text-align: center;
    font-weight: 700;
}

.detail-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 14px;
    margin: 0 0 18px;
}

.detail-list dt {
    color: var(--muted);
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
}

.interest-detail-card {
    display: grid;
    gap: 16px;
}

.interest-detail-card img {
    aspect-ratio: 16 / 10;
    border-radius: 6px;
}

.receipt-document {
    width: min(820px, 100%);
    margin: 0 auto;
    padding: 42px;
}

.receipt-document header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--text);
}

.receipt-document header span {
    color: var(--muted);
    font-weight: 700;
}

.receipt-document h1 {
    margin: 8px 0 0;
    font-size: 28px;
}

.receipt-document h2 {
    margin: 0 0 8px;
    font-size: 17px;
}

.receipt-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.receipt-values div {
    padding: 16px;
    background: var(--surface-soft);
    border-radius: 6px;
}

.receipt-values span {
    display: block;
    color: var(--muted);
}

.receipt-values strong {
    font-size: 22px;
}

@media (max-width: 980px) {
    .hero-grid,
    .detail-grid,
    .detail-content,
    .admin-two-col {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .stats-grid,
    .admin-actions-grid,
    .property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .room-check-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .interest-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

    .header-inner,
    .footer-inner,
    .section-heading,
    .admin-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-inner {
        padding: 12px 0;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav a {
        padding: 8px;
    }

    .hero-section {
        padding: 36px 0;
    }

    .hero-grid,
    .detail-grid {
        gap: 26px;
    }

    .hero-panel,
    .hero-photo-stack {
        min-height: 320px;
        height: 320px;
    }

    .filter-bar,
    .property-grid,
    .gallery-grid,
    .stats-grid,
    .admin-actions-grid,
    .form-grid.two,
    .form-grid.four,
    .admin-media-grid,
    .receipt-values {
        grid-template-columns: 1fr;
    }

    .room-availability-header {
        flex-direction: column;
    }

    .room-summary {
        width: 100%;
    }

    .room-check-grid {
        grid-template-columns: 1fr;
    }

    .detail-content {
        padding-top: 22px;
    }

    .detail-main,
    .interest-panel,
    .panel {
        padding: 17px;
    }

    .detail-list {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .receipt-document {
        padding: 24px;
    }

    .receipt-document header {
        flex-direction: column;
    }
}

@media print {
    body {
        background: #fff;
    }

    .site-header,
    .site-footer,
    .flash-stack,
    .no-print {
        display: none !important;
    }

    .container {
        width: 100%;
    }

    .admin-main {
        padding: 0;
    }

    .receipt-document {
        border: 0;
        box-shadow: none;
        width: 100%;
        padding: 0;
    }
}
