* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: #202124;
    background: #f5f6f8;
}

body {
    margin: 0;
}

a {
    color: inherit;
}

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

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

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

.brand {
    font-weight: 700;
    font-size: 20px;
}

.account {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.account form {
    margin: 0;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.page {
    padding-top: 42px;
    padding-bottom: 60px;
}

.page-heading {
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 6px 0;
    font-size: 32px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7280;
}

.muted {
    color: #6b7280;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}

.card h2 {
    margin-top: 0;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f5f6f8;
}

.login-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.login-card h1 {
    margin: 0 0 6px;
}

.form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.form label:not(.checkbox) {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}

.form input[type="email"],
.form input[type="password"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}

.form input:focus {
    outline: 2px solid #202124;
    outline-offset: 1px;
}

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

.primary-button {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 12px 16px;
    background: #202124;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.error-box {
    margin-top: 18px;
    padding: 11px 12px;
    border: 1px solid #ef4444;
    border-radius: 9px;
    background: #fef2f2;
    font-size: 14px;
}

@media (max-width: 640px) {
    .account > span {
        display: none;
    }

    .page-heading h1 {
        font-size: 28px;
    }

    .login-card {
        padding: 24px;
    }
}

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

.card-wide {
    grid-column: 1 / -1;
}

.section-label {
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.property-address {
    margin-bottom: 18px;
    font-size: 17px;
}

.meta-row {
    color: #6b7280;
    font-size: 14px;
}

.charge-group {
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.charge-group:first-of-type {
    margin-top: 10px;
}

.charge-month {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 18px;
}

.money-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0;
}

.total-row {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 17px;
}

.due-note {
    margin: 12px 0;
    font-size: 14px;
    color: #6b7280;
}

.big-money {
    margin: 12px 0;
    font-size: 30px;
    font-weight: 700;
}

.status-line {
    margin: 12px 0;
}

.small {
    font-size: 13px;
}

.payment-note {
    margin-top: 8px;
}

.button-disabled {
    margin-top: 12px;
    cursor: not-allowed;
    opacity: .45;
}

.success-state {
    padding: 18px;
    border-radius: 10px;
    background: #f3f4f6;
}

.history-list,
.document-list {
    display: grid;
}

.history-row,
.document-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.history-right {
    text-align: right;
}

.secondary-button {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 760px) {
    .cabinet-grid {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: auto;
    }

    .money-row,
    .history-row,
    .document-row {
        gap: 14px;
    }

    .document-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.admin-property-list {
    display: grid;
    gap: 16px;
}

.admin-property-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.admin-property-card:hover {
    border-color: #9ca3af;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .06);
}

.admin-property-meta {
    min-width: 260px;
    display: grid;
    gap: 12px;
}

.admin-property-meta > div {
    display: grid;
    gap: 3px;
}

.admin-back {
    margin-bottom: 24px;
    font-size: 14px;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.admin-detail-grid > div {
    display: grid;
    gap: 5px;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.money-cell {
    white-space: nowrap;
}

.admin-record {
    padding: 10px 0;
    border-top: 1px solid #e5e7eb;
}

.status-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 760px) {
    .admin-property-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-property-meta {
        min-width: 0;
        width: 100%;
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }
}

.flash-success,
.flash-error {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 9px;
    font-size: 14px;
}

.flash-success {
    border: 1px solid #86b89a;
    background: #f2f8f4;
}

.flash-error {
    border: 1px solid #ef4444;
    background: #fef2f2;
}

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

.admin-form label {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}

.admin-form input,
.admin-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 10px 11px;
    background: #fff;
    font: inherit;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
    outline: 2px solid #202124;
    outline-offset: 1px;
}

.field-error {
    margin-top: -8px;
    color: #b91c1c;
    font-size: 13px;
}

.inline-amount-form {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 220px;
}

.inline-amount-form input {
    width: 105px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 7px 8px;
    background: #fff;
    font: inherit;
    text-align: right;
}

.inline-amount-form input:focus {
    outline: 2px solid #202124;
    outline-offset: 1px;
}

.small-action-button {
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 7px 9px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
}

.small-action-button:hover {
    border-color: #9ca3af;
}

.prepayment-preview-form {
    grid-template-columns:
        minmax(180px, 260px)
        max-content;
    align-items: end;
    margin-bottom: 22px;
}

.prepayment-preview-form .secondary-button {
    height: 42px;
    cursor: pointer;
}

.prepayment-preview {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.prepayment-total-row td {
    border-top: 2px solid #d1d5db;
}

.prepayment-existing {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.prepayment-existing h3 {
    margin-top: 0;
}

.prepayment-package-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
}

.prepayment-package-row form {
    margin: 0;
}

@media (max-width: 760px) {
    .prepayment-preview-form {
        grid-template-columns: 1fr;
    }

    .prepayment-package-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.admin-setup-grid {
    margin-bottom: 28px;
}

.admin-form select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 10px 11px;
    background: #fff;
    font: inherit;
}

.admin-form select:focus {
    outline: 2px solid #202124;
    outline-offset: 1px;
}

.tenancy-start-form {
    max-width: 560px;
    margin-top: 24px;
}

.topbar-link {
    color: inherit;
    font-size: 14px;
    text-decoration: none;
}

.topbar-link:hover {
    text-decoration: underline;
}

.audit-table {
    min-width: 940px;
}

.audit-time {
    white-space: nowrap;
}

.audit-details summary {
    cursor: pointer;
    font-weight: 600;
}

.audit-details pre {
    max-width: 520px;
    max-height: 300px;
    overflow: auto;
    margin: 8px 0 12px;
    padding: 10px;
    border-radius: 7px;
    background: #f5f6f8;
    font-size: 11px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-json-title {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
}

.deposit-admin-form {
    max-width: 620px;
}

.deposit-operation-summary {
    display: grid;
    gap: 4px;
    margin: 14px 0 22px;
}

.deposit-return-note {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

/* DOCUMENT WORKFLOW */

.document-upload-form {
    max-width: 680px;
    margin-bottom: 28px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

.document-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.document-record {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.document-record-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.document-actions form {
    margin: 0;
}

.document-record-archived {
    opacity: .72;
}

@media (max-width: 760px) {
    .document-record {
        display: grid;
    }

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

/* TENANCY HISTORY WORKFLOW */

.tenancy-summary-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(170px, 1fr)
    );
    gap: 18px;
}

.tenancy-summary-grid > div {
    display: grid;
    gap: 4px;
}

.tenancy-history-list,
.tenant-tenancy-list {
    display: grid;
    gap: 10px;
}

.tenancy-history-row,
.tenant-tenancy-card {
    display: grid;
    grid-template-columns:
        minmax(180px, 1fr)
        auto
        auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.tenancy-history-row:hover,
.tenant-tenancy-card:hover {
    border-color: #c5c9d1;
}

.tenant-tenancy-card {
    grid-template-columns:
        minmax(0, 1fr)
        auto;
}

.tenant-tenancy-card h2 {
    margin: 4px 0;
}

.tenant-tenancy-period {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .tenancy-history-row,
    .tenant-tenancy-card {
        grid-template-columns: 1fr;
    }

    .tenant-tenancy-period {
        white-space: normal;
    }
}

/* TENANCY CLOSE WORKFLOW */

.tenancy-close-form {
    max-width: 680px;
}

.tenancy-close-notes {
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
}

.tenancy-close-notes p {
    margin: 0;
}

.tenancy-close-notes p + p {
    margin-top: 8px;
}

/* CHARGE CANCELLATION WORKFLOW */

.charge-cancel-details {
    min-width: 180px;
}

.charge-cancel-details summary {
    cursor: pointer;
}

.charge-cancel-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    min-width: 220px;
}

.charge-cancel-form textarea {
    width: 100%;
    min-width: 0;
    resize: vertical;
}

/* === ADMIN WORKSPACE V1 START === */

:root {
    --ui-bg: #f5f6f8;
    --ui-surface: #ffffff;
    --ui-surface-soft: #f8f9fb;
    --ui-text: #17191d;
    --ui-muted: #69717d;
    --ui-border: #e2e5e9;
    --ui-border-strong: #cbd1d8;
    --ui-action: #202226;
    --ui-action-hover: #0d0e10;
    --ui-focus: #2563eb;
    --ui-success-bg: #edf8f1;
    --ui-success-text: #17623a;
    --ui-error-bg: #fff1f1;
    --ui-error-text: #962a2a;
    --ui-radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    background: var(--ui-bg);
}

body {
    margin: 0;
    color: var(--ui-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: calc(100% - 48px);
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.page {
    padding-top: 48px;
    padding-bottom: 72px;
}


/* topbar */

.topbar {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--ui-border);
}

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

.brand {
    color: var(--ui-text);
    font-size: 21px;
    font-weight: 760;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.topbar-link {
    padding: 8px 11px;
    color: var(--ui-muted);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 620;
    text-decoration: none;
}

.topbar-link:hover,
.topbar-link.is-active {
    background: #eef0f3;
    color: var(--ui-text);
    text-decoration: none;
}

.account {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 22px;
    border-left: 1px solid var(--ui-border);
}

.account-name {
    max-width: 220px;
    overflow: hidden;
    color: var(--ui-muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-button {
    padding: 0;
    background: transparent;
    color: var(--ui-text);
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
}


/* heading */

.workspace-heading {
    margin-bottom: 32px;
}

.workspace-heading .eyebrow,
.section-label {
    margin-bottom: 8px;
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.workspace-heading h1 {
    margin: 0;
    font-size: clamp(34px, 4vw, 44px);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -0.038em;
}

.workspace-lead {
    max-width: 820px;
    margin: 14px 0 0;
    color: var(--ui-muted);
    font-size: 17px;
    line-height: 1.58;
}


/* dashboard */

.metric-strip {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.metric-card {
    min-width: 175px;
    padding: 18px 20px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: 14px;
}

.metric-value {
    font-size: 28px;
    font-weight: 760;
    line-height: 1;
}

.metric-label {
    margin-top: 8px;
    color: var(--ui-muted);
    font-size: 13px;
}

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

.workspace-tile {
    min-height: 150px;
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    background: var(--ui-surface);
    color: inherit;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    text-decoration: none;
    box-shadow:
        0 1px 2px rgba(16, 24, 40, .03),
        0 8px 24px rgba(16, 24, 40, .04);
    transition:
        transform .12s ease,
        border-color .12s ease;
}

.workspace-tile:hover {
    transform: translateY(-1px);
    border-color: var(--ui-border-strong);
}

.workspace-tile-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: var(--ui-surface-soft);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    font-weight: 760;
}

.workspace-tile-body h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

.workspace-tile-body p {
    margin: 7px 0 0;
    color: var(--ui-muted);
    font-size: 14px;
}

.workspace-tile-arrow {
    color: #98a0ad;
    font-size: 24px;
}

.role-note {
    margin-top: 20px;
    padding: 20px 22px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 14px;
}

.role-note strong {
    font-size: 14px;
}

.role-note p {
    max-width: 860px;
    margin: 6px 0 0;
    color: var(--ui-muted);
    font-size: 14px;
}


/* landlords */

.landlords-layout {
    display: grid;
    grid-template-columns:
        minmax(360px, 430px)
        minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ui-panel {
    padding: 28px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow:
        0 1px 2px rgba(16, 24, 40, .03),
        0 8px 24px rgba(16, 24, 40, .04);
}

.ui-panel-heading {
    margin-bottom: 24px;
}

.ui-panel-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ui-panel-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.ui-panel-heading p {
    margin: 8px 0 0;
    color: var(--ui-muted);
    font-size: 14px;
}

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

.ui-field {
    display: grid;
    gap: 7px;
}

.ui-field label {
    font-size: 14px;
    font-weight: 650;
}

.ui-field input,
.ui-field select,
.ui-field textarea {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 11px 13px;
    background: #fff;
    color: var(--ui-text);
    border: 1px solid var(--ui-border-strong);
    border-radius: 10px;
    outline: none;
    font: inherit;
    font-size: 16px;
}

.ui-field input:focus,
.ui-field select:focus,
.ui-field textarea:focus {
    border-color: var(--ui-focus);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .12);
}

.ui-field-hint {
    color: var(--ui-muted);
    font-size: 12px;
}

.ui-field-error {
    color: var(--ui-error-text);
    font-size: 13px;
    font-weight: 560;
}

.ui-button {
    min-height: 48px;
    padding: 11px 18px;
    border-radius: 11px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
}

.ui-button-primary {
    width: 100%;
    margin-top: 4px;
    background: var(--ui-action);
    color: #fff;
    border: 1px solid var(--ui-action);
}

.ui-button-primary:hover {
    background: var(--ui-action-hover);
}

.count-badge {
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ui-surface-soft);
    color: var(--ui-muted);
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.entity-row {
    min-height: 82px;
    padding: 15px 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--ui-border);
}

.entity-row:first-child {
    border-top: 0;
}

.entity-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--ui-surface-soft);
    border: 1px solid var(--ui-border);
    border-radius: 11px;
    font-size: 14px;
    font-weight: 760;
}

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

.entity-name {
    overflow: hidden;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-meta {
    margin-top: 3px;
    overflow: hidden;
    color: var(--ui-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-secondary {
    margin-top: 3px;
    color: #8a919c;
    font-size: 12px;
}

.status-pill {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill-active {
    background: var(--ui-success-bg);
    color: var(--ui-success-text);
}

.status-pill-muted {
    background: #f0f1f3;
    color: #707782;
}

.empty-state {
    min-height: 280px;
    padding: 38px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 14px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    background: var(--ui-surface-soft);
    border: 1px solid var(--ui-border);
    border-radius: 13px;
    font-weight: 760;
}

.empty-state h3 {
    margin: 0;
    font-size: 17px;
}

.empty-state p {
    margin: 6px 0 0;
    color: var(--ui-muted);
    font-size: 14px;
}

.ui-notice {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.ui-notice-success {
    background: var(--ui-success-bg);
    color: var(--ui-success-text);
    border: 1px solid #cce8d6;
}

.ui-notice-error {
    background: var(--ui-error-bg);
    color: var(--ui-error-text);
    border: 1px solid #f0cccc;
}


/* responsive */

@media (max-width: 900px) {
    .landlords-layout,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .topbar-right {
        gap: 14px;
    }
}

@media (max-width: 720px) {
    .container {
        width: calc(100% - 28px);
    }

    .page {
        padding-top: 30px;
        padding-bottom: 48px;
    }

    .topbar-nav {
        display: none;
    }

    .account {
        padding-left: 0;
        border-left: 0;
    }

    .workspace-heading h1 {
        font-size: 34px;
    }

    .metric-strip {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .metric-card {
        min-width: 0;
    }

    .workspace-tile {
        grid-template-columns: auto 1fr;
    }

    .workspace-tile-arrow {
        display: none;
    }

    .ui-panel {
        padding: 21px;
    }

    .entity-row {
        grid-template-columns: auto 1fr;
    }

    .status-pill {
        grid-column: 2;
        justify-self: start;
    }
}

/* === ADMIN WORKSPACE V1 END === */
/* === G7.5 SDANO BRAND FOUNDATION === */

:root {
    --sdano-mint: #76C5B2;
    --sdano-light-teal: #45A58E;
    --sdano-teal: #36A18B;
    --sdano-deep-teal: #2A7C6A;
    --sdano-dark: #12362E;

    --sdano-bg: #F5F8F7;
    --sdano-surface: #FFFFFF;
    --sdano-surface-soft: #F0F6F4;

    --sdano-text: #173A32;
    --sdano-muted: #64756F;
    --sdano-border: #DCE8E4;

    --sdano-danger: #B42318;
    --sdano-danger-bg: #FFF5F4;

    --sdano-radius-sm: 10px;
    --sdano-radius: 16px;
    --sdano-radius-lg: 22px;

    --sdano-shadow:
        0 8px 30px rgba(18, 54, 46, .06);
}

html {
    color: var(--sdano-text);
    background: var(--sdano-bg);
}

body {
    min-height: 100vh;
    background: var(--sdano-bg);
}

::selection {
    background: rgba(118, 197, 178, .35);
}

.container {
    width: min(1180px, calc(100% - 40px));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom:
        1px solid var(--sdano-border);
    backdrop-filter: blur(16px);
}

.topbar-inner {
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 138px;
    height: 62px;
    object-fit: contain;
}

.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    min-width: 0;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 9px;
    color: var(--sdano-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.topbar-link:hover {
    color: var(--sdano-dark);
    background: var(--sdano-surface-soft);
    text-decoration: none;
}

.topbar-link.is-active {
    color: var(--sdano-dark);
    background: #E7F3EF;
}

.account {
    padding-left: 18px;
    border-left:
        1px solid var(--sdano-border);
}

.account-name {
    max-width: 190px;
    overflow: hidden;
    color: var(--sdano-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-button {
    color: var(--sdano-deep-teal);
    font-weight: 600;
    text-decoration: none;
}

.link-button:hover {
    text-decoration: underline;
}

.page {
    padding-top: 38px;
    padding-bottom: 72px;
}

.page-heading {
    margin-bottom: 30px;
}

.page-heading h1,
.workspace-heading h1,
.seller-page-heading h1,
.seller-hero h1,
.seller-auth-card h1 {
    color: var(--sdano-dark);
    letter-spacing: -.025em;
}

.page-heading h1 {
    margin: 7px 0;
    font-size: clamp(30px, 4vw, 40px);
    line-height: 1.08;
}

.eyebrow,
.section-label {
    color: var(--sdano-deep-teal);
}

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

.card {
    border:
        1px solid var(--sdano-border);
    border-radius: var(--sdano-radius);
    box-shadow: var(--sdano-shadow);
}

.card h2 {
    color: var(--sdano-dark);
}

.primary-button {
    background: var(--sdano-dark);
    color: #fff;
    border-radius: var(--sdano-radius-sm);
    transition:
        background .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.primary-button:not(:disabled):hover {
    background: var(--sdano-deep-teal);
    box-shadow:
        0 8px 22px rgba(42, 124, 106, .18);
}

.primary-button:not(:disabled):active {
    transform: translateY(1px);
}

.secondary-button,
.small-action-button {
    border-color: var(--sdano-border);
    color: var(--sdano-dark);
}

input,
select,
textarea {
    accent-color: var(--sdano-teal);
}

.form input[type="email"],
.form input[type="password"],
.admin-form input,
.admin-form textarea,
.admin-form select,
.inline-amount-form input {
    border-color: #C9D9D4;
}

.form input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.inline-amount-form input:focus {
    outline:
        2px solid rgba(54, 161, 139, .28);
    border-color: var(--sdano-teal);
}

.success-state {
    color: var(--sdano-dark);
    background: #EAF5F1;
}

.error-box,
.flash-error {
    color: var(--sdano-danger);
    border-color: #F4B8B1;
    background: var(--sdano-danger-bg);
}

.status-badge {
    color: var(--sdano-muted);
    background: #EFF3F2;
}

.status-badge-active {
    color: #205E50;
    background: #DDF1EA;
}


/* LOGIN */

.login-page {
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(118, 197, 178, .22),
            transparent 42%
        ),
        var(--sdano-bg);
}

.login-shell {
    width: min(430px, 100%);
}

.login-brand {
    display: flex;
    justify-content: center;
    height: 78px;
    margin-bottom: 8px;
}

.login-brand img {
    width: 184px;
    height: 78px;
    object-fit: contain;
}

.login-card {
    width: 100%;
    border-color: var(--sdano-border);
    border-radius: var(--sdano-radius-lg);
    box-shadow:
        0 20px 55px rgba(18, 54, 46, .10);
}

.login-card h1 {
    margin: 6px 0;
    color: var(--sdano-dark);
    font-size: 28px;
}


/* SELLER / TENANT SPACE */

.seller-page {
    background:
        linear-gradient(
            180deg,
            #F1F8F6 0,
            var(--sdano-bg) 240px
        );
}

.seller-container {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
}

.seller-topbar {
    background: rgba(255, 255, 255, .94);
    border-bottom:
        1px solid var(--sdano-border);
    backdrop-filter: blur(16px);
}

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

.seller-brand {
    display: flex;
    align-items: center;
}

.seller-identity {
    max-width: 360px;
    overflow: hidden;
    color: var(--sdano-muted);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seller-content {
    padding-top: 42px;
    padding-bottom: 72px;
}

.seller-hero {
    max-width: 680px;
    padding-top: 42px;
}

.seller-hero-mark {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--sdano-deep-teal);
    background: #DFF2EC;
    font-size: 13px;
    font-weight: 700;
}

.seller-hero h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 54px);
    line-height: 1.02;
}

.seller-lead {
    max-width: 600px;
    margin: 18px 0 0;
    color: var(--sdano-muted);
    font-size: 19px;
    line-height: 1.55;
}

.seller-info-card {
    margin-top: 30px;
    padding: 18px 20px;
    border:
        1px solid var(--sdano-border);
    border-radius: var(--sdano-radius);
    background: rgba(255, 255, 255, .78);
    color: var(--sdano-text);
    line-height: 1.55;
}

.seller-auth-wrap {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 220px);
}

.seller-auth-card {
    width: min(430px, 100%);
    padding: 32px;
    border:
        1px solid var(--sdano-border);
    border-radius: var(--sdano-radius-lg);
    background: #fff;
    box-shadow:
        0 20px 55px rgba(18, 54, 46, .09);
}

.seller-auth-card h1 {
    margin: 7px 0;
    font-size: 30px;
}

.seller-pin-form {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.seller-pin-form label {
    color: var(--sdano-dark);
    font-size: 14px;
    font-weight: 600;
}

.seller-pin-form input {
    width: 100%;
    padding: 14px 16px;
    border:
        1px solid #C9D9D4;
    border-radius: 11px;
    background: #fff;
    color: var(--sdano-dark);
    font: inherit;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: .28em;
    text-align: center;
}

.seller-pin-form input:focus {
    outline:
        3px solid rgba(54, 161, 139, .18);
    border-color: var(--sdano-teal);
}

.seller-security-note {
    margin: 16px 0 0;
    text-align: center;
}

.seller-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.seller-page-heading h1 {
    margin: 7px 0;
    font-size: clamp(30px, 5vw, 40px);
}

.seller-meta-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.seller-meta-grid > div {
    display: grid;
    gap: 5px;
}

.history-note {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 11px;
    background: #F0F4F3;
    color: var(--sdano-muted);
    font-size: 14px;
}

.document-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top:
        1px solid var(--sdano-border);
    color: var(--sdano-dark);
    font-weight: 600;
    text-decoration: none;
}

.document-link:hover {
    color: var(--sdano-deep-teal);
}


/* RESPONSIVE */

@media (max-width: 900px) {
    .topbar-inner {
        align-items: flex-start;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .topbar-right {
        align-items: flex-end;
        flex-direction: column-reverse;
        gap: 4px;
    }

    .account {
        padding-left: 0;
        border-left: 0;
    }

    .account-name {
        display: none;
    }
}

@media (max-width: 680px) {
    .container,
    .seller-container {
        width: min(100% - 28px, 1180px);
    }

    .topbar-inner,
    .seller-topbar-inner {
        min-height: 62px;
    }

    .brand-logo {
        width: 112px;
        height: 50px;
    }

    .topbar-nav {
        max-width: calc(100vw - 160px);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar-nav::-webkit-scrollbar {
        display: none;
    }

    .topbar-link {
        flex: 0 0 auto;
        padding: 0 9px;
        font-size: 13px;
    }

    .seller-identity {
        max-width: 46vw;
        font-size: 12px;
    }

    .page,
    .seller-content {
        padding-top: 26px;
        padding-bottom: 50px;
    }

    .seller-hero {
        padding-top: 20px;
    }

    .seller-page-heading {
        flex-direction: column;
        gap: 12px;
    }

    .seller-meta-grid {
        grid-template-columns: 1fr;
    }

    .seller-auth-card {
        padding: 24px;
    }
}

/* === G7.5A2 LANDLORD WORKSPACE === */

.landlord-overview-heading,
.landlord-property-index-heading {
    margin-bottom: 30px;
}

.landlord-next-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin: 24px 0;
    padding: 24px 26px;
    border: 1px solid rgba(54, 161, 139, .26);
    border-radius: var(--sdano-radius-lg);
    background:
        linear-gradient(
            135deg,
            #F0F8F5,
            #FFFFFF
        );
}

.landlord-next-action h2 {
    margin: 4px 0 8px;
    color: var(--sdano-dark);
    font-size: 22px;
}

.landlord-next-action p {
    max-width: 650px;
    margin: 0;
    color: var(--sdano-muted);
    line-height: 1.5;
}

.landlord-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    flex: 0 0 auto;
    text-decoration: none;
}

.landlord-metrics {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    margin: 24px 0;
}

.metric-status {
    font-size: 20px;
    line-height: 1.2;
}

.landlord-primary-links {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    margin: 24px 0 28px;
}

.landlord-primary-links .workspace-tile {
    min-height: 150px;
}

.landlord-primary-links .workspace-tile-body {
    padding-left: 0;
}

.landlord-settings {
    margin-top: 14px;
    border: 1px solid var(--sdano-border);
    border-radius: var(--sdano-radius);
    background: var(--sdano-surface);
    box-shadow: var(--sdano-shadow);
}

.landlord-settings > summary,
.property-settings-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}

.landlord-settings > summary::-webkit-details-marker,
.property-settings-panel > summary::-webkit-details-marker {
    display: none;
}

.landlord-settings > summary > span:first-child,
.property-settings-panel > summary > span:first-child {
    display: grid;
    gap: 4px;
}

.settings-summary-status {
    color: var(--sdano-muted);
    font-size: 13px;
    font-weight: 600;
}

.landlord-settings-body {
    padding: 0 22px 24px;
    border-top: 1px solid var(--sdano-border);
}

.settings-facts {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-top: 22px;
}

.settings-facts > div {
    display: grid;
    gap: 5px;
}

.landlord-form {
    display: grid;
    gap: 16px;
    max-width: 620px;
    margin-top: 22px;
}

.landlord-form label {
    display: grid;
    gap: 7px;
    color: var(--sdano-dark);
    font-size: 14px;
    font-weight: 600;
}

.landlord-form input,
.landlord-form select,
.landlord-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #C9D9D4;
    border-radius: 9px;
    background: #fff;
    font: inherit;
}

.landlord-form input:focus,
.landlord-form select:focus,
.landlord-form textarea:focus {
    outline:
        2px solid rgba(54, 161, 139, .20);
    border-color: var(--sdano-teal);
}


/* PROPERTY INDEX */

.property-index-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.property-create-panel {
    position: relative;
    width: min(420px, 100%);
}

.property-create-panel > summary {
    margin-left: auto;
    width: max-content;
    padding: 10px 14px;
    border: 1px solid var(--sdano-border);
    border-radius: 10px;
    background: #fff;
    color: var(--sdano-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    list-style: none;
}

.property-create-panel > summary::-webkit-details-marker {
    display: none;
}

.property-create-panel[open] {
    padding: 18px;
    border: 1px solid var(--sdano-border);
    border-radius: var(--sdano-radius);
    background: #fff;
    box-shadow: var(--sdano-shadow);
}

.property-create-panel[open] > summary {
    margin: 0 0 10px auto;
}

.property-create-panel .landlord-form {
    margin-top: 8px;
}

.property-list {
    display: grid;
    gap: 12px;
}

.property-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 21px 22px;
    border: 1px solid var(--sdano-border);
    border-radius: var(--sdano-radius);
    background: #fff;
    box-shadow:
        0 4px 18px rgba(18, 54, 46, .035);
    color: inherit;
    text-decoration: none;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.property-list-item:hover {
    border-color:
        rgba(54, 161, 139, .46);
    box-shadow:
        0 10px 26px rgba(18, 54, 46, .07);
    transform: translateY(-1px);
}

.property-list-main {
    min-width: 0;
}

.property-list-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.property-list-title-row h2 {
    margin: 0;
    color: var(--sdano-dark);
    font-size: 20px;
}

.property-list-main p {
    margin: 7px 0 0;
}

.property-list-meta {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 0 0 auto;
}

.property-list-meta > div {
    display: grid;
    gap: 3px;
}

.property-list-arrow {
    color: var(--sdano-deep-teal);
    font-size: 22px;
}

.property-empty-state {
    display: grid;
    justify-items: center;
    padding: 58px 24px;
    border: 1px dashed #BED7CF;
    border-radius: var(--sdano-radius-lg);
    background: #F8FBFA;
    text-align: center;
}

.property-empty-state h2 {
    margin: 12px 0 7px;
    color: var(--sdano-dark);
}

.property-empty-state p {
    max-width: 520px;
    margin: 0;
    color: var(--sdano-muted);
    line-height: 1.5;
}

.property-empty-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #DFF2EC;
    color: var(--sdano-deep-teal);
    font-size: 32px;
}


/* PROPERTY WORKSPACE */

.property-workspace-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 26px;
    margin-bottom: 24px;
}

.property-workspace-heading h1 {
    margin: 7px 0;
    color: var(--sdano-dark);
    font-size: clamp(30px, 4vw, 40px);
    letter-spacing: -.025em;
    line-height: 1.08;
}

.property-workspace-nav {
    position: sticky;
    top: 72px;
    z-index: 35;
    display: flex;
    gap: 4px;
    margin: 0 0 24px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--sdano-border);
    border-radius: 13px;
    background:
        rgba(245, 248, 247, .95);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
}

.property-workspace-nav::-webkit-scrollbar {
    display: none;
}

.property-workspace-nav a {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 8px;
    color: var(--sdano-muted);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.property-workspace-nav a:hover {
    color: var(--sdano-dark);
    background: #E7F3EF;
}

.property-summary-card {
    background:
        linear-gradient(
            135deg,
            #FFFFFF,
            #F6FAF8
        );
}

.property-work-section {
    scroll-margin-top: 145px;
}

.property-settings-panel {
    scroll-margin-top: 145px;
    margin-top: 2px;
    border: 1px solid var(--sdano-border);
    border-radius: var(--sdano-radius);
    background: #F8FAF9;
}

.property-settings-body {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-top: 1px solid var(--sdano-border);
}

.property-settings-body > .card {
    box-shadow: none;
}

.property-back {
    margin-top: 26px;
}

.property-back a {
    color: var(--sdano-deep-teal);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}


/* ONE-TIME TENANT ACCESS */

.access-secret-wrap {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 190px);
}

.access-secret-card {
    width: min(720px, 100%);
    padding: 32px;
    border: 1px solid var(--sdano-border);
    border-radius: var(--sdano-radius-lg);
    background: #fff;
    box-shadow:
        0 20px 55px rgba(18, 54, 46, .09);
}

.access-secret-card h1 {
    margin: 10px 0 8px;
    color: var(--sdano-dark);
    font-size: 30px;
}

.access-secret-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #DDF1EA;
    color: #205E50;
    font-size: 13px;
    font-weight: 700;
}

.access-secret-lead {
    margin: 0;
    color: var(--sdano-muted);
    line-height: 1.5;
}

.access-secret-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        160px;
    gap: 14px;
    margin: 26px 0;
}

.access-secret-item {
    display: grid;
    gap: 9px;
    padding: 16px;
    border: 1px solid var(--sdano-border);
    border-radius: 12px;
    background: #F8FBFA;
}

.access-secret-item code {
    overflow-wrap: anywhere;
    color: var(--sdano-dark);
    font-size: 14px;
}

.access-secret-pin code {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: .16em;
}

.access-secret-warning {
    margin: 18px 0;
    padding: 13px 15px;
    border-radius: 10px;
    background: #FFF8E8;
    color: #725613;
    font-size: 14px;
    line-height: 1.45;
}


@media (max-width: 900px) {
    .landlord-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .landlord-primary-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .landlord-next-action {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .landlord-action-link {
        width: 100%;
    }

    .landlord-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .metric-card {
        padding: 18px;
    }

    .metric-status {
        font-size: 16px;
    }

    .settings-facts {
        grid-template-columns: 1fr;
    }

    .property-index-toolbar {
        flex-direction: column;
    }

    .property-create-panel {
        width: 100%;
    }

    .property-create-panel > summary {
        margin-left: 0;
    }

    .property-list-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .property-list-meta {
        width: 100%;
        justify-content: space-between;
    }

    .property-list-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .property-workspace-heading {
        flex-direction: column;
        gap: 10px;
    }

    .property-workspace-nav {
        top: 62px;
        margin-left: -14px;
        margin-right: -14px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .access-secret-card {
        padding: 24px;
    }

    .access-secret-grid {
        grid-template-columns: 1fr;
    }
}

/* === G7.5A3 TENANT WORKSPACE === */

.tenant-heading {
    margin-bottom: 22px;
}

.tenant-history-note {
    margin: -8px 0 22px;
}

.tenant-payment-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    margin-bottom: 20px;
    padding: 28px 30px;
    border: 1px solid var(--sdano-border);
    border-radius: var(--sdano-radius-lg);
    background: #fff;
    box-shadow:
        0 14px 40px rgba(18, 54, 46, .07);
}

.tenant-payment-hero.has-payment {
    border-color:
        rgba(54, 161, 139, .32);
    background:
        linear-gradient(
            135deg,
            #FFFFFF,
            #F1F8F5
        );
}

.tenant-payment-hero.is-clear {
    background:
        linear-gradient(
            135deg,
            #F6FBF9,
            #FFFFFF
        );
}

.tenant-payment-hero h2 {
    margin: 5px 0 6px;
    color: var(--sdano-dark);
}

.tenant-payment-amount {
    margin-top: 4px;
    color: var(--sdano-dark);
    font-size:
        clamp(36px, 7vw, 52px);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1;
}

.tenant-payment-period {
    margin-top: 10px;
    color: var(--sdano-text);
    font-size: 16px;
    font-weight: 650;
}

.tenant-payment-due {
    margin-top: 7px;
    color: var(--sdano-muted);
    font-size: 14px;
}

.tenant-payment-action {
    width: min(260px, 100%);
    flex: 0 0 auto;
}

.tenant-payment-action .small {
    margin-top: 9px;
    line-height: 1.45;
    text-align: center;
}

.tenant-clear-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #DDF1EA;
    color: #205E50;
    font-size: 27px;
    font-weight: 800;
}

.tenant-charges-card {
    margin-bottom: 20px;
}

.tenant-period-list {
    display: grid;
    margin-top: 10px;
}

.tenant-period {
    padding: 20px 0;
    border-top:
        1px solid var(--sdano-border);
}

.tenant-period:first-child {
    border-top: 0;
}

.tenant-period-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 9px;
}

.tenant-period-heading .charge-month {
    margin-bottom: 3px;
}

.tenant-period-total {
    color: var(--sdano-dark);
    font-size: 18px;
    white-space: nowrap;
}

.tenant-payment-disabled-note {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: 11px;
    background: #F1F5F4;
    color: var(--sdano-muted);
    font-size: 13px;
    line-height: 1.45;
}

.tenant-payment-disabled-note strong {
    color: var(--sdano-dark);
}

.tenant-secondary-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.tenant-side-card {
    min-width: 0;
}

.tenant-side-card .big-money {
    color: var(--sdano-dark);
}

.tenant-side-meta {
    margin-top: 12px;
    color: var(--sdano-muted);
    font-size: 13px;
    line-height: 1.5;
}

.tenant-side-card .button-disabled {
    width: 100%;
}

.tenant-document-meta {
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

.tenant-payment-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top:
        1px solid var(--sdano-border);
}

.tenant-payment-history-row:first-of-type {
    border-top: 0;
}

.tenant-payment-history-right {
    text-align: right;
    white-space: nowrap;
}

.tenant-rental-details {
    margin-top: 0;
}

.tenant-rental-meta {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 18px;
}

.tenant-rental-meta > div {
    display: grid;
    align-content: start;
    gap: 5px;
}

.tenant-rental-meta > div > span:not(.small) {
    color: var(--sdano-muted);
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .tenant-payment-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }

    .tenant-payment-action {
        width: 100%;
    }

    .tenant-secondary-grid {
        grid-template-columns: 1fr;
    }

    .tenant-rental-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .tenant-payment-amount {
        font-size: 38px;
    }

    .tenant-period-heading {
        flex-direction: column;
        gap: 7px;
    }

    .tenant-payment-history-row {
        align-items: flex-start;
    }
}

/* === G8.1 PUBLIC PLATFORM === */

.platform-public-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 75% 20%,
            rgba(118, 197, 178, .20),
            transparent 36%
        ),
        #F5F8F7;
}

.platform-public-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px 20px;
}

.platform-public-card {
    width: min(760px, 100%);
    padding: clamp(32px, 7vw, 68px);
    border: 1px solid var(--sdano-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow:
        0 28px 80px rgba(18, 54, 46, .10);
}

.platform-public-logo {
    display: block;
    width: min(260px, 65%);
    height: auto;
    margin-bottom: 48px;
}

.platform-public-card h1 {
    max-width: 620px;
    margin: 9px 0 18px;
    color: var(--sdano-dark);
    font-size: clamp(38px, 7vw, 64px);
    letter-spacing: -.045em;
    line-height: 1.02;
}

.platform-public-card p {
    max-width: 590px;
    margin: 0;
    color: var(--sdano-muted);
    font-size: 18px;
    line-height: 1.55;
}

.platform-public-login {
    display: inline-flex;
    width: auto;
    margin-top: 34px;
    text-decoration: none;
}

@media (max-width: 560px) {
    .platform-public-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .platform-public-logo {
        margin-bottom: 36px;
    }

    .platform-public-login {
        width: 100%;
    }
}
