/* ===== FLOAT BUTTONS & AI AGENT WIDGET ===== */
.to-top {
  position: fixed !important;
  right: 25px !important;
  left: auto !important;
  bottom: 95px !important;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  z-index: 990;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
  background: var(--grad);
  opacity: 0;
  pointer-events: none;
  color: #fff;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.to-top:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}

.ai-float-btn {
  position: fixed !important;
  right: 25px !important;
  bottom: 25px !important;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.45rem;
  z-index: 9999 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.75), 0 6px 20px rgba(0, 0, 0, 0.45);
  overflow: visible;
  padding: 0;
}
.ai-notify-badge,
.ai-notify-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid #060212;
  border-radius: 11px;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85), 0 3px 6px rgba(0, 0, 0, 0.5);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: notifyPulse 1.8s infinite;
  pointer-events: none;
  box-sizing: border-box;
}
@keyframes notifyPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.ai-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.85), 0 8px 25px rgba(0, 0, 0, 0.55);
}
.ai-float-btn.active {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}
.ai-float-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.7);
  animation: aiPulse 2.2s infinite ease-out;
  pointer-events: none;
}
@keyframes aiPulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

.ai-float-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  transition: transform 0.3s;
}
.ai-float-btn:hover .ai-float-logo {
  transform: rotate(8deg) scale(1.08);
}

.ai-badge-hint {
  position: fixed;
  bottom: 33px;
  right: 95px;
  background: rgba(15, 10, 35, 0.94);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 22px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: bounceHint 3s infinite ease-in-out;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-badge-hint:hover {
  transform: scale(1.04) translateX(-4px);
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.45);
  color: #ffffff;
}
@keyframes bounceHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}
.ai-badge-hint.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px) scale(0.92);
}
.ai-badge-hint.ai-hint-alert {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.96), rgba(168, 85, 247, 0.96)) !important;
  color: #ffffff !important;
  border-color: #fda4af !important;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.6) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer;
  animation: hintShake 2.5s infinite;
}
@keyframes hintShake {
  0%, 100% { transform: translateY(0); }
  10%, 30% { transform: translateY(-4px); }
  20%, 40% { transform: translateY(3px); }
  50% { transform: translateY(0); }
}

/* =========================================
   UNIFIED FUTURISTIC DARK SCROLLBAR (NEON)
   ========================================= */
.ai-chat-window,
.ai-chat-window * {
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}
.ai-chat-window *::-webkit-scrollbar,
.ai-chat-window::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.ai-chat-window *::-webkit-scrollbar-track,
.ai-chat-window::-webkit-scrollbar-track {
  background: transparent;
}
.ai-chat-window *::-webkit-scrollbar-thumb,
.ai-chat-window::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.ai-chat-window *::-webkit-scrollbar-thumb:hover,
.ai-chat-window::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a855f7, #06b6d4);
}

/* =========================================
   AI CHAT WINDOW (DESKTOP)
   ========================================= */
.ai-chat-window {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 450px;
  max-width: calc(100vw - 32px);
  height: min(700px, calc(100vh - 120px));
  background: rgba(12, 7, 28, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(168, 85, 247, 0.38);
  border-radius: 22px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 45px rgba(168, 85, 247, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  pointer-events: none;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-chat-window.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Header */
.ai-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.24), rgba(6, 182, 212, 0.18));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ai-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}
.ai-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ai-chat-header h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: 0.5px;
  color: #fff;
}
.ai-status {
  font-size: 0.74rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.ai-status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Header Actions */
.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-btn-finish {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}
.ai-btn-finish:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  color: #fff;
  transform: translateY(-1px);
}
.ai-btn-finish:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}
.ai-btn-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--muted);
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Sub-Header Banner */
.ai-session-bar {
  background: rgba(6, 182, 212, 0.08);
  border-bottom: 1px solid rgba(6, 182, 212, 0.18);
  padding: 8px 18px;
  font-size: 0.74rem;
  color: #67e8f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ai-session-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-ai-pill {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================================
   WELCOME / LEAD FORM SCREEN
   ========================================= */
.ai-welcome-screen {
  flex: 1;
  padding: 18px 20px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at 50% 15%, rgba(168, 85, 247, 0.16), transparent 75%);
}
.ai-welcome-content {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ai-welcome-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px;
}
.ai-welcome-gt {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ai-welcome-content h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 6px;
}
.ai-welcome-content p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}
.ai-user-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.ai-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ai-field-group label {
  font-size: 0.76rem;
  font-weight: 500;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-field-group label i {
  color: #a855f7;
  font-size: 0.8rem;
}
.ai-opt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 400;
}
.ai-field-group input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.86rem;
  outline: none;
  font-family: 'Poppins', sans-serif;
  transition: 0.2s;
}
.ai-field-group input:focus {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
.ai-btn-start-consult {
  margin-top: 6px;
  background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
  border: none;
  color: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.45);
  transition: 0.25s;
}
.ai-btn-start-consult:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.55);
}
.ai-welcome-disclaimer {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.4;
  text-align: left;
}
.ai-welcome-disclaimer i {
  color: #06b6d4;
  margin-top: 2px;
  flex-shrink: 0;
}

