:root {
    color-scheme: light;
    --surface-0: #f4f8f2;
    --surface-1: #ffffff;
    --surface-2: #e5f2e3;
    --border-soft: rgba(19, 38, 29, 0.1);
    --shadow-lg: 0 32px 70px rgba(17, 49, 32, 0.16);
.payment-modal--nested {
    z-index: 130;
}
    --shadow-md: 0 18px 40px rgba(17, 49, 32, 0.12);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

.payment-modal__backdrop--soft {
    background: rgba(11, 22, 16, 0.28);
}
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--brand-ink);
    background:
        radial-gradient(circle at top left, rgba(201, 242, 123, 0.65), transparent 32%),
        radial-gradient(circle at top right, rgba(69, 160, 107, 0.16), transparent 24%),
        linear-gradient(180deg, #f1f7eb 0%, #f7fbf5 48%, #ffffff 100%);
}

.payment-modal__dialog--compact {
    width: min(520px, calc(100% - 20px));
    max-height: calc(100vh - 20px);
    padding: 16px;
    gap: 10px;
}
a {
    color: inherit;
    text-decoration: none;
}

main {
    padding: 0 24px 48px;
.payment-form__meta--stack {
    display: grid;
    justify-content: stretch;
    gap: 8px;
}
}

.topbar {
    display: flex;
    align-items: center;
    .payment-modal__dialog,
    .payment-modal__dialog--compact {
        width: min(100%, calc(100% - 14px));
        border-radius: 16px;
        padding: 14px;
    }
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(247, 251, 245, 0.84);
    border-bottom: 1px solid rgba(19, 38, 29, 0.06);
}

.brandmark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brandmark strong,
.hero h1,
.page-hero h1,
.section__heading h2 {
    font-family: 'Space Grotesk', sans-serif;
}

.brandmark small,
.eyebrow,
.tenant-badge__label {
    display: block;
    color: rgba(19, 38, 29, 0.7);
}

.brandmark__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-soft));
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: var(--shadow-md);
}

.brandmark__icon span {
    position: absolute;
    width: 26px;
    height: 4px;
    border-radius: 999px;
    background: var(--brand-accent);
}

.brandmark__icon span:nth-child(1) {
    transform: rotate(45deg);
}

.brandmark__icon span:nth-child(2) {
    transform: rotate(-45deg);
}

.brandmark__icon span:nth-child(3) {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}

.topnav {
    display: flex;
    gap: 12px;
    font-weight: 600;
}

.topbar__actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.topnav__desktop {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topnav__mobile {
    display: none;
}

.topnav-backdrop {
    display: none;
}

.mobile-nav-group {
    display: grid;
    gap: 8px;
}

.mobile-nav-group strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(19, 38, 29, 0.72);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(19, 38, 29, 0.12);
    background: #ffffff;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    border-radius: 99px;
    background: var(--brand-ink);
    margin: 5px 0;
}

.topnav a {
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 0.93rem;
}

.topnav a:hover {
    background: rgba(30, 111, 79, 0.08);
}

.tenant-badge {
    min-width: 160px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
}

.user-menu {
    position: relative;
}

.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1px solid rgba(19, 38, 29, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.86rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-soft));
}

.user-meta {
    display: grid;
    gap: 1px;
    text-align: left;
}

.user-name {
    font-weight: 700;
    line-height: 1.1;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    font-size: 0.72rem;
    color: rgba(19, 38, 29, 0.62);
}

.user-caret {
    font-size: 0.74rem;
    color: rgba(19, 38, 29, 0.68);
}

.user-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    border-radius: 14px;
    border: 1px solid rgba(19, 38, 29, 0.12);
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: grid;
    gap: 4px;
    z-index: 35;
}

.user-menu__panel[hidden] {
    display: none !important;
}

