/* ========================================
   MoneyLover - Financial Tracker
   Design System & Styles
   ======================================== */

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

/* --- CSS Variables --- */
:root {
  --primary: #2ECC71;
  --primary-dark: #27AE60;
  --primary-light: #A8E6CF;
  --primary-bg: rgba(46, 204, 113, 0.08);
  --danger: #E74C3C;
  --danger-light: #FADBD8;
  --danger-bg: rgba(231, 76, 60, 0.08);
  --warning: #F39C12;
  --info: #3498DB;
  --dark: #1a1a2e;
  --text-primary: #2c2c2c;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-main: #f5f5f7;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;
  --nav-height: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { border: none; outline: none; cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); outline: none; }
ul, ol { list-style: none; }

/* --- App Container --- */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-white);
  position: relative;
  padding-bottom: calc(var(--nav-height) + 16px);
}

/* Desktop wide view */
@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
  .app-container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    min-height: calc(100vh - 40px);
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .app-container {
    max-width: 420px;
  }
}

/* --- Page Sections --- */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border-light);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 1024px) {
  .bottom-nav {
    max-width: 420px;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  background: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: var(--transition);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-item-add {
  position: relative;
  top: -16px;
}

.nav-item-add .add-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4);
  transition: var(--transition);
}

.nav-item-add .add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

.nav-item-add .add-btn:active {
  transform: scale(0.95);
}

/* --- Common Components --- */

/* Page Header */
.page-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.page-header-icons {
  display: flex;
  gap: 12px;
}

.page-header-icons button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: var(--transition);
}

