/* html[data-theme="dark"] has specificity (0,1,1), beating :root (0,1,0),
   so these variable overrides win even when :root is defined in a later <style>. */
html[data-theme="dark"] {
  --green:  #3fd79e;
  --red:    #f87171;
  --border: #374151;
  --muted:  #9ca3af;
  --blue:   #60a5fa;
}

[data-theme="dark"] body {
  background: #111827;
  color: #f3f4f6;
}

[data-theme="dark"] button,
[data-theme="dark"] select,
[data-theme="dark"] input,
[data-theme="dark"] textarea {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}

[data-theme="dark"] button.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

[data-theme="dark"] .del  { background: none; border: none; color: var(--red);  }
[data-theme="dark"] .edit { background: none; border: none; color: var(--blue); }

[data-theme="dark"] a { color: var(--blue); }

/* Symbol search dropdown */
[data-theme="dark"] #symbol-results {
  background: #1f2937;
  border-color: #4b5563;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
[data-theme="dark"] #symbol-results div.sel,
[data-theme="dark"] #symbol-results div:hover { background: #1e3a5f; }

/* Holdings table */
[data-theme="dark"] tr.editing td    { background: #1e3a5f; }
[data-theme="dark"] tr.detail-row td { background: #1f2937; }
[data-theme="dark"] .detail-desc     { color: #d1d5db; }
[data-theme="dark"] #asset-info      { color: #d1d5db; }

[data-theme="dark"] #holdings-table th[data-sort]:hover,
[data-theme="dark"] #holdings th[data-sort]:hover { color: #f3f4f6; }

/* Portfolio tabs + holdings type filter */
[data-theme="dark"] #tabs button { background: #1f2937; }
[data-theme="dark"] #type-filter button { background: #1f2937; }

/* Snapshot "today" highlight */
[data-theme="dark"] #snap-date.is-today { background: #14532d; color: #d1fae5; }
