:root {
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #17202a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

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

.page-wide {
    width: min(1760px, calc(100% - 32px));
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 32px;
    line-height: 1.2;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.page-header p {
    margin-top: 6px;
    color: #5c6670;
}

.nav-link {
    color: #1557b0;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tenant-form {
    background: #ffffff;
    border: 1px solid #d7dde4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.form-section {
    padding: 22px;
    border-bottom: 1px solid #e4e8ed;
}

.form-section:last-of-type {
    border-bottom: 0;
}

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

label {
    display: grid;
    gap: 7px;
    color: #34404c;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #b9c2cc;
    border-radius: 6px;
    padding: 11px 12px;
    color: #17202a;
    font: inherit;
    background: #ffffff;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1557b0;
    outline: 3px solid rgba(21, 87, 176, 0.16);
}

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

.cheque {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 16px;
    border: 1px solid #d7dde4;
    border-radius: 8px;
}

.cheque legend {
    padding: 0 6px;
    color: #17202a;
    font-weight: 700;
}

.actions {
    display: flex;
    justify-content: flex-end;
    padding: 22px;
}

button {
    border: 0;
    border-radius: 6px;
    padding: 12px 18px;
    color: #ffffff;
    background: #1557b0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #0f438b;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.52);
}

.modal {
    position: relative;
    width: min(440px, 100%);
    padding: 28px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #d7dde4;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.modal h2 {
    margin: 12px 0 8px;
    font-size: 24px;
}

.modal p {
    color: #4b5563;
    line-height: 1.5;
}

.modal pre {
    max-height: 180px;
    overflow: auto;
    margin: 16px 0 0;
    padding: 12px;
    text-align: left;
    white-space: pre-wrap;
    background: #f4f6f8;
    border: 1px solid #d7dde4;
    border-radius: 6px;
    font-size: 13px;
}

.modal-icon {
    display: inline-grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
}

.modal-success .modal-icon {
    background: #23884f;
}

.modal-error .modal-icon {
    background: #c23b3b;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #5c6670;
    background: transparent;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
}

.modal-close:hover {
    color: #17202a;
    background: #edf1f5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.panel-message,
.table-panel {
    background: #ffffff;
    border: 1px solid #d7dde4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.panel-message {
    padding: 18px;
}

.panel-error {
    border-color: #d66b6b;
    background: #fff5f5;
}

.panel-success {
    border-color: #69b578;
    background: #f0fbf2;
}

.panel-message pre {
    max-height: 220px;
    overflow: auto;
    margin: 12px 0 0;
    padding: 12px;
    white-space: pre-wrap;
    background: #f4f6f8;
    border: 1px solid #d7dde4;
    border-radius: 6px;
    font-size: 13px;
}

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

.control-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    color: #34404c;
    background: #ffffff;
    border: 1px solid #d7dde4;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.filter-link:hover {
    border-color: #1557b0;
    color: #1557b0;
}

.filter-link-active {
    color: #ffffff;
    background: #1557b0;
    border-color: #1557b0;
}

.filter-link-active:hover {
    color: #ffffff;
}

.search-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.search-label {
    position: relative;
}

.search-form label {
    min-width: 180px;
}

.search-form input[type="search"] {
    height: 38px;
    padding: 8px 11px;
}

.search-label {
    min-width: min(340px, 44vw);
}

.search-form button {
    min-height: 38px;
    padding: 8px 14px;
}

.clear-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    color: #5c6670;
    font-weight: 700;
    text-decoration: none;
}

.clear-link:hover {
    color: #1557b0;
}

.suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d7dde4;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.suggestions button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    color: #17202a;
    text-align: left;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
}

.suggestions button:hover {
    background: #edf1f5;
}

.summary-item {
    padding: 16px;
    background: #ffffff;
    border: 1px solid #d7dde4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.summary-label {
    display: block;
    margin-bottom: 8px;
    color: #5c6670;
    font-size: 13px;
    font-weight: 700;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 0;
}

