:root {
    --ink: #172a36;
    --ink-soft: #48606a;
    --muted: #74878b;
    --line: #e4ece8;
    --surface: #ffffff;
    --canvas: #f5f8f6;
    --green: #15745e;
    --green-dark: #105b4a;
    --green-light: #e6f4ee;
    --lime: #c9ef9a;
    --shadow-card: 0 12px 34px rgba(27, 58, 47, .055);
    --shadow-float: 0 24px 70px rgba(13, 36, 34, .2);
}

.brand-image {
    display: block;
    width: auto;
    max-width: 150px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.admin-brand .brand-image {
    max-height: 40px;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--app-font, Inter), "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: var(--ink);
    background: var(--lime);
}

a {
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.shell {
    background:
        radial-gradient(ellipse at 74% -18%, rgba(201, 239, 154, .17), transparent 34%),
        var(--canvas);
}

.sidebar {
    z-index: 4;
    width: 258px;
    padding: 27px 16px 18px;
    background:
        radial-gradient(ellipse at 10% 0%, rgba(60, 127, 105, .2), transparent 42%),
        var(--sidebar-bg, #142b30);
    box-shadow: 12px 0 36px rgba(18, 40, 42, .07);
}

.brand {
    gap: 12px;
    padding: 0 9px;
    font-size: 15px;
    letter-spacing: -.025em;
}

.brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    background: var(--lime);
    color: #17362d;
    box-shadow: 0 5px 16px rgba(201, 239, 154, .16);
    font-size: 19px;
}

.brand-mark > span {
    display: block;
    transform: translateY(-1px);
}

.brand-copy {
    display: grid;
    gap: 2px;
    color: #fff;
    font-size: 17px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -.055em;
}

.brand-copy > span {
    display: inline;
    color: var(--lime);
}

.brand-copy small {
    margin-top: 4px;
    color: #8fa9a4;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .16em;
}

.nav-label,
.eyebrow {
    color: #8a9e99;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .16em;
}

.nav-label {
    margin: 43px 11px 12px;
}

.nav {
    gap: 4px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #afc1bd;
    font-size: 12px;
    font-weight: 550;
}

.nav a:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

.nav a.active {
    border-color: rgba(201, 239, 154, .12);
    background: rgba(201, 239, 154, .11);
    color: #fff;
}

.nav-symbol {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 8px;
    color: #93aaa4;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .03em;
}

.nav a.active .nav-symbol {
    border-color: transparent;
    background: var(--lime);
    color: #1d4739;
}

.sidebar-bottom {
    margin-top: auto;
}

.sidebar-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 3px 15px;
    padding: 13px 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}

.sidebar-note-icon {
    display: grid;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    place-items: center;
    border-radius: 9px;
    background: rgba(201, 239, 154, .12);
    color: var(--lime);
    font-size: 14px;
}

.sidebar-note > span:last-child {
    display: grid;
    gap: 4px;
}

.sidebar-note strong {
    color: #e5eeeb;
    font-size: 10px;
    font-weight: 650;
}

.sidebar-note small {
    color: #91a49f;
    font-size: 9px;
}

.side-footer {
    padding: 10px 9px 3px;
    color: #77908a;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
}

.main {
    margin-left: 258px;
}

.topbar {
    position: sticky;
    z-index: 3;
    top: 0;
    height: 76px;
    padding: 0 38px;
    border-color: rgba(222, 233, 227, .85);
    background: var(--header-bg, rgba(255, 255, 255, .9));
    backdrop-filter: blur(18px);
}

.topbar-title {
    display: grid;
    gap: 4px;
}

.topbar-title .eyebrow {
    color: #82948c;
    font-size: 8px;
}

.topbar-title strong {
    color: #243a3b;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.user-menu {
    gap: 12px;
    color: var(--ink-soft);
    font-size: 11px;
}

.topbar-date {
    color: #7e908a;
    font-size: 10px;
    font-weight: 550;
}

.topbar-divider {
    width: 1px;
    height: 25px;
    margin: 0 4px;
    background: var(--line);
}

.user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid #d6e8df;
    border-radius: 50%;
    background: #e8f4ec;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 750;
}

.user-name {
    display: grid;
    gap: 3px;
    color: #29413f;
    font-size: 11px;
    font-weight: 650;
}

.user-name small {
    color: #84938e;
    font-size: 9px;
    font-weight: 500;
}

.user-menu form,
.admin-user form {
    margin-left: 7px;
}

.link-button {
    padding: 7px 10px;
    border-radius: 7px;
    color: #55736b;
    font-size: 10px;
    font-weight: 650;
}

.link-button:hover {
    background: #eff6f2;
    color: var(--green-dark);
}

.content {
    max-width: 1540px;
    padding: 34px 38px 48px;
    animation: content-enter .48s cubic-bezier(.2, .75, .2, 1) both;
}

.welcome-row {
    margin-bottom: 23px;
}

.welcome-row h1 {
    margin-bottom: 7px;
    color: #1b3335;
    font-size: 26px;
    font-weight: 720;
    letter-spacing: -.045em;
}

.muted {
    color: #82918d;
    font-size: 11px;
    line-height: 1.65;
}

.button {
    min-height: 39px;
    padding: 0 15px;
    border-color: #dce8e1;
    border-radius: 9px;
    background: var(--surface);
    color: #36534a;
    font-size: 11px;
    font-weight: 650;
    box-shadow: 0 2px 6px rgba(35, 72, 54, .025);
}

.button:hover {
    transform: translateY(-1px);
    border-color: #bfd8cb;
    background: #fafffc;
    filter: none;
}

.button.primary {
    border-color: var(--green);
    background: var(--green);
    color: white;
    box-shadow: 0 5px 13px rgba(21, 116, 94, .16);
}

.button.primary:hover {
    border-color: var(--green-dark);
    background: var(--green-dark);
    box-shadow: 0 7px 17px rgba(21, 116, 94, .23);
}

.stats-grid {
    gap: 13px;
    margin-bottom: 19px;
}

