/* =========================================================
   OpenJob :: Career Galaxy
   Futuristic deep-space dark mode
   ========================================================= */

:root {
  --bg-void:        #000000;
  --bg-deep:        #05080f;
  --bg-mid:         #0a0e16;
  --bg-panel:       rgba(12, 14, 22, 0.55);
  --bg-panel-solid: #0d1018;
  --bg-row-hover:   rgba(0, 240, 255, 0.04);

  --line-faint:     rgba(150, 160, 180, 0.12);
  --line-soft:      rgba(150, 160, 180, 0.22);
  --line-strong:    rgba(0, 240, 255, 0.45);

  --text-primary:   #e8ecf2;
  --text-secondary: #c0c4d0;
  --text-muted:     #7a8090;
  --text-dim:       #4d525e;

  --neon-cyan:      #00f0ff;
  --neon-cyan-soft: #5ef7ff;
  --neon-magenta:   #ff2bd6;
  --neon-gray:      #a0a8b8;
  --neon-gray-mid:  #6e7488;
  --neon-green:     #00ffa3;
  --neon-amber:     #ffb84d;
  --neon-pink:      #ff5fb1;

  --glow-cyan:      0 0 16px rgba(0, 240, 255, 0.55), 0 0 36px rgba(0, 240, 255, 0.18);
  --glow-magenta:   0 0 16px rgba(255, 43, 214, 0.55), 0 0 36px rgba(255, 43, 214, 0.18);
  --glow-green:     0 0 16px rgba(0, 255, 163, 0.55), 0 0 36px rgba(0, 255, 163, 0.18);
  --glow-gray:      0 0 16px rgba(160, 170, 200, 0.4),  0 0 36px rgba(160, 170, 200, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

html {
  background: #000;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, Menlo, Monaco, Consolas, monospace;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-color: #000;
  background-image:
    radial-gradient(ellipse at 18% 8%,  #181a22 0%, transparent 45%),
    radial-gradient(ellipse at 82% 78%, #161a22 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, #0a0e16 0%, var(--bg-void) 80%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection     { background: rgba(0, 240, 255, 0.3); color: #fff; }
::-moz-selection { background: rgba(0, 240, 255, 0.3); color: #fff; }

/* =====================================================
   COSMOS — multi-layer starfield + nebula + grid
   ===================================================== */

.cosmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: -50%;
  background-repeat: repeat;
  will-change: transform;
}

.stars-1 {
  background-image:
    radial-gradient(1px 1px at 12% 8%,  #ffffff 50%, transparent 100%),
    radial-gradient(1px 1px at 32% 22%, #cae7ff 50%, transparent 100%),
    radial-gradient(1px 1px at 78% 14%, #ffffff 50%, transparent 100%),
    radial-gradient(1px 1px at 88% 62%, #d8e5ff 50%, transparent 100%),
    radial-gradient(1px 1px at 24% 76%, #ffffff 50%, transparent 100%),
    radial-gradient(1px 1px at 56% 88%, #ffe4f0 50%, transparent 100%),
    radial-gradient(1px 1px at 8%  44%, #ffffff 50%, transparent 100%),
    radial-gradient(1px 1px at 67% 38%, #c5d8ff 50%, transparent 100%),
    radial-gradient(1px 1px at 44% 56%, #ffffff 50%, transparent 100%);
  background-size: 360px 360px;
  opacity: 0.7;
  animation: drift 240s linear infinite;
}

.stars-2 {
  background-image:
    radial-gradient(2px 2px at 17% 28%, #ffffff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 62% 12%, #b8e2ff 50%, transparent 100%),
    radial-gradient(2px 2px at 84% 70%, #ffd2f0 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 38% 84%, #ffffff 50%, transparent 100%),
    radial-gradient(2px 2px at 5%  64%, #c8d8ff 50%, transparent 100%);
  background-size: 520px 520px;
  opacity: 0.55;
  animation: drift 360s linear infinite reverse;
}

.stars-3 {
  background-image:
    radial-gradient(3px 3px at 28% 40%, rgba(255,255,255,0.85) 30%, transparent 70%),
    radial-gradient(2.5px 2.5px at 72% 22%, rgba(0, 240, 255, 0.7) 30%, transparent 70%),
    radial-gradient(2.5px 2.5px at 50% 78%, rgba(255, 43, 214, 0.55) 30%, transparent 70%);
  background-size: 900px 900px;
  opacity: 0.85;
  animation: twinkle 6s ease-in-out infinite, drift 480s linear infinite;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: screen;
}

.nebula-1 {
  width: 60vw; height: 60vw;
  top: -15vw; left: -10vw;
  background: radial-gradient(circle, rgba(170, 180, 200, 0.4) 0%, rgba(170, 180, 200, 0) 70%);
  animation: float-a 28s ease-in-out infinite alternate;
}

.nebula-2 {
  width: 70vw; height: 70vw;
  bottom: -25vw; right: -15vw;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.35) 0%, rgba(255, 43, 214, 0.18) 40%, rgba(0, 240, 255, 0) 70%);
  animation: float-b 36s ease-in-out infinite alternate;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  opacity: 0.6;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-200px, -260px, 0); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.35; }
}
@keyframes float-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 60px) scale(1.1); }
}
@keyframes float-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-100px, -80px) scale(1.08); }
}

/* =====================================================
   HEADER / BRAND
   ===================================================== */

header, main { position: relative; z-index: 1; }

header {
  padding: 2rem 1.25rem 1.5rem;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.7) 0%, rgba(10, 14, 22, 0) 100%);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.08), transparent);
  background-size: 200% 100%;
  animation: scan 12s ease-in-out infinite;
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--neon-cyan) 50%, transparent 100%);
  opacity: 0.7;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

@keyframes scan {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -100% 0; }
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#home-orb-trigger,
#home-text-trigger {
  cursor: pointer;
}

#home-orb-trigger:focus-visible,
#home-text-trigger:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 4px;
}

