/* ============================================================
   FINANÇAS ERP - Estilos
   Design mobile-first, responsivo
   ============================================================ */

:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --primary-light: #EEF2FF;
  --green: #10B981;
  --green-light: #ECFDF5;
  --red: #EF4444;
  --red-light: #FEF2F2;
  --yellow: #F59E0B;
  --yellow-light: #FFFBEB;
  --blue: #3B82F6;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --nav-h: 64px;
  --header-h: 56px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  background: var(--gray-50);
  color: var(--gray-800);
  overscroll-behavior: none;
}

/* ---- SCREENS ---- */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; }

/* ---- AUTH ---- */
#screen-auth {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #7C3AED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100dvh;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon {
  width: 64px; height: 64px;
  background: var(--primary-light);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}
.auth-logo h1 { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.auth-logo p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.auth-error {
  background: var(--red-light);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* ---- APP LAYOUT ---- */
#screen-app {
  display: none !important;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
#screen-app.active {
  display: flex !important;
}
#screen-auth {
  display: none !important;
}
#screen-auth.active {
  display: flex !important;
}
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-logo { font-size: 20px; font-weight: 800; color: var(--primary); }
.header-month-nav { display: flex; align-items: center; gap: 4px; }
.header-month-nav button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 16px;
  transition: background 0.15s;
}
.header-month-nav button:hover { background: var(--gray-100); }
.header-month-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  min-width: 110px;
  text-align: center;
}
.header-right { display: flex; align-items: center; gap: 8px; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gray-500);
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--gray-100); }