.stat-card,
.panel {
    border-color: #e6ede8;
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.stat-card {
    position: relative;
    min-height: 112px;
    overflow: hidden;
    gap: 17px;
    padding: 18px 19px;
    animation: card-enter .5s cubic-bezier(.2, .75, .2, 1) both;
}

.stat-card::after {
    position: absolute;
    top: 17px;
    right: 17px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c6e8d5;
    content: "";
}

.stat-card span {
    color: #7d8f89;
    font-size: 10px;
    font-weight: 550;
}

.stat-card strong {
    color: #23413b;
    font-size: 23px;
    font-weight: 720;
    letter-spacing: -.045em;
}

.section-grid {
    gap: 16px;
}

.panel {
    padding: 20px;
    animation: card-enter .55s cubic-bezier(.2, .75, .2, 1) both;
}

.panel-heading {
    margin-bottom: 13px;
}

.panel-heading h2 {
    color: #29413d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.panel-heading a {
    color: var(--green);
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
}

.list-row {
    min-height: 54px;
    border-top-color: #edf2ef;
    color: #344a45;
    font-size: 11px;
}

.list-row small,
td > small {
    color: #84938e;
    font-size: 9px;
}

.list-row b {
    color: #29473f;
    font-size: 11px;
}

.list-row a {
    color: var(--green);
    text-decoration: none;
}

.list-row a:hover,
.auth-foot a:hover {
    color: var(--green-dark);
    text-decoration: underline;
}

.empty {
    color: #84938e;
    font-size: 11px;
}

.danger-text {
    color: #b94d48 !important;
}

.badge {
    background: #eaf5ee;
    color: #367760;
    font-size: 9px;
    font-weight: 650;
}

.notice {
    border: 1px solid #d6ecdf;
    border-radius: 10px;
    background: #eff8f2;
    color: #286d50;
    font-size: 11px;
    line-height: 1.5;
}

.notice.error {
    border-color: #f0dad5;
    background: #fff4f1;
    color: #a8473d;
}

.form-stack {
    gap: 15px;
}

.form-stack label,
.report-filter label {
    color: #49615a;
    font-size: 10px;
    font-weight: 650;
}

.form-stack input,
.form-stack select,
.report-filter input,
.report-filter select,
.inline-form input,
.collect-form input,
.collect-form select {
    min-height: 39px;
    border-color: #dce7e1;
    border-radius: 8px;
    background: #fff;
    color: #263d38;
    font-family: inherit;
    font-size: 11px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-stack input,
.form-stack select {
    height: 39px;
}

.form-stack input::placeholder {
    color: #a4b0ab;
}

.form-stack input:focus,
.form-stack select:focus,
.report-filter input:focus,
.report-filter select:focus,
.inline-form input:focus,
.collect-form input:focus,
.collect-form select:focus {
    outline: none;
    border-color: #73ad94;
    box-shadow: 0 0 0 3px rgba(73, 155, 116, .12);
}

.form-stack .check {
    color: #687d75;
    font-size: 10px;
}

.check input {
    accent-color: var(--green);
}

.report-filter {
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

fieldset {
    border-color: var(--line);
    border-radius: 10px;
}

legend {
    color: #49615a;
}

.table-wrap {
    border-radius: 9px;
}

table {
    color: #3c514b;
    font-size: 10px;
}

th {
    border-bottom-color: #e6ede8;
    background: #f8faf8;
    color: #72867d;
    font-size: 8px;
    letter-spacing: .1em;
}

td {
    border-bottom-color: #edf2ef;
    line-height: 1.5;
}

tbody tr {
    transition: background-color .16s ease;
}

tbody tr:hover {
    background: #f8fbf8;
}

.table-panel {
    overflow: hidden;
}

.pagination a,
.pagination span {
    border-color: #e1ebe5;
    border-radius: 7px;
    color: #47685c;
}

.pagination a:hover {
    background: #edf6f0;
    color: var(--green-dark);
}

.inline-form input,
.collect-form input,
.collect-form select {
    padding: 0 9px;
    font-size: 10px;
}

.staff-entry {
    border-color: #eaf0ec;
}

.staff-entry summary {
    color: #38544a;
    font-weight: 650;
}

.floor-management {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eaf0ec;
}

.floor-management summary {
    color: var(--green);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.floor-management[open] summary {
    margin-bottom: 15px;
}

.floor-directory {
    margin-top: 17px;
}

.floor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #eaf0ec;
}

.floor-details {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.floor-details strong {
    color: #344d43;
    font-size: 11px;
}

.floor-details small {
    color: #84938e;
    font-size: 9px;
}

.floor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floor-actions form {
    margin: 0;
}

.floor-edit {
    position: relative;
}

.floor-edit > summary {
    padding: 9px 13px;
    border: 1px solid #dce8e1;
    border-radius: 9px;
    color: #36534a;
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
    list-style: none;
}

.floor-edit > summary::-webkit-details-marker {
    display: none;
}

.floor-edit[open] > summary {
    border-color: #bfd8cb;
    background: #f3f9f5;
}

.floor-edit .form-stack {
    position: absolute;
    z-index: 2;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 42px));
    padding: 16px;
    border: 1px solid #e1ebe5;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-float);
}

.floor-delete:disabled {
    cursor: not-allowed;
    opacity: .48;
    box-shadow: none;
}

.unit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #eaf0ec;
}

.unit-details {
    display: grid;
    justify-items: start;
    gap: 5px;
    min-width: 0;
}

.unit-details > strong {
    color: #344d43;
    font-size: 11px;
}

.unit-details > small {
    color: #84938e;
    font-size: 9px;
}

.unit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.unit-actions form {
    margin: 0;
}

.unit-edit {
    position: relative;
}

.unit-edit > summary {
    padding: 9px 13px;
    border: 1px solid #dce8e1;
    border-radius: 9px;
    color: #36534a;
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
    list-style: none;
}

.unit-edit > summary::-webkit-details-marker {
    display: none;
}

.unit-edit[open] > summary {
    border-color: #bfd8cb;
    background: #f3f9f5;
}

.unit-edit .form-stack {
    position: absolute;
    z-index: 2;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 42px));
    max-height: min(75vh, 620px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid #e1ebe5;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-float);
}

.unit-delete:disabled {
    cursor: not-allowed;
    opacity: .48;
    box-shadow: none;
}

.document-upload input {
    font-family: inherit;
}

.property-photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.property-photo-gallery img {
    width: 90px;
    height: 72px;
    object-fit: cover;
    border: 1px solid #e1ebe5;
    border-radius: 9px;
}

.property-photo-item {
    display: grid;
    justify-items: start;
    gap: 5px;
}

.property-photo-item > span {
    max-width: 150px;
    overflow-wrap: anywhere;
    color: #84938e;
    font-size: 8px;
}

.tenant-entry {
    padding-bottom: 12px;
    border-bottom: 1px solid #eaf0ec;
}

.tenant-entry:last-of-type {
    border-bottom: 0;
}

.tenant-profile-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tenant-profile-heading > img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: cover;
    border-radius: 50%;
}

.tenant-profile-meta {
    display: grid;
    gap: 4px;
    margin: 8px;
}

.tenant-profile-meta small {
    color: #84938e;
    font-size: 9px;
}

.tenant-profile-edit {
    margin: 0 8px 8px;
}

.tenant-profile-edit > summary {
    cursor: pointer;
    color: #426055;
    font-size: 10px;
    font-weight: 700;
}

.tenant-profile-edit > .form-stack {
    max-width: 430px;
    margin: 12px 0;
}

.tenant-profile-edit > form:not(.form-stack) {
    margin-top: 8px;
}

.tenant-documents {
    margin: 0 8px 8px;
    padding: 10px 12px;
    border: 1px solid #e8efea;
    border-radius: 10px;
    background: #fbfcfb;
}

.tenant-documents > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #426055;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    list-style: none;
}

.tenant-documents > summary::-webkit-details-marker {
    display: none;
}

.tenant-documents[open] > summary {
    margin-bottom: 9px;
}

.tenant-document-category {
    margin-top: 10px;
}

.tenant-document-category h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #426055;
    font-size: 10px;
}

.document-category-manager .document-upload {
    margin: 0 0 12px;
}

.tenant-document-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #eaf0ec;
}

.tenant-document-info {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.tenant-document-info strong {
    overflow-wrap: anywhere;
    color: #344d43;
    font-size: 10px;
}

.tenant-document-info small {
    color: #84938e;
    font-size: 8px;
}

.tenant-document-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tenant-document-actions form {
    margin: 0;
}

.tenant-document-edit {
    position: relative;
}

.tenant-document-edit > summary {
    padding: 9px 13px;
    border: 1px solid #dce8e1;
    border-radius: 9px;
    color: #36534a;
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
    list-style: none;
}

.tenant-document-edit > summary::-webkit-details-marker {
    display: none;
}

.tenant-document-edit .form-stack {
    position: absolute;
    z-index: 2;
    top: calc(100% + 8px);
    right: 0;
    width: min(300px, calc(100vw - 42px));
    padding: 16px;
    border: 1px solid #e1ebe5;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-float);
}

.document-delete {
    color: #a64e47;
}

.invoice-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.invoice-generate-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invoice-electricity-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #60766d;
    font-size: 9px;
    font-weight: 600;
}

.invoice-electricity-toggle input {
    accent-color: var(--green);
}

.electricity-panel {
    margin-bottom: 18px;
}

.electricity-panel .panel-heading {
    margin-bottom: 14px;
}

.electricity-panel .panel-heading h2 {
    margin-bottom: 4px;
}

.electricity-rate-form {
    display: flex;
    align-items: end;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e8efea;
    border-radius: 10px;
    background: #f9fbf9;
}

.electricity-rate-form label,
.electricity-reading-row label {
    display: grid;
    flex: 1;
    gap: 6px;
    color: #526960;
    font-size: 9px;
    font-weight: 650;
}

.electricity-rate-form input,
.electricity-reading-row input {
    width: 100%;
    height: 36px;
    padding: 0 9px;
    border: 1px solid #dce7e1;
    border-radius: 7px;
    color: #263d38;
    font-family: inherit;
    font-size: 10px;
}

.electricity-readings {
    margin-top: 21px;
}

.electricity-readings .panel-heading {
    margin-bottom: 8px;
}

.electricity-readings .panel-heading h3 {
    margin: 0;
    color: #39544a;
    font-size: 11px;
}

.electricity-reading-row {
    display: flex;
    align-items: end;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid #eaf0ec;
}

.electricity-tenant {
    display: grid;
    flex: 1.4;
    gap: 5px;
    min-width: 130px;
}

.electricity-tenant strong {
    color: #344d43;
    font-size: 10px;
}

.electricity-tenant small {
    color: #84938e;
    font-size: 8px;
}

.electricity-reading-result {
    display: grid;
    min-width: 70px;
    gap: 5px;
    color: #84938e;
    font-size: 8px;
}

.electricity-reading-result strong {
    color: #2f6851;
    font-size: 10px;
}

