/*
 * ============================================================================
 * JARVIS HUD INTERFACE — MOBILE-FIRST & DESKTOP STARK OS (v17.0)
 * ============================================================================
 */

:root {
  --bg-deep: #030712;
  --bg-panel: rgba(6, 15, 36, 0.78);
  --bg-card: rgba(8, 20, 48, 0.85);
  
  --primary-cyan: #00f3ff;
  --primary-cyan-glow: rgba(0, 243, 255, 0.4);
  --primary-cyan-dim: rgba(0, 243, 255, 0.15);
  
  --primary-gold: #ffb700;
  --primary-gold-glow: rgba(255, 183, 0, 0.4);
  
  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.4);
  
  --success-green: #00ff88;
  --success-green-glow: rgba(0, 255, 136, 0.4);
  
  --danger-red: #ff3366;
  --danger-red-glow: rgba(255, 51, 102, 0.4);

  --text-main: #e2f1f8;
  --text-dim: #8faec4;
  --text-highlight: #ffffff;
  
  --font-hud: 'Orbitron', -apple-system, sans-serif;
  --font-body: 'Rajdhani', -apple-system, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --border-radius-pill: 9999px;
  
  --hud-border: 1px solid rgba(0, 243, 255, 0.28);
  --hud-border-glow: 0 0 15px rgba(0, 243, 255, 0.2);
}

/* ==================== GLOBAL RESET & BASE ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 50% 25%, rgba(0, 243, 255, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(0, 255, 136, 0.04) 0%, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
}

/* Scanlines overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 3px, 3px 100%;
  z-index: 999;
  opacity: 0.6;
}

/* ==================== HEADER ==================== */
header.hud-header {
  width: 100%;
  height: 64px;
  background: rgba(4, 10, 26, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 243, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.arc-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary-cyan);
  box-shadow: 0 0 12px var(--primary-cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.arc-badge-inner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: 0 0 10px var(--primary-cyan);
  animation: arcPulse 2s infinite ease-in-out;
}

@keyframes arcPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 8px #fff); }
}

.hud-title {
  font-family: var(--font-hud);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text-highlight);
  text-shadow: 0 0 10px var(--primary-cyan-glow);
  line-height: 1.1;
}

.hud-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--primary-cyan);
  letter-spacing: 1px;
}

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

.system-status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 0.35rem 0.7rem;
  border-radius: var(--border-radius-pill);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  color: var(--success-green);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-green);
  box-shadow: 0 0 8px var(--success-green);
  animation: dotBlink 1.8s infinite;
}

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

.btn-hud-icon {
  background: var(--bg-card);
  border: 1px solid rgba(0, 243, 255, 0.3);
  color: var(--primary-cyan);
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-hud-icon:hover {
  background: rgba(0, 243, 255, 0.2);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 12px var(--primary-cyan-glow);
  transform: translateY(-1px);
}

.header-wa-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3366;
  box-shadow: 0 0 6px #ff3366;
}

.btn-hud-icon.highlight {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--success-green);
  color: var(--success-green);
  animation: pulseInstall 2s infinite ease-in-out;
}

@keyframes pulseInstall {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.3); }
  50% { box-shadow: 0 0 16px rgba(0, 255, 136, 0.8); }
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: var(--border-radius-pill);
}

.user-name {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  color: var(--text-highlight);
  font-weight: 600;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--danger-red);
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}

.btn-logout:hover {
  text-decoration: underline;
  text-shadow: 0 0 6px var(--danger-red);
}

/* ==================== MAIN HUD LAYOUT ==================== */
.main-hud-grid {
  display: grid;
  grid-template-columns: 290px 1fr 340px;
  gap: 1.25rem;
  padding: 1.25rem;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  align-items: stretch;
}

.hud-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: var(--hud-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--hud-border-glow), 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-cyan);
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  padding-bottom: 0.5rem;
  letter-spacing: 1px;
}

/* ==================== TELEMETRY PANEL ==================== */
.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.telemetry-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.telemetry-stat-value {
  font-family: var(--font-mono);
  color: var(--primary-cyan);
  font-weight: 700;
}

.telemetry-bar-bg {
  width: 100%;
  height: 7px;
  background: rgba(0, 243, 255, 0.1);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  border: 1px solid rgba(0, 243, 255, 0.2);
}

.telemetry-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-gold));
  border-radius: var(--border-radius-pill);
  box-shadow: 0 0 8px var(--primary-cyan);
  transition: width 0.5s ease-out;
}