.user-menu__link {
    padding: 9px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.user-menu__link:hover {
    background: rgba(30, 111, 79, 0.08);
}

.user-menu__logout-form {
    margin: 4px 0 0;
}

.user-menu__logout {
    width: 100%;
    justify-content: center;
}

.user-menu.is-open .user-caret {
    transform: rotate(180deg);
}
.logout-form {
    margin: 0;
}
.button--small {
    padding: 10px 14px;
    font-size: 0.9rem;
}
.flash-wrapper {
    max-width: 1200px;
    margin: 14px auto 0;
    padding: 0 24px;
    display: grid;
    gap: 10px;
}
.flash {
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 600;
}
.flash--success {
    background: #e6f6d5;
    color: #16361f;
}
.flash--error {
    background: #ffe2e0;
    color: #6a1a1a;
}

.hero,
.page-shell,
.section {
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    padding-top: 48px;
    align-items: center;
}

.hero__lead,
.page-hero p,
.info-card p,
.setting-row p {
    color: rgba(19, 38, 29, 0.78);
    line-height: 1.65;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(2.4rem, 3vw, 4.5rem);
    line-height: 1.05;
    margin: 12px 0 18px;
    max-width: 12ch;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.77rem;
    font-weight: 700;
}

.hero__actions,
.wizard__actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

    .hero__chips {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 16px;
    }

    .hero__chips span {
        padding: 8px 12px;
        border-radius: 999px;
        font-weight: 700;
        font-size: 0.84rem;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(19, 38, 29, 0.12);
    }

.button {
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-soft));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-ink);
    border: 1px solid rgba(19, 38, 29, 0.1);
}

.button--secondary {
    background: #f1f6ee;
    color: #204432;
    border: 1px solid rgba(19, 38, 29, 0.2);
}

.button--analyze {
    background: linear-gradient(135deg, #2e8b57, #3da36a);
    color: #ffffff;
    border: 1px solid rgba(19, 38, 29, 0.12);
    box-shadow: 0 14px 30px rgba(46, 139, 87, 0.28);
}

.button--analyze:hover {
    box-shadow: 0 18px 36px rgba(46, 139, 87, 0.34);
}

.contract-import-card {
    margin-top: 20px;
    border: 1px solid rgba(46, 139, 87, 0.24);
    background: linear-gradient(135deg, rgba(229, 242, 227, 0.8), rgba(255, 255, 255, 0.92));
    border-radius: 18px;
    padding: 16px;
}

.contract-import-card p {
    margin: 12px 0 0;
    color: rgba(19, 38, 29, 0.78);
    line-height: 1.55;
}

.contract-modal[hidden] {
    display: none;
}

.contract-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
}

.contract-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 22, 16, 0.45);
}

.contract-modal__dialog {
    position: relative;
    width: min(680px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #f8fcf7;
    border: 1px solid rgba(19, 38, 29, 0.12);
    border-radius: 22px;
    box-shadow: 0 24px 56px rgba(17, 49, 32, 0.26);
    padding: 22px;
}

.contract-modal__dialog h3 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.contract-modal__dialog p {
    margin: 8px 0 16px;
    color: rgba(19, 38, 29, 0.74);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-weight: 600;
}

.hero__proof,
.kpi-grid,
.grid {
    display: grid;
    gap: 16px;
}

.hero__proof {
    margin-top: 30px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero__proof div,
.kpi-card,
.info-card,
.panel,
.mockup-card,
.brand-customizer,
.wizard,
.tenant-badge {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(19, 38, 29, 0.08);
    box-shadow: var(--shadow-lg);
}

.hero__proof div,
.kpi-card,
.info-card,
.panel,
.mockup-card,
.brand-customizer,
.wizard {
    border-radius: var(--radius-lg);
}

.hero__proof div,
.kpi-card {
    padding: 18px;
}

.hero__proof span,
.kpi-card span,
.panel__header span {
    display: block;
    color: rgba(19, 38, 29, 0.65);
    margin-bottom: 10px;
}

.hero__proof strong,
.kpi-card strong {
    font-size: 1.5rem;
}

.hero__panel {
    display: grid;
    gap: 18px;
}

.mockup-card,
.brand-customizer,
.panel,
.wizard {
    padding: 24px;
}

.brand-customizer {
    display: grid;
    gap: 14px;
}

.brand-customizer .button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.mockup-card__header,
.panel__header,
.page-hero,
.setting-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.feature-list {
    margin: 18px 0 0;
    padding-left: 18px;
    line-height: 1.8;
}

.palette-row {
    display: flex;
    gap: 12px;
}

.swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary);
}

