/* ===================================================
   MADVisual — Gestão Financeira | style.css
   Identidade: Preto absoluto, gradiente #8e0000 → #e11300
   tipografia Inter, vibes de agência de comunicação visual
   =================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-base:    #000000;
  --bg-surface: #0a0a0a;
  --bg-card:    #111111;
  --bg-hover:   #1a1a1a;
  --border:     #222222;
  --border-l:   #333333;

  --accent:      #e11300;
  --accent-2:    #8e0000;
  --accent-glow: rgba(225,19,0,0.18);

  --green:  #00e676;
  --green2: #00c853;
  --red:    #e11300;
  --blue:   #448aff;
  --orange: #ff6d00;
  --purple: #d500f9;
  --yellow: #ffd600;

  --text-primary:   #f0f0f0;
  --text-secondary: #888888;
  --text-muted:     #555555;

  --sidebar-w: 240px;
  --topbar-h:  64px;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);

  --font: 'Inter', system-ui, sans-serif;
}

html { font-size: 15px; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-l); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===========================
   SIDEBAR
   =========================== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidebar-logo {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, #e11300, #8e0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: all .2s;
  cursor: pointer;
}
.nav-item svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(225,19,0,.15);
  color: var(--accent);
  border: 1px solid rgba(225,19,0,.3);
}
.nav-item.active svg { stroke: var(--accent); }

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-reset-demo {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .7rem;
  font-family: var(--font);
  padding: 6px 10px;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
}
.btn-reset-demo:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(225,19,0,.07);
}

/* ===========================
   MAIN CONTENT
   =========================== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-base);
}

/* ===========================
   TOPBAR
   =========================== */
.topbar {
  position: sticky;
  top: 0; z-index: 90;
  height: var(--topbar-h);
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: .2s;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-month {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: filter .25s, transform .25s, box-shadow .25s;
}
.user-avatar:hover {
  filter: drop-shadow(0 0 8px rgba(225,19,0,.8)) brightness(1.4);
  transform: scale(1.08);
}
.user-avatar:active {
  transform: scale(.96);
  filter: drop-shadow(0 0 14px rgba(225,19,0,1)) brightness(1.6);
}

.avatar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.2);
}

/* ===========================
   SECTIONS
   =========================== */
.section {
  display: none;
  padding: 28px;
  flex: 1;
  animation: fadeIn .25s ease;
  min-width: 0;
  overflow-x: hidden;
}
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.section {
  display: none;
  padding: 28px;
  flex: 1;
  animation: fadeIn .35s cubic-bezier(.4,0,.2,1);
  min-width: 0;
  overflow-x: hidden;
}
.section.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* ===========================
   CARDS GRID
   =========================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1), border-color .3s;
  animation: fadeIn .4s cubic-bezier(.4,0,.2,1) both;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  border-color: var(--border-l);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-info { flex: 1; min-width: 0; }
