:root {
  /* EZ Budget Color Scheme */
  --primary: #154372;        /* Dark Blue - Primary brand color */
  --primary-dark: #0f3459;   /* Darker blue for hover states */
  --primary-light: #6ca2bd;  /* Light Blue - Secondary/accent color */
  --primary-glow: rgba(21, 67, 114, 0.4);
  
  --bg: #0a0f1a;             /* Very Dark background */
  --card-bg: #0f1823;        /* Dark card background */
  --card-hover: #1a2330;     /* Lighter card on hover */
  
  --text-main: #F8FAFC;      /* Slate 50 */
  --text-muted: #94A3B8;     /* Slate 400 */
  
  --success: #10B981;        /* Emerald 500 */
  --danger: #EF4444;         /* Red 500 */
  --accent: #6ca2bd;         /* Light Blue - Used for highlights */
  
  --border-radius: 24px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--primary-glow);
}

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

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--primary-glow); }
  70% { box-shadow: 0 0 0 10px rgba(21, 67, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 67, 114, 0); }
}

.app {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .app { 
    padding: 32px;
  }
}

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

/* Header */
.app__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-light);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo img {
  height: 42px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo h1 {
  display: none; /* Text is in the wide logo */
}

.btn-icon {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--card-hover);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.app__actions {
  display: flex;
  gap: 8px;
}

/* Summary Card - The Crown Jewel */
.summary-card {
  background: linear-gradient(145deg, #2A3045 0%, #1E293B 100%);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-md), inset 0 1px 1px rgba(255,255,255,0.1);
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.value.large {
  font-size: 56px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  letter-spacing: -2px;
  font-weight: 800;
  text-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.budget-positive {
  color: var(--success);
  -webkit-text-fill-color: var(--success);
  background: none;
}

.budget-negative {
  color: var(--danger);
  -webkit-text-fill-color: var(--danger);
  background: none;
}

.value.large.budget-positive {
  background: none;
  -webkit-text-fill-color: var(--success);
  color: var(--success);
}

.value.large.budget-negative {
  background: none;
  -webkit-text-fill-color: var(--danger);
  color: var(--danger);
}

/* Action Section */
.action-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s ease;
}

.action-card:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Removed obsolete description-input styles */

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
}

.currency-symbol {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 8px;
  margin-bottom: 8px;
}

.big-input {
  border: none;
  font-size: 56px;
  font-weight: 700;
  color: var(--text-main);
  width: 220px;
  text-align: center;
  outline: none;
  background: transparent;
  padding: 0;
  font-family: var(--font-family);
  caret-color: var(--primary);
}

.big-input::placeholder {
  color: rgba(255,255,255,0.1);
}

.btn-primary-large {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 18px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(21, 67, 114, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 67, 114, 0.4);
}

.btn-primary-large:active {
  transform: scale(0.98);
}

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s;
}

.detail-card:hover {
  background: var(--card-hover);
}

.detail-card.full-width {
  grid-column: span 2;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.value-small {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.text-success { color: var(--success); text-shadow: 0 0 12px rgba(16, 185, 129, 0.2); }
.text-danger { color: var(--danger); }

/* History Section */
.history-section {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  touch-action: pan-y;
}

/* Custom scrollbar for history */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.history-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-main);
  opacity: 0.9;
}

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

.habits-header-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px 0;
}

.btn-export-history {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(21, 67, 114, 0.3);
}

.btn-export-history:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 67, 114, 0.4);
}

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

.btn-export-history svg {
  flex-shrink: 0;
}

