/* Finexis - identidade: vermelho #EA0032, neutros, sem azul como UI primária. */
:root{
  --finexis-red:#EA0032;
  --finexis-positive:#198754;
  --finexis-negative:#EA0032;
  --orange:#EA0032;
  --orange-light:#fff0f3;
  --green:#198754;
  --green-soft:#e5f4ec;
  --red:#EA0032;
  --red-soft:#ffe9ed;
  --blue:#666970;
  --blue-soft:#f1f1f3;
  --ink:#27282c;
}
.rail,html[data-theme="dark"] .rail{background:#111214!important}
.rail .brandmark{background:transparent!important}
.rail .brand-icon{
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
}
.rail .brand-icon img.finexis-icon{
  width:35px!important;
  height:35px!important;
  max-width:35px!important;
  max-height:35px!important;
  object-fit:contain;
  filter:none!important;
  background:transparent!important;
}
.rail .brand-emblem{
  width:126px!important;
  background:transparent!important;
  border:none!important;
  box-shadow:none!important;
}
.rail .brand-emblem img.finexis-logo{
  width:119px!important;
  max-width:119px!important;
  height:auto!important;
  max-height:35px!important;
  object-fit:contain;
  filter:none!important;
  background:transparent!important;
}
.finexis-icon-white,.finexis-logo-white{display:none!important}
.finexis-icon-original,.finexis-logo-original{display:block!important}
html[data-theme="dark"] .finexis-icon-white,
html[data-theme="dark"] .finexis-logo-white{display:block!important}
html[data-theme="dark"] .finexis-icon-original,
html[data-theme="dark"] .finexis-logo-original{display:none!important}
.rail .nav-indicator::before{background:#EA0032!important}
.rail .nav-btn:hover:not(.active){background:transparent;color:#fff}
.rail .nav-btn:hover:not(.active) .nav-label{font-weight:650}
.rail .nav-btn.active::before{background:#EA0032}
.rail .profile-btn:hover{background:#252629}
.theme-option[aria-pressed="true"]{
  color:#303136!important;
  background:#e8e8ea!important;
}
.theme-option:hover{background:#efeff1;color:#252629}
html[data-theme="dark"] .theme-option[aria-pressed="true"]{
  color:#fff!important;
  background:#414247!important;
}
html[data-theme="dark"] .theme-option:hover{background:#36373b;color:#fff}

/* CTAs em grafite: o vermelho é detalhe de marca, não ruído visual. */
.btn:not(.secondary),.btn:not(.secondary):visited{
  background:#35363b!important;
  color:#fff!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
.btn:not(.secondary):hover{background:#232428!important}
html[data-theme="dark"] .btn:not(.secondary){
  background:#4a4b50!important;
  color:#f8f8fa!important;
}
html[data-theme="dark"] .btn:not(.secondary):hover{background:#5d5e64!important}
.btn.secondary{color:#34353a}
.nav-indicator,.btn,.stat-card{box-shadow:none}
.eyebrow{color:#bc0029}
html[data-theme="dark"] .eyebrow{color:#ff5d7d}
.welcome{
  background:#ececee!important;
  border-color:#dedee1!important;
}
.stat-card.orange-wash{
  background:#f4f4f5!important;
  border-color:#dedee1!important;
}
.stat-card.dark{
  background:#34353a!important;
  border-color:#414249!important;
}
.stat-card.dark .stat-label,
.stat-card.dark .stat-desc,
.stat-card.dark .stat-num{color:#f6f6f7}
.stat-card .stat-icon,.mini-metric .metric-icon,
.metric-icon.purple,.metric-icon.gray{
  background:#f0f0f2!important;
  color:#565860!important;
}
.stat-card.dark .stat-icon{
  background:#4a4b50!important;
  color:#e7e7ea!important;
}
html[data-theme="dark"] .welcome{
  background:#202124!important;
  border-color:#38393d!important;
}
html[data-theme="dark"] .stat-card.orange-wash,
html[data-theme="dark"] .stat-card.dark{
  background:#292a2e!important;
  border-color:#424348!important;
}
html[data-theme="dark"] .stat-card .stat-icon,
html[data-theme="dark"] .mini-metric .metric-icon,
html[data-theme="dark"] .metric-icon.purple,
html[data-theme="dark"] .metric-icon.gray{
  background:#34353a!important;
  color:#d7d7db!important;
}
html[data-theme="dark"] .stat-card.dark .stat-label,
html[data-theme="dark"] .stat-card.dark .stat-desc,
html[data-theme="dark"] .stat-card.dark .stat-num{color:#f4f4f6!important}

/* Semântica financeira: positivo verde, negativo vermelho; zero neutro. */
.fin-positive,.fin-positive .stat-num,
.fin-positive .metric-info strong,.fin-positive .money,
.fin-positive .stat-icon,
.fin-positive .metric-icon{color:#198754!important}
.fin-negative,.fin-negative .stat-num,
.fin-negative .metric-info strong,.fin-negative .money,
.fin-negative .stat-icon,
.fin-negative .metric-icon{color:#d70b37!important}
.fin-zero,.fin-zero .stat-num,.fin-zero .metric-info strong{color:inherit}
html[data-theme="dark"] .fin-positive,
html[data-theme="dark"] .fin-positive .stat-num,
html[data-theme="dark"] .fin-positive .metric-info strong,
html[data-theme="dark"] .fin-positive .money,
html[data-theme="dark"] .fin-positive .metric-icon,
html[data-theme="dark"] .fin-positive .stat-icon{color:#50ca94!important}
html[data-theme="dark"] .fin-negative,
html[data-theme="dark"] .fin-negative .stat-num,
html[data-theme="dark"] .fin-negative .metric-info strong,
html[data-theme="dark"] .fin-negative .money,
html[data-theme="dark"] .fin-negative .metric-icon,
html[data-theme="dark"] .fin-negative .stat-icon{color:#ff5678!important}
.fin-positive .stat-icon,.fin-positive .metric-icon{background:#e4f4e9!important}
.fin-negative .stat-icon,.fin-negative .metric-icon{background:#ffedf0!important}
html[data-theme="dark"] .fin-positive .stat-icon,
html[data-theme="dark"] .fin-positive .metric-icon{background:#244238!important}
html[data-theme="dark"] .fin-negative .stat-icon,
html[data-theme="dark"] .fin-negative .metric-icon{background:#482b34!important}
.status.matched{
  background:#e2f5eb!important;
  color:#117747!important;
}
.status.review{
  background:#fff0f2!important;
  color:#c9002c!important;
}
html[data-theme="dark"] .status.matched{
  background:#223d31!important;
  color:#64d99e!important;
}
html[data-theme="dark"] .status.review{
  background:#452830!important;
  color:#ff8097!important;
}
.review-highlight{
  background:#f8f0f1!important;
  border-color:#f0d8dc!important;
}
html[data-theme="dark"] .review-highlight{
  background:#302328!important;
  border-color:#513139!important;
}
html[data-theme="dark"] .review-highlight p{color:#d9bdc5}
input:focus-visible,select:focus-visible,textarea:focus-visible,
button:focus-visible{
  outline-color:#EA0032!important;
}
.auth-card .auth-brand span{
  background:transparent!important;
  box-shadow:none;
  padding:0!important;
}
.auth-card .auth-brand .finexis-auth-icon{
  display:block;
  width:38px;
  height:38px;
  object-fit:contain;
}
.auth-card .auth-brand .finexis-auth-icon-white{display:none}
html[data-theme="dark"] .auth-card .auth-brand .finexis-auth-icon-color{display:none}
html[data-theme="dark"] .auth-card .auth-brand .finexis-auth-icon-white{display:block}
html[data-theme="dark"] .auth-card .auth-brand{color:#f2f2f4}
/* Os indicadores IN/OUT representam tipos, não certificam lucro. */
.financial-in{color:#198754!important}
.financial-out{color:#d70b37!important}
html[data-theme="dark"] .financial-in{color:#50ca94!important}
html[data-theme="dark"] .financial-out{color:#ff5678!important}

/* Identificadores de usuário e foco seguem a base neutra. */
.user-chip .avatar,.rail .profile-btn .avatar{
  background:#ebebed!important;
  color:#303136!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .user-chip .avatar,
html[data-theme="dark"] .rail .profile-btn .avatar{
  background:#38393e!important;
  color:#f2f2f4!important;
}
.finexis-brand-mark{color:#EA0032}
.notification-popover .btn{background:#35363b!important}
input:focus,select:focus,textarea:focus{border-color:#b9babf}
.auth-card .back-btn{color:#EA0032!important}


/* Finexis: superfícies limpas, sem contornos, fios ou sombras em cards. */
.welcome,
.panel,
.stat-card,
.mini-metric,
.table-panel,
.summary-box,
.account-card,
.settings-box,
.report-card,
.analytics,
.upload-zone,
.instructions,
.review-highlight,
.notification-popover,
.auth-card,
.finexis-dialog {
  border:0!important;
  box-shadow:none!important;
}
.data-table thead,
.data-table th,
.data-table td,
.data-table tbody tr,
.data-table tbody tr td,
.account-pair,
.switch-row,
.table-footer,
.table-title,
.analytics-top,
.section-head,
.rail .rail-bottom,
.top-divider,
.notification-popover hr{
  border:0!important;
  box-shadow:none!important;
}
.data-table th,
.data-table thead{
  background:transparent!important;
}
.table-panel{overflow:hidden}
.theme-switcher{border:0!important}
html[data-theme="dark"] .welcome,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .mini-metric,
html[data-theme="dark"] .analytics,
html[data-theme="dark"] .summary-box,
html[data-theme="dark"] .table-panel,
html[data-theme="dark"] .settings-box,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .notification-popover{
  border:0!important;
  box-shadow:none!important;
}

/* Configurações: seleção integral, sem indicador móvel recortado no fim da lista. */
.rail .nav-list:has(.settings-nav.active) .nav-indicator{
  opacity:0!important;
  pointer-events:none;
}
.rail .settings-nav.active,
.rail .settings-nav.active:hover{
  background:#f3f3f4!important;
  color:#111214!important;
  border:0!important;
  border-radius:11px!important;
  box-shadow:none!important;
  overflow:hidden;
}
.rail .settings-nav.active .ph,
.rail .settings-nav.active .nav-label{color:#111214!important}
.rail .settings-nav.active::before{
  content:""!important;
  display:block!important;
  position:absolute;
  left:0;
  top:9px;
  bottom:9px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:#EA0032!important;
  z-index:2;
}
.rail .nav-indicator{transition:transform .53s cubic-bezier(.19,1,.22,1),width .35s cubic-bezier(.19,1,.22,1),height .35s cubic-bezier(.19,1,.22,1),opacity .16s ease}
html[data-theme="dark"] .rail .settings-nav.active,
html[data-theme="dark"] .rail .settings-nav.active:hover{
  background:#ededee!important;
  color:#111214!important;
}
#notification-slot:empty{display:none}
.notification-popover{z-index:25}
@media(prefers-reduced-motion:reduce){
  .rail .nav-indicator{transition:none!important}
}