.swatch--soft {
    background: var(--brand-primary-soft);
}

.swatch--accent {
    background: var(--brand-accent);
}

.section {
    padding-top: 76px;
}

.section--muted {
    padding-bottom: 24px;
}

    .home-cta-band {
        padding-top: 34px;
        padding-bottom: 12px;
    }

    .home-cta-band__panel {
        display: grid;
        gap: 18px;
        align-items: center;
        grid-template-columns: 1.2fr 0.8fr;
        background:
            linear-gradient(120deg, rgba(255, 255, 255, 0.88), rgba(229, 242, 227, 0.82));
    }

    .home-cta-band__panel h2 {
        margin: 8px 0;
        font-family: 'Space Grotesk', sans-serif;
        font-size: clamp(1.5rem, 2.2vw, 2.3rem);
    }

    .home-cta-band__panel p {
        margin: 0;
        color: rgba(19, 38, 29, 0.78);
    }

.section__heading {
    max-width: 720px;
    margin-bottom: 24px;
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2,
.page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-shell {
    padding-top: 8px;
}
.auth-shell {
    min-height: calc(100vh - 130px);
    display: grid;
    place-items: center;
    padding-top: 20px;
}
.auth-card {
    width: min(620px, 100%);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(19, 38, 29, 0.1);
    box-shadow: var(--shadow-lg);
    padding: 28px;
}
.auth-card--wide {
    width: min(900px, 100%);
}
.auth-card h1 {
    margin: 8px 0 8px;
}
.auth-card p {
    margin: 0 0 18px;
    color: rgba(19, 38, 29, 0.75);
}
.auth-form {
    display: grid;
    gap: 14px;
}
.auth-links {
    margin-top: 14px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.auth-links a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-hero {
    margin-bottom: 8px;
}

.page-hero--compact h1 {
    max-width: none;
    font-size: clamp(1.45rem, 1.65vw, 2rem);
    margin: 4px 0 8px;
}

.page-shell .eyebrow {
    display: none;
}

.page-hero p {
    margin: 0;
}

.page-hero h1.page-title--single-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(19, 38, 29, 0.08);
}

.status-pill,
.brand-logo-placeholder {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(30, 111, 79, 0.1);
    font-weight: 700;
}

.status-pill--soft,
.brand-logo-placeholder {
    background: rgba(201, 242, 123, 0.36);
}

.status-pill--green {
    background: rgba(30, 111, 79, 0.16);
    color: #15593f;
    border: 1px solid rgba(30, 111, 79, 0.32);
}

.status-pill--white {
    background: #ffffff;
    color: #1f2d27;
    border: 1px solid rgba(19, 38, 29, 0.2);
}

.rent-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1f2d27;
}

.rent-status::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    background: #c8ced1;
    border: 1px solid rgba(19, 38, 29, 0.25);
}

.rent-status--green::before {
    background: #1f9b62;
    border-color: #17784b;
}

.rent-status--yellow::before {
    background: #f1c94b;
    border-color: #c49c28;
}

.rent-status--red::before {
    background: #de4a4a;
    border-color: #b43838;
}

.rent-status--white::before {
    background: #ffffff;
    border-color: rgba(19, 38, 29, 0.45);
}

.rent-status--neutral::before {
    background: #c8ced1;
    border-color: rgba(19, 38, 29, 0.25);
}

.stack {
    display: flex;
    flex-direction: column;
}

.gap-md {
    gap: 16px;
}

.wizard__steps {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.wizard__step {
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(19, 38, 29, 0.12);
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.wizard__step.is-active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-soft));
    color: #fff;
    border-color: transparent;
}

