
/* =========================================================
   FINANCE APP — IDENTIDADE VISUAL MODERNA
   Somente visual. Não altera regras de negócio.
   ========================================================= */

*{
  box-sizing:border-box;
}

:root{
  --navy:#0f1d2d;
  --navy-2:#15263a;
  --blue:#1769e0;
  --blue-2:#0f5bd7;
  --blue-soft:#eaf2ff;
  --text:#17233f;
  --muted:#667792;
  --border:#e6ebf2;
  --bg:#f5f8fc;
  --white:#ffffff;
  --green:#0b8a57;
  --red:#d92d20;
  --shadow:0 8px 24px rgba(15,29,45,.07);
  --shadow-soft:0 3px 12px rgba(15,29,45,.06);
}

html,
body{
  margin:0;
  min-height:100%;
}

body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at 85% 5%,rgba(23,105,224,.07),transparent 28%),
    linear-gradient(180deg,#f8faff 0%,var(--bg) 100%);
  color:var(--text);
  font-size:14px;
}

/* =========================================================
   ESTRUTURA
   ========================================================= */

.layout{
  display:flex;
  min-height:100vh;
  width:100%;
}

.side{
  width:226px;
  min-width:226px;
  min-height:100vh;
  background:linear-gradient(180deg,#0d1b2a 0%,#122438 100%);
  color:#fff;
  padding:22px 14px;
  box-shadow:8px 0 28px rgba(15,29,45,.08);
  position:sticky;
  top:0;
  align-self:flex-start;
}

.main{
  flex:1;
  width:calc(100% - 226px);
  max-width:none;
  padding:30px 34px 50px;
  min-width:0;
}

.brand{
  font-size:21px;
  font-weight:800;
  letter-spacing:-.02em;
  margin:2px 8px 28px;
  color:#fff;
}

.nav{
  display:grid;
  gap:6px;
}

.nav button{
  border:1px solid transparent;
  background:transparent;
  color:#c8d3df;
  text-align:left;
  padding:11px 12px;
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
  font-weight:500;
  transition:.18s ease;
}

.nav button:hover{
  background:rgba(255,255,255,.07);
  color:#fff;
}

.nav button.active{
  background:linear-gradient(90deg,#1769e0,#155bd0);
  color:#fff;
  box-shadow:0 6px 16px rgba(23,105,224,.25);
}

/* =========================================================
   CABEÇALHOS
   ========================================================= */

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:24px;
}

.top h1,
h1{
  color:#101f45;
  letter-spacing:-.035em;
}

h2{
  color:#14234b;
  letter-spacing:-.025em;
}

h3{
  color:#18294e;
  letter-spacing:-.015em;
}

.muted{
  color:var(--muted);
  font-size:13px;
}

.spacer{
  height:18px;
}

/* =========================================================
   CARDS GERAIS
   ========================================================= */

.card{
  background:rgba(255,255,255,.96);
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px;
  box-shadow:var(--shadow-soft);
}

.card:hover{
  box-shadow:var(--shadow);
}

.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

/* =========================================================
   BOTÕES
   ========================================================= */

.btn{
  border:0;
  background:linear-gradient(135deg,var(--blue),var(--blue-2));
  color:#fff;
  border-radius:9px;
  padding:10px 15px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  box-shadow:0 4px 10px rgba(23,105,224,.16);
  transition:.18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 7px 16px rgba(23,105,224,.22);
}

.btn.secondary{
  background:#eef3f9;
  color:#243858;
  box-shadow:none;
}

.btn.secondary:hover{
  background:#e4ebf4;
  box-shadow:none;
}

.btn.danger{
  background:#d92d20;
  box-shadow:none;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* =========================================================
   FORMULÁRIOS
   ========================================================= */

.form{
  display:grid;
  gap:14px;
  max-width:560px;
}

.input,
select,
textarea{
  padding:11px 13px;
  border:1px solid #d5dde8;
  background:#fff;
  color:#18263f;
  border-radius:9px;
  font-size:14px;
  width:100%;
  outline:none;
  transition:.16s ease;
}

.input:focus,
select:focus,
textarea:focus{
  border-color:#6da0ef;
  box-shadow:0 0 0 3px rgba(23,105,224,.10);
}

/* =========================================================
   TABELAS
   ========================================================= */

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin-top:14px;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
}

.table th{
  padding:13px 14px;
  background:#f7f9fc;
  color:#52627a;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.035em;
  border-bottom:1px solid var(--border);
}

.table td{
  padding:13px 14px;
  border-bottom:1px solid #edf1f5;
  color:#273650;
}

.table tbody tr:last-child td{
  border-bottom:0;
}

.table tbody tr:hover{
  background:#fafcff;
}

/* =========================================================
   CONTAS DO DASHBOARD
   ========================================================= */

.dashboard-section{
  margin-top:24px;
}

.dashboard-account-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.dashboard-account-card{
  padding:18px;
  min-width:0;
  border-radius:16px;
  transition:.18s ease;
}

.dashboard-account-card:hover{
  transform:translateY(-2px);
}

.dashboard-account-card-head{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.dashboard-account-card-head>div:last-child{
  min-width:0;
  overflow:hidden;
}

.dashboard-account-card-head strong,
.dashboard-account-card-head .muted{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dashboard-account-logo,
.dashboard-account-logo-fallback{
  width:44px;
  height:44px;
  flex:0 0 44px;
  border-radius:11px;
}

.dashboard-account-logo{
  object-fit:contain;
  background:#fff;
  padding:5px;
  border:1px solid #eef1f5;
}

.dashboard-account-logo-fallback{
  display:grid;
  place-items:center;
  background:#f0f4f9;
  font-size:18px;
}

.dashboard-account-balance{
  margin-top:17px;
  font-size:22px;
  font-weight:800;
  line-height:1.2;
  color:#13244b;
}

/* =========================================================
   RESUMO FINANCEIRO
   ========================================================= */

.dashboard-summary,
.dashboard-metrics{
  gap:18px;
}

.money{
  font-size:29px;
  font-weight:800;
  color:#13244b;
  letter-spacing:-.025em;
}

/* =========================================================
   CARTÕES
   ========================================================= */

.dashboard-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.credit-card-widget{
  background:
    radial-gradient(circle at 88% 8%,rgba(23,105,224,.28),transparent 35%),
    linear-gradient(145deg,#101c2b 0%,#172b41 100%);
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:21px;
  min-height:292px;
  box-shadow:0 12px 28px rgba(15,29,45,.16);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  position:relative;
}

.credit-card-widget:after{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  right:-70px;
  bottom:-90px;
  border-radius:50%;
  background:rgba(255,255,255,.045);
  pointer-events:none;
}

.credit-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  position:relative;
  z-index:1;
}

.credit-card-brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.credit-card-brand img,
.credit-card-logo-fallback{
  width:42px;
  height:42px;
  border-radius:10px;
  background:#fff;
  object-fit:contain;
  padding:5px;
}

.credit-card-logo-fallback{
  display:grid;
  place-items:center;
  padding:0;
  font-size:20px;
  color:#17233f;
}

.credit-card-network{
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.20);
  padding:5px 9px;
  border-radius:999px;
}

.credit-card-widget .muted{
  color:#b7c5d4;
}

.credit-card-number{
  font-size:17px;
  letter-spacing:.12em;
  margin-top:14px;
}

.credit-card-invoice{
  margin-top:23px;
}

.credit-card-invoice-value{
  font-size:27px;
  font-weight:800;
  margin:4px 0;
}

.card-overdue{
  color:#ffb4ae;
  font-weight:800;
  margin-right:4px;
}

.credit-card-limit-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:auto;
  padding-top:22px;
}

.credit-card-limit-row div{
  display:grid;
  gap:4px;
}

.credit-card-limit-row strong{
  font-size:13px;
}

.credit-card-progress{
  height:7px;
  background:rgba(255,255,255,.18);
  border-radius:999px;
  overflow:hidden;
  margin-top:14px;
}

.credit-card-progress>div{
  height:100%;
  background:#fff;
  border-radius:999px;
}

.credit-card-progress-label{
  margin-top:6px;
  font-size:11px;
}

.dashboard-empty{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

/* =========================================================
   LOGIN
   ========================================================= */

.login{
  min-height:100vh;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 20% 20%,rgba(23,105,224,.12),transparent 30%),
    linear-gradient(135deg,#f3f7fc,#eaf0f7);
}

.login .box{
  width:min(430px,92vw);
  box-shadow:0 18px 45px rgba(15,29,45,.12);
}

/* =========================================================
   ALERTAS
   ========================================================= */

.alert{
  padding:11px 13px;
  background:#fff1f0;
  color:#9f1c14;
  border:1px solid #ffd4d0;
  border-radius:9px;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media(max-width:1200px){
  .dashboard-account-cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .dashboard-cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .side{
    width:82px;
    min-width:82px;
    padding:18px 8px;
  }

  .brand{
    font-size:0;
    text-align:center;
    margin:2px 0 24px;
  }

  .brand:after{
    content:'₣';
    font-size:25px;
  }

  .nav button{
    font-size:0;
    text-align:center;
    padding:11px 8px;
  }

  .nav button:before{
    content:'•';
    font-size:20px;
  }

  .main{
    width:calc(100% - 82px);
    padding:22px;
  }
}

@media(max-width:700px){
  .main{
    padding:16px;
  }

  .top{
    align-items:flex-start;
    flex-direction:column;
  }

  .dashboard-account-cards,
  .dashboard-cards,
  .grid{
    grid-template-columns:1fr;
  }

  .credit-card-limit-row{
    grid-template-columns:repeat(3,1fr);
  }

  .dashboard-empty{
    align-items:flex-start;
    flex-direction:column;
  }

  .table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
  }
}

@media(max-width:480px){
  .side{
    width:64px;
    min-width:64px;
  }

  .main{
    width:calc(100% - 64px);
    padding:12px;
  }

  .card{
    padding:15px;
    border-radius:13px;
  }

  .credit-card-widget{
    min-height:270px;
    padding:17px;
  }
}


/* =========================================================
   MEUS CARTÕES — VISUAL PREMIUM
   ========================================================= */

.dashboard-cards{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:16px !important;
  width:100% !important;
}

.credit-card-widget{
  position:relative !important;
  min-height:214px !important;
  height:214px !important;
  padding:16px 18px !important;
  border-radius:17px !important;
  color:#fff !important;
  overflow:hidden !important;
  border:1px solid rgba(255,255,255,.14) !important;
  box-shadow:0 12px 28px rgba(13,31,51,.22) !important;
  display:flex !important;
  flex-direction:column !important;
  isolation:isolate !important;
}

/* Identidade dos cartões */
.credit-card-widget:nth-child(3n+1){
  background:
    radial-gradient(ellipse 90% 115% at 108% 4%,rgba(235,43,58,.92),transparent 52%),
    radial-gradient(ellipse 75% 90% at -5% 105%,rgba(104,13,27,.55),transparent 58%),
    linear-gradient(135deg,#07111b 0%,#14212e 52%,#360c15 100%) !important;
}

.credit-card-widget:nth-child(3n+2){
  background:
    radial-gradient(ellipse 90% 115% at 108% 4%,rgba(37,128,238,.94),transparent 53%),
    radial-gradient(ellipse 75% 90% at -5% 105%,rgba(0,79,173,.55),transparent 58%),
    linear-gradient(135deg,#061421 0%,#0d3765 55%,#071b31 100%) !important;
}

.credit-card-widget:nth-child(3n){
  background:
    radial-gradient(ellipse 90% 115% at 108% 4%,rgba(239,48,52,.94),transparent 53%),
    radial-gradient(ellipse 75% 90% at -5% 105%,rgba(122,0,0,.55),transparent 58%),
    linear-gradient(135deg,#090f16 0%,#2b0b0d 54%,#430b0c 100%) !important;
}

/* =========================================================
   DETALHE GRÁFICO — FAIXAS CURVAS VISÍVEIS
   ========================================================= */

/* V7 — composição gráfica mais próxima de cartões premium:
   faixas curvas centrais, paralelas e com contraste suficiente
   para continuarem visíveis sobre o fundo escuro. */

.credit-card-widget:nth-child(3n+1){
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22700%22%20height%3D%22330%22%20viewBox%3D%220%200%20700%20330%22%3E%0A%3Cdefs%3E%0A%20%20%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%221%22%20x2%3D%221%22%20y2%3D%220%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ff3f5c%22%20stop-opacity%3D%22.42%22/%3E%0A%20%20%20%20%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23ffb1bb%22%20stop-opacity%3D%22.30%22/%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ff3f5c%22%20stop-opacity%3D%22.10%22/%3E%0A%20%20%3C/linearGradient%3E%0A%3C/defs%3E%0A%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M-90%20325%20C95%20276%20150%20190%20275%20112%20C382%2045%20510%2022%20805%2056%22%0A%20%20%20%20%20%20%20%20stroke%3D%22url%28%23g%29%22%20stroke-width%3D%2230%22/%3E%0A%20%20%3Cpath%20d%3D%22M-88%20342%20C104%20291%20165%20205%20289%20127%20C396%2060%20527%2039%20815%2073%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23ffb1bb%22%20stroke-opacity%3D%22.44%22%20stroke-width%3D%2210%22/%3E%0A%20%20%3Cpath%20d%3D%22M-82%20360%20C112%20307%20179%20222%20301%20144%20C410%2077%20542%2057%20820%2091%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23ffb1bb%22%20stroke-opacity%3D%22.40%22%20stroke-width%3D%225%22/%3E%0A%20%20%3Cpath%20d%3D%22M-76%20378%20C122%20323%20194%20239%20313%20160%20C424%2094%20555%2076%20826%20109%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23ffb1bb%22%20stroke-opacity%3D%22.24%22%20stroke-width%3D%222.5%22/%3E%0A%3C/g%3E%0A%3Cg%20fill%3D%22none%22%20stroke%3D%22%23ffb1bb%22%20stroke-linecap%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M-50%2030%20C100%2078%20150%20120%20225%20173%20C305%20230%20430%20275%20705%20290%22%0A%20%20%20%20%20%20%20%20stroke-opacity%3D%22.10%22%20stroke-width%3D%223%22/%3E%0A%20%20%3Cpath%20d%3D%22M-20%204%20C125%2055%20178%20101%20247%20151%20C333%20214%20462%20258%20718%20275%22%0A%20%20%20%20%20%20%20%20stroke-opacity%3D%22.06%22%20stroke-width%3D%222%22/%3E%0A%3C/g%3E%0A%3C/svg%3E"),
    radial-gradient(circle at 94% 4%,rgba(235,43,58,.82),transparent 46%),
    linear-gradient(135deg,#07111b 0%,#14212e 52%,#360c15 100%) !important;
}

.credit-card-widget:nth-child(3n+2){
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22700%22%20height%3D%22330%22%20viewBox%3D%220%200%20700%20330%22%3E%0A%3Cdefs%3E%0A%20%20%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%221%22%20x2%3D%221%22%20y2%3D%220%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%232f9bff%22%20stop-opacity%3D%22.42%22/%3E%0A%20%20%20%20%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23bfe2ff%22%20stop-opacity%3D%22.30%22/%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%232f9bff%22%20stop-opacity%3D%22.10%22/%3E%0A%20%20%3C/linearGradient%3E%0A%3C/defs%3E%0A%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M-90%20325%20C95%20276%20150%20190%20275%20112%20C382%2045%20510%2022%20805%2056%22%0A%20%20%20%20%20%20%20%20stroke%3D%22url%28%23g%29%22%20stroke-width%3D%2230%22/%3E%0A%20%20%3Cpath%20d%3D%22M-88%20342%20C104%20291%20165%20205%20289%20127%20C396%2060%20527%2039%20815%2073%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23bfe2ff%22%20stroke-opacity%3D%22.44%22%20stroke-width%3D%2210%22/%3E%0A%20%20%3Cpath%20d%3D%22M-82%20360%20C112%20307%20179%20222%20301%20144%20C410%2077%20542%2057%20820%2091%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23bfe2ff%22%20stroke-opacity%3D%22.40%22%20stroke-width%3D%225%22/%3E%0A%20%20%3Cpath%20d%3D%22M-76%20378%20C122%20323%20194%20239%20313%20160%20C424%2094%20555%2076%20826%20109%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23bfe2ff%22%20stroke-opacity%3D%22.24%22%20stroke-width%3D%222.5%22/%3E%0A%3C/g%3E%0A%3Cg%20fill%3D%22none%22%20stroke%3D%22%23bfe2ff%22%20stroke-linecap%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M-50%2030%20C100%2078%20150%20120%20225%20173%20C305%20230%20430%20275%20705%20290%22%0A%20%20%20%20%20%20%20%20stroke-opacity%3D%22.10%22%20stroke-width%3D%223%22/%3E%0A%20%20%3Cpath%20d%3D%22M-20%204%20C125%2055%20178%20101%20247%20151%20C333%20214%20462%20258%20718%20275%22%0A%20%20%20%20%20%20%20%20stroke-opacity%3D%22.06%22%20stroke-width%3D%222%22/%3E%0A%3C/g%3E%0A%3C/svg%3E"),
    radial-gradient(circle at 94% 4%,rgba(37,128,238,.84),transparent 46%),
    linear-gradient(135deg,#061421 0%,#0d3765 55%,#071b31 100%) !important;
}

.credit-card-widget:nth-child(3n){
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22700%22%20height%3D%22330%22%20viewBox%3D%220%200%20700%20330%22%3E%0A%3Cdefs%3E%0A%20%20%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%221%22%20x2%3D%221%22%20y2%3D%220%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ff3f40%22%20stop-opacity%3D%22.42%22/%3E%0A%20%20%20%20%3Cstop%20offset%3D%22.52%22%20stop-color%3D%22%23ffb0b0%22%20stop-opacity%3D%22.30%22/%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ff3f40%22%20stop-opacity%3D%22.10%22/%3E%0A%20%20%3C/linearGradient%3E%0A%3C/defs%3E%0A%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M-90%20325%20C95%20276%20150%20190%20275%20112%20C382%2045%20510%2022%20805%2056%22%0A%20%20%20%20%20%20%20%20stroke%3D%22url%28%23g%29%22%20stroke-width%3D%2230%22/%3E%0A%20%20%3Cpath%20d%3D%22M-88%20342%20C104%20291%20165%20205%20289%20127%20C396%2060%20527%2039%20815%2073%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23ffb0b0%22%20stroke-opacity%3D%22.44%22%20stroke-width%3D%2210%22/%3E%0A%20%20%3Cpath%20d%3D%22M-82%20360%20C112%20307%20179%20222%20301%20144%20C410%2077%20542%2057%20820%2091%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23ffb0b0%22%20stroke-opacity%3D%22.40%22%20stroke-width%3D%225%22/%3E%0A%20%20%3Cpath%20d%3D%22M-76%20378%20C122%20323%20194%20239%20313%20160%20C424%2094%20555%2076%20826%20109%22%0A%20%20%20%20%20%20%20%20stroke%3D%22%23ffb0b0%22%20stroke-opacity%3D%22.24%22%20stroke-width%3D%222.5%22/%3E%0A%3C/g%3E%0A%3Cg%20fill%3D%22none%22%20stroke%3D%22%23ffb0b0%22%20stroke-linecap%3D%22round%22%3E%0A%20%20%3Cpath%20d%3D%22M-50%2030%20C100%2078%20150%20120%20225%20173%20C305%20230%20430%20275%20705%20290%22%0A%20%20%20%20%20%20%20%20stroke-opacity%3D%22.10%22%20stroke-width%3D%223%22/%3E%0A%20%20%3Cpath%20d%3D%22M-20%204%20C125%2055%20178%20101%20247%20151%20C333%20214%20462%20258%20718%20275%22%0A%20%20%20%20%20%20%20%20stroke-opacity%3D%22.06%22%20stroke-width%3D%222%22/%3E%0A%3C/g%3E%0A%3C/svg%3E"),
    radial-gradient(circle at 94% 4%,rgba(239,48,52,.84),transparent 46%),
    linear-gradient(135deg,#090f16 0%,#2b0b0d 54%,#430b0c 100%) !important;
}

.credit-card-widget{
  background-repeat:no-repeat !important;
  background-position:center center !important;
  background-size:100% 100% !important;
}

/* Arco complementar no canto superior direito */
.credit-card-widget::before{
  content:"" !important;
  position:absolute !important;
  right:-90px !important;
  top:-88px !important;
  width:245px !important;
  height:245px !important;
  border-radius:50% !important;
  border:2px solid rgba(255,255,255,.13) !important;
  box-shadow:
    0 0 0 14px rgba(255,255,255,.035),
    0 0 0 28px rgba(255,255,255,.018) !important;
  pointer-events:none !important;
  z-index:1 !important;
}

/* Arco complementar no canto inferior esquerdo */
.credit-card-widget::after{
  content:"" !important;
  position:absolute !important;
  left:-140px !important;
  bottom:-178px !important;
  width:330px !important;
  height:200px !important;
  border-radius:50% !important;
  border:2px solid rgba(255,255,255,.10) !important;
  box-shadow:
    0 0 0 14px rgba(255,255,255,.025),
    0 0 0 28px rgba(255,255,255,.014) !important;
  pointer-events:none !important;
  z-index:1 !important;
}

/* Conteúdo sempre acima do desenho */
.credit-card-head{
  position:relative !important;
  z-index:2 !important;
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:12px !important;
  min-height:48px !important;
}

.credit-card-brand{
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  min-width:0 !important;
}

.credit-card-brand img,
.credit-card-logo-fallback{
  width:48px !important;
  height:48px !important;
  flex:0 0 48px !important;
  border-radius:11px !important;
  background:#fff !important;
  object-fit:contain !important;
  padding:5px !important;
  box-shadow:0 3px 8px rgba(0,0,0,.18) !important;
}

.credit-card-logo-fallback{
  display:grid !important;
  place-items:center !important;
  padding:0 !important;
  color:#17233f !important;
  font-size:20px !important;
}

.credit-card-head>div:last-child{
  text-align:right !important;
  min-width:0 !important;
  position:relative !important;
  z-index:2 !important;
}

.credit-card-network{
  display:inline-block !important;
  font-size:10px !important;
  font-weight:800 !important;
  letter-spacing:.06em !important;
  color:#fff !important;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.28) !important;
  padding:4px 9px !important;
  border-radius:999px !important;
  white-space:nowrap !important;
}

.credit-card-widget .muted{
  color:#d6e0eb !important;
  font-size:11px !important;
}

.credit-card-head .muted{
  color:#e1e8f0 !important;
}

.credit-card-number{
  position:relative !important;
  z-index:2 !important;
  font-size:14px !important;
  letter-spacing:.11em !important;
  margin-top:10px !important;
  color:rgba(255,255,255,.88) !important;
}

.credit-card-invoice{
  position:relative !important;
  z-index:2 !important;
  margin-top:10px !important;
}

.credit-card-invoice-value{
  font-size:25px !important;
  font-weight:850 !important;
  line-height:1.05 !important;
  letter-spacing:-.025em !important;
  margin:3px 0 2px !important;
}

.card-overdue{
  color:#ffd0cc !important;
  font-weight:800 !important;
}

.credit-card-limit-row{
  position:relative !important;
  z-index:2 !important;
  display:grid !important;
  grid-template-columns:repeat(3,1fr) !important;
  gap:0 !important;
  margin-top:auto !important;
  padding-top:10px !important;
}

.credit-card-limit-row>div{
  display:grid !important;
  gap:3px !important;
  padding:0 10px !important;
  border-left:1px solid rgba(255,255,255,.23) !important;
}

.credit-card-limit-row>div:first-child{
  padding-left:0 !important;
  border-left:0 !important;
}

.credit-card-limit-row>div:last-child{
  padding-right:0 !important;
}

.credit-card-limit-row .muted{
  color:#cbd8e5 !important;
  font-size:10px !important;
}

.credit-card-limit-row strong{
  color:#fff !important;
  font-size:12px !important;
  line-height:1.1 !important;
}

.credit-card-progress{
  position:relative !important;
  z-index:2 !important;
  height:6px !important;
  background:rgba(205,220,235,.28) !important;
  border-radius:999px !important;
  overflow:hidden !important;
  margin-top:8px !important;
}

.credit-card-progress>div{
  height:100% !important;
  background:#fff !important;
  border-radius:999px !important;
}

.credit-card-widget:nth-child(3n+1) .credit-card-progress>div{
  background:#29d3a4 !important;
}

.credit-card-widget:nth-child(3n+2) .credit-card-progress>div{
  background:#62b1ff !important;
}

.credit-card-widget:nth-child(3n) .credit-card-progress>div{
  background:#ff7777 !important;
}

.credit-card-progress-label{
  position:relative !important;
  z-index:2 !important;
  margin-top:4px !important;
  font-size:10px !important;
  line-height:1 !important;
  color:#d2dce7 !important;
}

@media(max-width:1100px){
  .dashboard-cards{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:700px){
  .dashboard-cards{
    grid-template-columns:1fr !important;
  }

  .credit-card-widget{
    height:auto !important;
    min-height:214px !important;
  }
}

@media(max-width:480px){
  .credit-card-widget{
    padding:15px 16px !important;
    min-height:205px !important;
  }

  .credit-card-brand img,
  .credit-card-logo-fallback{
    width:44px !important;
    height:44px !important;
    flex-basis:44px !important;
  }
}

/* =========================================================
   MEUS CARTÕES — TAMANHO PADRÃO
   Mantém o desenho V7, mas impede que os cartões se estiquem
   para preencher monitores maiores.
   ========================================================= */

.dashboard-cards{
  display:grid !important;
  grid-template-columns:repeat(3,438px) !important;
  justify-content:start !important;
  align-items:start !important;
  gap:16px !important;
  width:auto !important;
}

.credit-card-widget{
  width:438px !important;
  min-width:438px !important;
  max-width:438px !important;
  height:214px !important;
  min-height:214px !important;
  max-height:214px !important;
}

/* Em telas menores, reduz a quantidade de colunas sem deformar o cartão */
@media(max-width:1400px){
  .dashboard-cards{
    grid-template-columns:repeat(2,438px) !important;
  }
}

@media(max-width:960px){
  .dashboard-cards{
    grid-template-columns:438px !important;
  }
}

@media(max-width:700px){
  .dashboard-cards{
    grid-template-columns:minmax(0,438px) !important;
  }

  .credit-card-widget{
    width:100% !important;
    min-width:0 !important;
    max-width:438px !important;
    height:214px !important;
    min-height:214px !important;
  }
}



/* =========================================================
   BARRA DE UTILIZAÇÃO — VERDE
   ========================================================= */

.credit-card-progress>div{
  background:#22a06b !important;
}

.credit-card-widget:nth-child(3n+1) .credit-card-progress>div,
.credit-card-widget:nth-child(3n+2) .credit-card-progress>div,
.credit-card-widget:nth-child(3n) .credit-card-progress>div{
  background:#22a06b !important;
}


/* =========================================================
   CARTÕES DO DASHBOARD — INTERAÇÃO
   ========================================================= */

.credit-card-widget{
  cursor:pointer !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease !important;
}

.credit-card-widget:hover{
  transform:translateY(-3px) !important;
  box-shadow:0 16px 34px rgba(13,31,51,.28) !important;
  filter:brightness(1.03) !important;
}

.credit-card-widget:focus-visible{
  outline:3px solid rgba(23,105,224,.45) !important;
  outline-offset:3px !important;
}


/* =========================================================
   BARRA DE USO — RENDERIZAÇÃO INDEPENDENTE DA FATURA
   ========================================================= */

.credit-card-progress{
  position:relative !important;
  z-index:3 !important;
  height:7px !important;
  margin-top:8px !important;
  border-radius:999px !important;
  overflow:hidden !important;
  background:
    linear-gradient(
      90deg,
      #22a06b 0,
      #22a06b var(--used-pct,0%),
      rgba(205,220,235,.28) var(--used-pct,0%),
      rgba(205,220,235,.28) 100%
    ) !important;
}

.credit-card-progress>div{
  display:none !important;
}


/* =========================================================
   BARRA DE USO — COMPATIBILIDADE COM VERSÕES DO APP.JS
   ========================================================= */

/* O preenchimento antigo via width inline também permanece visível.
   Assim a barra funciona tanto com o app.js novo quanto com versões
   anteriores que já calculavam usedPct diretamente no child div. */

.credit-card-progress{
  position:relative !important;
  z-index:3 !important;
  height:7px !important;
  margin-top:8px !important;
  border-radius:999px !important;
  overflow:hidden !important;
  background:rgba(205,220,235,.28) !important;
}

.credit-card-progress>div{
  display:block !important;
  height:100% !important;
  min-width:0 !important;
  background:#22a06b !important;
  border-radius:999px !important;
}

/* Quando o app.js novo enviar --used-pct, o próprio container
   complementa a barra. */
.credit-card-progress[style*="--used-pct"]{
  background:
    linear-gradient(
      90deg,
      #22a06b 0,
      #22a06b var(--used-pct,0%),
      rgba(205,220,235,.28) var(--used-pct,0%),
      rgba(205,220,235,.28) 100%
    ) !important;
}

.credit-card-progress[style*="--used-pct"]>div{
  width:0 !important;
}


/* =========================================================
   BARRA DE USO — POSIÇÃO FIXA NO RODAPÉ DO CARTÃO
   ========================================================= */

/*
   O cartão tem altura fixa e a área da fatura pode crescer quando
   existe uma fatura aberta. A barra ficava sendo empurrada/clipped
   pelo layout flex. Agora barra e percentual ocupam sempre a mesma
   posição no rodapé, independentemente da fatura exibida.
*/

.credit-card-widget{
  position:relative !important;
  padding-bottom:38px !important;
}

.credit-card-limit-row{
  position:relative !important;
  z-index:3 !important;
  margin-top:auto !important;
  padding-bottom:2px !important;
}

.credit-card-progress{
  position:absolute !important;
  left:16px !important;
  right:16px !important;
  bottom:18px !important;
  width:auto !important;
  height:7px !important;
  margin:0 !important;
  z-index:4 !important;
  border-radius:999px !important;
  overflow:hidden !important;
  background:rgba(205,220,235,.30) !important;
}

.credit-card-progress[style*="--used-pct"]{
  background:
    linear-gradient(
      90deg,
      #22a06b 0,
      #22a06b var(--used-pct,0%),
      rgba(205,220,235,.30) var(--used-pct,0%),
      rgba(205,220,235,.30) 100%
    ) !important;
}

.credit-card-progress>div{
  display:none !important;
}

.credit-card-progress-label{
  position:absolute !important;
  left:16px !important;
  bottom:5px !important;
  margin:0 !important;
  z-index:4 !important;
  line-height:1 !important;
  font-size:10px !important;
  color:#d2dce7 !important;
}


/* =========================================================
   MODO ESCURO — RESTAURAÇÃO
   Compatível com o layout atual e sem alterar os cartões premium.
   ========================================================= */

html[data-theme="dark"]{
  color-scheme:dark;
}

html[data-theme="dark"] body{
  background:
    radial-gradient(circle at 85% 5%,rgba(23,105,224,.10),transparent 28%),
    linear-gradient(180deg,#0b1420 0%,#101b29 100%);
  color:#e7edf5;
}

html[data-theme="dark"] .main{
  color:#e7edf5;
}

html[data-theme="dark"] .top h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3{
  color:#f3f6fb;
}

html[data-theme="dark"] .muted{
  color:#9eabbc;
}

html[data-theme="dark"] .card{
  background:rgba(20,31,45,.94);
  border-color:#2a394d;
  box-shadow:0 8px 24px rgba(0,0,0,.24);
}

html[data-theme="dark"] .card:hover{
  box-shadow:0 12px 30px rgba(0,0,0,.30);
}

html[data-theme="dark"] .btn.secondary{
  background:#253448;
  color:#e8eef6;
  border:1px solid #354860;
}

html[data-theme="dark"] .btn.secondary:hover{
  background:#2c3d54;
}

html[data-theme="dark"] .input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#121e2c;
  color:#e7edf5;
  border-color:#334458;
}

html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:#7f8da0;
}

html[data-theme="dark"] .input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{
  border-color:#5e95ec;
  box-shadow:0 0 0 3px rgba(94,149,236,.16);
}

html[data-theme="dark"] .table{
  background:#141f2e;
  border-color:#2a394d;
}

html[data-theme="dark"] .table th{
  background:#1a2738;
  color:#aebaca;
  border-bottom-color:#2a394d;
}

html[data-theme="dark"] .table td{
  color:#dce4ee;
  border-bottom-color:#26364a;
}

html[data-theme="dark"] .table tbody tr:hover{
  background:#1a293b;
}

html[data-theme="dark"] .dashboard-account-logo,
html[data-theme="dark"] .dashboard-account-logo-fallback{
  border-color:#334458;
}

html[data-theme="dark"] .dashboard-account-logo-fallback{
  background:#202e40;
}

html[data-theme="dark"] .dashboard-account-balance,
html[data-theme="dark"] .money{
  color:#f3f6fb;
}

html[data-theme="dark"] .alert{
  background:#3a1e21;
  color:#ffb5b1;
  border-color:#6d3438;
}

/* Formulários de login */
html[data-theme="dark"] .login{
  background:
    radial-gradient(circle at 20% 20%,rgba(23,105,224,.14),transparent 30%),
    linear-gradient(135deg,#0b1420,#152234);
}

html[data-theme="dark"] .login .box{
  background:#141f2e;
  border-color:#2a394d;
  color:#e7edf5;
}

/* Aviso de vencimentos criado pelo app.js com estilos inline */
html[data-theme="dark"] #dueDateAlertModal{
  background:rgba(0,0,0,.68) !important;
}

html[data-theme="dark"] #dueDateAlertModal > div{
  background:#141f2e !important;
  color:#e7edf5 !important;
  border:1px solid #2a394d;
}

html[data-theme="dark"] #dueDateAlertModal > div h2{
  color:#f3f6fb !important;
}

html[data-theme="dark"] #dueDateAlertModal > div [style*="border-bottom"]{
  border-bottom-color:#2a394d !important;
}

/* Controle do tema */
.top-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

@media(max-width:700px){
  .top-actions{
    width:100%;
  }

  .theme-toggle{
    flex:1;
    justify-content:center;
  }
}

/* Os cartões continuam com sua identidade gráfica premium
   em ambos os temas. */
html[data-theme="dark"] .credit-card-widget{
  filter:none;
}


/* =========================================================
   DASHBOARD — CONTAS E RESUMO FINANCEIRO
   Visual inspirado na referência enviada.
   ========================================================= */

.dashboard-account-cards{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:12px !important;
  width:100% !important;
}

.dashboard-account-card{
  position:relative !important;
  min-width:0 !important;
  min-height:108px !important;
  padding:14px 14px 13px !important;
  border-radius:12px !important;
  border:1px solid #e3eaf3 !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 5px 16px rgba(15,29,45,.055) !important;
  overflow:hidden !important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.dashboard-account-card:hover{
  transform:translateY(-2px) !important;
  box-shadow:0 10px 22px rgba(15,29,45,.10) !important;
  border-color:#d7e1ee !important;
}

.dashboard-account-card-main{
  display:grid;
  grid-template-columns:40px minmax(0,1fr) 16px;
  align-items:center;
  gap:10px;
  min-width:0;
}

.dashboard-account-logo,
.dashboard-account-logo-fallback{
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  border-radius:10px !important;
}

.dashboard-account-logo{
  object-fit:contain !important;
  background:#fff !important;
  padding:5px !important;
  border:1px solid #edf1f6 !important;
}

.dashboard-account-logo-fallback{
  display:grid !important;
  place-items:center !important;
  background:#f0f4f9 !important;
  font-size:17px !important;
}

.dashboard-account-info{
  min-width:0;
  overflow:hidden;
}

.dashboard-account-bank,
.dashboard-account-name{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dashboard-account-bank{
  font-size:11px !important;
  line-height:1.2 !important;
  margin-bottom:3px;
}

.dashboard-account-name{
  color:#12224a !important;
  font-size:13px !important;
  line-height:1.2 !important;
}

.dashboard-account-arrow{
  color:#577092;
  font-size:24px;
  line-height:1;
  text-align:right;
  transform:translateY(-1px);
}

.dashboard-account-balance{
  margin-top:9px !important;
  font-size:21px !important;
  line-height:1.05 !important;
  font-weight:850 !important;
  letter-spacing:-.025em !important;
  color:#0e2049 !important;
}

.dashboard-account-type{
  margin-top:4px !important;
  font-size:11px !important;
  line-height:1.2 !important;
}

/* Resumo mensal */
.dashboard-summary-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
}

.dashboard-summary-card{
  min-height:84px !important;
  padding:13px 14px !important;
  display:grid !important;
  grid-template-columns:54px minmax(0,1fr) 14px !important;
  align-items:center !important;
  gap:12px !important;
  border-radius:12px !important;
  border:1px solid #e3eaf3 !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 5px 16px rgba(15,29,45,.055) !important;
}

.dashboard-summary-icon{
  width:54px;
  height:54px;
  border-radius:13px;
  display:grid;
  place-items:center;
}

.dashboard-summary-icon svg{
  width:27px;
  height:27px;
  stroke-width:2.4;
}

.dashboard-summary-card--income .dashboard-summary-icon{
  background:#e9f8ef;
  color:#0a8a57;
}

.dashboard-summary-card--income .dashboard-summary-icon svg rect{
  fill:currentColor;
  stroke:none;
}

.dashboard-summary-card--expense .dashboard-summary-icon{
  background:#fff0f0;
  color:#e21d2b;
}

.dashboard-summary-card--expense .dashboard-summary-icon svg path{
  stroke:currentColor;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dashboard-summary-card--result .dashboard-summary-icon{
  background:#eaf2ff;
  color:#1769e0;
}

.dashboard-summary-card--result .dashboard-summary-icon svg path{
  fill:currentColor;
  stroke:none;
}

.dashboard-summary-content{
  min-width:0;
}

.dashboard-summary-content .muted:first-child{
  font-size:11px !important;
  line-height:1.1 !important;
  letter-spacing:.01em;
}

.dashboard-summary-value{
  margin-top:3px !important;
  font-size:24px !important;
  line-height:1.05 !important;
  font-weight:850 !important;
  letter-spacing:-.025em !important;
}

.dashboard-summary-card--income .dashboard-summary-value{
  color:#0b8a57 !important;
}

.dashboard-summary-card--expense .dashboard-summary-value,
.dashboard-summary-card--negative .dashboard-summary-value{
  color:#e21d2b !important;
}

.dashboard-summary-card--result .dashboard-summary-value,
.dashboard-summary-card--positive .dashboard-summary-value{
  color:#102653 !important;
}

.dashboard-summary-arrow{
  font-size:25px;
  line-height:1;
  color:#2b67bd;
  text-align:right;
}

.dashboard-summary-card--income .dashboard-summary-arrow{
  color:#0a8a57;
}

.dashboard-summary-card--expense .dashboard-summary-arrow,
.dashboard-summary-card--negative .dashboard-summary-arrow{
  color:#e21d2b;
}

.dashboard-summary-card:hover,
.dashboard-account-card:hover{
  cursor:default;
}

/* =========================================================
   DASHBOARD — MODO ESCURO
   ========================================================= */

html[data-theme="dark"] .dashboard-account-card,
html[data-theme="dark"] .dashboard-summary-card{
  background:#152131 !important;
  border-color:#2b3a4f !important;
  box-shadow:0 8px 22px rgba(0,0,0,.20) !important;
}

html[data-theme="dark"] .dashboard-account-card:hover,
html[data-theme="dark"] .dashboard-summary-card:hover{
  border-color:#3a4e67 !important;
  box-shadow:0 12px 26px rgba(0,0,0,.28) !important;
}

html[data-theme="dark"] .dashboard-account-logo{
  border-color:#38485d !important;
}

html[data-theme="dark"] .dashboard-account-logo-fallback{
  background:#223247 !important;
}

html[data-theme="dark"] .dashboard-account-name,
html[data-theme="dark"] .dashboard-account-balance,
html[data-theme="dark"] .dashboard-summary-card--result .dashboard-summary-value,
html[data-theme="dark"] .dashboard-summary-card--positive .dashboard-summary-value{
  color:#f1f5fa !important;
}

html[data-theme="dark"] .dashboard-account-arrow,
html[data-theme="dark"] .dashboard-summary-arrow{
  color:#8fb4e7 !important;
}

html[data-theme="dark"] .dashboard-summary-card--income .dashboard-summary-icon{
  background:#17372c !important;
}

html[data-theme="dark"] .dashboard-summary-card--expense .dashboard-summary-icon,
html[data-theme="dark"] .dashboard-summary-card--negative .dashboard-summary-icon{
  background:#3b2026 !important;
}

html[data-theme="dark"] .dashboard-summary-card--result .dashboard-summary-icon,
html[data-theme="dark"] .dashboard-summary-card--positive .dashboard-summary-icon{
  background:#1d3152 !important;
}

html[data-theme="dark"] .dashboard-summary-card--income .dashboard-summary-value{
  color:#31c58d !important;
}

html[data-theme="dark"] .dashboard-summary-card--expense .dashboard-summary-value,
html[data-theme="dark"] .dashboard-summary-card--negative .dashboard-summary-value{
  color:#ff6d75 !important;
}

/* =========================================================
   RESPONSIVIDADE DOS NOVOS CARDS
   ========================================================= */

@media(max-width:1200px){
  .dashboard-account-cards{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:900px){
  .dashboard-summary-grid{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:700px){
  .dashboard-account-cards{
    grid-template-columns:1fr !important;
  }

  .dashboard-summary-card{
    grid-template-columns:50px minmax(0,1fr) 14px !important;
  }

  .dashboard-summary-icon{
    width:50px;
    height:50px;
  }

  .dashboard-summary-value{
    font-size:22px !important;
  }
}


/* =========================================================
   DASHBOARD — VENCIMENTOS + CATEGORIAS
   Contas e faturas compactas à esquerda.
   Acompanhamento por categoria ao lado.
   ========================================================= */

.dashboard-lower-grid{
  display:grid;
  grid-template-columns:minmax(0,1.58fr) minmax(380px,.92fr);
  gap:18px;
  align-items:stretch;
  margin-top:16px;
}

.dashboard-lower-left{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.dashboard-lower-left > .dashboard-section{
  margin-top:0 !important;
  min-width:0;
}

.dashboard-lower-category{
  min-width:0;
  min-height:100%;
  display:flex;
  flex-direction:column;
}

.dashboard-lower-category > .dashboard-section{
  margin-top:0 !important;
  height:100%;
  min-height:100%;
  display:flex;
  flex-direction:column;
}

.dashboard-lower-category > .dashboard-section > .card{
  flex:1 1 auto;
  min-height:0;
}

/* Tabelas compactas na coluna esquerda. */
.dashboard-lower-left .top{
  margin-bottom:8px !important;
}

.dashboard-lower-left .top h2,
.dashboard-lower-category .top h2{
  font-size:18px !important;
}

.dashboard-lower-left .top .muted,
.dashboard-lower-category .top .muted{
  font-size:11px;
}

.dashboard-lower-left .table{
  margin-top:0 !important;
  font-size:11px;
}

.dashboard-lower-left .table th{
  padding:9px 8px !important;
  font-size:9.5px !important;
}

.dashboard-lower-left .table td{
  padding:9px 8px !important;
  white-space:nowrap;
}

.dashboard-lower-left .btn{
  padding:7px 10px !important;
  font-size:11px !important;
  border-radius:8px;
}

.dashboard-lower-left .muted{
  font-size:11px;
}

.dashboard-lower-category .card{
  padding:16px !important;
}

/* Modo escuro */
html[data-theme="dark"] .dashboard-lower-left .card,
html[data-theme="dark"] .dashboard-lower-category .card{
  background:#152131 !important;
}

/* Telas médias */
@media(max-width:1150px){
  .dashboard-lower-grid{
    grid-template-columns:minmax(0,1.45fr) minmax(330px,.9fr);
    gap:14px;
  }

  .dashboard-lower-left .table{
    font-size:10.5px;
  }

  .dashboard-lower-left .table th,
  .dashboard-lower-left .table td{
    padding-left:6px !important;
    padding-right:6px !important;
  }
}

/* Telas estreitas: empilha novamente. */
@media(max-width:900px){
  .dashboard-lower-grid{
    grid-template-columns:1fr;
  }

  .dashboard-lower-category > .dashboard-section{
    height:auto;
    min-height:0;
  }

  .dashboard-lower-category > .dashboard-section > .card{
    flex:none;
  }
}

/* Mobile */
@media(max-width:700px){
  .dashboard-lower-grid{
    gap:14px;
  }

  .dashboard-lower-left .table{
    min-width:760px;
  }
}


/* =========================================================
   DASHBOARD — NOVO LAYOUT PRINCIPAL
   ========================================================= */

.dashboard-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.dashboard-hero-context{
  display:flex;
  align-items:center;
  gap:7px;
  color:#647792;
  font-size:12px;
}

.dashboard-hero-context strong{
  color:#243a67;
  font-size:13px;
  text-transform:capitalize;
}

.dashboard-hero-title{
  margin:0 !important;
  font-size:29px !important;
  line-height:1.05 !important;
  letter-spacing:-.045em !important;
}

.dashboard-hero-greeting{
  margin-top:5px;
  color:#223a70;
  font-size:15px;
  font-weight:750;
}

.dashboard-hero-subtitle{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.dashboard-month-control{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.dashboard-month-control .input{
  width:165px;
  height:40px;
  border-radius:10px;
  background:#fff;
  font-weight:700;
}

.dashboard-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.dashboard-kpi{
  min-width:0;
  min-height:96px;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 20px;
  align-items:center;
  gap:11px;
  padding:14px 15px;
  border-radius:13px;
  border:1px solid #e1e9f2;
  box-shadow:0 6px 18px rgba(15,29,45,.055);
  overflow:hidden;
}

.dashboard-kpi-icon{
  width:48px;
  height:48px;
  border-radius:13px;
  display:grid;
  place-items:center;
  font-size:26px;
  font-weight:900;
}

.dashboard-kpi-content{
  min-width:0;
}

.dashboard-kpi-content .muted{
  font-size:11px;
  line-height:1.15;
}

.dashboard-kpi-content strong{
  display:block;
  margin-top:4px;
  font-size:22px;
  line-height:1.05;
  letter-spacing:-.025em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dashboard-kpi-content span{
  display:block;
  margin-top:5px;
  color:#58708f;
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dashboard-kpi-mark{
  align-self:start;
  padding-top:3px;
  font-size:22px;
  opacity:.35;
}

.dashboard-kpi-accounts{
  background:linear-gradient(135deg,#edf5ff,#f7fbff);
}
.dashboard-kpi-accounts .dashboard-kpi-icon{
  background:#dcecff;
  color:#1769e0;
}
.dashboard-kpi-accounts strong{color:#102653}
.dashboard-kpi-accounts .dashboard-kpi-mark{color:#1769e0}

.dashboard-kpi-income{
  background:linear-gradient(135deg,#effbf5,#f8fffb);
}
.dashboard-kpi-income .dashboard-kpi-icon{
  background:#d8f4e4;
  color:#0b8a57;
}
.dashboard-kpi-income strong{color:#0b8a57}
.dashboard-kpi-income .dashboard-kpi-mark{color:#0b8a57}

.dashboard-kpi-expense{
  background:linear-gradient(135deg,#fff2f3,#fffafb);
}
.dashboard-kpi-expense .dashboard-kpi-icon{
  background:#ffdfe2;
  color:#e21d2b;
}
.dashboard-kpi-expense strong{color:#c9232f}
.dashboard-kpi-expense .dashboard-kpi-mark{color:#e21d2b}

.dashboard-kpi-result{
  background:linear-gradient(135deg,#fff8e8,#fffdf6);
}
.dashboard-kpi-result .dashboard-kpi-icon{
  background:#ffe8b4;
  color:#b87900;
}
.dashboard-kpi-result strong{color:#172d5d}
.dashboard-kpi-result .dashboard-kpi-mark{color:#b87900}

.dashboard-block{
  margin-top:18px !important;
}

.dashboard-section-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}

.dashboard-section-header h2{
  margin:0 !important;
  font-size:18px !important;
  line-height:1.15;
}

.dashboard-section-count{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:#f1f5fa;
  color:#526985;
  font-size:11px;
  font-weight:750;
  white-space:nowrap;
}

.dashboard-table-card{
  padding:0 !important;
  overflow:hidden !important;
}

.dashboard-table-scroll{
  overflow:auto;
}

.dashboard-table-footer{
  padding:9px 12px;
  border-top:1px solid #e6ebf2;
  color:#667792;
  font-size:11px;
}

.dashboard-expense-value{
  color:#d92d20 !important;
  font-weight:800 !important;
}

.dashboard-status{
  display:inline-flex;
  align-items:center;
  padding:3px 7px;
  border-radius:999px;
  font-size:9px;
  font-weight:850;
  line-height:1;
}

.dashboard-status-paid{
  color:#087443;
  background:#e6f7ee;
}

.dashboard-status-pending{
  color:#d92d20;
  background:#fff0f0;
}

.dashboard-overdue{
  color:#d92d20;
  font-size:9px;
  font-weight:800;
}

.dashboard-category-filter{
  height:32px;
  min-width:95px;
  padding:0 9px;
  border:1px solid #dce5ef;
  border-radius:8px;
  background:#fff;
  color:#243858;
  font-size:11px;
  font-weight:700;
}

.dashboard-category-panel{
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  gap:18px;
  align-items:center;
  padding:14px 0 4px;
}

.dashboard-donut-wrap{
  display:grid;
  place-items:center;
}

.dashboard-donut{
  width:160px;
  height:160px;
  border-radius:50%;
  display:grid;
  place-items:center;
  position:relative;
}

.dashboard-donut:after{
  content:'';
  position:absolute;
  inset:29px;
  border-radius:50%;
  background:#fff;
  box-shadow:inset 0 0 0 1px #eef2f6;
}

.dashboard-donut-center{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
}

.dashboard-donut-center span{
  color:#71829a;
  font-size:11px;
}

.dashboard-donut-center strong{
  color:#102653;
  font-size:14px;
}

.dashboard-category-legend{
  display:grid;
  gap:11px;
  min-width:0;
}

.dashboard-category-row{
  display:grid;
  grid-template-columns:110px minmax(70px,1fr) auto;
  align-items:center;
  gap:9px;
  min-width:0;
}

.dashboard-category-label{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  color:#263c60;
  font-size:11px;
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dashboard-category-label span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
}

.dashboard-category-dot{
  width:9px;
  height:9px;
  min-width:9px;
  border-radius:50%;
}

.dashboard-category-row strong{
  font-size:10px;
  color:#172d58;
  white-space:nowrap;
}

.dashboard-category-bar{
  height:7px;
  border-radius:999px;
  background:#e9eef5;
  overflow:hidden;
}

.dashboard-category-bar span{
  display:block;
  height:100%;
  border-radius:999px;
}

.dashboard-category-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:15px;
}

.dashboard-category-mini{
  min-width:0;
  padding:10px;
  border:1px solid #e5ebf2;
  border-radius:10px;
  background:#fbfcfe;
}

.dashboard-category-mini-top{
  display:flex;
  align-items:center;
  gap:6px;
  color:#657791;
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dashboard-category-mini-top span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
}

.dashboard-category-mini strong{
  display:block;
  margin-top:6px;
  color:#132a57;
  font-size:12px;
}

.dashboard-category-mini-bar{
  height:5px;
  margin-top:8px;
  background:#e8edf4;
  border-radius:999px;
  overflow:hidden;
}

.dashboard-category-mini-bar span{
  display:block;
  height:100%;
  border-radius:999px;
}

.dashboard-category-mini small{
  display:block;
  margin-top:4px;
  color:#7a899d;
  font-size:9px;
}

/* =========================================================
   NOVO DASHBOARD — MODO ESCURO
   ========================================================= */

html[data-theme="dark"] .dashboard-hero-context{
  color:#9eabbc;
}

html[data-theme="dark"] .dashboard-hero-context strong{
  color:#dbe7f7;
}

html[data-theme="dark"] .dashboard-month-control .input{
  background:#121e2c;
  color:#e7edf5;
  border-color:#334458;
}

html[data-theme="dark"] .dashboard-kpi{
  border-color:#2b3a4f;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}

html[data-theme="dark"] .dashboard-kpi-accounts{background:linear-gradient(135deg,#182b42,#1a2a3c)}
html[data-theme="dark"] .dashboard-kpi-income{background:linear-gradient(135deg,#17352d,#1a302b)}
html[data-theme="dark"] .dashboard-kpi-expense{background:linear-gradient(135deg,#3a2228,#30202a)}
html[data-theme="dark"] .dashboard-kpi-result{background:linear-gradient(135deg,#3b321f,#302b20)}
html[data-theme="dark"] .dashboard-kpi-accounts .dashboard-kpi-icon{background:#203d63}
html[data-theme="dark"] .dashboard-kpi-income .dashboard-kpi-icon{background:#20523d}
html[data-theme="dark"] .dashboard-kpi-expense .dashboard-kpi-icon{background:#5a2932}
html[data-theme="dark"] .dashboard-kpi-result .dashboard-kpi-icon{background:#5a4820}
html[data-theme="dark"] .dashboard-kpi-content strong{color:#f1f5fa}
html[data-theme="dark"] .dashboard-kpi-content span{color:#a8b5c6}

html[data-theme="dark"] .dashboard-section-count{
  background:#202e40;
  color:#aebaca;
}

html[data-theme="dark"] .dashboard-table-footer{
  border-top-color:#2a394d;
  color:#9eabbc;
}

html[data-theme="dark"] .dashboard-status-paid{
  color:#58d6a0;
  background:#17372c;
}

html[data-theme="dark"] .dashboard-status-pending{
  color:#ff858c;
  background:#3b2026;
}

html[data-theme="dark"] .dashboard-category-filter{
  background:#121e2c;
  color:#dce4ee;
  border-color:#334458;
}

html[data-theme="dark"] .dashboard-category-label,
html[data-theme="dark"] .dashboard-category-row strong{
  color:#dce4ee;
}

html[data-theme="dark"] .dashboard-category-bar,
html[data-theme="dark"] .dashboard-category-mini-bar{
  background:#27364a;
}

html[data-theme="dark"] .dashboard-donut:after{
  background:#152131;
  box-shadow:inset 0 0 0 1px #2b3a4f;
}

html[data-theme="dark"] .dashboard-donut-center strong{
  color:#f1f5fa;
}

html[data-theme="dark"] .dashboard-category-mini{
  background:#152131;
  border-color:#2b3a4f;
}

html[data-theme="dark"] .dashboard-category-mini strong{
  color:#edf3fa;
}

/* =========================================================
   RESPONSIVIDADE DO NOVO DASHBOARD
   ========================================================= */

@media(max-width:1200px){
  .dashboard-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .dashboard-hero{
    align-items:flex-start;
    flex-direction:column;
  }

  .dashboard-month-control{
    justify-content:flex-start;
  }

  .dashboard-category-panel{
    grid-template-columns:1fr;
  }

  .dashboard-donut-wrap{
    padding:4px 0 10px;
  }
}

@media(max-width:700px){
  .dashboard-kpi-grid{
    grid-template-columns:1fr;
  }

  .dashboard-section-header{
    align-items:flex-start;
    flex-direction:column;
  }

  .dashboard-month-control{
    width:100%;
  }

  .dashboard-month-control .input{
    flex:1;
    width:auto;
  }

  .dashboard-category-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:480px){
  .dashboard-category-summary{
    grid-template-columns:1fr;
  }

  .dashboard-kpi{
    grid-template-columns:44px minmax(0,1fr) 16px;
  }

  .dashboard-kpi-icon{
    width:44px;
    height:44px;
  }
}

/* =========================================================
   DASHBOARD — 5 KPIs NA MESMA LINHA
   A última regra prevalece sobre as regras responsivas anteriores.
   ========================================================= */
.dashboard-kpi-grid{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:14px !important;
  width:100% !important;
}

.dashboard-kpi{
  min-width:0 !important;
}

@media(max-width:1200px){
  .dashboard-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media(max-width:900px){
  .dashboard-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:600px){
  .dashboard-kpi-grid{
    grid-template-columns:1fr !important;
  }
}

/* =========================================================
   DASHBOARD — KPIs EM CINZA
   Somente o fundo e a borda dos 5 cards.
   Cores dos numeros, icones e textos permanecem inalteradas.
   ========================================================= */
.dashboard-kpi-grid .dashboard-kpi{
  background:#ffffff !important;
  border-color:#e3eaf3 !important;
}

html[data-theme="dark"] .dashboard-kpi-grid .dashboard-kpi{
  background:linear-gradient(135deg,#2a333e 0%,#323c48 100%) !important;
  border-color:#465362 !important;
}


/* =========================================================
   DASHBOARD — CARD COMPLETO DE ACOMPANHAMENTO POR CATEGORIA
   O título, gráfico, legenda e resumo ficam dentro do mesmo card.
   ========================================================= */

.dashboard-lower-category > .dashboard-section{
  background:#ffffff !important;
  border:1px solid #e3eaf3 !important;
  border-radius:16px !important;
  box-shadow:0 8px 24px rgba(15,29,45,.07) !important;
  padding:16px !important;
  overflow:hidden !important;
}

.dashboard-lower-category > .dashboard-section > .top{
  margin-bottom:10px !important;
}

.dashboard-lower-category > .dashboard-section > .card{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
}

.dashboard-category-summary{
  margin-top:26px !important;
}

/* Modo escuro */
html[data-theme="dark"] .dashboard-lower-category > .dashboard-section{
  background:#152131 !important;
  border-color:#2b3a4f !important;
  box-shadow:0 8px 24px rgba(0,0,0,.24) !important;
}

html[data-theme="dark"] .dashboard-lower-category > .dashboard-section > .card{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}


/* =========================================================
   DASHBOARD — CATEGORIAS V5
   Cabeçalho fora da moldura.
   Conteúdo completo dentro da moldura.
   ========================================================= */

/* Retira a moldura do container geral para que o título e
   a descrição permaneçam fora, como nas demais seções. */
.dashboard-lower-category > .dashboard-section{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  overflow:visible !important;
}

/* Título e descrição ficam fora do card e seguem o padrão
   visual das demais seções do Dashboard. */
.dashboard-lower-category > .dashboard-section > .top{
  margin-bottom:10px !important;
}

.dashboard-lower-category > .dashboard-section > .top h2{
  margin:0 !important;
  font-size:18px !important;
  line-height:1.15 !important;
}

.dashboard-lower-category > .dashboard-section > .top .muted{
  font-size:11px !important;
  line-height:1.25 !important;
}

/* A moldura é aplicada ao card de conteúdo mesmo quando
   ele não for um filho direto do dashboard-section. */
.dashboard-lower-category > .dashboard-section .card{
  background:#ffffff !important;
  border:1px solid #e3eaf3 !important;
  border-radius:16px !important;
  box-shadow:0 8px 24px rgba(15,29,45,.07) !important;
  padding:16px !important;
  overflow:hidden !important;
}

/* O resumo desce um pouco mais dentro do card principal. */
.dashboard-lower-category .dashboard-category-summary{
  margin-top:46px !important;
}

/* Modo escuro */
html[data-theme="dark"] .dashboard-lower-category > .dashboard-section{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

html[data-theme="dark"] .dashboard-lower-category > .dashboard-section .card{
  background:#152131 !important;
  border-color:#2b3a4f !important;
  box-shadow:0 8px 24px rgba(0,0,0,.24) !important;
}

/* Descrição de Acompanhamento por categoria — mesmo tamanho das demais seções */
.dashboard-lower-category > .dashboard-section > .top .muted{
  font-size:11px !important;
  line-height:1.25 !important;
}
