/* Extracted from index.css L1818-L1955: Global dark mode overrides */

/* ===== GLOBAL DARK OVERRIDES ===== */
input[type="number"], input[type="text"], input[type="date"], 
input[type="month"], input[type="file"], textarea {
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-family: inherit;
  font-size: 0.88rem;
  transition: all var(--transition);
}

/* Selects handled separately so background-color doesn't clobber background-image arrow */
select {
  background-color: var(--bg-input) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238A94B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.7rem center !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 0.6rem 2rem 0.6rem 0.85rem !important;
  font-family: inherit;
  font-size: 0.88rem;
  transition: all var(--transition);
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  cursor: pointer;
}
select option {
  background: #0D1424 !important;
  color: #E8EDFF !important;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 0 3px var(--accent-green-dim), var(--glow) !important;
}

/* Multi-select fix */
select[multiple] {
  background: var(--bg-input) !important;
  border-color: var(--border) !important;
}
select[multiple] option {
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 0.3rem 0.5rem;
}

/* Fieldset/Legend fix */
fieldset {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}
legend {
  color: var(--text-muted) !important;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 0.5rem;
}

/* Radio/Checkbox */
input[type="radio"], input[type="checkbox"] {
  accent-color: var(--accent-green);
}

/* Progress bar fix */
progress {
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: none;
}
progress::-webkit-progress-bar {
  background: var(--bg-secondary);
  border-radius: 4px;
}
progress::-webkit-progress-value {
  background: var(--accent-green);
  border-radius: 4px;
}

/* Canvas/Chart dark bg */
canvas {
  border-radius: var(--radius-sm);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* Modal styling */
[style*="position: fixed"][style*="display: flex"] {
  backdrop-filter: blur(10px);
}

/* Stagger animation for grids */
.stats-grid > *, .months-grid > * {
  animation: staggerIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stats-grid > *:nth-child(1), .months-grid > *:nth-child(1) { animation-delay: 0.05s; }
.stats-grid > *:nth-child(2), .months-grid > *:nth-child(2) { animation-delay: 0.1s; }
.stats-grid > *:nth-child(3), .months-grid > *:nth-child(3) { animation-delay: 0.15s; }
.stats-grid > *:nth-child(4), .months-grid > *:nth-child(4) { animation-delay: 0.2s; }
.stats-grid > *:nth-child(5), .months-grid > *:nth-child(5) { animation-delay: 0.25s; }
.stats-grid > *:nth-child(6), .months-grid > *:nth-child(6) { animation-delay: 0.3s; }
.stats-grid > *:nth-child(7), .months-grid > *:nth-child(7) { animation-delay: 0.35s; }
.stats-grid > *:nth-child(8), .months-grid > *:nth-child(8) { animation-delay: 0.4s; }
.stats-grid > *:nth-child(n+9), .months-grid > *:nth-child(n+9) { animation-delay: 0.45s; }

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rowSlide {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Smooth number transitions */
.stat-value, .month-name {
  transition: color var(--transition);
}

/* Selection colour */
::selection {
  background: var(--accent-green-glow);
  color: var(--text-primary);
}