.wizard__panel {
    display: none;
}

.wizard__panel.is-active {
    display: block;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field--full {
    grid-column: 1 / -1;
}

.field span {
    font-weight: 700;
}

.field.is-required > span::after {
    content: ' *';
    color: #2f8c59;
    font-weight: 800;
}

.field-note {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(19, 38, 29, 0.62);
}

p.field--full {
    grid-column: 1 / -1;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(19, 38, 29, 0.2);
    display: inline-grid;
    place-items: center;
    background: #fff;
    color: #1e6f4f;
    font-size: 16px;
    font-weight: 900;
}

.icon-button:hover {
    background: #edf7f1;
}

.icon-button--register {
    background: #fff;
    color: #1e6f4f;
    border-color: rgba(19, 38, 29, 0.2);
}

.icon-button--register:hover {
    background: #edf7f1;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-stack {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.icon-stack__base {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 14px;
}

.icon-stack__plus {
    position: absolute;
    top: -5px;
    right: -7px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #1e6f4f;
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.star-flag {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 99px;
    background: #111;
    color: #fff;
    font-size: 12px;
}

.field input,
.field select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(19, 38, 29, 0.12);
    padding: 14px 16px;
    background: #fff;
    font: inherit;
}

.panel--soft {
    background: rgba(229, 242, 227, 0.62);
    box-shadow: none;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.field--inline {
    min-width: 0;
}

.filter-row__actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.button--tiny {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.button--tenant-add {
    background: linear-gradient(135deg, #1c8f5e, #2ca06e);
    color: #ffffff;
    border: 1px solid rgba(24, 83, 58, 0.2);
    box-shadow: 0 8px 18px rgba(28, 143, 94, 0.22);
}

.button--tenant-add:hover {
    box-shadow: 0 12px 24px rgba(28, 143, 94, 0.3);
}

.rent-section {
    margin-top: 16px;
}

.rent-section h2 {
    margin: 0;
    font-size: 1.05rem;
}

.rent-section p {
    margin: 4px 0 0;
    color: rgba(19, 38, 29, 0.72);
}

.contract-upload-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}

.contract-upload-row .wizard__actions {
    margin-top: 0;
}

.muted {
    color: rgba(19, 38, 29, 0.55);
}

.empty-state {
    padding: 14px 4px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;
    color: rgba(19, 38, 29, 0.76);
}

.helper-text {
    margin: 0 0 14px;
    color: rgba(19, 38, 29, 0.72);
    font-weight: 600;
}

.api-result {
    margin-top: 18px;
    background: #f4f8f2;
    color: #1a3527;
    border: 1px solid rgba(19, 38, 29, 0.12);
    padding: 18px;
    border-radius: 18px;
    overflow: auto;
    min-height: 80px;
    white-space: pre-wrap;
}

.api-result--info {
    background: #eef5eb;
    color: #1a3527;
}

.api-result--success {
    background: #e7f7de;
    color: #1b3f26;
}

.api-result--error {
    background: #ffe8e6;
    color: #6e1f1f;
}

.payments-page {
    display: grid;
    gap: 14px;
}

.payments-year-chip {
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(19, 38, 29, 0.12);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.payments-toolbar {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.payments-toolbar__controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.payments-toolbar__summary {
    justify-self: end;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(19, 38, 29, 0.1);
    border-radius: 16px;
    padding: 10px 12px;
    background:
        radial-gradient(circle at 12% 18%, rgba(201, 242, 123, 0.3), transparent 36%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(244, 250, 242, 0.95));
    min-width: 520px;
    box-shadow: 0 10px 24px rgba(17, 49, 32, 0.08);
}

.payments-toolbar__summary strong {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(19, 38, 29, 0.66);
}

.payments-toolbar__equation {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.86rem;
}

.payments-summary-term {
    display: inline-grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(19, 38, 29, 0.1);
    background: rgba(255, 255, 255, 0.88);
}

.payments-summary-term small {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    color: rgba(19, 38, 29, 0.6);
}

.payments-summary-term b {
    color: #163428;
    font-size: 0.95rem;
}

.payments-summary-term--total {
    border-color: rgba(30, 111, 79, 0.3);
    background: linear-gradient(135deg, rgba(230, 246, 234, 0.9), rgba(255, 255, 255, 0.92));
}

.payments-summary-term--collected {
    border-color: rgba(31, 155, 98, 0.3);
    background: linear-gradient(135deg, rgba(219, 242, 228, 0.88), rgba(255, 255, 255, 0.92));
}

.payments-summary-term--approval {
    border-color: rgba(196, 156, 40, 0.32);
    background: linear-gradient(135deg, rgba(251, 241, 206, 0.9), rgba(255, 255, 255, 0.94));
}

.payments-summary-term--pending {
    border-color: rgba(179, 58, 58, 0.3);
    background: linear-gradient(135deg, rgba(252, 229, 229, 0.9), rgba(255, 255, 255, 0.94));
}

.payments-summary-operator {
    font-size: 1.05rem;
    font-weight: 800;
    color: rgba(19, 38, 29, 0.55);
}

.payments-matrix-panel {
    overflow: hidden;
}

.payments-matrix-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.payments-matrix {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1100px;
    width: max-content;
}

.payments-matrix th,
.payments-matrix td {
    border-bottom: 1px solid rgba(19, 38, 29, 0.08);
    border-right: 1px solid rgba(19, 38, 29, 0.06);
    padding: 5px;
    background: rgba(255, 255, 255, 0.74);
}

.payments-matrix th:first-child,
.payments-matrix td:first-child {
    border-left: 1px solid rgba(19, 38, 29, 0.06);
}

.payments-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f8fcf7 !important;
    min-width: 262px;
}

.payments-row-meta {
    display: grid;
    gap: 3px;
}

.payments-row-meta strong {
    font-size: 0.92rem;
}

.payments-row-meta span {
    color: rgba(19, 38, 29, 0.74);
    font-size: 0.84rem;
}

.payments-month-head {
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    min-width: 76px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.payments-month-head.is-anchor {
    background: rgba(30, 111, 79, 0.14);
}

.payments-month-head.is-current {
    box-shadow: inset 0 0 0 2px rgba(30, 111, 79, 0.35);
}

.payments-month-head.is-selected {
    background: rgba(30, 111, 79, 0.22);
    box-shadow: inset 0 0 0 2px rgba(30, 111, 79, 0.42);
    color: #163428;
}

.payments-matrix td.is-selected {
    background: linear-gradient(180deg, rgba(229, 242, 227, 0.6), rgba(238, 247, 236, 0.52));
}

.pay-cell {
    width: 100%;
    border: 1px solid rgba(19, 38, 29, 0.12);
    border-radius: 9px;
    padding: 5px 4px;
    min-height: 40px;
    background: #ffffff;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
}

.pay-cell:hover {
    background: #f3f9f3;
}

.pay-cell__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(19, 38, 29, 0.25);
    background: #c8ced1;
}

.pay-cell__amount {
    font-weight: 700;
    font-size: 0.76rem;
}

.pay-cell--approved .pay-cell__dot {
    background: #1f9b62;
    border-color: #17784b;
}

.pay-cell--approved {
    background: rgba(214, 241, 224, 0.72);
    border-color: rgba(31, 155, 98, 0.42);
}

.pay-cell--pending .pay-cell__dot,
.pay-cell--partial .pay-cell__dot {
    background: #f1c94b;
    border-color: #c49c28;
}

.pay-cell--pending,
.pay-cell--partial {
    background: rgba(248, 237, 196, 0.78);
    border-color: rgba(196, 156, 40, 0.38);
}

.pay-cell--zero .pay-cell__dot,
.pay-cell--overdue .pay-cell__dot {
    background: #de4a4a;
    border-color: #b43838;
}

.pay-cell--overdue {
    background: rgba(247, 213, 210, 0.55);
    border-color: rgba(179, 58, 58, 0.5);
}

.pay-cell--none .pay-cell__dot {
    background: #c8ced1;
}

.pay-cell__renewal {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.64rem;
    font-weight: 800;
    color: #ffffff;
    background: #1e6f4f;
}

.payment-amounts strong.is-overdue {
    color: #b43838;
}

.payment-modal[hidden] {
    display: none;
}

.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
}

.payment-modal--nested {
    z-index: 130;
}

.payment-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 22, 16, 0.46);
}

.payment-modal__backdrop--soft {
    background: rgba(11, 22, 16, 0.28);
}

.payment-modal__dialog {
    position: relative;
    width: min(740px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
    background: #f8fcf7;
    border-radius: 18px;
    border: 1px solid rgba(19, 38, 29, 0.16);
    box-shadow: 0 30px 62px rgba(17, 49, 32, 0.25);
    padding: 18px;
    display: grid;
    gap: 12px;
}

.payment-modal__dialog--compact {
    width: min(520px, calc(100% - 20px));
    max-height: calc(100vh - 20px);
    padding: 16px;
    gap: 10px;
}

.payment-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(19, 38, 29, 0.16);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    cursor: pointer;
}

.payment-modal__header h3 {
    margin: 0;
}

.payment-modal__header p {
    margin: 6px 0 0;
    color: rgba(19, 38, 29, 0.74);
}

.payment-pill {
    border-radius: 10px;
    background: rgba(30, 111, 79, 0.12);
    border: 1px solid rgba(30, 111, 79, 0.2);
    padding: 8px 12px;
    font-weight: 700;
}

.payment-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.payment-parties span,
.payment-amounts span {
    color: rgba(19, 38, 29, 0.62);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-parties strong,
.payment-amounts strong {
    display: block;
    margin-top: 3px;
}

.payment-amounts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(19, 38, 29, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
}

.payment-form {
    display: grid;
    gap: 10px;
}

.payment-form__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-form__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.payment-form__meta--stack {
    display: grid;
    justify-content: stretch;
    gap: 8px;
}

.payment-form__meta small {
    color: rgba(19, 38, 29, 0.72);
    font-weight: 600;
}

.payment-form__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.payment-pastezone {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px dashed rgba(30, 111, 79, 0.35);
    border-radius: 14px;
    background: rgba(229, 242, 227, 0.38);
    cursor: pointer;
    outline: none;
}

.payment-pastezone strong {
    font-size: 0.95rem;
}

.payment-pastezone span,
.payment-pastezone small {
    color: rgba(19, 38, 29, 0.7);
}

.payment-pastezone.is-active {
    border-color: rgba(30, 111, 79, 0.7);
    background: rgba(229, 242, 227, 0.62);
    box-shadow: inset 0 0 0 1px rgba(30, 111, 79, 0.15);
}

.renewals-page {
    display: grid;
    gap: 14px;
}

.renewals-table .table-action-group {
    flex-wrap: nowrap;
}

.renewal-modal[hidden] {
    display: none;
}

.renewal-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
}

.renewal-modal--nested {
    z-index: 150;
}

.renewal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 22, 16, 0.44);
}

