:root {
  --navy: #0d2844;
  --navy-2: #123a61;
  --blue: #1b75d0;
  --gold: #d4af37;
  --green: #16a34a;
  --red: #ef233c;
  --orange: #f97316;
  --ink: #162033;
  --muted: #667085;
  --line: #d9e2ec;
  --panel: #ffffff;
  --bg: #f4f7fb;
  --soft-blue: #e9f2ff;
  --soft-green: #e8f8ee;
  --soft-red: #ffecee;
  --shadow: 0 10px 30px rgba(15, 35, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

body:not(.logged-in) {
  overflow: hidden;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 20%, rgba(212, 175, 55, 0.22), transparent 28%),
    linear-gradient(135deg, #04101b 0%, #082338 52%, #020a12 100%);
}

.login-screen.hidden {
  display: none;
}

.login-brand-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  border-right: 1px solid rgba(212, 175, 55, 0.32);
  color: #fff;
  padding: 40px;
  text-align: center;
}

.login-mark {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border: 2px solid #d4af37;
  border-radius: 14px;
  color: #d4af37;
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 900;
}

.login-brand-panel h1 {
  color: #fff;
  font-family: Georgia, serif;
  font-size: 54px;
}

.login-brand-panel h1 span {
  color: #d4af37;
}

.login-brand-panel p {
  margin: 0;
  color: #dbe5ee;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-card {
  align-self: center;
  justify-self: center;
  display: grid;
  width: min(440px, calc(100vw - 40px));
  gap: 16px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.login-card h2 {
  margin-bottom: 4px;
  font-size: 30px;
}

.login-card span,
.login-card small {
  color: var(--muted);
}

.login-card label,
.user-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-card input,
.user-form input,
.user-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

button,
input,
select {
  font: inherit;
}

.payment-date-input,
.table-date-input {
  min-height: 30px;
  width: 142px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
}

.table-text-input,
.table-select-input,
.table-money-input {
  min-height: 30px;
  width: 150px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
}

.table-money-input {
  width: 110px;
  text-align: right;
}

.table-text-input.wide {
  width: 220px;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow-y: auto;
  padding: 20px 16px 16px;
  background:
    linear-gradient(160deg, rgba(212, 175, 55, 0.12), transparent 24%),
    linear-gradient(180deg, #04101b 0%, #082238 58%, #03101a 100%);
  color: #fff;
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 2px solid #d4af37;
  border-radius: 12px;
  color: #d4af37;
  background: rgba(1, 11, 20, 0.78);
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #fff;
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1;
}

.brand strong span {
  color: #d4af37;
}

.brand small {
  margin-top: 8px;
  color: #d7dde5;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: uppercase;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.menu-section-label {
  padding: 8px 12px 4px;
  color: rgba(212, 175, 55, 0.55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(241, 246, 251, 0.75);
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.menu-item .material-icons-round {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(212, 175, 55, 0.7);
  font-size: 16px;
  transition: background 0.18s ease, color 0.18s ease;
}

.menu-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.menu-item:hover .material-icons-round {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
}

.menu-item.active {
  color: #fff;
  border-color: rgba(212, 175, 55, 0.3);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), rgba(255, 255, 255, 0.05));
}

.menu-item.active .material-icons-round {
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
}

.menu-item.active::before {
  position: absolute;
  inset: 7px auto 7px -1px;
  width: 3px;
  border-radius: 999px;
  background: #d4af37;
  content: "";
}

.sidebar-support {
  margin-top: 14px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 14px;
  background: rgba(1, 11, 20, 0.48);
}

.sidebar-support strong,
.sidebar-support span,
.sidebar-version span,
.sidebar-version strong {
  display: block;
}

.sidebar-support strong {
  color: #fff;
  font-size: 13px;
}

.sidebar-support span {
  margin-top: 4px;
  color: #d7dde5;
  font-size: 12px;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: rgba(212, 175, 55, 0.12);
  font-weight: 800;
  cursor: pointer;
}

.sidebar-logout span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.65);
  border-radius: 7px;
  color: #d4af37;
  font-size: 13px;
}

.sidebar-logout:hover {
  border-color: rgba(212, 175, 55, 0.85);
  background: rgba(212, 175, 55, 0.22);
}

.sidebar-version {
  margin-top: 14px;
  border-top: 1px solid rgba(212, 175, 55, 0.32);
  padding: 12px 8px 0;
  color: #d7dde5;
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-version strong {
  margin-top: 8px;
  color: #fff;
  font-size: 13px;
  text-transform: none;
}

.app {
  width: calc(100% - 260px);
  margin-left: 260px;
  padding: 28px;
}

.view {
  display: none;
}

.view.active-view {
  display: block;
}

.topbar,
.section-heading,
.top-actions,
.legend {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 16px;
}

.top-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#launchView .topbar {
  align-items: flex-start;
}

#launchView .top-actions {
  max-width: 760px;
}

#launchView .top-actions button {
  white-space: nowrap;
}

.home-executive-dashboard {
  min-height: calc(100vh - 48px);
  border-radius: 12px;
  padding: 24px;
  color: #f7fbff;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.14), transparent 22%),
    linear-gradient(160deg, #04101b 0%, #072236 52%, #03101a 100%);
  box-shadow: var(--shadow);
}

.home-executive-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

.home-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid #d4af37;
  border-radius: 10px;
  color: #d4af37;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 800;
}