/* User Active Ribbon */
.ai-user-ribbon {
  background: rgba(168, 85, 247, 0.1);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding: 6px 18px;
  font-size: 0.75rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ai-user-ribbon span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-user-ribbon strong {
  color: #67e8f9;
}
.ai-btn-reset-user {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-btn-reset-user:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* =========================================
   CHAT BODY & MESSAGES
   ========================================= */
.ai-chat-body {
  flex: 1;
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.35) transparent;
}
.ai-chat-body::-webkit-scrollbar {
  width: 6px;
}
.ai-chat-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}

#aiMessagesList {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* Messages */
.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  font-size: 0.92rem;
  line-height: 1.6;
  animation: fadeMsg 0.25s ease-out;
}
@keyframes fadeMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-msg.bot {
  align-self: flex-start;
}
.ai-msg.user {
  align-self: flex-end;
}

/* Bubbles */
.ai-bubble {
  padding: 13px 18px;
  border-radius: 18px;
  word-break: break-word;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22);
}
.ai-msg.bot .ai-bubble {
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
}
.ai-msg.user .ai-bubble {
  background: linear-gradient(135deg, #9333ea, #06b6d4);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
}

/* Markdown styling inside bubbles */
.ai-msg.bot .ai-bubble h2,
.ai-msg.bot .ai-bubble h3,
.ai-msg.bot .ai-bubble h4 {
  font-family: 'Orbitron', sans-serif;
  color: #67e8f9;
  margin: 10px 0 6px;
  font-size: 0.96rem;
  letter-spacing: 0.3px;
}
.ai-msg.bot .ai-bubble strong {
  color: #fff;
  font-weight: 600;
}
.ai-msg.bot .ai-bubble ul {
  margin: 6px 0 6px 18px;
  padding: 0;
}
.ai-msg.bot .ai-bubble li {
  margin-bottom: 4px;
  color: #e2e8f0;
}
.ai-msg.bot .ai-bubble hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 12px 0;
}

.ai-time {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 4px;
  align-self: flex-start;
}
.ai-msg.user .ai-time {
  align-self: flex-end;
}

/* Notice Chip */
.ai-system-notice {
  text-align: center;
  font-size: 0.74rem;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px dashed rgba(168, 85, 247, 0.35);
  padding: 7px 14px;
  border-radius: 20px;
  margin: 4px auto 6px;
  max-width: 92%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* =========================================
   INTERACTIVE Q&A & CHIPS PANEL
   ========================================= */
.ai-interactive-panel {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 4px;
}
.ai-panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a5f3fc;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ai-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.32);
  color: #67e8f9;
  border-radius: 18px;
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-family: 'Poppins', sans-serif;
}
.ai-chip:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: #06b6d4;
  transform: translateY(-1px);
  color: #fff;
}
.ai-chip.ai-chip-summary {
  border-color: rgba(168, 85, 247, 0.5);
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.12);
  font-weight: 600;
}
.ai-chip.ai-chip-summary:hover {
  background: rgba(168, 85, 247, 0.28);
  border-color: #c084fc;
}

/* =========================================
   ARCHITECTURAL BLUEPRINT STUDIO CARD (MATCHING PALETTE BOX AESTHETICS)
   ========================================= */
.ai-mockup-studio-card {
  background: linear-gradient(135deg, rgba(20, 12, 40, 0.92), rgba(9, 20, 38, 0.92));
  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
  animation: fadeMsg 0.35s ease-out;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.18);
  position: relative;
  overflow: hidden;
}

/* Studio Header Row */
.ai-mockup-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.ai-mockup-badges-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ai-mockup-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ai-category-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ai-btn-zoom-hd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-btn-zoom-hd:hover {
  background: rgba(6, 182, 212, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
}

.ai-mockup-top-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 10px;
}
.ai-mockup-top-desc strong {
  color: #67e8f9;
}