.renewal-modal__backdrop--soft {
    background: rgba(11, 22, 16, 0.26);
}

.renewal-modal__dialog {
    position: relative;
    width: min(620px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    background: #f8fcf7;
    border-radius: 22px;
    border: 1px solid rgba(19, 38, 29, 0.16);
    box-shadow: 0 30px 62px rgba(17, 49, 32, 0.25);
    padding: 18px;
    display: grid;
    gap: 12px;
}

.renewal-modal__dialog--compact {
    width: min(520px, calc(100% - 20px));
}

.renewal-modal__dialog--wide {
    width: min(700px, calc(100% - 20px));
}

.renewal-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(19, 38, 29, 0.16);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    cursor: pointer;
}

.renewal-modal__hero {
    border-radius: 16px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(30, 111, 79, 0.14), rgba(69, 160, 107, 0.12));
}

.renewal-modal__hero--brand {
    background: linear-gradient(135deg, rgba(30, 111, 79, 0.95), rgba(69, 160, 107, 0.88));
    color: #ffffff;
}

.renewal-modal__hero h3 {
    margin: 0;
}

.renewal-modal__hero p {
    margin: 6px 0 0;
    color: inherit;
}

.renewal-summary-card {
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(19, 38, 29, 0.1);
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    gap: 10px;
}