.lease-row {
    display: grid;
    grid-template-columns: minmax(240px, .85fr) minmax(0, 1.5fr);
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.lease-row > span {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.lease-row > span > strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.lease-row > span > small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.lease-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.lease-electricity-rate {
    display: flex;
    align-items: end;
    gap: 6px;
}

.lease-electricity-rate label {
    display: grid;
    gap: 4px;
    color: #60766d;
    font-size: 8px;
    font-weight: 650;
}

.lease-electricity-rate input {
    width: 100px;
    height: 32px;
    padding: 0 7px;
    border: 1px solid #dce7e1;
    border-radius: 7px;
    font-family: inherit;
    font-size: 10px;
}

.lease-actions > form:not(.lease-electricity-rate) {
    margin: 0;
}

.lease-actions > form,
.lease-actions > details {
    max-width: 100%;
}

.lease-actions .button,
.lease-edit > summary {
    min-height: 36px;
    padding: 0 11px;
    white-space: nowrap;
}

.lease-edit {
    min-width: 0;
}

.lease-edit-form {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    padding: 18px;
    border: 1px solid #e3ebe6;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(16, 29, 53, .08);
}

.lease-row.lease-row-editing {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.lease-row-editing > span,
.lease-row-editing .lease-actions {
    min-width: 0;
    width: 100%;
}

.lease-row-editing .lease-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    align-items: start;
}

.lease-row-editing .lease-edit {
    grid-column: 1 / -1;
}

.lease-row-editing .lease-edit-form {
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lease-row-editing .lease-edit-form > p,
.lease-row-editing .lease-edit-form > button,
.lease-row-editing .lease-edit-form > .custom-field {
    grid-column: 1 / -1;
}

.lease-register-panel {
    overflow: visible;
}

.lease-page-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.lease-page-grid > .panel {
    width: 100%;
    min-width: 0;
}

.lease-page-grid > .lease-register-panel {
    grid-column: auto;
}

.lease-page-grid > .lease-register-panel .lease-row {
    min-width: 0;
}

.lease-count-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid #dfece5;
    border-radius: 999px;
    background: var(--canvas);
    color: #527367;
    font-size: 10px;
    font-weight: 650;
}

.lease-expiring-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 0 20px;
}

.lease-expiring-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0;
}

.lease-expiring-row > span > strong {
    font-size: 12px;
}

.lease-expiring-row > span > small {
    font-size: 10px;
}

.lease-expiring-row a {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid #dfece5;
    border-radius: 999px;
    color: var(--green);
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
}

.lease-expiring-row a:hover {
    background: var(--green-light);
}

.lease-expiring-row > span > small.muted {
    margin-top: 3px;
}

.lease-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.lease-create-form > .custom-field,
.lease-create-form > button {
    grid-column: 1 / -1;
}

.lease-create-form > button {
    justify-self: start;
    min-width: 180px;
}

.lease-history-note {
    max-width: 180px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.lease-actions .button.danger {
    border-color: #f0c4c4;
    color: #b42318;
}

body[data-theme="dark"] .lease-count-badge {
    border-color: var(--line);
    color: var(--ink-soft);
}

body[data-theme="dark"] .lease-row > span > strong {
    color: var(--ink);
}

body[data-theme="dark"] .lease-row > span > small,
body[data-theme="dark"] .lease-history-note {
    color: var(--muted);
}

body[data-theme="dark"] .lease-edit-form {
    border-color: var(--line);
}


.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 91% -8%, rgba(201, 239, 154, .17), transparent 28%),
        var(--canvas);
}

.admin-shell {
    width: min(100% - 64px, 1440px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 0 22px;
}

.admin-topbar {
    position: sticky;
    z-index: 5;
    top: 14px;
    display: flex;
    min-height: 75px;
    align-items: center;
    gap: 28px;
    padding: 12px 19px;
    border: 1px solid rgba(227, 236, 230, .92);
    border-radius: 15px;
    background: var(--header-bg, rgba(255, 255, 255, .92));
    box-shadow: 0 8px 26px rgba(31, 63, 49, .055);
    backdrop-filter: blur(18px);
}

.admin-brand {
    flex: 0 0 auto;
    padding: 0;
}

.admin-brand .brand-copy small {
    color: #879990;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
}

.admin-nav a {
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #657970;
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #edf6f0;
    color: var(--green-dark);
}

.admin-nav a.active {
    border-color: #e2eee6;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.admin-content {
    padding: 34px 9px 28px;
    animation: content-enter .48s cubic-bezier(.2, .75, .2, 1) both;
}

.admin-footer {
    padding: 16px 9px 0;
    border-top: 1px solid #e5ede8;
    color: #8b9b93;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .14em;
}

.auth-page {
    display: block;
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(ellipse at 78% 12%, rgba(211, 235, 219, .52), transparent 31%),
        #f3f7f4;
}

.auth-shell {
    display: grid;
    width: min(100%, 1080px);
    min-height: min(720px, calc(100vh - 56px));
    grid-template-columns: minmax(0, 1fr) minmax(390px, .82fr);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(224, 234, 227, .9);
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(28, 62, 47, .13);
    animation: card-enter .55s cubic-bezier(.2, .75, .2, 1) both;
}

.auth-showcase {
    position: relative;
    display: flex;
    min-height: 620px;
    flex-direction: column;
    overflow: hidden;
    padding: 35px 38px 24px;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(113, 171, 130, .25), transparent 42%),
        radial-gradient(ellipse at 85% 87%, rgba(201, 239, 154, .12), transparent 36%),
        var(--sidebar-bg, #173a35);
    color: #fff;
}

.auth-showcase::after {
    position: absolute;
    right: -100px;
    bottom: -180px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(218, 241, 220, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(218, 241, 220, .025), 0 0 0 74px rgba(218, 241, 220, .02);
    content: "";
    pointer-events: none;
}

.auth-showcase .brand {
    position: relative;
    z-index: 1;
    padding: 0;
}

.auth-showcase-copy {
    position: relative;
    z-index: 1;
    margin-top: 69px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b5cbc1;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .035em;
}

.auth-kicker > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 4px rgba(201, 239, 154, .1);
}

.auth-showcase-copy h2 {
    margin: 18px 0 12px;
    color: #f6fbf7;
    font-size: clamp(32px, 4vw, 45px);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -.055em;
}

.auth-showcase-copy p {
    max-width: 360px;
    margin: 0;
    color: #b4c8bf;
    font-size: 11px;
    line-height: 1.8;
}

.auth-preview {
    position: relative;
    z-index: 1;
    width: min(100%, 365px);
    margin: auto auto 15px;
    padding: 17px 18px 14px;
    border: 1px solid rgba(230, 245, 234, .15);
    border-radius: 14px;
    background: rgba(238, 250, 239, .085);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .12);
    backdrop-filter: blur(14px);
    animation: float-gently 5s ease-in-out infinite;
}

.preview-top,
.preview-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-top {
    color: #a6c1b4;
    font-size: 7px;
    font-weight: 750;
    letter-spacing: .14em;
}

.preview-live {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #d2e7d5;
    font-size: 7px;
}

.preview-live i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--lime);
}

.preview-stat {
    display: grid;
    gap: 5px;
    margin-top: 21px;
}

.preview-stat > span,
.preview-stat small {
    color: #b2c9bc;
    font-size: 9px;
}

.preview-stat strong {
    color: white;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -.04em;
}

.preview-bars {
    display: flex;
    height: 48px;
    align-items: end;
    gap: 7px;
    margin-top: 13px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(232, 247, 232, .12);
}

.preview-bars i {
    flex: 1;
    height: 32%;
    border-radius: 4px 4px 1px 1px;
    background: rgba(201, 239, 154, .52);
}

.preview-bars i:nth-child(3n) { height: 68%; }
.preview-bars i:nth-child(3n + 1) { height: 48%; }
.preview-bars i:nth-child(4n) { height: 84%; }
.preview-bars i:nth-child(5n) { height: 58%; }
.preview-bars i:nth-child(11) { height: 100%; background: var(--lime); }

.preview-bottom {
    justify-content: flex-start;
    gap: 8px;
    padding-top: 12px;
    color: #c0d4c8;
    font-size: 8px;
}

.preview-bottom strong {
    color: #fff;
    font-size: 10px;
}

.preview-pill {
    margin-left: auto;
    padding: 5px 8px;
    border-radius: 20px;
    background: rgba(201, 239, 154, .13);
    color: #d7edbc;
    font-size: 7px;
}

.auth-feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 17px;
    margin: auto 0 22px;
}

