/**
 * Nexus UI — grönt/svart designsystem
 */
:root {
  --nx-bg: #030304;
  --nx-bg-elevated: #0a0a0f;
  --nx-surface: #111118;
  --nx-surface-2: #181822;
  --nx-border: rgba(0, 255, 136, 0.12);
  --nx-border-strong: rgba(0, 255, 136, 0.28);
  --nx-green: #00ff88;
  --nx-green-dim: #00cc6a;
  --nx-green-glow: rgba(0, 255, 136, 0.35);
  --nx-text: #e2e8f0;
  --nx-muted: #64748b;
  --nx-radius: 14px;
  --nx-radius-sm: 10px;
  --nx-radius-pill: 999px;
  --nx-font: 'Sora', system-ui, sans-serif;
  --nx-mono: 'JetBrains Mono', monospace;
}

body.nx-app {
  font-family: var(--nx-font);
  background: var(--nx-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 255, 136, 0.07), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 255, 136, 0.03), transparent);
  color: var(--nx-text);
}

/* ─── Header ─── */
.nx-header {
  background: rgba(3, 3, 4, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nx-border);
}

.nx-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.05));
  border: 1px solid var(--nx-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--nx-green);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.12);
}

.nx-pill {
  font-family: var(--nx-mono);
  font-size: 0.625rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--nx-radius-pill);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border);
  color: var(--nx-green);
}

/* ─── Nav tabs ─── */
.nx-nav {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: var(--nx-surface);
  border-radius: var(--nx-radius-pill);
  border: 1px solid var(--nx-border);
  width: fit-content;
  margin: 0 auto 0.5rem;
}

.nx-nav button,
.nx-nav a {
  font-family: var(--nx-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.85rem;
  border-radius: var(--nx-radius-pill);
  border: none;
  background: transparent;
  color: var(--nx-muted);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.nx-nav button.active,
.nx-nav a.active {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.18), rgba(0, 255, 136, 0.08));
  color: var(--nx-green);
  box-shadow: inset 0 0 0 1px var(--nx-border-strong);
}

.nx-nav a.link-outreach { color: #5eead4; }
.nx-nav a.link-outreach.active { color: var(--nx-green); }

/* ─── Chat dropdown nav ─── */
.nx-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nx-dd {
  position: relative;
}

.nx-dd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--nx-radius-pill);
  border: 1px solid var(--nx-border);
  background: var(--nx-surface);
  color: var(--nx-green);
  font-family: var(--nx-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.nx-dd-toggle:hover,
.nx-dd.open .nx-dd-toggle {
  border-color: var(--nx-border-strong);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.12);
}

.nx-dd-caret {
  font-size: 0.55rem;
  opacity: 0.75;
  transition: transform 0.2s;
}

.nx-dd.open .nx-dd-caret {
  transform: rotate(180deg);
}

.nx-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--nx-surface-2);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-sm);
  padding: 0.35rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  z-index: 80;
}

.nx-dd.open .nx-dd-menu {
  display: block;
}

.nx-dd-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--nx-muted);
  font-family: var(--nx-mono);
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nx-dd-item:hover {
  background: rgba(0, 255, 136, 0.06);
  color: var(--nx-text);
}

.nx-dd-item.active {
  background: rgba(0, 255, 136, 0.12);
  color: var(--nx-green);
}

.nx-dd-item .icon {
  width: 1.1rem;
  text-align: center;
}

.nx-nav-link {
  font-family: var(--nx-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.75rem;
  border-radius: var(--nx-radius-pill);
  color: var(--nx-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nx-nav-link:hover {
  color: var(--nx-green);
  border-color: var(--nx-border);
}

.nx-nav-link.outreach {
  color: #5eead4;
}

.nx-quick-dd {
  width: 100%;
}

.nx-quick-dd .nx-dd-menu {
  left: 0;
  transform: none;
  width: 100%;
}

.nx-quick-toggle {
  width: 100%;
  justify-content: space-between;
  color: var(--nx-muted);
}

.nx-chat-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
}

.nx-chat-mobile-menu.open {
  display: block;
}

.nx-chat-mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.nx-chat-mobile-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--nx-bg-elevated);
  border-top: 1px solid var(--nx-border);
  border-radius: 16px 16px 0 0;
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
  max-height: 70vh;
  overflow-y: auto;
}

.nx-chat-mobile-title {
  padding: 0 1rem 0.5rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nx-muted);
}

.nx-chat-mobile-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--nx-muted);
  font-family: var(--nx-mono);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.nx-chat-mobile-item.active,
