/* ═══════════════════════════════════════════════════
   APPEXi — Enterprise Intelligence Assistant Styles
   Enhanced Enterprise Core — Release 28B
   ═══════════════════════════════════════════════════ */

/* ── Panel Container ─────────────────────────────── */

.appexi-panel {
  max-height: 90vh;
  height: 720px;
  background: rgba(10, 14, 28, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: appexi-panel-enter 0.25s ease-out;
  position: relative;
  pointer-events: auto;
}

.appexi-panel.hidden {
  display: none !important;
}

/* ── Header ───────────────────────────────────────── */

.appexi-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 6px;
}

.appexi-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.appexi-header-icon {
  font-size: 20px;
  line-height: 1;
}

	.appexi-header-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.appexi-header-subtitle {
  font-size: 9px;
  color: rgba(129, 140, 248, 0.5);
  font-weight: 500;
  line-height: 1.2;
}

.appexi-drag-grip {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.15);
  margin-right: 2px;
  flex-shrink: 0;
  cursor: grab;
  transition: color 0.15s;
  user-select: none;
  -webkit-user-select: none;
}

.appexi-drag-grip:hover {
  color: rgba(255, 255, 255, 0.35);
}

.appexi-header-icon-wrap {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.appexi-header-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

/* ── Toggle Group (Enterprise Mode & View Mode) ───── */

.appexi-toggle-group {
  display: inline-flex;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  flex-shrink: 0;
}

.appexi-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.appexi-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.appexi-toggle-btn.appexi-toggle-active {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.1);
}

.appexi-toggle-left {
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.appexi-toggle-right {
  border-left: none;
}

/* ── Tone Selector ────────────────────────────────── */

.appexi-tone-select {
  padding: 3px 22px 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' fill='none'%3E%3Cpath d='M1 1l3 3 3-3' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  transition: all 0.15s;
  max-width: 80px;
}

.appexi-tone-select:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.appexi-tone-select:focus {
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.appexi-tone-select option {
  background: #0a0e1c;
  color: #fff;
}

/* ── Header Buttons ───────────────────────────────── */

.appexi-header-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.appexi-header-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ── Messages ─────────────────────────────────────── */

.appexi-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

/* Enterprise custom scrollbar — always visible */
.appexi-messages::-webkit-scrollbar {
  width: 10px;
}

.appexi-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 5px;
}

.appexi-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 5px;
  border: 2px solid rgba(10, 14, 28, 0.94);
  min-height: 60px;
}

.appexi-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #818cf8, #a78bfa);
}

/* Firefox scrollbar */
.appexi-messages {
  scrollbar-color: #6366f1 rgba(255, 255, 255, 0.03);
  scrollbar-width: auto;
}

/* ── Message Wrappers ─────────────────────────────── */

.appexi-message-wrapper {
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-user-message-wrapper {
  display: flex;
  justify-content: flex-end;
}

.appexi-assistant-message-wrapper {
  display: flex;
  flex-direction: column;
}

/* ── Messages ─────────────────────────────────────── */

.appexi-message {
  max-width: 92%;
}

.appexi-user-message {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 12px 12px 4px 12px;
  padding: 10px 14px;
}

.appexi-assistant-message {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.08);
  border-radius: 12px 12px 12px 4px;
  padding: 12px 14px;
}

.appexi-message-content {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  max-width: 70ch;
  font-weight: 400;
}

.appexi-message-content p {
  margin: 0 0 20px;
}

.appexi-message-content p:last-child {
  margin-bottom: 0;
}

.appexi-message-content strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.appexi-message-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 24px 0 10px;
  letter-spacing: -0.01em;
}

.appexi-message-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

.appexi-message-content ul {
  margin: 8px 0 20px;
  padding-left: 20px;
  list-style: none;
}

.appexi-message-content li {
  margin-bottom: 6px;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
}

.appexi-message-content li::before {
  content: "\2022";
  position: absolute;
  left: -14px;
  color: rgba(99, 102, 241, 0.4);
}

