/* AruHub keys visual correction. Color/paint properties only.
   Scoped to the existing keys workbench. No geometry, JS, API, or data changes. */

/* Keys content keeps semantic colors; ordinary muted labels become readable. */
:root main:has(#keys-quick-access-workbench) .text-muted-foreground {
  color: #536158 !important;
}
:root #keys-quick-access-workbench .text-slate-100 {
  color: #26302D !important;
}
:root #keys-quick-access-workbench .text-slate-200 {
  color: #38483F !important;
}
:root #keys-quick-access-workbench .text-slate-300,
:root #keys-quick-access-workbench .text-slate-400 {
  color: #536158 !important;
}
:root #keys-quick-access-workbench :is(.text-sky-100,.text-sky-200,.text-sky-300,.text-sky-400) {
  color: #226E67 !important;
}

/* The wrapper has no radius. A broad previous background rule hit the
   wrapper's [_select]:bg class and exposed square corners behind the select. */
:root #keys-quick-access-workbench [data-slot="native-select-wrapper"] {
  background-color: transparent !important;
}
:root #keys-quick-access-workbench [data-slot="native-select"],
:root #keys-quick-access-workbench [data-slot="native-select-option"],
:root #keys-quick-access-workbench [data-slot="native-select-optgroup"] {
  background-color: #FFFFFF !important;
  color: #26302D !important;
  border-color: #C9D2C9 !important;
}
:root #keys-quick-access-workbench [data-slot="native-select-icon"] {
  color: #536158 !important;
}

/* Tool tabs retain their existing 2px underline and original dimensions. */
:root #keys-quick-access-workbench button.border-b-2 {
  color: #38483F !important;
  border-bottom-color: transparent !important;
}
:root #keys-quick-access-workbench button.border-b-2[class~="border-sky-400"] {
  color: #226E67 !important;
  border-bottom-color: #2A8078 !important;
}
:root #keys-quick-access-workbench button.border-b-2:hover {
  color: #226E67 !important;
}

/* Existing app/system selection classes remain the source of state. */
:root #keys-quick-access-workbench button[class~="border-sky-400"]:not(.border-b-2) {
  background-color: #2A8078 !important;
  color: #FFFFFF !important;
  border-color: #2A8078 !important;
}
:root #keys-quick-access-workbench :is([data-slot="badge"],[class~="group/badge"])[class~="text-sky-100"] {
  background-color: #F1D28B !important;
  color: #674015 !important;
  border-color: #C49A4C !important;
}
:root #keys-quick-access-workbench :is([data-slot="badge"],[class~="group/badge"])[class~="text-emerald-100"] {
  background-color: #F3C89D !important;
  color: #843D13 !important;
  border-color: #CD9765 !important;
}
:root #keys-quick-access-workbench :is([data-slot="badge"],[class~="group/badge"])[class~="bg-slate-700"] {
  background-color: #E8E9E2 !important;
  color: #536158 !important;
}
:root #keys-quick-access-workbench button[class~="bg-sky-500"] {
  background-color: #2A8078 !important;
  color: #FFFFFF !important;
  border-color: #2A8078 !important;
}
:root #keys-quick-access-workbench button[class~="bg-sky-500"]:hover {
  background-color: #226E67 !important;
  border-color: #226E67 !important;
}

/* Opaque row colors keep the sticky column's background consistent.
   The original sticky position, width, shadow geometry and ring width remain. */
:root main:has(#keys-quick-access-workbench) tbody [data-slot="table-row"] {
  --keys-row-bg: #FAF8F3;
  background-color: var(--keys-row-bg) !important;
  background-image: none !important;
}
:root main:has(#keys-quick-access-workbench) tbody [data-slot="table-row"]:hover {
  --keys-row-bg: #EEEDE5;
}
:root main:has(#keys-quick-access-workbench) tbody [data-slot="table-row"][class~="bg-muted/85"] {
  --keys-row-bg: #E8E9E2;
}
:root main:has(#keys-quick-access-workbench) tbody [data-slot="table-row"]:is([class*="ring-sky-400"],[data-state="selected"]) {
  --keys-row-bg: #D8E8E1;
  --tw-ring-color: #2A807861 !important;
}
:root main:has(#keys-quick-access-workbench) tbody [data-slot="table-cell"].sticky {
  background-color: var(--keys-row-bg) !important;
  background-image: none !important;
}
:root main:has(#keys-quick-access-workbench) thead [data-slot="table-head"].sticky {
  background-color: var(--app-table-head) !important;
}

/* Disabled, power and overflow actions retain their existing semantics.
   This rule only colors the quick-access button identified by its aria label. */
:root main:has(#keys-quick-access-workbench) button[aria-label="快捷接入"]:not(:disabled) {
  background-color: #D8E8E1 !important;
  color: #226E67 !important;
  border-color: #C9D2C9 !important;
}
:root main:has(#keys-quick-access-workbench) button[aria-label="快捷接入"][class~="bg-primary"]:not(:disabled) {
  background-color: #2A8078 !important;
  color: #FFFFFF !important;
  border-color: #2A8078 !important;
}
:root main:has(#keys-quick-access-workbench) button[aria-label="快捷接入"] > svg {
  color: inherit !important;
}
