:root {
    --ink: #142018;
    --paper: #f4efe4;
    --panel: #fffaf1;
    --line: #d8cbb3;
    --forest: #1f3b2c;
    --forest-deep: #14261c;
    --brass: #b8892d;
    --brass-soft: #e8d5a3;
    --moss: #4f7a5c;
    --danger: #9b3b2e;
    --ok: #2f6b45;
    --muted: #6b6458;
    --shadow: 0 18px 40px rgba(20, 32, 24, 0.08);
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--brass); }

.guest-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top right, rgba(184, 137, 45, 0.18), transparent 28%),
        linear-gradient(160deg, #1f3b2c 0%, #14261c 55%, #0e1a13 100%);
    padding: 32px 16px;
}

.auth-card {
    width: min(480px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 40px 36px;
}

.brand-mark {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 1.4rem;
    color: var(--forest);
    margin: 0 0 8px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px 6px;
    margin: 0 0 10px;
    color: #f7ecd2;
}
.sidebar a.brand:hover,
.sidebar a.brand.active {
    background: transparent;
    color: #f7ecd2;
}
.brand-mark-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
    border: 1px solid rgba(232, 213, 163, 0.28);
}
.sidebar .brand .brand-mark {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
}
.auth-logo {
    display: block;
    width: calc(100% + 72px);
    max-width: none;
    height: 132px;
    object-fit: cover;
    object-position: center;
    margin: -40px -36px 24px;
    border-bottom: 1px solid var(--line);
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--brass);
    margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; margin: 0 0 12px; }
.lede { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--forest-deep);
    color: #f4efe4;
    padding: 28px 20px;
}
.sidebar a { color: #e8dcc4; display: block; padding: 10px 12px; border-radius: 2px; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar .brand-mark { color: #f7ecd2; }
.sidebar .nav-label {
    margin: 22px 12px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c4b48f;
}
.main { padding: 32px 40px 64px; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.cols-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.card, .table-wrap, form.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 22px;
    box-shadow: var(--shadow);
}
a.card {
    color: inherit;
    display: block;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover {
    color: inherit;
    border-color: var(--brass);
    transform: translateY(-2px);
}
a.card.danger-card:hover { border-color: var(--danger); }
a.card.ok-card:hover { border-color: var(--ok); }
.stat { font-family: var(--serif); font-size: 2rem; margin: 0; }
.stat-sub { margin: 6px 0 0; font-size: 0.9rem; color: var(--ok); }
.stat-sub.muted { color: var(--muted); }
.bill-checks { display: grid; gap: 8px; margin-bottom: 14px; }
.bill-checks .check {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #fff;
}
.overpay-note { color: var(--ok); margin: -6px 0 14px; }
.muted { color: var(--muted); }
.click-row { cursor: pointer; }
.click-row:hover td { background: rgba(31, 59, 44, 0.04); }

label { display: block; font-size: 0.86rem; margin: 0 0 6px; color: var(--forest-deep); }
input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: #fff;
    font: inherit;
    margin-bottom: 14px;
}
textarea { min-height: 90px; resize: vertical; }

.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    background: var(--forest);
    color: #fff;
    padding: 11px 18px;
    font: inherit;
    letter-spacing: 0.02em;
}
.btn:hover { background: var(--forest-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--forest); border: 1px solid var(--forest); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 7px 12px; font-size: 0.9rem; }