.orb {
  position: relative;
  width: 52px; height: 52px;
  display: inline-block;
  flex-shrink: 0;
}
.orb-core {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #b6f5ff 0%, var(--neon-cyan) 35%, var(--neon-gray-mid) 80%, #181a22 100%);
  box-shadow:
    inset -4px -6px 14px rgba(110, 116, 136, 0.6),
    0 0 20px rgba(0, 240, 255, 0.7),
    0 0 40px rgba(0, 240, 255, 0.35);
  animation: pulse-orb 4s ease-in-out infinite;
}
.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5), inset 0 0 12px rgba(0, 240, 255, 0.25);
  animation: spin 8s linear infinite;
}
.orb-ring::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  margin-left: -3px;
  background: var(--neon-magenta);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-magenta), 0 0 20px var(--neon-magenta);
}

@keyframes pulse-orb {
  0%, 100% { transform: scale(1);    filter: brightness(1); }
  50%      { transform: scale(1.05); filter: brightness(1.2); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.brand-text { display: flex; flex-direction: column; gap: 0.25rem; }

header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-shadow:
    0 0 12px rgba(0, 240, 255, 0.6),
    0 0 28px rgba(0, 240, 255, 0.25);
  line-height: 1;
}
.brand-mark {
  margin: 0 0.4rem;
  color: var(--neon-magenta);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.7);
  font-weight: 400;
}
.brand-sub {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--neon-cyan);
  letter-spacing: 0.32em;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
}

.subtitle {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green), 0 0 16px rgba(0, 255, 163, 0.6);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.hud {
  --hud-action-height: 3rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.settings-btn {
  width: var(--hud-action-height);
  height: var(--hud-action-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 4px;
  background: rgba(8, 10, 18, 0.72);
  color: var(--neon-cyan);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.08);
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.settings-btn:hover {
  transform: translateY(-1px);
  border-color: var(--neon-cyan-soft);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35), inset 0 0 14px rgba(0, 240, 255, 0.15);
}
.settings-btn:focus-visible {
  outline: 1px solid var(--neon-cyan);
  outline-offset: 3px;
}
.settings-btn.is-active {
  color: #ffffff;
  border-color: var(--neon-magenta);
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.65);
  box-shadow: 0 0 14px rgba(255, 43, 214, 0.36), inset 0 0 14px rgba(255, 43, 214, 0.12);
}

/* =====================================================
   LAUNCH BUTTON — futuristic spaceship probe
   ===================================================== */

.launch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: var(--hud-action-height);
  padding: 0.5rem 1rem 0.5rem 0.7rem;
  border: 1px solid rgba(255, 43, 214, 0.55);
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-primary);
  background:
    linear-gradient(135deg, rgba(255, 43, 214, 0.1) 0%, rgba(0, 240, 255, 0.08) 100%),
    rgba(8, 10, 18, 0.7);
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  box-shadow:
    0 0 0 1px rgba(255, 43, 214, 0.15),
    0 0 20px rgba(255, 43, 214, 0.28),
    inset 0 0 14px rgba(255, 43, 214, 0.06);
}
.launch-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 38%, rgba(0, 240, 255, 0.22) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.launch-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 5px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 184, 77, 0) 0%, transparent 60%);
  transition: background 0.25s ease;
}
.launch-btn:hover {
  border-color: var(--neon-magenta);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 43, 214, 0.4),
    0 0 30px rgba(255, 43, 214, 0.6),
    inset 0 0 18px rgba(255, 43, 214, 0.14);
}
.launch-btn:hover::before { transform: translateX(130%); }
.launch-btn:active { transform: translateY(0); }
.launch-btn:focus-visible {
  outline: 1px solid var(--neon-cyan);
  outline-offset: 3px;
}

.launch-rocket {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 30px;
  flex-shrink: 0;
  animation: rocket-bob 2.6s ease-in-out infinite;
}
@keyframes rocket-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.5px); }
}