.home-brand-lockup strong {
  display: block;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.home-brand-lockup strong span {
  color: #d4af37;
}

.home-brand-lockup small,
.home-title-block p,
.home-top-actions span,
.home-kpi-card small {
  color: #dbe5ee;
}

.home-brand-lockup small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-title-block h1 {
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1.1;
}

.home-title-block p {
  margin: 6px 0 0;
}

.home-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-gold-button,
.home-clear-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-gold-button {
  border: 0;
  color: #05121e;
  background: linear-gradient(135deg, #f3c35a, #d4af37);
}

.home-clear-button {
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #fff;
  background: rgba(2, 10, 18, 0.42);
}

.home-filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  gap: 14px;
  margin-bottom: 18px;
}

.home-filter-row label {
  min-height: 62px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(1, 11, 20, 0.62);
}

.home-filter-row span,
.home-filter-row select,
.home-kpi-card span,
.home-kpi-card strong,
.home-kpi-card small {
  display: block;
}

.home-filter-row span {
  color: #d4af37;
  font-size: 11px;
  font-weight: 800;
}

.home-filter-row select {
  width: 100%;
  min-height: 28px;
  margin-top: 6px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 19px;
  font-weight: 800;
  outline: none;
}

.home-filter-row option {
  color: #071423;
}

.home-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.home-kpi-card {
  position: relative;
  min-height: 156px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  padding: 18px 16px 14px;
  color: #071423;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.has-tooltip {
  position: relative;
}

.home-kpi-card.has-tooltip {
  overflow: visible;
}

.home-kpi-card.has-tooltip::after,
.home-bottom-strip .has-tooltip::after {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: calc(100% + 10px);
  width: min(260px, 90vw);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  background: #061421;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.home-kpi-card.has-tooltip:hover::after,
.home-bottom-strip .has-tooltip:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.home-kpi-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid #d4af37;
  border-radius: 50%;
  color: #d4af37;
  background: #061421;
  font-weight: 900;
}

.home-kpi-card span {
  color: #071423;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-kpi-card strong {
  margin-top: 8px;
  color: #071423;
  font-size: 22px;
}

.home-kpi-card small {
  margin-top: 4px;
  color: #344456;
  font-size: 12px;
}

.home-finance-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.home-finance-card {
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  padding: 16px 18px;
  color: #071423;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.home-finance-card span,
.home-finance-card strong,
.home-finance-card small {
  display: block;
}

.home-finance-card span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-finance-card strong {
  margin-top: 8px;
  color: #071423;
  font-size: 24px;
}

.home-finance-card small {
  margin-top: 4px;
  color: #344456;
  font-size: 12px;
}

.home-kpi-change {
  position: absolute;
  top: 22px;
  right: 18px;
  color: #c88405;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.home-kpi-change.down {
  color: #e11d2e;
}

.home-analytics-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(500px, 1fr);
  gap: 14px;
}

.home-dashboard-panel {
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  color: #071423;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.home-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #04101b, #0b2b45);
}

.home-panel-heading h2 {
  font-size: 14px;
  text-transform: uppercase;
}

.home-dre-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.home-dre-panel .table-wrapper {
  width: 100%;
  overflow-x: hidden;
}

.home-dre-table th,
.home-dre-table td {
  border-bottom: 1px solid #e4e9f0;
  padding: 9px 10px;
  text-align: right;
  white-space: nowrap;
}

.home-dre-table th:first-child,
.home-dre-table td:first-child {
  width: 15%;
  text-align: left;
  white-space: normal;
}

.home-dre-table th:nth-child(2),
.home-dre-table td:nth-child(2) {
  width: 5%;
}

.home-dre-table th:nth-child(3),
.home-dre-table td:nth-child(3) {
  width: 5%;
}

.home-dre-table th:nth-child(4),
.home-dre-table td:nth-child(4) {
  width: 75%;
}

.home-dre-table th {
  color: #172236;
  background: #f4f7fa;
  font-size: 11px;
  text-transform: uppercase;
}

.home-dre-table tr.total-row td {
  color: #a66d00;
  background: #fff8e8;
  font-weight: 900;
}

.home-dre-table tr.positive-row td {
  color: #008f3a;
  background: #eaf8ef;
  font-weight: 900;
}

.home-dre-table tr.negative-row td {
  color: #071423;
  background: #fff;
  font-weight: 400;
}

.home-chart-stack {
  display: grid;
  gap: 14px;
}

.home-line-chart,
.home-bar-chart {
  min-height: 250px;
  padding: 16px;
}

.home-line-chart svg,
.home-bar-chart svg {
  width: 100%;
  height: 250px;
}

.home-small-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.home-donut-panel {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 180px;
  padding: 16px;
}

.home-donut {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: conic-gradient(#061421 0 30%, #0f6b5b 30% 52%, #d4af37 52% 70%, #62748a 70% 100%);
}

.home-donut-list,
.home-horizontal-bars {
  display: grid;
  gap: 9px;
  padding: 16px;
  font-size: 12px;
}

.home-donut-list {
  padding: 0;
  font-size: 9px;
}

.home-legend-item,
.home-company-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.home-legend-item i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
}

.home-company-track {
  grid-column: 1 / -1;
  height: 14px;
  border-radius: 99px;
  background: #edf1f5;
  overflow: hidden;
}

.home-company-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #061421, #0d2b45);
}

.home-bottom-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: 14px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  background: rgba(1, 11, 20, 0.72);
}

.home-bottom-strip div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  min-height: 76px;
  border-right: 1px solid rgba(212, 175, 55, 0.35);
  padding: 16px 18px;
}

.home-bottom-strip div:last-child {
  border-right: 0;
}

.home-bottom-strip p,
.home-bottom-strip strong {
  display: block;
}

.bottom-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #d4af37;
  border-radius: 50%;
  color: #d4af37;
  font-size: 15px;
  font-weight: 900;
}