.alert {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}
.alert.error { background: #f8e8e4; border-color: #e3b7af; color: var(--danger); }
.alert.success { background: #e7f2ea; border-color: #b7d4c0; color: var(--ok); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
th { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--line);
}
.badge.pending { background: #f7ecd2; }
.badge.approved, .badge.sent, .badge.paid, .badge.active, .badge.available { background: #e7f2ea; }
.badge.rejected, .badge.failed, .badge.overdue, .badge.inactive { background: #f8e8e4; }
.badge.queued, .badge.occupied { background: #eef2f6; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 8px; }

label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 0.92rem;
    cursor: pointer;
}
label.check input {
    width: auto;
    margin: 0;
}

.amenity-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    margin-bottom: 14px;
}

.listing-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.listing-admin-card {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.listing-admin-photo {
    height: 160px;
    background: #d9cbb0 center/cover no-repeat;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.listing-admin-body { padding: 16px 18px 20px; }
.listing-admin-body h2 { font-size: 1.15rem; margin-bottom: 8px; }
.listing-admin-body .badge { margin-right: 6px; }

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.admin-photo {
    margin: 0;
    border: 1px solid var(--line);
    padding: 8px;
    background: #fff;
}
.admin-photo img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    margin-bottom: 8px;
}
.admin-photo .badge { margin-bottom: 8px; }

.marketing-body {
    background: var(--paper);
    min-height: 100vh;
    color: var(--ink);
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 7vw;
    background: rgba(244, 239, 228, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 203, 179, 0.7);
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--forest-deep);
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
}
.site-brand:hover { color: var(--forest); }
.site-brand .brand-mark-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 0.95rem;
}
.site-nav a { color: var(--forest-deep); }
.site-login {
    border: 1px solid var(--brass);
    color: var(--forest-deep) !important;
    padding: 8px 16px;
    letter-spacing: 0.04em;
}
.site-login:hover {
    background: var(--forest);
    color: #fff !important;
    border-color: var(--forest);
}
.site-flash {
    margin: 0;
    padding: 12px 7vw;
    background: #e7f2ea;
    color: var(--ok);
    border-bottom: 1px solid #b7d4c0;
}

.hero {
    min-height: min(82vh, 760px);
    display: grid;
    align-items: end;
    padding: 72px 7vw 80px;
    background:
        radial-gradient(circle at 80% 10%, rgba(184, 137, 45, 0.22), transparent 32%),
        linear-gradient(165deg, #1f3b2c 0%, #14261c 52%, #0c1610 100%);
    color: #f7ecd2;
    position: relative;
    overflow: hidden;
}
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: #14261c center/cover no-repeat;
    transition: opacity 0.9s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 22, 16, 0.22) 0%, rgba(12, 22, 16, 0.72) 72%);
}
.hero-slide-caption {
    position: absolute;
    left: 7vw;
    top: 88px;
    z-index: 1;
    max-width: 420px;
}
.hero-slide-caption p { margin: 0; color: #f7ecd2; }
.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(247, 236, 210, 0.45);
    background: rgba(12, 22, 16, 0.35);
    color: #f7ecd2;
    cursor: pointer;
    transform: translateY(-50%);
}
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-arrow::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-left: 2px solid #f7ecd2;
    border-bottom: 2px solid #f7ecd2;
    margin: 0 auto;
}
.hero-arrow.prev::before { transform: rotate(45deg); }
.hero-arrow.next::before { transform: rotate(-135deg); }
.hero-arrow:hover { background: rgba(12, 22, 16, 0.6); }
.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 22px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}
.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(247, 236, 210, 0.4);
    cursor: pointer;
}
.hero-dots button.is-active { background: #f7ecd2; }
.hero.has-photo {
    background-image:
        linear-gradient(180deg, rgba(12, 22, 16, 0.28) 0%, rgba(12, 22, 16, 0.72) 70%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}
.hero-copy { max-width: 640px; position: relative; z-index: 2; }
.banner-admin-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.banner-admin-card img { height: 150px; }
.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.05;
    color: #f7ecd2;
    margin-bottom: 16px;
}
.hero .lede { color: rgba(244, 239, 228, 0.86); font-size: 1.15rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero .btn.secondary,
.hero-ghost {
    color: #f7ecd2;
    border-color: rgba(247, 236, 210, 0.55);
}
.hero .btn.secondary:hover,
.hero-ghost:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.hero-meta {
    margin: 22px 0 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--brass-soft);
}

.home-section { padding: 72px 7vw; }
.home-section-head { max-width: 640px; margin-bottom: 36px; }
.home-section h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.listing-card {
    display: block;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: inherit;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(20, 32, 24, 0.14);
    color: inherit;
}
.listing-photo {
    height: 240px;
    background: #cbb992 center/cover no-repeat;
    position: relative;
    display: grid;
    place-items: center;
}
.listing-photo-fallback {
    font-family: var(--serif);
    color: var(--forest-deep);
    opacity: 0.45;
}
.listing-status {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(20, 38, 28, 0.88);
    color: #f7ecd2;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 10px;
}
.listing-status.available { background: rgba(47, 107, 69, 0.95); }
.listing-body { padding: 18px 18px 22px; }
.listing-property {
    margin: 0 0 4px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brass);
}
.listing-body h3 { font-size: 1.25rem; margin-bottom: 6px; }
.listing-meta { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.listing-price {
    font-family: var(--serif);
    font-size: 1.35rem;
    margin: 0;
    color: var(--forest-deep);
}
.listing-price span,
.listing-price.inquire { font-size: 0.92rem; color: var(--muted); font-family: var(--sans); }

.empty-listings {
    border: 1px dashed var(--line);
    background: var(--panel);
    padding: 48px 32px;
    text-align: center;
}

.about-band { background: #efe7d6; }
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.pillar {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 24px;
}
.pillar p { color: var(--muted); line-height: 1.55; margin: 0; }

.contact-band { padding-top: 24px; }
.contact-panel {
    background: var(--forest-deep);
    color: #f4efe4;
    padding: 48px 40px;
}
.contact-panel h2 { color: #f7ecd2; }
.contact-panel .lede { color: rgba(244, 239, 228, 0.8); }
.contact-panel .btn.secondary {
    color: #f7ecd2;
    border-color: rgba(247, 236, 210, 0.5);
}

.site-footer {
    padding: 48px 7vw 28px;
    background: #101a14;
    color: #e8dcc4;
}
.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.site-footer-name { color: #f7ecd2; }
.site-footer .muted { color: #c4b48f; }
.site-footer-links { display: grid; gap: 8px; align-content: start; }
.site-footer-links a { color: #e8dcc4; }
.site-copy { margin: 0; font-size: 0.85rem; color: #8d836c; }

.unit-page { padding: 36px 7vw 72px; }
.crumb { color: var(--muted); margin-bottom: 18px; }
.unit-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
}
.unit-header-aside { text-align: right; }
.unit-header-aside .listing-status { position: static; display: inline-block; margin-bottom: 10px; }
.unit-gallery { margin-bottom: 28px; }
.unit-main-photo {
    min-height: min(62vh, 560px);
    background: #cbb992 center/cover no-repeat;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
}
.unit-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.unit-thumb {
    width: 88px;
    height: 64px;
    border: 2px solid transparent;
    background: center/cover no-repeat #ddd;
    cursor: pointer;
    padding: 0;
}
.unit-thumb.is-active { border-color: var(--brass); }
.unit-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.unit-facts div {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 16px 18px;
}
.unit-facts span {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.unit-copy { max-width: 720px; margin-bottom: 28px; }
.unit-copy p { line-height: 1.65; color: var(--ink); }
.amenity-chips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.amenity-chips li {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 8px 12px;
    font-size: 0.9rem;
}
.unit-inquire { margin-top: 12px; }

.auth-home-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-stats { grid-template-columns: 1fr; }
    .main { padding: 20px 16px 40px; }
    .site-header { padding: 12px 18px; }
    .site-nav { gap: 12px; font-size: 0.88rem; }
    .hero, .home-section, .unit-page, .site-footer { padding-left: 18px; padding-right: 18px; }
    .pillar-grid { grid-template-columns: 1fr; }
    .unit-header, .unit-header-aside { display: block; text-align: left; }
    .amenity-options { grid-template-columns: 1fr; }
    .hero { min-height: 70vh; padding-top: 48px; }
}

@media (max-width: 640px) {
    .site-nav a:not(.site-login) { display: none; }
}