.appexi-message-content hr {
  margin: 24px 0;
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Source Tier Indicator ─────────────────────────── */

.appexi-source-tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.appexi-source-tier .appexi-tier-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.appexi-tier-live {
  background: rgba(16, 185, 129, 0.12);
  color: rgba(16, 185, 129, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.appexi-tier-live .appexi-tier-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.appexi-tier-knowledge {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(96, 165, 250, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.appexi-tier-knowledge .appexi-tier-dot {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.appexi-tier-ai {
  background: rgba(234, 179, 8, 0.12);
  color: rgba(250, 204, 21, 0.85);
  border: 1px solid rgba(234, 179, 8, 0.18);
}

.appexi-tier-ai .appexi-tier-dot {
  background: #eab308;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.4);
}

.appexi-tier-general {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.appexi-tier-general .appexi-tier-dot {
  background: rgba(255, 255, 255, 0.25);
}

.appexi-disclaimer {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(234, 179, 8, 0.06);
  border-left: 2px solid rgba(234, 179, 8, 0.25);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
}

/* ── Thinking Steps ────────────────────────────────── */

.appexi-thinking-steps {
  padding: 6px 16px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.appexi-thinking-steps.hidden {
  display: none;
}

.appexi-thinking-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  animation: appexi-step-in 0.3s ease-out;
  transition: all 0.2s;
}

.appexi-thinking-step .appexi-step-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
}

.appexi-thinking-step .appexi-step-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s;
}

.appexi-thinking-step.appexi-step-active .appexi-step-icon {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
  animation: appexi-step-pulse 1.2s ease-in-out infinite;
}

.appexi-thinking-step.appexi-step-active .appexi-step-text {
  color: rgba(255, 255, 255, 0.6);
}

.appexi-thinking-step.appexi-step-completed .appexi-step-icon {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
  animation: none;
}

.appexi-thinking-step.appexi-step-completed .appexi-step-text {
  color: rgba(255, 255, 255, 0.5);
}

/* ── Skill Badge ───────────────────────────────────── */

.appexi-skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.appexi-skill-badge .appexi-skill-name {
  color: inherit;
}

.appexi-skill-badge .appexi-skill-version {
  opacity: 0.6;
  font-weight: 400;
}

.appexi-skill-badge .appexi-skill-confidence {
  opacity: 0.8;
  font-weight: 700;
}

.appexi-skill-risk_review {
  background: rgba(239, 68, 68, 0.08);
  color: rgba(239, 68, 68, 0.8);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.appexi-skill-maintenance {
  background: rgba(16, 185, 129, 0.08);
  color: rgba(16, 185, 129, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.appexi-skill-financial {
  background: rgba(245, 158, 11, 0.08);
  color: rgba(245, 158, 11, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.appexi-skill-compliance {
  background: rgba(99, 102, 241, 0.08);
  color: rgba(129, 140, 248, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.appexi-skill-strategic {
  background: rgba(168, 85, 247, 0.08);
  color: rgba(192, 132, 252, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.appexi-skill-operational {
  background: rgba(236, 72, 153, 0.08);
  color: rgba(244, 114, 182, 0.8);
  border: 1px solid rgba(236, 72, 153, 0.15);
}

/* ── Evidence Section ──────────────────────────────── */

.appexi-evidence-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-evidence-toggle {
  background: none;
  border: none;
  color: rgba(129, 140, 248, 0.35);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.appexi-evidence-toggle:hover {
  color: rgba(129, 140, 248, 0.65);
}

.appexi-evidence-toggle i {
  font-size: 9px;
  transition: transform 0.2s;
}

.appexi-evidence-toggle.appexi-evidence-expanded i {
  transform: rotate(90deg);
}

.appexi-evidence-cards {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-evidence-cards.hidden {
  display: none;
}

.appexi-evidence-card {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.appexi-evidence-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.appexi-evidence-card .appexi-evidence-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.appexi-evidence-card .appexi-evidence-module-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.08);
  color: rgba(129, 140, 248, 0.6);
}

.appexi-evidence-card .appexi-evidence-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
  line-height: 1.3;
}

.appexi-evidence-card .appexi-evidence-date {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.appexi-evidence-card .appexi-evidence-conf {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.appexi-evidence-card .appexi-evidence-conf-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
  flex-shrink: 0;
}

.appexi-evidence-card .appexi-evidence-conf-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  max-width: 60px;
}

.appexi-evidence-card .appexi-evidence-conf-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.appexi-evidence-card .appexi-evidence-conf-value {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  min-width: 24px;
  text-align: right;
}

.appexi-evidence-card .appexi-evidence-rationale {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.4;
  margin-top: 3px;
}

.appexi-evidence-card .appexi-evidence-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.1);
  text-decoration: none;
  transition: all 0.15s;
}

.appexi-evidence-card .appexi-evidence-link:hover {
  color: rgba(129, 140, 248, 0.8);
  background: rgba(99, 102, 241, 0.1);
}

/* ── Confidence Breakdown ──────────────────────────── */

.appexi-confidence-breakdown {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.appexi-conf-overall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-conf-overall-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.appexi-conf-overall-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.appexi-conf-factor {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.appexi-conf-factor:last-child {
  margin-bottom: 0;
}

.appexi-conf-factor-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  min-width: 70px;
  flex-shrink: 0;
}

.appexi-conf-factor-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.appexi-conf-factor-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.appexi-conf-factor-value {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Reasoning Trace ───────────────────────────────── */

.appexi-reasoning-trace {
  margin-top: 8px;
}

.appexi-trace-toggle {
  background: none;
  border: none;
  color: rgba(129, 140, 248, 0.35);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.appexi-trace-toggle:hover {
  color: rgba(129, 140, 248, 0.65);
}

.appexi-trace-toggle i {
  font-size: 9px;
  transition: transform 0.2s;
}

.appexi-trace-toggle.appexi-trace-expanded i {
  transform: rotate(90deg);
}

.appexi-trace-steps {
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-trace-steps.hidden {
  display: none;
}

.appexi-trace-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.appexi-trace-step:last-child {
  border-bottom: none;
}

.appexi-trace-step .appexi-trace-step-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 4px;
  font-size: 9px;
  background: rgba(99, 102, 241, 0.06);
  color: rgba(129, 140, 248, 0.5);
}

.appexi-trace-step .appexi-trace-step-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  min-width: 80px;
  flex-shrink: 0;
}

.appexi-trace-step .appexi-trace-step-detail {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.4;
}

/* ── Recommendations ──────────────────────────────── */

.appexi-recommendations {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-recommendations-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.appexi-recommendation-card {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: border-color 0.15s;
}

.appexi-recommendation-card:last-child {
  margin-bottom: 0;
}

.appexi-recommendation-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.appexi-recommendation-card .appexi-rec-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.appexi-recommendation-card .appexi-rec-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  flex: 1;
}

.appexi-recommendation-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.appexi-rec-priority-critical {
  background: rgba(239, 68, 68, 0.12);
  color: rgba(239, 68, 68, 0.8);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.appexi-rec-priority-high {
  background: rgba(245, 158, 11, 0.12);
  color: rgba(245, 158, 11, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.appexi-rec-priority-medium {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(96, 165, 250, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.appexi-rec-priority-low {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.appexi-recommendation-card .appexi-rec-impact {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.4;
  margin-top: 3px;
}

.appexi-recommendation-card .appexi-rec-impact strong {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

/* ── Why This Matters ──────────────────────────────── */

.appexi-why-matters {
  margin-top: 4px;
  padding: 4px 8px;
  border-left: 2px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  line-height: 1.4;
  font-style: italic;
}

/* ── Record Links ──────────────────────────────────── */

.appexi-record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.appexi-record-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.1);
  text-decoration: none;
  transition: all 0.15s;
}

.appexi-record-link:hover {
  color: rgba(129, 140, 248, 0.8);
  background: rgba(99, 102, 241, 0.1);
}

.appexi-record-link i {
  font-size: 8px;
}

/* ── Follow-up Suggestions ─────────────────────────── */

.appexi-follow-up {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-follow-up-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.appexi-follow-up-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.appexi-follow-up-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(99, 102, 241, 0.03);
  color: rgba(129, 140, 248, 0.5);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  line-height: 1.4;
}

.appexi-follow-up-btn:hover {
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
  color: rgba(129, 140, 248, 0.7);
}

.appexi-follow-up-btn:active {
  transform: scale(0.97);
}

/* ── Evidence Badges ──────────────────────────────── */

.appexi-evidence-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.appexi-evidence-live_company_data {
  background: rgba(16, 185, 129, 0.1);
  color: rgba(16, 185, 129, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.appexi-evidence-enterprise_knowledge {
  background: rgba(59, 130, 246, 0.1);
  color: rgba(96, 165, 250, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.appexi-evidence-external_intelligence {
  background: rgba(168, 85, 247, 0.1);
  color: rgba(192, 132, 252, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.appexi-evidence-user_input {
  background: rgba(234, 179, 8, 0.1);
  color: rgba(250, 204, 21, 0.8);
  border: 1px solid rgba(234, 179, 8, 0.15);
}

.appexi-evidence-inference {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Confidence Score ─────────────────────────────── */

.appexi-confidence {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-confidence-icon {
  font-size: 11px;
  flex-shrink: 0;
}

.appexi-confidence-label {
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.appexi-confidence-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  max-width: 80px;
}

.appexi-confidence-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.appexi-confidence-score {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
}

/* ── Explainability Panel ─────────────────────────── */

.appexi-explain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 0;
  flex-shrink: 0;
}

.appexi-explain-toggle {
  background: none;
  border: none;
  color: rgba(129, 140, 248, 0.4);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.appexi-explain-toggle:hover {
  color: rgba(129, 140, 248, 0.7);
}

.appexi-tone-indicator {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.appexi-explain-panel {
  margin: 0 16px 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-explain-panel.hidden {
  display: none !important;
}

.appexi-explain-section {
  margin-bottom: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.appexi-explain-section:last-child {
  margin-bottom: 0;
}

.appexi-explain-section strong {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.appexi-explain-section ul {
  margin: 0;
  padding-left: 14px;
  list-style: none;
}

.appexi-explain-section li {
  margin-bottom: 3px;
  position: relative;
  color: rgba(255, 255, 255, 0.35);
}

.appexi-explain-section li::before {
  content: "\2013";
  position: absolute;
  left: -12px;
  color: rgba(255, 255, 255, 0.15);
}

.appexi-explain-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.35);
}

.appexi-evidence-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.appexi-explain-missing {
  border-left: 2px solid rgba(234, 179, 8, 0.3);
  padding-left: 10px;
}

.appexi-explain-limitations {
  border-left: 2px solid rgba(239, 68, 68, 0.3);
  padding-left: 10px;
}

/* ── Suggestions ──────────────────────────────────── */

.appexi-suggestions {
  padding: 5px 14px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.appexi-suggestions-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.appexi-suggestion-btn {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(99, 102, 241, 0.04);
  color: rgba(129, 140, 248, 0.5);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appexi-suggestion-btn:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
  color: #818cf8;
}

.appexi-suggestion-btn:active {
  transform: scale(0.97);
}

/* ── Input Area ───────────────────────────────────── */

.appexi-input-area {
  padding: 8px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.appexi-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.appexi-input {
  flex: 1;
  min-height: 38px;
  max-height: 200px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
}

.appexi-input:focus {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.appexi-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.appexi-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 13px;
}

.appexi-send-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.appexi-send-btn:active {
  transform: scale(0.95);
}

/* ── Floating Action Button ───────────────────────── */

.appexi-fab {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  transition: all 0.25s ease;
  position: fixed;
  bottom: 24px;
  right: 32px;
  overflow: hidden;
  pointer-events: auto;
}

.appexi-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.appexi-fab:active {
  transform: scale(0.96);
}

.appexi-fab-icon {
  font-size: 24px;
  line-height: 1;
}

.appexi-fab.hidden {
  display: none !important;
}

/* ── Backdrop dimming overlay ─────────────────── */

.appexi-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: -1;
  pointer-events: auto;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-backdrop.hidden {
  display: none;
}

/* ── Conversation History Panel ───────────────────── */

.appexi-history-panel {
  max-height: 180px;
  overflow-y: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  animation: appexi-fade-in 0.15s ease-out;
}

.appexi-history-panel.hidden {
  display: none !important;
}

.appexi-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.appexi-history-clear {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
  transition: color 0.15s;
}

.appexi-history-clear:hover {
  color: rgba(239, 68, 68, 0.6);
}

.appexi-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.appexi-history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
}

.appexi-history-item i {
  font-size: 10px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.appexi-history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appexi-history-empty {
  padding: 12px 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
}

/* ── Typing Indicator ─────────────────────────────── */

.appexi-typing {
  display: flex;
  gap: 10px;
  align-items: center;
  animation: appexi-fade-in 0.15s ease-out;
  padding: 4px 0;
}

.appexi-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  animation: appexi-dot 1.2s ease-in-out infinite;
}

.appexi-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.appexi-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ── Animations ───────────────────────────────────── */

@keyframes appexi-panel-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes appexi-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes appexi-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes appexi-step-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes appexi-step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.05); }
}

@keyframes appexi-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

/* ── AI Futuristic Theme Overrides ────────────────── */

body.theme-ai-futuristic .appexi-panel {
  background: rgba(5, 8, 22, 0.94) !important;
  border-color: rgba(79, 124, 255, 0.15) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(79, 124, 255, 0.08) !important;
}

body.theme-ai-futuristic .appexi-fab {
  background: linear-gradient(135deg, #4F7CFF, #7C5CFF) !important;
  box-shadow: 0 4px 20px rgba(79, 124, 255, 0.35) !important;
}

body.theme-ai-futuristic .appexi-fab:hover {
  box-shadow: 0 8px 30px rgba(79, 124, 255, 0.5) !important;
}

body.theme-ai-futuristic .appexi-input:focus {
  border-color: rgba(79, 124, 255, 0.4) !important;
  box-shadow: 0 0 15px rgba(79, 124, 255, 0.08) !important;
}

body.theme-ai-futuristic .appexi-evidence-enterprise_knowledge {
  background: rgba(79, 124, 255, 0.1) !important;
  color: rgba(110, 168, 254, 0.9) !important;
  border-color: rgba(79, 124, 255, 0.2) !important;
}

/* ── Reduced Motion ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .appexi-panel { animation: none !important; }
  .appexi-typing span { animation: none !important; opacity: 0.5 !important; }
  .appexi-thinking-step { animation: none !important; }
  .appexi-step-active .appexi-step-icon { animation: none !important; }
}

/* ── Mobile Responsive ────────────────────────────── */

@media (max-width: 480px) {
  .appexi-panel {
    width: calc(100vw - 24px);
    max-height: 80vh;
    bottom: 80px;
    right: 12px;
    border-radius: 16px;
  }

  .appexi-header-title {
    font-size: 13px;
  }

  .appexi-tone-select {
    font-size: 9px;
    padding: 2px 18px 2px 5px;
    max-width: 60px;
  }

  .appexi-toggle-btn {
    width: 24px;
    height: 22px;
    font-size: 10px;
  }

  .appexi-fab {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .appexi-fab-icon {
    font-size: 20px;
  }
}

/* ═══ Executive Insight Box ══════════════════════════ */

.appexi-insight-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 4px 8px 10px;
}

.appexi-insight-field {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-insight-field:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.appexi-insight-field:first-child {
  padding-top: 0;
}

.appexi-insight-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.appexi-insight-label i {
  font-size: 9px;
}

.appexi-insight-value {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}

/* Priority badge */
.appexi-insight-priority-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

/* Recommended actions list */
.appexi-insight-actions {
  margin: 0;
  padding: 0 0 0 16px;
  list-style: none;
}

.appexi-insight-actions li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  position: relative;
  padding-left: 4px;
  margin-bottom: 4px;
}

.appexi-insight-actions li::before {
  content: "→";
  position: absolute;
  left: -14px;
  color: rgba(99, 102, 241, 0.5);
  font-size: 11px;
}

/* Confidence bar */
.appexi-insight-confidence {
  display: flex;
  align-items: center;
  gap: 8px;
}

.appexi-insight-confidence-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.appexi-insight-confidence-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.appexi-insight-confidence-value {
  font-size: 13px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

/* ═══════════════════════════════════════════════
   Floating Dock — Light Background Modifier
   Release 28.1
   
   Applied by floating-contrast Stimulus controller
   when the dock overlaps a .light-section.
   ═══════════════════════════════════════════════ */

/* ── Dock buttons over light backgrounds ── */
.floating-dock--light .floating-dock-btn {
  background: rgba(35, 35, 40, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
  color: #111 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
}

.floating-dock--light .floating-dock-btn i,
.floating-dock--light .floating-dock-btn svg {
  color: #111 !important;
}

.floating-dock--light .floating-dock-btn--fab {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4) !important;
}

.floating-dock--light .floating-dock-btn--fab i,
.floating-dock--light .floating-dock-btn--fab svg {
  color: #fff !important;
}

/* ── Did You Know Card ── */
.floating-dock--light ~ .did-you-know-card,
.floating-dock--light .did-you-know-card {
  background: rgba(35, 35, 40, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

/* ── APPEXi FAB over light backgrounds ── */
.appexi-fab--light.appexi-fab {
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

/* ── AI Futuristic theme override ── */
body.theme-ai-futuristic .floating-dock--light .floating-dock-btn {
  background: rgba(15, 20, 40, 0.92) !important;
  border-color: rgba(79, 124, 255, 0.2) !important;
}

body.theme-ai-futuristic .appexi-fab--light.appexi-fab {
  	box-shadow: 0 4px 24px rgba(79, 124, 255, 0.45), 0 0 0 1px rgba(79, 124, 255, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   Floating Dock — Enterprise AI Workspace Launcher
   Version 2.0 — Unified purple glass, hover expansion, tooltips
   ═══════════════════════════════════════════════════════════════════ */

/* ── Dock Container ──────────────────────────────── */

.floating-dock {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 6px;
  background: rgba(10, 14, 28, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.06);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease-out;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0.65;
}

.floating-dock:hover {
  opacity: 1;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.04);
}

/* ── Button Wrapper ──────────────────────────────── */

.dock-btn-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* ── Enterprise Glass Button ─────────────────────── */

.dock-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.08);
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: none;
  gap: 0;
  flex-shrink: 0;
}

.dock-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.dock-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.22);
  color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.dock-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition-duration: 0.05s;
}

/* Active state — brighter glow when panel is open */
.dock-btn.dock-btn-active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25), inset 0 0 12px rgba(99, 102, 241, 0.06);
}

/* APPEXi primary button — slightly larger, gradient */
.dock-btn-appexi {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));
  border-color: rgba(99, 102, 241, 0.2);
}

.dock-btn-appexi:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.15));
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.25);
}

.dock-btn-appexi.dock-btn-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.15));
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3), inset 0 0 12px rgba(99, 102, 241, 0.06);
}

/* ── Button Icon ─────────────────────────────────── */

.dock-btn-icon {
  font-size: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease-out;
}

.dock-btn:hover .dock-btn-icon {
  transform: scale(1.1);
}

.dock-btn:active .dock-btn-icon {
  transform: scale(0.9);
}

/* ── Button Label (hidden by default, shown on hover expansion) ── */

.dock-btn-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: all 0.2s ease-out;
  margin-left: 0;
}

/* Expanded state — labels slide in */
.floating-dock-expanded .dock-btn {
  width: auto;
  padding: 0 10px 0 8px;
  gap: 6px;
}

.floating-dock-expanded .dock-btn-appexi {
  padding: 0 12px 0 10px;
  gap: 6px;
}

.floating-dock-expanded .dock-btn-label {
  opacity: 1;
  max-width: 160px;
  margin-left: 0;
}

.floating-dock-expanded .dock-btn-label-appexi {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

/* ── Divider ─────────────────────────────────────── */

.dock-divider {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 2px 0;
  flex-shrink: 0;
}

/* ── Enterprise Tooltips ──────────────────────────── */

.dock-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 12px;
  background: rgba(10, 14, 28, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.dock-tooltip-visible {
  opacity: 1;
}

/* Hide tooltips when dock is expanded (labels replace them) */
.floating-dock-expanded .dock-tooltip {
  display: none;
}

/* ── Mobile Responsive ────────────────────────────── */

@media (max-width: 640px) {
  .floating-dock {
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
  }

  .dock-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .dock-btn-appexi {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .floating-dock-expanded .dock-btn {
    padding: 0 12px 0 8px;
  }

  .dock-tooltip {
    display: none;
  }
}

/* ── Light Background Overrides ───────────────────── */

.floating-dock--light {
  border-color: rgba(99, 102, 241, 0.12) !important;
  background: rgba(20, 22, 40, 0.85) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Panel Modes — Floating / Expanded / Fullscreen / Workspace
   ═══════════════════════════════════════════════════════════════ */

/* Floating — default, ~420px × 90vh height, flex fills */
.appexi-panel-floating {
  position: fixed;
  left: auto;
  right: 32px;
  top: auto;
  bottom: 24px;
  width: 420px;
  max-width: 92vw;
  height: 720px;
  max-height: 90vh;
  border-radius: 20px;
  transform-origin: bottom right;
}

/* Expanded — 900px × 90vh, centered */
.appexi-panel-expanded {
  position: fixed;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  max-width: 94vw;
  max-height: 90vh;
  height: 90vh;
  border-radius: 20px;
}

.appexi-panel-expanded .appexi-messages {
  max-height: calc(90vh - 140px);
}

/* Workspace — 55-60% width, right-anchored, full-height, for anonymous demo */
.appexi-panel-workspace {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(58%, 960px);
  height: 100vh;
  max-height: 100vh;
  border-radius: 20px 0 0 20px;
  border-right: none;
  border-top: none;
  border-bottom: none;
}

.appexi-panel-workspace .appexi-messages {
  max-height: calc(100vh - 130px);
}

/* Workspace on narrow screens — fill the full width so the chat input box
   is NEVER pushed off-screen. (Previously min-width:600px + width:58% could
   overflow small viewports and hide the typing box.) */
@media (max-width: 640px) {
  .appexi-panel-workspace {
    width: 100vw;
    max-width: 100vw;
    left: 0;
    right: 0;
    border-radius: 0;
  }
}

/* Fullscreen — 100vw × 100vh, covers entire viewport */
.appexi-panel-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
}

.appexi-panel-fullscreen .appexi-messages {
  max-height: calc(100vh - 120px);
}

/* Fullscreen fallback — used when browser Fullscreen API is unavailable */
.appexi-fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  z-index: 2147483647 !important;
}

/* Smooth transition when switching modes */
.appexi-panel {
  transition: width 0.25s ease, height 0.25s ease, max-width 0.25s ease, 
              max-height 0.25s ease, top 0.25s ease, left 0.25s ease, 
              right 0.25s ease, bottom 0.25s ease, border-radius 0.25s ease,
              transform 0.25s ease;
}

/* ── Draggable Header ──────────────────────────────── */

.appexi-header {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.appexi-header:active {
  cursor: grabbing;
}

/* Prevent text selection during drag */
.appexi-panel.appexi-dragging,
.appexi-panel.appexi-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.appexi-panel.appexi-dragging {
  transition: none !important;
}

/* ── Window Control Buttons ────────────────────────── */

.appexi-window-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.appexi-window-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.appexi-window-btn.appexi-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.appexi-window-btn:active {
  transform: scale(0.92);
}

/* Pin button active state — purple glow when pinned */
.appexi-pin-btn.appexi-pin-active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.appexi-pin-btn.appexi-pin-active:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

/* ── Resize Handle ─────────────────────────────────── */

.appexi-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: auto;
}

.appexi-resize-handle::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  margin: 2px;
}

.appexi-resize-handle:hover::after {
  border-color: rgba(99, 102, 241, 0.4);
}

/* ── Header Status Dot ─────────────────────────────── */

.appexi-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* ── FAB hidden state (when fully closed) ──────────── */

/* ═══════════════════════════════════════════════════════════════
   Demo Mode — Conversion Panel & Lock Prompt
   Anonymous User Experience — Release 27.6
   ═══════════════════════════════════════════════════════════════ */

/* ── Conversion Panel (after first demo response) ───── */

.appexi-conversion-panel {
  margin: 8px 0 4px;
  padding: 16px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  text-align: center;
  animation: appexi-fade-in 0.3s ease-out;
}

.appexi-conversion-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.appexi-conversion-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.appexi-conversion-title {
  font-size: 14px;
  font-weight: 700;
  color: #E0E7FF;
  margin: 0;
  letter-spacing: -0.01em;
}

.appexi-conversion-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 2px;
  line-height: 1.4;
}

.appexi-conversion-subtext {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.appexi-conversion-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: inline-block;
  text-align: left;
  columns: 2;
  column-gap: 20px;
}

.appexi-conversion-benefits li {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  padding: 3px 0;
  position: relative;
  padding-left: 20px;
  line-height: 1.3;
  break-inside: avoid;
}

.appexi-conversion-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
  font-size: 12px;
}

.appexi-conversion-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.appexi-conversion-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  min-width: 140px;
}

.appexi-conversion-btn:hover {
  transform: translateY(-1px);
}

.appexi-conversion-btn:active {
  transform: scale(0.97);
}

.appexi-conversion-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.appexi-conversion-btn-primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.appexi-conversion-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.appexi-conversion-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.appexi-conversion-btn-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  padding: 8px 20px;
}

.appexi-conversion-btn-outline:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.appexi-conversion-footer {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
}

/* ── Lock Prompt (second anonymous question) ────────── */

.appexi-lock-prompt {
  margin: 8px 0 4px;
  padding: 28px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 16px;
  text-align: center;
  animation: appexi-fade-in 0.3s ease-out;
}

.appexi-lock-icon {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1;
}

.appexi-lock-title {
  font-size: 15px;
  font-weight: 700;
  color: #E0E7FF;
  margin: 0 0 8px;
  line-height: 1.4;
}

.appexi-lock-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 20px;
  line-height: 1.5;
}

.appexi-lock-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.appexi-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  min-width: 200px;
}

.appexi-lock-btn:hover {
  transform: translateY(-1px);
}

.appexi-lock-btn:active {
  transform: scale(0.97);
}

.appexi-lock-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.appexi-lock-btn-primary:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.appexi-lock-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.appexi-lock-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.appexi-lock-btn-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  padding: 8px 20px;
}

.appexi-lock-btn-outline:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.appexi-lock-footer {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
}

/* ── Expanded mode overrides for anonymous demo ─────── */

.appexi-panel-expanded .appexi-conversion-panel,
.appexi-panel-expanded .appexi-lock-prompt {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.appexi-exec-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px 12px 4px 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.12);
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.appexi-exec-title-text {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.01em;
}

.appexi-exec-title-confidence {
  font-size: 12px;
  font-weight: 600;
  color: rgba(16, 185, 129, 0.8);
  background: rgba(16, 185, 129, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.appexi-exec-section {
  margin-bottom: 14px;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-exec-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-exec-section-body {
  padding: 0;
}

.appexi-exec-summary .appexi-exec-section-body {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  padding: 14px 16px;
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.08);
  border-radius: 10px;
}

/* Analysis cards — three-column responsive grid */
.appexi-exec-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

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

.appexi-exec-analysis-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.appexi-exec-analysis-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Card variants — coloured top border */
.appexi-exec-analysis-card.appexi-card-availability {
  border-top: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.04);
}

.appexi-exec-analysis-card.appexi-card-performance {
  border-top: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.04);
}

.appexi-exec-analysis-card.appexi-card-quality {
  border-top: 3px solid #22c55e;
  background: rgba(34, 197, 94, 0.04);
}

.appexi-exec-analysis-card-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.appexi-exec-analysis-card-body {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.appexi-exec-analysis-card-body ul {
  margin: 4px 0;
  padding-left: 14px;
  list-style: none;
}

.appexi-exec-analysis-card-body li {
  margin-bottom: 5px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.appexi-exec-analysis-card-body li::before {
  content: "\2022";
  position: absolute;
  left: -12px;
  color: rgba(99, 102, 241, 0.4);
}

/* Priority badges */
.appexi-exec-priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.appexi-exec-priority-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.appexi-exec-priority-high {
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.appexi-exec-priority-medium {
  background: rgba(234, 179, 8, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.appexi-exec-priority-low {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* Recommended Actions with priority */
.appexi-exec-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.appexi-exec-action-row:hover {
  border-color: rgba(16, 185, 129, 0.15);
}

.appexi-exec-checkmark {
  font-size: 14px;
  color: rgba(16, 185, 129, 0.7);
  flex-shrink: 0;
  margin-top: 2px;
  font-weight: 700;
}

.appexi-exec-action-text {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.appexi-exec-resource-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  transition: background 0.15s;
}

.appexi-exec-resource-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.appexi-exec-resource-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.appexi-exec-resource-text {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.appexi-exec-followup-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 2px;
}

.appexi-exec-followup-row:hover {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.appexi-exec-followup-bullet {
  font-size: 16px;
  color: rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
  line-height: 1.5;
}

.appexi-exec-followup-text {
  font-size: 15px;
  color: rgba(129, 140, 248, 0.72);
  line-height: 1.6;
  cursor: pointer;
  transition: color 0.15s;
}

.appexi-exec-followup-text:hover {
  color: rgba(129, 140, 248, 0.8);
}

.appexi-exec-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 4px;
}

/* ═══ Intelligence Context Panel ══════════════════════ */

.appexi-context-panel {
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-context-banner {
  animation: appexi-fade-in 0.15s ease-out;
}

.appexi-context-selectors select {
  appearance: auto;
  -webkit-appearance: auto;
}

.appexi-context-selectors select:hover {
  border-color: rgba(99, 102, 241, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.appexi-context-selectors select:focus {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

body.theme-ai-futuristic .appexi-fab--light.appexi-fab {
  box-shadow: 0 4px 24px rgba(79, 124, 255, 0.45), 0 0 0 1px rgba(79, 124, 255, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Docking / Snapping visual feedback
   ═══════════════════════════════════════════════════════════════ */

.appexi-panel.appexi-docked-bottom-right,
.appexi-panel.appexi-docked-bottom-left,
.appexi-panel.appexi-docked-top-right,
.appexi-panel.appexi-docked-top-left,
.appexi-panel.appexi-docked-right,
.appexi-panel.appexi-docked-left {
  transition: left 0.18s ease, top 0.18s ease !important;
}

.appexi-panel.appexi-docked-bottom-right {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.06);
}

.appexi-panel.appexi-docked-top-right {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.06);
  border-radius: 0 0 20px 20px !important;
}

.appexi-panel.appexi-docked-top-left {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.06);
  border-radius: 0 20px 20px 0 !important;
}

.appexi-panel.appexi-docked-bottom-left {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.06);
  border-radius: 0 20px 0 20px !important;
}

/* ═══════════════════════════════════════════════════════════════
   Collapsible Executive Report Sections
   ═══════════════════════════════════════════════════════════════ */

.appexi-exec-section-heading:hover {
  color: rgba(255, 255, 255, 0.55) !important;
}

.appexi-exec-section-heading:hover .appexi-exec-chevron {
  opacity: 0.7 !important;
}

/* ═══════════════════════════════════════════════════════════════
   Fullscreen CTA Banner
   ═══════════════════════════════════════════════════════════════ */

.appexi-fullscreen-cta {
  animation: appexi-fade-in 0.25s ease-out;
}

.appexi-fullscreen-cta button:hover {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  color: #C7D2FE !important;
}

.appexi-fullscreen-cta button:active {
  transform: scale(0.97);
}

/* ═══ Executive Report — Enhanced Header Badges ═══ */

.appexi-exec-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.appexi-exec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.appexi-exec-badge i {
  font-size: 9px;
}

/* Confidence badge */
.appexi-badge-confidence-high {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.appexi-badge-confidence-mid {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.appexi-badge-confidence-low {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Source tier badges */
.appexi-badge-tier-live {
  background: rgba(16, 185, 129, 0.12);
  color: rgba(16, 185, 129, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.appexi-badge-tier-enterprise {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(96, 165, 250, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.appexi-badge-tier-ai {
  background: rgba(234, 179, 8, 0.12);
  color: rgba(250, 204, 21, 0.85);
  border: 1px solid rgba(234, 179, 8, 0.18);
}

.appexi-badge-tier-general {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Type badge */
.appexi-badge-type {
  background: rgba(139, 92, 246, 0.12);
  color: rgba(192, 132, 252, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

/* Analysis basis badge — shows data source transparency */
.appexi-badge-basis {
  background: rgba(245, 158, 11, 0.10);
  color: rgba(250, 204, 21, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.14);
}

/* Confidence info icon — tooltip hint in breakdown rows */
.appexi-conf-info-icon {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.15);
  margin-left: 3px;
  cursor: help;
  vertical-align: middle;
}

.appexi-conf-info-icon:hover {
  color: rgba(255, 255, 255, 0.4);
}

/* ═══ Executive Report — KPI Cards (Enhanced) ═══ */

.appexi-exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.appexi-exec-kpi-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  transition: all 0.2s ease;
}

.appexi-exec-kpi-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.appexi-exec-kpi-icon {
  font-size: 18px;
  margin-bottom: 6px;
  line-height: 1;
}

.appexi-exec-kpi-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.appexi-exec-kpi-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.85);
}

.appexi-exec-kpi-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  margin-top: 6px;
}

.appexi-kpi-tag-green {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.15);
}

.appexi-kpi-tag-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.appexi-kpi-tag-red {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.appexi-kpi-tag-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* ═══ Executive Report — Financial KPI Summary ═══ */

.appexi-financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.appexi-financial-card {
  background: rgba(34, 197, 94, 0.04);
  border: 1px solid rgba(34, 197, 94, 0.1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s ease;
}

.appexi-financial-card:hover {
  background: rgba(34, 197, 94, 0.07);
  border-color: rgba(34, 197, 94, 0.18);
  transform: translateY(-1px);
}

.appexi-financial-value {
  font-size: 20px;
  font-weight: 800;
  color: #86efac;
  letter-spacing: -0.02em;
}

.appexi-financial-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.appexi-financial-total {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.appexi-financial-total:hover {
  border-color: rgba(34, 197, 94, 0.25);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.08);
}

.appexi-financial-total-value {
  font-size: 28px;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.appexi-financial-total-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ═══ Executive Report — Severity Cards (Root Cause) ═══ */

.appexi-severity-card {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.appexi-severity-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.appexi-severity-card.appexi-severity-critical {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
  border-top: 1px solid rgba(239, 68, 68, 0.1);
  border-right: 1px solid rgba(239, 68, 68, 0.1);
  border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

.appexi-severity-card.appexi-severity-high {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.04);
  border-top: 1px solid rgba(245, 158, 11, 0.08);
  border-right: 1px solid rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.08);
}

.appexi-severity-card.appexi-severity-medium {
  border-left: 4px solid #f97316;
  background: rgba(249, 115, 22, 0.03);
  border-top: 1px solid rgba(249, 115, 22, 0.06);
  border-right: 1px solid rgba(249, 115, 22, 0.06);
  border-bottom: 1px solid rgba(249, 115, 22, 0.06);
}

.appexi-severity-card.appexi-severity-low {
  border-left: 4px solid #22c55e;
  background: rgba(34, 197, 94, 0.03);
  border-top: 1px solid rgba(34, 197, 94, 0.06);
  border-right: 1px solid rgba(34, 197, 94, 0.06);
  border-bottom: 1px solid rgba(34, 197, 94, 0.06);
}

.appexi-severity-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.appexi-severity-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.appexi-severity-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
}

.appexi-severity-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.appexi-severity-critical .appexi-severity-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.appexi-severity-high .appexi-severity-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.appexi-severity-medium .appexi-severity-badge {
  background: rgba(249, 115, 22, 0.15);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.appexi-severity-low .appexi-severity-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.appexi-severity-body {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.appexi-severity-body ul {
  margin: 4px 0;
  padding-left: 14px;
  list-style: none;
}

.appexi-severity-body li {
  margin-bottom: 5px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.appexi-severity-body li::before {
  content: "\2022";
  position: absolute;
  left: -12px;
  color: rgba(99, 102, 241, 0.4);
}

/* ═══ Executive Report — Action Cards ═══ */

.appexi-action-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.appexi-action-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.appexi-action-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.appexi-action-icon {
  font-size: 14px;
  color: rgba(99, 102, 241, 0.5);
  flex-shrink: 0;
  margin-top: 2px;
}

.appexi-action-content {
  flex: 1;
  min-width: 0;
}

.appexi-action-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.appexi-action-priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.appexi-action-priority-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.18);
}

.appexi-action-priority-high {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.appexi-action-priority-medium {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.appexi-action-priority-low {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.appexi-action-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  font-weight: 500;
}

.appexi-action-impact {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.4;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-action-impact strong {
  color: rgba(255, 255, 255, 0.5);
}

.appexi-action-why {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.06);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
  font-style: italic;
}

.appexi-action-why-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(99, 102, 241, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  font-style: normal;
}

/* ═══ Executive Report — Source Badge Grid ═══ */

.appexi-source-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.appexi-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(59, 130, 246, 0.06);
  color: rgba(96, 165, 250, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.15s ease;
}

.appexi-source-badge:hover {
  background: rgba(59, 130, 246, 0.1);
  color: rgba(96, 165, 250, 0.9);
  border-color: rgba(59, 130, 246, 0.18);
}

.appexi-source-badge i {
  font-size: 10px;
  color: rgba(96, 165, 250, 0.5);
}

/* ═══ Executive Report — Show More Button ═══ */

.appexi-show-more-wrapper {
  text-align: center;
  margin: 16px 0 8px;
}

.appexi-show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  background: rgba(99, 102, 241, 0.04);
  color: rgba(129, 140, 248, 0.6);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.appexi-show-more-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: rgba(129, 140, 248, 0.8);
  transform: translateY(-1px);
}

.appexi-show-more-btn:active {
  transform: scale(0.97);
}

.appexi-show-more-btn i {
  font-size: 12px;
  transition: transform 0.25s ease;
}

.appexi-show-more-btn.appexi-show-more-expanded i {
  transform: rotate(180deg);
}

/* ═══ Executive Report — Detailed Analysis Container ═══ */

.appexi-detailed-analysis {
  animation: appexi-fade-in 0.25s ease-out;
}

/* ═══ Executive Report — Section Chevron Rotation ═══ */

.appexi-exec-chevron {
  transition: transform 0.2s ease;
}

/* ═══ Executive Report — Summary Premium Card ═══ */

.appexi-exec-summary .appexi-exec-section-body {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(99, 102, 241, 0.01));
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
}

.appexi-exec-summary .appexi-exec-section-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.05));
  border-radius: 10px 10px 0 0;
}

/* ═══ Executive Report — Next Action Banner ═══ */

.appexi-exec-next-action {
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 3px solid;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.appexi-exec-next-action-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════
   Thinking Animation (Premium Demo)
   ═══════════════════════════════════════════════ */

.appexi-thinking-container {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: appexi-fade-in 0.15s ease-out;
}

.appexi-thinking-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  animation: appexi-fade-in 0.2s ease-out;
  animation-fill-mode: both;
}

.appexi-thinking-step-fa {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.1);
  flex-shrink: 0;
}

.appexi-thinking-step-item span {
  flex: 1;
  color: rgba(255, 255, 255, 0.55);
}

/* ═══════════════════════════════════════════════
   Explainability Section (Demo)
   ═══════════════════════════════════════════════ */

.appexi-explain-section {
  margin: 8px 0 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-explain-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.appexi-explain-header-bar i {
  font-size: 12px;
  color: rgba(129, 140, 248, 0.4);
}

.appexi-explain-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.appexi-explain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.appexi-explain-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

/* ═══════════════════════════════════════════════
   Workspace Mode Overrides
   ═══════════════════════════════════════════════ */

.appexi-panel-workspace .appexi-conversion-panel,
.appexi-panel-workspace .appexi-lock-prompt {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.appexi-panel-workspace .appexi-message-content {
  font-size: 15px;
  line-height: 1.65;
}

.appexi-panel-workspace .appexi-suggestion-btn {
  font-size: 13px;
  padding: 6px 14px;
}

.appexi-panel-workspace .appexi-input {
  font-size: 14px;
  padding: 10px 14px;
}

/* ═══════════════════════════════════════════════
   Interactive Confidence Breakdown Panel
   ═══════════════════════════════════════════════ */

.appexi-confidence-badge {
  transition: all 0.15s;
  position: relative;
}

.appexi-confidence-badge:hover {
  filter: brightness(1.2);
}

.appexi-confidence-chevron {
  transition: transform 0.2s ease;
  display: inline-block;
}

.appexi-confidence-panel {
  overflow: hidden;
  animation: appexi-fade-in 0.2s ease-out;
}

.appexi-confidence-panel.appexi-confidence-hidden {
  display: none;
}

.appexi-confidence-panel-inner {
  margin: 0 0 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.appexi-confidence-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
  gap: 4px;
}

.appexi-confidence-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.appexi-confidence-panel-type {
  font-size: 10px;
  font-weight: 600;
  color: rgba(245, 158, 11, 0.8);
  background: rgba(245, 158, 11, 0.08);
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.appexi-confidence-panel-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.appexi-conf-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.appexi-conf-breakdown-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  min-width: 140px;
  flex-shrink: 0;
}

.appexi-conf-breakdown-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.appexi-conf-breakdown-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.appexi-conf-breakdown-weight {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  min-width: 28px;
  text-align: right;
}

.appexi-conf-breakdown-score {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  min-width: 40px;
  text-align: right;
}

.appexi-confidence-panel-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.appexi-confidence-panel-total-score {
  font-size: 16px;
  color: #22c55e;
}

.appexi-confidence-panel-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.4;
}
/* ═══════════════════════════════════════════════════════════════
   Executive Intelligence Renderer (Release 35)
   Premium structured components: diagnosis, AI insight, evidence,
   financial opportunity, executive recommendations, premium CTA.
   ═══════════════════════════════════════════════════════════════ */

/* Intelligence level + framework + source badges */
.appexi-badge-domain {
  background: rgba(56, 189, 248, 0.14);
  color: #a5f3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.appexi-badge-level {
  background: rgba(129, 140, 248, 0.14);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.appexi-badge-framework {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.appexi-badge-source {
  background: rgba(16, 185, 129, 0.10);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.18);
}

/* Executive Diagnosis cards */
.appexi-exec-diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

.appexi-exec-diag-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}

.appexi-exec-diag-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.appexi-exec-diag-label i {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
}

.appexi-exec-diag-value {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}

/* Executive Diagnosis — explicit loss findings strip */
.appexi-diagnosis-findings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.appexi-diagnosis-finding {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.appexi-diagnosis-finding-flag {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 10px;
}

.appexi-diagnosis-finding-primary {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.appexi-diagnosis-finding-secondary {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.appexi-diagnosis-finding-tertiary {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.appexi-diagnosis-finding-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.appexi-diagnosis-finding-basis {
  margin-left: auto;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
}

/* AI Insight callout */
.appexi-ai-insight {
  position: relative;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(99, 102, 241, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-left: 3px solid #8b5cf6;
  border-radius: 10px;
  padding: 12px 14px 12px 30px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.appexi-ai-insight-quote {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 13px;
  color: #8b5cf6;
  opacity: 0.7;
}

/* Evidence & Reasoning chain */
.appexi-evidence-chain {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.appexi-evidence-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.appexi-evidence-step-dot {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appexi-evidence-step:last-child .appexi-evidence-step-dot {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* Evidence & Reasoning — visual explainability flow */
.appexi-evidence-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 12px;
}

.appexi-evidence-flow-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 8px;
}

.appexi-evidence-flow-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appexi-evidence-flow-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
}

.appexi-evidence-flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  color: rgba(59, 130, 246, 0.4);
  font-size: 10px;
}

.appexi-evidence-flow-node:last-child {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.2);
}

.appexi-evidence-flow-node:last-child .appexi-evidence-flow-icon {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.appexi-evidence-drivers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Financial Opportunity */
.appexi-financial-opportunity {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appexi-financial-recovery {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.10), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}

.appexi-financial-recovery-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}

.appexi-financial-recovery-value {
  font-size: 26px;
  font-weight: 800;
  color: #86efac;
  letter-spacing: -0.01em;
}

.appexi-financial-recovery-confidence {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* Compact financial panel — confidence, benchmark coverage, basis, assumptions */
.appexi-financial-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.appexi-financial-metric {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 9px 11px;
}

.appexi-financial-metric-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.appexi-financial-metric-label i {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
}

.appexi-financial-metric-value {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

.appexi-financial-metric-value .appexi-financial-list {
  gap: 3px;
}

.appexi-financial-metric-value .appexi-financial-list li {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.appexi-financial-block {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
}

.appexi-financial-block-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}

.appexi-financial-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appexi-financial-list li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.appexi-financial-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: #22c55e;
  font-size: 12px;
}

.appexi-financial-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.appexi-financial-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.appexi-financial-note i {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

/* Executive Recommendations (new format) */
.appexi-action-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.appexi-action-header {
  display: flex;
  gap: 12px;
}

.appexi-action-icon-priority {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appexi-action-content {
  flex: 1;
  min-width: 0;
}

.appexi-action-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}

.appexi-action-why {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(139, 92, 246, 0.06);
  border-left: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.appexi-action-why-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a78bfa;
  margin-bottom: 3px;
}

.appexi-action-why-label i {
  font-size: 9px;
  margin-right: 3px;
}

.appexi-action-impact {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.appexi-action-impact strong {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

/* Decision-support meta row: expected outcome, benefit, effort, owner */
.appexi-action-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.appexi-action-meta-item {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.appexi-action-meta-item strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

/* Knowledge source badge grid */
.appexi-source-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Premium Personalised Intelligence CTA */
.appexi-premium-cta {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08), rgba(34, 197, 94, 0.06));
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}

.appexi-premium-cta-title {
  font-size: 15px;
  font-weight: 800;
  color: #e0e7ff;
  margin-bottom: 4px;
}

.appexi-premium-cta-title i {
  color: #fbbf24;
  margin-right: 6px;
  font-size: 13px;
}

.appexi-premium-cta-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
}

.appexi-premium-cta-sub strong {
  color: #c7d2fe;
}

.appexi-premium-cta-benefits {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}

.appexi-premium-cta-benefits li {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

.appexi-premium-cta-benefits li i {
  font-size: 9px;
  color: #34d399;
}

.appexi-premium-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 24px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.appexi-premium-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
}

.appexi-premium-cta-btn i {
  font-size: 11px;
}

.appexi-premium-cta-footer {
  margin-top: 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Release 40.3 — Executive Hypothesis Engine (anonymous) ──────────── */

.appexi-hypothesis {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 6px;
}

.appexi-hypothesis-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.appexi-hypothesis-likelihood {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #fbbf24;
}

.appexi-hypothesis-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.appexi-hypothesis-evidence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.appexi-hypothesis-evidence {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 2px 8px;
}

.appexi-hypothesis-note {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.appexi-inv-priority {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.appexi-inv-priority:last-child {
  border-bottom: none;
}

.appexi-inv-priority-rank {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  font-size: 10px;
  font-weight: 800;
}

.appexi-inv-priority-name {
  flex: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.appexi-inv-priority-opp {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 10px;
  padding: 2px 8px;
}

.appexi-plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 6px;
}

.appexi-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.appexi-plan-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.appexi-plan-actions {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.appexi-plan-actions li {
  margin-bottom: 2px;
}

.appexi-plan-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.appexi-kpi-chip {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  padding: 2px 8px;
}

/* ── Release 41.3 — Executive Trade-off Engine ───────────────────────── */

.appexi-tradeoff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 10px;
  margin-bottom: 8px;
}

.appexi-tradeoff-side {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  flex: 1;
}

.appexi-tradeoff-vs {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fbbf24;
  letter-spacing: 0.08em;
}

.appexi-tradeoff-framing {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.appexi-tradeoff-objective {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}

.appexi-tradeoff-objective i {
  margin-top: 2px;
  color: #fbbf24;
}

.appexi-tradeoff-strategy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 8px;
}

.appexi-tradeoff-strategy i {
  margin-top: 2px;
  color: #34d399;
}

.appexi-tradeoff-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
