:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --ink: #101828;
    --muted: #667085;
    --line: #d9e0ea;
    --line-soft: #eef2f7;
    --primary: #076b58;
    --primary-dark: #064a3e;
    --primary-soft: #e6f4ef;
    --accent: #b98219;
    --danger: #b42318;
    --nav: #101828;
    --nav-2: #17233a;
    --shadow: 0 18px 40px rgba(16, 24, 40, .08);
    --shadow-soft: 0 2px 10px rgba(16, 24, 40, .05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(7, 107, 88, .09), transparent 34%),
        linear-gradient(180deg, #f8fafc 0, var(--bg) 280px);
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 12.5px;
    line-height: 1.45;
}

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: 0;
    margin-bottom: 16px;
}

h2 {
    font-size: 15px;
    font-weight: 650;
    margin-bottom: 14px;
}

h3 {
    font-size: 12.5px;
    font-weight: 650;
}

.muted {
    color: var(--muted);
}

.site-header,
.site-footer {
    align-items: center;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 14px 30px;
}

.site-footer {
    border-bottom: 0;
    border-top: 1px solid var(--line);
    margin-top: 42px;
}

.brand {
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.site-nav,
.site-footer nav,
.app-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-nav a,
.site-footer a,
.app-actions a {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.site-nav a:hover,
.site-footer a:hover,
.app-actions a:hover {
    color: var(--primary);
}

.nav-button,
.button,
button {
    align-items: center;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    justify-content: center;
    min-height: 32px;
    padding: 6px 11px;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.nav-button:hover,
.button:hover,
button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 8px 18px rgba(11, 107, 87, .16);
    color: #fff;
}

.button.secondary {
    background: #243044;
    border-color: #243044;
}

.hero {
    background: linear-gradient(120deg, rgba(10, 88, 72, .94), rgba(24, 34, 50, .9)), url('/assets/img/hero-real-estate.svg');
    background-position: center;
    background-size: cover;
    color: #fff;
    min-height: 480px;
    padding: 72px 30px 56px;
}

.hero-inner,
.section {
    margin: 0 auto;
    max-width: 1180px;
}

.hero h1 {
    font-size: 34px;
    line-height: 1.02;
    margin-bottom: 18px;
    max-width: 780px;
}

.hero p {
    color: rgba(255, 255, 255, .88);
    font-size: 14.5px;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.section {
    padding: 38px 30px 0;
}

.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.metric,
.table-panel {
    background: var(--surface);
    border: 1px solid rgba(216, 224, 234, .78);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.metric {
    overflow: hidden;
    position: relative;
    min-height: 118px;
}

.metric::after {
    background: linear-gradient(135deg, rgba(7, 107, 88, .12), rgba(185, 130, 25, .12));
    border-radius: 999px;
    content: "";
    height: 72px;
    position: absolute;
    right: -22px;
    top: -24px;
    width: 72px;
}

.metric h3 {
    color: var(--muted);
    margin-bottom: 10px;
}

.metric strong {
    color: var(--ink);
    display: block;
    font-size: 21px;
    font-weight: 650;
    margin-bottom: 6px;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,.05), transparent 170px),
        linear-gradient(180deg, var(--nav), #0b1220 62%, #080d18);
    border-right: 1px solid rgba(255, 255, 255, .08);
    color: #cbd5e1;
    height: 100vh;
    overflow-y: auto;
    padding: 16px 13px;
    position: sticky;
    top: 0;
}

.sidebar .brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 11px;
    min-height: 48px;
    margin: 0 4px 18px;
    padding: 8px;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.sidebar .brand strong {
    display: block;
    font-size: 13px;
    letter-spacing: .02em;
}

.sidebar .brand small {
    color: #98a6ba;
    display: block;
    font-size: 10.5px;
    font-weight: 500;
}

.sidebar-section {
    border-top: 1px solid rgba(255, 255, 255, .055);
    margin: 12px 0 16px;
    padding-top: 12px;
}

.sidebar-title {
    color: #8392a8;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0 8px 6px;
    text-transform: uppercase;
}

.sidebar a:not(.brand) {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: 8px;
    color: #d6deea;
    display: flex;
    font-size: 12.3px;
    font-weight: 500;
    min-height: 29px;
    padding: 6px 10px 6px 11px;
}

.sidebar a:not(.brand):hover,
.sidebar a.active {
    background: linear-gradient(90deg, rgba(7, 107, 88, .28), rgba(255, 255, 255, .055));
    border-left-color: var(--accent);
    color: #fff;
}

.app-main {
    min-width: 0;
}

.app-topbar {
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(216, 224, 234, .78);
    display: flex;
    justify-content: space-between;
    min-height: 66px;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.app-topbar strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.topbar-search {
    flex: 1 1 360px;
    margin: 0 22px;
    max-width: 460px;
}

.topbar-search input {
    background: #f8fafc;
    border-color: #dce3ed;
    border-radius: 999px;
    min-height: 36px;
    width: 100%;
}

.app-actions span {
    background: var(--primary-soft);
    border: 1px solid #cfe8df;
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 9px;
}

.content {
    padding: 26px 28px 42px;
}

.content > h1:first-child {
    align-items: center;
    display: flex;
    gap: 10px;
}

.content > h1:first-child::before {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 7px;
    content: "";
    display: inline-block;
    height: 22px;
    width: 6px;
}

.table-panel {
    margin-top: 14px;
    overflow-x: auto;
    padding: 0;
}

.table-panel h2 {
    border-bottom: 1px solid var(--line-soft);
    margin: 0;
    padding: 16px 18px;
}

.table {
    border-collapse: collapse;
    font-size: 12.4px;
    width: 100%;
}

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

.table th {
    background: var(--surface-soft);
    color: #475467;
    font-size: 10.5px;
    font-weight: 650;
    text-transform: uppercase;
}

.table tr:hover td {
    background: #fbfcfe;
}

.table a {
    background: var(--primary-soft);
    border: 1px solid #cfe8df;
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-flex;
    font-weight: 600;
    margin: 1px 2px;
    padding: 3px 8px;
}

.form {
    background: var(--surface);
    border: 1px solid rgba(216, 224, 234, .82);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    max-width: 820px;
    padding: 22px;
}

.form label {
    color: #344054;
    display: grid;
    font-size: 11.8px;
    font-weight: 600;
    gap: 6px;
}

input,
select,
textarea {
    background: #fbfcfe;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    min-height: 38px;
    outline: none;
    padding: 8px 10px;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 107, 87, .12);
}

@media (max-width: 860px) {
    .site-header,
    .site-footer,
    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .topbar-search {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: static;
    }

    .hero h1 {
        font-size: 28px;
    }
}

.modal-backdrop {
    align-items: center;
    background: rgba(9, 15, 27, .56);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 28px;
    position: fixed;
    z-index: 1000;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-window {
    background: var(--surface);
    border: 1px solid rgba(216, 224, 234, .86);
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(16, 24, 40, .22);
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    height: min(640px, 84vh);
    overflow: hidden;
    width: min(620px, 92vw);
}

.modal-titlebar {
    align-items: center;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    padding: 0 14px 0 18px;
}

.modal-titlebar strong {
    font-size: 13px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    min-height: 30px;
    padding: 4px 9px;
}

.modal-close:hover {
    background: #f2f4f7;
    border-color: var(--line);
    box-shadow: none;
    color: var(--ink);
}

.modal-frame {
    border: 0;
    height: 100%;
    width: 100%;
}

.modal-page {
    background: #fff;
}

.modal-content {
    padding: 18px;
}

.modal-content h1 {
    font-size: 17px;
}

.modal-content .form {
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 0;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    min-height: 34px;
    padding: 7px 9px;
}

.modal-content .form {
    gap: 11px;
}
