:root {
    --ios-bg: #f2f5f8;
    --ios-card: #ffffff;
    --ios-blue: #0d2e3e;
    --ios-text: #1a2530;
    --ios-gray: #607080;
    --ios-red: #9d3f36;

    --app-bg: #f2f5f8;
    --app-surface: #ffffff;
    --app-surface-muted: #e8eef3;
    --app-border: #d4dde6;
    --app-border-strong: #b8c8d6;
    --app-text: #1a2530;
    --app-muted: #607080;
    --app-soft: #7a8fa0;
    --app-accent: #0d2e3e;
    --app-accent-strong: #071d29;
    --app-accent-soft: #d0e3ef;
    --app-success: #3f6f4f;
    --app-danger: #9d3f36;
    --app-warning: #a16a32;
    --app-info: #47677d;
    --app-shadow: 0 10px 24px rgba(13, 46, 62, 0.08);
    --app-shadow-soft: 0 3px 12px rgba(13, 46, 62, 0.05);
    --app-radius: 10px;
    --app-radius-sm: 8px;

    /* identidade da logo Iles Family Office (fundo navy + dourado champanhe) */
    --brand-navy: #051022;
    --brand-gold: #c9a26b;
    --brand-gold-light: #eac993;
    --brand-gold-dark: #a77e50;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--app-bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        linear-gradient(180deg, rgba(208, 227, 239, 0.60) 0, rgba(242, 245, 248, 0) 220px),
        var(--app-bg);
    color: var(--app-text);
    margin: 0;
    padding-top: 64px;
    padding-bottom: 96px;
    font-size: 15px;
    line-height: 1.45;
}

a {
    color: var(--app-accent);
}

.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 64px;
    background: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid rgba(234, 201, 147, 0.22);
    z-index: 1000;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    min-width: 86px;
}

.topbar-left {
    gap: 6px;
}

.topbar-right {
    justify-content: flex-end;
}

.topbar-back {
    color: var(--brand-gold-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: -8px;
    border-radius: 999px;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
}

.topbar-back:active {
    background: rgba(234, 201, 147, 0.16);
}

.topbar-back i {
    width: 24px;
    height: 24px;
}

.topbar-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.topbar h1 {
    position: absolute;
    left: 50%;
    max-width: min(46vw, 360px);
    margin: 0;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.content {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 18px;
}

.card,
.stat-card,
.chart-container,
.month-selector-container,
.ios-list,
.parent-group {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-soft);
}

.card {
    padding: 16px;
    margin-bottom: 16px;
}

.card-title {
    margin: 0 0 14px;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 700;
}

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

.stat-card {
    width: 100%;
    padding: 18px;
    text-align: left;
}

.stat-card h4 {
    margin: 0;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-card .value {
    display: block;
    margin-top: 8px;
    color: var(--app-text) !important;
    font-size: 23px;
    font-weight: 750;
    line-height: 1.15;
}

.chart-container {
    padding: 18px;
    margin-bottom: 18px;
}

.projection-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.projection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--app-border);
}

.projection-item:last-child {
    border-bottom: 0;
}

.projection-month {
    color: var(--app-text);
    font-size: 15px;
    font-weight: 650;
}

.projection-value {
    color: var(--app-accent);
    font-weight: 700;
}

.occupancy-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
}

.circular-progress {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.inner-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 94px;
    height: 94px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 50%;
}

.occupancy-value {
    color: var(--app-text);
    font-size: 24px;
    font-weight: 750;
}

/* ---- Login (tema escuro da marca: navy da logo + dourado champanhe) ----
   Fundo 100% chapado no navy da logo: qualquer gradiente denunciaria a borda do JPEG. */
html.login-page,
body.login-page {
    background: var(--brand-navy);
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
}

/* logo em PNG transparente, direto sobre o navy */
.login-brand img {
    display: block;
    width: min(190px, 52vw);
    margin: 0 auto 26px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 26px 26px 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(234, 201, 147, 0.16);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.login-card h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
}

.login-card p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

body.login-page input {
    min-height: 48px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
}

body.login-page input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

body.login-page input:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 107, 0.20);
    background: rgba(255, 255, 255, 0.09);
}

body.login-page input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #0b1830 inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}

