:root {
  /* Material 3 - Modern Green Palette */
  --md-sys-color-primary: #004d40;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #c8e6c9;
  --md-sys-color-on-primary-container: #00210f;
  
  --md-sys-color-secondary: #4f6354;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #d2e8d5;
  --md-sys-color-on-secondary-container: #0c1f13;
  
  --md-sys-color-tertiary: #3b6470;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #beeaf7;
  --md-sys-color-on-tertiary-container: #001f26;
  
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  
  --md-sys-color-background: #fbfdf8;
  --md-sys-color-on-background: #191c1a;
  
  --md-sys-color-surface: #fbfdf8;
  --md-sys-color-on-surface: #191c1a;
  --md-sys-color-surface-variant: #dce5dd;
  --md-sys-color-on-surface-variant: #404943;
  --md-sys-color-outline: #717972;
  
  /* Spacing & Radii */
  --spacing-xs: 4px;
  --spacing-s: 8px;
  --spacing-m: 16px;
  --spacing-l: 24px;
  --spacing-xl: 32px;
  
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --md-sys-color-surface-container-low: #f3f5f3;
  --md-sys-color-surface-container: #edeef0;
  
  /* Elevations (Shadows) */
  --elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
  --elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
}

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

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, p {
  margin: 0;
}

.text-title-large { font-size: 22px; font-weight: 400; line-height: 28px; }
.text-title-medium { font-size: 16px; font-weight: 500; line-height: 24px; letter-spacing: 0.15px; }
.text-body-large { font-size: 16px; font-weight: 400; line-height: 24px; letter-spacing: 0.5px; }
.text-body-medium { font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: 0.25px; }
.text-label-large { font-size: 14px; font-weight: 500; line-height: 20px; letter-spacing: 0.1px; }
.text-label-medium { font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: 0.5px; }

/* Layout Components */
.top-app-bar {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: var(--spacing-m);
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-m);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 20;
  position: sticky;
  top: 0;
}

.app-bar-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-m);
}

.app-logo {
  width: 40px;
  height: 40px;
  background-color: var(--md-sys-color-primary-container);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-primary-container);
}

.app-bar-info {
  flex-grow: 1;
}

.email-label {
  opacity: 0.8;
}

.search-icon {
  opacity: 0.7;
}

.empty-icon-wrap {
  margin: 0 auto var(--spacing-l);
  width: 120px;
  height: 120px;
}

.empty-title {
  margin-bottom: var(--spacing-s);
}

.summary-label {
  opacity: 0.7;
}

.app-bar-actions {
  display: flex;
  gap: var(--spacing-s);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Search Area */
.search-container {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0 var(--spacing-m);
  height: 48px;
  gap: var(--spacing-s);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
  background: transparent;
  border: none;
  color: white;
  flex-grow: 1;
  font-size: 16px;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Quick Actions Row */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-s);
  padding: var(--spacing-m) 0;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
  opacity: 0.9;
}

.quick-action-icon {
  width: 24px;
  height: 24px;
}

/* Tabs */
.tab-row {
  display: flex;
  background-color: var(--md-sys-color-primary);
}

.tab {
  flex: 1;
  text-align: center;
  padding: var(--spacing-m);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tab.active {
  color: white;
  border-bottom: 3px solid white;
  font-weight: 600;
}

/* Bottom Navigation Simulation */
.system-navigation {
  height: 48px;
  background-color: #000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 64px;
}

.system-btn {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.5);
}
.system-btn.back { width: 12px; height: 12px; border-left: none; border-bottom: none; transform: rotate(-135deg); margin-left: 10px; }
.system-btn.home { border-radius: 50%; }
.system-btn.recent { width: 16px; height: 16px; border-radius: 2px; }

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  text-align: center;
}

.empty-state-container {
  max-width: 300px;
  color: var(--md-sys-color-on-surface-variant);
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin-bottom: var(--spacing-l);
  opacity: 0.2;
}

/* Bottom Stats Card */
.stats-container {
  position: sticky;
  bottom: 0;
  background-color: var(--md-sys-color-surface);
  padding: var(--spacing-m);
  border-top: 1px solid var(--md-sys-color-outline);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-m);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.stats-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.total-amount {
  color: var(--md-sys-color-primary);
  font-weight: 700;
  font-size: 28px;
}

.stats-details {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: var(--spacing-m);
  align-items: center;
}

.divider {
  width: 1px;
  height: 32px;
  background-color: var(--md-sys-color-outline);
  opacity: 0.3;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value.cr { color: var(--md-sys-color-primary); font-weight: 600; }
.stat-value.dr { color: var(--md-sys-color-error); font-weight: 600; }

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  right: var(--spacing-m);
  bottom: 120px; /* Above the stats bar */
  height: 56px;
  padding: 0 var(--spacing-l);
  border-radius: var(--radius-l);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  gap: var(--spacing-s);
  border: none;
  cursor: pointer;
  box-shadow: var(--elevation-2);
  transition: box-shadow 0.2s, transform 0.1s;
  z-index: 10;
}

.fab:active {
  transform: scale(0.95);
  box-shadow: var(--elevation-1);
}

/* Placeholder Utility */
.placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