.rocket-svg {
  display: block;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));
}
.rocket-body {
  fill: url(#rocket-body-grad);
  stroke: rgba(0, 240, 255, 0.65);
  stroke-width: 0.5;
}
.rocket-fin {
  fill: var(--neon-magenta);
  filter: drop-shadow(0 0 3px rgba(255, 43, 214, 0.7));
}
.rocket-window {
  fill: url(#rocket-window-grad);
  stroke: rgba(255, 43, 214, 0.7);
  stroke-width: 0.6;
}

.rocket-flame {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 14px;
  margin-left: -5px;
  opacity: 0;
  pointer-events: none;
  transform-origin: top center;
  transition: opacity 0.18s ease;
}
.flame-core,
.flame-glow {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 40% 40% / 35% 35% 65% 65%;
}
.flame-core {
  background: linear-gradient(180deg, #fff6d6 0%, var(--neon-amber) 35%, var(--neon-magenta) 80%, transparent 100%);
  filter: blur(0.5px);
}
.flame-glow {
  background: radial-gradient(ellipse at top, rgba(255, 184, 77, 0.55) 0%, rgba(255, 43, 214, 0.25) 50%, transparent 80%);
  filter: blur(4px);
  transform: scale(1.6);
}

.rocket-trail {
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 2px;
  height: 0;
  margin-left: -1px;
  background: linear-gradient(180deg, rgba(255, 184, 77, 0.85), rgba(0, 240, 255, 0));
  opacity: 0;
  pointer-events: none;
  border-radius: 2px;
  filter: blur(0.4px);
}

.launch-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1;
  white-space: nowrap;
}
.launch-text-top {
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.55);
}
.launch-text-bot {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.45);
}

/* ===== LAUNCHING state ===== */
.launch-btn.is-launching {
  pointer-events: none;
  border-color: var(--neon-amber);
  background:
    linear-gradient(135deg, rgba(255, 184, 77, 0.15) 0%, rgba(255, 43, 214, 0.1) 100%),
    rgba(8, 10, 18, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 184, 77, 0.45),
    0 0 32px rgba(255, 184, 77, 0.65),
    inset 0 0 18px rgba(255, 184, 77, 0.18);
  animation: launch-shake 0.18s linear infinite;
}
.launch-btn.is-launching::after {
  background: radial-gradient(ellipse at 50% 110%, rgba(255, 184, 77, 0.55) 0%, transparent 60%);
}
.launch-btn.is-launching .launch-rocket {
  animation: rocket-blastoff 0.6s ease-in-out infinite;
}
.launch-btn.is-launching .rocket-flame {
  opacity: 1;
  animation: flame-flicker 0.09s linear infinite;
}
.launch-btn.is-launching .rocket-trail {
  height: 16px;
  opacity: 0.9;
  animation: trail-pulse 0.4s ease-out infinite;
}
.launch-btn.is-launching .launch-text-top {
  color: var(--neon-amber);
  text-shadow: 0 0 6px rgba(255, 184, 77, 0.7);
}
.launch-btn.is-launching .launch-text-bot {
  color: var(--neon-amber);
  text-shadow: 0 0 10px rgba(255, 184, 77, 0.65);
}
.launch-btn.is-launching .launch-text-bot::before {
  content: 'IN FLIGHT';
}
.launch-btn.is-launching .launch-text-bot > span,
.launch-btn.is-launching .launch-text-bot {
  font-size: 0.78rem;
}
.launch-btn.is-launching .launch-text-bot {
  visibility: hidden;
  position: relative;
}
.launch-btn.is-launching .launch-text-bot::before {
  position: absolute;
  inset: 0;
  visibility: visible;
}

@keyframes rocket-blastoff {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-2.5px); }
  100% { transform: translateY(0); }
}
@keyframes launch-shake {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-0.4px, 0.4px); }
  50%  { transform: translate(0.4px, -0.4px); }
  75%  { transform: translate(-0.4px, -0.4px); }
  100% { transform: translate(0, 0); }
}
@keyframes flame-flicker {
  0%   { transform: scaleY(1) scaleX(0.92);    filter: blur(0.3px) brightness(1); }
  50%  { transform: scaleY(1.18) scaleX(1.06); filter: blur(1.4px) brightness(1.25); }
  100% { transform: scaleY(0.88) scaleX(1);    filter: blur(0.6px) brightness(0.95); }
}
@keyframes trail-pulse {
  0%   { opacity: 0.95; transform: scaleY(1); }
  50%  { opacity: 0.55; transform: scaleY(0.7); }
  100% { opacity: 0.95; transform: scaleY(1); }
}

/* =====================================================
   AGENT DASHBOARD — multi-probe live telemetry
   ===================================================== */

.agent-dashboard {
  position: relative;
  margin: 0 0 1.25rem;
  border: 1px solid rgba(255, 184, 77, 0.4);
  border-radius: 6px;
  background: rgba(8, 10, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 184, 77, 0.1),
    0 0 36px rgba(255, 184, 77, 0.2),
    0 20px 50px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.agent-dashboard::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-amber), var(--neon-magenta), transparent);
  box-shadow: 0 0 14px rgba(255, 184, 77, 0.55);
}

.ad-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line-faint);
  background: linear-gradient(180deg, rgba(255, 184, 77, 0.06), transparent);
}
.ad-tag {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--neon-amber);
  text-shadow: 0 0 6px rgba(255, 184, 77, 0.6);
}
.ad-count {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.55);
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.06);
  font-variant-numeric: tabular-nums;
}
.ad-spacer { flex: 1; }
.ad-new {
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-green);
  background: rgba(0, 255, 163, 0.08);
  border: 1px solid rgba(0, 255, 163, 0.4);
  border-radius: 3px;
  padding: 0.34rem 0.7rem;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(0, 255, 163, 0.45);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.ad-new:hover:not(:disabled) {
  background: rgba(0, 255, 163, 0.16);
  transform: translateY(-1px);
}
.ad-new:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ad-close {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.ad-close:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.06);
}

