/* ==========================================================================
   DRAGA VOICE CALL - STANDALONE LIVE CALL STUDIO & CONTEXT DOSSIER
   Modern Glassmorphic Dark Design System
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0c1017;
  --bg-card: rgba(16, 22, 34, 0.75);
  --bg-card-hover: rgba(22, 31, 48, 0.85);
  --bg-card-solid: #101622;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.4);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

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

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: var(--accent-emerald);
  color: #042416;
  box-shadow: 0 0 16px var(--accent-emerald-glow);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.companion-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.6rem 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.selector-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

.select-companion-header {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.select-companion-header option {
  background: var(--bg-card-solid);
  color: var(--text-main);
}

.btn-header-action {
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-header-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-admin-lock-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  color: var(--accent-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-admin-lock-status.btn-danger-sm {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.btn-icon-header {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-header:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* ==========================================================================
   APP CONTENT PANES
   ========================================================================== */
.app-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeInPane 0.25s ease-out;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CALL HERO CARD
   ========================================================================== */
.call-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.companion-avatar-ring {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 2px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.avatar-live-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-emerald);
  opacity: 0;
  animation: liveRingPulse 2s infinite ease-out;
}

@keyframes liveRingPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.call-identity-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.call-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.call-companion-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stage-pill {
  padding: 0.25rem 0.65rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.vocal-clone-pill {
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.call-target-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.call-target-desc strong {
  color: var(--text-main);
}

.vb-cable-route-tag {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  margin-left: 0.5rem;
  font-weight: 600;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.call-status-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.call-status-badge.active-call {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.call-status-badge.active-call .status-pulse-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: dotFlash 1.2s infinite ease-in-out;
}

@keyframes dotFlash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.call-timer {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.btn-call-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-start-call {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
}

.btn-start-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.btn-end-call {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(244, 63, 94, 0.35);
}

/* ==========================================================================
   CALL STAGE SPLIT (SWAPPED LAYOUT)
   ========================================================================== */
.call-stage-split {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .call-stage-split {
    grid-template-columns: 1fr;
  }
}

/* SIDEBAR */
.call-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.card-header-sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.card-title-sm {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-tip {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.mic-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.audio-hud-meters {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.meter-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meter-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.meter-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: var(--radius-pill);
  transition: width 0.08s ease-out;
}

.meter-bar-fill.out {
  background: linear-gradient(90deg, #06b6d4, #8b5cf6);
}

/* LIVE STT HUD */
.live-stt-hud {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stt-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stt-hud-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stt-hud-badge.stt-badge-speaking {
  color: var(--accent-emerald);
}

.stt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.stt-silence {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.stt-caption-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stt-speaker-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stt-caption-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-main);
}

/* SMART GAP STALL ALERT */
.gap-alert-card {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(16, 22, 34, 0.85) 100%);
  animation: alertGlow 2s infinite alternate;
}

@keyframes alertGlow {
  from { box-shadow: 0 0 10px rgba(245, 158, 11, 0.1); }
  to { box-shadow: 0 0 25px rgba(245, 158, 11, 0.25); }
}

.gap-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.gap-shield-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.btn-close-gap {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
}

.gap-alert-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gap-alert-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gap-phrase-box {
  padding: 0.6rem 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-style: italic;
  color: #fef3c7;
}

.gap-question-box {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.gap-q-label {
  color: var(--text-dim);
  font-weight: 600;
}

.gap-q-text {
  color: var(--text-main);
  font-weight: 700;
}

.chips-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
  display: block;
}

.gap-quick-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gap-quick-chip {
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.gap-quick-chip:hover {
  background: var(--accent-emerald);
  color: #042416;
  border-color: var(--accent-emerald);
  transform: translateY(-1px);
}

.gap-custom-whisper {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.input-custom-directive {
  flex: 1;
  padding: 0.45rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.78rem;
  outline: none;
}

.btn-send-directive {
  padding: 0.45rem 0.85rem;
  background: var(--accent-gold);
  color: #451a03;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

/* INSTANT TALK */
.instant-talk-field {
  display: flex;
  gap: 0.4rem;
}

.input-instant-talk {
  flex: 1;
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.btn-instant-speak {
  padding: 0.55rem 1rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  color: #022027;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* MAIN STAGE */
.call-main-stage {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.confirmed-facts-quickbar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quickbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quickbar-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-goto-dossier {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.quickbar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fact-quick-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
}

.fact-quick-pill strong {
  color: var(--accent-cyan);
}

/* CALL DIALOGUE FLOW */
.call-dialogue-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.dialogue-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dialogue-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dialogue-title-group h3 {
  font-size: 1rem;
  font-weight: 700;
}

.dialogue-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-sm-action {
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sm-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.dialogue-stream-container {
  height: 520px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dialogue-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  text-align: center;
  gap: 0.75rem;
}

.dialogue-turn-bubble {
  max-width: 80%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  animation: fadeInTurn 0.2s ease-out;
}

@keyframes fadeInTurn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dialogue-turn-bubble.caller {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 2px;
}

.dialogue-turn-bubble.robert {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 182, 212, 0.18) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-bottom-right-radius: 2px;
}

.turn-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  gap: 1rem;
}

.turn-speaker {
  color: var(--accent-emerald);
}

.dialogue-turn-bubble.caller .turn-speaker {
  color: var(--accent-cyan);
}

.turn-emotion-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.3rem;
}

.director-whisper-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--border-subtle);
}

.whisper-icon {
  font-size: 1.1rem;
}

.input-director-whisper {
  flex: 1;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

.btn-whisper-send {
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-whisper-send:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

/* ==========================================================================
   TAB 2: PERSONA & CONTEXT DOSSIER
   ========================================================================== */
.dossier-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dossier-header-text h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.dossier-header-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 900px;
}

.dossier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.dossier-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dossier-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-with-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-with-badge h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.badge-verified {
  padding: 0.2rem 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.badge-accent {
  padding: 0.2rem 0.5rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.section-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.form-row-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.form-textarea.large-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  resize: vertical;
}

.field-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* CONFIRMED FACTS LIST */
.facts-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fact-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.fact-item-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.fact-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fact-header-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.fact-value-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-delete-fact {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem;
  transition: var(--transition);
}

.btn-delete-fact:hover {
  color: var(--accent-rose);
}

/* DOSSIER ACTION BUTTONS */
.dossier-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-import-raw {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-import-raw:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-deep-synthesize {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transition: var(--transition);
}

.btn-deep-synthesize:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.5);
}

.json-transfer-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.btn-subtle {
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.synthesis-output {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
}

/* ==========================================================================
   TAB 3: VOICE AUDITIONS
   ========================================================================== */
.audition-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.audition-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.audition-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.audition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.audition-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.emotion-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.emotion-chip {
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.emotion-chip.active {
  background: var(--accent-gold);
  color: #451a03;
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.audition-controls-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sample-audio-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sample-audio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.sample-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sample-info strong {
  font-size: 0.88rem;
  color: var(--text-main);
}

.sample-info span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn-play-sample {
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  color: var(--accent-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-play-sample:hover {
  background: var(--accent-emerald);
  color: #042416;
}

/* ==========================================================================
   TAB 4: CALL ARCHIVES
   ========================================================================== */
.archives-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .archives-layout {
    grid-template-columns: 1fr;
  }
}

.sessions-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.session-detail-view {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-height: 400px;
}

.detail-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  text-align: center;
  gap: 0.5rem;
}

.detail-empty-state span {
  font-size: 2.5rem;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.1rem;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   ADMIN SECURITY GATEKEEPER MODAL
   ========================================================================== */
.admin-security-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 6, 11, 0.94);
  backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-gate-card {
  width: 100%;
  max-width: 440px;
  background: rgba(13, 17, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.1);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gate-icon-pulse {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 24px var(--accent-emerald-glow);
}

.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.gate-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.admin-gate-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.admin-gate-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.admin-gate-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-passcode-field {
  position: relative;
  width: 100%;
}

.admin-passcode-input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 1.15rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  text-align: center;
  outline: none;
  transition: var(--transition);
}

.admin-passcode-input:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 16px var(--accent-emerald-glow);
}

.btn-toggle-eye {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
}

.admin-gate-options {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.admin-gate-error {
  padding: 0.6rem 0.85rem;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-md);
  color: #fecdd3;
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-unlock-gate {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: var(--transition);
}

.btn-unlock-gate:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.55);
}

.admin-gate-footer {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ==========================================================================
   BUTTONS & GENERAL UTILITIES
   ========================================================================== */
.btn-primary-action {
  padding: 0.65rem 1.25rem;
  background: var(--accent-emerald);
  color: #042416;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-emerald-glow);
}

.btn-secondary-action {
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-xs-action {
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  color: var(--accent-emerald);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.2rem;
  background: rgba(16, 22, 34, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: slideToast 0.25s ease-out;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast.toast-error { border-color: rgba(244, 63, 94, 0.4); color: #fecdd3; }
.toast.toast-warning { border-color: rgba(245, 158, 11, 0.4); color: #fef3c7; }
