:root,
html[data-theme],
html[data-theme="forgejo-auto"],
html[data-theme="forgejo-light"],
html[data-theme="forgejo-dark"] {
  /* Replace Forgejo orange/primary with Crow gray */
  --color-primary: #bfbcbc !important;
  --color-primary-dark-1: #b5b2b2 !important;
  --color-primary-dark-2: #aaa7a7 !important;
  --color-primary-dark-3: #9f9c9c !important;
  --color-primary-dark-4: #949191 !important;
  --color-primary-dark-5: #898686 !important;
  --color-primary-dark-6: #7e7b7b !important;
  --color-primary-dark-7: #737070 !important;
  --color-primary-light-1: #c6c3c3 !important;
  --color-primary-light-2: #cccaca !important;
  --color-primary-light-3: #d3d1d1 !important;
  --color-primary-light-4: #dad8d8 !important;
  --color-primary-light-5: #e1dfdf !important;
  --color-primary-light-6: #e8e6e6 !important;
  --color-primary-light-7: #efeeee !important;
  --color-primary-alpha-10: #bfbcbc19 !important;
  --color-primary-alpha-20: #bfbcbc33 !important;
  --color-primary-alpha-30: #bfbcbc4b !important;
  --color-primary-alpha-40: #bfbcbc66 !important;
  --color-primary-alpha-50: #bfbcbc80 !important;
  --color-primary-alpha-60: #bfbcbc99 !important;
  --color-primary-alpha-70: #bfbcbcb3 !important;
  --color-primary-alpha-80: #bfbcbccc !important;
  --color-primary-alpha-90: #bfbcbce1 !important;

  /* Replace red/destructive styling with Crow black */
  --color-red: #0a0a0a !important;
  --color-red-dark-1: #090909 !important;
  --color-red-dark-2: #080808 !important;
  --color-red-dark-3: #070707 !important;
  --color-red-dark-4: #060606 !important;
  --color-red-dark-5: #050505 !important;
  --color-red-dark-6: #040404 !important;
  --color-red-dark-7: #030303 !important;
  --color-red-light-1: #1b1b1b !important;
  --color-red-light-2: #2b2b2b !important;
  --color-red-light-3: #3c3c3c !important;
  --color-red-light-4: #4d4d4d !important;
  --color-red-light-5: #5e5e5e !important;
  --color-red-light-6: #6f6f6f !important;
  --color-red-light-7: #808080 !important;
  --color-red-alpha-10: #0a0a0a19 !important;
  --color-red-alpha-20: #0a0a0a33 !important;
  --color-red-alpha-30: #0a0a0a4b !important;
  --color-red-alpha-40: #0a0a0a66 !important;
  --color-red-alpha-50: #0a0a0a80 !important;
  --color-red-alpha-60: #0a0a0a99 !important;
  --color-red-alpha-70: #0a0a0ab3 !important;
  --color-red-alpha-80: #0a0a0acc !important;
  --color-red-alpha-90: #0a0a0ae1 !important;
}

/* Semantic UI hard-coded red/orange classes */
.ui.orange.button,
.ui.orange.buttons .button,
.ui.orange.label,
.ui.orange.labels .label,
.ui.orange.ribbon.label,
.ui.orange.tag.label {
  background-color: #bfbcbc !important;
  border-color: #bfbcbc !important;
  color: #0a0a0a !important;
}
.ui.orange.button:hover,
.ui.orange.buttons .button:hover {
  background-color: #aaa7a7 !important;
}
.ui.red.button,
.ui.red.buttons .button,
.ui.red.label,
.ui.red.labels .label,
.ui.red.ribbon.label,
.ui.red.tag.label,
.ui.negative.button,
.ui.negative.buttons .button {
  background-color: #0a0a0a !important;
  border-color: #0a0a0a !important;
  color: #fff !important;
}
.ui.red.button:hover,
.ui.red.buttons .button:hover,
.ui.negative.button:hover,
.ui.negative.buttons .button:hover {
  background-color: #000 !important;
}
.ui.red.text,
.text.red,
.text.orange,
.ui.orange.text,
.color-text-red,
.color-text-orange {
  color: #0a0a0a !important;
}

/* Forgejo logo SVGs embedded as img remain overridden via custom/public/assets/img/*.svg */

/* Additional Forgejo theme tokens that are not named primary/red but render orange/red */
:root,
html[data-theme],
html[data-theme="forgejo-auto"],
html[data-theme="forgejo-light"],
html[data-theme="forgejo-dark"] {
  --color-primary-hover: #aaa7a7 !important;
  --color-primary-active: #949191 !important;
  --color-accent: #bfbcbc !important;
  --color-small-accent: #e1dfdf !important;
  --color-highlight-fg: #bfbcbc !important;
  --color-highlight-bg: #e8e6e6 !important;

  --color-orange: #bfbcbc !important;
  --color-orange-light: #cccaca !important;
  --color-orange-dark-1: #aaa7a7 !important;
  --color-orange-dark-2: #949191 !important;
  --color-orange-badge: #bfbcbc !important;
  --color-orange-badge-bg: #bfbcbc33 !important;
  --color-orange-badge-hover-bg: #bfbcbc66 !important;

  --color-red-light: #0a0a0a !important;
  --color-red-badge: #0a0a0a !important;
  --color-red-badge-bg: #0a0a0a33 !important;
  --color-red-badge-hover-bg: #0a0a0a66 !important;
  --color-icon-red: #0a0a0a !important;
  --color-ansi-red: #0a0a0a !important;
  --color-ansi-bright-red: #0a0a0a !important;
}

/* More hard-coded state/classes */
.ui.primary.button,
.ui.primary.buttons .button,
.ui.primary.label,
.ui.primary.labels .label,
.ui.basic.primary.button.item,
.ui.basic.primary.buttons .button,
.ui.basic.primary.button {
  background-color: #bfbcbc !important;
  border-color: #bfbcbc !important;
  color: #0a0a0a !important;
}
.ui.primary.button:hover,
.ui.primary.buttons .button:hover,
.ui.basic.primary.button:hover {
  background-color: #aaa7a7 !important;
  border-color: #aaa7a7 !important;
  color: #0a0a0a !important;
}
.ui.basic.red.button,
.ui.basic.red.buttons .button {
  background-color: #0a0a0a !important;
  border-color: #0a0a0a !important;
  color: #fff !important;
}
.ui.basic.orange.button,
.ui.basic.orange.buttons .button {
  background-color: #bfbcbc !important;
  border-color: #bfbcbc !important;
  color: #0a0a0a !important;
}