.nx-chat-mobile-item:hover {
  background: rgba(0, 255, 136, 0.08);
  color: var(--nx-green);
}

/* ─── Buttons ─── */
.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--nx-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: var(--nx-radius-sm);
  border: 1px solid var(--nx-border);
  background: var(--nx-surface);
  color: var(--nx-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nx-btn:hover {
  color: var(--nx-green);
  border-color: var(--nx-border-strong);
  background: rgba(0, 255, 136, 0.06);
}

.nx-btn-primary {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.22), rgba(0, 255, 136, 0.1));
  border-color: var(--nx-border-strong);
  color: var(--nx-green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.nx-btn-primary:hover {
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.2);
  transform: translateY(-1px);
}

.nx-btn-voice {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  background: var(--nx-surface-2);
  border: 2px solid var(--nx-border);
}

.nx-btn-voice.live-ready {
  border-color: var(--nx-green);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.25);
}

.nx-btn-voice.active {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.35), rgba(0, 204, 106, 0.2));
  border-color: var(--nx-green);
  animation: nxVoicePulse 1.8s ease-in-out infinite;
}

.nx-btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--nx-radius-sm);
}

@keyframes nxVoicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(0, 255, 136, 0); }
}

/* ─── Input dock ─── */
.nx-dock {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--nx-border);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}

.nx-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.5rem;
  background: var(--nx-surface);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nx-input-wrap:focus-within {
  border-color: var(--nx-border-strong);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nx-input-wrap textarea {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--nx-mono);
  font-size: 0.875rem;
  color: var(--nx-text);
  padding: 0.35rem 0.5rem;
  max-height: 120px;
}

.nx-input-wrap textarea::placeholder { color: #475569; }

/* ─── Chips ─── */
.nx-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.65rem;
  max-width: 42rem;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}

.nx-chip {
  flex-shrink: 0;
  font-family: var(--nx-mono);
  font-size: 0.68rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--nx-radius-pill);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border);
  color: var(--nx-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.nx-chip:hover {
  color: var(--nx-green);
  border-color: var(--nx-border-strong);
  background: rgba(0, 255, 136, 0.08);
}

/* ─── Messages ─── */
#messages {
  padding: 1rem 1.25rem;
}

.nx-msg-user .nx-bubble {
  background: linear-gradient(135deg, #1a1a24, #14141c);
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: var(--nx-radius) var(--nx-radius) 4px var(--nx-radius);
  padding: 0.75rem 1rem;
}

.nx-msg-nexus .nx-bubble {
  background: rgba(10, 10, 16, 0.85);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius) var(--nx-radius) var(--nx-radius) 4px;
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 24px rgba(0, 255, 136, 0.04);
}

.nx-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid var(--nx-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--nx-green);
  flex-shrink: 0;
}

/* ─── Voice overlay ─── */
.nx-voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 3, 4, 0.92);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.nx-voice-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nx-voice-orb {
  position: relative;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 136, 0.35), rgba(0, 255, 136, 0.05));
  border: 2px solid var(--nx-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: nxOrbBreath 2s ease-in-out infinite;
}

.nx-voice-orb::before,
.nx-voice-orb::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 136, 0.2);
  animation: nxRingOut 2.5s ease-out infinite;
}

.nx-voice-orb::after { animation-delay: 1.2s; }

.nx-btn-voice.active .nx-voice-j,
.nx-btn-voice.active {
  color: var(--nx-green);
  font-weight: 700;
}

.nx-voice-orb span {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--nx-mono);
  color: var(--nx-green);
  filter: drop-shadow(0 0 16px var(--nx-green-glow));
}

@keyframes nxOrbBreath {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0, 255, 136, 0.2); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(0, 255, 136, 0.35); }
}

@keyframes nxRingOut {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

.nx-voice-status {
  font-family: var(--nx-mono);
  font-size: 0.85rem;
  color: var(--nx-green);
  text-align: center;
  max-width: 20rem;
}

.nx-voice-transcript {
  font-family: var(--nx-mono);
  font-size: 0.75rem;
  color: var(--nx-muted);
  text-align: center;
  max-width: 24rem;
  min-height: 2rem;
  padding: 0 1rem;
}

.nx-voice-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.nx-voice-actions .nx-btn {
  min-width: 8rem;
}

/* ─── Earpiece / stealth interview coach ─── */
.nx-earpiece-overlay {
  background: #000 !important;
  backdrop-filter: none !important;
}

.nx-earpiece-overlay .nx-voice-orb {
  width: 3rem;
  height: 3rem;
  animation: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nx-earpiece-overlay .nx-voice-orb::before,
.nx-earpiece-overlay .nx-voice-orb::after {
  display: none;
}

.nx-earpiece-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--nx-green);
  box-shadow: 0 0 12px var(--nx-green-glow);
  animation: nxEarpiecePulse 2s ease-in-out infinite;
}