.history-item {
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px solid transparent;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.history-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.history-item__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.history-item__content {
  flex: 1;
  min-width: 0;
}

.history-item__description {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}

.history-item__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.history-item__time {
  font-size: 12px;
  color: var(--text-muted);
}

.history-item__category {
  font-size: 12px;
  color: var(--primary-light);
  background: rgba(108, 162, 189, 0.15);
  padding: 2px 8px;
  border-radius: 8px;
}

.history-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-item__buttons {
  display: flex;
  gap: 8px;
}

.history-item__amount {
  font-size: 16px;
  font-weight: 700;
  color: #FCA5A5;
  margin-right: 8px;
}

@media (max-width: 600px) {
  .history-item__main {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 8px 12px;
  }

  .history-item__meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .history-item__amount {
    margin-right: 0;
  }

  .history-item__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .history-item__buttons {
    justify-content: flex-end;
  }

  .history-item__category {
    margin-left: 0;
  }
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
}

.btn-delete:hover {
  color: #EF4444;
}

.history-item__edit {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-row {
  display: flex;
  gap: 8px;
}

.edit-row input {
  flex: 1;
}

@media (max-width: 600px) {
  .edit-row {
    flex-direction: column;
  }
}

.history-item__edit .edit-description,
.history-item__edit .edit-category {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s;
}

.history-item__edit .edit-description:focus,
.history-item__edit .edit-category:focus {
  border-color: var(--primary);
  background: rgba(0,0,0,0.5);
  outline: none;
}

.history-item__edit .edit-category {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236ca2bd'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.history-item__edit .edit-category option {
  background: #0f1823;
  color: var(--text-main);
  padding: 12px;
}

.history-item__edit .edit-category:hover {
  border-color: var(--primary-light);
  background-color: rgba(0,0,0,0.4);
}

.edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--text-main);
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal__card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.modal__card--wide {
  max-width: 700px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.modal__card--habits {
  max-width: 800px;
}

@media (min-width: 1024px) {
  .modal__card {
    max-width: 50%;
  }
  
  .modal__card--wide {
    max-width: 700px;
    max-height: 90vh;
  }
  
  .modal__card--habits {
    max-width: 850px;
  }
}

.modal__card h2 {
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-info {
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.05);
}

.profile-info p {
  margin: 8px 0;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.profile-info strong {
  color: var(--text-main);
}

.status-badge {
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.input {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 12px;
  width: 100%;
  font-size: 16px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.input:focus {
  border-color: var(--primary);
  background: rgba(0,0,0,0.5);
  outline: none;
}

.input-group-stacked {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.input-group-stacked .input {
  flex: 2;
  margin-bottom: 0;
}

/* Global Select Styling */
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236ca2bd'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  border-radius: 12px;
}

/* Style the dropdown menu */
.select:focus,
.select[size],
.select[multiple] {
  border-radius: 12px;
  overflow: hidden;
}

.select:hover {
  border-color: var(--primary-light);
  background-color: rgba(0,0,0,0.4);
}

.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 67, 114, 0.15);
}

.input-group-stacked .select {
  flex: 1;
  margin-bottom: 0;
}

.input option,
.select option {
  background: #0f1823;
  color: var(--text-main);
  padding: 12px 16px;
}

.input option:first-child,
.select option:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.input option:last-child,
.select option:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.input option:hover,
.select option:hover {
  background: var(--primary);
  color: white;
}

.input option:checked,
.select option:checked {
  background: var(--primary);
  color: white;
}

.btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(21, 67, 114, 0.3);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.05);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.1);
}

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px;
}

.modal-footer {
  margin-top: 24px;
  text-align: center;
}

.link-danger {
  color: #EF4444;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.link-danger:hover {
  opacity: 0.8;
}

/* Habits Styling */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.stat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-box.full {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(21, 67, 114, 0.1) 0%, rgba(21, 67, 114, 0.05) 100%);
  border-color: rgba(21, 67, 114, 0.2);
}

.stat-box .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-box .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.habit-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.habit-row:hover {
  background: rgba(255,255,255,0.02);
}

.habit-row:last-child {
  border-bottom: none;
}

.habit-date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.habit-category {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
}

.habit-amount {
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.habits__list {
  background: rgba(0,0,0,0.2);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.habits-header {
  padding: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Landing Page Overhaul */
.landing {
  background: radial-gradient(circle at top right, #1E293B 0%, #0F172A 40%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(21, 67, 114, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.landing-header {
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.landing-header .text-link {
  padding: 8px 20px;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.landing-header .text-link:hover {
  background: rgba(255,255,255,0.1);
}

.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(21, 67, 114, 0.15);
  border: 1px solid rgba(21, 67, 114, 0.3);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: #6ca2bd;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(21, 67, 114, 0.1);
}

.landing-hero h1 {
  font-size: 64px;
  line-height: 1.15;
  margin: 0 0 32px;
  padding-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 0 40px rgba(21, 67, 114, 0.2);
  overflow: visible;
}

.landing-hero p {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 600px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta {
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-cta-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 20px rgba(21, 67, 114, 0.4);
}

.btn-cta-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 30px rgba(21, 67, 114, 0.6);
  transform: translateY(-2px);
}

.btn-cta-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-main);
}

.btn-cta-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text-main);
}

.simple-explainer {
  margin-top: 48px;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  max-width: 500px;
  text-align: left;
}

.simple-explainer p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.simple-explainer strong {
  color: var(--text-main);
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 550px;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .auth-card {
    padding: 24px 20px;
    border-radius: 20px;
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
  color: var(--primary-light);
}

.auth-logo img {
  height: 50px;
  max-width: 300px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px var(--primary-glow));
}

.auth-logo h1 {
  display: none; /* Text is in the wide logo */
}

.auth-card h2 {
  color: var(--text-main);
  text-align: center;
  margin-bottom: 8px;
  font-size: 24px;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 16px;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary);
  background: rgba(0,0,0,0.5);
}

