/**
 * Loaded AFTER Tailwind CDN so dark-mode surface rules win.
 * Cards: no visible white outline (transparent border, no light shadow).
 */

html.dark,
html:not(.light) {
  --border: 0 0% 14%;
  --border-color: transparent;
  --input-color: hsl(0 0% 100% / 0.05);
}

/* All card shells — kill the white box outline */
html.dark .bg-card.border,
html:not(.light) .bg-card.border,
html.dark .bg-card[class*="border-border"],
html:not(.light) .bg-card[class*="border-border"],
html.dark .rounded-lg.border.bg-card,
html:not(.light) .rounded-lg.border.bg-card,
html.dark .rounded-xl.border.bg-card,
html:not(.light) .rounded-xl.border.bg-card,
html.dark .rounded-2xl.border.bg-card,
html:not(.light) .rounded-2xl.border.bg-card,
html.dark .card-enhanced,
html:not(.light) .card-enhanced,
html.dark .ui-card,
html:not(.light) .ui-card {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Inner dividers inside cards only — very faint, not white boxes */
html.dark .bg-card .border-b.border-border,
html:not(.light) .bg-card .border-b.border-border,
html.dark .bg-card .border-t.border-border,
html:not(.light) .bg-card .border-t.border-border,
html.dark .bg-card .border-border:not(.border),
html:not(.light) .bg-card > .border-b,
html:not(.light) .bg-card > * > .border-b.border-border {
  border-color: hsl(0 0% 100% / 0.05) !important;
}

/* Tables / lists inside cards */
html.dark .bg-card table .border-border,
html:not(.light) .bg-card table .border-border,
html.dark .bg-card tr.border-border,
html:not(.light) .bg-card tr.border-t.border-border,
html:not(.light) .bg-card tr.border-b.border-border {
  border-color: hsl(0 0% 100% / 0.05) !important;
}

/* Popovers, shell chrome — subtle edge, not bright white */
html.dark .bg-popover.border-border,
html:not(.light) .bg-popover.border-border,
html.dark header.border-b,
html:not(.light) header.border-b,
html.dark aside.border-r,
html:not(.light) aside.border-r {
  border-color: hsl(0 0% 100% / 0.05) !important;
}

/* Inputs / selects — faint edge for usability */
html.dark .border-input,
html:not(.light) .border-input,
html.dark select.border,
html:not(.light) select.border-input,
html.dark input.border-input,
html:not(.light) input.border-input,
html.dark textarea.border-input,
html:not(.light) textarea.border-input {
  border-color: hsl(0 0% 100% / 0.05) !important;
}

/* Tailwind opacity utilities on border-border (e.g. border-border/60) */
html.dark [class*="border-border/"],
html:not(.light) [class*="border-border/"] {
  border-color: transparent !important;
}

html.dark .bg-card [class*="border-border/"],
html:not(.light) .bg-card [class*="border-border/"] {
  border-color: transparent !important;
}
