:root {
  --dark: #0E3D2E;
  --green: #16C55B;
  --green-2: #22C55E;
  --bg: #F5F7F8;
  --text: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --danger: #EF4444;
  --warn: #F59E0B;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif; color: var(--text); background: radial-gradient(circle at top, #18384A, #071522 62%); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.phone-shell, .auth-shell { width: min(100%, 430px); min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; overflow-x: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.32); }
.auth-shell { background: #fff; }
.auth-body .auth-shell { background: linear-gradient(155deg, #073C2C, #02251C); color: #fff; }
.screen { min-height: 100vh; padding-bottom: 92px; background: var(--bg); }
.padded { padding: 22px 18px 96px; }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.logo { width: 96px; height: 96px; }
.splash h1 { margin: 0; line-height: 1.05; font-size: 25px; letter-spacing: 0; }
.splash p { max-width: 280px; margin: 0 0 24px; color: #D6F8E2; font-size: 14px; }
.splash small { position: absolute; bottom: 28px; color: #D6F8E2; }
.auth-form, .stack { display: grid; gap: 14px; width: 100%; }
.field, .auth-form label { height: 50px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 0 13px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.field svg, .auth-form svg { width: 18px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; min-height: 48px; padding: 0 13px; background: #fff; color: var(--text); outline: none; }
.field input, .auth-form input { border: 0; min-height: auto; padding: 0; }
textarea { min-height: 92px; padding-top: 12px; resize: vertical; }
.btn, .primary { min-height: 42px; border-radius: 10px; border: 1px solid transparent; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 900; font-size: 13px; line-height: 1; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.primary, .btn-primary { min-height: 50px; background: linear-gradient(180deg, var(--green-2), var(--green)); color: #fff; border-color: var(--green); }
.btn-soft { background: #fff; color: var(--dark); border-color: var(--line); }
.btn-success { background: #DCFCE7; color: #15803D; border-color: #BBF7D0; }
.btn-danger { background: #FEF2F2; color: var(--danger); border-color: #FECACA; }
.btn-warn { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.btn-icon { width: 42px; min-width: 42px; padding: 0; }
.outline { min-height: 48px; border-radius: 10px; border: 1px solid #D7FBE2; display: grid; place-items: center; font-weight: 800; }
.ghost { min-height: 44px; background: transparent; width: 100%; }
.danger, .danger-text { color: var(--danger) !important; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.hero { height: 180px; padding: 28px 20px; display: flex; justify-content: space-between; color: #fff; background: linear-gradient(145deg, #04462F, #0E3D2E); }
.hero p { margin: 0 0 4px; font-weight: 700; }
.hero h1 { margin: 0; font-size: 18px; }
.hero-actions { display: flex; gap: 8px; align-items: flex-start; }
.icon-btn { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; display: grid; place-items: center; }
.notify-btn { position: relative; }
.notify-btn b, .badge-count { min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 11px; font-weight: 900; }
.notify-btn b { position: absolute; top: -6px; right: -6px; }
.badge-count { background: var(--dark); }
.content { padding: 0 18px 96px; }
.overlap { margin-top: -72px; }
.balance-card, .new-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 12px 30px rgba(15,23,42,.12); }
.balance-card span { color: var(--muted); font-size: 13px; }
.balance-card strong { display: block; margin: 8px 0 18px; color: #159947; font-size: 26px; }
.balance-card div { display: flex; justify-content: space-between; }
h1 { font-size: 24px; margin: 32px 0 8px; }
h2 { font-size: 16px; margin: 22px 0 12px; }
.metric-list, .menu-list, .statement, .dre { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ops-grid a { min-height: 92px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 4px; }
.ops-grid span, .ops-grid small { color: var(--muted); font-size: 12px; font-weight: 700; }
.ops-grid b { font-size: 24px; color: var(--dark); }
.ops-grid .danger-tile { border-color: #FCA5A5; background: #FEF2F2; }
.ops-grid .danger-tile b { color: var(--danger); }
.notification-preview { display: grid; gap: 8px; }
.notification-item, .notification-card > a { min-height: 66px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; display: flex; align-items: center; gap: 12px; }
.notification-item svg, .notification-card svg { width: 20px; flex: 0 0 auto; color: var(--dark); }
.notification-item span, .notification-card span { min-width: 0; flex: 1; }
.notification-item b, .notification-item small, .notification-card b, .notification-card small { display: block; }
.notification-item small, .notification-card small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.notification-item.urgente, .notification-card.urgente > a { border-color: #FCA5A5; background: #FEF2F2; }
.notification-item.urgente svg, .notification-card.urgente svg { color: var(--danger); }
.notification-item.hoje, .notification-card.hoje > a { border-color: #FCD34D; background: #FFFBEB; }
.notification-item.atencao, .notification-card.atencao > a { border-color: #FED7AA; background: #FFF7ED; }
.notification-item.pendente, .notification-card.pendente > a { border-color: #BFDBFE; background: #EFF6FF; }
.notification-card { margin-bottom: 10px; }
.notification-card.read { opacity: .66; }
.notification-card .actions { padding: 8px 0 0; }
.metric-list a, .menu-list a, .row { min-height: 64px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #fff; }
.metric-list a:last-child, .menu-list a:last-child, .row:last-child { border-bottom: 0; }
.metric-list svg, .row svg, .menu-list svg { width: 20px; color: var(--dark); flex: 0 0 auto; }
.metric-list span, .row span { flex: 1; min-width: 0; }
.row b, .row small, .row strong small { display: block; }
.row small, .row strong small { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.row strong { text-align: right; font-size: 14px; }
.late { border-left: 4px solid var(--danger); }
.section-title, .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title a { color: var(--green); font-size: 13px; font-weight: 700; }
.topbar { margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: 17px; text-align: center; flex: 1; }
.topbar a { width: 36px; height: 36px; display: grid; place-items: center; }
.tabs { height: 44px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 13px; }
.tabs .active { color: var(--green); border-bottom: 2px solid var(--green); }
.filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 12px; }
.filters-wide { grid-template-columns: 1fr 1fr; }
.filters-wide button { grid-column: 1 / -1; }
.filters button, form > button:not(.primary):not(.btn), .actions button:not(.btn) { border-radius: 9px; padding: 0 12px; min-height: 42px; background: #fff; border: 1px solid var(--line); }
.filters .btn, form > .btn { width: 100%; }
.status-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; }
.status-tabs a { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 11px; font-size: 12px; font-weight: 800; color: var(--muted); }
.status-tabs .active { color: #fff; background: var(--dark); border-color: var(--dark); }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mini-metrics span { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.mini-metrics b { display: block; color: var(--text); font-size: 18px; }
.account-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.account-card .row { border-bottom: 1px solid var(--line); }
.status-badge { display: inline-block !important; border-radius: 999px; padding: 3px 7px; background: #F1F5F9; }
.status-badge.pago { color: #15803D; background: #DCFCE7; }
.status-badge.atrasado { color: #B91C1C; background: #FEE2E2; }
.status-badge.cancelado { color: #475569; background: #E2E8F0; }
.history { padding: 10px 14px; background: #FAFAFA; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.history b { color: var(--text); display: block; margin-bottom: 4px; }
.history p { margin: 4px 0; }
.history a, .history-line a { color: var(--green); font-weight: 800; margin-left: 6px; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px; background: #fff; }
.actions form { display: flex; align-items: center; gap: 6px; }
.actions .btn { min-height: 40px; }
.upload-button { min-height: 42px; border: 1px solid #BFDBFE; border-radius: 10px; background: #EFF6FF; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #1D4ED8; font-size: 12px; font-weight: 900; cursor: pointer; max-width: 100%; }
.upload-button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.upload-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-button input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.compact-upload { width: 132px; }
.pix-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pix-field button, .pix-copy button { border-radius: 10px; padding: 0 12px; min-height: 42px; background: #ECFDF5; border: 1px solid #BBF7D0; color: #047857; font-weight: 900; }
.pix-copy { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #F0FDF4; }
.pix-copy span { min-width: 0; }
.pix-copy b, .pix-copy small { display: block; }
.pix-copy small { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-fallback { grid-column: 1 / -1; width: 100%; margin-top: 8px; border: 1px dashed #86EFAC; border-radius: 10px; background: #F0FDF4; padding: 9px; display: grid; gap: 6px; }
.copy-fallback span { color: #047857; font-size: 12px; font-weight: 900; }
.copy-fallback input { min-height: 38px; font-size: 13px; background: #fff; }
.success-action { color: #15803D; }
.danger-action { color: var(--danger); }
.detail-panel { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.history-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.history-line:last-of-type { border-bottom: 0; }
.report-actions { display: grid; grid-template-columns: 1fr 82px 82px; gap: 8px; margin-bottom: 14px; }
.category-row { display: grid; grid-template-columns: 22px 1fr 76px 42px 42px; gap: 8px; align-items: center; background: #fff; border-bottom: 1px solid var(--line); padding: 9px; }
.category-row span, .dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.category-row input { min-height: 38px; padding: 0 8px; }
.flash-stack { position: fixed; z-index: 20; top: 12px; left: 50%; transform: translateX(-50%); width: min(390px, calc(100% - 24px)); display: grid; gap: 8px; }
.flash { padding: 12px 14px; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-weight: 700; font-size: 13px; }
.flash.error { color: var(--danger); }
.flash.success { color: var(--green); }
.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 430px); height: 74px; display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center; background: #fff; border-top: 1px solid var(--line); z-index: 10; }
.nav-item { display: grid; place-items: center; gap: 3px; color: #475569; font-size: 11px; font-weight: 700; }
.nav-item svg { width: 20px; }
.add-fab { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: -24px auto 0; box-shadow: 0 12px 28px rgba(22,197,91,.35); }
.quick-menu { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(390px, calc(100% - 32px)); background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); padding: 8px; z-index: 11; }
.quick-menu a { display: flex; gap: 10px; padding: 13px; border-radius: 9px; font-weight: 700; }
.quick-menu a:hover { background: var(--bg); }
.statement div, .dre div { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.statement div:last-child, .dre div:last-child { border-bottom: 0; }
.subtotal { background: #FAFAFA; font-weight: 800; }
.total { background: var(--green); color: #fff; font-weight: 900; }
.total.negative { background: var(--danger); }
.donut { width: 210px; height: 210px; margin: 24px auto; border-radius: 50%; background: conic-gradient(#7C3AED 0 26%, #F59E0B 26% 46%, #22C55E 46% 58%, #EF4444 58% 68%, #06B6D4 68% 77%, #64748B 77%); display: grid; place-items: center; }
.donut span { width: 120px; height: 120px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; font-size: 13px; }
.avatar { width: 112px; height: 112px; margin: 10px auto 24px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #A89A8B, #3B3028); color: #fff; }
.avatar svg { width: 54px; height: 54px; }
.empty { color: var(--muted); text-align: center; padding: 28px 0; }
canvas { background: #fff; border-radius: 10px; padding: 10px; margin: 14px 0; }
.print-body { background: #fff; color: #111827; }
.print-page { max-width: 1100px; margin: 0 auto; padding: 32px; background: #fff; }
.print-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 2px solid #111827; padding-bottom: 16px; margin-bottom: 18px; }
.print-header h1 { margin: 0; }
.print-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.print-summary div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.print-summary span { display: block; color: var(--muted); font-size: 12px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.report-table th, .report-table td { border: 1px solid var(--line); padding: 8px; text-align: left; }
.report-table th { background: #F8FAFC; }
@media print {
  .print-header button { display: none; }
  body { padding: 0; background: #fff; }
  .print-page { padding: 0; }
}
@media (min-width: 700px) {
  body { padding: 28px 0; }
  .phone-shell, .auth-shell { min-height: 900px; border-radius: 26px; overflow: hidden; }
}