.card-info span {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.card-info strong {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-green .card-icon { background: rgba(0,230,118,.12); color: var(--green); }
.card-green .card-info strong { color: var(--green); }

.card-red .card-icon { background: rgba(225,19,0,.12); color: var(--red); }
.card-red .card-info strong { color: var(--red); }

.card-blue .card-icon { background: rgba(68,138,255,.12); color: var(--blue); }
.card-blue .card-info strong { color: var(--blue); }

.card-orange .card-icon { background: rgba(255,109,0,.12); color: var(--orange); }
.card-orange .card-info strong { color: var(--orange); }

.card-purple .card-icon { background: rgba(213,0,249,.12); color: var(--purple); }
.card-purple .card-info strong { color: var(--purple); }

.card-yellow .card-icon { background: rgba(255,214,0,.12); color: var(--yellow); }
.card-yellow .card-info strong { color: var(--yellow); }

/* ===========================
   PANELS
   =========================== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

/* Wrapper scroll horizontal para tabelas em painéis */
.panel .data-table {
  min-width: 520px;
}
.panel > .data-table {
  display: block;
  overflow-x: auto;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.panel-full { margin-bottom: 24px; }

/* ===========================
   DATA TABLES
   =========================== */
.table-filters {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: .85rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
  min-width: 160px;
}
.filter-input:focus { border-color: var(--accent); }

.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: .85rem;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--accent); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table td:last-child {
  width: 72px;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-hover); }
.data-table tbody tr { transition: background .15s; }

.table-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.table-total strong { font-size: 1.1rem; }

.color-green { color: var(--green) !important; }
.color-red   { color: var(--red) !important; }
.color-blue  { color: var(--blue) !important; }

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
  background: linear-gradient(135deg, #e11300, #8e0000);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(255,60,95,.15);
  color: var(--red);
  border: 1px solid rgba(255,60,95,.35);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all .2s;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon.edit:hover { color: var(--blue); }
.btn-icon.del:hover  { color: var(--red); }

/* ===========================
   KANBAN BOARD
   =========================== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.kanban-col-header h3 {
  font-size: .88rem;
  font-weight: 700;
  flex: 1;
}
.kanban-col-header .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.col-count {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.negotiating .dot { background: var(--blue); }
.negotiating      { border-top: 3px solid var(--blue); }
.closing .dot     { background: var(--orange); }
.closing          { border-top: 3px solid var(--orange); }
.closed .dot      { background: var(--green); }
.closed           { border-top: 3px solid var(--green); }
.lost .dot        { background: var(--text-muted); }
.lost             { border-top: 3px solid var(--text-muted); }

.kanban-cards {
  padding: 12px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all .2s;
}
.kanban-card:hover {
  border-color: var(--border-l);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.kanban-card-title {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kanban-card-meta {
  font-size: .76rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.kanban-card-value {
  display: inline-block;
  margin-top: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
}
.kanban-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  padding: 20px 0;
}

/* ===========================
   CONTAS
   =========================== */
.contas-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
  width: 100%;
}

.contas-grid .panel {
  width: fit-content;
  min-width: min(100%, 600px);
  max-width: 100%;
}

.contas-grid .data-table {
  width: auto;
  table-layout: auto;
  border-collapse: collapse;
}
.contas-grid .data-table th,
.contas-grid .data-table td {
  white-space: nowrap;
  padding: 10px 18px;
}

.contas-total-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  margin-top: 4px;
}
.contas-total-item {
  text-align: center;
}
.contas-total-item span {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.contas-total-item strong {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.contas-total-sep {
  font-size: 1.6rem;
  color: var(--border-l);
  font-weight: 300;
}
.contas-total-geral strong {
  font-size: 1.6rem;
  background: linear-gradient(135deg, #e11300, #8e0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   STATUS BADGES
   =========================== */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.status-negotiating { background: rgba(68,138,255,.15); color: var(--blue); }
.status-closing     { background: rgba(255,109,0,.15);  color: var(--orange); }
.status-closed      { background: rgba(0,230,118,.15);  color: var(--green); }
.status-lost        { background: rgba(85,85,85,.15);   color: var(--text-muted); }
.status-pendente    { background: rgba(255,214,0,.15);  color: var(--yellow); }
.status-paga        { background: rgba(0,230,118,.15);  color: var(--green); }
.status-atrasada    { background: rgba(225,19,0,.15);   color: var(--red); }

/* ===========================
   PIPELINE MINI (DASHBOARD)
   =========================== */
.pipeline-mini {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pipeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .85rem;
}
.pipeline-label {
  min-width: 120px;
  color: var(--text-secondary);
  font-weight: 500;
}
.pipeline-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}
.pipeline-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .5s ease;
}
.pipeline-count {
  min-width: 28px;
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===========================
   MOVIMENTOS LIST
   =========================== */
.movimentos-list {
  padding: 8px 0;
  max-height: 280px;
  overflow-y: auto;
}
.movimento-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.movimento-item:last-child { border-bottom: none; }
.movimento-item:hover { background: var(--bg-hover); }
.mov-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.mov-entrada { background: rgba(0,230,118,.12); }
.mov-saida   { background: rgba(225,19,0,.12); }
.mov-info { flex: 1; min-width: 0; }
.mov-desc {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mov-date {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.mov-valor {
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.txt-green { color: var(--green); }
.txt-red   { color: var(--red); }
.txt-blue  { color: var(--blue); }
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  padding: 32px 20px;
}

/* ===========================
   CHART
   =========================== */
.chart-container {
  padding: 20px;
  position: relative;
  min-height: 220px;
}

/* ===========================
   RELATORIO FILTERS
   =========================== */
.relatorio-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===========================
   MODALS
   =========================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
}
.modal-lg { max-width: 680px; }
.modal-sm { max-width: 400px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .2s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body {
  padding: 20px 24px;
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
}

.modal-form {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-group label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: .875rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* ===========================
   TOAST
   =========================== */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-l);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  max-width: 340px;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--blue); }

/* ===========================
   SIDEBAR OVERLAY
   =========================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ===========================
   BOTTOM NAV (mobile)
   =========================== */
.bottom-nav {
  display: none;
}

/* ===========================
   RESPONSIVE — Tablet (≤1100px)
   =========================== */
@media (max-width: 1100px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-row {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ===========================
   RESPONSIVE — Mobile (≤768px)
   =========================== */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --topbar-h: 56px;
  }

  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    z-index: 200;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle  { display: flex; }

  .topbar { padding: 0 14px; }
  .page-title { font-size: .95rem; }
  .badge-month { display: none; }

  .section { padding: 14px 12px 80px; }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card { padding: 16px 14px; gap: 10px; }
  .card-icon { width: 36px; height: 36px; }
  .card-icon svg { width: 18px; height: 18px; }
  .card-info strong { font-size: 1.05rem; }

  .dashboard-row { grid-template-columns: 1fr; gap: 12px; }
  .kanban-board  { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }

  .data-table { font-size: .8rem; }
  .data-table th, .data-table td { padding: 10px 12px; }

  .contas-grid .panel { width: 100%; min-width: unset; }
  .contas-grid .data-table { width: 100%; table-layout: auto; }
  .contas-grid .data-table th,
  .contas-grid .data-table td { white-space: normal; padding: 8px 10px; }

  .panel-header h2 { font-size: .9rem; }
  .section-header h2 { font-size: 1.05rem; }

  .modal { margin: 0; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-overlay.open { display: flex; }

  .contas-total-bar { gap: 20px; padding: 18px 16px; }
  .contas-total-item strong { font-size: 1.05rem; }
  .contas-total-geral strong { font-size: 1.2rem; }

  .toast { bottom: 80px; right: 12px; left: 12px; max-width: unset; }

  /* Bottom Nav */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    z-index: 150;
    align-items: stretch;
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: color .2s;
    padding: 6px 0;
  }
  .bottom-nav-item svg {
    width: 20px; height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bottom-nav-item.active {
    color: var(--accent);
  }
  .bottom-nav-item:active {
    background: var(--bg-hover);
  }
}

/* ===========================
   RESPONSIVE — Small Mobile (≤420px)
   =========================== */
@media (max-width: 420px) {
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { padding: 12px 10px; }
  .card-info strong { font-size: .95rem; }
  .section { padding: 10px 8px 80px; }
  .table-filters { flex-direction: column; gap: 8px; }
  .filter-input, .filter-select { width: 100%; }
  .relatorio-filters { flex-direction: column; gap: 8px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .kanban-col-header h3 { font-size: .8rem; }
}
