/* ============================================================
   iFinance — Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ---- Tokens ---- */
:root {
  --bg:      #0e1117;
  --surface: rgba(20, 26, 42, 0.82);
  --surface-high: rgba(24, 31, 50, 0.98);
  --surface-hover: rgba(255,255,255,0.04);

  --border:       rgba(255,255,255,0.07);
  --border-mid:   rgba(255,255,255,0.10);
  --border-strong:rgba(255,255,255,0.16);

  --text:  #e2e8f0;
  --muted: #8892a4;
  --faint: #3d4a5c;

  --green:  #22c55e;
  --green-bg: rgba(34,197,94,0.12);
  --red:    #f87171;
  --red-bg: rgba(248,113,113,0.12);
  --blue:   #60a5fa;
  --blue-bg: rgba(96,165,250,0.12);
  --amber:  #fbbf24;
  --amber-bg: rgba(251,191,36,0.12);
  --purple: #a78bfa;

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow:    0 6px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --max-w: 1180px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 800; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Base ---- */
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 65% 45% at 12% 18%, rgba(96,165,250,0.055) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 88% 75%, rgba(34,197,94,0.045) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.85; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  max-width: var(--max-w);
  margin: 14px auto 0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar-left { display: flex; align-items: center; }
.navbar-right { display: flex; align-items: center; gap: 8px; }

.brand-link {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.2px;
}
.brand-link:hover { opacity: 0.9; }

.navbar-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 18px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link.active {
  background: rgba(255,255,255,0.09);
  color: var(--text);
  border-color: var(--border-mid);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 24px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s;
}
.user-pill:hover { background: var(--surface-hover); }

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}
.user-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}
.navbar-name { white-space: nowrap; }

/* ============================================================
   PANEL (generic surface)
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ============================================================
   CONTROL BAR (period + category selector)
   ============================================================ */
.control-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 16px;
  margin: 14px 0 10px;
}
.control-bar form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.period-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   INPUTS, SELECTS, DATES (global style)
   ============================================================ */
input[type="date"],
select {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"]:focus,
select:focus {
  border-color: rgba(96,165,250,0.55);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.12);
}

/* ============================================================
   SUMMARY CARDS
   ============================================================ */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-card::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}

.stat-card-icon { font-size: 20px; line-height: 1; opacity: 0.85; }
.stat-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.8;
}
.stat-card-value {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-card-sub { font-size: 12px; opacity: 0.7; }

.stat-card-adjust {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  background: rgba(255,255,255,0.2);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.stat-card-adjust:hover { background: rgba(255,255,255,0.3); }

.stat-card-green { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); color: #fff; }
.stat-card-red   { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); color: #fff; }
.stat-card-blue  { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: #fff; cursor: pointer; }

/* ============================================================
   TABLE PANEL
   ============================================================ */
.table-panel { margin-bottom: 12px; }

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px 10px;
}

/* View tabs */
.table-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.tab-link:hover { background: var(--surface-hover); color: var(--text); }
.tab-link.tab-active-pending {
  background: var(--blue-bg); color: var(--blue); border-color: rgba(96,165,250,0.2);
}
.tab-link.tab-active-paid {
  background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,0.2);
}
.tab-link.tab-active-salary {
  background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,0.2);
}
.tab-link.tab-active-income {
  background: var(--blue-bg); color: var(--blue); border-color: rgba(96,165,250,0.2);
}

/* Search + filter row */
.table-actions { display: flex; align-items: center; gap: 8px; }

.search-bar { display: flex; align-items: center; gap: 6px; }
.search-input {
  width: 200px;
  max-width: 40vw;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid var(--border-mid);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, width 0.2s ease;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus {
  width: 240px;
  border-color: rgba(96,165,250,0.5);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.10);
}

.btn-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.btn-filter img { width: 16px; height: 16px; opacity: 0.7; }
.btn-filter:hover { background: rgba(255,255,255,0.10); border-color: var(--border-strong); }
.btn-filter.active { background: var(--blue-bg); border-color: rgba(96,165,250,0.3); }
.btn-filter.active img { opacity: 1; }
.filter-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg);
}

/* Table */
.table-wrap { overflow-x: auto; }

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.grid thead th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.14);
  white-space: nowrap;
}
table.grid thead th.sortable { cursor: pointer; user-select: none; transition: color 0.15s; }
table.grid thead th.sortable:hover { color: var(--text); }

.sort-arrow { display: inline-block; margin-left: 3px; color: var(--blue); font-size: 10px; font-weight: 900; }

table.grid tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
table.grid tbody tr { transition: background 0.1s; cursor: pointer; }
table.grid tbody tr:hover { background: var(--surface-hover); }
table.grid tbody tr.selected {
  background: rgba(96,165,250,0.07);
  outline: 1px solid rgba(96,165,250,0.18);
  outline-offset: -1px;
}
table.grid tbody tr.row-entrada td:first-child { border-left: 3px solid var(--green); }
table.grid tbody tr.row-saida  td:first-child { border-left: 3px solid var(--red);   }

.col-center { text-align: center !important; }
.col-right  { text-align: right !important;  }
.desc { max-width: 300px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 800;
  margin-left: 5px;
  white-space: nowrap;
}
.badge-purple { background: rgba(167,139,250,0.15); color: var(--purple); }

