/* ============================================
   MONEY MANAGER - COMPONENTS CSS
   Cards, Buttons, Modals, Forms, Badges, etc.
   ============================================ */

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.45);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-success {
  background: linear-gradient(135deg, var(--success), #16a34a);
  color: white;
  box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}
.btn-success:hover:not(:disabled) { transform: translateY(-1px); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
.btn-danger:hover:not(:disabled) { transform: translateY(-1px); }

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--text-primary);
}
[data-theme="dark"] .btn-ghost:hover:not(:disabled) { background: var(--surface-2); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.btn-icon-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  font-size: 12px;
}

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-body { padding: 16px; }
.card-body-sm { padding: 12px; }
.card-body-lg { padding: 20px 24px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}

/* Summary/Stat Cards */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.stat-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.stat-card-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-top: 6px;
}

.trend-up { background: var(--success-bg); color: var(--success); }
.trend-down { background: var(--danger-bg); color: var(--danger); }

/* Hero stat card */
.hero-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-xl);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(99,102,241,0.35);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -20px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-card-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.hero-card-value {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-card-row {
  display: flex;
  gap: 20px;
}

.hero-card-item label {
  font-size: 11px;
  opacity: 0.7;
  display: block;
}

.hero-card-item span {
  font-size: 15px;
  font-weight: 700;
}

/* Account Cards */
.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  cursor: pointer;
}

.account-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.account-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.account-info { flex: 1; min-width: 0; }
.account-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.account-type { font-size: 12px; color: var(--text-muted); }
.account-balance { font-size: 18px; font-weight: 800; text-align: right; }
.account-bank { font-size: 11px; color: var(--text-muted); text-align: right; }

/* Item Cards (loans, EMI, etc.) */
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.item-card:hover { box-shadow: var(--shadow-md); }

.item-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.item-card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.item-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.item-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.item-card-body { }

.item-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}

.item-card-row label { color: var(--text-muted); font-weight: 500; }
.item-card-row span { font-weight: 600; color: var(--text-primary); }

.item-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

[data-theme="dark"] .badge-gray { background: var(--surface-2); color: var(--gray-400); }

/* ============ PROGRESS BAR ============ */
.progress-wrapper {
  margin: 8px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

[data-theme="dark"] .progress-bar { background: var(--surface-2); }

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.progress-fill.success { background: linear-gradient(90deg, var(--success), #4ade80); }
.progress-fill.warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-fill.danger { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInOverlay 0.2s ease;
}

.modal-overlay.closing { animation: fadeOutOverlay 0.2s ease forwards; }

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOutOverlay { from { opacity: 1; } to { opacity: 0; } }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.25s ease;
}

.modal.closing { animation: slideDown 0.2s ease forwards; }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideDown { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }

.modal-header {
  display: flex;
  align-items: center;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-shrink: 0;
}

.modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--primary-bg);
  color: var(--primary);
}

.modal-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition);
}

[data-theme="dark"] .modal-close { background: var(--surface-2); }
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.modal-sm .modal { max-width: 380px; }
.modal-lg .modal { max-width: 680px; }

/* Bottom Sheet (Mobile) */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  animation: fadeInOverlay 0.2s ease;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  animation: sheetUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 10px auto;
  flex-shrink: 0;
}

[data-theme="dark"] .sheet-handle { background: var(--gray-600); }

.sheet-header {
  display: flex;
  align-items: center;
  padding: 4px 20px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.sheet-title { font-size: 16px; font-weight: 700; flex: 1; }

.sheet-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 32px;
}

