/* Modern & Elegant Design System */
:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #fafbfc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  
  /* Brand Colors */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --income: #10b981;
  --income-light: #d1fae5;
  --expense: #ef4444;
  --expense-light: #fee2e2;
  --warning: #f59e0b;
  --success: #10b981;
  
  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-colored: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
  
  /* Spacing & Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1200px;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --surface: #1e293b;
  --surface-hover: #334155;
  --border: #334155;
  --border-light: #475569;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Layout */
.app-root {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px 0;
}

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

.logo {
  color: var(--primary);
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.title {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Form Elements - Global Styles */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="color"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--surface);
}

input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 4px;
  cursor: pointer;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

body.dark select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

/* Input Field (generic class) */
.input-field {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Month Select */
.month-select {
  min-width: 180px;
  font-size: 13px;
  padding: 8px 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  white-space: nowrap;
}

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

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-colored);
}

.btn.primary:hover {
  box-shadow: var(--shadow-lg), var(--shadow-colored);
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
}

.icon-btn:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.icon-btn:active {
  transform: translateY(0);
}

/* Theme Toggle Special Style */
#toggleTheme {
  position: relative;
  transition: var(--transition);
}

#toggleTheme:hover {
  transform: translateY(-2px) rotate(20deg);
}

body.dark #toggleTheme {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: transparent;
  color: white;
}

body:not(.dark) #toggleTheme {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-color: transparent;
  color: white;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: var(--transition);
}

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

/* Auth Section */
.auth-section,
.auth-card {
  max-width: 480px;
  margin: 60px auto;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-section h2,
.auth-card h2 {
  margin-bottom: 32px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form .form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-form .form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
  box-sizing: border-box;
}

.auth-form .form-group input:hover {
  border-color: var(--primary-light);
}

.auth-form .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: var(--surface);
  transform: translateY(-1px);
}

.auth-form .form-group input::placeholder {
  color: var(--text-tertiary);
}

.auth-form .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.auth-form .form-actions .btn {
  flex: 1;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* Legacy auth-section support */
.auth-section form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-section .form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-section .form-row input {
  width: 100%;
}

.auth-section .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.auth-section .form-actions .btn {
  flex: 1;
}

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

.auth-section input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
  box-sizing: border-box;
}

.auth-section input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--surface);
}

/* Summary Cards - Modern 3-Card Layout */
.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.summary-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.summary-card:hover::before {
  transform: scaleX(1);
}

.summary-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

/* Income Card */
.summary-card.income-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.summary-card.income-card::before {
  background: linear-gradient(90deg, var(--income), #34d399);
}

.summary-card.income-card:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
}

/* Expense Card */
.summary-card.expense-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.summary-card.expense-card::before {
  background: linear-gradient(90deg, var(--expense), #f87171);
}

.summary-card.expense-card:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
}

/* Balance Card */
.summary-card.balance-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.summary-card.balance-card::before {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.summary-card.balance-card:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
}