.ad-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.ad-empty p { margin: 0; }

.ad-grid {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
}
.ad-grid[data-cols="0"] { display: none; }
.ad-grid[data-cols="1"] { grid-template-columns: 1fr; }
.ad-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.ad-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.ad-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

.ad-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(8, 10, 18, 0.88);
  position: relative;
  border-top: 1px solid transparent;
}
.ad-column[data-status="complete"] {
  background: linear-gradient(180deg, rgba(0, 255, 163, 0.04), rgba(8, 10, 18, 0.9) 35%);
}
.ad-column[data-status="error"],
.ad-column[data-status="cancelled"] {
  background: linear-gradient(180deg, rgba(255, 95, 177, 0.04), rgba(8, 10, 18, 0.9) 35%);
}

.adc-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line-faint);
  background: linear-gradient(180deg, rgba(255, 184, 77, 0.05), transparent);
}
.adc-tag {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--neon-amber);
  text-shadow: 0 0 6px rgba(255, 184, 77, 0.55);
  flex-shrink: 0;
}
.adc-phase {
  flex: 1;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.55);
  padding: 0.14rem 0.45rem;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.06);
  font-variant-numeric: tabular-nums;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-column[data-status="complete"] .adc-phase {
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.45);
  background: rgba(0, 255, 163, 0.1);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.6);
}
.ad-column[data-status="error"] .adc-phase,
.ad-column[data-status="cancelled"] .adc-phase {
  color: var(--neon-pink);
  border-color: rgba(255, 95, 177, 0.45);
  background: rgba(255, 95, 177, 0.1);
  text-shadow: 0 0 8px rgba(255, 95, 177, 0.55);
}

.adc-action {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.adc-action:hover {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  background: rgba(255, 95, 177, 0.08);
}

.adc-targets {
  padding: 0.32rem 0.7rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adc-body {
  padding: 0.35rem 0.7rem;
  height: 280px;
  overflow-y: auto;
}
.adc-log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.adc-log li {
  padding: 0.28rem 0;
  display: flex;
  gap: 0.55rem;
  border-bottom: 1px dashed rgba(150, 160, 180, 0.08);
  animation: log-in 0.32s ease-out;
}
.adc-log li:last-child { border-bottom: 0; }
.adc-log .log-tag {
  flex-shrink: 0;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  min-width: 4.6rem;
  color: var(--text-muted);
}
.adc-log .log-msg {
  flex: 1;
  color: var(--text-primary);
  word-break: break-word;
  min-width: 0;
}
.adc-log li.log-phase .log-tag    { color: var(--neon-amber);   text-shadow: 0 0 6px rgba(255, 184, 77, 0.55); }
.adc-log li.log-tool .log-tag     { color: var(--neon-cyan);    text-shadow: 0 0 6px rgba(0, 240, 255, 0.55); }
.adc-log li.log-success .log-tag  { color: var(--neon-green);   text-shadow: 0 0 6px rgba(0, 255, 163, 0.6); }
.adc-log li.log-add .log-tag      { color: var(--neon-green);   text-shadow: 0 0 6px rgba(0, 255, 163, 0.6); }
.adc-log li.log-error .log-tag    { color: var(--neon-pink);    text-shadow: 0 0 6px rgba(255, 95, 177, 0.55); }

@keyframes log-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

.adc-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.7rem;
  border-top: 1px solid var(--line-faint);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.adc-counter strong {
  color: var(--neon-cyan);
  font-size: 0.85rem;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  margin-right: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.adc-status {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  text-align: right;
}

/* New-row highlight after discovery success */
tbody tr.is-new td {
  animation: row-flash 5s ease-out;
}
@keyframes row-flash {
  0%   { background: rgba(0, 255, 163, 0.22); box-shadow: inset 3px 0 0 var(--neon-green); }
  60%  { background: rgba(0, 255, 163, 0.06); }
  100% { background: transparent; box-shadow: none; }
}

/* =====================================================
   CURRENT COMPANY — active target panel
   ===================================================== */

.current-company-panel {
  position: relative;
  margin: 0 0 1.25rem;
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.05) 0%, rgba(12, 14, 22, 0.55) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.15),
    0 0 32px rgba(0, 240, 255, 0.22),
    0 12px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: cc-glow 4.2s ease-in-out infinite;
}
.current-company-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-magenta), transparent);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.55);
  z-index: 3;
}

@keyframes cc-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 240, 255, 0.15),
      0 0 28px rgba(0, 240, 255, 0.22),
      0 12px 36px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 240, 255, 0.25),
      0 0 40px rgba(0, 240, 255, 0.35),
      0 12px 36px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

.cc-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line-faint);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.08), transparent);
  position: relative;
  z-index: 2;
}
.cc-tag {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
  font-weight: 600;
  text-transform: uppercase;
}
.cc-name {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-magenta);
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.5);
  font-weight: 600;
}