.auth-feature-list > div {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 4px 11px;
}

.auth-feature-list > div > span {
    grid-row: span 2;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid rgba(201, 239, 154, .25);
    border-radius: 8px;
    color: var(--lime);
    font-size: 8px;
    font-weight: 700;
}

.auth-feature-list strong {
    color: #e5f1e8;
    font-size: 10px;
    font-weight: 650;
}

.auth-feature-list small {
    color: #aec4b8;
    font-size: 8px;
}

.auth-admin-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 9px;
    margin: auto 0 28px;
    padding: 20px;
    border: 1px solid rgba(230, 245, 234, .15);
    border-radius: 14px;
    background: rgba(238, 250, 239, .07);
}

.auth-admin-card > span {
    color: #a6c1b4;
    font-size: 7px;
    font-weight: 750;
    letter-spacing: .15em;
}

.auth-admin-card strong {
    color: #f6fbf7;
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -.035em;
}

.auth-admin-card small {
    color: #b4c8bf;
    font-size: 9px;
}

.auth-admin-card i {
    margin-top: 18px;
    color: #8da99c;
    font-size: 7px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .14em;
}

.auth-showcase-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    color: #82a095;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .12em;
}

.auth-card {
    display: flex;
    width: auto;
    flex-direction: column;
    justify-content: center;
    padding: 48px clamp(35px, 5.2vw, 66px);
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.auth-card-heading {
    margin-bottom: 25px;
}

.auth-mobile-brand {
    display: none;
}

.auth-card .eyebrow {
    margin: 0 0 13px;
    color: #7d9589;
}

.auth-card h1 {
    margin: 0 0 9px;
    color: #203b36;
    font-size: clamp(25px, 3vw, 32px);
    font-weight: 690;
    letter-spacing: -.05em;
}

.auth-card h1 > span {
    color: var(--green);
}

.auth-card-heading .muted {
    font-size: 11px;
}

.auth-card .form-stack {
    margin-top: 0;
}

.auth-card .form-stack label {
    gap: 7px;
    font-size: 10px;
}

.auth-card .form-stack input {
    height: 44px;
    padding: 0 12px;
    font-size: 11px;
}

.auth-card .form-stack .check input {
    width: 14px;
    height: 14px;
}

.auth-card .button {
    min-height: 44px;
    margin-top: 3px;
    border-radius: 9px;
    font-size: 11px;
}

.auth-card .button span {
    margin-left: 8px;
    font-size: 16px;
    line-height: 0;
    transition: transform .18s ease;
}

.auth-card .button:hover span {
    transform: translateX(3px);
}

.auth-foot {
    margin: 21px 0 0;
    color: #81918a;
    font-size: 10px;
}

.auth-foot a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

.auth-secure {
    margin: 34px 0 0;
    color: #91a099;
    font-size: 8px;
    text-align: center;
}

.auth-secure > span {
    margin-right: 5px;
    color: #64a77d;
    font-size: 9px;
}

.auth-card .notice {
    margin: 0 0 18px;
}

.auth-shell-register .auth-showcase-copy {
    margin-top: 54px;
}

.auth-shell-register .auth-card {
    padding-top: 34px;
    padding-bottom: 34px;
}

.auth-shell-register .auth-card-heading {
    margin-bottom: 19px;
}

.auth-shell-register .form-stack {
    gap: 11px;
}

.auth-shell-register .auth-secure {
    margin-top: 22px;
}

.auth-admin .auth-card {
    justify-content: center;
}

.auth-admin .auth-showcase-copy {
    margin-top: 88px;
}

.auth-admin-card {
    margin-bottom: auto;
}

@keyframes content-enter {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes card-enter {
    from { opacity: 0; transform: translateY(13px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float-gently {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (min-width: 901px) {
    .stats-grid .stat-card:nth-child(2) { animation-delay: .04s; }
    .stats-grid .stat-card:nth-child(3) { animation-delay: .08s; }
    .stats-grid .stat-card:nth-child(4) { animation-delay: .12s; }
    .stats-grid .stat-card:nth-child(5) { animation-delay: .16s; }
    .stats-grid .stat-card:nth-child(6) { animation-delay: .2s; }
}

@media (max-width: 1100px) {
    .sidebar {
        width: 224px;
    }

    .main {
        margin-left: 224px;
    }

    .topbar {
        padding: 0 25px;
    }

    .content {
        padding-right: 25px;
        padding-left: 25px;
    }

    .admin-shell {
        width: min(100% - 40px, 1440px);
    }

    .admin-topbar {
        gap: 15px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .admin-nav a {
        padding-right: 9px;
        padding-left: 9px;
    }
}

@media (max-width: 800px) {
    .auth-page {
        padding: 18px;
    }

    .auth-shell {
        min-height: calc(100vh - 36px);
        grid-template-columns: minmax(0, .92fr) minmax(340px, 1fr);
    }

    .auth-showcase {
        padding-right: 26px;
        padding-left: 26px;
    }

    .auth-card {
        padding-right: 32px;
        padding-left: 32px;
    }

    .admin-topbar {
        flex-wrap: wrap;
    }

    .admin-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 7px;
        border-top: 1px solid #edf2ef;
    }

    .admin-user {
        margin-left: auto;
    }
}

@media (max-width: 650px) {
    .sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        padding: 12px 13px 8px;
        box-shadow: 0 8px 24px rgba(18, 40, 42, .11);
    }

    .sidebar .brand {
        padding: 0 3px;
    }

    .sidebar .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 15px;
    }

    .sidebar .brand-copy {
        font-size: 14px;
    }

    .sidebar .brand-copy small {
        font-size: 7px;
    }

    .nav-label,
    .sidebar-bottom {
        display: none;
    }

    .nav {
        display: flex;
        overflow-x: auto;
        gap: 3px;
        margin-top: 8px;
        padding-bottom: 1px;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        min-height: 34px;
        flex: 0 0 auto;
        gap: 6px;
        padding: 5px 8px;
        font-size: 9px;
    }

    .nav-symbol {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
        border-radius: 7px;
        font-size: 7px;
    }

    .main {
        margin: 0;
    }

    .topbar {
        position: static;
        height: 62px;
        padding: 0 15px;
    }

    .topbar-title .eyebrow {
        font-size: 7px;
    }

    .topbar-title strong {
        font-size: 12px;
    }

    .topbar-date,
    .topbar-divider {
        display: none;
    }

    .user-menu {
        gap: 7px;
    }

    .user-avatar {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .user-name {
        font-size: 9px;
    }

    .user-name small,
    .user-menu>span:not(.user-avatar):not(.user-name) {
        display: none;
    }

    .link-button {
        padding: 6px 7px;
        font-size: 9px;
    }

    .content {
        padding: 22px 14px 34px;
    }

    .welcome-row {
        align-items: flex-start;
    }

    .welcome-row h1 {
        font-size: 21px;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        min-height: 91px;
        gap: 13px;
        padding: 14px;
        border-radius: 11px;
    }

    .stat-card strong {
        font-size: 18px;
    }

    .stat-card span {
        font-size: 9px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .panel {
        padding: 16px;
        border-radius: 11px;
    }

    .report-filter {
        padding: 12px;
    }

    .table-panel {
        padding: 11px;
    }

    .floor-directory {
        margin-top: 12px;
        padding: 14px;
    }

    .floor-row {
        align-items: flex-start;
        gap: 8px;
    }

    .floor-actions {
        flex: 0 0 auto;
        gap: 5px;
    }

    .floor-edit > summary,
    .floor-actions .button,
    .unit-edit > summary,
    .unit-actions .button,
    .tenant-document-edit > summary,
    .tenant-document-actions .button {
        min-height: 34px;
        padding: 0 9px;
        font-size: 9px;
    }

    .tenant-document-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .tenant-document-actions {
        flex-wrap: wrap;
    }

    .unit-row {
        align-items: flex-start;
        gap: 8px;
    }

    .unit-actions {
        flex: 0 0 auto;
        gap: 5px;
    }

    .invoice-actions {
        justify-items: start;
        width: 100%;
    }

    .invoice-generate-form {
        flex-wrap: wrap;
    }

    .electricity-rate-form,
    .electricity-reading-row,
    .lease-row,
    .lease-electricity-rate {
        align-items: stretch;
        flex-direction: column;
    }

    .electricity-reading-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .electricity-tenant,
    .electricity-reading-result {
        grid-column: 1 / -1;
    }

    .electricity-reading-row .button,
    .electricity-rate-form .button,
    .lease-electricity-rate .button {
        width: 100%;
    }

    .lease-actions {
        align-items: stretch;
        width: 100%;
        flex-direction: column;
    }

    .lease-row-editing .lease-actions {
        display: flex;
        flex-direction: column;
    }

    .lease-page-grid {
        gap: 12px;
    }

    .lease-row:not(.lease-expiring-row) {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 14px 0;
    }

    .lease-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        gap: 8px;
    }

    .lease-actions > form,
    .lease-actions > details {
        min-width: 0;
    }

    .lease-actions > form > .button,
    .lease-actions > details > summary {
        width: 100%;
    }

    .lease-actions .lease-electricity-rate,
    .lease-actions .lease-edit {
        grid-column: 1 / -1;
    }

    .lease-row-editing .lease-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .lease-row-editing .lease-edit-form,
    .lease-create-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .lease-create-form > button {
        width: 100%;
    }

    .lease-expiring-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .lease-electricity-rate input {
        width: 100%;
    }

    th,
    td {
        padding: 9px 7px;
    }

    .admin-shell {
        width: auto;
        padding: 12px 12px 20px;
    }

    .admin-topbar {
        position: static;
        gap: 9px;
        padding: 11px;
        border-radius: 12px;
    }

    .admin-brand {
        gap: 8px;
    }

    .admin-brand .brand-mark {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .admin-brand .brand-copy {
        font-size: 14px;
    }

    .admin-brand .brand-copy small {
        font-size: 7px;
    }

    .admin-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .admin-nav a {
        flex: 0 0 auto;
        padding: 8px 9px;
        font-size: 9px;
    }

    .admin-user {
        gap: 6px;
    }

    .admin-user .user-name {
        display: none;
    }

    .admin-content {
        padding: 25px 1px 20px;
    }

    .auth-page {
        display: block;
        padding: 0;
        background: #fff;
    }

    .auth-shell {
        display: block;
        width: 100%;
        min-height: 100vh;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-showcase {
        min-height: auto;
        padding: 22px 23px 25px;
    }

    .auth-showcase-copy {
        margin-top: 35px;
    }

    .auth-showcase-copy h2 {
        margin-top: 14px;
        font-size: 31px;
    }

    .auth-showcase-copy p {
        max-width: 330px;
    }

    .auth-preview {
        width: 100%;
        max-width: 390px;
        margin: 26px 0 2px;
    }

    .auth-feature-list {
        gap: 11px;
        margin: 23px 0 5px;
    }

    .auth-admin-card {
        margin: 25px 0 3px;
    }

    .auth-showcase-footer {
        margin-top: 19px;
    }

    .auth-card {
        width: 100%;
        padding: 30px 24px 36px;
    }

    .auth-card-heading {
        margin-bottom: 21px;
    }

    .auth-card h1 {
        font-size: 27px;
    }

    .auth-card .form-stack input {
        height: 43px;
    }

    .auth-secure {
        margin-top: 27px;
    }

    .auth-shell-register .auth-showcase-copy,
    .auth-admin .auth-showcase-copy {
        margin-top: 35px;
    }

    .auth-shell-register .auth-card {
        padding-top: 28px;
        padding-bottom: 30px;
    }
}

.property-directory-heading,
.property-overview-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.property-directory-heading .eyebrow,
.property-overview-heading .eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #739087;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .14em;
}

.property-capacity-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: -8px 0 16px;
    color: #70837a;
    font-size: 10px;
}

.property-capacity-note strong {
    color: #28644e;
    font-weight: 750;
}

.property-capacity-divider {
    color: #bdc9c1;
}

.property-workspace {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr);
    align-items: start;
}

.property-directory-panel,
.property-create-panel {
    min-width: 0;
}

.property-directory-panel-heading {
    margin-bottom: 14px;
}

.property-directory-panel-heading h2,
.property-create-panel .panel-heading h2 {
    margin-bottom: 4px;
}

.property-directory-panel-heading .muted,
.property-create-panel .panel-heading .muted {
    margin: 0;
}

.property-filter-form {
    display: grid;
    grid-template-columns: minmax(150px, 1.4fr) minmax(120px, .85fr) minmax(115px, .75fr) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 13px;
    border: 1px solid #e8efea;
    border-radius: 11px;
    background: #fbfcfb;
}

.property-filter-form label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #687d73;
    font-size: 9px;
    font-weight: 650;
}

.property-filter-form input,
.property-filter-form select {
    width: 100%;
    min-width: 0;
    height: 37px;
    padding: 0 10px;
    border: 1px solid #e0e9e3;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #344a45;
    font: inherit;
    font-size: 10px;
}

.property-filter-form input:focus,
.property-filter-form select:focus {
    border-color: #80b69b;
    box-shadow: 0 0 0 3px rgba(43, 131, 96, .09);
}

.property-filter-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-filter-actions .button {
    min-height: 37px;
    padding: 0 12px;
}

.property-directory-card {
    margin-bottom: 11px;
    padding: 14px;
    border: 1px solid #e6ede8;
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.property-directory-card:hover {
    transform: translateY(-1px);
    border-color: #d3e4da;
    box-shadow: 0 8px 20px rgba(27, 62, 49, .06);
}

.property-card-main {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.property-card-cover {
    display: grid;
    width: 88px;
    height: 76px;
    flex: 0 0 88px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #edf5ef;
    color: #43856a;
    text-decoration: none;
    font-size: 19px;
    font-weight: 750;
}

.property-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card-copy {
    min-width: 0;
    flex: 1;
}

.property-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.property-card-title h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #29413d;
    font-size: 13px;
    font-weight: 730;
    letter-spacing: -.02em;
}

.property-card-title h3 a {
    color: inherit;
    text-decoration: none;
}

.property-card-title h3 a:hover {
    color: #18745a;
}

.property-card-copy > p {
    margin: 4px 0;
    color: #73877d;
    font-size: 9px;
}

.property-card-copy address {
    color: #64776e;
    font-size: 9px;
    font-style: normal;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.property-card-copy .property-card-description {
    margin: 6px 0 0;
    color: #82918d;
    line-height: 1.6;
}

.property-card-units {
    display: inline-block;
    margin-top: 7px;
    color: #2e7158;
    font-size: 9px;
    font-weight: 650;
}

.property-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eff3f0;
}

.property-card-actions form {
    margin: 0;
}

.property-card-actions .button {
    min-height: 33px;
    padding: 0 11px;
    font-size: 9px;
}

.property-card-actions .document-delete {
    color: #8b5a56;
}

.property-card-meta {
    margin-top: 9px;
    color: #98a49e;
    font-size: 8px;
}

.property-create-panel .form-stack {
    gap: 12px;
}

.property-create-panel .form-stack .button.primary {
    width: 100%;
}

.property-coordinate-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.property-overview-heading .muted {
    margin: 0;
}

.property-overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 13px;
}

.property-unit-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-overview-stats .stat-card {
    min-height: 94px;
}

.property-overview-stats .stat-card strong {
    font-size: clamp(16px, 2vw, 22px);
}

.property-overview-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: stretch;
}

.property-overview-panel,
.property-location-panel,
.property-income-panel {
    min-width: 0;
}

.property-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.property-detail-grid > div {
    min-width: 0;
}

.property-detail-grid dt {
    margin-bottom: 5px;
    color: #84938e;
    font-size: 9px;
    font-weight: 600;
}

.property-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #3e554b;
    font-size: 10px;
    line-height: 1.6;
}

.property-detail-wide {
    grid-column: 1 / -1;
}

.property-map-link {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    text-decoration: none;
}

.property-map-frame {
    display: block;
    width: 100%;
    min-height: 310px;
    border: 0;
    border-radius: 10px;
    background: #edf3ee;
}

.property-overview-photos,
.property-income-panel {
    margin-top: 14px;
}

.property-floors-panel {
    margin-top: 14px;
}

.property-floors-heading {
    align-items: center;
}

.property-floors-heading h2 {
    margin-bottom: 4px;
}

.property-floors-heading .muted {
    margin: 0;
}

.property-floor-card {
    margin-top: 9px;
    padding: 12px 14px;
    border: 1px solid #e8efea;
    border-radius: 10px;
    background: #fcfdfc;
}

.property-floor-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.property-floor-card > summary::-webkit-details-marker {
    display: none;
}

.property-floor-summary {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.property-floor-number {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid #dcebe2;
    border-radius: 11px;
    background: #eff7f1;
    color: #317457;
    font-size: 10px;
    font-weight: 750;
}

.property-floor-summary > span:last-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.property-floor-summary strong {
    overflow-wrap: anywhere;
    color: #345148;
    font-size: 11px;
}

.property-floor-summary small,
.property-room-row small {
    color: #84938e;
    font-size: 9px;
}

.property-floor-toggle {
    color: #4a8069;
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.property-floor-card[open] .property-floor-toggle {
    font-size: 0;
}

.property-floor-card[open] .property-floor-toggle::after {
    content: "Hide rooms";
    font-size: 9px;
}

.property-floor-description {
    margin: 12px 0 8px;
    color: #73877d;
    font-size: 10px;
    line-height: 1.65;
}

.property-room-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #edf2ef;
}

.property-room-row > span:first-child {
    display: grid;
    gap: 4px;
}

.property-room-row > span:first-child strong {
    color: #40584e;
    font-size: 10px;
}

.property-room-rent {
    color: #3b6855;
    font-size: 10px;
    font-weight: 650;
}

.property-room-rent small {
    font-weight: 450;
}

.property-unassigned-note {
    margin: 12px 0 0;
}

.property-income-panel .panel-heading {
    align-items: center;
}

.property-income-panel .panel-heading .muted {
    margin: 4px 0 0;
}

.property-income-panel .panel-heading a {
    flex: 0 0 auto;
}

.tenant-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.tenant-page-heading .eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #739087;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .14em;
}

.tenant-page-heading .button {
    flex: 0 0 auto;
}

.tenant-workspace {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr);
    align-items: start;
}