.home-bottom-strip p {
  margin: 0;
  color: #dbe5ee;
  font-size: 13px;
}

.home-bottom-strip strong {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #fff;
  font-size: 15px;
  padding-left: 46px;
}

.home-hidden-metrics {
  display: none;
}

.calendar-actions label {
  display: grid;
  gap: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-actions select {
  min-width: 160px;
  min-height: 44px;
  border: 1px solid #d4af37;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

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

.economic-calendar-summary .metric {
  border-top: 3px solid #d4af37;
}

.calendar-bank-panel {
  margin-bottom: 18px;
}

.calendar-bank-grid .bank-card {
  border-top: 3px solid #d4af37;
}

.budget-filter-panel {
  margin-bottom: 18px;
}

.economic-calendar-panel {
  border: 1px solid #dfe5ed;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  overflow: auto;
}

.budget-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.assistant-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
}

.training-layout,
.support-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
}

.platform-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.platform-form {
  display: grid;
  gap: 12px;
}

.budget-form {
  display: grid;
  gap: 12px;
}

.user-form {
  display: grid;
  gap: 12px;
}

.subscription-panel {
  border-top: 3px solid var(--gold);
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.subscription-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.subscription-grid span,
.subscription-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.subscription-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 18px;
}

.subscription-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  border-radius: 999px;
  padding: 8px 12px;
  background: #e8f7ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-badge.vencida,
.subscription-badge.bloqueada,
.subscription-badge.cancelada {
  background: #ffe9ec;
  color: var(--red);
}

.subscription-badge.teste {
  background: #fff6d8;
  color: #9a6a00;
}

.subscription-badge.gratuita {
  background: #e8f7ef;
  color: var(--green);
}

.subscription-note {
  margin-top: 12px;
  text-transform: none;
}

.training-list {
  display: grid;
  gap: 10px;
}

.training-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
}

.training-card.active {
  border-color: var(--gold);
  background: #fffaf0;
}

.training-card span,
.training-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.training-card strong {
  display: block;
  margin: 6px 0;
  font-size: 17px;
}

.training-player-panel {
  min-height: 520px;
}

