:root {
    --app-bg: #f3f5f2;
    --surface: #ffffff;
    --surface-soft: #f8faf8;
    --ink: #17221f;
    --muted: #68746f;
    --line: #dde4df;
    --brand: #173c32;
    --brand-dark: #102b25;
    --green: #218765;
    --green-soft: #e8f6ef;
    --red: #c8513d;
    --red-soft: #fff0ec;
    --blue: #4677b7;
    --blue-soft: #edf4ff;
    --amber: #9b681a;
    --amber-soft: #fff6e5;
    --radius: 18px;
    --shadow: 0 14px 40px rgba(20, 54, 45, .075);
}

html, body { min-height: 100%; background: var(--app-bg); }
body { color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--green); }
.container-xl { max-width: 1380px; }
.app-header { z-index: 1020; border-bottom: 1px solid rgba(91, 117, 107, .17); background: rgba(243, 245, 242, .92); backdrop-filter: blur(14px); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.22rem; letter-spacing: -.04em; }
.brand:hover { color: var(--ink); }
.brand strong { font-weight: 800; }
.brand em { color: var(--green); font-style: normal; font-weight: 750; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--brand); color: #fff; font-weight: 850; font-size: .9rem; }
.desktop-nav { align-self: stretch; align-items: center; gap: 5px; }
.desktop-nav a { position: relative; height: 100%; display: inline-flex; align-items: center; padding: 0 15px; color: var(--muted); text-decoration: none; font-size: .86rem; font-weight: 650; }
.desktop-nav a::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: -1px; height: 2px; background: transparent; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--ink); }
.desktop-nav a.active::after { background: var(--green); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions form { margin: 0; }
.user-avatar { width: 35px; height: 35px; display: grid; place-items: center; border: 2px solid transparent; border-radius: 50%; color: #fff; background: var(--brand); font-size: .75rem; font-weight: 800; text-decoration: none; }
.user-avatar:hover { color: #fff; background: var(--brand-dark); }
.user-avatar.active { border-color: #9ee0bd; }
.logout-button { border: 0; padding: 7px 3px; color: var(--muted); background: transparent; font-size: .78rem; }
.logout-button:hover { color: var(--ink); }

.app-content { padding-top: 38px; padding-bottom: 70px; }
.product-footer { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .875rem; line-height: 1.6; }
.product-footer p { margin: 0; }
.product-footer strong { color: var(--brand); font-weight: 750; }
.app-alert { margin-bottom: 20px; border: 0; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.btn { border-radius: 10px; font-weight: 680; font-size: .85rem; padding: .63rem .9rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--surface-soft); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #b8c3be; }
.btn-link { color: var(--green); text-decoration: none; }
.btn-link:hover { color: var(--brand); text-decoration: underline; }
.form-control, .form-select, .card { border-radius: 12px; }

.page-kicker { display: block; margin-bottom: 7px; color: var(--green); font-size: .68rem; font-weight: 850; letter-spacing: .13em; }
.dashboard-hero, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.dashboard-hero h1, .page-heading h1 { max-width: 760px; margin: 0 0 7px; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.055em; font-weight: 780; }
.dashboard-hero p, .page-heading p { margin: 0; color: var(--muted); font-size: .92rem; }
.dashboard-hero { flex-wrap: wrap; }
.dashboard-hero > div:first-child { min-width: 0; flex: 1 1 350px; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.metrics-grid { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 13px; margin-bottom: 24px; }
.metric-card { min-height: 145px; padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 14px rgba(20, 54, 45, .025); }
.metric-card-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .76rem; font-weight: 680; }
.metric-card > strong { display: block; margin: 19px 0 9px; font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: .7rem; }
.metric-highlight { border-color: transparent; color: #f5fff9; background: var(--brand-dark); box-shadow: var(--shadow); }
.metric-highlight .metric-card-label, .metric-highlight small { color: #b9d2ca; }
.metric-symbol { color: #9ee0bd; font-size: 1rem; }
.metric-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; font-size: .68rem; font-weight: 850; }
.metric-icon-green { color: var(--green); background: var(--green-soft); }
.metric-icon-red { color: var(--red); background: var(--red-soft); }
.metric-icon-blue { color: var(--blue); background: var(--blue-soft); }

.data-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); box-shadow: var(--shadow); }
.simple-panel { box-shadow: 0 8px 28px rgba(20, 54, 45, .055); }
.data-panel-heading { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 24px 14px; }
.data-panel-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.035em; }
.data-panel-links { display: flex; align-items: center; gap: 15px; }
.text-link { color: var(--green); text-decoration: none; font-size: .78rem; font-weight: 720; }
.text-link:hover { text-decoration: underline; }
.dashboard-filters { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(155px, auto) minmax(175px, auto) auto auto; gap: 8px; padding: 0 24px 18px; }
.dashboard-filters label { margin: 0; }
.dashboard-filters select, .dashboard-search { width: 100%; height: 43px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface-soft); }
.dashboard-filters select { padding: 0 36px 0 12px; font-size: .8rem; }
.dashboard-search { display: flex; align-items: center; gap: 9px; padding: 0 12px; }
.dashboard-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33, 135, 101, .1); }
.dashboard-search > span { color: var(--muted); font-size: 1.2rem; }
.dashboard-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .83rem; }
.dashboard-search input::placeholder { color: #98a29e; }
kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); box-shadow: 0 1px 0 var(--line); font-size: .62rem; }
.filter-clear { align-self: center; padding-inline: 5px; }