.btn-primary-full {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary-full:hover {
  background: var(--primary-dark);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Security Warning Box */
.security-warning {
  display: flex;
  gap: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.warning-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.warning-content h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text-main);
  font-weight: 700;
}

.warning-content p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.warning-content p:last-child {
  margin-bottom: 0;
}

/* Category Pills */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.categories-grid::-webkit-scrollbar {
  width: 6px;
}

.categories-grid::-webkit-scrollbar-track {
  background: transparent;
}

.categories-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.categories-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.category-pill {
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.category-pill:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-main);
}

.category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.category-pill.custom {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent);
}

.category-pill.custom.active {
  background: var(--accent);
  color: white;
}

.category-pill .remove-icon {
  opacity: 0;
  transition: opacity 0.2s;
}

.category-pill.custom:hover .remove-icon {
  opacity: 1;
}

.add-category-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.add-category-form input {
  flex: 1;
  margin-bottom: 0;
}

.add-category-form button {
  flex-shrink: 0;
}

/* Profile Modal Enhancements */
.modal__card--profile {
  max-width: 520px;
  position: relative;
  max-height: 90vh; /* Increased for better mobile experience */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide scrollbar in profile modal while keeping scroll */
.modal__card--profile {
  scrollbar-width: none; /* Firefox */
}

.modal__card--profile::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (min-width: 1024px) {
  .modal__card--profile {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .modal__card--profile {
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 20px;
  }
  
  .categories-grid {
    max-height: 180px;
  }
}

@media (max-height: 800px) {
  .modal__card--profile {
    max-height: 85vh;
    overflow-y: auto;
  }
  
  .categories-grid {
    max-height: 140px;
  }
}

.modal__close,
.modal__close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.modal__close:hover,
.modal__close-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--primary-light);
  transform: rotate(90deg);
}

.profile-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px rgba(21, 67, 114, 0.3);
}

.profile-avatar svg {
  color: white;
}

.profile-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: var(--text-main);
}


.profile-email {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
  word-break: break-all;
}

.profile-section {
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px 0;
  opacity: 0.9;
}

.section-title svg {
  color: var(--primary);
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input--large {
  font-size: 18px;
  font-weight: 600;
  padding: 14px 16px;
}

.input--select {
  background-color: rgba(0,0,0,0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0 0;
}

.btn svg {
  margin-right: 6px;
}

/* Mobile Tweaks */
@media (max-width: 640px) {
  .landing-hero h1 { font-size: 40px; }
  .landing-header { padding: 20px; }
  .landing-hero { padding: 40px 20px; }
  .cta-buttons { flex-direction: column; width: 100%; }
  .btn-cta { width: 100%; }
  .simple-explainer { margin-top: 32px; text-align: center; }
  .value.large { font-size: 48px; }
  .auth-card {
    padding: 24px 20px;
    border-radius: 20px;
  }
  
  .profile-avatar {
    width: 64px;
    height: 64px;
  }
  
  .modal__card--profile {
    padding: 32px 24px;
  }
}

/* Spending Habits Modal */
.time-period-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.period-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.period-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--primary-light);
}

.period-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.habits-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.category-breakdown {
  margin-bottom: 24px;
}

.category-breakdown h3,
.habits-history h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-container {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#categoryChart {
  max-width: 220px;
  max-height: 220px;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 14px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: var(--text-main);
  font-weight: 500;
}

.legend-value {
  color: var(--text-muted);
  font-weight: 600;
}

.habits-history {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.habits__list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  max-height: 200px;
  padding-right: 8px;
  touch-action: pan-y;
}

.habits-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  margin-bottom: 4px;
  margin-left: auto;
  margin-right: 0;
}

.habits__list::-webkit-scrollbar {
  width: 6px;
}

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

.habits__list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.habits__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* Feedback Modal */
.feedback-type-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.feedback-type-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 600;
}

.feedback-type-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--primary-light);
}

.feedback-type-btn.active {
  background: rgba(21, 67, 114, 0.2);
  border-color: var(--primary);
  color: var(--primary-light);
}

.feedback-type-btn svg {
  color: currentColor;
}

.feedback-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-family);
  line-height: 1.5;
}

.feedback-textarea:focus {
  min-height: 150px;
}

/* Onboarding Overlay */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.onboarding-overlay.hidden {
  display: none;
}

