@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/raleway-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/raleway-latin-italic.woff2") format("woff2");
}

:root {
  --navy: #223345;
  --navy-2: #2d435a;
  --ink: #162033;
  --muted: #6f7b8f;
  --line: #e4e9f1;
  --canvas: #f4f7fb;
  --white: #fff;
  --primary: #196f63;
  --primary-2: #229383;
  --green: #1e9b70;
  --blue: #377cf6;
  --amber: #e7a127;
  --coral: #ef765f;
  --red: #dc4c64;
  --shadow: 0 0.875rem 2.5rem rgba(25, 39, 66, .08);
  --radius: 1.125rem;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font: 0.875rem/1.5 "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
body[data-role="Consulta"] a[href*="&new=1"], body[data-role="Consulta"] a[href*="&edit="], body[data-role="Consulta"] button[data-dialog] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0.5rem; font-size: clamp(1.6875rem, 3vw, 2.4375rem); line-height: 1.1; letter-spacing: -.04em; }
h2 { margin-bottom: 0.375rem; font-size: 1.375rem; letter-spacing: -.02em; }
h3 { margin-bottom: 0.3125rem; font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.75rem; }
.kicker { margin-bottom: 0.625rem; color: var(--primary-2); font-size: 0.6875rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.empty { padding: 2.125rem 1.125rem; color: var(--muted); text-align: center; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 750; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

.auth-body {
  display: grid;
  place-items: center;
  padding: 2rem 1.125rem;
  background:
    radial-gradient(circle at 15% 10%, rgba(40, 174, 150, .16), transparent 28%),
    radial-gradient(circle at 90% 80%, rgba(60, 117, 235, .13), transparent 30%),
    #eff4f8;
}
.auth-card, .setup-card {
  width: min(100%, 29.375rem);
  padding: clamp(1.75rem, 6vw, 3.25rem);
  border: 0.0625rem solid rgba(255,255,255,.9);
  border-radius: 1.75rem;
  background: rgba(255,255,255,.93);
  box-shadow: 0 1.75rem 5.625rem rgba(19,38,65,.17);
  backdrop-filter: blur(1.125rem);
}
.setup-card { width: min(100%, 35rem); }
.brand-orb {
  display: grid;
  place-items: center;
  width: 3.625rem;
  height: 3.625rem;
  margin-bottom: 1.5rem;
  border-radius: 1.1875rem;
  color: #fff;
  background: linear-gradient(145deg, #28a991, #126e63);
  box-shadow: 0 0.875rem 1.875rem rgba(25,111,99,.26);
  font-size: 1.5rem;
  font-weight: 900;
}
.brand-orb.small { width: 2.6875rem; height: 2.6875rem; margin: 0; border-radius: 0.875rem; font-size: 1.0625rem; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: 0.4375rem; color: #334057; font-size: 0.75rem; font-weight: 750; }
input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border: 0.0625rem solid #dce3ed;
  border-radius: 0.6875rem;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { min-height: 5.75rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 0.25rem rgba(34,147,131,.1); }
input[type="file"] { padding: 0.4375rem; }
input[data-currency] { font-variant-numeric: tabular-nums; font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5625rem 0.9375rem;
  border: 0;
  border-radius: 0.6875rem;
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.04); transform: translateY(-0.0625rem); }
.btn:active { transform: translateY(0); }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--primary-2), var(--primary)); box-shadow: 0 0.5625rem 1.125rem rgba(25,111,99,.19); }
.btn.secondary { color: var(--primary); background: #eaf5f2; }
.btn.light { color: #334057; background: #f1f4f8; }
.btn.large { min-height: 3rem; padding-inline: 1.375rem; }
.icon-action, .menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0.0625rem solid var(--line);
  border-radius: 0.625rem;
  color: #46536a;
  background: #fff;
  cursor: pointer;
}
.icon-action { width: auto; min-width: 4rem; padding: 0 0.75rem; font-size: 0.6875rem; font-weight: 800; white-space: nowrap; }
.menu-toggle { display: none; font-size: 1.25rem; }
.alert { padding: 0.75rem 0.875rem; border: 0.0625rem solid; border-radius: 0.6875rem; font-weight: 700; transition: opacity .25s, transform .25s; }
.alert.success { color: #14674d; border-color: #bce7d6; background: #eaf9f3; }
.alert.error { color: #9f2940; border-color: #f1c1ca; background: #fff0f3; }
.alert.hiding { opacity: 0; transform: translateY(-0.5rem); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 16.25rem;
  padding: 1.5625rem 1.125rem 1.125rem;
  color: #fff;
  background: var(--navy);
  box-shadow: 0.625rem 0 2.1875rem rgba(20,31,49,.1);
  overflow-y: auto;
}
.brand-lockup { display: flex; align-items: center; gap: 0.375rem; min-height: 2rem; padding: 0 0.125rem 1.6875rem; }
.brand-mark { display: flex; align-items: center; width: 8.875rem; height: 2.125rem; padding: 0.25rem 0.4375rem; border-radius: 0.3125rem; background: #fff; box-shadow: 0 0.3125rem 0.8125rem rgba(0,0,0,.11); overflow: hidden; }
.brand-mark { transition: transform .16s ease, box-shadow .16s ease; }
.brand-mark:hover { transform: translateY(-0.0625rem); box-shadow: 0 0.4375rem 1.0625rem rgba(0,0,0,.16); }
.brand-mark:focus-visible { outline: 0.1875rem solid rgba(255,255,255,.42); outline-offset: 0.1875rem; }
.sidebar-logo { display: block; width: 100%; height: auto; }
.crm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 1.25rem; padding: 0 0.375rem; border-radius: 0.25rem; color: #fff; background: #00573d; font-size: 0.5625rem; font-weight: 900; letter-spacing: .04em; }
.nav, .sidebar nav { display: grid; gap: 0.25rem; }
.nav-label { margin: 1.125rem 0.75rem 0.375rem; color: #7c98b6; font-size: 0.625rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.nav a, .sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  min-height: 2.6875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.6875rem;
  color: #dce7f6;
  font-weight: 700;
  transition: background .18s, color .18s, transform .18s;
}
.nav a:hover, .sidebar nav a:hover { color: #fff; background: var(--navy-2); transform: translateX(0.125rem); }
.nav a.active, .sidebar nav a.active { color: #fff; background: #00573d; box-shadow: none; }
.sidebar nav a i { display: grid; place-items: center; flex: 0 0 1.5rem; width: 1.5rem; height: 1.5rem; font-style: normal; }
.sidebar nav a span { min-width: 0; }
.sidebar-user { display: flex; align-items: center; gap: 0.625rem; margin-top: auto; padding: 1.0625rem 0.5rem 0; border-top: 0.0625rem solid rgba(203,214,226,.16); }
.sidebar-user strong { display: block; color: #fff; font-size: 0.75rem; }
.sidebar-user span { color: #7c98b6; font-size: 0.625rem; text-transform: uppercase; }
.avatar { display: grid; place-items: center; flex: 0 0 2.125rem; height: 2.125rem; border-radius: 0.6875rem; color: #fff; background: #00573d; font-weight: 900; }
.main { min-height: 100vh; margin-left: 16.25rem; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.5rem clamp(1.25rem, 3vw, 2.625rem);
  border-bottom: 0.0625rem solid rgba(218,226,237,.9);
  background: rgba(244,247,251,.88);
  backdrop-filter: blur(1rem);
}
.topbar-title { display: flex; align-items: center; min-width: 0; margin-right: auto; }
.topbar-title h1 { margin: 0; color: #2d3e50; font-size: 1.125rem; line-height: 1.2; letter-spacing: -.01em; }
.top-actions, .today, .system-status { display: flex; align-items: center; gap: 0.75rem; }
.system-status { color: #516078; font-size: 0.75rem; font-weight: 750; }
.today { color: #59667a; font-size: 0.75rem; font-weight: 700; }
.live-dot { display: block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #35ae89; box-shadow: 0 0 0 0.3125rem rgba(53,174,137,.11); }
.content { padding: 1.625rem clamp(1.25rem, 3vw, 2.625rem) 3rem; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.5rem; }
.hero p { margin-bottom: 0; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 1.125rem 0; }
.welcome-panel { padding: 1.3125rem; margin-bottom: 1.125rem; border: 0.0625rem solid #cfdbea; border-left: 0.25rem solid #29465e; border-radius: 0.75rem; background: linear-gradient(145deg,#fff,#f9fbfd); box-shadow: 0 0.625rem 1.875rem rgba(24,42,65,.05); }
.welcome-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; }
.welcome-date { margin-bottom: 0.25rem; color: #27435d; font-size: 0.625rem; font-weight: 900; letter-spacing: .045em; }
.welcome-top h2 { margin-bottom: 0.1875rem; font-size: clamp(1.3125rem,3vw,1.75rem); }
.welcome-top > div > p:last-child { margin-bottom: 0; color: #6f84a1; font-size: 0.75rem; }
.welcome-role { display: grid; justify-items: end; }
.role-chip { display: inline-flex; align-items: center; gap: 0.4375rem; padding: 0.4375rem 0.9375rem; border-radius: 9999px; color: #176451; background: #e8f5f0; font-size: 0.6875rem; font-weight: 850; white-space: nowrap; }
.inspiration { display: grid; grid-template-columns: 2.125rem 1fr; align-items: center; gap: 0.75rem; margin-top: 1.125rem; padding: 0.875rem 1.0625rem; border: 0.0625rem solid #a9edc5; border-radius: 0.5625rem; color: #075e38; background: #edfff4; }
.inspiration-icon { font-size: 1.375rem; }
.inspiration strong, .inspiration em, .inspiration small { display: block; }
.inspiration strong { margin-bottom: 0.125rem; font-size: 0.625rem; letter-spacing: .025em; }
.inspiration em { color: #096740; font-size: 0.8125rem; }
.inspiration small { margin-top: 0.0625rem; font-size: 0.625rem; font-weight: 750; }
.dashboard-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-bottom: 1.125rem; }
.dashboard-toolbar .kicker { margin: 0 auto 0 0; }
.report-actions { display: flex; align-items: center; gap: 0.5625rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.125rem; }
.metric-grid.compact { grid-template-columns: repeat(5, minmax(0,1fr)); }
.metric {
  position: relative;
  min-width: 0;
  padding: 1.25rem;
  border: 0.0625rem solid rgba(225,231,240,.85);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.metric::after { content: ""; position: absolute; right: -1.5rem; bottom: -1.875rem; width: 5.5rem; height: 5.5rem; border-radius: 50%; background: rgba(35,147,131,.04); }
.metric > span { display: block; margin-bottom: 0.625rem; color: var(--muted); font-size: 0.6875rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.metric strong { display: block; font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -.035em; white-space: nowrap; }
.metric small { color: var(--muted); }
.metric.danger { border-color: rgba(220,76,100,.25); }
.metric-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: 0.875rem; border-radius: 0.6875rem; font-weight: 900; }
.metric-icon.green, .green-bg { color: #147154; background: #e5f7ef; }
.metric-icon.blue, .blue-bg { color: #275fb7; background: #e7efff; }
.metric-icon.coral, .coral-bg { color: #ae4a37; background: #fff0eb; }
.metric-icon.red, .red-bg { color: #a92f46; background: #ffecef; }
.amber-bg { color: #976218; background: #fff4d8; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(17.5rem, .75fr); gap: 1.125rem; }
.panel {
  padding: 1.25rem;
  border: 0.0625rem solid rgba(225,231,240,.9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.panel.no-pad { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.panel.no-pad .panel-head { padding: 1.25rem 1.25rem 0; }
.panel-head h2, .panel-head h3 { margin: 0; }
.attention { color: #27344a; background: linear-gradient(150deg, #fff, #fffaf0); }
.attention ul { display: grid; gap: 0.6875rem; margin: 0.875rem 0 0; padding-left: 1.125rem; }
.attention > a { display: grid; grid-template-columns: 2.375rem 1fr auto; align-items: center; gap: 0.6875rem; padding: 0.75rem 0; border-bottom: 0.0625rem solid rgba(221,226,232,.75); }
.attention > a:last-child { border-bottom: 0; }
.attention > a > i { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.6875rem; font-style: normal; font-weight: 900; }
.attention > a strong, td small { display: block; }
.attention > a span { color: var(--muted); font-size: 0.6875rem; }
.result { padding: 0.8125rem 0.9375rem; border-radius: 0.75rem; font-weight: 850; }
.result.positive { color: #126c50; background: #e9f8f2; }
.result.negative { color: #ad3348; background: #ffedf0; }
.finance-visual { display: grid; grid-template-columns: 10.625rem 1fr; align-items: center; gap: 1.5rem; }
.donut { position: relative; display: grid; place-items: center; width: 9.375rem; height: 9.375rem; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--income, 50) * 1%), var(--coral) 0); }
.donut.no-data { background: #e7edf2; }
.donut::after { content: ""; position: absolute; inset: 1.8125rem; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 0.0625rem #edf1f6; }
.donut > div { position: relative; z-index: 1; display: grid; text-align: center; }
.donut strong { font-size: 1.375rem; }
.donut span { color: var(--muted); font-size: 0.625rem; text-transform: uppercase; }
.legend { display: grid; gap: 0.75rem; }
.legend div { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; }
.legend i { width: 0.5625rem; height: 0.5625rem; margin-right: 0.5rem; border-radius: 50%; background: var(--green); }

.filters { display: grid; grid-template-columns: repeat(6, minmax(7.8125rem, 1fr)); align-items: end; gap: 0.75rem; margin-bottom: 1.125rem; }
.filters .btn { margin-bottom: 0.0625rem; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.8125rem 0.9375rem; border-bottom: 0.0625rem solid #edf0f5; text-align: left; vertical-align: middle; }
th { color: #7d8899; background: #fafbfc; font-size: 0.625rem; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; white-space: nowrap; }
td { color: #344157; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbfcfd; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; min-height: 1.5625rem; padding: 0.25rem 0.5625rem; border-radius: 9999px; color: #526076; background: #eef2f6; font-size: 0.625rem; font-weight: 900; white-space: nowrap; }
.badge.pago, .badge.ativo, .badge.vigente, .badge.realizado { color: #156a50; background: #e4f7ef; }
.badge.pendente, .badge.vence-em-ate-60-dias { color: #9b6816; background: #fff3d6; }
.badge.vencido, .badge.expirado, .badge.vence-em-30-dias { color: #b0364d; background: #ffe9ed; }
.badge.vence-em-60-dias, .badge.vencendo-em-breve { color: #9b6816; background: #fff3d6; }
.badge.cancelado, .badge.inativo, .badge.encerrado { color: #687589; background: #edf0f4; }
.badge.liberado { color: #156a50; background: #e4f7ef; }
.badge.troca-pendente { color: #9b6816; background: #fff3d6; }
.doc-link { color: var(--primary); font-size: 0.75rem; font-weight: 850; }
.doc-link:hover { text-decoration: underline; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem; }
.form-grid .span-2, .form-grid .full { grid-column: 1 / -1; }
dialog.modal {
  width: min(47.5rem, calc(100vw - 1.75rem));
  max-height: calc(100vh - 2.25rem);
  padding: 0;
  border: 0;
  border-radius: 1.3125rem;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1.875rem 6.25rem rgba(15,29,49,.3);
  overflow: auto;
}
dialog.modal[open] { position: fixed; inset: 0; z-index: 1000; margin: auto; }
body:has(dialog.modal[open]) { overflow: hidden; }
body:has(dialog.modal[open])::before { content: ""; position: fixed; inset: 0; z-index: 999; background: rgba(11,25,42,.57); backdrop-filter: blur(0.3125rem); }
dialog.modal[open]::backdrop { background: rgba(11,25,42,.57); backdrop-filter: blur(0.3125rem); }
dialog.modal.small { width: min(32.5rem, calc(100vw - 1.75rem)); }
dialog::backdrop { background: rgba(11,25,42,.57); backdrop-filter: blur(0.3125rem); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.25rem 1.375rem; border-bottom: 0.0625rem solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(0.75rem); }
.modal-head h2 { margin: 0; }
.modal form { padding: 1.375rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.625rem; grid-column: 1/-1; padding-top: 0.5rem; }
.is-muted { opacity: .58; }
.period-picker { display: flex; align-items: center; gap: 0.5625rem; }
.period-picker input { min-width: 9.0625rem; }
.sidebar-user form { margin-left: auto; }
.sidebar-user button { width: 1.9375rem; height: 1.9375rem; border: 0; border-radius: 0.5625rem; color: #fff; background: var(--navy-2); cursor: pointer; }
.auth-card footer { margin-top: 1.375rem; color: var(--muted); font-size: 0.6875rem; text-align: center; }
.password-field { position: relative; }
.password-field input { padding-right: 4.625rem; }
.password-field button { position: absolute; top: 50%; right: 0.5rem; min-width: 3.5625rem; padding: 0.375rem 0.5rem; border: 0; border-radius: 0.5rem; color: var(--primary); background: #edf6f4; cursor: pointer; font-size: 0.625rem; font-weight: 850; transform: translateY(-50%); }
.first-access-card { width: min(100%,35rem); }
.first-access-heading { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 0.9375rem; }
.first-access-heading .brand-orb { margin: 0; }
.first-access-heading .kicker { margin-bottom: 0.125rem; }
.first-access-heading h1 { margin: 0; font-size: clamp(1.5625rem,4vw,2.125rem); }
.password-rules { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.4375rem 0.75rem; margin: -0.125rem 0 0.125rem; padding: 0.8125rem 0.9375rem; border: 0.0625rem solid var(--line); border-radius: 0.6875rem; color: #6c788b; background: #f8fafc; font-size: 0.625rem; font-weight: 700; list-style: none; }
.password-rules li::before { content: "○"; margin-right: 0.4375rem; color: #9ca8b8; }
.password-rules li.met { color: #176451; }
.password-rules li.met::before { content: "✓"; color: var(--green); font-weight: 900; }
.first-access-logout { margin-top: 0.875rem; text-align: center; }
.first-access-logout button { padding: 0.3125rem 0.5625rem; border: 0; color: #6c788b; background: transparent; cursor: pointer; font-size: 0.6875rem; font-weight: 750; }
.first-access-logout button:hover { color: var(--primary); text-decoration: underline; }
.is-loading { pointer-events: none; opacity: .65; }

.bar-chart { display: flex; align-items: end; gap: 1.0625rem; min-height: 16.5625rem; padding: 1.75rem 0.5rem 0.375rem; overflow-x: auto; }
.bar-group { display: grid; grid-template-rows: 13.125rem auto; min-width: 3rem; flex: 1; gap: 0.5rem; text-align: center; }
.bars { display: flex; align-items: end; justify-content: center; gap: 0.3125rem; height: 13.125rem; }
.bars i { display: block; width: 0.875rem; min-height: 0.1875rem; border-radius: 0.375rem 0.375rem 0.125rem 0.125rem; }
.bars .income { background: linear-gradient(#43b99a, #21866f); }
.bars .expense { background: linear-gradient(#f3907d, #db5369); }
.bar-group span { color: var(--muted); font-size: 0.625rem; font-weight: 800; }
.account-grid, .report-grid, .settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.account-card { padding: 1.1875rem; border: 0.0625rem solid var(--line); border-radius: 1rem; background: linear-gradient(145deg, #fff, #f8fafc); }
.account-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.125rem; }
.account-card strong { display: block; font-size: 1.375rem; }
.progress { height: 0.5625rem; margin-top: 0.75rem; border-radius: 9999px; background: #e8edf3; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.progress i.over { background: linear-gradient(90deg, #f27a65, #d83e58); }
.rank-list { display: grid; gap: 0.5625rem; padding: 0; list-style: none; }
.rank-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 0.0625rem solid #edf1f5; }
.rank-list li:last-child { border-bottom: 0; }
.report-grid > .panel { min-height: 8.75rem; }
.account-settings { margin-bottom: 1.125rem; padding: 1.125rem 1.25rem; }
.account-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.account-identity { display: flex; align-items: center; gap: 0.8125rem; min-width: 0; }
.account-avatar { display: grid; place-items: center; flex: 0 0 2.75rem; height: 2.75rem; border-radius: 0.8125rem; color: #fff; background: linear-gradient(145deg, var(--primary-2), var(--primary)); box-shadow: 0 0.5rem 1.125rem rgba(25,111,99,.18); font-size: 1rem; font-weight: 900; }
.account-copy { min-width: 0; }
.account-copy .kicker { margin-bottom: 0.125rem; font-size: 0.5625rem; }
.account-copy h3 { margin: 0; font-size: 1rem; }
.account-copy span { display: block; color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.account-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-top: 0.9375rem; padding-top: 0.875rem; border-top: 0.0625rem solid var(--line); }
.account-meta > div { min-width: 0; padding: 0 1rem; border-right: 0.0625rem solid var(--line); }
.account-meta > div:first-child { padding-left: 0; }
.account-meta > div:last-child { padding-right: 0; border-right: 0; }
.account-meta span { display: block; margin-bottom: 0.1875rem; color: var(--muted); font-size: 0.5625rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.account-meta strong { display: block; color: #354158; font-size: 0.75rem; font-weight: 800; }
.demo-banner { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.125rem; padding: 0.6875rem 0.9375rem; border: 0.0625rem solid #b8d9f3; border-radius: 0.6875rem; color: #245373; background: #eef8ff; }
.demo-banner strong { white-space: nowrap; }
.demo-banner span { color: #58758b; font-size: 0.6875rem; }
.demo-row { background: linear-gradient(90deg,rgba(235,248,255,.7),transparent); }
.demo-row > td:first-child { box-shadow: inset 0.1875rem 0 #67a9d4; }
.row-actions { display: flex; align-items: center; gap: 0.375rem; min-width: max-content; }
.inline-form { display: inline-flex; margin: 0; }
.icon-action.approve { color: #126c50; border-color: #bce7d6; background: #eaf9f3; }
.payment-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; margin: 0 1.375rem 0.25rem; padding-top: 1.25rem; }
.payment-summary span { padding: 0.6875rem; border-radius: 0.625rem; color: var(--muted); background: #f4f7fa; font-size: 0.625rem; }
.payment-summary strong { display: block; margin-top: 0.1875rem; color: var(--ink); font-size: 0.875rem; }
.two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.125rem; }
.check-line { display: flex; grid-template-columns: none; align-items: center; gap: 0.5625rem; min-height: 2.5rem; }
.check-line input { width: 1.125rem; min-height: 1.125rem; margin: 0; }
dialog.permissions-modal { width: min(61.25rem,calc(100vw - 1.75rem)); }
.permission-section { margin-top: 1.375rem; padding-top: 1.25rem; border-top: 0.0625rem solid var(--line); }
.permission-section h3 { margin: 0 0 0.1875rem; }
.permission-section > div:first-child small { color: var(--muted); }
.permission-table { margin-top: 0.9375rem; border: 0.0625rem solid var(--line); border-radius: 0.75rem; overflow: hidden; }
.permission-row { display: grid; grid-template-columns: minmax(10.625rem,1.6fr) repeat(5,minmax(4.625rem,.65fr)); align-items: center; min-height: 2.75rem; border-bottom: 0.0625rem solid var(--line); }
.permission-row:last-child { border-bottom: 0; }
.permission-row > strong { padding: 0.625rem 0.8125rem; }
.permission-row > span { color: var(--muted); font-size: 0.5625rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.permission-row > label { display: grid; place-items: center; }
.permission-row input { width: 1.125rem; min-height: 1.125rem; }
.permission-head { background: #f7f9fb; }
.rank-list > div { display: grid; grid-template-columns: minmax(6.25rem,1fr) minmax(5rem,1.8fr) auto; align-items: center; gap: 0.625rem; }
.rank-list > div .progress { margin: 0; }
.report-filter-panel { margin-bottom: 1.125rem; padding: 1.375rem; }
.report-filter-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.125rem; border-bottom: 0.0625rem solid var(--line); }
.report-filter-head h2 { margin-bottom: 0.25rem; }
.report-filter-head p:last-child { max-width: 45rem; margin: 0; color: var(--muted); font-size: 0.75rem; }
.report-record-count { display: grid; min-width: 7rem; padding: 0.6875rem 0.9375rem; border-radius: 0.75rem; color: #4f6073; background: #eff6f5; text-align: center; font-size: 0.625rem; font-weight: 800; white-space: nowrap; }
.report-record-count strong { color: var(--primary); font-size: 1.375rem; line-height: 1.1; }
.report-filter-form { display: grid; grid-template-columns: repeat(4,minmax(9.375rem,1fr)); align-items: end; gap: 0.75rem; padding: 1.125rem 0; }
.report-filter-actions { display: flex; justify-content: flex-end; gap: 0.5625rem; grid-column: 1/-1; }
.report-filter-foot { display: flex; align-items: center; gap: 1rem; padding-top: 0.9375rem; border-top: 0.0625rem solid var(--line); color: #536176; font-size: 0.6875rem; }
.report-filter-foot > span { white-space: nowrap; }
.report-filter-foot > small { color: var(--muted); }
.report-filter-foot .report-actions { margin-left: auto; }
.report-metric-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 0.75rem; margin-bottom: 1.375rem; }
.report-metric { min-height: 8.25rem; padding: 1.0625rem; }
.report-metric strong { font-size: clamp(1.125rem,1.7vw,1.5rem); }
.report-metric small { display: block; margin-top: 0.25rem; font-size: 0.625rem; }
.report-metric.income { border-top: 0.1875rem solid var(--green); }
.report-metric.expense { border-top: 0.1875rem solid var(--coral); }
.report-metric-link { color: inherit; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.report-metric-link:hover { transform: translateY(-0.1875rem); border-color: rgba(25,111,99,.32); box-shadow: 0 1.125rem 2.625rem rgba(25,39,66,.13); }
.report-metric-link:focus-visible { outline: 0.1875rem solid rgba(34,147,131,.24); outline-offset: 0.1875rem; }
.report-metric-link.active { border-color: var(--primary-2); box-shadow: 0 0 0 0.125rem rgba(34,147,131,.12), var(--shadow); }
.report-metric-link small { color: var(--primary); font-weight: 750; }
.report-detail-panel { margin-bottom: 1.375rem; }
.report-detail-head { margin: 0; padding: 1.1875rem 1.25rem 0.9375rem !important; }
.report-detail-head .kicker { margin-bottom: 0.1875rem; }
.report-detail-head h3 { font-size: 1.0625rem; }
.report-detail-head p:last-child { margin: 0.1875rem 0 0; color: var(--muted); font-size: 0.6875rem; }
.report-detail-count { padding: 0.375rem 0.625rem; border-radius: 9999px; color: var(--primary); background: #eaf5f2; font-size: 0.625rem; font-weight: 850; white-space: nowrap; }
.report-detail-note { margin: 0 1.25rem 0.9375rem; padding: 0.625rem 0.75rem; border: 0.0625rem solid #dce9e7; border-radius: 0.625rem; color: #536176; background: #f6faf9; font-size: 0.6875rem; }
.report-detail-note strong { color: var(--primary); }
.report-detail-table td { min-width: 6.5625rem; }
.report-detail-table td:nth-child(2) { min-width: 14.375rem; }
.report-detail-table td:nth-child(3) { min-width: 8.75rem; }
.report-detail-table .row-overdue td:first-child { box-shadow: inset 0.1875rem 0 var(--red); }
.report-detail-table .row-paid td:first-child { box-shadow: inset 0.1875rem 0 var(--green); }
.report-detail-table .row-pending td:first-child { box-shadow: inset 0.1875rem 0 var(--amber); }
.report-detail-limit { padding: 0.75rem 1.25rem; border-top: 0.0625rem solid var(--line); color: var(--muted); background: #fafbfd; font-size: 0.625rem; text-align: center; }
.report-section-title { display: flex; align-items: end; justify-content: space-between; gap: 1.125rem; margin: 1.5625rem 0 0.75rem; }
.report-section-title .kicker { margin-bottom: 0.25rem; }
.report-section-title h3, .report-section-title p { margin-bottom: 0; }
.report-section-title > p { color: var(--muted); font-size: 0.6875rem; }
.report-grid-primary { grid-template-columns: repeat(2,minmax(0,1fr)); }
.report-chart-card { min-height: 13.125rem; }
.report-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 0.0625rem solid var(--line); }
.report-card-head h3 { margin: 0; }
.report-card-head span { color: var(--muted); font-size: 0.625rem; font-weight: 750; }
.report-chart-card .rank-list > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-chart-card .rank-list > div > strong { font-size: 0.6875rem; white-space: nowrap; }
.report-advanced { margin-top: 1rem; border: 0.0625rem solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.report-advanced > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.0625rem 1.25rem; color: #354158; cursor: pointer; list-style: none; }
.report-advanced > summary::-webkit-details-marker { display: none; }
.report-advanced > summary span { display: grid; }
.report-advanced > summary small { margin-top: 0.125rem; color: var(--muted); font-size: 0.625rem; }
.report-advanced > summary b { color: var(--primary); font-size: 0.6875rem; }
.report-advanced[open] > summary { border-bottom: 0.0625rem solid var(--line); }
.report-advanced[open] > summary b { font-size: 0; }
.report-advanced[open] > summary b::after { content: "Recolher"; font-size: 0.6875rem; }
.report-advanced > .report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 1rem; }
.report-advanced > .report-grid .panel { border-radius: 0.8125rem; box-shadow: none; }

@media (max-width: 75rem) {
  .metric-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .account-grid, .report-grid, .settings-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .report-metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .report-filter-foot { flex-wrap: wrap; }
  .report-filter-foot .report-actions { width: 100%; margin-left: 0; }
}
@media (max-width: 59.375rem) {
  .sidebar { transform: translateX(-105%); transition: transform .24s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(9,22,37,.4); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .two-columns { grid-template-columns: 1fr; }
}
@media (max-width: 40.625rem) {
  .topbar { min-height: 3.375rem; padding: 0.5rem 0.9375rem; gap: 0.625rem; }
  .topbar-title h1 { font-size: 1rem; }
  .today { display: none; }
  .content { padding: 1.1875rem 0.875rem 2.375rem; }
  .hero, .page-actions { align-items: stretch; flex-direction: column; }
  .period-picker { width: 100%; }
  .period-picker input { flex: 1; }
  .hero .btn, .page-actions .btn { width: 100%; }
  .metric-grid, .metric-grid.compact, .account-grid, .report-grid, .settings-grid { grid-template-columns: 1fr; }
  .filters, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .full { grid-column: auto; }
  .modal-actions { grid-column: auto; flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .finance-visual { grid-template-columns: 1fr; justify-items: center; }
  .welcome-top { align-items: stretch; flex-direction: column; }
  .welcome-role { justify-items: start; }
  .role-chip { align-self: flex-start; }
  .account-header { align-items: flex-start; }
  .account-meta { grid-template-columns: 1fr; gap: 0.625rem; }
  .account-meta > div { padding: 0; border-right: 0; }
  .dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .dashboard-toolbar .kicker { margin: 0; }
  .report-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .payment-summary { grid-template-columns: 1fr; }
  .permission-table { overflow-x: auto; }
  .permission-row { min-width: 43.75rem; }
  .report-filter-head, .report-section-title { align-items: stretch; flex-direction: column; }
  .report-record-count { align-self: flex-start; }
  .report-filter-form { grid-template-columns: 1fr; }
  .report-filter-actions { grid-column: auto; flex-direction: column; }
  .report-filter-actions .btn { width: 100%; }
  .report-filter-foot { align-items: stretch; flex-direction: column; gap: 0.5rem; }
  .report-filter-foot > span { white-space: normal; }
  .report-filter-foot .report-actions { grid-template-columns: 1fr; }
  .report-metric-grid { grid-template-columns: 1fr; }
  .report-grid-primary, .report-advanced > .report-grid { grid-template-columns: 1fr; }
  .report-chart-card .rank-list > div { grid-template-columns: minmax(5.625rem,1fr) minmax(3.4375rem,.8fr) auto; }
  .password-rules { grid-template-columns: 1fr; }
  th, td { padding: 0.75rem; }
}
