/**
 * 0xNyx — console colder luxury brand (Phase 1.1 / B + forest purge v32)
 * Loads AFTER hacker-terminal.css. Complements /home home-brand.css.
 * Brand accent: #5EEAD4 on #050505. Semantic success: emerald.
 * No matrix rain / no neon matrix green gradients.
 */

/* -------------------------------------------------------------------------- */
/* Kill matrix code rain everywhere                                            */
/* -------------------------------------------------------------------------- */

#ht-code-rain {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

html body::after {
  /* drop green edge vignette; solid brand ground instead */
  background: transparent !important;
  display: none !important;
}

html,
html.dark {
  background: var(--ht-bg, #050505) !important;
}

html body,
html.dark body,
#app {
  background: var(--ht-bg, #050505) !important;
  font-family: var(--ht-font) !important;
  text-shadow: none !important;
}

::selection {
  background: rgba(94, 234, 212, 0.32) !important;
  color: #042f2e !important;
}

/* -------------------------------------------------------------------------- */
/* Primary CTA — cyan fill + dark ink (Stitch login/dashboard)                 */
/* -------------------------------------------------------------------------- */

.btn-primary,
button.btn-primary,
a.btn-primary,
.min-h-screen main .btn-primary,
.min-h-screen main a.btn-primary,
.min-h-screen main a.btn.btn-primary {
  background-color: var(--ht-green, #5eead4) !important;
  background-image: none !important;
  color: var(--ht-ink-on-accent, #042f2e) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-family: var(--ht-font) !important;
  font-weight: 600 !important;
}

.btn-primary *,
button.btn-primary *,
a.btn-primary *,
.min-h-screen main .btn-primary *,
.min-h-screen main a.btn-primary * {
  color: var(--ht-ink-on-accent, #042f2e) !important;
  text-shadow: none !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
  background-color: var(--ht-green-bright, #99f6e4) !important;
  filter: none !important;
  box-shadow: none !important;
}

/* Secondary / ghost stay quiet */
.btn-secondary,
.btn-ghost {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* Sidebar — solid obsidian rail (Stitch dashboard)                            */
/* -------------------------------------------------------------------------- */

aside.sidebar,
.sidebar {
  background: #0a0c0d !important;
  background-image: none !important;
  border-right: 1px solid rgba(226, 232, 240, 0.08) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}

.sidebar-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.08) !important;
  background: transparent !important;
}

.sidebar-brand-title,
.sidebar .sidebar-brand-title {
  color: var(--ht-text-bright, #f8fafc) !important;
  text-shadow: none !important;
  letter-spacing: 0.02em !important;
  font-weight: 700 !important;
}

.sidebar-link {
  border-radius: 0.5rem !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.sidebar-link-active,
.sidebar-link.sidebar-link-active,
.sidebar-link-active:hover,
.sidebar-link.sidebar-link-active:hover {
  background: rgba(94, 234, 212, 0.12) !important;
  background-image: none !important;
  color: var(--ht-green, #5eead4) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.sidebar-link-active svg,
.sidebar-link-active .sidebar-svg-icon {
  color: var(--ht-green, #5eead4) !important;
  filter: none !important;
}

.sidebar-section-title,
.sidebar-section-title-text {
  color: var(--ht-text-muted, #94a3b8) !important;
  text-shadow: none !important;
  letter-spacing: 0.08em !important;
}

/* -------------------------------------------------------------------------- */
/* Shell surfaces — cards / header / mesh                                      */
/* -------------------------------------------------------------------------- */

.bg-mesh-gradient,
[class*="bg-mesh"] {
  background-image: none !important;
  background: transparent !important;
  opacity: 0 !important;
}

header.glass,
.glass,
.card-glass,
.card,
.stat-card,
.panel {
  background: var(--ht-panel, #0f1416) !important;
  background-image: none !important;
  border-color: rgba(226, 232, 240, 0.1) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}

/* Sticky app header: thin chrome, no glass blur */
header.glass.sticky {
  background: rgba(10, 12, 13, 0.92) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.08) !important;
}

/* Soften neon text glows leftover from terminal era */
.sidebar *,
main *,
header * {
  text-shadow: none !important;
}

/* Numbers / mono only where intentional */
code,
pre,
.font-mono,
[class*="font-mono"] {
  font-family: var(--ht-font-mono, ui-monospace, monospace) !important;
}

/* -------------------------------------------------------------------------- */
/* Auth shell (login / register) — quieter card                                */
/* -------------------------------------------------------------------------- */

/* Kill decorative primary orbs if still painted green-ish */
.relative.flex.min-h-screen .absolute.inset-0 {
  background-image: none !important;
}

/* Input focus ring → cyan hairline, no outer glow bloom */
.input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--ht-green, #5eead4) !important;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35) !important;
  outline: none !important;
}

/* Links */
a.text-primary-600,
a.text-primary-500,
.text-primary-400,
.text-primary-500,
.text-primary-600 {
  color: var(--ht-green, #5eead4) !important;
}

/* Progress / active bars */
.bg-primary-500,
.bg-primary-600,
.from-primary-500,
.to-primary-600 {
  --tw-gradient-from: #5eead4 !important;
  --tw-gradient-to: #14b8a6 !important;
}

/* Status success dots stay semantic emerald; accent actions use cyan */
.StatusBadge,
.status-badge {
  text-shadow: none !important;
}

/* Version badge — quiet chrome chip */
.sidebar .version-badge,
.VersionBadge {
  border-color: rgba(226, 232, 240, 0.12) !important;
  background: rgba(15, 20, 22, 0.9) !important;
  color: var(--ht-text-muted, #94a3b8) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* Tables                                                                      */
/* -------------------------------------------------------------------------- */

table thead th,
.table-wrapper thead th {
  color: var(--ht-text-muted, #94a3b8) !important;
  border-bottom-color: rgba(226, 232, 240, 0.1) !important;
  background: transparent !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
}

table tbody tr:hover,
.table-wrapper tbody tr:hover {
  background: rgba(94, 234, 212, 0.04) !important;
}

/* -------------------------------------------------------------------------- */
/* Do not fight /home isolation (home-brand.css wins on html.route-home)       */
/* -------------------------------------------------------------------------- */

html.route-home #ht-code-rain {
  display: none !important;
}


/* -------------------------------------------------------------------------- */
/* Palette B lock — brand cyan vs semantic emerald                             */
/* Brand: CTAs, focus, active nav, primary chips, links                        */
/* Success: badge-success, btn-success, emerald/green status, OK states        */
/* -------------------------------------------------------------------------- */

:root {
  --cb-brand: #5eead4;
  --cb-brand-bright: #99f6e4;
  --cb-brand-ink: #042f2e;
  --cb-success: #34d399;
  --cb-success-strong: #059669;
  --cb-success-soft: rgba(16, 185, 129, 0.15);
  --cb-success-border: rgba(52, 211, 153, 0.35);
}

/* Kill any leftover matrix neon gradients on brand controls */
.btn-primary,
button.btn-primary,
a.btn-primary,
[class*="from-primary-500"],
[class*="bg-primary-500"],
[class*="bg-primary-600"] {
  background-image: none !important;
  background-color: var(--cb-brand) !important;
  color: var(--cb-brand-ink) !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Success stays emerald */
.btn-success,
button.btn-success,
a.btn-success {
  background-image: none !important;
  background-color: var(--cb-success-strong) !important;
  color: #ecfdf5 !important;
  box-shadow: none !important;
}
.btn-success *,
button.btn-success * {
  color: #ecfdf5 !important;
}

.badge-success,
.toast-success,
.stat-icon-success,
.stat-trend-up,
.form-success-box {
  background-color: var(--cb-success-soft) !important;
  color: var(--cb-success) !important;
  border-color: var(--cb-success-border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Emerald / green utility text = success, not brand */
[class*="text-emerald-"],
[class*="text-green-"] {
  color: var(--cb-success) !important;
}

/* Primary / teal / cyan utility text = brand */
[class*="text-primary-"],
[class*="text-teal-"],
a.text-primary-600,
a.text-primary-500 {
  color: var(--cb-brand) !important;
}

/* Soft surfaces that were forest-green hover plates */
tbody tr:hover,
.table-wrapper tbody tr:hover,
tbody tr:hover > td,
.table-wrapper tbody tr:hover > td,
tbody tr:hover .sticky-col,
.dark tbody tr:hover .sticky-col {
  background-color: rgba(94, 234, 212, 0.05) !important;
}

/* Sidebar edge bar: pure cyan, no green mid-stop */
aside.sidebar::before,
.sidebar::before {
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.05) 0%,
    rgba(94, 234, 212, 0.55) 40%,
    rgba(94, 234, 212, 0.2) 100%
  ) !important;
  box-shadow: none !important;
}

/* Home marketing CTAs if any still painted by terminal overlay */
.min-h-screen main .btn-primary,
.min-h-screen main a.btn-primary {
  background-color: var(--cb-brand) !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* OpenAI / platform green chips: muted emerald, not neon */
[class*="bg-emerald-"],
[class*="bg-green-"] {
  background-color: rgba(16, 185, 129, 0.14) !important;
  color: #6ee7b7 !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  background-image: none !important;
}

/* Do not let platform chip rule repaint primary brand pills */
[class*="bg-primary-"] {
  background-color: rgba(94, 234, 212, 0.12) !important;
  color: var(--cb-brand-bright) !important;
  border-color: rgba(94, 234, 212, 0.28) !important;
}

/* -------------------------------------------------------------------------- */
/* Account tools menu + floating panels — obsidian, not forest green           */
/* -------------------------------------------------------------------------- */

[data-ht-account-tools-fixed="1"],
[data-ht-account-tools-fixed="1"].absolute,
body > [data-ht-account-tools-fixed="1"] {
  background: #0a0c0d !important;
  background-color: #0a0c0d !important;
  background-image: none !important;
  border: 1px solid rgba(226, 232, 240, 0.12) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55) !important;
  color: #e2e8f0 !important;
}

.account-tools-menu-item:hover {
  background-color: rgba(94, 234, 212, 0.08) !important;
}

/* Generic teleported menus that still inherited forest plates */
body > [role="menu"],
body > .absolute.z-\[9999\],
body > .fixed.z-\[9999\],
body > div.absolute[class*="z-\[9"],
body > div.fixed[style*="z-index"] {
  /* only nudge background when they look like solid menus */
}

/* Icon chips that still used forest rgba */
button.icon-button,
[class*="icon-button"],
header button.flex.h-8.w-8,
header button.flex.h-9.w-9 {
  background-color: rgba(15, 20, 22, 0.92) !important;
  border-color: rgba(226, 232, 240, 0.12) !important;
  color: #e2e8f0 !important;
}

/* -------------------------------------------------------------------------- */
/* forest hardcode purge v32 — last-line defense                               */
/* Any leftover matrix panel paint → obsidian                                  */
/* -------------------------------------------------------------------------- */

[data-ht-account-tools-fixed="1"],
.batch-prompt-popover,
.date-picker-dropdown,
[role="dialog"] > .modal-content,
.sidebar-header .absolute.left-0.mt-2 {
  background-color: #0a0c0d !important;
  background-image: none !important;
}