.sheet-footer {
  padding: 12px 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.sheet-footer .btn { flex: 1; }

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label span.required { color: var(--danger); margin-left: 3px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-control::placeholder { color: var(--text-muted); font-weight: 400; }

.form-control:invalid.touched { border-color: var(--danger); }

.form-control-icon {
  position: relative;
}

.form-control-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.form-control-icon .form-control { padding-left: 38px; }

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Select */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

/* Toggle / Checkbox */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.toggle-group label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.toggle-group span { font-size: 12px; color: var(--text-muted); }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

[data-theme="dark"] .toggle-slider { background: var(--gray-600); }

/* ============ TABS ============ */
.tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
  margin-bottom: 16px;
}

[data-theme="dark"] .tabs { background: var(--surface-2); }

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .tab-btn.active { background: var(--surface); }

/* ============ LIST ITEMS ============ */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.list-item:last-child { border-bottom: none; }

.list-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.list-content { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.list-amount { text-align: right; flex-shrink: 0; }
.list-amount-value { font-size: 15px; font-weight: 700; }
.list-amount-sub { font-size: 11px; color: var(--text-muted); }

/* ============ EMPTY STATE ============ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--gray-100);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

[data-theme="dark"] .empty-state-icon { background: var(--surface-2); }

.empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 280px;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ============ ALERT BANNERS ============ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.alert i { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

.alert-warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid rgba(245,158,11,0.2);
}
[data-theme="dark"] .alert-warning { color: var(--warning); }

.alert-danger {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid rgba(239,68,68,0.2);
}
[data-theme="dark"] .alert-danger { color: var(--danger); }

.alert-success {
  background: var(--success-bg);
  color: #166534;
  border: 1px solid rgba(34,197,94,0.2);
}
[data-theme="dark"] .alert-success { color: var(--success); }

.alert-info {
  background: var(--info-bg);
  color: #1e40af;
  border: 1px solid rgba(59,130,246,0.2);
}
[data-theme="dark"] .alert-info { color: var(--info); }

/* ============ CONFIRM DIALOG ============ */
.confirm-dialog {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.2s ease;
}

.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

.confirm-danger .confirm-icon { background: var(--danger-bg); color: var(--danger); }

.confirm-dialog h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.confirm-dialog p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }

.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { flex: 1; }

/* ============ SEARCH ============ */
.search-bar {
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.search-bar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }

/* ============ INSTALLMENT TIMELINE ============ */
.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.timeline-dot.paid {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}

.timeline-dot.upcoming {
  background: var(--gray-100);
  color: var(--text-muted);
  border-color: var(--gray-200);
}

[data-theme="dark"] .timeline-dot.upcoming {
  background: var(--surface-2);
  border-color: var(--surface-2);
}

.timeline-dot.current {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
  50% { box-shadow: 0 0 0 4px rgba(99,102,241,0.1); }
}

.timeline-dot:hover { transform: scale(1.15); }

.timeline-num { font-size: 9px; color: var(--text-muted); }

/* ============ CHART CARD ============ */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card-title { font-size: 15px; font-weight: 600; }
.chart-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============ DIVIDER ============ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ============ AMOUNT DISPLAY ============ */
.amount-large {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
}

.amount-medium {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.amount-small {
  font-size: 15px;
  font-weight: 700;
}

.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }
.amount-neutral { color: var(--text-primary); }

/* ============ FILTER ROW ============ */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-chip {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============ TWO COLUMN INFO ============ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

[data-theme="dark"] .info-item { background: var(--surface-2); }

.info-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.info-value { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-top: 2px; }
.info-value.success { color: var(--success); }
.info-value.danger { color: var(--danger); }
.info-value.warning { color: var(--warning); }

/* ============ NOTIFICATION BANNER ============ */
.notification-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
}

.notif-warning { background: var(--warning-bg); border-color: rgba(245,158,11,0.3); }
.notif-danger { background: var(--danger-bg); border-color: rgba(239,68,68,0.3); }
.notif-info { background: var(--info-bg); border-color: rgba(59,130,246,0.3); }

.notif-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }
.notif-warning .notif-icon { color: var(--warning); }
.notif-danger .notif-icon { color: var(--danger); }
.notif-info .notif-icon { color: var(--info); }

.notif-text strong { display: block; margin-bottom: 2px; }
.notif-text span { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* ============ HOVER TOOLTIP ============ */
.has-tooltip {
  position: relative;
  cursor: pointer;
}

.tooltip-card {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  padding: 10px;
  border-radius: var(--radius-sm);
  width: 180px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  font-size: 12px;
}

.has-tooltip:hover,
.has-tooltip:active {
  z-index: 101;
}

.has-tooltip:hover .tooltip-card,
.has-tooltip:active .tooltip-card {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: var(--text-secondary);
}

.tooltip-row:not(:last-child) {
  border-bottom: 1px dashed var(--border);
}

.tooltip-label {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}

.tooltip-value {
  font-weight: 700;
  color: var(--text-primary);
}