.training-video-frame {
  display: grid;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.training-video-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

.training-notes {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.training-notes h3 {
  margin-bottom: 8px;
  color: var(--blue);
}

.support-chat-panel {
  min-height: 620px;
}

.support-chat {
  display: grid;
  align-content: start;
  gap: 12px;
  height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.support-message {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.support-message.user {
  justify-self: end;
  border-color: rgba(212, 175, 55, 0.55);
  background: #fffaf0;
}

.support-message.owner {
  border-color: rgba(11, 19, 32, 0.22);
  background: #eef4fb;
}

.support-message span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.support-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
  margin-top: 12px;
}

.support-ticket-list {
  display: grid;
  gap: 10px;
}

.support-ticket {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.support-ticket strong,
.support-ticket span {
  display: block;
}

.support-ticket span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.platform-ticket {
  display: grid;
  gap: 12px;
}

.platform-ticket-messages {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.platform-ticket-messages .support-message {
  max-width: 100%;
}

.platform-ticket-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.platform-ticket-reply textarea {
  min-height: 56px;
  resize: vertical;
}

.platform-client-actions {
  display: grid;
  grid-template-columns: 130px 140px auto;
  gap: 8px;
  min-width: 360px;
  align-items: center;
}

.platform-client-actions select,
.platform-client-actions input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
}

.assistant-form {
  display: grid;
  gap: 12px;
}

.assistant-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.assistant-form textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  resize: vertical;
}

.assistant-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assistant-preview-grid > div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.assistant-preview-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.assistant-preview-grid strong {
  color: var(--navy);
  font-size: 15px;
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.assistant-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.assistant-data-panel {
  margin-top: 18px;
}

.analysis-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.assistant-analysis-form {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.assistant-analysis-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.assistant-analysis-form textarea,
.assistant-analysis-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

.assistant-analysis-form textarea {
  resize: vertical;
}

.data-analysis-result {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

.analysis-kpis div,
.analysis-text-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.analysis-kpis span,
.analysis-text-block span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.analysis-kpis strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  font-size: 18px;
}

.analysis-text-block p {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.assistant-history-table {
  min-width: 980px;
}

.budget-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.budget-form input,
.budget-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.budget-table {
  min-width: 1120px;
  width: 100%;
  border-collapse: collapse;
}

.budget-table th,
.budget-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.budget-table th {
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

.budget-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.budget-status.success {
  color: var(--green);
  background: var(--soft-green);
}

.budget-status.warning {
  color: #a16207;
  background: #fff6df;
}

.budget-status.danger {
  color: var(--red);
  background: var(--soft-red);
}

.reconciliation-summary {
  margin-bottom: 18px;
}

.statement-bank-picker {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.statement-bank-picker select {
  min-width: 220px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

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

.reconciliation-help div {
  display: grid;
  gap: 5px;
  padding-left: 12px;
  border-left: 3px solid #d4af37;
}

.reconciliation-help strong {
  color: var(--ink);
}

.reconciliation-help span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.reconciliation-layout {
  display: block;
}

.import-progress,
.import-status {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 10px;
  margin: -8px 0 18px;
  padding: 14px 16px;
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 10px 24px rgba(15, 35, 55, 0.08);
}

.import-progress.hidden,
.import-status.hidden {
  display: none;
}

.import-progress strong,
.import-progress span,
.import-status strong,
.import-status span {
  display: block;
}

.import-progress span,
.import-status span {
  color: var(--muted);
  font-size: 13px;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(212, 175, 55, 0.28);
  border-top-color: var(--gold);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.reconciliation-table {
  min-width: 1420px;
  width: 100%;
  border-collapse: collapse;
}

.reconciliation-table th,
.reconciliation-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
}

.reconciliation-table th {
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

.reconciliation-table tr {
  cursor: pointer;
}

.reconciliation-table .selected-row td {
  background: #fff8e1;
}

.reconciliation-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.reconciliation-status.matched {
  color: var(--green);
  background: var(--soft-green);
}

.reconciliation-status.pending {
  color: #a16207;
  background: #fff6df;
}

.reconciliation-status.suggested {
  color: var(--blue);
  background: #eaf2ff;
}

.reconciliation-status.divergent {
  color: var(--red);
  background: var(--soft-red);
}

.match-preview {
  display: grid;
  gap: 12px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.match-card strong,
.match-card span,
.match-values {
  display: block;
}

.match-card span,
.match-values span,
.match-score span {
  color: var(--muted);
  font-size: 12px;
}

.match-score,
.match-values {
  text-align: right;
}

.match-card .primary-button {
  grid-column: 1 / -1;
  min-height: 36px;
}

.suggestion-dialog {
  max-width: min(860px, calc(100vw - 28px));
}

.suggestion-list {
  display: grid;
  gap: 12px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.suggestion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.suggestion-card strong,
.suggestion-card span {
  display: block;
}

.suggestion-card span {
  color: var(--muted);
  font-size: 12px;
}

.suggestion-card .match-score {
  min-width: 96px;
}

.suggestion-card .suggestion-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
}

.suggestion-meta div {
  border-radius: 8px;
  background: var(--soft-blue);
  padding: 8px 10px;
}

.suggestion-card .primary-button {
  grid-column: 1 / -1;
  min-height: 38px;
}

.duplicate-import-dialog {
  max-width: min(980px, calc(100vw - 28px));
}

.duplicate-import-list {
  display: grid;
  gap: 12px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.duplicate-import-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.duplicate-import-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.duplicate-import-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.duplicate-import-columns > div {
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.duplicate-import-card strong,
.duplicate-import-card span {
  display: block;
}

.duplicate-import-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.duplicate-import-score {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--blue);
}

.duplicate-import-score strong {
  font-size: 20px;
}

.duplicate-import-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.empty-state {
  display: grid;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #f8fafc;
}

.economic-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
  background: #fff;
}

.calendar-weekday {
  min-height: 40px;
  border-radius: 8px;
  padding: 10px 8px;
  color: #071423;
  background: #f3f6fa;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 206px;
  border: 1px solid #dde5ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 35, 55, 0.06);
  overflow: hidden;
}

.calendar-day.outside {
  background: #f8fafc;
  opacity: 0.7;
}

.calendar-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 8px;
  border-bottom: 1px solid #e5ebf2;
  padding: 0 12px;
  background: #f7f9fc;
}

.calendar-day.today header {
  background: #fff4d2;
}

.calendar-day header strong {
  color: #071423;
  font-size: 18px;
}

.calendar-day header span {
  border-radius: 999px;
  padding: 3px 7px;
  color: #8a5b00;
  background: #fff7d6;
  font-size: 11px;
  font-weight: 900;
}

.calendar-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: 18px 18px;
  align-items: center;
  min-height: 46px;
  gap: 8px;
  border-bottom: 1px solid #eef2f6;
  padding: 0 10px;
}

.calendar-row span {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  color: #344456;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.calendar-row strong {
  grid-column: 2;
  grid-row: 2;
  padding: 0;
  color: #071423;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.calendar-row::before {
  grid-column: 1;
  grid-row: 1 / 3;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.calendar-row.muted span {
  grid-column: 1;
  color: #667085;
  font-weight: 700;
  text-transform: none;
}

.calendar-row.muted {
  grid-template-columns: 1fr;
  grid-template-rows: 18px 20px;
  align-items: start;
  min-height: 46px;
  padding-top: 8px;
  background: #f8fafc;
}

.calendar-row.muted strong {
  grid-column: 1;
  color: #0d2b45;
  text-align: left;
}

.calendar-row.income::before {
  color: var(--green);
  border: 1px solid var(--green);
  content: "↑";
}

.calendar-row.expense::before {
  color: var(--red);
  border: 1px solid var(--red);
  content: "↓";
}

.calendar-row.total::before {
  color: #d4af37;
  border: 1px solid #d4af37;
  content: "=";
}

.calendar-row.income strong {
  color: var(--green);
  background: transparent;
}

.calendar-row.expense strong {
  color: var(--red);
  background: transparent;
}

.calendar-row.total.positive strong {
  color: var(--green);
}

.calendar-row.total.negative strong {
  color: var(--red);
}

.brand-negative {
  color: var(--red) !important;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid #d4af37;
  padding: 0 18px;
  color: #0b1320;
  background: #d4af37;
}

.success-button,
.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  font-weight: 800;
}

.success-button {
  border: 1px solid #d4af37;
  color: #0b1320;
  background: #d4af37;
}

.danger-button {
  background: var(--red);
}

.secondary-button,
.text-button {
  color: var(--navy);
  background: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  padding: 0 16px;
}

.text-button,
.icon-button {
  border: 0;
}

.text-button {
  color: #0b1320;
  background: transparent;
}

.statement-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.danger-text-button {
  color: var(--red);
}

.danger-text-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

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

.permission-locked {
  opacity: 0.55;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.summary-grid.compact .metric {
  min-height: 108px;
}

.metric,
.panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  color: var(--blue);
  font-size: 22px;
}

.metric.income strong {
  color: var(--green);
}

.metric.expense strong,
.metric.result.negative strong {
  color: var(--red);
}

.metric.result.positive strong {
  color: var(--green);
}

.panel,
.table-panel {
  margin-bottom: 18px;
  padding: 18px;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

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

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 54px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 28px;
  color: #344054;
  background: transparent;
  font-weight: 800;
}

.tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  background: #fff;
}

.tab[data-account-type="despesa"].active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.tab[data-account-type="centro"].active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab[data-account-type="outros"].active {
  color: #6d36b4;
  border-bottom-color: #6d36b4;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.chart-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chart-title h2 {
  color: var(--green);
  font-size: 22px;
  text-transform: uppercase;
}

.chart-icon.expense-mode + div h2 {
  color: var(--red);
}

.chart-icon.cost-mode + div h2 {
  color: var(--blue);
}

.chart-icon.other-mode + div h2 {
  color: #6d36b4;
}

.chart-title span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.chart-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 24px;
  font-weight: 800;
}

.chart-icon.expense-mode {
  background: var(--red);
}

.chart-icon.cost-mode {
  background: var(--blue);
}

.chart-icon.other-mode {
  background: #6d36b4;
}

.chart-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-actions input {
  width: 360px;
}

.accounts-table {
  min-width: 1180px;
}

.banks-table {
  min-width: 1360px;
}

.invoice-table {
  min-width: 1540px;
}

.partners-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.partners-table th:nth-child(1),
.partners-table td:nth-child(1) { width: 40px; }

.partners-table th:nth-child(2),
.partners-table td:nth-child(2) { width: 30%; }

.partners-table th:nth-child(3),
.partners-table td:nth-child(3) { width: 110px; }

.partners-table th:nth-child(4),
.partners-table td:nth-child(4) { width: 14%; }

.partners-table th:nth-child(5),
.partners-table td:nth-child(5) { width: 22%; }

.partners-table th:nth-child(6),
.partners-table td:nth-child(6) { width: 80px; }

.partners-table th:nth-child(7),
.partners-table td:nth-child(7) { width: 120px; }

.partners-table td:nth-child(2) strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partners-table td:nth-child(4),
.partners-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.partner-filters {
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(170px, 0.7fr));
}

.partner-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #4f2ac7;
  background: #efe9ff;
  font-size: 12px;
  font-weight: 800;
}

.partner-type {
  display: inline-flex;
  min-width: 94px;
  justify-content: center;
  border-radius: 6px;
  padding: 5px 8px;
  color: #4f2ac7;
  background: #f0e9ff;
  font-size: 12px;
  font-weight: 800;
}

.partner-type.cliente {
  color: var(--blue);
  background: var(--soft-blue);
}

.partner-type.colaborador {
  color: #b45309;
  background: #fff2df;
}

.tax-table {
  min-width: 1180px;
}

.irpj-csll-table {
  min-width: 1500px;
}

#taxView .summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tax-rates-table {
  min-width: 760px;
  margin-top: 14px;
}

.tax-rate-form {
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  align-items: end;
}

.tax-quarter-config {
  margin: 12px 0 0;
}

.tax-info-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}

.tax-info-card {
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.tax-info-card p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, max-content);
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  color: var(--muted);
}

.tax-info-card strong {
  max-width: 100%;
  color: var(--navy);
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tax-alert-card {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
}

.tax-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-radius: 8px;
  padding: 14px;
}

.tax-alert strong,
.tax-alert span,
.tax-alert small {
  display: block;
}

.tax-alert span,
.tax-alert small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.tax-alert.success {
  background: var(--soft-green);
}

.tax-alert.success strong:last-child {
  color: var(--green);
}

.tax-alert.danger {
  background: var(--soft-red);
}

.tax-alert.danger strong:last-child {
  color: var(--red);
}

.tax-alert.warning {
  grid-template-columns: 1fr;
  background: #fff6df;
}

.report-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-bottom: 0;
}

.report-tab {
  min-height: 58px;
  border: 1px solid var(--line);
  border-bottom: 0;
  color: #344054;
  background: #fff;
  font-weight: 800;
  text-transform: uppercase;
}

.report-tab.active {
  color: #3b16a3;
  border-top: 3px solid #3b16a3;
  box-shadow: var(--shadow);
}

.report-panel {
  margin-bottom: 18px;
}

.report-filters {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.reports-table {
  min-width: 1660px;
}

.reports-table.receivable-risk-table {
  min-width: 1180px;
}

.receivable-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.receivable-risk-table td,
.receivable-risk-table th {
  white-space: nowrap;
}

.receivable-client-title td {
  padding-top: 18px;
  color: var(--navy);
  background: #fff;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.receivable-client-header td {
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.risk-pill.low {
  color: var(--green);
  background: var(--soft-green);
}

.risk-pill.medium {
  color: #a16207;
  background: #fff6df;
}

.risk-pill.high {
  color: var(--orange);
  background: #fff4e8;
}

.risk-pill.critical {
  color: var(--red);
  background: var(--soft-red);
}

.reports-table td:first-child {
  font-weight: 800;
}

.reports-table tr.report-row-negative td {
  background: var(--soft-red);
}

.reports-table tr.report-row-synthetic td {
  background: #f7f9fc;
  font-weight: 900;
}

.reports-table tr.report-row-synthetic td.report-positive {
  color: var(--navy);
  background: #f7f9fc;
}

.reports-table tr.report-row-calculation td {
  background: #fff8e6;
  color: #8a5b00;
  font-weight: 900;
}

.reports-table .report-indent-1 {
  padding-left: 26px;
}

.reports-table .report-indent-2 {
  padding-left: 42px;
}

.reports-table .report-indent-3 {
  padding-left: 58px;
}

.report-positive {
  color: var(--green);
  background: var(--soft-green);
  font-weight: 800;
}

.report-negative {
  color: var(--red);
  background: var(--soft-red);
  font-weight: 800;
}

.account-group {
  display: inline-flex;
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--blue);
  background: var(--soft-blue);
  font-size: 12px;
  font-weight: 800;
}

.account-nature,
.account-status {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--green);
  background: var(--soft-green);
  font-size: 12px;
  font-weight: 800;
}

.account-nature.expense {
  color: var(--red);
  background: var(--soft-red);
}

.account-nature.synthetic {
  color: #1d2b3a;
  background: #eef2f7;
}

.fixed-account-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  padding: 5px 10px;
  color: #9a6a00;
  background: #fff8df;
  font-size: 12px;
  font-weight: 800;
}