/* Nav Tabs (Segmented Control) */
.ai-mockup-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(4, 2, 14, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 10px;
}
.ai-mockup-tab-btn {
  flex: 1;
  padding: 6px 4px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ai-mockup-tab-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}
.ai-mockup-tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(168, 85, 247, 0.25));
  border-color: rgba(6, 182, 212, 0.55);
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Main 3D Stage Canvas Container */
.ai-3d-stage {
  width: 100%;
  height: 205px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: #060814;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
}
.ai-3d-stage:hover {
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: inset 0 0 25px rgba(168, 85, 247, 0.15), 0 6px 20px rgba(0, 0, 0, 0.5);
}
.ai-3d-view-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

/* REAL HTML 3D TYPOGRAPHY SIGNBOARD OVERLAY */
.ai-3d-signboard-html {
  position: absolute;
  top: 26px;
  left: 42px;
  right: 42px;
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 6, 26, 0.95), rgba(4, 2, 12, 0.98));
  border: 1.6px solid var(--brand-color, #06b6d4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 16px var(--glow-color, rgba(6, 182, 212, 0.4)), inset 0 0 12px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  z-index: 5;
  transition: all 0.4s ease;
}
.ai-3d-mascot-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 6px;
  border: 1.5px dashed var(--accent-color, #a855f7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: wireframeMarch 12s linear infinite;
  background: rgba(168, 85, 247, 0.06);
}
.ai-mascot-letter {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--accent-color, #a855f7);
  line-height: 1;
}
.ai-mascot-tag {
  font-family: 'Poppins', sans-serif;
  font-size: 0.38rem;
  font-weight: 700;
  color: var(--accent-color, #a855f7);
  margin-top: 2px;
}
.ai-3d-typo-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* REAL 3D EXTRUDED HTML TYPOGRAPHY */
.ai-3d-extruded-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1.5px;
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  transform: perspective(500px) rotateX(10deg);
  /* 3D Acrylic Lettering Extrusion Layers */
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 0 var(--brand-color, #06b6d4),
    0 3px 0 color-mix(in srgb, var(--brand-color, #06b6d4) 65%, #000),
    0 4px 1px rgba(0, 0, 0, 0.7),
    0 0 10px var(--brand-color, #06b6d4),
    0 0 22px var(--glow-color, rgba(6, 182, 212, 0.5));
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  animation: neon3DShimmer 2.8s ease-in-out infinite alternate;
  transition: all 0.3s ease;
}
@keyframes neon3DShimmer {
  0% {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.9)) drop-shadow(0 0 5px var(--brand-color, #06b6d4));
  }
  100% {
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.9)) drop-shadow(0 0 15px var(--brand-color, #06b6d4)) drop-shadow(0 0 25px var(--glow-color, rgba(6, 182, 212, 0.5)));
  }
}
.ai-3d-sub-caption {
  font-family: 'Poppins', sans-serif;
  font-size: 0.52rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.6px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-3d-sub-caption code {
  color: var(--brand-color, #06b6d4);
  font-size: 0.5rem;
}

/* Modal Fullscreen 3D Signboard Styles */
.ai-modal-3d-stage {
  position: relative;
  width: 100%;
}
.ai-3d-signboard-html.modal-hd {
  position: absolute;
  top: 44px;
  left: 66px;
  right: 66px;
  height: 74px;
  border-radius: 8px;
  padding: 0 16px;
  gap: 16px;
  z-index: 5;
  background: linear-gradient(180deg, rgba(12, 6, 26, 0.96), rgba(4, 2, 12, 0.99));
  border: 2px solid var(--brand-color, #06b6d4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9), 0 0 24px var(--glow-color, rgba(6, 182, 212, 0.5));
}
.ai-3d-signboard-html.modal-hd .ai-3d-mascot-box {
  width: 52px;
  height: 52px;
  min-width: 52px;
}
.ai-3d-signboard-html.modal-hd .ai-mascot-letter {
  font-size: 1.55rem;
}
.ai-3d-signboard-html.modal-hd .ai-mascot-tag {
  font-size: 0.46rem;
}
.ai-3d-signboard-html.modal-hd .ai-3d-extruded-title {
  font-size: 1.55rem;
  letter-spacing: 2px;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 0 var(--brand-color, #06b6d4),
    0 3px 0 var(--brand-color, #06b6d4),
    0 4px 0 color-mix(in srgb, var(--brand-color, #06b6d4) 60%, #000),
    0 5px 0 color-mix(in srgb, var(--brand-color, #06b6d4) 40%, #000),
    0 6px 2px rgba(0, 0, 0, 0.8),
    0 0 14px var(--brand-color, #06b6d4),
    0 0 28px var(--glow-color, rgba(6, 182, 212, 0.6));
}
.ai-3d-signboard-html.modal-hd .ai-3d-sub-caption {
  font-size: 0.62rem;
  letter-spacing: 0.8px;
  margin-top: 3px;
}
@media (max-width: 640px) {
  .ai-3d-signboard-html.modal-hd {
    top: 30px;
    left: 45px;
    right: 45px;
    height: 54px;
    padding: 0 10px;
    gap: 10px;
  }
  .ai-3d-signboard-html.modal-hd .ai-3d-mascot-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
  .ai-3d-signboard-html.modal-hd .ai-mascot-letter {
    font-size: 1.1rem;
  }
  .ai-3d-signboard-html.modal-hd .ai-3d-extruded-title {
    font-size: 1rem;
    letter-spacing: 1px;
  }
  .ai-3d-signboard-html.modal-hd .ai-3d-sub-caption {
    font-size: 0.48rem;
  }
}

/* LIVE STEP DRAFTING PROGRESSION OVERLAY (INSIDE THE BOX!) */
.ai-stage-draft-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 18, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.ai-stage-draft-card {
  width: 90%;
  max-width: 320px;
  background: rgba(12, 16, 36, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 18px rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-draft-icon-wrap {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.ai-draft-info-col {
  flex: 1;
  min-width: 0;
}
.ai-draft-title-line {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  color: #67e8f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-draft-sub-line {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-draft-track-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.ai-draft-fill-bar {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #a855f7, #38bdf8);
  border-radius: 99px;
  width: 30%;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}
.ai-draft-pct-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: #38bdf8;
  min-width: 38px;
  text-align: right;
}

/* Ready State Pill Inside Stage */
.ai-stage-ready-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #6ee7b7;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeMsg 0.3s ease-out;
}
.ai-stage-zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(10, 6, 24, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #67e8f9;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 6;
  opacity: 0.85;
}
.ai-3d-stage:hover .ai-stage-zoom-hint {
  opacity: 1;
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.7);
  color: #ffffff;
}

/* Palette Swatches Row (Matching Palette Box) */
.ai-mockup-swatch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 10px;
  background: rgba(6, 3, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.ai-mockup-swatch-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-mockup-swatch-chips {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.ai-mockup-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-size: 0.65rem;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-mockup-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.5);
}
.ai-mockup-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 4px currentColor;
}

/* Designer Handoff Disclaimer Card */
.ai-mockup-note-card {
  margin-top: 8px;
  padding: 9px 12px;
  background: rgba(12, 7, 28, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  font-size: 0.68rem;
  color: #cbd5e1;
  line-height: 1.45;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.ai-mockup-note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #a855f7, #06b6d4);
}
.ai-mockup-note-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #67e8f9;
  font-weight: 700;
  font-size: 0.72rem;
  margin-bottom: 2px;
}

.ai-neon-typo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: 0.8px;
  animation: neonTypoShimmer 2.4s ease-in-out infinite alternate;
}
@keyframes neonTypoShimmer {
  0% {
    filter: drop-shadow(0 0 2px currentColor);
    opacity: 0.9;
  }
  100% {
    filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 14px currentColor);
    opacity: 1;
  }
}
.ai-wireframe-zone {
  stroke-dasharray: 4, 3;
  animation: wireframeMarch 12s linear infinite;
}
@keyframes wireframeMarch {
  to {
    stroke-dashoffset: -40;
  }
}
.ai-mockup-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f1f5f9;
  display: block;
}
.ai-mockup-desc {
  font-size: 0.62rem;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}
.ai-mockup-note-card {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(12, 7, 28, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.ai-mockup-note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #a855f7, #06b6d4);
}
.ai-note-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #67e8f9;
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 3px;
}

/* =========================================
   INTERACTIVE BLUEPRINT LIGHTBOX MODAL
   ========================================= */
.ai-blueprint-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.ai-blueprint-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 1, 10, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeModalIn 0.25s ease-out;
}
.ai-blueprint-dialog {
  position: relative;
  z-index: 100051;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  background: linear-gradient(135deg, #090518, #050d1a);
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleModalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeModalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.ai-blueprint-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 4, 22, 0.7);
}
.ai-blueprint-dialog-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-blueprint-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #67e8f9;
  font-size: 1.25rem;
}
.ai-blueprint-dialog-title h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.5px;
}
.ai-blueprint-header-sub {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.ai-cad-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67e8f9;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-industry-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  border-radius: 5px;
}
.ai-blueprint-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}
.ai-blueprint-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  transform: scale(1.05);
}

.ai-blueprint-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(4, 2, 12, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}
.ai-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ai-tab-btn:hover {
  background: rgba(6, 182, 212, 0.1);
  color: #e2e8f0;
}
.ai-tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(168, 85, 247, 0.22));
  border-color: rgba(6, 182, 212, 0.6);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.ai-blueprint-canvas-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #07091a 0%, #03040c 100%);
}
.ai-blueprint-viewport-inner {
  width: 100%;
  max-width: 800px;
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: #060814;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(6, 182, 212, 0.05);
  position: relative;
}

.ai-blueprint-dialog-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 4, 22, 0.75);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.ai-blueprint-specs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ai-specs-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-blueprint-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.ai-modal-swatch {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.68rem;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-modal-swatch:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
}
.ai-modal-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 4px currentColor;
}
.ai-blueprint-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.ai-blueprint-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  color: #ffffff;
}