.page-header-icons button:hover {
  background: var(--border);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0 16px 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

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

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.card-link:hover {
  color: var(--primary-dark);
}

/* Section Title */
.section-title {
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Category Icon */
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* Tab Buttons */
.tabs {
  display: flex;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin: 0 16px 12px;
}

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

.tab-btn.active {
  background: var(--bg-white);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Amount colors */
.amount-income { color: var(--primary); }
.amount-expense { color: var(--danger); }
.amount-neutral { color: var(--text-primary); }

/* --- RINGKASAN (Summary/Dashboard) Page --- */

/* Balance Header */
.balance-header {
  padding: 20px;
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.balance-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.balance-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.balance-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.balance-actions {
  display: flex;
  gap: 8px;
}

.balance-actions button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: var(--transition);
}

.balance-actions button:hover {
  background: white;
}

.notification-badge {
  position: relative;
}

.notification-badge::after {
  content: attr(data-count);
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Wallet List */
.wallet-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.wallet-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 12px;
}

.wallet-info {
  flex: 1;
}

.wallet-name {
  font-size: 14px;
  font-weight: 500;
}

.wallet-balance {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Monthly Report Card */
.report-card {
  margin: 0 16px 12px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.report-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.report-header span {
  font-size: 13px;
  color: var(--text-secondary);
}

.report-header .report-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.report-amounts {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.report-amount-item {
  text-align: center;
}

.report-amount-item label {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.report-amount-item .value {
  font-size: 16px;
  font-weight: 700;
}

.report-stat {
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.report-stat strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Chart container */
.chart-container {
  width: 100%;
  height: 160px;
  position: relative;
  margin-bottom: 8px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.chart-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  margin-right: 4px;
}

/* Report Navigation */
.report-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.report-nav button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  color: var(--primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.report-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.report-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.report-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border);
}

.report-dots .dot.active {
  background: var(--text-primary);
}

/* Expense Category */
.expense-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

.expense-info {
  flex: 1;
  margin-left: 12px;
}

.expense-name {
  font-size: 14px;
  font-weight: 500;
}

.expense-amount {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.expense-percent {
  font-size: 14px;
  font-weight: 600;
}

/* Transaction Item in Summary */
.txn-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

.txn-info {
  flex: 1;
  margin-left: 12px;
}

.txn-name {
  font-size: 14px;
  font-weight: 500;
}

.txn-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.txn-amount {
  font-size: 14px;
  font-weight: 600;
}

/* --- TRANSAKSI (Transactions) Page --- */

.txn-header {
  text-align: center;
  padding: 12px 16px;
}

.txn-wallet-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition);
}

.txn-wallet-selector:hover {
  background: var(--bg-main);
}

.txn-balance {
  text-align: center;
  padding: 8px 16px 4px;
}

.txn-balance label {
  font-size: 12px;
  color: var(--text-muted);
}

.txn-balance .amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Period Tabs */
.period-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin: 0 16px;
}

.period-tab {
  flex: 1;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  text-align: center;
  letter-spacing: 0.5px;
  position: relative;
  transition: var(--transition);
}

.period-tab.active {
  color: var(--text-primary);
}

.period-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

/* Income/Expense Summary */
.txn-summary {
  padding: 16px;
}

.txn-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.txn-summary-row .label {
  color: var(--text-secondary);
}

.txn-summary-total {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 16px;
  font-weight: 700;
}

.txn-report-btn {
  display: block;
  margin: 0 16px 16px;
  padding: 12px;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  transition: var(--transition);
}

.txn-report-btn:hover {
  background: rgba(46, 204, 113, 0.15);
}

/* Transaction Date Group */
.txn-date-group {
  margin-bottom: 4px;
}

.txn-date-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-main);
}

.txn-date-day {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 12px;
  line-height: 1;
}

.txn-date-info {
  flex: 1;
}

.txn-date-weekday {
  font-size: 13px;
  font-weight: 500;
}

.txn-date-month {
  font-size: 11px;
  color: var(--text-muted);
}

.txn-date-total {
  font-size: 14px;
  font-weight: 600;
}

.txn-list-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.txn-list-item:hover {
  background: var(--bg-main);
}

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

.txn-list-info {
  flex: 1;
  margin-left: 12px;
}

.txn-list-name {
  font-size: 14px;
  font-weight: 500;
}

.txn-list-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.txn-list-right {
  text-align: right;
}

.txn-list-amount {
  font-size: 14px;
  font-weight: 600;
}

.txn-list-remaining {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* --- ANGGARAN (Budget) Page --- */

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

.budget-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.budget-period-tabs {
  border-bottom: 3px solid var(--primary);
  display: inline-block;
  padding: 12px 20px;
}

.budget-period-tab {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Gauge Chart */
.gauge-container {
  padding: 24px 16px;
  text-align: center;
}

.gauge-svg {
  width: 220px;
  height: 140px;
}

.gauge-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
}

.gauge-label {
  font-size: 13px;
  color: var(--primary);
  margin-top: 2px;
}

/* Budget Stats */
.budget-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 16px 16px;
  margin: 0 16px 16px;
  border-bottom: 1px solid var(--border-light);
}

.budget-stat {
  text-align: center;
}

.budget-stat .value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.budget-stat .label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Create Budget Button */
.create-budget-btn {
  display: block;
  margin: 0 auto 20px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
  transition: var(--transition);
}

.create-budget-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

/* Budget Item */
.budget-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.budget-item-info {
  flex: 1;
  margin-left: 12px;
}

.budget-item-name {
  font-size: 14px;
  font-weight: 600;
}

.budget-item-remaining {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.budget-item-amount {
  text-align: right;
}

.budget-item-value {
  font-size: 15px;
  font-weight: 700;
}

.budget-item-progress {
  width: 100%;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.budget-item-progress-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
  transition: width 0.6s ease;
}

.budget-item-date-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* --- AKUN (Account) Page --- */

.account-header {
  text-align: center;
  padding: 32px 16px 24px;
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.account-name {
  font-size: 18px;
  font-weight: 700;
}

.account-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.account-menu {
  padding: 8px 0;
}

.account-menu-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  transition: var(--transition);
  cursor: pointer;
}

.account-menu-item:hover {
  background: var(--bg-main);
}

.account-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
}

.account-menu-text {
  flex: 1;
}

.account-menu-label {
  font-size: 14px;
  font-weight: 500;
}

.account-menu-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.account-menu-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

.account-divider {
  height: 8px;
  background: var(--bg-main);
}

.account-version {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 220;
  justify-content: center;
  align-items: flex-end;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 1;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border);
}

.modal-body {
  padding: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

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

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-white);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* Type Toggle */
.type-toggle {
  display: flex;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
}

.type-toggle-btn {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}

.type-toggle-btn.active.expense {
  background: var(--danger);
  color: white;
}

.type-toggle-btn.active.income {
  background: var(--primary);
  color: white;
}

.form-submit {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
  transition: var(--transition);
  margin-top: 8px;
}

.form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

.form-submit:active {
  transform: translateY(0);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--primary);
}

.toast.error {
  background: var(--danger);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Loading Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-main) 25%, #e8e8e8 50%, var(--bg-main) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Confirm Dialog --- */
.confirm-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  z-index: 250;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  width: calc(100% - 32px);
}

.confirm-dialog h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-dialog p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
}