.renewal-summary-card--soft {
    background: linear-gradient(135deg, rgba(244, 248, 242, 0.98), rgba(229, 242, 227, 0.92));
}

.renewal-summary-card--message {
    background: linear-gradient(135deg, rgba(255, 248, 229, 0.92), rgba(255, 255, 255, 0.94));
}

.renewal-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.renewal-summary-grid span,
.renewal-ipc-mini-grid span,
.renewal-calculation-list span {
    color: rgba(19, 38, 29, 0.62);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.renewal-summary-grid b,
.renewal-ipc-mini-grid b,
.renewal-calculation-list b {
    display: block;
    margin-top: 3px;
}

.renewal-ipc-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.renewal-form {
    display: grid;
    gap: 12px;
}

.renewal-radio-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-weight: 600;
}

.renewal-ipc-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(19, 38, 29, 0.08);
    padding: 10px 12px;
}

.renewal-effective-month-field {
    grid-template-columns: 1fr 170px;
    align-items: center;
    gap: 12px;
}

.renewal-effective-month-field span {
    font-weight: 700;
}

.renewal-effective-month-field input {
    border-radius: 12px;
    border: 1px solid rgba(19, 38, 29, 0.16);
    padding: 9px 10px;
    font: inherit;
    background: #ffffff;
}