/* =========================================
   VISUAL BRAND COLOR PALETTE WIDGET
   ========================================= */
.ai-palette-box {
  background: linear-gradient(135deg, rgba(20, 12, 40, 0.88), rgba(9, 20, 38, 0.88));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 15px rgba(168, 85, 247, 0.15);
  animation: fadeMsg 0.35s ease-out;
}
.ai-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.ai-palette-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ai-palette-title i {
  color: #a855f7;
}
.ai-palette-title strong {
  color: #67e8f9;
}
.ai-palette-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ai-palette-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 12px;
}
.ai-palette-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 8px;
}
.ai-swatch-item {
  background: rgba(18, 22, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}
.ai-swatch-item:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.ai-swatch-color {
  height: 46px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.25);
}
.ai-swatch-color::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}
.ai-swatch-copy-hint {
  opacity: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-swatch-item:hover .ai-swatch-copy-hint {
  opacity: 1;
}
.ai-swatch-info {
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.ai-swatch-hex {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.4px;
}
.ai-swatch-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-swatch-role {
  font-size: 0.62rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline Color Chip in Chat Messages */
.ai-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 1px 7px 1px 5px;
  margin: 0 3px;
  cursor: pointer;
  vertical-align: middle;
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 0.82em;
  font-weight: 600;
  color: #38bdf8;
  transition: all 0.2s;
  user-select: all;
}
.ai-color-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #06b6d4;
  transform: translateY(-1px);
}
.ai-color-preview {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  flex-shrink: 0;
}

/* =========================================
   CONSULTATION SUMMARY CARD (.md Download + CS Escalation)
   ========================================= */
.ai-summary-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 18px;
  padding: 16px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: fadeMsg 0.35s ease-out;
}
.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e2e8f0;
  font-size: 0.88rem;
}
.ai-summary-header i {
  color: #67e8f9;
  font-size: 1.4rem;
}
.ai-summary-header small {
  display: block;
  color: #94a3b8;
  font-size: 0.73rem;
  margin-top: 2px;
}
.ai-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-summary-btn-row {
  display: flex;
  gap: 8px;
}
.ai-btn-download-md {
  flex: 1;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: 0.2s;
  font-family: 'Poppins', sans-serif;
}
.ai-btn-download-md:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.45);
}
.ai-btn-copy-md {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.2s;
  font-family: 'Poppins', sans-serif;
}
.ai-btn-copy-md:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.ai-btn-cs-wa {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: 0.2s;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}
.ai-btn-cs-wa:hover {
  background: #22bf5b;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: #fff;
}

