/* ═══════════════════════════════════════════════
   vAI Landing Page Styles (index_vai.html)
   ═══════════════════════════════════════════════ */

/* i18n-loading: hide data-i18n elements until translations load */
body.i18n-loading [data-i18n],
body.i18n-loading [data-i18n-placeholder],
body.i18n-loading [data-i18n-title] {
  visibility: hidden;
}
body {
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  font-family: 'Microsoft JhengHei', 'PingFang TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Navbar ─────────────────────────────────── */
.vai-chat-navbar {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  height: 60px;
  transition: background 0.3s;
}
.vai-chat-navbar .nav-link {
  color: #6b7280 !important;
  transition: color 0.2s;
}
.vai-chat-navbar .nav-link:hover {
  color: #111827 !important;
}
.vai-chat-navbar .navbar-brand span {
  color: #111827;
}

/* ── Full-page layout ─────────────────────────── */
.vai-page {
  margin-top: 60px;
  overflow-y: auto;
  background: #f8f9fa;
}

/* ── Hero Welcome Wrapper ────────────────────── */
.vai-welcome-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 4.5rem 1rem 3.5rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #f8f9fa 0%, #f1f2f4 30%, #ebedf0 60%, #f3f4f6 100%);
}
/* Animated gradient orbs */
.vai-welcome-wrapper::before,
.vai-welcome-wrapper::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: vai-orb-float 14s ease-in-out infinite alternate;
  pointer-events: none;
}
.vai-welcome-wrapper::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.06) 0%, transparent 70%);
  top: -10%;
  left: -10%;
}
.vai-welcome-wrapper::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.05) 0%, transparent 70%);
  bottom: -5%;
  right: -8%;
  animation-delay: -7s;
  animation-direction: alternate-reverse;
}
@keyframes vai-orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

.vai-welcome {
  max-width: 960px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}
.vai-welcome h1 {
  font-family: 'Momo Trust Sans', 'Microsoft JhengHei', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.vai-gradient-text {
  color: #111827;
  -webkit-text-fill-color: #111827;
}
.vai-welcome .subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ── Quick action buttons ─────────────────────── */
.vai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.vai-quick-btn {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-weight: 500;
}
.vai-quick-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.2);
  color: #111827;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* ── Welcome input — glassmorphism ─────────────── */
