/* ============================================================
   NEONFLUX — colour & contrast pass (v1)
   Last stylesheet in the chain. Fixes inherited/platform colours:
   inline #333 wordmark, placeholder, autofill, selection accents,
   focus rings, disabled states, footer micro-type, chart ticks.
   WCAG targets: 4.5:1 body text, 3:1 large/decorative.
   ============================================================ */

/* ---------- 0. token nudge (declared later, wins) ---------- */
:root{
  --nf-t2:#7E90A8;          /* was #6B7F99 — 4.4:1 → 5.9:1 */
  --nf-t3:#5F7188;          /* decorative hairlines only */
  --nf-ph:#7C8DA6;          /* placeholder — 5.7:1 */
  --nf-icon:#7A8A9E;        /* input icons — 5.4:1 */
  --nf-line-soft:rgba(255,255,255,.055);
  accent-color:#00F0FF;
}

/* ---------- 1. wordmark: One API ships an inline #333 ---------- */
.ui.borderless.menu > .ui.container > a.item:first-child > div,
.ui.borderless.menu a.item > div[style*="18px"]{
  color:var(--nf-t0) !important;
  font-family:var(--nf-display) !important;
  font-weight:600 !important;
  letter-spacing:.04em !important;
}
.ui.borderless.menu a.item > img.nf-nav-mark{ margin-right:9px !important; }