/* ---- PAGES ---- */
.pages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--nav-h);
}
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 4px;
  transition: color 0.15s;
  position: relative;
}
.nav-item.active { color: var(--primary); }
.nav-item .nav-icon { font-size: 20px; line-height: 1; }
.nav-item.nav-add {
  position: relative;
  top: -14px;
}
.nav-item.nav-add .nav-fab {
  width: 52px; height: 52px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-item.nav-add:hover .nav-fab { transform: scale(1.08); box-shadow: 0 6px 16px rgba(99,102,241,.5); }
.nav-item.nav-add .nav-label { color: var(--primary); font-size: 11px; margin-top: 2px; }

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin: 12px 16px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title a {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ---- BALANCE CARD ---- */
.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin: 12px 16px;
  color: var(--white);
}
.balance-card.negative { background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%); }
.balance-label { font-size: 12px; opacity: 0.85; font-weight: 500; margin-bottom: 6px; }
.balance-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; }
.balance-row { display: flex; gap: 16px; }
.balance-item { flex: 1; }
.balance-item-label { font-size: 11px; opacity: 0.75; margin-bottom: 3px; }
.balance-item-value { font-size: 17px; font-weight: 700; }
.balance-item-value.income { color: #6EE7B7; }
.balance-item-value.expense { color: #FCA5A5; }

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 4px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-icon { font-size: 22px; margin-bottom: 6px; }
.stat-label { font-size: 11px; color: var(--gray-500); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.stat-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ---- TRANSACTION ITEMS ---- */
.transaction-list { display: flex; flex-direction: column; gap: 0; }
.transaction-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.transaction-item:last-child { border-bottom: none; }
.transaction-item:hover { background: var(--gray-50); }
.transaction-item:active { background: var(--gray-100); }
.t-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--gray-100);
}
.t-info { flex: 1; margin: 0 10px; min-width: 0; }
.t-desc { font-size: 14px; font-weight: 500; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.t-amount { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.t-amount.receita { color: var(--green); }
.t-amount.despesa { color: var(--red); }
.t-delete {
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-300);
  font-size: 16px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: none;
}
.transaction-item:hover .t-delete { display: block; }
.t-delete:hover { color: var(--red); background: var(--red-light); }

/* ---- DATE SEPARATOR ---- */
.date-separator {
  padding: 8px 16px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

/* ---- PROGRESS BAR ---- */
.progress-wrap { margin-bottom: 4px; }
.progress-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.progress-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.progress-values { font-size: 12px; color: var(--gray-500); }
.progress-values strong { color: var(--gray-800); }
.progress-bar-track {
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width 0.4s ease;
}
.progress-bar-fill.warn { background: var(--yellow); }
.progress-bar-fill.danger { background: var(--red); }
.progress-bar-fill.over { background: var(--red); width: 100% !important; }

/* ---- BUDGET ITEMS ---- */
.budget-section-title {
  padding: 12px 16px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gray-50);
}
.budget-item {
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}
.budget-item:last-child { border-bottom: none; }
.budget-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.budget-item-name { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.budget-item-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
}
.budget-item-badge.fixo { background: #EFF6FF; color: #3B82F6; }
.budget-item-badge.variavel { background: #FFF7ED; color: #F97316; }
.budget-item-badge.temporario { background: #FDF4FF; color: #A855F7; }

/* ---- CHARTS ---- */
.chart-container { position: relative; padding: 8px 0; }
.chart-container canvas { max-height: 220px; }

/* ---- RESERVE CARD ---- */
.reserve-card {
  background: linear-gradient(135deg, #065F46 0%, #047857 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin: 12px 16px;
}
.reserve-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.reserve-title { font-size: 14px; opacity: 0.85; font-weight: 500; }
.reserve-percent { font-size: 28px; font-weight: 800; }
.reserve-values { font-size: 13px; opacity: 0.8; margin-bottom: 12px; }
.reserve-bar-track { height: 10px; background: rgba(255,255,255,0.2); border-radius: 999px; overflow: hidden; }
.reserve-bar-fill { height: 100%; background: #6EE7B7; border-radius: 999px; transition: width 0.5s; }
.reserve-projection {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 16px;
}
.reserve-projection h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--gray-800); }
.phase-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.phase-item:last-child { border-bottom: none; }
.phase-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.phase-dot.p1 { background: #FEF3C7; }
.phase-dot.p2 { background: #D1FAE5; }
.phase-dot.p3 { background: #EDE9FE; }
.phase-info h5 { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.phase-info p { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-control::placeholder { color: var(--gray-400); }
.input-amount {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.5px;
  color: var(--gray-900);
}
.input-amount.receita { color: var(--green); }
.input-amount.despesa { color: var(--red); }
select.form-control { cursor: pointer; }

/* ---- TYPE TOGGLE ---- */
.type-toggle {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
}
.type-toggle button {
  flex: 1;
  border: none;
  background: none;
  padding: 9px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.2s;
}
.type-toggle button.active {
  background: var(--white);
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}
.type-toggle button.active.despesa { color: var(--red); }
.type-toggle button.active.receita { color: var(--green); }

/* ---- CATEGORY GRID ---- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.cat-btn .cat-icon { font-size: 22px; }
.cat-btn .cat-name { font-size: 10px; font-weight: 500; color: var(--gray-600); text-align: center; line-height: 1.2; }
.cat-btn.selected { border-color: var(--primary); background: var(--primary-light); }
.cat-btn.selected .cat-name { color: var(--primary); }

/* ---- OWNER TABS ---- */
.owner-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.owner-tab {
  flex: 1;
  padding: 8px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
  transition: all 0.15s;
}
.owner-tab.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  width: 100%;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: #FECACA; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: #059669; }
.btn-sm { padding: 7px 14px; font-size: 13px; width: auto; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- MODALS ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 95dvh;
  overflow-y: auto;
  padding: 16px 16px 32px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--gray-200);
  border-radius: 999px;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  text-align: center;
}

/* ---- TOAST ---- */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--gray-900);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.2s ease;
  white-space: nowrap;
}
.toast.success { background: #065F46; }
.toast.error { background: #991B1B; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* ---- LOADING ---- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ---- ALERT BOX ---- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin: 8px 16px;
}
.alert-warning { background: var(--yellow-light); color: #92400E; border-left: 4px solid var(--yellow); }
.alert-success { background: var(--green-light); color: #065F46; border-left: 4px solid var(--green); }
.alert-danger { background: var(--red-light); color: #991B1B; border-left: 4px solid var(--red); }
.alert-info { background: var(--primary-light); color: #3730A3; border-left: 4px solid var(--primary); }
.alert strong { display: block; margin-bottom: 3px; }

/* ---- SECTION HEADER ---- */
.section-header {
  padding: 14px 16px 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

/* ---- DIVIDER ---- */
.divider { height: 8px; background: var(--gray-50); }

/* ---- SETTINGS ---- */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
}
.settings-item:hover { background: var(--gray-50); }
.settings-item-left { display: flex; align-items: center; gap: 12px; }
.settings-item-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.settings-item-title { font-size: 14px; font-weight: 500; color: var(--gray-800); }
.settings-item-sub { font-size: 12px; color: var(--gray-400); }

/* ---- RESPONSIVE ---- */
@media (min-width: 600px) {
  .pages-container { max-width: 600px; margin: 0 auto; }
  .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); }
  .modal-sheet { border-radius: 20px; margin-bottom: 20px; }
}

/* ---- PAGE PADDING ---- */
.page-top-pad { height: 12px; }

/* ---- TABS ---- */
.tab-bar {
  display: flex;
  background: var(--white);
  border-bottom: 2px solid var(--gray-100);
  padding: 0 16px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- BILL ITEMS (Contas do Mês) ---- */
.bill-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
  transition: background 0.1s;
}
.bill-item:last-child { border-bottom: none; }
.bill-item.paid { background: #F0FDF4; }
.bill-check {
  font-size: 24px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
  user-select: none;
}
.bill-check:hover { transform: scale(1.15); }
.bill-info { flex: 1; min-width: 0; }
.bill-name { font-size: 14px; font-weight: 500; color: var(--gray-800); }
.bill-name.paid-text { color: var(--gray-400); text-decoration: line-through; }
.bill-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.bill-amount { font-size: 15px; font-weight: 700; color: var(--gray-700); flex-shrink: 0; }
.bill-amount.paid { color: var(--green); }
.bill-pay-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.bill-pay-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.bill-paid-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
}
.bill-summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 8px;
}
.bill-summary-card {
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.bill-summary-card .bsc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.bill-summary-card .bsc-value { font-size: 15px; font-weight: 800; }
.bill-summary-card .bsc-sub { font-size: 10px; margin-top: 2px; }

/* ---- ACCOUNT CARDS ---- */
.account-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
  cursor: pointer;
  transition: background 0.1s;
}
.account-card:hover { background: var(--gray-50); }
.account-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.account-info { flex: 1; min-width: 0; }
.account-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.account-bank { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.account-balance { font-size: 17px; font-weight: 800; flex-shrink: 0; }
.account-balance.positive { color: var(--green); }
.account-balance.negative { color: var(--red); }
.account-type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  flex-shrink: 0;
}