.vai-welcome-input {
  margin: 2rem auto 0;
  position: relative;
}
.vai-welcome-input .form-control {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 0.85rem 3.2rem 0.85rem 1.2rem;
  font-size: 0.95rem;
  color: #111827;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  resize: none;
  min-height: 80px;
  max-height: 160px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.vai-welcome-input .form-control::placeholder {
  color: #9ca3af;
}
.vai-welcome-input .form-control:focus {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05), 0 8px 32px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.9);
}
.vai-welcome-input .btn-send {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: #8b5cf6;
  border: none;
  color: #fff;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}
.vai-welcome-input .btn-send:hover {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

/* ── CTA primary button ──────────────────────── */
.vai-btn-primary {
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}
.vai-btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.vai-btn-primary:hover::after {
  left: 120%;
}
.vai-btn-primary:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

/* ── Navbar pill ─────────────────────────────── */
.vai-nav-pill {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 38px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.vai-nav-pill .nav-link {
  padding: 0.2rem 0.4rem !important;
  color: #6b7280 !important;
  transition: color 0.2s;
}
.vai-nav-pill .nav-link:hover {
  color: #111827 !important;
}

/* ── Footer ─────────────────────────────────── */
.vai-footer-wrapper {
  flex-shrink: 0;
}

/* ── Scrollbar ──────────────────────────────── */
.vai-page::-webkit-scrollbar { width: 6px; }
.vai-page::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.vai-page::-webkit-scrollbar-track { background: transparent; }

/* ── vCoin note ─────────────────────────────── */
.vai-vcoin-note {
  font-size: 0.82rem;
  color: #6b7280;
  text-align: center;
}
.vai-vcoin-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.vai-vcoin-link:hover {
  color: #111827;
  text-decoration: underline;
}

/* ── vCoin Modal ────────────────────────────── */
.vcoin-modal-content {
  border: none;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}
.vcoin-modal-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}
.vcoin-modal-header .modal-title {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
}
.vcoin-modal-body {
  padding: 1.5rem;
}
.vcoin-modal-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
}
.vcoin-intro p {
  font-size: 0.9375rem;
  line-height: 1.6;
}
.vcoin-usage-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.25s;
}
.vcoin-usage-card:hover {
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.vcoin-usage-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.vcoin-usage-label {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
.vcoin-usage-cost {
  margin-bottom: 0.375rem;
}
.vcoin-plan-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  padding: 1rem 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}
.vcoin-plan-card:hover {
  transform: translateY(-3px);
  border-color: #d1d5db;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.vcoin-plan-card--popular {
  border: 2px solid #111827;
  background: #f3f4f6;
}
.vcoin-plan-card--popular:hover {
  border-color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.vcoin-plan-amount {
  font-size: 1.125rem;
  color: #92400e;
  margin-bottom: 0.125rem;
}
.vcoin-plan-price {
  font-size: 1.125rem;
  color: #111827;
}

/* ── ERP badge in hero — animated shimmer ────── */
.vai-erp-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: vai-badge-shimmer 3s ease-in-out infinite;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
@keyframes vai-badge-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Secondary CTA button ────────────────────── */
.vai-btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #374151;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 0.7rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.vai-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.2);
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ── Content sections ────────────────────────── */
.vai-section {
  padding: 4.5rem 1rem;
  position: relative;
}
.vai-section-alt {
  background: #fff;
}
.vai-section-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: vai-badge-shimmer 4s ease-in-out infinite;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 0.85rem;
  letter-spacing: 0.03em;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.vai-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.vai-section-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Integration cards ────────────────────────── */
.vai-integration-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.vai-integration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #374151, #6b7280, #9ca3af);
  opacity: 0;
  transition: opacity 0.3s;
}
.vai-integration-card:hover::before {
  opacity: 1;
}
.vai-integration-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.vai-integration-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #374151;
  background: #f3f4f6;
  border-radius: 12px;
  transition: all 0.3s;
}
.vai-integration-card:hover .vai-integration-icon {
  background: #e5e7eb;
  transform: scale(1.05);
}
.vai-integration-card h6 {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}
.vai-integration-card p {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ── Workflow list ────────────────────────────── */
.vai-workflow-list {
  max-width: 680px;
  margin: 0 auto;
}
.vai-workflow-item {
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s;
}
.vai-workflow-item:last-child {
  border-bottom: none;
}
.vai-workflow-item:hover {
  padding-left: 0.5rem;
}
.vai-workflow-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #111827;
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.vai-workflow-content {
  flex: 1;
}
.vai-workflow-ask {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.vai-workflow-answer {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ── Tool cards ───────────────────────────────── */
.vai-tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.vai-tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4b5563, #6b7280, #9ca3af);
  opacity: 0;
  transition: opacity 0.3s;
}
.vai-tool-card:hover::before {
  opacity: 1;
}
.vai-tool-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.vai-tool-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 12px;
  transition: all 0.3s;
}
.vai-tool-card:hover .vai-tool-icon {
  background: #e5e7eb;
  transform: scale(1.05);
}
.vai-tool-card h6 {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}
.vai-tool-card p {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ── Chat demo override — black/white/grey ────── */
.vai-chat-demo-wrapper .ai-assistant-chat-demo .message-bubble {
  text-align: left;
}
.vai-chat-demo-wrapper .ai-assistant-chat-demo .message-bubble.user {
  background: #111827;
  color: #fff;
}
.vai-chat-demo-wrapper .ai-assistant-chat-demo .message-bubble.ai {
  background: #f3f4f6;
  color: #1f2937;
  border-color: #e5e7eb;
}
.vai-chat-demo-wrapper .ai-assistant-chat-demo .avatar-circle {
  border-color: #d1d5db;
  color: #6b7280;
}
.vai-chat-demo-wrapper .ai-assistant-chat-demo .typing-indicator .dot {
  background-color: #9ca3af;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .vai-welcome h1 { font-size: 1.75rem; }
  .vai-welcome .subtitle { font-size: 0.92rem; }
  .vai-welcome-input { max-width: 100%; }
  .vai-welcome-wrapper { padding: 3rem 1rem 2.5rem; }
  .vai-welcome-wrapper::before { width: 300px; height: 300px; }
  .vai-welcome-wrapper::after { width: 250px; height: 250px; }
  .vai-section { padding: 1rem 0rem; }
  .vai-section-title { font-size: 1.35rem; }
  .vai-integration-card, .vai-tool-card { padding: 1.1rem; }
  .vai-workflow-item { padding: 1rem 0; }
  .vai-workflow-item:hover { padding-left: 0; }
}

/* ── Bootstrap btn-primary / btn-outline-primary → purple override (landing page modals) ── */
#vcoinModal .btn-primary,
#vaiIntroModal .btn-primary {
  background-color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #fff !important;
}

#vcoinModal .btn-primary:hover,
#vaiIntroModal .btn-primary:hover {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #fff !important;
}

#vcoinModal .btn-primary:focus,
#vaiIntroModal .btn-primary:focus,
#vcoinModal .btn-primary:focus-visible,
#vaiIntroModal .btn-primary:focus-visible {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 0.25rem rgba(139, 92, 246, 0.5) !important;
  color: #fff !important;
}

#vcoinModal .btn-primary:active,
#vaiIntroModal .btn-primary:active {
  background-color: #6d28d9 !important;
  border-color: #6d28d9 !important;
  color: #fff !important;
}

#vcoinModal .btn-outline-primary,
#vaiIntroModal .btn-outline-primary {
  color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  background-color: transparent !important;
}

#vcoinModal .btn-outline-primary:hover,
#vaiIntroModal .btn-outline-primary:hover {
  background-color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #fff !important;
}

#vcoinModal .btn-outline-primary:active,
#vaiIntroModal .btn-outline-primary:active {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #fff !important;
}