.cc-table-wrap {
  position: relative;
  z-index: 1;
}
#current-company-table {
  width: 100%;
  border-collapse: collapse;
}
#current-company-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  font-size: 0.9rem;
  vertical-align: middle;
  border-bottom: 0;
}
#current-company-table td.num {
  text-align: center;
}
#current-company-table tbody tr {
  background: rgba(0, 240, 255, 0.03);
}
#current-company-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.06);
}
#current-company-table .company-link:hover strong,
#current-company-table .company-link:focus-visible strong {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

/* Subtle highlight on the row in the main table that matches currentCompany */
#companies tbody tr.is-current {
  background: rgba(0, 240, 255, 0.05);
  box-shadow: inset 3px 0 0 var(--neon-cyan);
}
#companies tbody tr.is-current td:first-child strong {
  color: var(--neon-cyan-soft);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
}

/* =====================================================
   MAIN / TOOLBAR
   ===================================================== */

main {
  max-width: 1180px;
  margin: 1.75rem auto;
  padding: 0 1.25rem 4rem;
}

.settings-view {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(10, 14, 22, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.settings-panel {
  padding: 1.4rem 1.2rem 1.3rem;
}

.settings-header h2 {
  margin: 0 0 0.4rem;
  color: var(--text-primary);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.settings-header p {
  margin: 0 0 1.1rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.settings-fieldset {
  margin: 0 0 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.8rem 0.8rem 0.65rem;
  background: rgba(2, 4, 10, 0.45);
}

.settings-fieldset legend {
  color: var(--neon-cyan);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 0.45rem;
}

.settings-radio {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.35rem 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.settings-radio input[type="radio"] {
  margin: 0;
  accent-color: var(--neon-cyan);
}

.settings-label {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.settings-label input {
  width: 100%;
  margin-top: 0.38rem;
  padding: 0.64rem 0.78rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary);
  background: rgba(2, 4, 10, 0.6);
  letter-spacing: 0.03em;
  text-transform: none;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.settings-label input:focus {
  border-color: var(--neon-cyan);
  background: rgba(2, 4, 10, 0.85);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12), 0 0 16px rgba(0, 240, 255, 0.22);
}

.settings-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.settings-actions button {
  padding: 0.58rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
  background: rgba(12, 14, 22, 0.84);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

#settings-save {
  color: var(--neon-cyan);
  border-color: rgba(0, 240, 255, 0.55);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25), inset 0 0 12px rgba(0, 240, 255, 0.08);
}

#settings-save:hover {
  color: #ffffff;
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), inset 0 0 14px rgba(0, 240, 255, 0.14);
}

#settings-back:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: rgba(26, 31, 44, 0.9);
}

.settings-status {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  color: var(--neon-green);
  letter-spacing: 0.08em;
}

.settings-status.is-error {
  color: var(--neon-pink);
}

.toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.search-icon {
  position: absolute;
  top: 50%; left: 0.85rem;
  transform: translateY(-50%);
  color: var(--neon-cyan);
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  pointer-events: none;
}
#search {
  width: 100%;
  padding: 0.65rem 0.95rem 0.65rem 2.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  letter-spacing: 0.04em;
  background: rgba(8, 10, 18, 0.65);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#search::placeholder { color: var(--text-dim); letter-spacing: 0.06em; }
#search:focus {
  border-color: var(--neon-cyan);
  background: rgba(8, 10, 18, 0.85);
  box-shadow:
    0 0 0 3px rgba(0, 240, 255, 0.15),
    0 0 18px rgba(0, 240, 255, 0.3);
}

.stats {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(12, 14, 22, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-pill em { font-style: normal; color: var(--text-muted); font-size: 0.7rem; }
.stat-pill strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.stat-views strong {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}
.stat-apps strong {
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.6);
}
.stat-views { border-color: rgba(0, 240, 255, 0.25); }
.stat-apps  { border-color: rgba(0, 255, 163, 0.25); }
.stat-pct {
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0.1rem 0.4rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}
.stat-views .stat-pct { color: var(--neon-cyan); border-color: rgba(0, 240, 255, 0.25); }
.stat-apps  .stat-pct { color: var(--neon-green); border-color: rgba(0, 255, 163, 0.25); }
#status { color: var(--text-dim); font-size: 0.72rem; letter-spacing: 0.1em; }

/* =====================================================
   PANEL / TABLE
   ===================================================== */

.table-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.05),
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.table-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0.6;
}
.table-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(0, 240, 255, 0.06), transparent 50%);
  pointer-events: none;
}

.panel-corner {
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
  z-index: 2;
}
.panel-corner-tl { top: 6px;    left: 6px;  border-top: 1px solid var(--neon-cyan);    border-left: 1px solid var(--neon-cyan);   box-shadow: -4px -4px 12px -6px var(--neon-cyan); }
.panel-corner-tr { top: 6px;    right: 6px; border-top: 1px solid var(--neon-cyan);    border-right: 1px solid var(--neon-cyan);  box-shadow:  4px -4px 12px -6px var(--neon-cyan); }
.panel-corner-bl { bottom: 6px; left: 6px;  border-bottom: 1px solid var(--neon-cyan); border-left: 1px solid var(--neon-cyan);   box-shadow: -4px  4px 12px -6px var(--neon-cyan); }
.panel-corner-br { bottom: 6px; right: 6px; border-bottom: 1px solid var(--neon-cyan); border-right: 1px solid var(--neon-cyan);  box-shadow:  4px  4px 12px -6px var(--neon-cyan); }