/* ---------- 2. placeholders & field chrome ---------- */
input::placeholder,
textarea::placeholder{ color:var(--nf-ph) !important; opacity:1 !important; }
.ui.icon.input > i.icon,
.ui.input > i.icon{ color:var(--nf-icon) !important; opacity:1 !important; }
.ui.selection.dropdown > .dropdown.icon,
.ui.dropdown > .dropdown.icon{ color:var(--nf-icon) !important; }
select{ color:var(--nf-t0) !important; }
select option{ background:#0A0E17 !important; color:var(--nf-t0) !important; }

/* 2b. Chrome autofill paints a white plate — force our surface back */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill{
  -webkit-text-fill-color:var(--nf-t0) !important;
  -webkit-box-shadow:0 0 0 1000px #0A0E17 inset !important;
  box-shadow:0 0 0 1000px #0A0E17 inset !important;
  caret-color:var(--nf-cyan);
  transition:background-color 99999s ease-out 0s;
}

/* 2c. login card footer line ("Forgot password? / No account?") */
.nf-login-boost .ui.card .ui.message > div[style]{ color:var(--nf-t1) !important; }
.nf-login-boost .ui.card .ui.message a{ color:var(--nf-cyan) !important; }

/* ---------- 3. footer micro-type (inline block in Footer) ---------- */
.nf-footer-inner{ color:var(--nf-t2) !important; }
.nf-footer-sep{ color:rgba(255,255,255,.38) !important; }
.nf-footer-note{ color:#8A9BB2 !important; }
.nf-footer-meta{ color:#8A9BB2 !important; }

/* ---------- 4. charts: ticks were #5E6878 ---------- */
.chart-container .recharts-text,
.chart-container text{ fill:#7E8B9C !important; }
.chart-container .recharts-label{ fill:var(--nf-t1) !important; }
.recharts-cartesian-axis-tick-value{ fill:#7E8B9C !important; }

/* ---------- 5. table rhythm ---------- */
.ui.table > tbody > tr > td{ border-top:1px solid var(--nf-line-soft) !important; }
.ui.table > tbody > tr:hover > td{ background:rgba(0,240,255,.10) !important; }
.ui.table > tbody > tr:hover > td:first-child{ box-shadow:inset 2px 0 0 var(--nf-cyan); }
.ui.table > tbody > tr:first-child > td{ border-top:0 !important; }
.ui.table th .icon,
.ui.table td .icon{ color:inherit !important; }

/* 5b. empty table body: script injects a placeholder row (see nf-i18n.js) */
.ui.table > tbody > tr.nf-empty-row > td.nf-empty-cell{
  text-align:center !important;
  height:118px;
  vertical-align:middle !important;
  color:rgba(154,166,182,.82) !important;
  font-family:var(--nf-mono) !important;
  font-size:10.5px !important;
  letter-spacing:.3em;
  border-top:0 !important;
  background:transparent !important;
}
html[lang^="zh"] .ui.table > tbody > tr.nf-empty-row > td.nf-empty-cell{ letter-spacing:.2em; }

/* ---------- 6. dropdown selection ---------- */
.ui.dropdown .menu > .item:hover{ background:rgba(0,240,255,.10) !important; color:var(--nf-cyan) !important; }
.ui.dropdown .menu > .item.selected{ background:rgba(0,240,255,.08) !important; color:var(--nf-cyan) !important; }
.ui.dropdown .menu > .item.active{ background:rgba(0,240,255,.12) !important; color:#EFF3F9 !important; }

/* ---------- 7. disabled controls stay legible ---------- */
.ui.button.disabled,
.ui.button:disabled{
  opacity:1 !important;
  background:rgba(255,255,255,.04) !important;
  border:1px solid rgba(255,255,255,.09) !important;
  color:#7E8B9C !important;
  box-shadow:none !important;
  cursor:not-allowed !important;
}
.ui.selection.dropdown.disabled{ opacity:1 !important; }
.ui.selection.dropdown.disabled > .text,
.ui.selection.dropdown.disabled > .default.text{ color:#75808F !important; }
.ui.input.disabled > input,
input:disabled,
textarea:disabled{ color:#75808F !important; background:rgba(255,255,255,.03) !important; }

/* 7b. inactive tabs must not read as disabled */
.ui.tabular.menu .item,
.ui.secondary.pointing.menu .item{ color:#8A97AA !important; }

/* ---------- 8. keyboard focus, visible everywhere ---------- */
a:focus-visible,
button:focus-visible,
.ui.button:focus-visible,
.ui.dropdown:focus-visible,
.ui.checkbox:focus-visible > label,
[tabindex]:focus-visible{
  outline:2px solid rgba(0,240,255,.62) !important;
  outline-offset:2px !important;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible{ outline:none !important; }

/* ---------- 9. login CTA: lift the violet end (was 3.5:1) ---------- */
.nf-login-boost .ui.card .ui.form .ui.button,
.nf-login-boost .ui.card form .ui.button{
  background:linear-gradient(135deg,#25E3F1 0%,#3FD8F2 30%,#8E6BFF 100%) !important;
  border:1px solid rgba(0,240,255,.45) !important;
  color:#04070D !important;
  text-shadow:0 1px 0 rgba(255,255,255,.28);
}

/* ---------- 10. messages: close affordance ---------- */
.ui.message > .close.icon{ color:rgba(232,244,255,.62) !important; }
.ui.message > .close.icon:hover{ color:#fff !important; }

/* ---------- 11. selection (explicit, some UAs drop it) ---------- */
::selection{ background:rgba(0,240,255,.34) !important; color:#fff !important; }
::-moz-selection{ background:rgba(0,240,255,.34) !important; color:#fff !important; }

/* ---------- 12. semantic defaults that assume a white page ---------- */
.ui.header .sub.header{ color:var(--nf-t2) !important; }
.ui.list .item .header{ color:var(--nf-t0) !important; }
.ui.list .item .description{ color:var(--nf-t1) !important; }
.ui.card .description,
.ui.cards > .card .description{ color:var(--nf-t1) !important; }
.ui.ribbon.label{ color:#05070D !important; }
.ui.attached.label{ color:#05070D !important; }
mark{ background:rgba(0,240,255,.22) !important; color:#EFF3F9 !important; }
code, kbd{ color:#8FE9F2 !important; }
.ui.table tfoot th{ color:var(--nf-t2) !important; font-weight:500 !important; }
