
/* CSS Variables */
:root {
      /* Colors - Light Theme */
      --color-bg: #ffffff;
      --color-bg-secondary: #ffffff;
      --color-bg-tertiary: #e1e1e1;
      --color-text: #023047;
      --color-text-secondary: #000000;
      --color-text-tertiary: #e5e5e5;
      --color-border: #023047;
      --color-border-light: #33708f;
      
      --color-primary: #219ebc;
      --color-primary-hover: #788c35;
      --color-primary-light: #8ECAE6;
      --color-primary-text: #023047;
      
      --color-success: #588f6c;
      --color-success-light: #799c86;
      --color-warning: #f59e0b;
      --color-warning-light: #eec783;
      --color-warning-lighter: #fffae9;
      --color-danger: #b04848;
      --color-danger-light: #fee2e2;
      --color-info: #a6a6a6;
      --color-info-light: #bebebe;
      
      --color-income: #0f9a42;
      --color-expense: #bd2121;

      --color-overview-card: #4571b7;
      
      /* Spacing */
      --spacing-xs: 4px;
      --spacing-sm: 8px;
      --spacing-md: 16px;
      --spacing-lg: 24px;
      --spacing-xl: 32px;
      --spacing-2xl: 48px;
      
      /* Font Sizes */
      --font-size-xs: 12px;
      --font-size-sm: 14px;
      --font-size-base: 16px;
      --font-size-lg: 18px;
      --font-size-xl: 20px;
      --font-size-2xl: 24px;
      --font-size-3xl: 30px;
      
      /* Font Weights */
      --font-weight-normal: 400;
      --font-weight-medium: 500;
      --font-weight-semibold: 600;
      --font-weight-bold: 700;
      
      /* Border Radius */
      --radius-sm: 4px;
      --radius-md: 8px;
      --radius-lg: 12px;
      --radius-xl: 16px;
      --radius-full: 9999px;
      
      /* Shadows */
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
      
      /* Transitions */
      --transition-fast: 150ms ease;
      --transition-base: 200ms ease;
      --transition-slow: 300ms ease;
      
      /* Z-index */
      --z-dropdown: 100;
      --z-modal: 200;
      --z-toast: 300;
      
      /* Layout */
      --footer-height: 46px;
      --nav-width: 240px;
      --max-content-width: 1200px;
    }
    
    /* Dark Theme */
    [data-theme="dark"] {
      --color-bg: #0f172a;
      --color-bg-secondary: #0f172a;
      --color-bg-tertiary: #334155;
      --color-text: #f1f5f9;
      --color-text-secondary: #94a3b8;
      --color-text-tertiary: #64748b;
      --color-border: #334155;
      --color-border-light: #1a222f;
      
      --color-primary: #6389f1;
      --color-primary-hover: #6366f1;
      --color-primary-light: #1e1b4b;
      --color-primary-text: #175473;

      
      --color-success-light: #14532d;
      --color-warning-light: #3a271b;
      --color-warning-lighter: #2b2826;
      --color-danger-light: #7f1d1d;
      --color-info-light: #1e3a5f;

       --color-overview-card: #152d52;
      
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    }


/* Reset & Base */
*, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    html {
      font-size: 16px;
      -webkit-text-size-adjust: 100%;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      font-size: var(--font-size-base);
      line-height: 1.5;
      color: var(--color-text);
      background-color: var(--color-bg);
      min-height: 100vh;
      overflow-x: hidden;
    }
    
    a {
      color: var(--color-primary);
      text-decoration: none;
    }
    
    button {
      font-family: inherit;
      cursor: pointer;
      border: none;
      background: none;
    }
    
    input, select, textarea {
      font-family: inherit;
      font-size: var(--font-size-base);
    }
    
    ul, ol {
      list-style: none;
    }
    
    img {
      max-width: 100%;
      height: auto;
    }

    /* Category Icons */
    .category-icon {
      display: inline-block;
      vertical-align: middle;
      flex-shrink: 0;
    }

    /* 统一图标颜色 - 浅色主题 (#333333) */
    img.category-icon {
      filter: brightness(0) saturate(100%) invert(20%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) !important;
    }

    /* 统一图标颜色 - 深色主题（蓝灰色） */
    html[data-theme="dark"] img.category-icon {
      filter: brightness(0) saturate(100%) invert(73%) sepia(11%) saturate(447%) hue-rotate(187deg) brightness(96%) contrast(87%) !important;
    }

    .category-list-icon {
      margin-right: var(--spacing-xs);
    }

    .category-tag-icon {
      margin-right: var(--spacing-xs);
    }

    .budget-card-icon {
      margin-right: var(--spacing-sm);
    }

    .unbudgeted-item-icon {
      margin-right: var(--spacing-sm);
    }


/* Utility Classes */
.hidden { display: none !important; }
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    
    .text-center { text-align: center; }
    .text-right { text-align: right; }
    .text-success { color: var(--color-success); }
    .text-danger { color: var(--color-danger); }
    .text-warning { color: var(--color-warning); }
    .text-secondary { color: var(--color-text-secondary); }
    .text-xs { font-size: var(--font-size-xs); }
    .text-sm { font-size: var(--font-size-sm); }

    .flex { display: flex; }
    .flex-col { flex-direction: column; }
    .items-center { align-items: center; }
    .justify-center { justify-content: center; }
    .justify-between { justify-content: space-between; }
    .gap-sm { gap: var(--spacing-sm); }
    .gap-md { gap: var(--spacing-md); }
    .flex-1 { flex: 1; }
    
    .mt-sm { margin-top: var(--spacing-sm); }
    .mt-md { margin-top: var(--spacing-md); }
    .mt-lg { margin-top: var(--spacing-lg); }
    .mb-sm { margin-bottom: var(--spacing-sm); }
    .mb-md { margin-bottom: var(--spacing-md); }
    .mb-lg { margin-bottom: var(--spacing-lg); }

/* Update Preset Foods Modal Styles */
.update-preset-foods-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-sm);
}

.update-preset-food-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background-color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
  .update-preset-food-item:hover {
    background-color: var(--color-bg-secondary);
  }
}

.update-preset-food-item:last-child {
  margin-bottom: 0;
}

.update-preset-food-item input[type="checkbox"] {
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
}

.update-food-name {
  font-weight: 500;
  color: var(--color-text-primary);
}

.update-food-tag {
  margin-left: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-style: italic;
}
