:root {
  --orange: #ff6b00;
  --orange-dark: #d94f00;
  --green: #13a349;
  --ink: #2f3237;
  --muted: #6d727a;
  --line: #e3e5e8;
  --paper: #f6f7f8;
  --white: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255,107,0,.08), transparent 30%),
    #f3f4f5;
}
button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: white;
  font-weight: 800;
  padding: 11px 16px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { background: var(--orange-dark); }
button.secondary { background: #3f454c; }
button.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  background: #2f3237;
  font-size: 20px;
}
button.filter-chip {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 11px;
}
button.filter-chip:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
.hidden { display: none !important; }
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: rgba(246, 247, 248, .68);
  backdrop-filter: blur(2px);
}
.loading-overlay strong {
  color: var(--orange-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.neocon-spinner {
  position: relative;
  width: 96px;
  height: 96px;
  animation: spin 1.05s linear infinite;
}
.neocon-spinner span {
  position: absolute;
  left: 43px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  transform-origin: 5px 44px;
  opacity: .22;
}
.neocon-spinner span:nth-child(1) { transform: rotate(0deg); opacity: 1; }
.neocon-spinner span:nth-child(2) { transform: rotate(30deg); opacity: .92; }
.neocon-spinner span:nth-child(3) { transform: rotate(60deg); opacity: .84; }
.neocon-spinner span:nth-child(4) { transform: rotate(90deg); opacity: .76; }
.neocon-spinner span:nth-child(5) { transform: rotate(120deg); opacity: .68; }
.neocon-spinner span:nth-child(6) { transform: rotate(150deg); opacity: .60; }
.neocon-spinner span:nth-child(7) { transform: rotate(180deg); opacity: .52; }
.neocon-spinner span:nth-child(8) { transform: rotate(210deg); opacity: .44; }
.neocon-spinner span:nth-child(9) { transform: rotate(240deg); opacity: .36; }
.neocon-spinner span:nth-child(10) { transform: rotate(270deg); opacity: .30; }
.neocon-spinner span:nth-child(11) { transform: rotate(300deg); opacity: .25; }
.neocon-spinner span:nth-child(12) { transform: rotate(330deg); opacity: .20; }
@keyframes spin {
  to { transform: rotate(360deg); }
}
.muted { color: var(--muted); line-height: 1.55; }
.small { color: var(--muted); font-size: 13px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, .85fr);
  background: linear-gradient(110deg, #f2f3f4 0 52%, var(--orange) 52% 100%);
}
.brand-panel {
  position: relative;
  padding: clamp(32px, 6vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
}
.logo { width: min(220px, 58vw); height: auto; }
.hub-brand {
  max-width: 720px;
  transform: translateX(-10px);
}
.hub-logo {
  width: min(150px, 30vw);
  height: auto;
  display: block;
  margin: 0 0 20px -12px;
}
.neocon-login-logo {
  position: absolute;
  left: clamp(22px, 5vw, 66px);
  bottom: clamp(26px, 5vw, 58px);
  width: min(148px, 32vw);
  opacity: .95;
}
.brand-panel h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.03;
  color: #3d4045;
  font-weight: 760;
  white-space: nowrap;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100vw - 36px));
  background: var(--white);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0,0,0,.2);
  padding: 28px;
}
.login-card h2 { margin: 0 0 20px; }
label { display: grid; gap: 7px; font-weight: 800; font-size: 13px; color: #454950; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; font-family: Consolas, monospace; font-size: 13px; }
.module-access-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f7f8;
}
.module-access-field > span {
  grid-column: 1 / -1;
  color: #454950;
  font-size: 13px;
  font-weight: 800;
}
.module-access-field .check {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
}
.login-card label { margin-bottom: 14px; }
.login-card button { width: 100%; margin-top: 8px; }
.message { min-height: 20px; color: var(--orange-dark); font-weight: 700; overflow-wrap: anywhere; line-height: 1.4; }
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 76px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 76px;
  min-height: 100vh;
  background: #2f3237;
  color: white;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transition: width .18s ease, box-shadow .18s ease, transform .18s ease;
}
.sidebar:hover {
  width: 248px;
  box-shadow: 20px 0 40px rgba(47,50,55,.18);
}
.side-logo {
  width: 52px;
  background: white;
  border-radius: 7px;
  padding: 7px;
  margin-bottom: 10px;
  object-fit: contain;
  aspect-ratio: 1;
}
.side-user {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 9px;
  margin-bottom: 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: white;
  cursor: pointer;
}
.side-user:hover { background: rgba(255,255,255,.08); }
.side-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: white;
  font-weight: 900;
  font-size: 12px;
  background-size: cover;
  background-position: center;
}
.side-avatar.has-photo { color: transparent; }
.side-user-text {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .16s ease, transform .16s ease;
  min-width: 0;
}
.sidebar:hover .side-user-text {
  opacity: 1;
  transform: translateX(0);
}
.side-user-text strong,
.side-user-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user-text strong { font-size: 12px; font-weight: 700; }
.side-user-text span { font-size: 10px; color: #cfd3d7; text-transform: uppercase; font-weight: 600; }
.sidebar:not(:hover) .side-user {
  grid-template-columns: 38px;
  justify-content: center;
  padding: 6px 9px;
}
.sidebar:not(:hover) .side-user-text { display: none; }
.nav {
  text-align: left;
  background: transparent;
  color: #eef0f2;
  border: 1px solid transparent;
  padding: 9px;
  overflow-wrap: normal;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 7px;
  min-height: 44px;
}
.sidebar:not(:hover) .nav {
  grid-template-columns: 38px;
  justify-content: center;
  padding: 5px 9px;
  min-height: 40px;
}
.sidebar:not(:hover) .nav-label { display: none; }
.nav:hover, .nav.active {
  background: var(--orange);
  color: white;
}
.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  font-size: 11px;
  font-weight: 900;
}
.nav.active .nav-icon, .nav:hover .nav-icon { background: rgba(255,255,255,.24); }
.nav-label {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .16s ease, transform .16s ease;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.18;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sidebar:hover .nav-label {
  opacity: 1;
  transform: translateX(0);
}
.workspace { padding: 18px 22px 24px; min-width: 0; }
.app-footer {
  margin-top: 18px;
  padding: 12px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.topbar h2 { margin: 0; font-size: clamp(24px, 2vw, 30px); line-height: 1.05; }
.filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.filter-field select { min-width: min(34vw, 320px); }
.date-field input { width: 148px; }
.filters button { min-height: 43px; }
.contabil-filters {
  justify-content: flex-end;
  align-items: end;
}
.transport-toggle {
  align-self: end;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #ffd0ad;
  border-radius: 999px;
  background: #fff4eb;
  color: #3b4047;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}
.transport-toggle input {
  width: 34px;
  height: 18px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #cfd3d7;
  position: relative;
  cursor: pointer;
}
.transport-toggle input::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .16s ease;
}
.transport-toggle input:checked { background: var(--orange); }
.transport-toggle input:checked::after { transform: translateX(16px); }
.module-notice {
  padding: 10px 12px;
  border: 1px solid #ffd0ad;
  background: #fff4eb;
  color: #a94300;
  border-radius: 8px;
  font-weight: 800;
  margin-bottom: 12px;
}
.consolidation-notice {
  padding: 9px 12px;
  border-left: 4px solid var(--orange);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 12px;
}
.active-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.active-filter-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.filter-chip.clear-all { border-color: #3f454c; }
.report-head {
  min-height: 72px;
  background:
    linear-gradient(135deg, rgba(255,107,0,.12), transparent 42%),
    white;
  color: var(--ink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(35, 38, 42, .06);
}
.report-head p {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 800;
  color: #4d535b;
}
.report-head h3 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
  text-align: center;
}
.report-head img {
  justify-self: end;
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(122px, 1fr));
  gap: 8px;
}
.kpi-grid.kpi-grid-eight {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}
.kpi, .panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(35, 38, 42, .06);
}
.kpi {
  min-height: 72px;
  padding: 9px 9px 10px 11px;
  border-left: 5px solid #a1a5aa;
  border-top: 0;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: "";
  position: absolute;
  inset: auto -20px -30px auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255,107,0,.08);
}
.kpi.orange { border-left-color: var(--orange); }
.kpi.green { border-left-color: var(--green); }
.kpi.due { border-left-color: #c00000; }
.kpi.credit { border-left-color: var(--green); }
.kpi.neutral { border-left-color: #808080; }
.kpi.due::after { background: rgba(192,0,0,.08); }
.kpi.credit::after { background: rgba(19,163,73,.10); }
.kpi.neutral::after { background: rgba(128,128,128,.08); }
.kpi span {
  display: block;
  color: #4d535b;
  font-size: 12px;
  font-weight: 720;
  text-transform: none;
  line-height: 1.12;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi strong {
  display: block;
  margin-top: 9px;
  font-size: clamp(12px, .9vw, 15px);
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.16;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}
.kpi-grid-eight .kpi {
  min-height: 78px;
  background: linear-gradient(180deg, #fff 0%, #fff 62%, #fff4ed 100%);
  border-left-color: #ff6b00;
}
.kpi-grid-eight .kpi span { font-size: 12px; }
.kpi-grid-eight .kpi strong { font-size: clamp(11.5px, .82vw, 14px); margin-top: 9px; }
.grid { display: grid; gap: 10px; margin-top: 10px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: .85fr .85fr 1.9fr; }
.panel { padding: 11px 12px; min-width: 0; }
.panel h3 { margin: 0 0 8px; font-size: 15px; text-align: center; }
svg { width: 100%; height: 210px; display: block; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(120px, 3fr) minmax(92px, auto);
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  white-space: normal;
}
.bar-row:hover, .bar-row.active { background: #fff4eb; }
.month-bar { cursor: pointer; }
.month-bar:hover rect { filter: brightness(.92); }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row strong { font-size: 12px; text-align: right; white-space: nowrap; }
.bar-track { height: 12px; background: #eceff1; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--orange); border-radius: 999px; }
.bar-fill.green-fill { background: var(--green); }
.bar-fill.orange-fill { background: #f28f1c; }
.donut {
  min-height: 148px;
  display: grid;
  place-items: center;
  text-align: center;
}
.donut-ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.donut-inner {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.dashboard-simples .grid.three {
  grid-template-columns: .8fr 1.15fr 1.75fr;
}
.dashboard-simples #saidaSplit {
  min-height: 190px;
  align-items: center;
  justify-items: center;
}
.dashboard-simples #saidaSplit > div {
  width: 100%;
  display: grid;
  justify-items: center;
}
.dashboard-simples #entradaSplit {
  min-height: 190px;
}
.dashboard-simples #creditProductBars .bar-row,
.dashboard-simples #productBars .bar-row {
  grid-template-columns: 80px minmax(120px, 1fr) 110px;
}
.mini-bars {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 4px 2px;
}
.mini-row {
  display: grid;
  grid-template-columns: 64px minmax(56px, 1fr) 96px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-align: left;
}
.mini-row span {
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.mini-row strong {
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.form-grid.panel {
  box-shadow: none;
  border-color: #d8d8d8;
}
.wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; }
.check { align-content: end; grid-template-columns: 20px auto; align-items: center; }
.check input { width: auto; }
.table-panel { margin-top: 14px; overflow: auto; }
.profile-panel {
  grid-template-columns: 210px repeat(2, minmax(220px, 1fr));
  align-items: start;
}
.profile-card {
  grid-row: span 3;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #fff 0%, #fff4ed 100%);
}
.profile-card strong { font-size: 16px; text-align: center; }
.profile-card span { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 12px; }
.profile-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: white;
  font-weight: 900;
  font-size: 24px;
  background-size: cover;
  background-position: center;
}
.profile-avatar.has-photo { color: transparent; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); text-transform: uppercase; font-size: 12px; }
.pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef0f2; font-weight: 800; }
.model-item { padding: 12px; border-bottom: 1px solid var(--line); }
.model-item strong { display: block; }
.model-item span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.module-shell { display: grid; gap: 12px; }
.contabil-executive {
  --ct-dark: #353b44;
  --ct-mid: #6f7782;
  --ct-soft: #eef0f2;
  --ct-orange: #ff6b00;
  --ct-good: #13a349;
  --ct-bad: #d64545;
}
.contabil-executive > .kpi-grid:not(.contabil-kpis),
.contabil-executive > .grid.two,
.contabil-executive > .table-panel:not(.ct-span-3) {
  display: none;
}
.contabil-executive .module-head {
  background: linear-gradient(135deg, #ffffff, #f1f3f5 72%, #fff1e8);
  color: #20242a;
  border: 1px solid var(--line);
  border-left: 6px solid var(--ct-orange);
  border-radius: 8px;
}
.contabil-executive .module-head .eyebrow,
.contabil-executive .module-head .filter-field { color: #6a717b; }
.contabil-executive .module-head input {
  background: #fff;
  border-color: var(--line);
}
.contabil-pages {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding-bottom: 2px;
}
.contabil-pages button {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #e7e9ec;
  color: #30343a;
  font-size: 11px;
  letter-spacing: 0;
}
.contabil-pages button.active {
  background: #fff0e6;
  color: #c24c00;
  box-shadow: inset 0 0 0 1px rgba(255,107,0,.38);
}
.contabil-kpis {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}
.contabil-kpis .kpi {
  min-height: 82px;
  background: linear-gradient(180deg, #ffffff, #f6f7f8);
  border-top: 4px solid #d8dde3;
  padding: 11px 13px;
}
.contabil-kpis .kpi strong {
  font-size: clamp(15px, 1.05vw, 20px);
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contabil-kpis .kpi small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 10px;
  line-height: 1.25;
}
.contabil-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.contabil-layout .panel {
  min-height: 260px;
  overflow: hidden;
}
.ct-span-2 { grid-column: span 2; }
.ct-span-3 { grid-column: span 3; }
.ct-bar-row,
.ct-water-row,
.ct-dre-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(120px, 2fr) minmax(112px, auto);
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.ct-bar-row span,
.ct-water-row span,
.ct-dre-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #383d44;
  font-size: 12px;
}
.ct-bar-row div,
.ct-water-row div {
  height: 13px;
  background: #e4e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.ct-bar-row i,
.ct-water-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ct-orange);
}
.ct-bar-row b,
.ct-water-row b,
.ct-dre-row strong {
  text-align: right;
  font-size: 12px;
  white-space: nowrap;
}
.ct-water-row.negative i { background: var(--ct-bad); }
.ct-water-row.subtotal i { background: var(--ct-dark); }
.ct-dre-row {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, auto);
  padding: 10px 0;
}
.ct-dre-row.negative strong { color: var(--ct-bad); }
.ct-gauge {
  min-height: 150px;
  display: grid;
  place-items: center;
}
.gauge-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at center, white 0 57%, transparent 58%),
    conic-gradient(var(--ring-color, var(--ct-orange)) var(--value), #dfe3e7 0);
}
.gauge-ring.bad { --ring-color: var(--ct-bad); }
.gauge-ring.warn { --ring-color: #ffb020; }
.gauge-ring.good { --ring-color: var(--ct-good); }
.gauge-ring.premium { --ring-color: #2563eb; }
.gauge-ring strong {
  font-size: 30px;
  color: var(--ct-dark);
  font-weight: 600;
}
.gauge-ring span {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
}
.gauge-ring small {
  color: var(--ring-color, var(--ct-orange));
  font-size: 12px;
  font-weight: 600;
}
.ct-treemap {
  min-height: 204px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ct-tile {
  min-height: 92px;
  flex-grow: 1;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #303640, #4a515b);
  color: white;
}
.ct-tile:nth-child(2) { background: linear-gradient(135deg, #ff6b00, #c84700); }
.ct-tile:nth-child(3) { background: linear-gradient(135deg, #6b7280, #353b44); }
.ct-tile span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.ct-tile strong { font-size: 16px; }
.ct-tile small {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
}
.ct-liquidity-panel {
  min-height: 230px;
}
.ct-liquidity-combo {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 14px;
}
.ct-coefficients {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ct-coef {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f5f7f9;
  border: 1px solid var(--line);
}
.ct-coef span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.ct-coef strong {
  font-size: 28px;
  color: var(--ct-dark);
  font-weight: 600;
}
.ct-coef div {
  height: 11px;
  border-radius: 999px;
  background: #e1e5e9;
  overflow: hidden;
}
.ct-coef i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ct-orange);
}
.ct-coef.bad i { background: var(--ct-bad); }
.ct-coef.warn i { background: #ffb020; }
.ct-coef.good i { background: var(--ct-good); }
.ct-coef.premium i { background: #2563eb; }
.ct-coef small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}
.ct-donut-panel {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.ct-donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: conic-gradient(var(--ct-orange), #e5e7eb);
  position: relative;
}
.ct-donut::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: white;
}
.ct-donut strong,
.ct-donut span {
  position: relative;
  z-index: 1;
  text-align: center;
}
.ct-donut strong { font-size: 12px; color: var(--ct-dark); font-weight: 600; }
.ct-donut span { max-width: 64px; font-size: 8px; color: var(--muted); font-weight: 500; text-transform: uppercase; line-height: 1.15; }
.ct-donut-legend {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.ct-donut-legend p,
.ct-score-breakdown p {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #3b4047;
  font-size: 11px;
  font-weight: 500;
}
.ct-donut-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-donut-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.ct-half-donut {
  display: grid;
  gap: 8px;
  place-items: center;
}
.half-ring {
  width: 146px;
  height: 76px;
  border-radius: 146px 146px 0 0;
  display: grid;
  place-items: center;
  align-content: end;
  padding-bottom: 9px;
  background: conic-gradient(from 270deg at 50% 100%, #ff6b00 0 calc(var(--own) / 2), #6f7782 0 50%, transparent 0);
  position: relative;
}
.half-ring::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 47px;
  border-radius: 90px 90px 0 0;
  background: white;
}
.half-ring strong,
.half-ring span {
  position: relative;
  z-index: 1;
}
.half-ring strong { font-size: 22px; color: var(--ct-dark); font-weight: 600; }
.half-ring span { font-size: 8px; color: var(--muted); font-weight: 500; text-transform: uppercase; line-height: 1.1; }
.stock-value {
  display: grid;
  gap: 6px;
}
.stock-value span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.stock-value strong { font-size: 24px; color: var(--ct-dark); }
.stock-scale {
  margin-top: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e2e6ea;
  position: relative;
}
.stock-scale i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ct-good), #ffb020, var(--ct-bad));
}
.stock-scale em {
  position: relative;
  top: 8px;
  display: inline-block;
  width: 24%;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.stock-gauge p,
.ct-stock-gauge p {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.ct-score-breakdown {
  display: grid;
  gap: 9px;
}
.score-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.score-total strong { font-size: 30px; color: var(--ct-dark); }
.score-total span { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: 11px; }
.score-stack {
  height: 16px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e7eb;
}
.score-stack i:nth-child(1) { background: #2563eb; }
.score-stack i:nth-child(2) { background: #13a349; }
.score-stack i:nth-child(3) { background: #ff6b00; }
.score-stack i:nth-child(4) { background: #596273; }
.score-stack i:nth-child(5) { background: #f59e0b; }
.score-stack i:nth-child(6) { background: #252a31; }
.ct-score-breakdown p {
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.ct-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ct-matrix article {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 8px;
  padding: 10px;
  background: #f3f5f7;
  border-left: 4px solid var(--ct-orange);
}
.ct-matrix span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.ct-matrix strong { color: var(--ct-dark); font-size: 14px; }
.ct-matrix b { color: var(--ct-orange); font-size: 22px; }
.ct-matrix small { color: var(--muted); font-size: 11px; }
.ct-heatmap {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}
.ct-heatmap div {
  min-height: 42px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,var(--alpha));
  color: #252a31;
  font-size: 10px;
  font-weight: 900;
}
.ct-heatmap b { font-size: 9px; color: #5b626b; }
.ct-insights {
  display: grid;
  gap: 8px;
}
.ct-insights article {
  padding: 10px;
  border-radius: 8px;
  background: #f4f6f8;
  border-left: 4px solid #9aa1aa;
}
.ct-insights article.crítico { border-left-color: var(--ct-bad); background: #fff1f1; }
.ct-insights article.atenção { border-left-color: var(--ct-orange); background: #fff4eb; }
.ct-insights article.ok { border-left-color: var(--ct-good); background: #edf9f1; }
.ct-insights article.ct-memory-card {
  border-left-color: #252a31;
  background: #fff;
}
.ct-insights strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ct-dark);
}
.ct-insights span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.ct-memory-card button {
  margin-top: 8px;
  min-height: 30px;
  padding: 7px 9px;
  font-size: 11px;
  border-radius: 6px;
}
.ct-memory-detail {
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 6px;
  background: #f1f3f5;
  color: #3d4249;
  font-size: 11px;
  line-height: 1.35;
}
.contabil-review .module-head {
  background: linear-gradient(135deg, #252a31, #4a5058 70%, #ff6b00);
  color: white;
  border: 0;
}
.review-summary {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.review-table {
  min-width: 1320px;
  font-size: 12px;
}
.review-table input {
  min-width: 150px;
  padding: 7px 8px;
  border-radius: 6px;
}
.review-table button {
  min-height: 28px;
  padding: 6px 8px;
  margin: 2px;
  border-radius: 6px;
  font-size: 11px;
}
.score {
  display: inline-grid;
  min-width: 38px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
  color: white;
}
.score-high { background: #13a349; }
.score-mid { background: #4d5967; }
.score-warn { background: #ff9f1c; }
.score-low { background: #d64545; }
@media (max-width: 1280px) {
  .contabil-kpis { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
.module-head {
  min-height: 72px;
  background: linear-gradient(135deg, rgba(255,107,0,.12), transparent 42%), white;
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.module-head h3 { margin: 0; font-size: clamp(19px, 1.8vw, 24px); }
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f3f4;
}
.segmented button {
  min-height: 36px;
  padding: 8px 12px;
  background: transparent;
  color: var(--ink);
}
.segmented button.active {
  background: var(--orange);
  color: white;
}
.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.manual-grid label {
  display: grid;
  gap: 5px;
  font-weight: 800;
  color: var(--muted);
  font-size: 12px;
}
.state-panel { margin-top: 10px; max-height: 210px; overflow: auto; }
.state-row {
  display: grid;
  grid-template-columns: 42px minmax(260px, 1.4fr) minmax(150px, 2fr) minmax(132px, auto);
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-radius: 0;
  white-space: normal;
}
.state-row:hover, .state-row.active { background: #fff4eb; }
.state-row strong { color: var(--orange-dark); font-size: 15px; }
.state-row span { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.state-row b { font-size: 11px; text-align: right; white-space: nowrap; }
.state-row b.due { color: #c00000; }
.state-row b.credit { color: var(--green); }
.state-row b.neutral { color: var(--muted); }
.state-stack {
  display: flex;
  height: 14px;
  background: #eceff1;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(47,50,55,.04);
}
.state-stack i {
  display: block;
  height: 100%;
}
.state-stack .state-debit { background: var(--orange); }
.state-stack .state-credit { background: var(--green); }
@media (max-width: 1100px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .contabil-layout { grid-template-columns: 1fr; }
  .ct-span-2, .ct-span-3 { grid-column: auto; }
  .ct-liquidity-combo { grid-template-columns: 1fr; }
  .ct-coefficients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-head { grid-template-columns: 1fr; text-align: left; }
  .report-head h3 { text-align: left; }
  .report-head img { justify-self: start; }
  .state-row { grid-template-columns: 42px 1fr; }
  .state-row span, .state-stack, .state-row b { grid-column: 2; }
  .state-row b { text-align: left; }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; background: #f2f3f4; }
  body { background: #f6f7f8; }
  .app-shell { grid-template-columns: 1fr; }
  button.mobile-menu-btn { display: grid; place-items: center; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 310px);
    transform: translateX(-104%);
    grid-template-columns: 1fr;
    display: flex;
    gap: 8px;
    z-index: 40;
    overflow-y: auto;
    box-shadow: 20px 0 48px rgba(0,0,0,.22);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar:hover {
    width: min(82vw, 310px);
  }
  .side-logo { width: 56px; margin: 0; grid-column: 1 / -1; }
  .side-user { grid-column: 1 / -1; }
  .side-user-text,
  .sidebar:not(:hover) .side-user-text {
    opacity: 1;
    transform: none;
  }
  .nav {
    min-height: 48px;
    grid-template-columns: 42px 1fr;
    text-align: left;
    padding: 9px 10px;
  }
  .sidebar:not(:hover) .nav {
    grid-template-columns: 42px 1fr;
    justify-content: stretch;
    padding: 9px 10px;
    min-height: 48px;
  }
  .sidebar:not(:hover) .side-user {
    grid-template-columns: 38px 1fr;
    justify-content: stretch;
  }
  .nav-label,
  .sidebar:not(:hover) .nav-label {
    display: block;
    opacity: 1;
    transform: none;
  }
  .workspace { padding: 12px; min-width: 0; }
  .topbar {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px;
  }
  .topbar > .filters {
    grid-column: 1 / -1;
  }
  .topbar h2 {
    font-size: 21px;
    line-height: 1.15;
  }
  .filters {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .filters button, .form-actions button {
    min-height: 46px;
    width: 100%;
  }
  .filter-field select, .date-field input { width: 100%; }
  .kpi-grid, .form-grid, .contabil-kpis, .review-summary { grid-template-columns: 1fr; }
  .kpi {
    min-height: 84px;
    padding: 13px;
  }
  .kpi strong { font-size: clamp(18px, 6vw, 24px); }
  .profile-card { grid-row: auto; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-row strong { text-align: left; }
  .panel {
    padding: 12px;
    overflow-x: auto;
  }
  svg {
    min-width: 520px;
  }
  .donut {
    min-height: 190px;
  }
  .ct-coefficients {
    grid-template-columns: 1fr;
  }
  .ct-donut-panel {
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .ct-treemap {
    min-height: auto;
  }
  .ct-tile {
    flex-basis: 100% !important;
  }
  .module-access-field {
    grid-template-columns: 1fr;
  }
  .table-panel {
    overflow-x: auto;
  }
  table {
    min-width: 760px;
  }
}