.confirm-actions button {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.confirm-cancel {
  background: var(--bg-main);
  color: var(--text-secondary);
}

.confirm-ok {
  background: var(--danger);
  color: white;
}

/* --- FULLSCREEN OVERLAYS (Search & Notifications) --- */

.overlay-fullscreen {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: var(--bg-white);
  z-index: 200;
  display: none;
  flex-direction: column;
  animation: slideFromRight 0.25s ease;
}

.overlay-fullscreen.active {
  display: flex;
}

@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(-50%) translateX(30px); }
  to { opacity: 1; transform: translateX(-50%) translateX(0); }
}

@media (min-width: 1024px) {
  .overlay-fullscreen {
    max-width: 420px;
  }
}

.overlay-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  min-height: 56px;
}

.overlay-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.overlay-close:hover {
  background: var(--bg-main);
}

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

.overlay-filter {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.overlay-filter:hover {
  background: var(--bg-main);
}

/* --- Search Styles --- */

.search-input {
  flex: 1;
  border: none;
  font-size: 15px;
  color: var(--text-primary);
  background: none;
  padding: 8px 0;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-recent-label {
  padding: 14px 16px 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.search-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.search-recent-item:hover {
  background: var(--bg-main);
}

.search-recent-text {
  font-size: 15px;
  color: var(--text-primary);
}

.search-recent-arrow {
  font-size: 16px;
  color: var(--text-muted);
  transform: rotate(45deg);
}

.search-result-count {
  padding: 14px 16px 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--bg-main);
}

.search-result-info {
  flex: 1;
  margin-left: 12px;
  min-width: 0;
}

.search-result-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.search-result-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-result-amount {
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 12px;
}

/* --- Notification Styles --- */

#notif-list {
  flex: 1;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  gap: 14px;
  transition: var(--transition);
}

.notif-item:hover {
  background: var(--bg-main);
}

.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-icon-budget {
  background: #FFF3E0;
  color: #E65100;
}

.notif-icon-debt {
  background: #E8EAF6;
  color: #283593;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-message {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.45;
}

.notif-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.notif-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text-secondary);
}

.notif-wallet-dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.notif-time {
  color: var(--text-muted);
}

/* Notification badge hide when 0 */
.notification-badge[data-count="0"]::after {
  display: none;
}

#search-results {
  flex: 1;
  overflow-y: auto;
}

.txn-dropdown-item {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.txn-dropdown-item:hover {
  background: var(--bg-main);
}

/* --- NEW AKUN Page Styles (MoneyLover layout) --- */

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

.akun-page-header h1 {
  font-size: 20px;
  font-weight: 700;
}

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

.akun-support-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.akun-support-icon {
  font-size: 18px;
  color: var(--text-muted);
}

.akun-profile {
  display: flex;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.akun-avatar-wrapper {
  text-align: center;
  margin-right: 16px;
}

.akun-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #29B6F6, #0288D1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.akun-premium-badge {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, #FFA726, #FB8C00);
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.akun-user-info {
  flex: 1;
}

.akun-username {
  font-size: 16px;
  font-weight: 600;
}

.akun-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.akun-profile-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

.akun-menu-group {
  border-top: 1px solid var(--border-light);
}

.akun-menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.akun-menu-item:hover {
  background: var(--bg-main);
}

.akun-menu-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.akun-menu-label {
  flex: 1;
  font-size: 15px;
  font-weight: 400;
}

.akun-menu-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

.akun-bank-btn {
  margin: 12px 16px;
  padding: 14px;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.akun-bank-btn:hover {
  background: var(--primary-bg);
}

/* --- Management Pages (Wallet & Category) --- */

.manage-section-label {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
}

.manage-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.manage-item:hover {
  background: var(--bg-main);
}

.manage-item-add {
  background: transparent;
}

.manage-item-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 14px;
  flex-shrink: 0;
}

.manage-item-info {
  flex: 1;
  min-width: 0;
}

.manage-item-name {
  font-size: 15px;
  font-weight: 400;
}

.manage-item-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.manage-item-more {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: none;
  font-size: 20px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.manage-item-more:hover {
  background: var(--bg-main);
}

.manage-item-arrow {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.manage-fab {
  position: fixed;
  bottom: 24px;
  right: calc(50% - 210px);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(46,204,113,0.4);
  transition: var(--transition);
  z-index: 210;
}

.manage-fab:hover {
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .manage-fab {
    right: 20px;
  }
}

.manage-show-inactive {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.manage-help-link {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  background: var(--bg-white);
}

.category-tab {
  flex: 1;
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--text-muted);
  background: none;
  position: relative;
  transition: var(--transition);
  line-height: 1.3;
}

.category-tab.active {
  color: var(--text-primary);
}

.category-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

#wallet-list, #category-list {
  flex: 1;
  overflow-y: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