body.login-page .btn-full,
body.login-page .btn-full:hover {
    background: linear-gradient(135deg, var(--brand-gold-light) 0%, var(--brand-gold) 55%, var(--brand-gold-dark) 100%) !important;
    color: var(--brand-navy);
    border: none;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 26px rgba(201, 162, 107, 0.28);
}

body.login-page .btn-full:hover {
    filter: brightness(1.06);
}

body.login-page a {
    color: rgba(255, 255, 255, 0.6);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--app-border);
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--app-surface-muted);
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

td {
    color: var(--app-text);
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}

.month-selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--app-accent);
    background: var(--app-accent-soft);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-arrow:active {
    background: #d2ddd5;
}

.nav-arrow i {
    width: 20px;
    height: 20px;
}

.current-month-display {
    flex: 1;
    text-align: center;
}

.month-name {
    display: block;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 750;
}

.year-name {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 650;
}

.ios-list {
    padding: 0;
    margin: 0 0 18px;
    overflow: hidden;
    list-style: none;
}

.ios-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    color: inherit;
    border-bottom: 1px solid var(--app-border);
    text-decoration: none;
    transition: background 0.2s;
}

.ios-item:last-child {
    border-bottom: 0;
}

.ios-item:active,
.report-menu .card:active {
    background: var(--app-surface-muted) !important;
}

.ios-item-icon,
.report-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border-radius: var(--app-radius-sm);
}

.report-icon {
    width: 44px;
    height: 44px;
}

.ios-item-icon.receita {
    background: var(--app-success) !important;
}

.ios-item-icon.despesa {
    background: var(--app-warning) !important;
}

.ios-item-icon.pago,
.bg-blue,
.bg-purple,
.bg-green,
.bg-orange,
.bg-gray {
    background: var(--app-accent) !important;
}

.ios-item-body,
.report-info {
    flex: 1;
    min-width: 0;
}