.renewal-calculation-list {
    display: grid;
    gap: 8px;
}

.renewal-calculation-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.renewal-inline-amount {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.renewal-inline-amount input {
    width: 120px;
    border-radius: 12px;
    border: 1px solid rgba(19, 38, 29, 0.16);
    padding: 8px 10px;
    font: inherit;
    text-align: right;
    background: #ffffff;
}

.renewal-calculation-list__total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed rgba(19, 38, 29, 0.18);
    font-size: 1.08rem;
}

.renewal-calculation-list small {
    color: rgba(19, 38, 29, 0.7);
}

.renewal-summary-card textarea {
    width: 100%;
    min-height: 180px;
    border-radius: 16px;
    border: 1px solid rgba(19, 38, 29, 0.12);
    padding: 14px 16px;
    resize: vertical;
    font: inherit;
    line-height: 1.55;
    background: #fffdf6;
}

.renewal-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.renewal-detail-subtitle {
    margin: 0;
    color: rgba(19, 38, 29, 0.72);
}

.renewal-history-table-wrap {
    border-radius: 14px;
    border: 1px solid rgba(19, 38, 29, 0.1);
    background: #ffffff;
    overflow: auto;
}

.renewal-history-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.renewal-history-table th,
.renewal-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(19, 38, 29, 0.08);
    text-align: left;
    vertical-align: top;
}

.renewal-history-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(19, 38, 29, 0.62);
    background: rgba(244, 248, 242, 0.72);
}

.renewal-history-table td:nth-child(3) {
    font-weight: 700;
    white-space: nowrap;
}

.renewal-composition-cell {
    min-width: 260px;
}

.renewal-composition-list {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    color: rgba(19, 38, 29, 0.62);
    font-size: 0.86rem;
}

.renewal-composition-part {
    font-size: 0.84rem;
    color: rgba(19, 38, 29, 0.72);
}

.renewal-composition-operator {
    color: rgba(19, 38, 29, 0.56);
    font-weight: 800;
    line-height: 1;
    margin: 0 2px;
}

.renewal-history-action-cell {
    width: 72px;
    text-align: center;
}