.onboarding-step {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-card {
  background: var(--card-bg);
  border: 1px solid rgba(108, 162, 189, 0.3);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
  text-align: center;
}

.onboarding-card h2 {
  color: var(--text-main);
  margin: 0 0 16px 0;
  font-size: 28px;
}

.onboarding-card ol {
  text-align: left;
}

/* Spotlight Effect */
.onboarding-spotlight {
  position: absolute;
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(108, 162, 189, 0.4);
  pointer-events: none;
  z-index: 10001;
  animation: pulse 2s ease-in-out infinite;
  transition: all 0.3s ease;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(108, 162, 189, 0.35);
  }
  50% {
    box-shadow: 0 0 32px rgba(108, 162, 189, 0.6);
  }
}

.onboarding-tooltip {
  position: absolute;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 24px;
  max-width: 350px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 10002;
  animation: slideUp 0.4s ease;
}

.onboarding-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid var(--primary);
  z-index: 10002;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.tooltip-icon-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tooltip-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.onboarding-tooltip h3 {
  color: var(--primary);
  margin: 0;
  font-size: 20px;
}

.onboarding-tooltip p {
  color: var(--text-main);
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.value-subtle {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

/* Quick Actions (Bottom Left) */
.quick-actions {
  position: static;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 12px;
}

.quick-action-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.quick-action-btn--primary {
  background: rgba(21, 67, 114, 0.35);
  color: #fff;
  border-color: rgba(21, 67, 114, 0.6);
}

.quick-action-btn--primary:hover {
  background: rgba(21, 67, 114, 0.55);
}

/* Install Modal */
.install-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.install-platforms {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.install-platform-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.install-platform-btn svg {
  flex-shrink: 0;
}

.install-platform-btn--android {
  background: rgba(60, 220, 130, 0.12);
  color: #3cdc82;
  border-color: rgba(60, 220, 130, 0.35);
}

.install-platform-btn--android:hover {
  background: rgba(60, 220, 130, 0.2);
}

.install-platform-btn--ios {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.install-platform-btn--ios:hover {
  background: rgba(255, 255, 255, 0.18);
}

.install-platform-btn.active {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.install-card h3 {
  margin: 0 0 8px 0;
  color: var(--primary);
  font-size: 16px;
}

.install-card ol {
  margin: 8px 0 0 18px;
  color: var(--text-main);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
  }

  .modal__card--habits {
    max-height: none;
    width: 100%;
  }

  .modal__card--wide {
    max-height: none;
  }

  .habits-history {
    min-height: 0;
  }

  .modal__card--habits .habits__list {
    max-height: none;
  }

  .habits-footer-actions {
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 4px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-export-history {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 12px 18px;
    font-size: 14px;
  }

  .quick-actions {
    flex-direction: column;
    align-items: stretch;
    margin: 20px 0 8px;
  }
}

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

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

/* ===== SPENDING REPORTS MODAL ===== */
.modal__card--reports {
  max-width: 900px;
  max-height: 90vh;
}

.reports-header-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.btn-export-pdf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(21, 67, 114, 0.3);
}

.btn-export-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21, 67, 114, 0.4);
}

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

.btn-export-pdf svg {
  flex-shrink: 0;
}

.reports-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.reports-section {
  margin-bottom: 24px;
}

.reports-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reports-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.reports-table thead {
  background: rgba(21, 67, 114, 0.15);
  border-bottom: 2px solid rgba(21, 67, 114, 0.3);
}

.reports-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.reports-table th:last-child {
  text-align: center;
}

.reports-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.reports-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

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

.reports-table td {
  padding: 14px 16px;
  color: var(--text-main);
}

.date-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-day {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-full {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.amount-cell {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.status-cell {
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-under {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-over {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.category-totals {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-total-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.category-total-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

.category-total-bar-container {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.category-total-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.category-total-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.category-total-amount {
  font-weight: 700;
  color: var(--text-main);
  font-size: 15px;
}

.category-total-percent {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
  min-width: 45px;
  text-align: right;
}

@media (max-width: 768px) {
  .modal__card--reports {
    padding: 24px 20px;
    max-width: 100%;
  }
  
  .reports-summary {
    grid-template-columns: 1fr 1fr;
  }
  
  .reports-table {
    font-size: 12px;
  }
  
  .reports-table th,
  .reports-table td {
    padding: 10px 12px;
  }
  
  .category-total-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .category-total-stats {
    justify-content: space-between;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .onboarding-card {
    padding: 24px;
    max-width: 100%;
  }
  
  .onboarding-card h2 {
    font-size: 22px;
  }
  
  .onboarding-tooltip {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    top: auto;
    transform: none !important;
    max-width: none;
  }
}