.tenant-directory-panel,
.tenant-side-column {
    min-width: 0;
}

.tenant-directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tenant-directory-heading h2,
.tenant-side-panel .panel-heading h2 {
    margin-bottom: 4px;
}

.tenant-directory-heading .muted,
.tenant-side-panel .panel-heading .muted {
    margin: 0;
}

.tenant-total {
    color: #244b40;
    font-size: 18px;
    font-weight: 750;
}

.tenant-total small {
    color: #82918d;
    font-size: 10px;
    font-weight: 550;
}

.tenant-entry {
    margin-bottom: 13px;
    padding: 17px;
    border: 1px solid #e6ede8;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff 0%, #fbfdfb 100%);
    box-shadow: 0 4px 14px rgba(27, 62, 49, .035);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tenant-entry:hover {
    transform: translateY(-1px);
    border-color: #d3e4da;
    box-shadow: 0 9px 22px rgba(27, 62, 49, .07);
}

.tenant-entry:last-of-type {
    margin-bottom: 0;
}

.tenant-card-heading,
.tenant-identity,
.tenant-name-line,
.tenant-card-actions {
    display: flex;
    align-items: center;
}

.tenant-card-heading {
    justify-content: space-between;
    gap: 14px;
}

.tenant-identity {
    min-width: 0;
    gap: 12px;
}

.tenant-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dcebe2;
    border-radius: 14px;
    background: #eaf5ee;
    color: #24715b;
    font-size: 17px;
    font-weight: 750;
}