.table-toolbar h2 {
    margin-bottom: 0;
}

.table-toolbar span {
    color: #5c6670;
    font-size: 13px;
    font-weight: 700;
}

.table-wrap {
    max-height: calc(100vh - 240px);
    overflow: auto;
    margin-top: 14px;
}

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

.tenant-table {
    min-width: 1600px;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e4e8ed;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #edf1f5;
    color: #34404c;
    font-weight: 700;
    white-space: nowrap;
}

td {
    color: #17202a;
    line-height: 1.35;
}

.tenant-table tbody tr:hover td {
    background: #f8fafc;
}

.tenant-table th:nth-child(1),
.tenant-table td:nth-child(1) {
    min-width: 160px;
}

.tenant-table th:nth-child(2),
.tenant-table td:nth-child(2) {
    min-width: 170px;
}

.tenant-table th:nth-child(7),
.tenant-table td:nth-child(7),
.tenant-table th:nth-child(8),
.tenant-table td:nth-child(8),
.tenant-table th:nth-child(9),
.tenant-table td:nth-child(9),
.tenant-table th:nth-child(10),
.tenant-table td:nth-child(10) {
    min-width: 150px;
}

.tenant-table th:nth-child(3),
.tenant-table td:nth-child(3) {
    min-width: 120px;
}

.tenant-table th:nth-child(4),
.tenant-table td:nth-child(4) {
    min-width: 110px;
    white-space: nowrap;
}

.tenant-table th:nth-child(5),
.tenant-table td:nth-child(5),
.tenant-table th:nth-child(6),
.tenant-table td:nth-child(6) {
    min-width: 105px;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
}

th.sticky-col,
.tenant-table th:first-child {
    left: 0;
    z-index: 4;
}

.subtext,
.muted {
    display: block;
    color: #697584;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-success {
    color: #155b35;
    background: #e4f6eb;
}

.badge-warning {
    color: #7a4b00;
    background: #fff2cf;
}

.badge-danger {
    color: #8a1f1f;
    background: #ffe2e2;
}

.badge-muted {
    color: #42505f;
    background: #edf1f5;
}

.flag {
    display: inline-flex;
    margin-top: 4px;
    color: #8a1f1f;
    font-size: 12px;
    font-weight: 700;
}

.cheque-cell {
    display: grid;
    gap: 5px;
    min-width: 135px;
}

.cheque-cell strong {
    font-size: 13px;
}

.cheque-cell div {
    font-size: 12px;
}

.notes-cell {
    min-width: 180px;
    color: #42505f;
}

@media (max-width: 760px) {
    .page {
        width: min(100% - 24px, 1120px);
        padding-top: 20px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid,
    .cheque {
        grid-template-columns: 1fr;
    }

    .actions {
        justify-content: stretch;
    }

    button {
        width: 100%;
    }

    .modal {
        padding: 24px 18px;
    }

    .modal-close {
        width: 34px;
    }

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

    .control-bar,
    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form label {
        min-width: 0;
    }

    .table-wrap {
        max-height: none;
    }
}

/* Star Admin inspired layout overrides */
:root {
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    --app-bg: #f4f7fb;
    --panel: #ffffff;
    --border: #dce3ee;
    --text: #111827;
    --muted: #64748b;
    --primary: #0f5de8;
    --primary-soft: #eaf2ff;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

body {
    background: var(--app-bg);
    color: var(--text);
}

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

.tenancy-admin .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 28px 12px;
    background: #ffffff;
    border-right: 1px solid #e5ebf3;
}

.tenancy-admin .brand {
    display: grid;
    width: 100%;
    place-items: center;
    color: var(--primary);
    text-decoration: none;
}

.tenancy-admin .brand img {
    width: 54px;
    height: 54px;
}

.brand-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #ffffff;
    background: var(--primary);
    border-radius: 12px;
    font-size: 26px;
    font-weight: 800;
}

.tenancy-admin .sidebar-nav {
    display: grid;
    gap: 7px;
}