/* ==================== CENTER VOICE PANEL (THE CORE) ==================== */
.main-voice-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem;
}

.reactor-container {
  position: relative;
  width: 100%;
  max-width: min(340px, 45vh);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

#arc-reactor-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Live Speech Transcript Card */
.speech-bubble-container {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 243, 255, 0.35);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.15), inset 0 0 15px rgba(0, 243, 255, 0.05);
  border-radius: var(--border-radius-lg);
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 85px;
  position: relative;
}

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

.speech-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  color: var(--primary-cyan);
  letter-spacing: 1px;
}

.bubble-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: 0 0 6px var(--primary-cyan);
}

.live-transcript {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-highlight);
  line-height: 1.4;
  word-break: break-word;
  transition: all 0.2s ease;
}

.live-transcript.placeholder {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.92rem;
}

/* Voice Action Controls */
.voice-controls-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 680px;
}

.ptt-button {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.25), rgba(6, 15, 36, 0.9));
  border: 2px solid var(--primary-cyan);
  box-shadow: 0 0 25px var(--primary-cyan-glow), inset 0 0 15px var(--primary-cyan-dim);
  color: #ffffff;
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 0.9rem 2.2rem;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.25s ease;
  position: relative;
}

.ptt-button:hover {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.4), rgba(6, 15, 36, 0.95));
  box-shadow: 0 0 35px var(--primary-cyan-glow);
  transform: scale(1.02);
}

.ptt-button:active, .ptt-button.recording {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.4), rgba(6, 15, 36, 0.95));
  border-color: var(--danger-red);
  box-shadow: 0 0 35px var(--danger-red-glow);
  color: #fff;
}

.toggle-switch-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

/* Desktop Command Input Field */
.text-input-bar {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 680px;
}

.text-input-field {
  flex: 1;
  background: rgba(4, 10, 26, 0.85);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: var(--border-radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.text-input-field:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 12px var(--primary-cyan-glow);
}

.btn-send {
  background: var(--primary-cyan);
  border: none;
  border-radius: var(--border-radius-md);
  color: #030712;
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-send:hover {
  background: #fff;
  box-shadow: 0 0 15px var(--primary-cyan);
}

/* ==================== PROTOCOL & TOOL LOGS FEED ==================== */
.logs-panel {
  display: flex;
  flex-direction: column;
}

.tool-feed-container {
  flex: 1;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.3rem;
}

.tool-feed-container::-webkit-scrollbar {
  width: 4px;
}
.tool-feed-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.tool-feed-container::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.3);
  border-radius: 4px;
}

.log-entry {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 0.45rem 0.65rem;
  border-radius: var(--border-radius-sm);
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid rgba(0, 243, 255, 0.4);
  word-break: break-word;
}

.log-time {
  color: var(--primary-gold);
  margin-right: 0.4rem;
}

.log-entry.user {
  border-left-color: var(--success-green);
  color: #bbf7d0;
}

.log-entry.jarvis {
  border-left-color: var(--primary-cyan);
  color: #bae6fd;
}

.log-entry.tool {
  border-left-color: var(--accent-purple);
  color: #e9d5ff;
}

.log-entry.error {
  border-left-color: var(--danger-red);
  color: #fecdd3;
}

.log-entry.sys {
  border-left-color: var(--primary-gold);
  color: #fef08a;
}

/* ==================== MODALS & OVERLAYS ==================== */
.voice-settings-overlay, .login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 20, 0.88);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.voice-settings-modal, .login-modal {
  background: rgba(6, 15, 36, 0.95);
  border: 1px solid rgba(0, 243, 255, 0.4);
  box-shadow: 0 0 35px rgba(0, 243, 255, 0.25);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 243, 255, 0.25);
  padding-bottom: 0.75rem;
}

.settings-modal-title {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-cyan);
  letter-spacing: 1px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s ease;
}

.btn-modal-close:hover {
  color: var(--danger-red);
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.settings-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

.settings-select, .hud-text-input {
  width: 100%;
  background: rgba(4, 10, 26, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 0.65rem 0.85rem;
  outline: none;
}

.settings-select:focus, .hud-text-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px var(--primary-cyan-glow);
}

.settings-sliders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.hud-slider {
  width: 100%;
  accent-color: var(--primary-cyan);
  cursor: pointer;
}

.biometric-calibration-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(0, 243, 255, 0.3);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.biometric-box-title {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  color: var(--primary-gold);
  letter-spacing: 0.5px;
}

.biometric-box-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.biometric-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-right: 0.3rem;
}