@keyframes nxEarpiecePulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.nx-earpiece-overlay .nx-voice-status {
  font-size: 0.65rem;
  color: rgba(0, 255, 136, 0.55);
  max-width: 14rem;
}

.nx-earpiece-transcript {
  font-size: 0.58rem !important;
  opacity: 0.45;
  max-width: 16rem;
}

.nx-earpiece-actions {
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.nx-earpiece-vol {
  width: 8rem;
  accent-color: var(--nx-green);
}

body.earpiece-stealth {
  background: #000 !important;
}

.iv-earpiece-panel {
  padding: 1.25rem 1.35rem;
  text-align: center;
}

.iv-earpiece-panel.hidden {
  display: none;
}

.iv-earpiece-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.iv-earpiece-steps li {
  font-family: var(--nx-mono);
  font-size: 0.72rem;
  color: var(--nx-muted);
  line-height: 1.45;
}

.iv-earpiece-start {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  padding: 1rem 1.25rem !important;
  font-size: 0.85rem !important;
  display: block;
}

.iv-earpiece-start.active {
  animation: nxEarpiecePulse 2s ease-in-out infinite;
  border-color: var(--nx-green) !important;
}

.iv-earpiece-live-status {
  font-family: var(--nx-mono);
  font-size: 0.65rem;
  color: #00d4ff;
  min-height: 1.2em;
  margin: 0.75rem 0 0;
}

.iv-earpiece-note {
  font-family: var(--nx-mono);
  font-size: 0.58rem;
  color: var(--nx-muted);
  margin: 0.75rem 0 0;
  line-height: 1.45;
}

/* ─── Sidebar panels ─── */
.nx-panel {
  background: rgba(10, 10, 16, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 0.85rem;
}

.nx-panel-title {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(0, 255, 136, 0.5);
  margin-bottom: 0.65rem;
}

/* ─── Mobile nav (flex footer, not fixed) ─── */
.nx-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.nx-shell-main {
  flex: 1 1 auto;
  min-height: 0;
}

.mobile-bottom-nav {
  display: flex !important;
  flex: 0 0 auto;
  width: 100%;
  background: rgba(3, 3, 4, 0.98) !important;
  border-top: 1px solid rgba(0, 255, 136, 0.25) !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.nx-shell > header,
.nx-shell > .nx-header {
  flex-shrink: 0;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav button.active {
  color: var(--nx-green) !important;
}

/* ─── Glass override ─── */
.glass {
  background: rgba(10, 10, 16, 0.75) !important;
  border: 1px solid var(--nx-border) !important;
}

.glow-green {
  box-shadow: 0 4px 24px rgba(0, 255, 136, 0.06) !important;
}

.tab-active { display: none; }
.tab-inactive { display: none; }

@media (max-width: 768px) {
  .nx-nav { max-width: calc(100vw - 2rem); overflow-x: auto; }
  .nx-btn-voice { width: 2.5rem; height: 2.5rem; }
}

/* ─── Interview Copilot ─── */
.interview-view {
  background: transparent;
}

.iv-page {
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.iv-header {
  margin-bottom: 0.25rem;
}

.iv-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.iv-title-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 212, 255, 0.15), rgba(0, 255, 136, 0.08));
  border: 1px solid var(--nx-border);
  font-size: 1rem;
}

.iv-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.7rem;
  color: rgba(0, 255, 136, 0.45);
  font-family: var(--nx-mono);
}

.iv-setup-toggle {
  align-self: flex-start;
  font-size: 0.65rem !important;
  padding: 0.4rem 0.75rem !important;
}

.iv-mode-nav {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: var(--nx-surface);
  border-radius: var(--nx-radius-pill);
  border: 1px solid var(--nx-border);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.iv-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--nx-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.9rem;
  border-radius: var(--nx-radius-pill);
  border: none;
  background: transparent;
  color: var(--nx-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.iv-mode-btn:hover {
  color: var(--nx-text);
}

.iv-mode-btn.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.14), rgba(0, 255, 136, 0.1));
  color: var(--nx-green);
  box-shadow: inset 0 0 0 1px var(--nx-border-strong);
}