table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 1;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line-faint);
  font-size: 0.85rem;
  vertical-align: middle;
}

th {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.05) 0%, rgba(12, 14, 22, 0.85) 100%);
  font-weight: 600;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--line-strong);
  z-index: 2;
  user-select: none;
}
th::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0.4;
}

/* Sortable headers — click targets with sci-fi indicator arrow */
th.sortable {
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s, text-shadow 0.18s;
}
th.sortable:hover {
  color: var(--neon-cyan-soft);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.1) 0%, rgba(12, 14, 22, 0.85) 100%);
}
.sort-arrow {
  display: inline-block;
  margin-left: 0.4em;
  width: 0.7em;
  height: 0.7em;
  position: relative;
  vertical-align: middle;
  opacity: 0.35;
  transition: opacity 0.18s, transform 0.25s;
}
.sort-arrow::before {
  content: '▾';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  line-height: 1;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}
th.sortable:hover .sort-arrow { opacity: 0.8; }
th.sort-asc  .sort-arrow { opacity: 1; transform: rotate(180deg); }
th.sort-desc .sort-arrow { opacity: 1; transform: rotate(0deg); }
th.sort-asc, th.sort-desc {
  color: var(--neon-cyan-soft);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.12) 0%, rgba(12, 14, 22, 0.85) 100%);
}

tbody tr {
  position: relative;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover {
  background: var(--bg-row-hover);
  box-shadow: inset 3px 0 0 var(--neon-cyan), inset 0 0 0 1px rgba(0, 240, 255, 0.06);
}
tbody tr:hover td:first-child strong {
  color: var(--neon-cyan-soft);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
}

td strong {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: color 0.18s, text-shadow 0.18s;
}

.num { text-align: center; }

.company-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: block;
  margin: -0.85rem -1rem;
  padding: 0.85rem 1rem;
  transition: color 0.18s, text-shadow 0.18s;
}
.company-link:hover strong,
.company-link:focus-visible strong {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}
.company-link:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.6);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Vendor chips — encoded with neon channel colors */
.vendor {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: rgba(160, 170, 200, 0.08);
  color: var(--neon-gray);
  border: 1px solid rgba(160, 170, 200, 0.3);
  border-radius: 3px;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: inherit;
  box-shadow: inset 0 0 8px rgba(160, 170, 200, 0.1);
}
.vendor.greenhouse,
.vendor.ashbyhq {
  background: rgba(150, 160, 180, 0.04);
  color: var(--text-dim);
  border-color: rgba(150, 160, 180, 0.12);
  box-shadow: none;
}
.vendor.companycareers {
  background: rgba(0, 255, 163, 0.06);
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.3);
  box-shadow: inset 0 0 8px rgba(0, 255, 163, 0.1);
}

/* Numeric badges — readouts */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.1);
}
/* Applications column badges — green channel (applying is the goal) */
td.num + td.num .badge:not(.zero),
td:nth-of-type(4) .badge:not(.zero) {
  background: rgba(0, 255, 163, 0.08);
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.28);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.5);
  box-shadow: inset 0 0 8px rgba(0, 255, 163, 0.1);
}
/* Views badge — green when applied */
.badge.is-applied {
  background: rgba(0, 255, 163, 0.08);
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.28);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.5);
  box-shadow: inset 0 0 8px rgba(0, 255, 163, 0.1);
}
/* Views badge — pink/violet when downvoted */
.badge.is-downvoted {
  background: rgba(255, 95, 177, 0.08);
  color: var(--neon-pink);
  border-color: rgba(255, 95, 177, 0.32);
  text-shadow: 0 0 8px rgba(255, 95, 177, 0.5);
  box-shadow: inset 0 0 8px rgba(255, 95, 177, 0.1);
}
/* Zero-value badges dim out across every column */
.badge.zero,
.badge.is-neutral {
  background: rgba(150, 160, 180, 0.04);
  color: var(--text-dim);
  border-color: rgba(150, 160, 180, 0.12);
  text-shadow: none;
  box-shadow: none;
}

/* Applied / launch button */
.applied-btn {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-soft);
  background: rgba(12, 14, 22, 0.7);
  color: var(--text-secondary);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.06s;
}
.applied-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(0, 240, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.applied-btn:hover::before { transform: translateX(110%); }
.applied-btn:active { transform: translateY(1px); }

.applied-btn.is-pending:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4), inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.applied-btn.is-applied {
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.55);
  background: rgba(0, 255, 163, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 163, 0.35), inset 0 0 12px rgba(0, 255, 163, 0.08);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.55);
}
.applied-btn.is-applied:hover {
  background: rgba(0, 255, 163, 0.14);
  box-shadow: 0 0 18px rgba(0, 255, 163, 0.55), inset 0 0 16px rgba(0, 255, 163, 0.12);
}