.stat-val {
  font-family: var(--font-mono);
  color: var(--primary-cyan);
  font-weight: 700;
}

.stat-badge.ready {
  background: rgba(0, 255, 136, 0.2);
  color: var(--success-green);
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.biometric-toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.btn-calibrate-voice {
  background: linear-gradient(135deg, rgba(255, 183, 0, 0.2), rgba(0, 0, 0, 0.6));
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.7rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-calibrate-voice:hover {
  background: var(--primary-gold);
  color: #000;
  box-shadow: 0 0 15px var(--primary-gold-glow);
}

.calibration-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  border: 1px solid rgba(255, 183, 0, 0.3);
}

.progress-fill {
  height: 100%;
  background: var(--primary-gold);
  box-shadow: 0 0 10px var(--primary-gold);
  transition: width 0.1s linear;
}

.settings-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-settings-action {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-settings-action.primary {
  background: var(--primary-cyan);
  color: #030712;
}

.btn-settings-action.primary:hover {
  background: #fff;
  box-shadow: 0 0 15px var(--primary-cyan);
}

.btn-settings-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

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

/* ==================== WHATSAPP & QR CODE MODAL ==================== */
.whatsapp-manager-card {
  max-width: 660px;
  width: 95vw;
}

.whatsapp-status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: var(--border-radius-md);
  padding: 0.9rem 1.2rem;
}

.whatsapp-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 243, 255, 0.35);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.08);
}

.qr-instructions {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
  max-width: 480px;
}

.qr-instructions strong {
  color: var(--primary-cyan);
}

.qr-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  width: 100%;
  padding: 0.5rem;
}

.qr-big-image {
  width: min(340px, 78vw);
  height: min(340px, 78vw);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.4), 0 0 10px rgba(255, 255, 255, 0.8);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: transform 0.3s ease;
}

.qr-big-image:hover {
  transform: scale(1.02);
}

.qr-loading-text {
  font-family: var(--font-hud);
  font-size: 0.95rem;
  color: var(--primary-gold);
  letter-spacing: 1.5px;
  animation: pulseInstall 2s infinite ease-in-out;
}

/* ==================== TASK SCHEDULER STYLES ==================== */
.task-manager-card {
  max-width: 680px;
  width: 95vw;
}

.task-create-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.settings-section-title {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  color: var(--primary-cyan);
  letter-spacing: 1px;
}

.task-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.task-form-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

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

.scheduled-tasks-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 220px;
  overflow-y: auto;
}

.task-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
}

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

.task-card-title {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  color: var(--primary-cyan);
  font-weight: 700;
}

.task-card-time {
  font-size: 0.75rem;
  color: var(--primary-gold);
  font-family: var(--font-mono);
}

.task-card-prompt {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn-task-delete {
  background: transparent;
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: #ff6688;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.btn-task-delete:hover {
  background: var(--danger-red);
  color: #fff;
}

.task-empty-state {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ==================== HOLOGRAPHIC CALL MODAL (STARK COMMS) ==================== */
.call-incoming-backdrop {
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.2) 0%, rgba(2, 6, 20, 0.95) 75%);
}

.holographic-call-card {
  max-width: 480px;
  text-align: center;
  align-items: center;
  border: 2px solid var(--accent-purple);
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.4), inset 0 0 30px rgba(168, 85, 247, 0.15);
  animation: callGlowPulse 1.8s infinite ease-in-out;
}

@keyframes callGlowPulse {
  0%, 100% { box-shadow: 0 0 35px rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 60px rgba(168, 85, 247, 0.7); }
}

.call-pulse-emitter {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.call-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--accent-purple);
  opacity: 0.8;
  animation: rippleExpand 2.2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ring-1 { width: 60px; height: 60px; animation-delay: 0s; }
.ring-2 { width: 90px; height: 90px; animation-delay: 0.6s; }
.ring-3 { width: 120px; height: 120px; animation-delay: 1.2s; }

@keyframes rippleExpand {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.call-reactor-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--accent-purple);
  box-shadow: 0 0 20px var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.call-reactor-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 15px #fff;
}

.call-status-badge {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  color: var(--accent-purple);
  letter-spacing: 2px;
  font-weight: 800;
}

.call-hologram-title {
  font-family: var(--font-hud);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
}

.call-hologram-preview {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 380px;
}

