:root {
  /* New White & Purple Color Scheme */
  --bg: #FFFFFF;
  --card-bg: #F8FAFC;
  --card-border: #E2E8F0;
  --border-color: #E2E8F0;
  --accent: #8B5CF6;
  --accent-soft: rgba(139, 92, 246, 0.1);
  --accent-strong: #7C3AED;
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --text-main: #0F172A;
  --text-muted: #475569;
  --surface: #F1F5F9;
  --badge-bg: rgba(139, 92, 246, 0.1);
  --badge-border: #8B5CF6;
  --shadow-soft: 0 4px 25px rgba(139, 92, 246, 0.08);
  --shadow-medium: 0 10px 40px rgba(139, 92, 246, 0.12);
  
  /* New Purple Gradients */
  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  --gradient-secondary: linear-gradient(135deg, #C4B5FD 0%, #A78BFA 100%);
  --gradient-light: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  
  /* Success/Error Colors */
  --success: #10B981;
  --success-soft: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.1);
}

[data-theme="dark"] {
  /* True Dark Mode Color Scheme */
  --bg: #000000;
  --card-bg: #111111;
  --card-border: #333333;
  --border-color: #333333;
  --text-main: #FFFFFF;
  --text-muted: #AAAAAA;
  --surface: #0A0A0A;
  --badge-bg: rgba(139, 92, 246, 0.3);
  --badge-border: #8B5CF6;
  --shadow-soft: 0 4px 25px rgba(0, 0, 0, 0.5);
  --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.6);
  
  /* Dark Mode Gradients */
  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  --gradient-secondary: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  --gradient-light: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.2) 100%);
  
  /* Dark Mode Success/Error Colors */
  --success-soft: rgba(16, 185, 129, 0.3);
  --warning-soft: rgba(245, 158, 11, 0.3);
  --danger-soft: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #000000 0%, #111111 50%, #1A1A1A 100%);
}