.ios-item-title,
.report-info h4 {
    display: block;
    margin: 0;
    color: var(--app-text);
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ios-item-subtitle,
.report-info p {
    display: block;
    margin: 3px 0 0;
    color: var(--app-muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ios-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.ios-item-value {
    color: var(--app-text);
    font-size: 15px;
    font-weight: 750;
}

.ios-item-value.receita {
    color: var(--app-success);
}

.ios-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ios-badge.pending {
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.ios-badge.paid {
    background: #e1eadf;
    color: var(--app-success);
}

.menu-container {
    position: fixed;
    bottom: 24px;
    left: 0;
    z-index: 1001;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 14px;
    pointer-events: none;
}

.floating-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    width: min(100%, 430px);
    gap: 4px;
    padding: 7px;
    background: rgba(242, 245, 248, 0.96);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 8px 6px;
    color: var(--app-muted);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.menu-item.active {
    color: var(--app-accent);
    background: var(--app-accent-soft);
    box-shadow: none;
}

.menu-icon {
    width: 21px;
    height: 21px;
    margin-bottom: 3px;
    stroke-width: 2.1px;
}

.menu-label {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0;
}

button,
.btn,
.btn-full,
.btn-small,
.btn-logout,
.nav-arrow {
    text-decoration: none !important;
}

button,
.btn,
.btn-full,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 16px;
    color: #fff;
    background: var(--app-accent) !important;
    border: 1px solid var(--app-accent-strong);
    border-radius: var(--app-radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

button:hover,
.btn:hover,
.btn-full:hover,
.btn-small:hover {
    background: var(--app-accent-strong) !important;
}

.btn-full {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    font-size: 15px;
}

.btn-small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 13px;
}

button:active,
.btn:active,
.btn-full:active,
.btn-small:active {
    opacity: 0.9;
    transform: translateY(1px);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

input,
select,
textarea,
.ts-control {
    width: 100%;
    min-height: 43px;
    padding: 11px 12px;
    margin: 7px 0;
    color: var(--app-text);
    background: #fbfcfa;
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-size: 15px;
    outline: none;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.ts-control.focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.14);
}

input[type="file"],
.file-input-ios {
    background: var(--app-surface-muted) !important;
    border: 1px dashed var(--app-border-strong) !important;
}

hr {
    border-color: var(--app-border) !important;
}

.report-menu .card {
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.report-icon i {
    width: 22px;
    height: 22px;
}

.chevron {
    flex: 0 0 auto;
    width: 18px;
    color: var(--app-soft) !important;
}

.parent-group {
    margin-bottom: 14px;
    overflow: hidden;
}

.parent-item {
    background: var(--app-surface) !important;
}

.children-list {
    background: #f8faf7 !important;
    padding-left: 20px;
}

.child-item {
    position: relative;
}

.child-line {
    position: absolute;
    top: 0;
    left: -10px;
    width: 2px;
    height: 100%;
    background: var(--app-border-strong) !important;
}

.swal2-popup {
    border-radius: var(--app-radius) !important;
}

.section-title {
    margin: 22px 0 10px 4px;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-title.is-accent {
    color: var(--app-accent);
}

.section-title.is-compact {
    margin-top: 14px;
}

.section-title-lg {
    margin: 22px 0 12px;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 750;
}

.form-grid,
.action-grid,
.button-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.form-grid > * {
    min-width: 0;
}

.form-grid {
    margin-bottom: 10px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #e5e5ea);
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    width: auto;
    margin: 0;
}

.action-grid,
.button-stack {
    margin-top: 28px;
    padding-bottom: 46px;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.search-container {
    margin-bottom: 18px;
}

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

.search-field {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--app-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.ios-search-input {
    width: 100%;
    margin: 0;
    padding-left: 40px;
    background: var(--app-surface);
}

.btn-add-round,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--app-accent);
    border: 1px solid var(--app-accent-strong);
    border-radius: var(--app-radius-sm);
    text-decoration: none;
}

.btn-add-round i,
.icon-button i {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    color: var(--app-text) !important;
    background: var(--app-surface-muted) !important;
    border-color: var(--app-border-strong) !important;
}

.btn-secondary:hover {
    background: #e2e7e1 !important;
}

.btn-danger {
    background: var(--app-danger) !important;
    border-color: #7f3029 !important;
}

.btn-danger:hover {
    background: #7f3029 !important;
}

.btn-muted {
    background: var(--app-muted) !important;
    border-color: #58615d !important;
}

.btn-outline-danger {
    color: var(--app-danger);
    background: transparent !important;
    border: 0;
    min-width: 34px;
    padding: 0 8px;
}

.btn-add-inline {
    width: 100%;
    margin-top: 10px;
    color: var(--app-accent);
    background: var(--app-accent-soft) !important;
    border-color: var(--app-accent-soft);
}

.is-positive,
.text-success,
.ios-item-value.receita {
    color: var(--app-success) !important;
}

.is-negative,
.text-danger {
    color: var(--app-danger) !important;
}

.text-muted {
    color: var(--app-muted) !important;
}

.text-accent {
    color: var(--app-accent) !important;
}

.is-dimmed {
    opacity: 0.72;
}

.soft-row {
    background: #f8faf7 !important;
}

.empty-state {
    padding: 28px 18px;
    color: var(--app-muted);
    font-size: 14px;
    text-align: center;
}

.empty-state-lg {
    padding: 40px 20px;
    color: var(--app-muted);
    text-align: center;
}

.empty-state-lg i {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    opacity: 0.55;
}

.ios-segmented-control {
    display: flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: 15px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.ios-segmented-control input {
    display: none;
}

.ios-segmented-control label {
    flex: 1;
    margin: 0;
    padding: 9px 8px;
    color: var(--app-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
}

.ios-segmented-control input:checked + label {
    color: var(--app-text);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
}

.roles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--app-text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.role-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.role-list {
    color: var(--app-accent);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comp-row {
    display: grid;
    grid-template-columns: 1fr 120px 70px 36px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.comp-row input {
    margin: 0;
}

.doc-list {
    margin-top: 15px;
}

.doc-item-title {
    font-size: 14px;
}

.titulo-resumo,
.center-actions {
    text-align: center;
}

.titulo-resumo h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 22px;
}

.titulo-resumo p {
    margin: 5px 0;
    color: var(--app-muted);
}

.valor-box {
    display: inline-block;
    min-width: 200px;
    margin-top: 10px;
    padding: 15px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.valor-destaque {
    color: var(--app-text);
    font-size: 28px;
    font-weight: 800;
}

.total-liquido,
.metric-highlight {
    margin: 24px 0;
    padding: 18px;
    background: var(--app-accent-soft);
    border: 1px solid #cbd9cf;
    border-radius: var(--app-radius);
    text-align: center;
}

.total-liquido span,
.metric-highlight span {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.total-liquido h2,
.metric-highlight h2 {
    margin: 6px 0 0;
    color: var(--app-text);
}

.finance-summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    font-size: 13px;
}

.finance-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.statement-date-header {
    margin: 15px 0 8px 5px;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-action {
    margin-top: 24px;
    padding-bottom: 80px;
    text-align: center;
}

.footer-action .btn {
    width: min(100%, 360px);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.status-badge.open,
.status-badge.danger {
    color: #fff;
    background: var(--app-danger);
}

.status-badge.paid {
    color: var(--app-success);
    background: #e1eadf;
}

.ios-badge.proj {
    color: var(--app-info);
    background: #e0e8ed;
}

.progress-container {
    width: 100%;
    height: 10px;
    overflow: hidden;
    background: var(--app-surface-muted);
    border-radius: 999px;
}

.progress-bar {
    height: 100%;
    width: var(--progress, 0%);
    background: var(--app-success);
    border-radius: inherit;
}

.progress-bar.is-over {
    background: var(--app-danger);
}

.report-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.report-heading-body {
    flex: 1;
}

.report-heading h3 {
    margin: 0;
    font-size: 18px;
}

.report-heading small {
    color: var(--app-muted);
    font-weight: 800;
}

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

.modal-metric-card {
    padding: 12px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.modal-metric-card.is-wide {
    grid-column: span 2;
}

.modal-insights {
    padding: 0 5px;
    text-align: left;
}

.modal-insights h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 750;
}

.modal-list {
    max-height: 350px;
    overflow-y: auto;
    text-align: left;
}

.modal-list-row {
    padding: 10px;
    border-bottom: 1px solid var(--app-border);
}

.modal-list-title {
    font-size: 14px;
    font-weight: 700;
}

.modal-list-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.modal-list-date {
    color: var(--app-muted);
    font-size: 12px;
}

.modal-list-value {
    color: var(--app-accent);
    font-weight: 750;
}

.unit-rent.is-vacant {
    color: var(--app-muted) !important;
}

.unit-yield {
    background: var(--yield-bg, var(--app-surface-muted));
}

.inline-icon {
    width: 18px;
    height: 18px;
}

.icon-download {
    width: 16px;
    color: var(--app-accent);
}

.doc-icon-soft {
    color: var(--app-accent);
    background: var(--app-surface-muted) !important;
}

.is-hidden {
    display: none !important;
}

.mb-10 {
    margin-bottom: 10px;
}

.mt-form {
    margin-top: 20px;
}

.ios-item-compact {
    padding: 10px 15px;
}

.dashboard-single {
    grid-template-columns: 1fr;
}

.progress-note {
    margin-top: 15px;
    color: var(--app-muted);
    font-size: 14px;
}

.circular-progress {
    background: conic-gradient(var(--app-accent) var(--occupancy-deg, 0deg), var(--app-surface-muted) 0deg);
}

.auth-field {
    margin-bottom: 12px;
}

.auth-field-last {
    margin-bottom: 20px;
}

.auth-error {
    margin-bottom: 15px;
    color: var(--app-danger) !important;
    font-weight: 650;
}

.finance-actions {
    display: grid;
    gap: 12px;
}

.finance-actions-sm {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.btn-comfort {
    min-height: 46px;
}

.text-small {
    font-size: 12px;
}

.summary-empty {
    padding: 50px;
    border: 1px dashed var(--app-border-strong);
    text-align: center;
}

.print-actions {
    margin-bottom: 20px;
    text-align: center;
}

.print-table-half {
    width: 50%;
}

.col-date {
    width: 60px;
}

.col-person {
    width: 200px;
}

.col-account {
    width: 120px;
}

.col-value {
    width: 100px;
}

.doc-muted {
    color: #666;
    font-size: 10px;
}

.signature-row {
    display: flex;
    justify-content: space-around;
    margin-top: 60px;
}

.signature-line {
    width: 200px;
    padding-top: 5px;
    border-top: 1px solid #000;
    text-align: center;
}

.stat-card.is-wide {
    grid-column: span 2;
}

.stat-card.is-accent-border {
    border-left: 5px solid var(--app-accent);
}

.stat-card.is-danger-border {
    border-left: 5px solid var(--app-danger);
}

.ios-item.is-projection {
    background: #f8fbf9;
}

.status-badge.is-mini {
    min-height: 18px;
    margin-top: 4px;
    font-size: 8px;
}

.ios-item.align-start {
    align-items: flex-start;
}

.clickable {
    cursor: pointer;
}

.budget-label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.budget-label-row small {
    color: var(--app-muted);
    font-weight: 800;
}

.ios-select-modern {
    width: 100%;
    min-height: 42px;
    color: var(--app-accent);
    background: var(--app-surface);
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    appearance: none;
    font-weight: 650;
}

.card.is-compact {
    padding: 12px;
    margin-bottom: 15px;
}

.card.is-centered {
    text-align: center;
}

.ios-list.is-flush {
    margin-bottom: 0;
    border-radius: 0;
}

.select-filter-wrap {
    padding: 0 15px 15px;
}

.finance-filter-card {
    padding: 12px;
    margin-bottom: 15px;
}

.no-padding {
    padding: 0 !important;
    overflow: hidden;
}

.statement-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
}

.statement-row:active {
    background: var(--app-surface-muted);
}

.row-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 12px;
    color: #fff;
    border-radius: var(--app-radius-sm);
}

.row-icon.entrada {
    background: var(--app-success);
}

.row-icon.saida {
    background: var(--app-danger);
}

.row-icon i {
    width: 16px;
    height: 16px;
    stroke-width: 3px;
}

.row-content {
    flex: 1;
    min-width: 0;
}

.row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.row-title {
    flex: 1;
    color: var(--app-text);
    font-size: 15px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-value {
    font-size: 15px;
    font-weight: 750;
    white-space: nowrap;
}

.row-value.entrada {
    color: var(--app-success);
}

.row-value.saida {
    color: var(--app-danger);
}

.row-sub {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

.row-category,
.row-account {
    color: var(--app-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gen-card {
    padding: 16px;
    margin-bottom: 15px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-soft);
}

.gen-card.is-generated {
    background: #fdfefd;
    border-color: var(--app-border-strong);
}

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

.gen-info {
    flex: 1;
    min-width: 0;
}

.gen-tenant {
    display: block;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gen-property {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 600;
}

.gen-value {
    text-align: right;
}

.gen-value small {
    display: block;
    margin-bottom: 2px;
    color: var(--app-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.gen-value span {
    font-size: 16px;
    font-weight: 800;
}

.color-blue,
.color-paid {
    color: var(--app-accent);
}

.gen-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.gen-status-icon.paid {
    color: var(--app-success);
}

.gen-status-icon.open {
    color: var(--app-warning);
}

.gen-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--app-border);
}

.btn-text-danger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--app-danger);
    background: none !important;
    border: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.ajuste-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 10px;
    padding: 10px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.ajuste-row select,
.ajuste-row input {
    margin: 0;
    padding: 8px;
    font-size: 12px;
}

.sticky-footer {
    position: fixed;
    bottom: 90px;
    left: 0;
    z-index: 900;
    width: 100%;
    padding: 0 20px;
}

.btn-confirm-gen {
    width: 100%;
    padding: 18px;
    color: #fff;
    background: var(--app-success) !important;
    border: 1px solid #315b3f;
    border-radius: var(--app-radius);
    box-shadow: 0 10px 20px rgba(63, 111, 79, 0.22);
    font-size: 17px;
    font-weight: 750;
}

.ios-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--app-border-strong);
    border-radius: 50%;
    appearance: none;
    cursor: pointer;
    transition: 0.2s;
}

.ios-checkbox:checked {
    background: var(--app-accent);
    border-color: var(--app-accent);
}

.ios-checkbox:checked::after {
    content: "✓";
    display: block;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}

.asset-card {
    margin-bottom: 22px;
    overflow: hidden;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow-soft);
}

.asset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
}

.asset-header:active {
    background: var(--app-surface-muted);
}

.asset-tag {
    color: var(--app-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.asset-title {
    margin: 4px 0;
    color: var(--app-text);
    font-size: 20px;
    font-weight: 750;
}

.asset-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.status-pill,
.yield-pill {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pill {
    color: #fff;
    background: var(--app-accent);
}

.yield-pill {
    color: var(--app-accent);
    background: var(--app-accent-soft);
}

.asset-metrics-total {
    text-align: right;
}

.total-label {
    display: block;
    margin-bottom: 2px;
    color: var(--app-muted);
    font-size: 9px;
    font-weight: 800;
}

.total-value {
    color: var(--app-text);
    font-size: 16px;
    font-weight: 800;
}

.units-list {
    background: #f8faf7;
}

.list-header {
    padding: 12px 18px;
    color: var(--app-muted);
    border-bottom: 1px solid var(--app-border);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.unit-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
    transition: background 0.2s;
}

.unit-row:last-child {
    border-bottom: 0;
}

.unit-row:active {
    background: var(--app-surface-muted);
}

.unit-info {
    flex: 1;
    min-width: 0;
}

.unit-name {
    display: block;
    color: var(--app-text);
    font-size: 15px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-meta {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 600;
}

.unit-perf {
    text-align: right;
}

.unit-rent {
    display: block;
    margin-bottom: 2px;
    color: var(--app-success);
    font-size: 14px;
    font-weight: 750;
}

.unit-yield {
    padding: 2px 6px;
    color: #fff;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
}

.unit-chevron {
    width: 14px;
    height: 14px;
    color: var(--app-soft);
}

.insight-item {
    margin-bottom: 12px;
    padding: 14px;
    background: var(--app-surface);
    border-left: 4px solid var(--app-accent);
    border-radius: var(--app-radius-sm);
    box-shadow: var(--app-shadow-soft);
    font-size: 14px;
}

.print-report {
    padding: 20px;
    color: #333;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 11px;
}

.print-report .header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
    text-align: center;
}

.print-report .header h1 {
    margin: 0;
    font-size: 18px;
}

.print-report table {
    table-layout: fixed;
    margin-bottom: 20px;
}

.print-report th,
.print-report td {
    border: 1px solid #333;
    word-wrap: break-word;
}

.print-report th {
    color: #333;
    background: #f2f2f2;
}

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

.text-center {
    text-align: center;
}

.summary-box {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 10px;
    border-top: 2px solid #000;
}

.summary-item {
    width: 30%;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.alert-card {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--app-radius-sm);
    font-weight: 650;
}

.alert-success {
    color: var(--app-success);
    background: #e1eadf;
    border: 1px solid #c8d9c6;
}

.alert-danger {
    color: var(--app-danger);
    background: #f3e2df;
    border: 1px solid #e1c2bd;
}

.statement-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 14px;
}

.statement-review-header h3 {
    margin: 0;
    font-size: 18px;
}

.statement-card {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-soft);
}

.statement-card.is-duplicate {
    border-color: #d9b9b4;
    background: #fffafa;
}

.statement-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.statement-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--app-text);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.statement-check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.statement-amount {
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.statement-insight {
    margin-bottom: 14px;
    padding: 10px 12px;
    color: var(--app-muted);
    background: var(--app-surface-muted);
    border-radius: var(--app-radius-sm);
    font-size: 13px;
}

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

.field-help {
    display: block;
    margin-top: 4px;
    color: var(--app-muted);
    font-size: 12px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--app-text);
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.statement-footer-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 70px;
}

@media print {
    .no-print {
        display: none;
    }
}

@media (max-width: 767px) {
    .content {
        padding: 14px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card,
    .stat-card,
    .chart-container {
        padding: 15px;
    }

    /* mobile troca para o monograma quadrado (via <picture>) — bem mais compacto que o wordmark horizontal */
    .topbar-logo {
        height: 32px;
        width: 32px;
        max-width: none;
        border-radius: 8px;
    }

    .topbar h1 {
        max-width: 42vw;
        font-size: 15px;
    }

    .statement-review-header {
        align-items: stretch;
        flex-direction: column;
    }

    .statement-grid {
        grid-template-columns: 1fr;
    }

    .modal-metric-grid {
        grid-template-columns: 1fr;
    }

    .modal-metric-card.is-wide {
        grid-column: span 1;
    }
}

@media (min-width: 900px) {
    body {
        padding-bottom: 104px;
    }

    .content {
        padding: 24px;
    }
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