.renewal-delete-button {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(120, 24, 24, 0.24);
    background: rgba(255, 236, 236, 0.9);
    color: #7d1f1f;
    font-weight: 800;
    cursor: pointer;
}

.renewal-delete-button:hover {
    background: rgba(255, 220, 220, 1);
}

@media (max-width: 960px) {
    .hero,
        .home-cta-band__panel,
    .grid--3,
    .grid--2,
    .page-grid,
    .kpi-grid,
    .hero__proof {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .panel__header,
    .mockup-card__header,
    .setting-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-hero h1.page-title--single-line {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .topbar {
        padding: 10px 14px;
        gap: 10px;
        align-items: center;
    }

    .brandmark {
        min-width: 0;
    }

    .brandmark small {
        display: none;
    }

    .brandmark__icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .brandmark__icon span {
        width: 22px;
    }

    .topbar__actions {
        margin-left: 0;
    }

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
        order: 2;
    }

    .topbar__actions .topnav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(84vw, 360px);
        display: flex;
        flex-direction: column;
        padding: 74px 16px 24px;
        border-left: 1px solid rgba(19, 38, 29, 0.12);
        background: #ffffff;
        box-shadow: -14px 0 34px rgba(17, 49, 32, 0.14);
        transform: translateX(102%);
        transition: transform 180ms ease;
        z-index: 40;
    }

    .topbar__actions .topnav.is-open {
        transform: translateX(0);
    }

    .topnav__desktop {
        display: none;
    }

    .topnav__mobile {
        display: grid;
        gap: 14px;
    }

    .mobile-nav-group a {
        padding: 10px 12px;
        border-radius: 10px;
        background: rgba(30, 111, 79, 0.06);
    }

    .topnav-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(13, 27, 20, 0.36);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
        z-index: 30;
    }

    .topnav-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .user-menu {
        order: 1;
    }

    .user-menu__trigger {
        padding-right: 8px;
        gap: 8px;
    }

    .user-name {
        max-width: 98px;
        font-size: 0.82rem;
    }

    .user-role,
    .user-caret {
        display: none;
    }

    .page-shell {
        padding-top: 8px;
    }

    main {
        padding: 0 12px 36px;
    }

    .page-hero {
        margin-bottom: 10px;
        gap: 8px;
    }

    .page-hero h1 {
        margin: 6px 0 10px;
        line-height: 1.1;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .payments-toolbar__controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .payments-toolbar {
        grid-template-columns: 1fr;
    }

    .payments-toolbar__summary {
        justify-self: stretch;
        min-width: 0;
        gap: 8px;
    }

    .payments-toolbar__equation {
        gap: 6px;
    }

    .payments-summary-term {
        width: 100%;
    }

    .payments-year-chip {
        justify-self: start;
    }

    .payments-sticky-col {
        min-width: 220px;
    }

    .renewal-summary-grid,
    .renewal-ipc-mini-grid,
    .renewal-ipc-strip {
        grid-template-columns: 1fr;
    }

    .renewal-calculation-list > div,
    .renewal-actions-row,
    .renewal-radio-row {
        flex-direction: column;
        align-items: stretch;
    }

    .renewal-effective-month-field {
        grid-template-columns: 1fr;
    }

    .renewal-inline-amount {
        width: 100%;
    }

    .renewal-inline-amount input {
        width: 100%;
        text-align: left;
    }

    .renewal-modal__dialog,
    .renewal-modal__dialog--compact,
    .renewal-modal__dialog--wide {
        width: min(100%, calc(100% - 14px));
        border-radius: 16px;
        padding: 14px;
    }

    .payment-parties,
    .payment-amounts,
    .payment-form__grid {
        grid-template-columns: 1fr;
    }

    .payment-modal__dialog,
    .payment-modal__dialog--compact {
        width: min(100%, calc(100% - 14px));
        border-radius: 16px;
        padding: 14px;
    }

    .panel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        width: max-content;
        min-width: 680px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .contract-upload-row {
        grid-template-columns: 1fr;
    }

    .filter-row__actions {
        justify-content: flex-start;
    }
}