/* Typing Indicator */
.ai-typing {
  display: none;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(168, 85, 247, 0.28);
  padding: 12px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}
.ai-typing.show {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06b6d4;
  animation: aiDotPulse 1.4s infinite;
}
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDotPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* Chat Footer (Auto-Expanding Input Area) */
.ai-chat-footer {
  padding: 10px 14px 12px;
  background: rgba(6, 2, 18, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ai-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 7px 8px 7px 14px;
  transition: all 0.2s ease;
}
.ai-input-wrap:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}
.ai-input-wrap textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.45;
  outline: none;
  font-family: 'Poppins', sans-serif;
  resize: none;
  min-height: 22px;
  max-height: 120px;
  height: 22px;
  padding: 3px 0;
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}
.ai-input-wrap textarea::-webkit-scrollbar {
  width: 4px;
}
.ai-input-wrap textarea::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}
.ai-input-wrap textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.ai-btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
  flex-shrink: 0;
  font-size: 0.92rem;
  margin-bottom: 1px;
}
.ai-btn-send:hover {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.65);
}
.ai-btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* CS Escalation Footer Hint */
.ai-footer-cs-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.72rem;
  color: #94a3b8;
}
.ai-footer-cs-hint a {
  color: #25d366;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: 0.2s;
}
.ai-footer-cs-hint a:hover {
  color: #4ade80;
  text-decoration: underline;
}