.tenant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tenant-identity-copy {
    min-width: 0;
}

.tenant-name-line {
    flex-wrap: wrap;
    gap: 8px;
}

.tenant-name-line h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #253e38;
    font-size: 14px;
    font-weight: 730;
    letter-spacing: -.025em;
}

.tenant-identity-copy > p {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #82918d;
    font-size: 10px;
}

.tenant-identity-copy > p span {
    padding: 0 3px;
    color: #b7c4bd;
}

.tenant-status,
.tenant-rental-count {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 9px;
    border: 1px solid #e5eee8;
    border-radius: 999px;
    color: #647a70;
    background: #f5f8f6;
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.tenant-status-active {
    border-color: #d2eadb;
    color: #23734f;
    background: #eff9f2;
}

.tenant-status-inactive,
.tenant-status-archived {
    border-color: #e9e9e5;
    color: #7e817a;
    background: #f7f7f4;
}

.tenant-card-actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.tenant-card-actions form {
    margin: 0;
}

.tenant-card-actions > .button,
.tenant-card-actions .button,
.tenant-profile-edit > summary.button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 10px;
}

.tenant-card-actions .document-delete {
    color: #8b5a56;
}

.tenant-profile-edit {
    position: relative;
    margin: 0;
}

.tenant-profile-edit > summary.button {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.tenant-profile-edit > summary::-webkit-details-marker,
.tenant-category-details > summary::-webkit-details-marker {
    display: none;
}

.tenant-profile-edit > .form-stack {
    position: absolute;
    z-index: 5;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 48px));
    max-height: min(70vh, 620px);
    overflow: auto;
    margin: 0;
    padding: 17px;
    border: 1px solid #e1ebe5;
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow-float);
}

.tenant-profile-edit > form:not(.form-stack) {
    margin-top: 8px;
}

.tenant-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid #edf2ee;
    border-radius: 10px;
    background: #fbfcfb;
}

.tenant-facts > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.tenant-facts span {
    color: #84938e;
    font-size: 9px;
    font-weight: 600;
}

.tenant-facts strong {
    overflow-wrap: anywhere;
    color: #40564e;
    font-size: 10px;
    font-weight: 600;
}

.tenant-fact-address {
    grid-column: 1 / -1;
}

.tenant-card-details {
    margin: 11px 0 0;
    background: #fff;
}

.tenant-card-details > summary {
    justify-content: space-between;
    min-height: 22px;
    color: #526e63;
    font-size: 10px;
}

.tenant-card-details[open] > summary {
    padding-bottom: 9px;
    border-bottom: 1px solid #edf2ef;
}

.tenant-card-details .tenant-document-row:last-child {
    border-bottom: 0;
}

.tenant-card-details .document-upload {
    margin: 12px 0 2px;
}

.tenant-side-column {
    display: grid;
    gap: 14px;
}

.tenant-side-panel .panel-heading {
    margin-bottom: 16px;
}

.tenant-side-panel .form-stack {
    gap: 12px;
}

.tenant-side-panel .button.primary {
    width: 100%;
}

.tenant-category-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e8efea;
    border-radius: 9px;
    color: #426055;
    background: #fbfcfb;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    list-style: none;
}

.tenant-category-details .document-upload {
    margin: 12px 0;
}

.tenant-empty-state {
    display: grid;
    justify-items: center;
    padding: 48px 24px;
    text-align: center;
}

.tenant-empty-state > span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: #eff7f1;
    color: #378163;
    font-size: 11px;
    font-weight: 750;
}

.tenant-empty-state h3 {
    margin: 14px 0 5px;
    color: #2e4940;
    font-size: 14px;
}

.tenant-empty-state p {
    max-width: 370px;
    margin: 0;
    color: #82918d;
    font-size: 10px;
    line-height: 1.7;
}

.tenant-filter-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(130px, .55fr) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e8efea;
    border-radius: 11px;
    background: #fbfcfb;
}

.tenant-filter-form label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #687d73;
    font-size: 9px;
    font-weight: 650;
}

.tenant-filter-form input,
.tenant-filter-form select {
    width: 100%;
    min-width: 0;
    height: 37px;
    padding: 0 10px;
    border: 1px solid #e0e9e3;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #344a45;
    font: inherit;
    font-size: 10px;
}

.tenant-filter-form input:focus,
.tenant-filter-form select:focus {
    border-color: #80b69b;
    box-shadow: 0 0 0 3px rgba(43, 131, 96, .09);
}

.tenant-filter-actions {
    display: flex;
    gap: 6px;
}

.tenant-filter-actions .button {
    min-height: 37px;
}

.tenant-profile-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.tenant-profile-page-heading .eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #739087;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .14em;
}

.tenant-profile-page-heading .muted {
    margin: 0;
}

.tenant-profile-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tenant-profile-summary {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(0, 1.5fr) auto;
    align-items: start;
    gap: 20px;
}

.tenant-profile-summary-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.tenant-profile-avatar {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    border-radius: 17px;
    font-size: 20px;
}

.tenant-profile-summary-main h2 {
    margin: 0;
    color: #29413d;
    font-size: 16px;
}

.tenant-profile-summary-main p {
    margin: 6px 0 0;
    color: #82918d;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.tenant-profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 18px;
    margin: 0;
}

.tenant-profile-detail-grid dt {
    margin-bottom: 4px;
    color: #84938e;
    font-size: 9px;
    font-weight: 600;
}

.tenant-profile-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #40564e;
    font-size: 10px;
    line-height: 1.6;
}

.tenant-profile-detail-wide {
    grid-column: 1 / -1;
}

.tenant-profile-page-edit {
    justify-self: end;
}