.iv-mode-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.iv-mode-desc {
  font-family: var(--nx-mono);
  font-size: 0.68rem;
  color: var(--nx-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 36rem;
}

.iv-setup {
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.2s ease;
  overflow: hidden;
}

.iv-setup.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none;
}

.iv-profile-input {
  font-size: 0.85rem !important;
  padding: 0.7rem 0.9rem !important;
}

.iv-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.iv-preset-chip {
  font-family: var(--nx-mono);
  font-size: 0.58rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--nx-radius-pill);
  border: 1px solid var(--nx-border);
  background: rgba(0, 255, 136, 0.04);
  color: var(--nx-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.iv-preset-chip:hover {
  color: var(--nx-green);
  border-color: var(--nx-border-strong);
  background: rgba(0, 255, 136, 0.1);
}

.iv-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--nx-mono);
  font-size: 0.65rem;
  color: var(--nx-green);
  padding: 0.45rem 0.75rem;
  border-radius: var(--nx-radius-sm);
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid var(--nx-border);
}

.iv-profile-badge.hidden {
  display: none;
}

.iv-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nx-green);
  box-shadow: 0 0 8px var(--nx-green-glow);
  flex-shrink: 0;
}

.iv-extra-field {
  margin-top: 0.25rem;
}

.iv-loading {
  color: var(--nx-muted);
  animation: ivPulse 1s ease-in-out infinite;
}

@keyframes ivPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.iv-setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .iv-setup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.iv-field {
  min-width: 0;
}

.iv-label {
  display: block;
  font-family: var(--nx-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 212, 255, 0.55);
  margin-bottom: 0.35rem;
}

.iv-input,
.iv-textarea {
  width: 100%;
  background: var(--nx-bg-elevated);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-sm);
  color: var(--nx-text);
  font-family: var(--nx-mono);
  font-size: 0.78rem;
  padding: 0.6rem 0.8rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.iv-textarea {
  resize: vertical;
  min-height: 6.5rem;
  line-height: 1.55;
}

.iv-textarea-sm {
  min-height: 4.5rem;
}

.iv-input:focus,
.iv-textarea:focus {
  outline: none;
  border-color: var(--nx-border-strong);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.12);
}

.iv-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .iv-workspace {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.iv-panel {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  min-height: 0;
}

.iv-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.iv-panel-title {
  font-family: var(--nx-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(0, 255, 136, 0.65);
  margin: 0;
}

.iv-status {
  font-family: var(--nx-mono);
  font-size: 0.62rem;
  color: #00d4ff;
  min-height: 1em;
}

.iv-question-wrap {
  margin-bottom: 0.75rem;
}

.iv-answer-wrap {
  margin-bottom: 0.75rem;
}

.iv-answer-wrap.hidden {
  display: none;
}

.iv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.iv-coach-main {
  flex: 1 1 auto;
  min-width: 8rem;
}

.iv-action {
  gap: 0.3rem !important;
}

.iv-action.active {
  border-color: #00d4ff !important;
  color: #00d4ff !important;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.15);
}

.iv-action-muted {
  opacity: 0.75;
}

.iv-hint {
  font-family: var(--nx-mono);
  font-size: 0.58rem;
  color: var(--nx-muted);
  line-height: 1.45;
  margin: 0;
}

.iv-coach-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  min-height: 12rem;
}

.iv-coach-empty.hidden {
  display: none;
}

.iv-coach-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.iv-coach-empty p {
  font-family: var(--nx-mono);
  font-size: 0.72rem;
  color: var(--nx-muted);
  line-height: 1.55;
  max-width: 18rem;
  margin: 0;
}

.iv-coach-panel {
  flex: 1;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--nx-text);
  min-height: 12rem;
  max-height: min(50vh, 28rem);
  padding: 0.25rem 0.15rem;
}

.iv-coach-panel.hidden {
  display: none;
}

.iv-coach-panel strong {
  color: var(--nx-green);
}

.iv-coach-panel pre {
  margin: 0.5rem 0;
}

@media (min-width: 900px) {
  .iv-coach-panel {
    max-height: none;
  }

  .iv-panel-coach {
    min-height: 22rem;
  }
}

@media (max-width: 768px) {
  .iv-coach-panel {
    font-size: 0.95rem;
    max-height: none;
  }

  .iv-coach-main {
    width: 100%;
    justify-content: center;
  }

  .iv-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .iv-coach-main {
    grid-column: 1 / -1;
  }
}