[data-theme="dark"] .app-header {
  background: rgba(17, 17, 17, 0.9);
  border-bottom: 1px solid #333333;
  box-shadow: 0 1px 3px rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .card {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #333333;
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .security {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .game-stage {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .io-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .premium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .form-card {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #333333;
}

[data-theme="dark"] .field input,
[data-theme="dark"] .field select {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #444444;
  color: #FFFFFF;
}

[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field select:focus {
  background: rgba(17, 17, 17, 1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] button.secondary {
  background: rgba(17, 17, 17, 0.9);
  color: var(--accent);
  border: 1px solid #444444;
}

[data-theme="dark"] button.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

[data-theme="dark"] .control-button {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #444444;
  color: var(--text-muted);
}

[data-theme="dark"] .control-button:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .tab-navigation {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #333333;
}

[data-theme="dark"] .tab-button {
  background: transparent;
  color: var(--text-muted);
}

[data-theme="dark"] .tab-button:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
}

[data-theme="dark"] .tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}

[data-theme="dark"] .app-footer {
  background: rgba(17, 17, 17, 0.9);
  border-top: 1px solid #333333;
}

[data-theme="dark"] .stage-tab-button {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #444444;
  color: var(--text-muted);
}

[data-theme="dark"] .stage-tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}

[data-theme="dark"] .drawer-section,
[data-theme="dark"] .stage-status,
[data-theme="dark"] .stage-controls,
[data-theme="dark"] .intel-block,
[data-theme="dark"] .statements-section,
[data-theme="dark"] .monthly-item,
[data-theme="dark"] .category-item,
[data-theme="dark"] .recurring-group {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #333333;
}

[data-theme="dark"] .entries-table {
  background: rgba(17, 17, 17, 0.9);
}

[data-theme="dark"] .entries-table th {
  background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .entries-table tr:hover {
  background: rgba(139, 92, 246, 0.05);
}

[data-theme="dark"] .period-tag,
[data-theme="dark"] .summary-item,
[data-theme="dark"] .stage-meta-item,
[data-theme="dark"] .hero-feature-list li,
[data-theme="dark"] .recurring-item {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #333333;
}

[data-theme="dark"] .stage-canvas {
  background: linear-gradient(135deg, #111111 0%, #1A1A1A 100%);
  border: 1px solid #333333;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: var(--text-main);
  background: var(--bg);
  min-height: 100vh;
  transition: all 0.3s ease;
}

body {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #F1F5F9 100%);
}

.app-header {
  padding: 1.5rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(139, 92, 246, 0.05);
}

.header-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-controls {
  display: flex;
  gap: 0.5rem;
  justify-self: end;
}

.control-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
}

.control-button:hover {
  background: rgba(139, 92, 246, 0.05);
  color: var(--accent);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.control-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
  font-weight: 600;
}

.control-icon {
  font-size: 1rem;
}

.control-label {
  font-size: 0.8rem;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.header-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.app-main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

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

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.hero {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(255, 255, 255, 0.8) 100%);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero h2 {
  font-size: 2rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #1E293B 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy {
  color: var(--text-muted);
  margin: 0.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.hero-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.hero-feature-list li {
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.05);
  transition: all 0.3s ease;
}

.hero-feature-list li:hover {
  transform: translateX(5px);
  border-color: var(--accent);
}

.security {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.security p {
  margin: 0.5rem 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.period-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.period-tag {
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--card-border);
  min-width: 160px;
  transition: all 0.3s ease;
}

.period-tag:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.period-tag span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.period-tag strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.summary-item {
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.game-stage {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.game-stage-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.game-stage-header p {
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.stage-meta {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.stage-meta-item {
  text-align: right;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  min-width: 100px;
}

.stage-meta-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.stage-meta-item strong {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-stage-body {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stage-canvas-wrapper {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.03) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  position: relative;
}

.stage-canvas {
  width: 100%;
  height: 200px;
  display: block;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.stage-message {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.stage-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stage-controls {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  padding: 1rem;
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.controls-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.stage-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.stage-control span {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  font-size: 0.8rem;
}

.stage-control input[type="range"] {
  accent-color: var(--accent-strong);
  height: 6px;
  border-radius: 3px;
}

.control-value {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
}

.stage-status {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  padding: 1rem;
}

.stage-status-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.stage-status-list li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem;
  border-radius: 0.8rem;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.1);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.stage-status-list li:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.stage-status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.stage-status-health {
  width: 120px;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  overflow: hidden;
}

.stage-status-health span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10B981, #F59E0B, #EF4444);
  border-radius: 999px;
}

.stage-status-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.stage-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(139, 92, 246, 0.05);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(139, 92, 246, 0.3);
  line-height: 1.5;
}

.stage-drawer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stage-tab-navigation {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}

.stage-tab-button {
  padding: 0.6rem 1rem;
  border-radius: 0.8rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.stage-tab-button:hover {
  background: rgba(139, 92, 246, 0.05);
  color: var(--accent);
}

.stage-tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
  font-weight: 600;
}

.stage-tab-content {
  display: none;
}

.stage-tab-content.active {
  display: block;
}

.drawer-section {
  margin-top: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

.checkbox-label span {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
}

.stage-intel {
  display: none;
}

.intel-block {
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.intel-block:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.intel-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.intel-primary {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.intel-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.intel-metric strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.intel-split {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.intel-split span {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.intel-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

#intel-recurring-block {
  border-style: dashed;
  background: rgba(139, 92, 246, 0.03);
}

.recurring-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  font-weight: 600;
}

.recurring-pill.income {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.recurring-pill.expense {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.summary-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-value {
  margin-top: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.balance-bar {
  margin-top: 1rem;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.balance-bar-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #10B981, #F59E0B, #EF4444);
  border-radius: 999px;
  transition: width 0.3s ease-out;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.grid-main,
.grid-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
}

.checkbox-field input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--accent-strong);
}

.checkbox-field span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.radio-option:hover {
  color: var(--accent);
}

.radio-option input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent-strong);
}

.radio-option span {
  color: inherit;
}

.field span {
  color: var(--text-muted);
  font-weight: 500;
}

.field input,
.field select {
  border-radius: 0.8rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: rgba(255, 255, 255, 1);
}

.field input:hover,
.field select:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

button {
  border-radius: 1rem;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

button.secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

button.secondary:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
  border-color: var(--accent);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

button:disabled:hover {
  transform: none !important;
}

.error-message {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 500;
}

.warning-message {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--warning);
  font-weight: 500;
}

.gamification-stats {
  display: flex;
  gap: 1.5rem;
}

.gamification-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
}

.gamification-value {
  margin-top: 0.3rem;
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-list li {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  font-weight: 600;
}

.hint {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.entries-table-wrapper {
  max-height: 300px;
  overflow: auto;
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  position: relative;
}

.entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  position: relative;
}

.entries-table th,
.entries-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.entries-table th {
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  border-top: none;
}

.entries-table td.numeric {
  text-align: right;
  font-weight: 600;
}

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

.entries-table tr:hover {
  background: rgba(139, 92, 246, 0.03);
}

.io-card {
  border-left: 4px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.io-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.io-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.io-message {
  min-height: 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.io-message.success {
  color: var(--success);
}

.io-message.error {
  color: var(--danger);
}

.io-hint {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.5;
}

.io-card code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.premium {
  border-left: 4px solid var(--warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.premium p {
  margin: 0.3rem 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.app-footer {
  padding: 1.5rem 2rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  text-align: center;
}

.hidden {
  display: none !important;
}

.tab-navigation {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(20px);
}

.tab-button {
  padding: 0.8rem 1.5rem;
  border-radius: 0.8rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
}

.tab-button:hover {
  background: rgba(139, 92, 246, 0.05);
  color: var(--accent);
}

.tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.tab-content.active {
  display: flex;
}

/* Statements Tab Styles */
.statements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.statements-section {
  margin-top: 0;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.statements-section:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.statements-section h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

/* Plotly Chart Container Styles */
#yearly-chart {
  width: 100% !important;
  min-width: 100% !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

.plot-container.plotly {
  width: 100% !important;
  min-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.js-plotly-plot .plot-container {
  margin: 0 auto !important;
}

/* Monthly Breakdown Styles */
.monthly-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.monthly-breakdown-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
}

/* Monthly Carousel Styles - Full Viewport Width */
.monthly-carousel {
  width: calc(80vw);
  margin-left: 3;
  position: center;
  z-index: 10;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  backdrop-filter: blur(25px);
  border-radius: 1.5rem;
  box-shadow:
    0 20px 40px rgba(139, 92, 246, 0.1),
    0 0 0 1px rgba(139, 92, 246, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: carouselFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.carousel-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100vh; /* Full viewport height */
  position: relative;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.carousel-nav {
  background: linear-gradient(135deg, var(--gradient-primary), var(--gradient-secondary));
  color: white;
  border: none;
  padding: 1.5rem 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 8px 25px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px; /* Slightly wider for better touch targets */
  height: 100%;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  position: relative;
  overflow: hidden;
}

.carousel-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.carousel-nav:hover:not(:disabled)::before {
  left: 100%;
}

.carousel-nav:hover:not(:disabled) {
  transform: scale(1.08) translateX(-2px);
  box-shadow:
    0 12px 35px rgba(139, 92, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.carousel-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
  filter: grayscale(0.3);
}

.carousel-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  backdrop-filter: blur(25px);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  box-shadow: 0 -4px 20px rgba(139, 92, 246, 0.08);
}

.indicator {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: var(--text-main);
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
  position: relative;
  overflow: hidden;
  min-width: 90px;
  max-width: 120px;
  text-align: center;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  transition: left 0.4s ease;
}

.indicator:hover::before {
  left: 100%;
}

.indicator:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.indicator.active {
  background: linear-gradient(135deg, var(--gradient-primary), var(--gradient-secondary));
  border-color: var(--accent);
  color: white;
  font-weight: 600;
  box-shadow:
    0 4px 15px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Default (Light) Mode Indicator Styles */
.indicator {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(139, 92, 246, 0.3);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

/* Active state must come after base styles */
.indicator.active {
  background: linear-gradient(135deg, var(--gradient-primary), var(--gradient-secondary));
  border-color: var(--accent);
  color: black !important;
  font-weight: 600;
  box-shadow:
    0 4px 15px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Dark Mode Indicator Styles */
[data-theme="dark"] .indicator {
  background: rgba(17, 17, 17, 0.95);
  border: 2px solid rgba(139, 92, 246, 0.4);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .indicator:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.carousel-content {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 2.5rem 3rem;
  padding-bottom: 8rem; /* More room for indicators */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(248, 250, 252, 0.8) 100%);
  scroll-behavior: smooth;
}

/* Smooth scrollbar for carousel content */
.carousel-content::-webkit-scrollbar {
  width: 8px;
}

.carousel-content::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
}

.carousel-content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.carousel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

.month-detail-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.month-header h3 {
  color: var(--accent-strong);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.month-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-metric {
  text-align: center;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.metric-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
}

.metric-value.positive {
  color: var(--success);
}

.metric-value.negative {
  color: var(--danger);
}

.month-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.breakdown-section h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.breakdown-chart {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.breakdown-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.8rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.breakdown-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.breakdown-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.breakdown-category {
  font-weight: 600;
  color: var(--text-main);
}

.breakdown-amount {
  font-weight: 700;
  color: var(--text-main);
}

.breakdown-bar {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.breakdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #EF4444);
  border-radius: 999px;
  transition: width 0.5s ease-out;
}

.breakdown-bar-fill.income {
  background: linear-gradient(90deg, #10B981, #059669);
}

.breakdown-percentage {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}

.breakdown-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
  background: rgba(139, 92, 246, 0.02);
  border-radius: 0.8rem;
  border: 1px dashed rgba(139, 92, 246, 0.2);
}

.month-insights,
.month-optimization {
  margin-bottom: 2rem;
}

.month-insights h4,
.month-optimization h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.insights-list,
.optimization-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.insight-item,
.optimization-item {
  padding: 1rem 1.2rem;
  border-radius: 0.8rem;
  border-left: 4px solid;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
}

.insight-item.positive {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.insight-item.negative {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.insight-item.warning {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

.insight-item.neutral {
  border-left-color: var(--accent);
  background: rgba(139, 92, 246, 0.05);
}

.insight-item.info {
  border-left-color: #06B6D4;
  background: rgba(6, 182, 212, 0.05);
}

.optimization-item.high {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
  border-left-width: 5px;
}

.optimization-item.medium {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
}

.optimization-item.low {
  border-left-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

.optimization-item.neutral {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.08);
}

/* Demo notice styling */
.monthly-demo-notice {
  margin-top: 2rem;
  text-align: center;
}

.demo-notice-content {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.demo-emoji {
  font-size: 1.2rem;
}

/* Mobile responsiveness for carousel */
@media (max-width: 768px) {
  .carousel-container {
    flex-direction: column;
    gap: 0.8rem;
  }

  .carousel-nav {
    align-self: center;
    width: 120px;
  }

  .carousel-content-wrapper {
    width: 100%;
  }

  .carousel-indicators {
    order: 1;
    margin-bottom: 1rem;
  }

  .carousel-content {
    order: 2;
  }

  .indicator {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .month-summary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .month-breakdown {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .month-detail-card {
    padding: 1.5rem;
  }

  .month-header h3 {
    font-size: 1.5rem;
  }

  .monthly-demo-notice .demo-notice-content {
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .carousel-nav {
    width: 100px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .carousel-indicators {
    gap: 0.3rem;
  }

  .indicator {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .month-detail-card {
    padding: 1rem;
  }

  .month-header h3 {
    font-size: 1.3rem;
  }

  .metric-value {
    font-size: 1.3rem;
  }

  .monthly-demo-notice .demo-notice-content {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
  }
}

/* Categories List Styles */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.categories-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
}

.category-item {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.category-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.category-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.category-amount {
  font-size: 0.9rem;
  font-weight: 600;
}

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

.category-bar {
  width: 100%;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.category-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #EF4444);
  border-radius: 999px;
  transition: width 0.3s ease-out;
}

.category-bar-fill.income {
  background: linear-gradient(90deg, #10B981, #059669);
}

.category-percentage {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}

/* Recurring Transactions Styles */
.recurring-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.frequency-section {
  margin-bottom: 2rem;
}

.frequency-section h5 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.recurring-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
}

.recurring-group {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.recurring-group:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.recurring-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.recurring-type {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recurring-type.income {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.recurring-type.expense {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.recurring-frequency {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.recurring-total {
  font-size: 0.9rem;
  font-weight: 700;
}

.recurring-total.income {
  color: var(--success);
}

.recurring-total.expense {
  color: var(--danger);
}

.recurring-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recurring-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(248, 250, 252, 0.8);
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.recurring-item:hover {
  background: rgba(139, 92, 246, 0.05);
}

.recurring-category {
  color: var(--text-main);
  font-weight: 500;
}

.recurring-amount {
  color: var(--text-muted);
  font-weight: 600;
}

/* Mobile-First Responsive Design */
@media (max-width: 480px) {
  /* Extra Small Screens (Phones) */
  .app-header {
    padding: 1rem 1rem 0.5rem;
  }
  
  .header-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .header-controls {
    justify-self: center;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .header-subtitle {
    font-size: 0.8rem;
  }
  
  .app-main {
    padding: 1rem;
    gap: 1rem;
  }
  
  .card {
    padding: 1rem;
    border-radius: 1rem;
  }
  
  .card h2 {
    font-size: 1.2rem;
  }
  
  .card h3 {
    font-size: 1rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .hero-feature-list li {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }
  
  /* Forms Optimization for Mobile */
  .forms-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
  }
  
  .form-card {
    padding: 1rem;
  }
  
  .field-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .field input,
  .field select {
    padding: 0.7rem 0.8rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .radio-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  button {
    padding: 0.8rem 1.2rem;
    width: 100%;
    font-size: 0.9rem;
  }
  
  /* Table Optimization for Mobile */
  .entries-table-wrapper {
    max-height: 250px;
    font-size: 0.8rem;
  }
  
  .entries-table th,
  .entries-table td {
    padding: 0.5rem 0.6rem;
  }
  
  .entries-table th {
    font-size: 0.7rem;
  }
  
  /* Intel Blocks Optimization */
  .intel-block {
    padding: 0.8rem;
  }
  
  .intel-split {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Tab Navigation for Mobile */
  .tab-navigation {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .tab-button {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Statements Grid */
  .statements-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .statements-section {
    padding: 1rem;
  }
  
  /* Monthly Breakdown */
  .monthly-breakdown {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Chart Optimization */
  #yearly-chart {
    height: 300px;
  }
  
  /* Stage Controls */
  .stage-meta {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stage-meta-item {
    min-width: auto;
    text-align: center;
  }
  
  /* Footer */
  .app-footer {
    padding: 1rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  /* Small Screens (Tablets) */
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid,
  .game-stage-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-main {
    padding-inline: 1rem;
  }
  
  .statements-grid {
    grid-template-columns: 1fr;
  }
  
  .forms-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .header-grid {
    grid-template-columns: auto 1fr;
  }
  
  .header-controls {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  /* Medium Small Screens */
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-header {
    padding-inline: 1rem;
  }
  
  .tab-navigation {
    flex-direction: column;
  }
  
  .header-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .header-controls {
    justify-self: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet Landscape */
  .app-main {
    padding: 1.5rem;
  }
  
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
  
  .forms-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
  }
  
  .control-button:hover,
  .tab-button:hover,
  .stage-tab-button:hover {
    background: initial;
    transform: none;
  }
  
  .hero-feature-list li:hover {
    transform: none;
  }
  
  .intel-block:hover,
  .statements-section:hover,
  .monthly-item:hover,
  .category-item:hover,
  .recurring-group:hover {
    transform: none;
  }
  
  /* Increase touch target sizes */
  button,
  .control-button,
  .tab-button,
  .stage-tab-button {
    min-height: 44px; /* Apple's recommended minimum touch target */
  }
  
  .radio-option,
  .checkbox-label {
    min-height: 44px;
    align-items: center;
  }
  
  input[type="radio"],
  input[type="checkbox"] {
    min-width: 44px;
    min-height: 44px;
  }
}

/* High DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .header-title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Print Styles */
@media print {
  .background-animation,
  .stage-canvas,
  .control-button,
  .tab-navigation,
  .app-footer {
    display: none !important;
  }
  
  .card {
    background: white !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  
  .app-main {
    padding: 0 !important;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .card:hover {
    transform: none;
  }
  
  button::before {
    display: none;
  }
}


/* Full Page Background Animation */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
}

.background-animation .stage-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  opacity: 0.5;
}

/* Language Selector Styles */
.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  position: relative;
}

.language-selector-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.language-dropdown {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
  padding: 0.6rem 1rem;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  min-width: 140px;
  height: 2.2rem; /* Match control-button height */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.65rem auto;
  padding-right: 2rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.language-dropdown:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.language-dropdown:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: rgba(255, 255, 255, 1);
}

/* Enhanced Dark Mode Styles for Language Dropdown */
[data-theme="dark"] .language-selector-label {
  color: var(--text-muted);
}

[data-theme="dark"] .language-dropdown {
  background: #000000;
  border: 1px solid #444444;
  color: #FFFFFF;
}

[data-theme="dark"] .language-dropdown:hover {
  background: #111111;
  border-color: var(--accent);
  transform: translateY(-1px);
}

[data-theme="dark"] .language-dropdown:focus {
  background: #000000;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Enhanced dropdown options styling for dark mode */
[data-theme="dark"] .language-dropdown option {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
}

[data-theme="dark"] .language-dropdown option:checked {
  background: rgba(139, 92, 246, 0.3);
  color: #FFFFFF;
  font-weight: 600;
}

[data-theme="dark"] .language-dropdown option:hover {
  background: rgba(139, 92, 246, 0.4);
  color: #FFFFFF;
}

/* Ensure the entire language selector container is properly styled */
[data-theme="dark"] .language-selector {
  color: var(--text-main);
}

/* Force dark mode styling for dropdown in all browsers */
.language-dropdown::-ms-expand {
  display: none;
}

/* Webkit-specific dropdown styling */
.language-dropdown::-webkit-scrollbar {
  width: 8px;
}

.language-dropdown::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
}

.language-dropdown::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

[data-theme="dark"] .language-dropdown::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .language-dropdown::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .language-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
}

/* Landing Page Dark Mode Styles */
[data-theme="dark"] .landing-hero {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .landing-hero h1 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .landing-hero p {
  color: var(--text-muted);
}

[data-theme="dark"] .features-grid {
  color: var(--text-main);
}

[data-theme="dark"] .feature-card {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #333333;
  color: var(--text-main);
}

[data-theme="dark"] .feature-card:hover {
  border-color: var(--accent);
  background: rgba(17, 17, 17, 1);
}

[data-theme="dark"] .feature-card h3 {
  color: var(--text-main);
}

[data-theme="dark"] .feature-card p {
  color: var(--text-muted);
}

[data-theme="dark"] .pricing-section {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .pricing-card {
  background: rgba(17, 17, 17, 0.95);
  border: 2px solid var(--accent);
  color: var(--text-main);
}

[data-theme="dark"] .pricing-card h3 {
  color: var(--text-main);
}

[data-theme="dark"] .price {
  color: var(--accent-strong);
}

[data-theme="dark"] .price-period {
  color: var(--text-muted);
}

[data-theme="dark"] .pricing-card ul {
  color: var(--text-muted);
}

[data-theme="dark"] .pricing-card ul li {
  color: var(--text-muted);
}

[data-theme="dark"] .form-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .form-grid {
  color: var(--text-main);
}

[data-theme="dark"] .form-group label {
  color: var(--text-main);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid #444444;
  color: var(--text-main);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
  background: rgba(17, 17, 17, 1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .form-group input:hover,
[data-theme="dark"] .form-group textarea:hover,
[data-theme="dark"] .form-group select:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .form-group textarea::placeholder {
  color: var(--text-muted);
}

[data-theme="dark"] .form-group input::placeholder {
  color: var(--text-muted);
}

[data-theme="dark"] .full-width {
  color: var(--text-main);
}

[data-theme="dark"] .cta-buttons {
  color: var(--text-main);
}

[data-theme="dark"] .cta-buttons button {
  color: var(--text-main);
}

/* Dark mode for form elements specifically in landing page */
[data-theme="dark"] #feedback-form {
  color: var(--text-main);
}

[data-theme="dark"] #feedback-form option {
  background: rgba(17, 17, 17, 0.9);
  color: var(--text-main);
}

[data-theme="dark"] #feedback-form select option {
  background: rgba(17, 17, 17, 0.9);
  color: var(--text-main);
}

/* Ensure control button has consistent height */
.control-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  height: 2.2rem; /* Consistent height */
  min-height: 2.2rem; /* Ensure minimum height */
}

/* Tutorial System Styles */
.tutorial-highlight {
  position: relative;
  z-index: 10001 !important;
  box-shadow: 0 0 0 4px var(--accent), 0 0 20px rgba(139, 92, 246, 0.5) !important;
  border-radius: 0.8rem;
  transition: all 0.3s ease;
  animation: tutorial-pulse 2s infinite;
}

@keyframes tutorial-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px var(--accent), 0 0 20px rgba(139, 92, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px var(--accent), 0 0 30px rgba(139, 92, 246, 0.8);
  }
}

/* Ensure the PixiJS canvas covers the entire viewport */
#stage-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

/* Quick overlay effect for animations */
.animation-overlay-active #stage-canvas {
  z-index: 10000 !important;
}

/* Dim the background content during animations */
.animation-overlay-active .app-main,
.animation-overlay-active .app-header,
.animation-overlay-active .app-footer {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Ensure content is properly accessible */
.app-main {
  position: relative;
  z-index: 100;
}

.card {
  position: relative;
  z-index: 101;
}

/* Ensure lock screen elements are clickable */
#lock-screen {
  position: relative;
  z-index: 102;
}

#create-key-button,
#unlock-button,
#start-new-session-button {
  position: relative;
  z-index: 103;
}

/* Forms Grid Layout */
.forms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.form-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.form-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.form-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Responsive design for forms grid */
@media (max-width: 768px) {
  .forms-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Main Tab Content with Centered Animation */
#tab-main.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-grid {
  position: relative;
  z-index: 20;
  width: 100%;
}

/* Tab Navigation Styles */
.tab-navigation {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 30;
}

.tab-button {
  padding: 0.8rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.9rem;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.tab-button:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.4);
}

.tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
}


/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(139, 92, 246, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success Animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  position: relative;
}

.success-checkmark .check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid var(--success);
}

.success-checkmark .check-icon::before {
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
  top: 0;
  left: 30px;
  width: 60px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
  animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .check-icon .icon-line {
  height: 5px;
  background-color: var(--success);
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
  top: 46px;
  left: 14px;
  width: 25px;
  transform: rotate(45deg);
  animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
  top: 38px;
  right: 8px;
  width: 47px;
  transform: rotate(-45deg);
  animation: icon-line-long 0.75s;
}

@keyframes rotate-circle {
  0% { transform: rotate(-45deg); }
  5% { transform: rotate(-45deg); }
  12% { transform: rotate(-405deg); }
  100% { transform: rotate(-405deg); }
}

@keyframes icon-line-tip {
  0% { width: 0; left: 1px; top: 19px; }
  54% { width: 0; left: 1px; top: 19px; }
  70% { width: 50px; left: -8px; top: 37px; }
  84% { width: 17px; left: 21px; top: 48px; }
  100% { width: 25px; left: 14px; top: 45px; }
}

@keyframes icon-line-long {
  0% { width: 0; right: 46px; top: 54px; }
  65% { width: 0; right: 46px; top: 54px; }
  84% { width: 55px; right: 0px; top: 35px; }
  100% { width: 47px; right: 8px; top: 38px; }
}

/* Financial Analysis Styles */
.optimization-suggestion {
  padding: 0.6rem 0.8rem;
  border-radius: 0.8rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  line-height: 1.4;
}

.optimization-suggestion:hover {
  transform: translateX(3px);
}

.optimization-suggestion.priority-high {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 4px solid var(--danger);
}

.optimization-suggestion.priority-medium {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid var(--warning);
}

.optimization-suggestion.priority-low {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 4px solid var(--accent);
}

.optimization-suggestion.priority-info {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 4px solid var(--success);
}

.optimization-emoji {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Dark Mode Financial Analysis Styles */
[data-theme="dark"] .optimization-suggestion.priority-high {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

[data-theme="dark"] .optimization-suggestion.priority-medium {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
}

[data-theme="dark"] .optimization-suggestion.priority-low {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

[data-theme="dark"] .optimization-suggestion.priority-info {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
}

/* Dark Mode Carousel Styles */
[data-theme="dark"] .monthly-carousel {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(17, 17, 17, 0.9) 100%);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .carousel-container {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.02) 0%, rgba(0, 0, 0, 0.98) 100%);
}

[data-theme="dark"] .carousel-nav {
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .carousel-nav:hover:not(:disabled) {
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .carousel-nav:disabled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .carousel-content-wrapper {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(17, 17, 17, 0.9) 100%);
}

[data-theme="dark"] .carousel-indicators {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(17, 17, 17, 0.9) 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .indicator {
  background: rgba(17, 17, 17, 0.9);
  border: 2px solid rgba(139, 92, 246, 0.3);
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .indicator:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .indicator.active {
  background: linear-gradient(135deg, var(--gradient-primary), var(--gradient-secondary));
  border-color: var(--accent);
  color: white !important;
  box-shadow:
    0 4px 15px rgba(139, 92, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .carousel-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(17, 17, 17, 0.8) 100%);
}

[data-theme="dark"] .carousel-content::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .carousel-content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .carousel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
}

[data-theme="dark"] .month-detail-card {
  background: rgba(17, 17, 17, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .month-header h3 {
  color: var(--accent-strong);
}

[data-theme="dark"] .summary-metric {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .metric-label {
  color: var(--text-muted);
}

[data-theme="dark"] .metric-value {
  color: var(--text-main);
}

[data-theme="dark"] .metric-value.positive {
  color: var(--success);
}

[data-theme="dark"] .metric-value.negative {
  color: var(--danger);
}

[data-theme="dark"] .breakdown-item {
  background: rgba(17, 17, 17, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .breakdown-info {
  color: var(--text-main);
}

[data-theme="dark"] .breakdown-amount {
  color: var(--text-main);
}

[data-theme="dark"] .breakdown-bar {
  background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .breakdown-percentage {
  color: var(--text-muted);
}

[data-theme="dark"] .breakdown-empty {
  background: rgba(139, 92, 246, 0.02);
  border: 1px dashed rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .month-insights h4,
[data-theme="dark"] .month-optimization h4 {
  color: var(--accent);
}

[data-theme="dark"] .insight-item,
[data-theme="dark"] .optimization-item {
  background: rgba(17, 17, 17, 0.9);
}

[data-theme="dark"] .insight-item.positive {
  background: rgba(16, 185, 129, 0.08);
}

[data-theme="dark"] .insight-item.negative {
  background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .insight-item.warning {
  background: rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .insight-item.neutral {
  background: rgba(139, 92, 246, 0.08);
}

[data-theme="dark"] .insight-item.info {
  background: rgba(6, 182, 212, 0.08);
}

[data-theme="dark"] .optimization-item.high {
  background: rgba(239, 68, 68, 0.12);
}

[data-theme="dark"] .optimization-item.medium {
  background: rgba(245, 158, 11, 0.12);
}

[data-theme="dark"] .optimization-item.low {
  background: rgba(139, 92, 246, 0.12);
}

[data-theme="dark"] .optimization-item.neutral {
  background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .monthly-demo-notice {
  color: var(--text-main);
}

[data-theme="dark"] .demo-notice-content {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .demo-emoji {
  color: var(--text-main);
}

[data-theme="dark"] .categories-empty {
  color: var(--text-muted);
}

[data-theme="dark"] .category-item {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .category-name {
  color: var(--text-main);
}

[data-theme="dark"] .category-amount {
  color: var(--text-main);
}

[data-theme="dark"] .category-amount.income {
  color: var(--success);
}

[data-theme="dark"] .category-bar {
  background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .category-percentage {
  color: var(--text-muted);
}

[data-theme="dark"] .recurring-empty {
  color: var(--text-muted);
}

[data-theme="dark"] .recurring-group {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .recurring-header {
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .recurring-type.income {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .recurring-type.expense {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .recurring-frequency {
  color: var(--text-muted);
}

[data-theme="dark"] .recurring-total {
  color: var(--text-main);
}

[data-theme="dark"] .recurring-total.income {
  color: var(--success);
}

[data-theme="dark"] .recurring-total.expense {
  color: var(--danger);
}

[data-theme="dark"] .recurring-item {
  background: rgba(248, 250, 252, 0.05);
}

[data-theme="dark"] .recurring-item:hover {
  background: rgba(139, 92, 246, 0.05);
}

[data-theme="dark"] .recurring-category {
  color: var(--text-main);
}

[data-theme="dark"] .recurring-amount {
  color: var(--text-muted);
}