.accounts-table tr.synthetic-row td {
  background: #f7f9fc;
  font-weight: 800;
}

.accounts-table tr.analytic-row td:first-child {
  padding-left: 28px;
}

.account-status.inactive {
  color: var(--red);
  background: var(--soft-red);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.small-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  font-weight: 800;
}

.other-panel {
  display: none;
}

.other-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.other-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.other-card-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 42px;
  color: #fff;
  background: #6d36b4;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.other-card-header input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.other-card-header input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.other-list {
  display: grid;
}

.other-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  text-align: center;
}

.other-actions {
  justify-content: center;
}

.other-row strong {
  font-size: 13px;
  padding: 0 10px;
}

.other-row span {
  color: #344054;
}

.inline-add-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
}


.bank-card {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bank-card small,
.bank-card span {
  display: block;
}

.bank-card small {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.bank-card strong {
  color: var(--navy-2);
  font-size: 18px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  text-transform: none;
}

.table-heading {
  align-items: flex-end;
}

.legend {
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
}

.income-dot {
  background: var(--green);
}

.expense-dot {
  background: var(--red);
}

.table-wrap {
  overflow-x: auto;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}

.table-pagination.hidden {
  display: none;
}

.table-pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-pagination button {
  min-height: 38px;
}

.table-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

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

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

td.number,
th.number {
  text-align: right;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-width: 78px;
  justify-content: center;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.tag.receita {
  color: var(--green);
  background: var(--soft-green);
}

.tag.despesa {
  color: var(--red);
  background: var(--soft-red);
}

.tag.transferencia {
  color: var(--blue);
  background: var(--soft-blue);
}

.status.pago {
  color: var(--green);
  background: var(--soft-green);
}

.status.pendente {
  color: var(--orange);
  background: #fff4e8;
}

.status.vencido {
  color: var(--red);
  background: var(--soft-red);
}

.status-select {
  min-height: 30px;
  min-width: 110px;
  border: 0;
  border-radius: 6px;
  padding: 5px 28px 5px 9px;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.status-select.pago {
  color: var(--green);
  background: var(--soft-green);
}

.status-select.pendente {
  color: var(--orange);
  background: #fff4e8;
}

.status-select.vencido {
  color: var(--red);
  background: var(--soft-red);
}

.entry-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100vh - 36px);
  border: 1px solid #e6e9ef;
  border-radius: 10px;
  padding: 0;
  background: #fff;
  box-shadow: 0 22px 80px rgba(11, 19, 32, 0.22);
  overflow: auto;
}

.entry-dialog::backdrop {
  background: rgba(11, 19, 32, 0.42);
}

.entry-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  color: #0b1320;
  background: #f5f7fa;
}

.full {
  width: 100%;
  margin-top: 4px;
}

.attachment-dialog {
  width: min(620px, calc(100% - 28px));
}

.attachment-list {
  display: grid;
  gap: 10px;
}

.attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.attachment-preview-link {
  overflow: hidden;
  color: #0b1320;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-empty,
.attachment-hint {
  margin: 0;
  color: #5f6b7a;
  font-size: 13px;
}

.attachment-button {
  white-space: nowrap;
}

/* Paleta GestoraPro nas telas internas. A tela de Inicio mantem o visual proprio do painel gerencial. */
.view:not(#homeView) {
  --brand-navy: #0b1320;
  --brand-navy-2: #1d2b3a;
  --brand-gold: #d4af37;
  --brand-bg: #ffffff;
  --brand-soft: #f5f7fa;
  --brand-line: #e6e9ef;
  --brand-ink: #0b1320;
  --brand-muted: #5f6b7a;
  color: var(--brand-ink);
  min-height: calc(100vh - 56px);
  background: #fff;
}

.view:not(#homeView) .topbar {
  border-bottom: 1px solid var(--brand-line);
  padding-bottom: 18px;
}

.view:not(#homeView) .eyebrow,
.view:not(#homeView) .page-subtitle {
  color: var(--brand-muted);
}

.view:not(#homeView) .eyebrow {
  color: var(--brand-gold);
}

.view:not(#homeView) h1,
.view:not(#homeView) h2 {
  color: var(--brand-navy);
}

.view:not(#homeView) .panel,
.view:not(#homeView) .table-panel,
.view:not(#homeView) .report-panel,
.view:not(#homeView) .tax-simple-panel,
.view:not(#homeView) .economic-calendar-panel,
.view:not(#homeView) .bank-panel {
  border: 1px solid var(--brand-line);
  background: var(--brand-bg);
  box-shadow: 0 10px 26px rgba(11, 19, 32, 0.06);
}

.view:not(#homeView) .summary-grid .metric,
.view:not(#homeView) .metric,
.view:not(#homeView) .bank-card,
.view:not(#homeView) .home-finance-card,
.view:not(#homeView) .match-card {
  border: 1px solid var(--brand-line);
  border-top: 3px solid var(--brand-gold);
  background: var(--brand-bg);
  box-shadow: 0 8px 22px rgba(11, 19, 32, 0.05);
}

.view:not(#homeView) .metric span,
.view:not(#homeView) .bank-card span,
.view:not(#homeView) .section-heading span,
.view:not(#homeView) label {
  color: var(--brand-muted);
}

.view:not(#homeView) .metric strong,
.view:not(#homeView) .bank-card strong {
  color: var(--brand-navy);
}

.view:not(#homeView) input,
.view:not(#homeView) select,
.view:not(#homeView) textarea {
  border-color: var(--brand-line);
  color: var(--brand-navy);
  background: #fff;
}

.view:not(#homeView) input:focus,
.view:not(#homeView) select:focus,
.view:not(#homeView) textarea:focus {
  border-color: var(--brand-gold);
  outline: 2px solid rgba(212, 175, 55, 0.18);
}

.view:not(#homeView) table th,
.view:not(#homeView) .reports-table th,
.view:not(#homeView) .budget-table th,
.view:not(#homeView) .reconciliation-table th,
.view:not(#homeView) .tax-table th,
.view:not(#homeView) .users-table th,
.view:not(#homeView) .invoice-table th,
.view:not(#homeView) .partners-table th {
  color: #fff;
  background: var(--brand-navy);
}

.view:not(#homeView) table td {
  border-color: var(--brand-line);
}

.view:not(#homeView) tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.view:not(#homeView) .primary-button,
.view:not(#homeView) .success-button {
  border: 1px solid var(--brand-navy);
  color: #fff;
  background: var(--brand-navy);
}

.view:not(#homeView) .secondary-button,
.view:not(#homeView) .text-button,
.view:not(#homeView) .small-action,
.view:not(#homeView) .icon-button {
  border-color: var(--brand-line);
  color: var(--brand-navy);
  background: #fff;
}

.view:not(#homeView) .danger-button {
  border: 1px solid #ef233c;
  color: #fff;
  background: #ef233c;
}

.view:not(#homeView) .report-tab,
.view:not(#homeView) .tab {
  border-color: var(--brand-line);
  color: var(--brand-navy);
  background: #fff;
}

.view:not(#homeView) .report-tab.active,
.view:not(#homeView) .tab.active {
  border-top-color: var(--brand-gold);
  color: var(--brand-navy);
  background: #fff;
  box-shadow: inset 0 3px 0 var(--brand-gold);
}

.view:not(#homeView) .account-icon,
.view:not(#homeView) .bottom-icon,
.view:not(#homeView) .calendar-row i {
  border-color: var(--brand-gold);
  color: var(--brand-gold);
  background: #fff;
}

.view:not(#homeView) .account-group,
.view:not(#homeView) .account-nature,
.view:not(#homeView) .tag,
.view:not(#homeView) .budget-status,
.view:not(#homeView) .reconciliation-status,
.view:not(#homeView) .account-status {
  border-radius: 999px;
}

.view:not(#homeView) .other-grid-header,
.view:not(#homeView) .other-table-title {
  color: #fff;
  background: var(--brand-navy);
}

.view:not(#homeView) .calendar-weekday,
.view:not(#homeView) .calendar-day-header {
  color: var(--brand-navy);
  background: var(--brand-soft);
}

.view:not(#homeView) .calendar-day.today .calendar-day-header {
  background: #fff4d2;
}

.view:not(#homeView) .selected-row td {
  background: #fff8e1 !important;
}

/* Ajuste fino da tela de Cadastros para manter a leitura operacional das abas. */
#chartView .success-button,
#chartView #openRevenueDialog.success-button {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

#chartView .danger-button,
#chartView #openRevenueDialog.danger-button {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

#chartView #newCostCenterAccount,
#chartView #openRevenueDialog.primary-button {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

#chartView .top-actions .success-button,
#chartView .top-actions .danger-button,
#chartView .top-actions .primary-button {
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  line-height: 1.2;
}

#chartView .tabs {
  border-bottom-color: var(--line);
  background: #fff;
}

#chartView .tab {
  color: #344456;
  background: #fff;
  box-shadow: none;
}

#chartView .tab.active {
  background: #fff;
  box-shadow: none;
}

#chartView .tab[data-account-type="receita"].active {
  color: var(--green);
  border-bottom-color: var(--green);
}

#chartView .tab[data-account-type="despesa"].active {
  color: var(--red);
  border-bottom-color: var(--red);
}

#chartView .tab[data-account-type="centro"].active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

#chartView .tab[data-account-type="outros"].active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

#chartView .chart-title h2 {
  color: var(--green);
}

#chartView .chart-icon {
  color: #fff;
  background: var(--green);
}

#chartView .chart-icon.expense-mode {
  background: var(--red);
}

#chartView .chart-icon.cost-mode {
  background: var(--blue);
}

#chartView .chart-icon.other-mode {
  color: #fff;
  background: var(--navy);
}

#chartView .chart-icon.expense-mode + div h2 {
  color: var(--red);
}

#chartView .chart-icon.cost-mode + div h2 {
  color: var(--blue);
}

#chartView .chart-icon.other-mode + div h2 {
  color: var(--navy);
}

#chartView .other-card {
  border-color: var(--line);
  background: #fff;
}

#chartView .other-card-header {
  color: #fff;
  background: var(--navy);
}

#chartView .other-card-header input {
  color: #fff;
  background: transparent;
}

#chartView .other-card-header input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

#chartView .other-row strong,
#chartView .other-row span {
  color: var(--navy);
}

#chartView .inline-add-form .primary-button {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

@media (max-width: 1100px) {
  .sidebar {
    position: static;
    width: 100%;
  }

  .menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app {
    width: 100%;
    margin-left: 0;
  }

  .summary-grid,
  .analysis-kpis,
  .bank-grid,
  .economic-calendar-summary,
  .receivable-summary-grid,
  .home-kpi-row,
  .home-finance-row,
  .home-analytics-grid,
  .home-small-charts,
  .home-bottom-strip,
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-executive-top,
  .home-filter-row,
  .assistant-analysis-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 18px;
  }

  .topbar,
  .top-actions,
  .section-heading,
  .legend,
  .chart-header,
  .chart-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-actions input {
    width: 100%;
  }

    .menu,
    .summary-grid,
    .analysis-kpis,
    .bank-grid,
    .economic-calendar-summary,
    .receivable-summary-grid,
  .filters,
  .other-grid,
  .report-filters,
  .tax-rate-form,
    .tax-info-grid,
    .home-kpi-row,
    .home-finance-row,
    .home-analytics-grid,
    .home-small-charts,
    .home-bottom-strip,
    .home-donut-panel,
    .assistant-layout,
    .training-layout,
    .support-layout,
    .platform-layout,
    .assistant-analysis-form {
    grid-template-columns: 1fr;
  }

  .home-executive-dashboard {
    padding: 16px;
  }

  .economic-calendar-grid {
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    overflow-x: auto;
  }

  .home-executive-top,
  .home-top-actions,
  .home-brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    display: flex;
  }

  .home-bottom-strip div {
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  }

  .home-bottom-strip div:last-child {
    border-bottom: 0;
  }
}

@media print {
  body.printing-home-dashboard {
    background: #fff;
  }

  body.printing-home-dashboard .sidebar,
  body.printing-home-dashboard .view:not(#homeView),
  body.printing-home-dashboard .home-filter-row,
  body.printing-home-dashboard .home-top-actions {
    display: none !important;
  }

  body.printing-home-dashboard .app {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  body.printing-home-dashboard #homeView {
    display: block !important;
  }

  body.printing-home-dashboard .home-executive-dashboard {
    min-height: auto;
    border-radius: 0;
    padding: 14px;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.printing-home-dashboard .home-executive-top {
    grid-template-columns: 1fr;
  }

  body.printing-home-dashboard .home-kpi-card,
  body.printing-home-dashboard .home-finance-card,
  body.printing-home-dashboard .home-dashboard-panel,
  body.printing-home-dashboard .home-bottom-strip {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* ── Chat Assistente Flutuante ─────────────────────────────────── */
.float-chat-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b75d0, #0d2844);
  color: #fff;
  box-shadow: 0 6px 24px rgba(13, 40, 68, 0.38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.float-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(13, 40, 68, 0.5);
}

.float-chat-toggle .material-icons-round {
  font-size: 26px;
}

.float-chat {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 200;
  width: 380px;
  max-height: 540px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
}

.float-chat.hidden {
  display: none;
}

.float-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0d2844, #1b75d0);
  color: #fff;
}

.float-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.float-chat-title .material-icons-round {
  font-size: 22px;
  color: #d4af37;
}

.float-chat-title strong {
  display: block;
  font-size: 14px;
}

.float-chat-title small {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.float-chat-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.float-chat-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.float-chat-close .material-icons-round {
  font-size: 18px;
}

.float-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f4f7fb;
}

.chat-bubble {
  max-width: 88%;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-bubble p {
  margin: 0 0 6px;
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble ul {
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.chat-bubble ul li {
  margin-bottom: 3px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: #1b75d0;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: #fff;
  color: #162033;
  border: 1px solid #d9e2ec;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-bubble.assistant.error {
  background: #ffecee;
  border-color: #ffc5cb;
  color: #c0002a;
}

/* Typing indicator */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.chat-typing span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #667085;
  animation: chatTyping 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTyping {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.float-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #d9e2ec;
  background: #fff;
}

.float-chat-input input {
  flex: 1;
  min-height: 38px;
  border: 1px solid #d9e2ec;
  border-radius: 20px;
  padding: 0 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s;
}

.float-chat-input input:focus {
  border-color: #1b75d0;
}

.float-chat-input input:disabled {
  background: #f4f7fb;
}

.float-chat-input button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #1b75d0;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s;
}

.float-chat-input button:hover {
  background: #1561b0;
}

.float-chat-input button .material-icons-round {
  font-size: 18px;
}

/* ── Import bar (barra de arquivo selecionado) ─────────────────── */
.float-chat-attach {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}

.float-chat-attach:hover {
  background: var(--soft-blue);
  color: var(--blue);
}

.float-chat-attach .material-icons-round {
  font-size: 18px;
}

.float-chat-import-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--soft-blue);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.float-chat-import-bar .material-icons-round {
  font-size: 18px;
  color: var(--blue);
  flex-shrink: 0;
}

.float-import-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
}

.float-chat-import-bar select {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 11px;
  background: #fff;
}

.float-import-send {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.float-import-send .material-icons-round { font-size: 16px; }

.float-import-cancel {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.float-import-cancel .material-icons-round { font-size: 16px; }

/* ── Preview de importação no chat ─────────────────────────────── */
.import-preview {
  font-size: 13px;
}

.import-preview-title {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.import-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}

.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.import-preview-table th {
  padding: 6px 10px;
  background: var(--soft-blue);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.import-preview-table td {
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.import-status-badge.pago {
  background: var(--soft-green);
  color: var(--green);
}

.import-status-badge.pendente {
  background: #fff8e6;
  color: var(--orange);
}

.import-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.import-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  min-height: 34px;
  padding: 0 14px;
}

.import-cancel-btn {
  font-size: 13px;
  min-height: 34px;
  padding: 0 14px;
}