.tenant-profile-section {
    margin-top: 14px;
}

.tenant-profile-section .panel-heading h2 {
    margin-bottom: 4px;
}

.tenant-profile-section .panel-heading .muted {
    margin: 0;
}

.tenant-lease-history-card,
.tenant-ledger-entry {
    margin-top: 10px;
    padding: 13px 14px;
    border: 1px solid #e8efea;
    border-radius: 10px;
    background: #fcfdfc;
}

.tenant-lease-history-heading,
.tenant-ledger-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tenant-lease-history-heading h3 {
    margin: 0;
    color: #345148;
    font-size: 11px;
}

.tenant-lease-history-heading p {
    margin: 4px 0 0;
    color: #84938e;
    font-size: 9px;
}

.tenant-lease-dates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf2ef;
}

.tenant-lease-dates > span {
    display: grid;
    gap: 5px;
}

.tenant-lease-dates small {
    color: #84938e;
    font-size: 9px;
}

.tenant-lease-dates strong {
    color: #40584e;
    font-size: 10px;
}

.tenant-moveout-form {
    margin: 11px 0 0;
}

.tenant-ledger-heading > span:first-child {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.tenant-ledger-heading > span:first-child strong {
    color: #345148;
    font-size: 10px;
}

.tenant-ledger-heading > span:first-child small {
    color: #84938e;
    font-size: 9px;
    overflow-wrap: anywhere;
}

.tenant-ledger-amounts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 11px;
    padding: 10px 0;
    border-top: 1px solid #edf2ef;
    border-bottom: 1px solid #edf2ef;
}

.tenant-ledger-amounts > span {
    display: grid;
    gap: 4px;
    color: #84938e;
    font-size: 9px;
}

.tenant-ledger-amounts strong {
    color: #40584e;
    font-size: 10px;
}

.tenant-ledger-payment {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    color: #73877d;
    font-size: 9px;
}

.tenant-ledger-payment strong {
    color: #2e7158;
}

.tenant-id-proof-upload {
    display: grid;
    gap: 9px;
    margin-bottom: 12px;
}

.tenant-id-proof-upload .document-upload {
    margin: 0;
    padding: 12px;
    border: 1px solid #e8efea;
    border-radius: 9px;
    background: #fbfcfb;
}