/* Finished Session Action Bar */
.ai-chat-footer-ended {
  padding: 12px 16px;
  background: rgba(14, 9, 32, 0.98);
  border-top: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: modalFadeIn 0.25s ease-out;
}
.ai-ended-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 6px 12px;
}
.ai-ended-banner i {
  color: #34d399;
}
.ai-ended-actions {
  display: flex;
  gap: 8px;
}
.ai-ended-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}
.ai-ended-btn.resume {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
}
.ai-ended-btn.resume:hover {
  background: rgba(168, 85, 247, 0.35);
  color: #fff;
  transform: translateY(-1px);
}
.ai-ended-btn.download {
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  color: #fff;
  box-shadow: 0 3px 12px rgba(6, 182, 212, 0.4);
}
.ai-ended-btn.download:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(6, 182, 212, 0.6);
}
.ai-ended-btn.reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
}
.ai-ended-btn.reset:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Scroll To Bottom Floating Button */
.ai-scroll-bottom-btn {
  position: absolute;
  bottom: 95px;
  right: 20px;
  background: rgba(15, 10, 35, 0.92);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.74rem;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 10;
  transition: 0.2s;
}
.ai-scroll-bottom-btn.show {
  display: inline-flex;
}
.ai-welcome-screen:not([style*="display: none"]) ~ .ai-scroll-bottom-btn {
  display: none !important;
}
.ai-scroll-bottom-btn:hover {
  background: rgba(6, 182, 212, 0.2);
}

/* =========================================
   MODERN IN-APP CONFIRMATION & ALERT MODAL
   ========================================= */
.ai-custom-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 2, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: modalFadeIn 0.22s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ai-custom-modal-card {
  background: linear-gradient(135deg, rgba(22, 12, 46, 0.98), rgba(10, 18, 38, 0.98));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 20px;
  padding: 22px 20px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.3);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.ai-custom-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin: 0 auto 12px;
}
.ai-custom-modal-card h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.98rem;
  color: #fff;
  margin: 0 0 8px;
}
.ai-custom-modal-card p {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 18px;
}
.ai-custom-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.ai-modal-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}
.ai-modal-btn.cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
}
.ai-modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.ai-modal-btn.confirm {
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}
.ai-modal-btn.confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.55);
}

/* =========================================
   100% RESPONSIVE ADAPTATION (MOBILE & TABLET)
   (FIXED: TIDAK FULLSCREEN AGAR TIDAK NGEBUG)
   ========================================= */
@media (max-width: 768px) {
  .ai-chat-window {
    position: fixed !important;
    inset: auto !important;
    bottom: 12px !important;
    left: 8px !important;
    right: 8px !important;
    width: calc(100vw - 16px) !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    height: min(620px, calc(100dvh - 24px)) !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 35px rgba(168, 85, 247, 0.3) !important;
    z-index: 9999 !important;
    transform: translateY(20px) scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
  }
  .ai-chat-window.open {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .ai-badge-hint {
    bottom: 22px !important;
    right: 74px !important;
    padding: 6px 12px !important;
    font-size: 0.74rem !important;
  }
  .to-top {
    right: 16px !important;
    left: auto !important;
    bottom: 74px !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 1.05rem !important;
  }
  .ai-float-btn {
    bottom: 16px !important;
    right: 16px !important;
    width: 52px !important;
    height: 52px !important;
  }
  .ai-float-logo {
    width: 30px !important;
    height: 30px !important;
  }
  .ai-chat-header {
    padding: 12px 14px;
  }
  .ai-chat-body {
    padding: 12px 14px;
    gap: 12px;
  }
  .ai-msg {
    max-width: 92%;
    font-size: 0.88rem;
  }
  .ai-bubble {
    padding: 11px 15px;
    border-radius: 16px;
  }
  .ai-chat-footer {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .ai-studio-viewport {
    height: 180px;
  }
}