.applied-btn.is-downvoted {
  color: var(--neon-pink);
  border-color: rgba(255, 95, 177, 0.55);
  background: rgba(255, 95, 177, 0.08);
  box-shadow: 0 0 12px rgba(255, 95, 177, 0.35), inset 0 0 12px rgba(255, 95, 177, 0.08);
  text-shadow: 0 0 8px rgba(255, 95, 177, 0.55);
}
.applied-btn.is-downvoted:hover {
  background: rgba(255, 95, 177, 0.14);
  box-shadow: 0 0 18px rgba(255, 95, 177, 0.55), inset 0 0 16px rgba(255, 95, 177, 0.12);
}

/* =====================================================
   VOTE — state indicator + up/down action buttons
   ===================================================== */

.vote-indicator {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line-soft);
  background: rgba(150, 160, 180, 0.04);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.vote-indicator.is-up {
  color: var(--neon-green);
  background: rgba(0, 255, 163, 0.08);
  border-color: rgba(0, 255, 163, 0.35);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.55);
  box-shadow: inset 0 0 8px rgba(0, 255, 163, 0.1);
}
.vote-indicator.is-down {
  color: var(--neon-pink);
  background: rgba(255, 95, 177, 0.08);
  border-color: rgba(255, 95, 177, 0.35);
  text-shadow: 0 0 8px rgba(255, 95, 177, 0.55);
  box-shadow: inset 0 0 8px rgba(255, 95, 177, 0.1);
}

.vote-actions {
  display: inline-flex;
  gap: 0.35rem;
}
.vote-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-soft);
  background: rgba(12, 14, 22, 0.7);
  color: var(--text-secondary);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.06s;
}
.vote-btn:active { transform: translateY(1px); }
.vote-btn.vote-up:hover {
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.55);
  background: rgba(0, 255, 163, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 163, 0.4), inset 0 0 10px rgba(0, 255, 163, 0.08);
}
.vote-btn.vote-down:hover {
  color: var(--neon-pink);
  border-color: rgba(255, 95, 177, 0.55);
  background: rgba(255, 95, 177, 0.08);
  box-shadow: 0 0 12px rgba(255, 95, 177, 0.4), inset 0 0 10px rgba(255, 95, 177, 0.08);
}
.vote-btn.vote-up.is-active {
  color: var(--neon-green);
  border-color: rgba(0, 255, 163, 0.7);
  background: rgba(0, 255, 163, 0.14);
  box-shadow: 0 0 14px rgba(0, 255, 163, 0.55), inset 0 0 12px rgba(0, 255, 163, 0.16);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.6);
}
.vote-btn.vote-down.is-active {
  color: var(--neon-pink);
  border-color: rgba(255, 95, 177, 0.7);
  background: rgba(255, 95, 177, 0.14);
  box-shadow: 0 0 14px rgba(255, 95, 177, 0.55), inset 0 0 12px rgba(255, 95, 177, 0.16);
  text-shadow: 0 0 8px rgba(255, 95, 177, 0.6);
}

/* =====================================================
   DIALOG — holographic transmission terminal
   ===================================================== */

dialog {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0;
  max-width: 460px;
  width: 92%;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(15, 18, 26, 0.92) 0%, rgba(8, 10, 18, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.15),
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(0, 240, 255, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
dialog::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan) 20%, var(--neon-magenta) 80%, transparent);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}
dialog::backdrop {
  background: radial-gradient(ellipse at center, rgba(70, 78, 92, 0.45) 0%, rgba(2, 4, 10, 0.88) 70%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#apply-form { padding: 1.6rem 1.5rem 1.4rem; }

.dialog-header { margin-bottom: 1.3rem; }
.dialog-tag {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  margin-bottom: 0.5rem;
}
#apply-form h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
#apply-company {
  margin: 0;
  color: var(--neon-magenta);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.45);
}

#apply-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
#apply-form input {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(2, 4, 10, 0.6);
  color: var(--text-primary);
  outline: none;
  letter-spacing: 0.02em;
  text-transform: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
#apply-form input::placeholder { color: var(--text-dim); }
#apply-form input:focus {
  border-color: var(--neon-cyan);
  background: rgba(2, 4, 10, 0.85);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12), 0 0 16px rgba(0, 240, 255, 0.25);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.actions button {
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
  background: rgba(12, 14, 22, 0.8);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.actions button:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: rgba(28, 32, 42, 0.85);
}
#apply-save {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3), inset 0 0 12px rgba(0, 240, 255, 0.08);
}
#apply-save:hover {
  color: #fff;
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.6), inset 0 0 18px rgba(0, 240, 255, 0.18);
}
#apply-save:disabled { opacity: 0.5; cursor: wait; }

/* =====================================================
   VENDOR DIALOG — board-vendor target picker
   ===================================================== */

#vendor-dialog { max-width: 540px; }
#vendor-form { padding: 1.6rem 1.5rem 1.4rem; }
#vendor-form h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
#vendor-subtitle {
  margin: 0;
  color: var(--neon-magenta);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.45);
}