.call-actions-row {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-call-action {
  font-family: var(--font-hud);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.85rem 1.5rem;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-call-action.answer {
  background: linear-gradient(135deg, var(--success-green), #047857);
  color: #030712;
  box-shadow: 0 0 25px var(--success-green-glow);
}

.btn-call-action.answer:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px var(--success-green);
}

.btn-call-action.dismiss {
  background: rgba(255, 51, 102, 0.2);
  border: 1px solid var(--danger-red);
  color: #ff99aa;
}

.btn-call-action.dismiss:hover {
  background: var(--danger-red);
  color: #fff;
}

/* ==================== LOGIN MODAL ==================== */
.arc-badge-large {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--primary-cyan);
  box-shadow: 0 0 20px var(--primary-cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.arc-badge-large-core {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: 0 0 16px var(--primary-cyan);
  animation: arcPulse 2s infinite ease-in-out;
}

.login-title {
  font-family: var(--font-hud);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  text-align: center;
}

.login-desc {
  font-size: 0.8rem;
  color: var(--primary-cyan);
  letter-spacing: 1.5px;
  text-align: center;
  margin-top: -0.5rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.login-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.login-input {
  background: rgba(4, 10, 26, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
}

.login-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 12px var(--primary-cyan-glow);
}

.login-error-msg {
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid var(--danger-red);
  color: #ff99aa;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  text-align: center;
}

.btn-login-submit {
  background: var(--primary-cyan);
  border: none;
  color: #030712;
  font-family: var(--font-hud);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 0.85rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login-submit:hover {
  background: #fff;
  box-shadow: 0 0 20px var(--primary-cyan);
}

/* ============================================================================
   RESPONSIVE DESIGN: MOBILE FIRST & DESKTOP BREAKPOINTS
   ============================================================================ */

/* Desktop & Laptop Screens (>= 992px) */
@media (min-width: 992px) {
  .mobile-bottom-dock {
    display: none !important;
  }
}

/* Medium Tablets & Notebooks (769px to 1100px) */
@media (max-width: 1100px) and (min-width: 769px) {
  .main-hud-grid {
    grid-template-columns: 240px 1fr 280px;
    gap: 0.85rem;
    padding: 0.85rem;
    min-height: calc(100vh - 64px);
  }

  .hud-title {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .reactor-container {
    max-width: min(280px, 35vh);
  }

  .mobile-bottom-dock {
    display: none !important;
  }
}

/* Compact Window Mode / Small Displays (<= 768px) */
@media (max-width: 768px) {
  header.hud-header {
    padding: 0.4rem 0.8rem;
    height: 52px;
  }

  .desktop-only-btn,
  .system-status-pill {
    display: none !important;
  }

  .hud-title {
    font-size: 1.05rem;
    letter-spacing: 1.5px;
  }

  .hud-subtitle {
    font-size: 0.58rem;
  }

  /* Main View: Clean, Full-Screen Voice Hub */
  .main-hud-grid {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px);
    padding: 0.5rem 0.85rem;
    width: 100%;
    margin-bottom: 58px;
    justify-content: space-between;
    overflow-y: auto;
  }

  .telemetry-panel,
  .logs-panel,
  .desktop-input-bar {
    display: none !important;
  }

  .main-voice-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.5rem;
    padding: 0;
  }

  .reactor-container {
    max-width: min(220px, 45vw);
    max-height: min(220px, 45vw);
  }

  .speech-bubble-container {
    min-height: 70px;
    padding: 0.65rem 0.85rem;
  }

  .live-transcript {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .voice-controls-bar {
    gap: 0.5rem;
  }

  .ptt-button {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
  }

  .toggle-switch-container {
    font-size: 0.76rem;
  }

  .task-form-row {
    grid-template-columns: 1fr;
  }

  /* Mobile Bottom Navigation Dock */
  .mobile-bottom-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 62px;
    background: rgba(4, 10, 26, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 -5px 25px rgba(0, 243, 255, 0.15);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.25rem;
  }

  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex: 1;
  }

  .dock-item:active, .dock-item:hover {
    color: var(--primary-cyan);
    background: rgba(0, 243, 255, 0.1);
  }

  .dock-icon {
    font-size: 1.15rem;
  }

  .dock-label {
    font-family: var(--font-hud);
    font-size: 0.62rem;
    letter-spacing: 0.5px;
    font-weight: 600;
  }

  .mobile-drawer-card {
    max-width: 96vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
  }

  .mobile-logs-scroll {
    max-height: 52vh;
    overflow-y: auto;
  }
}