.dashboard-table-wrap { border-top: 1px solid var(--line); }
.dashboard-table { --bs-table-bg: transparent; --bs-table-hover-bg: #f8fbf9; }
.dashboard-table thead th { padding: 12px 24px; border-bottom-color: var(--line); background: var(--surface-soft); color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.dashboard-table tbody td { padding: 14px 24px; border-bottom-color: var(--line); color: var(--ink); font-size: .8rem; white-space: nowrap; }
.dashboard-table tbody tr:last-child td { border-bottom: 0; }
.customer-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; color: var(--ink); text-decoration: none; }
.customer-cell:hover strong { color: var(--green); }
.customer-avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: none; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: .66rem; font-weight: 850; }
.customer-cell > span:last-child, .description-cell { display: flex; flex-direction: column; gap: 2px; }
.customer-cell strong, .description-cell strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.customer-cell small, .description-cell small { color: var(--muted); font-size: .66rem; }
.money-cell { font-weight: 800; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: .63rem; font-weight: 780; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-paga { color: var(--green); background: var(--green-soft); }
.status-vencida { color: var(--red); background: var(--red-soft); }
.status-pendente { color: var(--blue); background: var(--blue-soft); }
.status-cancelada { color: var(--muted); background: #eff1f0; }
.row-arrow { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 1.25rem; }
.row-arrow:hover { color: var(--ink); background: var(--surface-soft); }
.data-panel-footer { min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }

.home-charge-cards { display: none; border-top: 1px solid var(--line); }
.charge-cards { display: flex; flex-direction: column; }
.charge-card { display: block; min-width: 0; padding: 20px 24px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.charge-card:last-child { border-bottom: 0; }
.charge-card:hover { color: var(--ink); background: var(--surface-soft); }
.charge-card:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.charge-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.charge-card-heading > strong { flex: 1 1 160px; min-width: 0; font-size: 1rem; }
.charge-card-heading .status-pill { font-size: .75rem; }
.charge-card-description { margin: 9px 0 16px; color: var(--muted); font-size: .88rem; }
.charge-card-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.charge-card-summary > div { min-width: 0; }
.charge-card-summary > div:last-child { text-align: right; }
.charge-card-summary dt { color: var(--muted); font-size: .78rem; font-weight: 500; }
.charge-card-summary dd { margin: 3px 0 0; font-size: .95rem; font-weight: 700; }
.charge-card-summary .charge-card-amount { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.charge-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 16px; }
.charge-card-footer > small { color: var(--muted); font-size: .78rem; }
.charge-card-footer > span { color: var(--green); font-size: .85rem; font-weight: 750; }

.more-page { max-width: 720px; margin: 0 auto; }
.more-options { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.more-options > a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.more-options > a:last-child { border-bottom: 0; }
.more-options > a:hover { background: var(--surface-soft); }
.more-options > a:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.more-options strong, .more-options small { display: block; }
.more-options strong { font-size: 1rem; }
.more-options small { margin-top: 4px; color: var(--muted); font-size: .85rem; }
.more-options > a > span:last-child { color: var(--green); font-size: 1.5rem; }
.dashboard-help { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; }
.getting-started { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 24px; padding: 24px; border: 1px solid #b8dcca; border-radius: var(--radius); background: var(--green-soft); }
.getting-started > div:first-child { flex: 1 1 280px; min-width: 0; }
.getting-started h2 { margin: 0 0 8px; font-size: clamp(1.15rem, 3vw, 1.4rem); }
.getting-started p { margin: 0; color: var(--muted); font-size: .9rem; }
.getting-started-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-page { max-width: 720px; margin: 0 auto; }
.setup-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; }
.setup-progress { margin-bottom: 22px; }
.setup-progress label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .85rem; }
.setup-progress progress { display: block; width: 100%; height: 12px; accent-color: var(--green); }
.setup-steps { margin: 0; padding: 0; list-style: none; }
.setup-card { padding: 24px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.setup-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.setup-card h2 { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.setup-card .status-pill { font-size: .75rem; }
.setup-card p { margin: 12px 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.setup-card p:last-child { margin-bottom: 0; }
.setup-card .setup-hint { padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.setup-card .btn { min-height: 44px; }
.setup-pix { margin-top: 24px; }
.more-account { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.more-account p { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.more-account strong { color: var(--ink); }
.more-account .btn { min-height: 48px; }

.empty-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 45px 20px; text-align: center; }
.empty-state-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: 1.35rem; }
.empty-state h3 { margin: 0; font-size: 1rem; }
.empty-state p { margin: 7px 0 16px; color: var(--muted); font-size: .8rem; }
.empty-state > div { display: flex; gap: 8px; }
.empty-state.compact { min-height: 180px; }

.client-search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.client-search .dashboard-search { min-width: 0; grid-column: auto; }
.client-list { display: flex; flex-direction: column; }
.client-list-item { display: grid; grid-template-columns: auto minmax(180px, 1.2fr) minmax(210px, 1fr) auto; align-items: center; gap: 13px; padding: 15px 24px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.client-list-item:last-child { border-bottom: 0; }
.client-list-item:hover { background: var(--surface-soft); }
.client-list-main, .client-list-contact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.client-list-main strong, .client-list-contact strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .81rem; }
.client-list-main small, .client-list-contact small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; }

.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.back-link { color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 650; }
.back-link:hover { color: var(--green); }
.customer-detail-hero { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.customer-avatar-large { width: 58px; height: 58px; border-radius: 16px; font-size: .9rem; }
.customer-detail-hero h1 { margin: 0 0 3px; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.045em; }
.customer-detail-hero p { margin: 0; color: var(--muted); font-size: .8rem; }
.client-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.client-metrics article { padding: 17px 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.client-metrics span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .7rem; }
.client-metrics strong { font-size: 1.18rem; }
.detail-columns { display: grid; grid-template-columns: minmax(310px, .85fr) minmax(420px, 1.4fr); gap: 15px; align-items: start; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0 24px 21px; }
.contact-grid div { min-height: 72px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.contact-grid dt { margin-bottom: 4px; color: var(--muted); font-size: .65rem; font-weight: 650; }
.contact-grid dd { margin: 0; font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.customer-note { margin: 0 24px 22px; padding: 13px; border-radius: 10px; background: var(--surface-soft); }
.customer-note strong { font-size: .68rem; }
.customer-note p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.record-count { min-width: 26px; height: 24px; display: grid; place-items: center; padding: 0 7px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: .68rem; font-weight: 800; }
.charge-history { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.charge-history > a { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 24px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.charge-history > a:last-child { border-bottom: 0; }
.charge-history > a:hover { background: var(--surface-soft); }
.charge-history > a > span { display: flex; flex-direction: column; gap: 3px; }
.charge-history strong { font-size: .77rem; }
.charge-history small { color: var(--muted); font-size: .66rem; }
.charge-history .history-value { align-items: flex-end; }
.charge-history .status-pill { font-size: .58rem; }

.statement-page { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.statement-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding-bottom: 20px; border-bottom: 2px solid var(--brand); }
.statement-header h1 { margin: 0 0 5px; font-size: 1.45rem; letter-spacing: -.035em; }
.statement-header p { margin: 0; color: var(--muted); font-size: .72rem; }
.statement-generated { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.statement-generated span, .statement-customer span, .statement-summary span { color: var(--muted); font-size: .66rem; }
.statement-generated strong { font-size: .78rem; }
.statement-customer { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 15px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.statement-customer div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.statement-customer strong { overflow-wrap: anywhere; font-size: .8rem; }
.statement-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; padding: 18px 0 23px; }
.statement-summary article { display: flex; flex-direction: column; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.statement-summary strong { font-size: .98rem; font-variant-numeric: tabular-nums; }
.statement-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.statement-section-title h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.03em; }
.statement-section-title > span { color: var(--muted); font-size: .7rem; }
.statement-charges { display: flex; flex-direction: column; gap: 13px; }
.statement-charge { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.statement-charge > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 15px 17px; background: var(--surface-soft); }
.statement-charge h3 { margin: 0 0 4px; font-size: .88rem; }
.statement-charge header p { margin: 0; color: var(--muted); font-size: .64rem; }
.statement-charge-totals { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 3px 10px; flex: none; }
.statement-charge-totals .status-pill { grid-row: 1 / 3; }
.statement-charge-totals strong { font-size: .82rem; }
.statement-charge-totals small { color: var(--muted); font-size: .62rem; }
.statement-table { font-size: .7rem; }
.statement-table thead th { padding: 9px 12px; border-color: var(--line); color: var(--muted); font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.statement-table tbody td { padding: 9px 12px; border-color: var(--line); vertical-align: middle; white-space: nowrap; }
.statement-payment-row td { padding: 8px 12px 8px 34px !important; background: #fbfcfb; white-space: normal !important; }
.statement-payment { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 5px 0; color: var(--green); }
.statement-payment + .statement-payment { border-top: 1px dashed var(--line); }
.statement-payment span, .statement-payment strong { font-size: .66rem; }
.statement-payment small { grid-column: 1 / -1; color: var(--muted); font-size: .61rem; }
.statement-payment.is-reversed { color: var(--muted); text-decoration: line-through; }
.statement-payment.is-reversed small { text-decoration: none; }
.statement-note { margin: 0; padding: 10px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; }
.statement-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .6rem; }

.form-card, .detail-card { max-width: 720px; margin: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.form-page-heading { max-width: 720px; margin: 0 auto 20px; }
.form-page-heading h1 { margin: 0 0 6px; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.045em; }
.form-page-heading p { margin: 0; color: var(--muted); font-size: .8rem; }
.customer-form { overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.customer-form .form-label { margin-bottom: 6px; color: var(--ink); font-size: .75rem; font-weight: 720; }
.customer-form .form-control { border-color: var(--line); font-size: .86rem; }
.customer-form .form-select { border-color: var(--line); font-size: .86rem; }
.customer-form .form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33, 135, 101, .1); }
.customer-form .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33, 135, 101, .1); }
.validation-summary:empty { display: none; }
.validation-message { display: block; margin-top: 4px; font-size: .68rem; }
.settings-section { margin-top: 26px; padding-top: 23px; border-top: 1px solid var(--line); }
.settings-section h2 { margin: 0 0 5px; font-size: 1.08rem; }
.settings-section > div:first-child p { margin: 0 0 17px; color: var(--muted); font-size: .75rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-wrap { max-width: 440px; margin: 4vh auto 0; }
.filter-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-scroll .btn { white-space: nowrap; }
.mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; height: calc(70px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -7px 25px rgba(20,54,45,.07); }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.mobile-nav a.active { color: var(--green); }
.mobile-nav a:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.mobile-nav a > span { font-size: 1.05rem; font-weight: 750; }
.mobile-nav a small { font-size: .72rem; }
.mobile-nav-main > span { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; margin-top: -14px; border-radius: 50%; color: #fff; background: var(--brand); font-size: 1.45rem; }
.mobile-nav-main small { color: var(--green); font-weight: 700; }
.pb-mobile-nav { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }

.report-heading { align-items: flex-start; }
.report-filters { display: grid; grid-template-columns: 150px 150px minmax(220px, 1fr) 190px auto auto; align-items: end; gap: 10px; margin-bottom: 22px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(20, 54, 45, .045); }
.report-filters label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.report-filters .form-control, .report-filters .form-select { height: 43px; border-color: var(--line); background-color: var(--surface-soft); font-size: .78rem; }
.report-filter-validation { grid-column: 1 / -1; margin: 2px 0 0; }
.financial-report-page { padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.financial-report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding-bottom: 18px; border-bottom: 2px solid var(--brand); }
.financial-report-header h2 { margin: 0 0 5px; font-size: 1.42rem; letter-spacing: -.035em; }
.financial-report-header p { margin: 0; color: var(--muted); font-size: .72rem; }
.report-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; padding: 18px 0 24px; }
.report-summary article { display: flex; flex-direction: column; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.report-summary span { color: var(--muted); font-size: .64rem; }
.report-summary strong { font-size: .96rem; font-variant-numeric: tabular-nums; }
.report-section { overflow: hidden; margin-top: 17px; border: 1px solid var(--line); border-radius: 13px; break-inside: auto; }
.report-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 14px 17px 12px; background: var(--surface-soft); }
.report-section-heading h3 { margin: 0; font-size: .98rem; letter-spacing: -.025em; }
.report-section-heading > span { color: var(--muted); font-size: .66rem; }
.payment-methods .report-section-heading { flex-wrap: wrap; align-items: center; }
.payment-methods .btn { min-height: 44px; display: inline-flex; align-items: center; }
.payment-method-note { margin: 13px 17px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.payment-method-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0 17px; }
.payment-method-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; break-inside: avoid; }
.payment-method-card h4 { margin: 0 0 8px; font-size: .92rem; }
.payment-method-card strong { display: block; margin-bottom: 7px; color: var(--green); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.payment-method-card span { color: var(--muted); font-size: .78rem; }
.payment-method-total { margin: 15px 17px; font-size: .85rem; }
.report-table { font-size: .7rem; }
.report-table thead th { padding: 9px 11px; border-color: var(--line); color: var(--muted); background: #fbfcfb; font-size: .57rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.report-table tbody td { padding: 9px 11px; border-color: var(--line); vertical-align: middle; white-space: nowrap; }
.report-table tbody tr:nth-child(even) td { background: #fbfcfb; }
.report-table td strong, .report-table td small { display: block; }
.report-table td small { color: var(--muted); font-size: .6rem; }
.report-table td a { color: var(--ink); font-weight: 700; text-decoration: none; }
.report-table td a:hover { color: var(--green); }
.report-empty { padding: 25px 17px; color: var(--muted); font-size: .75rem; text-align: center; }
.report-no-movement { border: 1px dashed var(--line); border-radius: 13px; }
.report-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .6rem; }

@media (max-width: 1100px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-filters { grid-template-columns: 1fr 1fr; }
    .report-filters { grid-template-columns: 1fr 1fr; }
    .report-filters > div:nth-child(3), .report-filters > div:nth-child(4) { grid-column: span 1; }
    .dashboard-search { grid-column: 1 / -1; }
    .detail-columns { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
    .pb-mobile-nav { padding-bottom: 70px !important; }
}

@media (max-width: 1199.98px) {
    .header-actions .logout-button { display: none; }
    .user-avatar { width: 44px; height: 44px; }
    .app-content .btn { min-height: 44px; }
    .app-content .form-control, .app-content .form-select,
    .dashboard-filters select, .dashboard-search input { min-height: 44px; font-size: 1rem; }
    .dashboard-search { height: 46px; }
}

@media (max-width: 767.98px) {
    .home-charge-cards { display: block; }
    .dashboard-table-wrap { display: none; }
    .charge-card { padding: 18px 17px; }
    .home-actions { width: 100%; }
    .home-actions .btn-outline-secondary { display: none; }
    .home-actions .btn-primary { width: 100%; }
    .data-panel-footer { flex-wrap: wrap; gap: 5px; padding-block: 12px; }
    .metric-card { min-width: 0; }
    .metric-card > strong { overflow-wrap: anywhere; }
}

@media (max-width: 700px) {
    .getting-started, .setup-card { padding: 20px; }
    .getting-started-actions { display: grid; width: 100%; }
    .setup-card .btn { width: 100%; }
    .header-inner { min-height: 64px; padding-inline: 15px; }
    .app-content { padding: 28px 13px 90px; }
    .dashboard-hero, .page-heading { align-items: flex-start; margin-bottom: 21px; }
    .dashboard-hero p, .page-heading p { max-width: 310px; }
    .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 132px; padding: 16px; }
    .metric-card > strong { margin-top: 17px; font-size: 1.2rem; }
    .metric-card small { line-height: 1.3; }
    .data-panel-heading { padding-inline: 17px; }
    .data-panel-links { align-items: flex-end; flex-direction: column; gap: 5px; }
    .dashboard-filters { grid-template-columns: 1fr; padding-inline: 17px; }
    .dashboard-search { grid-column: auto; }
    .dashboard-table thead th, .dashboard-table tbody td { padding-inline: 17px; }
    .data-panel-footer { padding-inline: 17px; }
    .client-search { grid-template-columns: minmax(0, 1fr); padding-inline: 17px; }
    .client-search .btn-primary { width: 100%; }
    .client-search .btn-link { grid-column: 1 / -1; justify-self: start; }
    .client-list-item { grid-template-columns: auto 1fr auto; padding-inline: 17px; }
    .client-list-contact { display: none; }
    .client-metrics { grid-template-columns: 1fr; gap: 8px; }
    .client-metrics article { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
    .client-metrics span { margin: 0; }
    .contact-grid { grid-template-columns: 1fr; padding-inline: 17px; }
    .contact-grid div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
    .charge-history > a { padding-inline: 17px; }
    .statement-page { padding: 17px; }
    .statement-header, .statement-section-title { align-items: flex-start; }
    .statement-customer { grid-template-columns: 1fr; gap: 10px; }
    .statement-summary { grid-template-columns: 1fr 1fr; }
    .statement-summary article:last-child { grid-column: 1 / -1; }
    .report-filters { grid-template-columns: 1fr; }
    .report-filters > div:nth-child(3), .report-filters > div:nth-child(4) { grid-column: auto; }
    .financial-report-page { padding: 17px; }
    .financial-report-header { align-items: flex-start; }
    .report-summary { grid-template-columns: 1fr 1fr; }
    .report-summary article:last-child { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.pix-page { max-width: 560px; margin: 0 auto; }
.pix-panel { padding: clamp(20px, 5vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.pix-panel h1 { margin: 8px 0 18px; font-size: 1.65rem; letter-spacing: -.035em; }
.pix-customer { margin: 0 0 5px; font-weight: 750; overflow-wrap: anywhere; }
.pix-description { margin: 0 0 18px; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.pix-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 14px 0; border-block: 1px solid var(--line); font-size: .85rem; }
.pix-details strong { display: block; margin-top: 3px; }
.pix-amount { display: flex; flex-direction: column; gap: 3px; margin: 22px 0 12px; }
.pix-amount span { color: var(--muted); font-size: .8rem; }
.pix-amount strong { color: var(--green); font-size: clamp(1.65rem, 7vw, 2.1rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pix-qr-image { display: block; width: min(100%, 300px); height: auto; margin: 0 auto 12px; background: #fff; image-rendering: pixelated; }
.pix-company { margin: 0 0 14px; font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.pix-instructions { margin: 0 0 16px; color: var(--muted); font-size: .85rem; }
.pix-actions { display: grid; gap: 10px; }
.pix-actions .btn { min-height: 48px; padding: 12px; font-size: 1rem; }
.pix-actions [hidden] { display: none !important; }
.pix-note { margin: 18px 0 0; color: var(--muted); font-size: .8rem; }
.pix-message { text-align: left; overflow-wrap: anywhere; }
.pix-message textarea { font-size: 1rem; line-height: 1.55; white-space: pre-wrap; resize: vertical; }

@media print {
    @page { size: A4 portrait; margin: 11mm; }
    body { background: #fff !important; color: #000; }
    .app-header, .mobile-nav, .no-print { display: none !important; }
    .app-content { max-width: none !important; padding: 0 !important; }
    .statement-page { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .statement-summary { grid-template-columns: repeat(5, 1fr); }
    .statement-summary article { padding: 8px; background: #fff; }
    .statement-charge { break-inside: avoid; }
    .statement-charge > header, .statement-payment-row td { background: #fff !important; }
    .statement-table { font-size: 8pt; }
    .statement-footer { position: relative; }
    .financial-report-page { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .report-summary { grid-template-columns: repeat(5, 1fr); }
    .report-summary article { padding: 7px; background: #fff; }
    .report-section { margin-top: 11px; break-inside: auto; }
    .report-section-heading, .report-table thead th, .report-table tbody tr:nth-child(even) td { background: #fff !important; }
    .report-table { font-size: 7.3pt; }
    .report-table thead { display: table-header-group; }
    .report-table tr { break-inside: avoid; }
    .payment-method-list { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .payment-method-card { padding: 10px; }
    .payment-method-card strong { font-size: 12pt; }
    .payment-method-note, .payment-method-total { font-size: 8pt; }
    .report-footer { position: relative; }
    a { color: inherit !important; text-decoration: none !important; }
}

/* Assinaturas: formulários e cartões legíveis no celular. */
.subscription-page { max-width: 760px; margin-inline: auto; }
.subscription-page h1, .subscription-company h2 { overflow-wrap: anywhere; }
.subscription-card { padding: clamp(18px, 4vw, 28px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.subscription-card h2 { font-size: 1.15rem; margin-bottom: 16px; }
.subscription-reference { overflow-wrap: anywhere; font-size: .85rem; }
.subscription-code { font-family: monospace; font-size: .9rem; overflow-wrap: anywhere; resize: vertical; }
.subscription-message { font-size: 1rem; overflow-wrap: anywhere; resize: vertical; }
.subscription-pix { min-width: 0; overflow-wrap: anywhere; }
.subscription-card summary { cursor: pointer; font-weight: 700; min-height: 28px; }
.subscription-card .btn { min-height: 46px; white-space: normal; }
.subscription-price { font-size: 2rem; font-weight: 750; margin-block: 18px; }
.subscription-price small { font-size: 1rem; font-weight: 400; margin-left: 8px; color: var(--muted); }
.subscription-status { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #edf4ef; color: #12372d; font-weight: 700; font-size: .85rem; }
.subscription-history-row { padding-block: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; overflow-wrap: anywhere; }
.subscription-history-row > div { min-width: 0; max-width: 100%; }
.subscription-history-row small { display: block; margin-top: 5px; color: var(--muted); }
.subscription-history-row p { margin: 8px 0; }
.subscription-company-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.subscription-company { color: inherit; text-decoration: none; margin: 0; overflow-wrap: anywhere; }
.subscription-company:hover { border-color: var(--green); }
.subscription-search { display: grid; grid-template-columns: 2fr 1fr auto; gap: 14px; align-items: end; }
.subscription-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 20px; border: 1px solid #d9e5da; border-radius: 12px; background: #f0f6ef; font-size: .9rem; }
.subscription-banner a { font-weight: 700; flex-shrink: 0; }
@media (max-width: 700px) {
    .subscription-search { grid-template-columns: 1fr; }
    .subscription-page .form-page-heading h1 { font-size: 1.6rem; }
}