.tenancy-admin .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    color: #334155;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.tenancy-admin .sidebar-link:hover,
.tenancy-admin .sidebar-link-active {
    color: var(--primary);
    background: var(--primary-soft);
    border-left-color: var(--primary);
}

.tenancy-admin .nav-icon {
    display: grid;
    width: 20px;
    place-items: center;
    font-size: 16px;
}

.tenancy-admin .sidebar-help {
    margin-top: auto;
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
}

.tenancy-admin .sidebar-help strong {
    font-size: 13px;
}

.tenancy-admin .sidebar-help span {
    color: var(--muted);
    font-size: 12px;
}

.tenancy-admin .sidebar-help a {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.app-main {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 34px 32px 48px;
}

.tenancy-admin .page-wide {
    width: 100%;
    max-width: none;
}

.app-main .page-header {
    margin-bottom: 24px;
}

.app-main h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0;
}

.app-main .page-header p {
    color: var(--muted);
    font-size: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(15, 93, 232, 0.18);
}

.btn-primary:hover {
    background: #0c4ec4;
}

.btn-light {
    color: #0f3f8f;
    background: #ffffff;
    border-color: #b9cdf8;
}

.btn-light:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 132px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.summary-icon {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 18px;
    font-size: 26px;
    font-weight: 800;
}

.summary-icon-blue {
    color: var(--primary);
    background: var(--primary-soft);
}

.summary-icon-red {
    color: #dc2626;
    background: #fee2e2;
}

.summary-icon-green {
    color: #059669;
    background: #dcfce7;
}

.summary-icon-amber {
    color: #d97706;
    background: #fef3c7;
}

.summary-label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.summary-value {
    font-size: 34px;
    font-weight: 800;
}

.summary-hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.control-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    margin-bottom: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.filter-panel {
    display: grid;
    gap: 9px;
}

.control-label,
.search-form label > span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-bar {
    gap: 10px;
}

.filter-link {
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-color: var(--border);
    font-weight: 800;
    box-shadow: none;
}

.filter-link-active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(15, 93, 232, 0.16);
}

.filter-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}

.filter-dot-all {
    display: none;
}

.filter-dot-action {
    background: #ef4444;
}

.filter-dot-renewal {
    background: #10b981;
}

.filter-dot-overdue {
    background: #f59e0b;
}

.search-form {
    flex-wrap: wrap;
    gap: 12px;
}

.search-form input[type="search"],
.search-form input[type="month"] {
    height: 42px;
    border-color: var(--border);
    border-radius: 8px;
}

.search-form button {
    min-height: 42px;
    padding: 0 18px;
    background: var(--primary);
    border-radius: 8px;
}

.table-panel {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-color: var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.table-toolbar {
    padding: 20px 22px 12px;
    border-bottom: 1px solid var(--border);
}

.table-toolbar h2 {
    font-size: 20px;
    font-weight: 800;
}

.table-title-group,
.table-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.columns-menu {
    position: relative;
}

.columns-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 25;
    display: grid;
    gap: 8px;
    min-width: 190px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}

