/* ============================================================
   AriMulia Finance — Global Stylesheet
   Futuristic Dark Theme with Glassmorphism
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---- Design Tokens ---- */
:root {
  /* Colors */
  --bg-base:       #050b18;
  --bg-surface:    #0a1428;
  --bg-card:       rgba(10, 20, 50, 0.7);
  --bg-card-hover: rgba(15, 28, 65, 0.85);
  --bg-input:      rgba(8, 16, 38, 0.8);
  --bg-overlay:    rgba(0, 0, 0, 0.7);

  --cyan:          #00d4ff;
  --blue:          #0066ff;
  --blue-mid:      #0099ff;
  --green:         #00ff88;
  --red:           #ff4757;
  --amber:         #ffa502;
  --purple:        #a855f7;

  --text-primary:   #e8f4ff;
  --text-secondary: #7a9cc0;
  --text-muted:     #4a6080;
  --text-inverse:   #050b18;

  --border:        rgba(0, 212, 255, 0.12);
  --border-hover:  rgba(0, 212, 255, 0.3);
  --glow-cyan:     rgba(0, 212, 255, 0.2);
  --glow-blue:     rgba(0, 102, 255, 0.2);

  /* Typography */
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading:  'Space Grotesk', 'Inter', sans-serif;

  /* Sizing */
  --sidebar-w:      240px;
  --header-h:       64px;
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-card:    0 4px 24px rgba(0,0,0,0.4), 0 0 1px rgba(0,212,255,0.08);
  --shadow-glow:    0 0 24px rgba(0, 212, 255, 0.15);
  --shadow-inset:   inset 0 1px 0 rgba(255,255,255,0.05);

  /* Transitions */
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --fast:  150ms;
  --mid:   280ms;
  --slow:  450ms;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.4); }

/* ---- Background Ambient Blobs ---- */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,102,255,0.08) 0%, transparent 70%);
  top: -200px; right: -200px;
}
body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
  bottom: -150px; left: -150px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(10,20,50,0.95) 0%, rgba(5,11,24,0.98) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(0,212,255,0.3);
  flex-shrink: 0;
}
.sidebar-logo-text { flex: 1; }
.sidebar-logo-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.sidebar-logo-text span {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  position: relative;
  margin-bottom: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  user-select: none;
}
.nav-item:hover {
  background: rgba(0,212,255,0.06);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(0,212,255,0.1);
  color: var(--cyan);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--cyan);
  border-radius: 0 3px 3px 0;
}
.nav-item-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  font-size: 17px;
  flex-shrink: 0;
  transition: background var(--fast) var(--ease);
}
.nav-item.active .nav-item-icon,
.nav-item:hover .nav-item-icon {
  background: rgba(0,212,255,0.12);
}
.nav-item-label {
  font-size: 13.5px;
  font-weight: 500;
  flex: 1;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-month-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.sidebar-month-selector select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  flex: 1;
  outline: none;
}
.sidebar-month-selector select option { background: var(--bg-surface); }

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(5,11,24,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}
.header-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Page Container ---- */
.page-content {
  flex: 1;
  padding: 28px;
  display: none;
}
.page-content.active { display: block; }

/* ============================================================
   CARDS & GLASS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-inset);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
  overflow: hidden;
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-card), var(--shadow-glow); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.card-body { padding: 20px 24px 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- Summary Cards ---- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--mid) var(--ease);
  backdrop-filter: blur(16px);
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: 0.08;
  filter: blur(30px);
}
.summary-card.income::before  { background: var(--green);  right: -20px; top: -30px; }
.summary-card.expense::before { background: var(--red);    right: -20px; top: -30px; }
.summary-card.balance::before { background: var(--cyan);   right: -20px; top: -30px; }

.summary-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.summary-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.summary-label-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.summary-card.income  .summary-label-dot { background: var(--green); }
.summary-card.expense .summary-label-dot { background: var(--red); }
.summary-card.balance .summary-label-dot { background: var(--cyan); }

.summary-amount {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 6px;
}
.summary-card.income  .summary-amount { color: var(--green); }
.summary-card.expense .summary-amount { color: var(--red); }
.summary-card.balance .summary-amount { color: var(--cyan); }

.summary-sub { font-size: 12px; color: var(--text-muted); }
.summary-icon {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  opacity: 0.15;
}

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dashboard-grid .col-span-2 { grid-column: 1 / -1; }

/* ============================================================
   TRANSACTIONS LIST
   ============================================================ */
.trans-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--fast) var(--ease);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.trans-item:last-child { border-bottom: none; }
.trans-item:hover { background: rgba(255,255,255,0.02); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }

.trans-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.trans-info { flex: 1; min-width: 0; }
.trans-desc {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.trans-meta { font-size: 11.5px; color: var(--text-muted); }
.trans-amount {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.trans-amount.income  { color: var(--green); }
.trans-amount.expense { color: var(--red); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.btn:active::after { opacity: 0.08; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 4px 16px rgba(0,102,255,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,102,255,0.45); }

.btn-success {
  background: linear-gradient(135deg, #00b36b, var(--green));
  color: var(--text-inverse);
  box-shadow: 0 4px 16px rgba(0,255,136,0.25);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,255,136,0.35); }

.btn-danger {
  background: linear-gradient(135deg, #cc1a2e, var(--red));
  color: white;
  box-shadow: 0 4px 16px rgba(255,71,87,0.3);
}
.btn-danger:hover { transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); border-color: var(--border-hover); }

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-icon.btn-lg { width: 44px; height: 44px; padding: 10px; }

.btn-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,102,255,0.45), 0 0 0 0 rgba(0,212,255,0.4);
  transition: all var(--mid) var(--ease);
  z-index: 200;
  animation: fabPulse 3s ease-in-out infinite;
}
.btn-fab:hover { transform: scale(1.12) rotate(45deg); box-shadow: 0 12px 40px rgba(0,102,255,0.55); }
.btn-fab.dragging { transition: none; animation: none; transform: scale(1.12); cursor: grabbing; opacity: 0.9; }

@keyframes fabPulse {
  0%,100% { box-shadow: 0 8px 32px rgba(0,102,255,0.45), 0 0 0 0 rgba(0,212,255,0.4); }
  50%      { box-shadow: 0 8px 32px rgba(0,102,255,0.45), 0 0 0 10px rgba(0,212,255,0); }
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control option { background: #0a1428; }

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

/* Type Toggle */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}
.type-toggle input { display: none; }
.type-toggle label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  color: var(--text-muted);
}
.type-toggle input:checked + label.income-label {
  background: rgba(0,255,136,0.15);
  color: var(--green);
}
.type-toggle input:checked + label.expense-label {
  background: rgba(255,71,87,0.15);
  color: var(--red);
}

/* Amount Input */
.amount-wrapper { position: relative; }
.amount-prefix {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}
.amount-wrapper .form-control { padding-left: 40px; font-size: 18px; font-weight: 700; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--mid) var(--ease);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: linear-gradient(145deg, rgba(10,20,50,0.95), rgba(5,11,24,0.98));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.05);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--mid) var(--ease);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  transition: all var(--fast) var(--ease);
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,71,87,0.15); color: var(--red); }
.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 0 28px 28px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   BUDGET PROGRESS BARS
   ============================================================ */
.budget-item { margin-bottom: 16px; }
.budget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.budget-name { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.budget-amounts { font-size: 12px; color: var(--text-muted); }
.budget-bar {
  height: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.budget-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.budget-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 80%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer { to { left: 200%; } }

/* ============================================================
   ACCOUNTS GRID
   ============================================================ */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all var(--mid) var(--ease);
  position: relative;
  overflow: hidden;
}
.account-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.07;
  filter: blur(20px);
}
.account-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.account-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.account-name { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.account-balance {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   TABLES
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .td-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ============================================================
   CHARTS WRAPPER
   ============================================================ */
.chart-container { position: relative; }
canvas { max-width: 100%; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-bar .form-control { max-width: 180px; padding: 8px 12px; font-size: 13px; }
.search-wrapper { position: relative; flex: 1; min-width: 200px; }
.search-wrapper .form-control { padding-left: 38px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0;
}
.page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--fast) var(--ease);
}
.page-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.page-btn.active { background: var(--cyan); color: var(--text-inverse); border-color: var(--cyan); font-weight: 700; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(10, 20, 50, 0.95);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-full);
  padding: 12px 22px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s var(--ease) forwards;
  pointer-events: all;
  white-space: nowrap;
}
.toast.success { border-color: rgba(0,255,136,0.4); color: var(--green); }
.toast.error   { border-color: rgba(255,71,87,0.4); color: var(--red); }
.toast.info    { border-color: rgba(0,212,255,0.4); color: var(--cyan); }

@keyframes toastIn  { from { opacity:0; transform:translateY(16px) scale(0.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(-10px); } }

/* ============================================================
   MEMBERS GRID
   ============================================================ */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  transition: all var(--mid) var(--ease);
  cursor: default;
}
.member-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.member-avatar {
  width: 60px; height: 60px;
  background: rgba(0,212,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
  border: 2px solid transparent;
}
.member-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.member-role {
  font-size: 11px;
  text-transform: capitalize;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: left;
}
.member-stat-label { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; }
.member-stat-val { font-size: 13px; font-weight: 600; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-desc { font-size: 13px; line-height: 1.6; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonWave 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeletonWave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   BADGE & PILL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.badge-income  { background: rgba(0,255,136,0.12);  color: var(--green); }
.badge-expense { background: rgba(255,71,87,0.12);  color: var(--red); }
.badge-transfer{ background: rgba(0,212,255,0.12);  color: var(--cyan); }

/* ============================================================
   MOBILE HAMBURGER
   ============================================================ */
.sidebar-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  transition: all var(--fast) var(--ease);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.5);
  }
  .sidebar-backdrop.active { display: block; }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .summary-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .btn-fab { bottom: 20px; right: 20px; }
  .header { padding: 0 16px; }
  .summary-amount { font-size: 22px; }
  .modal { border-radius: var(--radius-lg); }
  .modal-header, .modal-body, .modal-footer { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 480px) {
  .accounts-grid { grid-template-columns: 1fr 1fr; }
  .members-grid  { grid-template-columns: 1fr; }
  .filter-bar .form-control { max-width: 100%; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-success{ color: var(--green); }
.text-danger { color: var(--red); }
.text-cyan   { color: var(--cyan); }
.text-sm     { font-size: 12px; }
.text-xs     { font-size: 11px; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12{ gap: 12px; }
.gap-16{ gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Number Transition */
.num-animated { transition: color 0.3s ease; }