@media (max-width: 1050px) {
    .property-workspace,
    .property-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .property-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-search-field {
        grid-column: 1 / -1;
    }

    .tenant-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 650px) {
    .tenant-profile-page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .tenant-profile-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .tenant-profile-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-profile-detail-wide {
        grid-column: auto;
    }

    .tenant-profile-page-edit {
        justify-self: start;
    }

    .tenant-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-filter-actions .button {
        flex: 1;
    }

    .property-directory-heading,
    .property-overview-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .property-workspace {
        gap: 12px;
    }

    .property-directory-panel,
    .property-create-panel,
    .property-overview-panel,
    .property-location-panel,
    .property-income-panel {
        padding: 14px;
    }

    .property-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .property-search-field {
        grid-column: auto;
    }

    .property-filter-actions .button {
        flex: 1;
    }

    .property-overview-stats,
    .property-unit-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-overview-actions {
        width: 100%;
    }

    .property-floors-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .tenant-page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .tenant-workspace {
        gap: 12px;
    }

    .tenant-directory-panel,
    .tenant-side-panel {
        padding: 14px;
    }

    .tenant-entry {
        padding: 13px;
    }

    .tenant-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .tenant-card-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .tenant-side-column {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 420px) {
    .tenant-lease-dates,
    .tenant-ledger-amounts {
        grid-template-columns: minmax(0, 1fr);
    }

    .property-card-main {
        flex-direction: column;
    }

    .property-card-cover {
        width: 100%;
        height: 132px;
        flex-basis: 132px;
    }

    .property-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .property-detail-wide {
        grid-column: auto;
    }

    .property-room-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .property-room-row > .badge {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .property-overview-stats,
    .property-unit-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .property-income-panel .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .tenant-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-fact-address {
        grid-column: auto;
    }

    .tenant-directory-heading {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.payment-entry-form {
    display: grid;
}

.payment-entry-form fieldset {
    display: grid;
    gap: 9px;
    margin: 0;
}

.payment-entry-form .check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #49615a;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}

.payment-entry-form .check input {
    min-height: auto;
    margin-top: 2px;
}

.payment-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.payment-fields label {
    display: grid;
    gap: 6px;
}

.payment-fields textarea {
    width: 100%;
    min-height: 64px;
    padding: 10px;
    border: 1px solid #dce7e1;
    border-radius: 8px;
    color: #263d38;
    font: 11px inherit;
}

.payment-fields .payment-remarks {
    grid-column: 1 / -1;
}

.reverse-payment-form {
    display: grid;
    gap: 6px;
    margin-top: 7px;
}

.reverse-payment-form input {
    width: 160px;
    min-height: 35px;
    padding: 0 8px;
    border: 1px solid #dce7e1;
    border-radius: 7px;
    font: 11px inherit;
}

@media (max-width: 800px) {
    .payment-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .payment-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dashboard-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-title > img {
    max-width: 130px;
    max-height: 54px;
    object-fit: contain;
}

.dashboard-title h1,
.dashboard-title p {
    margin-bottom: 5px;
}

.dashboard-kpis .stat-card {
    min-width: 0;
}

.dashboard-kpis .stat-card strong {
    font-size: clamp(16px, 1.65vw, 22px);
    overflow-wrap: anywhere;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-chart {
    min-width: 0;
    min-height: 238px;
}

.dashboard-chart .panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-chart .panel-heading .muted {
    text-align: right;
}

.collection-chart {
    display: grid;
    height: 155px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    padding-top: 15px;
}

.collection-chart-column {
    display: grid;
    height: 100%;
    min-width: 0;
    grid-template-rows: 18px minmax(0, 1fr) 18px;
    justify-items: center;
    gap: 6px;
}

.collection-chart-column > strong {
    max-width: 100%;
    overflow: hidden;
    color: #788b82;
    font-size: 8px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-chart-track {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: flex-end;
    justify-content: center;
    border-bottom: 1px solid #e8efea;
    background: linear-gradient(to bottom, transparent 49%, #f0f4f1 50%, transparent 51%);
}

.collection-chart-track > span {
    width: min(28px, 70%);
    height: var(--bar-height);
    min-height: 4px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #8bc7a2, #287f63);
    transform-origin: bottom;
    animation: chart-grow .65s cubic-bezier(.2, .75, .2, 1) both;
}

.collection-chart-column > small {
    color: #788b82;
    font-size: 9px;
}

.chart-row {
    display: grid;
    grid-template-columns: minmax(70px, .75fr) minmax(60px, 1.5fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid #edf2ef;
    color: #536a60;
    font-size: 10px;
}

.chart-row > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-row > b,
.status-chart-row b {
    color: #29473f;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.chart-row-track {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf2ef;
}

.chart-row-track > span {
    display: block;
    width: var(--bar-width);
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: #4a9b78;
}

.distribution-track {
    display: flex;
    width: 100%;
    height: 13px;
    overflow: hidden;
    margin: 22px 0 18px;
    border-radius: 99px;
    background: #edf2ef;
}

.distribution-segment {
    width: var(--segment-width);
    min-width: 2px;
}

.status-occupied {
    background: #368666;
}

.status-vacant {
    background: #c9e39f;
}

.status-maintenance {
    background: #e8a65a;
}

.status-reserved {
    background: #8c9bc9;
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.chart-legend > div {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: #6d8077;
    font-size: 10px;
}

.chart-legend b {
    color: #29473f;
    font-weight: 700;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-chart-row {
    display: grid;
    gap: 8px;
    padding: 11px 0;
    border-top: 1px solid #edf2ef;
}

.status-chart-row > div:first-child {
    display: flex;
    justify-content: space-between;
    color: #60766d;
    font-size: 10px;
}

.invoice-status-unpaid {
    background: #e4a344;
}

.invoice-status-partially_paid {
    background: #7894cb;
}

.invoice-status-paid {
    background: #368666;
}

.invoice-status-overdue {
    background: #d66f68;
}

.dashboard-quick-actions {
    margin-bottom: 16px;
}

.quick-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.dashboard-sections {
    align-items: start;
}

.dashboard-sections > .panel {
    min-width: 0;
}

@keyframes chart-grow {
    from { transform: scaleY(.1); }
    to { transform: scaleY(1); }
}

@media (max-width: 1100px) {
    .dashboard-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .dashboard-charts {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .dashboard-kpis .stat-card {
        min-height: 92px;
        padding: 14px;
    }

    .dashboard-kpis .stat-card strong {
        font-size: 16px;
    }

    .collection-chart {
        gap: 6px;
    }

    .collection-chart-column > strong {
        font-size: 7px;
    }

    .chart-row {
        grid-template-columns: minmax(65px, .9fr) minmax(45px, 1fr) auto;
        gap: 7px;
    }

    .quick-action-list .button {
        flex: 1 1 42%;
        justify-content: center;
        padding: 0 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-chart-track > span {
        animation: none;
    }
}

.auth-showcase[style*="background-image"] {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.admin-topbar,
.topbar {
    color: var(--ink);
}

[data-appearance="compact"] .panel,
[data-appearance="compact"] .stat-card {
    padding: 14px;
}

[data-appearance="compact"] .list-row {
    min-height: 43px;
}

[data-appearance="rounded"] .panel,
[data-appearance="rounded"] .stat-card {
    border-radius: 22px;
}

[data-appearance="rounded"] .button,
[data-appearance="rounded"] input,
[data-appearance="rounded"] select,
[data-appearance="rounded"] textarea {
    border-radius: 14px;
}

body[data-theme="dark"] {
    --ink: #e8f0ed;
    --ink-soft: #bac9c2;
    --muted: #9cafa6;
    --line: #334842;
    --surface: #1c302c;
    --canvas: #12211f;
    --green-light: #29473d;
    color: var(--ink);
    background: var(--canvas);
}

body[data-theme="dark"] .shell {
    background:
        radial-gradient(ellipse at 74% -18%, rgba(201, 239, 154, .06), transparent 34%),
        var(--canvas);
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .admin-topbar {
    border-color: var(--line);
    color: var(--ink);
}

body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .panel {
    border-color: var(--line);
    background: var(--surface);
}

body[data-theme="dark"] .welcome-row h1,
body[data-theme="dark"] .stat-card strong,
body[data-theme="dark"] .panel-heading h2,
body[data-theme="dark"] .list-row,
body[data-theme="dark"] .list-row b,
body[data-theme="dark"] .chart-row > b,
body[data-theme="dark"] .status-chart-row b {
    color: var(--ink);
}

body[data-theme="dark"] .muted,
body[data-theme="dark"] .empty,
body[data-theme="dark"] .stat-card span,
body[data-theme="dark"] .list-row small,
body[data-theme="dark"] .chart-row,
body[data-theme="dark"] .status-chart-row > div:first-child {
    color: var(--muted);
}

body[data-theme="dark"] .list-row,
body[data-theme="dark"] .chart-row,
body[data-theme="dark"] .status-chart-row {
    border-top-color: var(--line);
}

body[data-theme="dark"] .button:not(.primary),
body[data-theme="dark"] .report-filter,
body[data-theme="dark"] .form-stack input,
body[data-theme="dark"] .form-stack select,
body[data-theme="dark"] .form-stack textarea,
body[data-theme="dark"] .report-filter input,
body[data-theme="dark"] .report-filter select,
body[data-theme="dark"] .inline-form input,
body[data-theme="dark"] .collect-form input,
body[data-theme="dark"] .collect-form select {
    border-color: var(--line);
    background: #243a34;
    color: var(--ink);
}

body[data-theme="dark"] table,
body[data-theme="dark"] th,
body[data-theme="dark"] td {
    border-color: var(--line);
    color: var(--ink-soft);
}

body[data-theme="dark"] th {
    background: #20362f;
}

body[data-theme="dark"] .chart-row-track,
body[data-theme="dark"] .distribution-track {
    background: #344a42;
}

body[data-theme="dark"] .admin-page {
    background:
        radial-gradient(ellipse at 91% -8%, rgba(201, 239, 154, .06), transparent 28%),
        var(--canvas);
}

body[data-theme="dark"] .admin-nav a {
    color: var(--muted);
}

body[data-theme="dark"] .admin-nav a:hover,
body[data-theme="dark"] .admin-nav a.active {
    border-color: var(--line);
    background: #29473d;
    color: var(--ink);
}

body[data-theme="dark"] .auth-page {
    background:
        radial-gradient(ellipse at 78% 12%, rgba(211, 235, 219, .06), transparent 31%),
        var(--canvas);
}

body[data-theme="dark"] .auth-shell,
body[data-theme="dark"] .auth-card {
    border-color: var(--line);
    background: var(--surface);
}

body[data-theme="dark"] .auth-card-heading h1,
body[data-theme="dark"] .auth-card-heading .muted,
body[data-theme="dark"] .auth-foot,
body[data-theme="dark"] .auth-secure {
    color: var(--ink-soft);
}

.branding-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
    align-items: start;
    gap: 18px;
}

.branding-form {
    display: grid;
    gap: 22px;
}

.branding-section + .branding-section {
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.branding-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.branding-fields > label {
    display: grid;
    align-content: start;
    gap: 7px;
    color: #49615a;
    font-size: 10px;
    font-weight: 650;
}

.branding-fields input:not([type="color"]):not([type="file"]),
.branding-fields select,
.branding-fields textarea {
    width: 100%;
    min-height: 39px;
    padding: 9px 10px;
    border: 1px solid #dce7e1;
    border-radius: 8px;
    background: #fff;
    color: #263d38;
    font-family: inherit;
    font-size: 11px;
}

.branding-fields textarea {
    resize: vertical;
}

.branding-wide {
    grid-column: 1 / -1;
}

.branding-color-fields input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    border: 1px solid #dce7e1;
    border-radius: 8px;
    background: #fff;
}

.branding-upload {
    min-height: 135px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfdfb;
}

.branding-upload input[type="file"] {
    width: 100%;
    min-height: 36px;
    color: #64776e;
    font-family: inherit;
    font-size: 10px;
}

.branding-upload small,
.branding-current {
    color: #82918a;
    font-size: 9px;
    font-weight: 450;
}

.branding-current a {
    color: var(--green);
}

.branding-image-preview {
    display: block;
    max-width: 150px;
    max-height: 72px;
    margin-top: 9px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.branding-actions,
.branding-restore {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.branding-preview-panel {
    position: sticky;
    top: 105px;
}

.branding-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--preview-font), Inter, "Segoe UI", sans-serif;
}

.branding-preview[data-appearance="rounded"] {
    border-radius: 23px;
}

.branding-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--preview-header);
}

.branding-preview-mark {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 10px;
    background: var(--preview-secondary);
    color: var(--preview-sidebar);
    font-weight: 800;
}

.branding-preview-header > span:last-child {
    display: grid;
    gap: 3px;
}

.branding-preview-header strong {
    color: var(--ink);
    font-size: 12px;
}

.branding-preview-header small {
    color: var(--muted);
    font-size: 8px;
}

.branding-preview-body {
    padding: 18px;
}

.branding-preview-body > small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
}

.branding-preview-body h3 {
    margin: 12px 0 7px;
    color: var(--ink);
    font-size: 18px;
}

.branding-preview-body p {
    min-height: 42px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.branding-preview-metric {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.branding-preview-metric span {
    color: var(--muted);
    font-size: 9px;
}

.branding-preview-metric strong {
    color: var(--ink);
    font-size: 18px;
}

.branding-preview .button.primary {
    border-color: var(--preview-primary);
    background: var(--preview-primary);
}

.branding-preview footer {
    padding: 11px 14px;
    background: var(--preview-sidebar);
    color: #fff;
    font-size: 8px;
}

.branding-preview[data-mode="dark"] {
    --ink: #e8f0ed;
    --muted: #a7b9b0;
    --line: #394d46;
    --surface: #1c302c;
    background: var(--surface);
}

.branding-preview[data-mode="dark"] .branding-preview-header {
    background: #243a34;
}

body[data-theme="dark"] .branding-fields > label {
    color: var(--ink-soft);
}

body[data-theme="dark"] .branding-fields input:not([type="color"]):not([type="file"]),
body[data-theme="dark"] .branding-fields select,
body[data-theme="dark"] .branding-fields textarea,
body[data-theme="dark"] .branding-color-fields input[type="color"] {
    border-color: var(--line);
    background: #243a34;
    color: var(--ink);
}

body[data-theme="dark"] .branding-upload {
    background: #1a2e29;
}

@media (max-width: 950px) {
    .branding-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .branding-preview-panel {
        position: static;
    }
}

@media (max-width: 600px) {
    .branding-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .branding-wide {
        grid-column: auto;
    }
}