.columns-popover label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.columns-popover input {
    width: auto;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.table-wrap {
    width: 100%;
    max-height: calc(100vh - 320px);
    margin-top: 0;
}

.tenant-table {
    min-width: 1450px;
}

.tenant-table th {
    background: #eef3f8;
    border-bottom-color: var(--border);
    font-size: 13px;
    font-weight: 800;
}

.tenant-table td {
    background: #ffffff;
    border-bottom-color: #e9eef5;
    font-size: 13px;
}

.tenant-table tbody tr {
    position: relative;
}

.tenant-table tbody tr td:first-child {
    border-left: 3px solid transparent;
}

.tenant-table tbody tr.row-active td:first-child {
    border-left-color: var(--primary);
}

.tenant-table tbody tr.row-action td:first-child {
    border-left-color: #ef4444;
}

.tenant-table tbody tr.row-renewal td:first-child {
    border-left-color: #f59e0b;
}

.tenant-table tbody tr.row-overdue td:first-child {
    border-left-color: #dc2626;
}

.tenant-table tbody tr:hover td {
    background: #f8fbff;
}

.tenant-table td:nth-child(7),
.tenant-table td:nth-child(8),
.tenant-table td:nth-child(9),
.tenant-table td:nth-child(10) {
    border-left: 1px solid #e1e8f2;
}

.badge {
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.cheque-cell {
    gap: 4px;
}

.cheque-cell strong {
    color: #111827;
}

.cheque-cell div:nth-child(2),
.cheque-cell div:nth-child(3) {
    color: #475569;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 320px;
    padding: 48px 20px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 18px;
    font-size: 30px;
}

.empty-state h2 {
    margin: 6px 0 0;
    font-size: 20px;
    font-weight: 800;
}

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

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .tenancy-admin .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        overflow: auto;
        padding: 12px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .tenancy-admin .sidebar-nav {
        display: flex;
        min-width: max-content;
    }

    .tenancy-admin .sidebar-help {
        display: none;
    }

    .app-main {
        width: min(100% - 24px, 1120px);
        margin: 0 auto;
        padding: 24px 0 40px;
    }

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

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

    .header-actions,
    .table-toolbar,
    .table-title-group,
    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Add tenant admin form */
.add-tenant-page {
    width: min(100%, calc(100% - 48px));
    max-width: 1180px;
    margin: 0 auto;
}

.tenant-form-admin {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.tenant-form-admin .form-section {
    padding: 0;
    border-bottom: 1px solid var(--border);
}

.tenant-form-admin .form-section:last-of-type {
    border-bottom: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 14px;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
}

.section-heading h2 i {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 9px;
    font-size: 18px;
}

.section-heading p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.form-grid-admin {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    padding: 0 24px 24px;
}

.form-grid-admin label:nth-child(1),
.form-grid-admin label:nth-child(2) {
    grid-column: span 3;
}

.form-grid-admin label:nth-child(3),
.form-grid-admin label:nth-child(4),
.form-grid-admin label:nth-child(5) {
    grid-column: span 2;
}

.tenant-form-admin label {
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.tenant-form-admin label > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.tenant-form-admin label > span i {
    color: var(--primary);
    font-size: 16px;
}

.tenant-form-admin input,
.tenant-form-admin select,
.tenant-form-admin textarea {
    min-height: 44px;
    border-color: var(--border);
    border-radius: 8px;
    color: #111827;
    font-size: 14px;
    background: #ffffff;
}

.tenant-form-admin input::placeholder,
.tenant-form-admin textarea::placeholder {
    color: #94a3b8;
}

.tenant-form-admin input:focus,
.tenant-form-admin select:focus,
.tenant-form-admin textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(15, 93, 232, 0.12);
}

.cheque-section .cheque-list {
    gap: 0;
    padding: 0 24px 24px;
}

.tenant-form-admin .cheque {
    grid-template-columns: 128px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 16px;
    padding: 16px 0;
    border: 0;
    border-top: 1px solid #edf2f7;
    border-radius: 0;
}

.tenant-form-admin .cheque:first-child {
    border-top: 0;
}

.tenant-form-admin .cheque legend {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
}

.notes-section label {
    padding: 0 24px 24px;
}

.notes-section textarea {
    min-height: 118px;
}

.tenant-form-admin .actions {
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    background: #f8fafc;
}

.tenant-form-admin .actions button {
    width: auto;
}

@media (max-width: 980px) {
    .form-grid-admin {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid-admin label:nth-child(n) {
        grid-column: span 1;
    }

    .tenant-form-admin .cheque {
        grid-template-columns: 1fr;
    }

    .tenant-form-admin .cheque legend {
        height: auto;
    }
}

@media (max-width: 640px) {
    .form-grid-admin {
        grid-template-columns: 1fr;
    }

    .tenant-form-admin .actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .tenant-form-admin .actions .btn,
    .tenant-form-admin .actions button {
        width: 100%;
    }
}