.empty-state {
  text-align: center;
  padding: 44px 16px;
  color: var(--faint);
  font-size: 14px;
}
.empty-state-icon { font-size: 30px; margin-bottom: 8px; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}
.pagination-info { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* Action bar (table footer) */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.action-bar-left { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.action-bar-right { display: flex; align-items: center; gap: 7px; }

/* ============================================================
   CHART
   ============================================================ */
.chart-panel { margin-bottom: 12px; }
.chart-header {
  padding: 14px 18px 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.chart-wrap {
  height: 300px;
  padding: 16px 16px 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.btn-primary:hover { background: #1d4ed8; }

.btn-success { background: #16a34a; color: #fff; border-color: #15803d; }
.btn-success:hover { background: #15803d; }

.btn-danger {
  background: rgba(220,38,38,0.1);
  color: var(--red);
  border-color: rgba(220,38,38,0.2);
}
.btn-danger:hover { background: rgba(220,38,38,0.18); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border-mid);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }

.btn-light {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border: 1px solid var(--border-mid);
}
.btn-light:hover { background: rgba(255,255,255,0.11); }

.btn-sm { padding: 5px 10px; font-size: 12px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
  animation: fade-in 0.15s ease;
}
.modal-backdrop.show { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 560px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface-high);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.2s cubic-bezier(0.22,1,0.36,1);
}
@keyframes slide-up { from { transform: translateY(12px); opacity: 0.8; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface-high);
  z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 900; }

.modal-body { padding: 20px; }

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

/* Form fields */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(96,165,250,0.6);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.12);
}
.field input[type="file"] { padding: 8px 10px; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 4px 10px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.field input[type="file"]::file-selector-button:hover { background: rgba(255,255,255,0.13); }
.field-hint { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.4; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 22px 16px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

/* ============================================================
   COFRINHO PAGE
   ============================================================ */
.cofrinho-hero {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 28px rgba(217,119,6,0.3);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.cofrinho-hero::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  top: -50px;
  right: -30px;
}
.cofrinho-hero::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -30px;
  left: 20px;
}
.cofrinho-hero-icon { font-size: 36px; margin-bottom: 8px; line-height: 1; }
.cofrinho-hero-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 6px;
}
.cofrinho-hero-value {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 4px;
}
.cofrinho-hero-sub { font-size: 13px; opacity: 0.7; }

.cofrinho-section { padding: 22px 24px; }
.cofrinho-section + .cofrinho-section { border-top: 1px solid var(--border); }
.cofrinho-section-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.cofrinho-section-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }

.deposito-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.deposito-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.deposito-info h4 { margin: 0 0 3px; font-size: 15px; font-weight: 800; }
.deposito-info p  { margin: 0; font-size: 12px; color: var(--muted); }

/* Transferência form */
.transfer-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 12px;
}
.transfer-form h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; }

/* ============================================================
   PERFIL PAGE
   ============================================================ */
.perfil-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.perfil-avatar-wrap { text-align: center; padding: 28px 28px 20px; border-bottom: 1px solid var(--border); }
.perfil-form-wrap { padding: 24px; }
.perfil-section-title { font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.perfil-divider { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

/* ============================================================
   TOAST SYSTEM
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 10001;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 350px;
  max-width: 90vw;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toast-in 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
}
.toast.hiding { animation: toast-out 0.35s ease forwards; }
@keyframes toast-in  { from { transform: translateY(32px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(50px); } }

.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-ok    .toast-icon { background: rgba(34,197,94,0.12);  color: var(--green); }
.toast-error .toast-icon { background: rgba(248,113,113,0.12); color: var(--red);   }
.toast-info  .toast-icon { background: rgba(96,165,250,0.12);  color: var(--blue);  }
.toast-content { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.toast-close {
  background: transparent;
  border: none;
  color: var(--faint);
  font-size: 15px;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s;
}
.toast-close:hover { color: var(--text); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; font-weight: 700; border: 1px solid; }
.alert-error { color: var(--red);   border-color: rgba(248,113,113,0.2); background: rgba(248,113,113,0.08); }
.alert-ok    { color: var(--green); border-color: rgba(34,197,94,0.2);   background: rgba(34,197,94,0.08); }
.alert-info  { color: var(--blue);  border-color: rgba(96,165,250,0.2);  background: rgba(96,165,250,0.08); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .navbar { flex-wrap: wrap; padding: 10px 14px; margin: 10px 10px 0; }
  .navbar-nav { margin-left: 0; margin-top: 2px; }
  .cards-row { grid-template-columns: 1fr; gap: 8px; }
  .stat-card-value { font-size: 26px; }
  .table-header { flex-direction: column; align-items: flex-start; }
  .control-bar { flex-direction: column; align-items: flex-start; }
  .row-3 { grid-template-columns: 1fr; }
  .chart-wrap { height: 250px; }
  .action-bar { flex-direction: column; align-items: flex-start; }
  .action-bar-right { width: 100%; }
  .cofrinho-hero-value { font-size: 40px; }
}

@media (max-width: 600px) {
  .app-shell { padding: 0 10px 32px; }
  .search-input { width: 100%; max-width: none; }
  .search-input:focus { width: 100%; }
  .toast-container { right: 12px; left: 12px; bottom: 14px; }
  .toast { width: 100%; }
  .navbar-nav { flex-wrap: wrap; }
  .modal { border-radius: var(--radius); }
}

@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
  .stat-card { padding: 16px 18px; }
  .stat-card-value { font-size: 24px; }
}