/* Card Elements */
.summary-card .card-icon {
  font-size: 48px;
  line-height: 1;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.summary-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.summary-card .card-info {
  flex: 1;
  min-width: 0;
}

.summary-card .card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.summary-card .card-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.summary-card .card-trend {
  font-size: 32px;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.summary-card:hover .card-trend {
  opacity: 1;
  transform: scale(1.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .summary-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .summary-card {
    padding: 24px 20px;
  }
  
  .summary-card .card-icon {
    font-size: 40px;
  }
  
  .summary-card .card-amount {
    font-size: 24px;
  }
  
  /* Auth form mobile */
  .auth-section,
  .auth-card {
    margin: 20px auto;
    padding: 24px;
    max-width: 100%;
  }
  
  .auth-card h2 {
    font-size: 24px;
  }
  
  .auth-form .form-group input {
    padding: 12px 14px;
    font-size: 16px; /* iOS zoom fix */
  }
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.summary-card-old {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.summary-card-old::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.summary-card-old.income::before {
  background: linear-gradient(90deg, var(--income), #34d399);
}

.summary-card-old.expense::before {
  background: linear-gradient(90deg, var(--expense), #f87171);
}

.summary-card-old:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.summary-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Transactions */
.tx-panel h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.tx-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Compact Transaction List */
.tx-list.compact {
  gap: 8px;
}

.tx-list.compact .tx-item {
  padding: 12px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.tx-list.compact .tx-left strong {
  font-size: 14px;
}

.tx-list.compact .tx-meta {
  font-size: 12px;
}

.tx-list.compact .tx-amount {
  font-size: 15px;
  font-weight: 700;
}

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.tx-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.tx-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tx-left strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.tx-meta {
  font-size: 13px;
  color: var(--text-tertiary);
}

.tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.tx-amount {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tx-amount.income {
  color: var(--income);
}

.tx-amount.expense {
  color: var(--expense);
}

.tx-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: var(--transition);
}

.tx-item:hover .tx-actions {
  opacity: 1;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* FAB */
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: var(--shadow-xl), var(--shadow-colored);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: var(--shadow-xl), 0 15px 35px -5px rgba(59, 130, 246, 0.3);
}

.fab:active {
  transform: scale(0.95) rotate(90deg);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

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

.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
  box-sizing: border-box;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--surface);
}

.modal-form textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.modal-actions .btn {
  flex: 1;
}

/* Category Management */
.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.category-list::-webkit-scrollbar {
  width: 6px;
}

.category-list::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.category-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.category-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-color {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Report Table */
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.report-table thead th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-table thead th:last-child {
  text-align: right;
}

.report-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.report-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.report-table tbody tr {
  transition: var(--transition);
}

.report-table tbody tr:hover {
  background: var(--bg-primary);
}

.report-table tbody tr:last-child td {
  border-bottom: none;
}

/* Snackbar */
.snackbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 90px;
  background: var(--text-primary);
  color: var(--surface);
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 280px;
  max-width: 500px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
}

/* Utilities */
.muted {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .app-root {
    padding: 16px;
  }
  
  .topbar {
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  
  .brand {
    flex: 1;
  }
  
  .top-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
  }
  
  .summary-value {
    font-size: 28px;
  }
  
  .modal-content {
    padding: 24px;
    border-radius: var(--radius-lg);
    max-height: 85vh;
  }
  
  .modal-form label {
    min-width: 100%;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-actions .btn {
    width: 100%;
  }
  
  .fab {
    width: 56px;
    height: 56px;
    font-size: 28px;
    right: 20px;
    bottom: 20px;
  }
  
  #reportForm {
    flex-direction: column;
    align-items: stretch;
  }
  
  #reportForm label {
    width: 100%;
  }
  
  #reportForm input,
  #reportForm select {
    width: 100%;
    min-width: 100%;
  }
  
  .report-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .report-actions .btn {
    width: 100%;
  }
  
  .filter-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-header label select {
    width: 100%;
  }
  
  .tx-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .tx-right {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .tx-actions {
    opacity: 1;
  }
}

/* Print Styles */
@media print {
  .fab,
  .top-actions,
  .tx-actions,
  .modal {
    display: none !important;
  }
}

/* Additional Component Styles */

/* Filter Section */
.card label select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  min-width: 180px;
}

.card label select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.card label select:hover {
  border-color: var(--primary-light);
}

/* Chart Container */
.card canvas {
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.chart-card {
  position: relative;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-header label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Report Manager Specific */
.report-manager {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#reportForm {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

#reportForm label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#reportForm input,
#reportForm select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 140px;
  transition: var(--transition);
}

#reportForm input:focus,
#reportForm select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.report-results {
  margin-top: 0;
}

.report-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#reportTotal {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

#reportPeriod {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.table-container {
  margin-top: 20px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

/* Loading States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 5px;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Glassmorphism Effect (Optional) */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark .glass {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background: var(--primary-light);
  color: white;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, var(--bg-secondary) 4%, var(--border) 25%, var(--bg-secondary) 36%);
  background-size: 1000px 100%;
}

/* Page Transition */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.4s ease-out;
}

.summary-card:nth-child(1) {
  animation-delay: 0.1s;
}

.summary-card:nth-child(2) {
  animation-delay: 0.2s;
}

.summary-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Pulse Animation for New Items */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.tx-item.new {
  animation: pulse 1s ease-in-out;
}

/* Success State */
@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.btn.success {
  animation: successPulse 0.6s ease-out;
}

/* Gradient Background Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.brand .title {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Smooth appear for list items */
.tx-list .tx-item {
  animation: fadeInUp 0.3s ease-out backwards;
}

.tx-list .tx-item:nth-child(1) { animation-delay: 0.05s; }
.tx-list .tx-item:nth-child(2) { animation-delay: 0.1s; }
.tx-list .tx-item:nth-child(3) { animation-delay: 0.15s; }
.tx-list .tx-item:nth-child(4) { animation-delay: 0.2s; }
.tx-list .tx-item:nth-child(5) { animation-delay: 0.25s; }

/* Category badge animation */
.category-item {
  animation: fadeInUp 0.3s ease-out backwards;
}

/* Hover Effects Enhancement */
.card:hover {
  transform: translateY(-2px);
}

.summary-card:hover {
  transform: translateY(-6px);
}

/* Enhanced Button Ripple Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Dark Mode Toggle Animation */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card,
.tx-item,
.category-item,
.modal-form input,
.modal-form select,
.modal-form textarea {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}