/* Cartões de resumo e tabela de transações. */

/* ─── SUMMARY CARDS ─── */
.summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.summary-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden; transition: border-color 0.2s;
}
.summary-card:hover { border-color: var(--border2); }
.summary-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.summary-card.green::before { background: var(--green); }
.summary-card.red::before { background: var(--red); }
.summary-card.blue::before { background: var(--info); }
.summary-card.yellow::before { background: var(--warn); }
.summary-card.purple::before { background: var(--accent2); }
.summary-card.accent::before { background: var(--accent); }
.sc-label { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; font-weight: 500; }
.sc-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; }
.sc-value.green { color: var(--green); }
.sc-value.red { color: var(--red); }
.sc-value.accent { color: var(--acc-ink); }
.sc-sub { font-size: 12px; color: var(--text3); margin-top: 4px; }
.sc-icon { position: absolute; top: 20px; right: 20px; font-size: 22px; opacity: 0.5; }

/* ─── TRANSACTION TABLE ─── */
.table-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow);
  overflow: hidden;
}
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: 15px; font-weight: 700; }
.table-actions { display: flex; gap: 8px; }
.btn-sm {
  padding: 7px 14px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 13px; font-family: 'Inter', sans-serif; font-weight: 500;
  transition: all 0.2s;
}
.btn-sm.accent { background: var(--accent); color: #0a0a0f; }
.btn-sm.accent:hover { opacity: 0.9; }
.btn-sm.ghost { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.btn-sm.ghost:hover { color: var(--text); border-color: var(--border2); }
.btn-sm.danger { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.btn-sm.danger:hover { background: rgba(239,68,68,0.25); }

.monthly-table-wrap { overflow-x: auto; max-height: 600px; overflow-y: auto; }
.daily-table { width: 100%; border-collapse: collapse; }
.daily-table thead { position: sticky; top: 0; z-index: 10; }
.daily-table th {
  padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--bg3); border-bottom: 1px solid var(--border);
}
.daily-table td {
  padding: 0; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: top;
}
.daily-table tr:last-child td { border-bottom: none; }
.day-row { cursor: pointer; transition: background 0.15s; }
.day-row:hover { background: var(--hover); }
.day-row.today .day-num { background: var(--accent); color: #0a0a0f; }
.day-row.over-budget { background: rgba(239,68,68,0.04); }
.day-row.good-budget { background: rgba(34,197,94,0.02); }

.day-cell { padding: 7px 10px; }
.day-num {
  width: 28px; height: 28px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 13px; background: var(--bg3); color: var(--text2);
}
.day-num.weekend { background: rgba(124,58,237,0.2); color: var(--accent2); }

.amount-in { color: var(--green); font-weight: 600; }
.amount-out { color: var(--red); font-weight: 600; }
.amount-zero { color: var(--text3); }
.balance-positive { color: var(--acc-ink); font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; }
.balance-negative { color: var(--red); font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; }
.daily-limit { font-size: 12px; }
.daily-limit.ok { color: var(--accent3); }
.daily-limit.warn { color: var(--warn); }
.daily-limit.over { color: var(--red); }

.transactions-mini { padding: 4px 16px 10px; }
.tx-mini {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 12px; color: var(--text2); border-top: 1px solid var(--border);
}
.tx-mini:first-child { border-top: none; }
.tx-mini .cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tx-mini .tx-desc { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-mini .tx-val { font-weight: 600; flex-shrink: 0; }
.tx-mini .tx-actions { display: none; gap: 4px; }
.tx-mini:hover .tx-actions { display: flex; }
.tx-icon-btn {
  width: 20px; height: 20px; border-radius: 4px; border: none; cursor: pointer;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--bg3); color: var(--text2); transition: all 0.15s;
}
.tx-icon-btn:hover { background: var(--border); color: var(--text); }
.tx-icon-btn.del:hover { background: rgba(239,68,68,0.2); color: var(--red); }