.vendor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.7rem;
  margin: 0.4rem 0 1rem;
}
.vendor-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(2, 4, 10, 0.55);
  cursor: pointer;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
}
.vendor-opt:hover {
  color: var(--text-primary);
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.04);
}
.vendor-opt input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(2, 4, 10, 0.8);
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.vendor-opt input[type="checkbox"]:checked {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.45), inset 0 0 6px rgba(0, 240, 255, 0.25);
}
.vendor-opt input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
  border: solid var(--neon-cyan);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.vendor-opt:has(input:checked) {
  color: var(--text-primary);
  border-color: rgba(0, 240, 255, 0.55);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.08);
}
.vendor-opt--wide {
  grid-column: 1 / -1;
}

.vendor-toggles {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.vendor-toggles button {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
  background: rgba(12, 14, 22, 0.8);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.vendor-toggles button:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: rgba(28, 32, 42, 0.85);
}

#vendor-launch {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3), inset 0 0 12px rgba(0, 240, 255, 0.08);
}
#vendor-launch:hover {
  color: #fff;
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.6), inset 0 0 18px rgba(0, 240, 255, 0.18);
}

@media (max-width: 540px) {
  .vendor-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   DOWNVOTE DIALOG — capture reason for negative vote
   ===================================================== */

#downvote-dialog { max-width: 460px; }
#downvote-form { padding: 1.6rem 1.5rem 1.4rem; }
#downvote-form h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.3);
}
#downvote-company {
  margin: 0 0 1rem;
  color: var(--neon-magenta);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.45);
}

.downvote-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.2rem 0 0.9rem;
}
.downvote-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(2, 4, 10, 0.55);
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
}
.downvote-opt:hover {
  color: var(--text-primary);
  border-color: rgba(255, 43, 214, 0.45);
  background: rgba(255, 43, 214, 0.04);
}
.downvote-opt input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(2, 4, 10, 0.8);
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.downvote-opt input[type="radio"]:checked {
  border-color: var(--neon-magenta);
  background: rgba(255, 43, 214, 0.15);
  box-shadow: 0 0 10px rgba(255, 43, 214, 0.45), inset 0 0 6px rgba(255, 43, 214, 0.25);
}
.downvote-opt input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--neon-magenta);
  box-shadow: 0 0 6px rgba(255, 43, 214, 0.7);
}
.downvote-opt:has(input:checked) {
  color: var(--text-primary);
  border-color: rgba(255, 43, 214, 0.6);
  background: rgba(255, 43, 214, 0.06);
  box-shadow: inset 0 0 12px rgba(255, 43, 214, 0.08);
}

.downvote-other-label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.downvote-other-label textarea {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
  background: rgba(2, 4, 10, 0.6);
  color: var(--text-primary);
  outline: none;
  letter-spacing: 0.02em;
  text-transform: none;
  resize: vertical;
  min-height: 2.4rem;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s, opacity 0.18s;
}
.downvote-other-label textarea::placeholder { color: var(--text-dim); }
.downvote-other-label textarea:focus {
  border-color: var(--neon-magenta);
  background: rgba(2, 4, 10, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 43, 214, 0.12), 0 0 16px rgba(255, 43, 214, 0.25);
}
.downvote-other-label textarea:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#downvote-save {
  color: var(--neon-magenta);
  border-color: var(--neon-magenta);
  background: rgba(255, 43, 214, 0.08);
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.55);
  box-shadow: 0 0 14px rgba(255, 43, 214, 0.3), inset 0 0 12px rgba(255, 43, 214, 0.08);
}
#downvote-save:hover {
  color: #fff;
  background: rgba(255, 43, 214, 0.2);
  box-shadow: 0 0 22px rgba(255, 43, 214, 0.6), inset 0 0 18px rgba(255, 43, 214, 0.18);
}
#downvote-save:disabled { opacity: 0.5; cursor: wait; }

/* =====================================================
   CUSTOM SCROLLBAR
   ===================================================== */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(8, 10, 18, 0.6); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.4), rgba(110, 116, 136, 0.45));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-gray-mid));
  background-clip: content-box;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 720px) {
  header { padding: 1.5rem 1rem 1.25rem; }
  header h1 { font-size: 1.4rem; }
  .brand-sub { font-size: 0.8rem; letter-spacing: 0.24em; }
  .header-inner { flex-wrap: wrap; }
  .hud { width: 100%; flex-wrap: wrap; }
  .settings-btn { margin-left: auto; }
  .launch-btn { flex: 1 1 100%; justify-content: center; padding: 0.6rem 1rem; }
  .settings-actions button { flex: 1 1 auto; }
  th, td { padding: 0.65rem 0.7rem; font-size: 0.78rem; }
  th { font-size: 0.6rem; letter-spacing: 0.16em; }
  .company-link { margin: -0.65rem -0.7rem; padding: 0.65rem 0.7rem; }
  .ad-grid[data-cols="2"],
  .ad-grid[data-cols="3"],
  .ad-grid[data-cols="4"] {
    grid-template-columns: 1fr;
  }
  .ad-header { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .stars-1, .stars-2, .stars-3,
  .nebula, .nebula-1, .nebula-2,
  .orb-core, .orb-ring, .status-dot,
  header::before, .applied-btn::before,
  .launch-rocket, .launch-btn.is-launching,
  .launch-btn.is-launching .launch-rocket,
  .launch-btn.is-launching .rocket-flame,
  .launch-btn.is-launching .rocket-trail,
  .adc-log li, tbody tr.is-new td {
    animation: none !important;
  }
}
