/* ── Mobile viewport and overflow guards ── */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (height: 100dvh) {
  html, body { height: 100dvh !important; }
}

/* Keep the accessibility shortcut in the viewport without affecting layout width. */
.skip-link {
  position: fixed;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 10000;
  padding: 8px 16px;
  border-radius: 8px;
  background: #3B82F6;
  color: #fff;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ── Space for floating button at page bottom ── */
.content { padding-bottom: 100px !important; }

/* ── CRITICAL: body-level footer breaks RTL flex layout — hide it ── */
body > footer { display: none !important; }

/* ── Tablet layout fix: ensure main fills full width ── */
@media (max-width: 1024px) {
  .main { width: 100%; min-width: 0; flex: 1; }
  .content { min-width: 0; overflow-y: auto; }
}

/* Android "Desktop site" keeps a wide layout viewport. Use the physical
   touch-device width as a second signal so the app still renders as mobile. */
@media (pointer: coarse) and (max-device-width: 820px) {
  body { overflow: hidden; }
  .sidebar {
    position: fixed !important;
    right: 0;
    top: 0;
    transform: translateX(calc(var(--sidebar-w, 256px) + 10px)) !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.14);
  }
  .sidebar.open { transform: translateX(0) !important; }
  .overlay {
    display: block !important;
    opacity: 0;
    pointer-events: none;
  }
  .overlay.visible { opacity: 1; pointer-events: auto; }
  .hamburger { display: flex !important; }
  .main { width: 100%; flex-basis: 100%; }
  .content { padding: 16px !important; }
  .topbar-user-role { display: none !important; }
  .search-wrap { max-width: 220px !important; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .bottom-grid,
  .brief-grid,
  .analytics-grid,
  .settings-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .ai-banner { flex-direction: column; align-items: flex-start; }
  .ai-actions { width: 100%; }
}

@media (pointer: coarse) and (max-device-width: 480px) {
  .content { padding: 12px !important; }
  .search-wrap { max-width: 160px !important; }
  .topbar-divider,
  .topbar-user-name { display: none !important; }
}

/* ═══════════════════════════════════════════
   DANA FLOATING ACTION BUTTON
═══════════════════════════════════════════ */
.va-dock {
  position: fixed;
  bottom: 28px;
  right: 88px;
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: 50%;
  border: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 9000;
  background: radial-gradient(circle at 50% 45%, #0E1B3D 0%, #0B1730 60%, #0A1428 100%);
  transition: transform 0.24s cubic-bezier(0.34,1.56,0.64,1);
}
.va-dock:active { cursor: grabbing; }
.va-dock:hover { transform: scale(1.07) translateY(-3px); }
.va-dock:active { transform: scale(0.95); }

/* soft outer glow halo */
.va-dock::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(56,134,255,0.55), transparent 70%);
  z-index: -1;
  filter: blur(5px);
  animation: va-breathe 3.8s ease-in-out infinite;
}
@keyframes va-breathe {
  0%, 100% { opacity: 0.45; transform: scale(0.95); }
  50%      { opacity: 0.85; transform: scale(1.08); }
}

/* glowing rotating rim — ported from the AI Loader (vanilla CSS) */
.va-dana-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  animation: va-loader-circle 5s linear infinite;
}
@keyframes va-loader-circle {
  0% {
    transform: rotate(90deg);
    box-shadow: 0 3px 7px 0 #38bdf8 inset, 0 7px 10px 0 #005dff inset, 0 20px 20px 0 #1e40af inset,
      0 0 3px 1px rgba(56,189,248,0.4), 0 0 9px 2px rgba(0,93,255,0.3);
  }
  50% {
    transform: rotate(270deg);
    box-shadow: 0 3px 7px 0 #60a5fa inset, 0 7px 4px 0 #0284c7 inset, 0 14px 20px 0 #005dff inset,
      0 0 3px 1px rgba(56,189,248,0.4), 0 0 9px 2px rgba(0,93,255,0.3);
  }
  100% {
    transform: rotate(450deg);
    box-shadow: 0 3px 7px 0 #4dc8fd inset, 0 7px 10px 0 #005dff inset, 0 20px 20px 0 #1e40af inset,
      0 0 3px 1px rgba(56,189,248,0.4), 0 0 9px 2px rgba(0,93,255,0.3);
  }
}

/* "Dana" letters — sequential pulse */
/* AI sparkle in the center — gentle twinkle, ring keeps spinning around it */
.va-dock-icon {
  width: 24px;
  height: 24px;
  fill: #fff;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(140,190,255,0.6));
  animation: va-spark-twinkle 3s ease-in-out infinite;
}
@keyframes va-spark-twinkle {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
.va-dock.va-listening .va-dock-icon { display: none; }

@keyframes va-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Listening: bright blue border ── */
.va-dock.va-listening::before {
  background: radial-gradient(closest-side, rgba(56,189,248,0.9), transparent 70%);
  animation: va-breathe 1.2s ease-in-out infinite;
  opacity: 1;
}
.va-dock.va-listening { animation: va-listen-pulse 1.4s ease-out infinite; }
@keyframes va-listen-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(56,189,248,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(56,189,248,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); }
}

/* ── Processing: amber spin ── */
.va-dock.va-processing::before {
  background: conic-gradient(from 0deg, #F59E0B, #FCD34D, #F59E0B);
  animation: va-spin 0.7s linear infinite;
  opacity: 1;
}
.va-dock.va-processing .va-dock-icon { opacity: 0.5; }

/* ── Speaking: green pulse ── */
.va-dock.va-speaking::before {
  background: conic-gradient(from 0deg, #22C55E, #86EFAC, #22C55E);
  animation: va-spin 1.2s linear infinite;
  opacity: 1;
}
.va-dock.va-speaking { animation: va-speak-throb 0.65s ease-in-out infinite alternate; }
@keyframes va-speak-throb {
  from { transform: scale(1); }
  to   { transform: scale(1.05) translateY(-1px); }
}

/* Waveform bars — replaces icon during listening */
.va-dock .va-waves {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  position: relative;
  z-index: 2;
}
.va-dock.va-listening .va-waves { display: flex; }
.va-dock.va-listening .va-dock-icon { display: none; }
.va-dock .va-waves span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--white);
  animation: va-wave 0.8s ease-in-out infinite alternate;
}
.va-dock .va-waves span:nth-child(1) { height: 7px;  animation-delay: 0s; }
.va-dock .va-waves span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.va-dock .va-waves span:nth-child(3) { height: 11px; animation-delay: 0.2s; }
.va-dock .va-waves span:nth-child(4) { height: 18px; animation-delay: 0.05s; }
.va-dock .va-waves span:nth-child(5) { height: 7px;  animation-delay: 0.15s; }
@keyframes va-wave {
  from { transform: scaleY(0.35); opacity: 0.65; }
  to   { transform: scaleY(1);    opacity: 1; }
}

/* ═══════════════════════════════════════════
   PANEL — Glassmorphism dark card
═══════════════════════════════════════════ */
.va-panel {
  position: fixed;
  bottom: 100px;
  right: 16px;
  width: 320px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.1);
  z-index: 9001;
  direction: rtl;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
  font-family: 'Assistant', sans-serif;
}
.va-panel:not(.va-open),
.va-panel:not(.va-open) * {
  pointer-events: none !important;
}
.va-panel.va-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ── Panel Header ── */
.va-panel-header {
  padding: 13px 16px 11px;
  background: linear-gradient(135deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.95) 100%);
  color: #60A5FA;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-transform: uppercase;
}
.va-panel-header span {
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Animated dot next to name */
.va-panel-header::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px #22C55E;
  margin-right: auto;
  animation: va-dot-blink 2s ease-in-out infinite;
}
@keyframes va-dot-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.va-settings-btn {
  background: none;
  border: none;
  color: #334155;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 5px;
  border-radius: 5px;
  line-height: 1;
  transition: color 0.14s;
  margin-right: 0;
  margin-left: 0;
}
.va-settings-btn:hover { color: #64748B; }

/* ── Transcript ── */
.va-transcript {
  padding: 14px 16px 10px;
  min-height: 44px;
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  direction: rtl;
}
.va-transcript.va-interim { color: #475569; font-style: italic; }
.va-transcript:empty::before {
  content: 'מקשיבה...';
  color: #1E293B;
  font-style: italic;
}

/* ── Response ── */
.va-response {
  padding: 12px 16px;
  font-size: 13.5px;
  color: #E2E8F0;
  font-weight: 500;
  background: transparent;
  min-height: 36px;
  line-height: 1.6;
  direction: rtl;
  max-height: 200px;
  overflow-y: auto;
}
.va-response:empty { display: none; }

/* Typing indicator (processing) */
.va-response:has(.va-typing) {
  display: flex;
  align-items: center;
}
.va-typing { display: flex; gap: 5px; padding: 4px 0; }
.va-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3B82F6;
  animation: va-typing-bounce 1s ease-in-out infinite;
}
.va-typing span:nth-child(2) { animation-delay: 0.15s; }
.va-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes va-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-6px); opacity: 1; }
}

/* ── Email / event preview inside panel ── */
.va-email-preview {
  padding: 9px 12px;
  background: rgba(30,41,59,0.8);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 10px;
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.6;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  direction: rtl;
}
.va-confirm-question {
  font-size: 13px;
  font-weight: 700;
  color: #60A5FA;
  text-align: center;
  padding: 4px 0 6px;
  direction: rtl;
}

/* ── Confirm buttons ── */
.va-confirm-area {
  padding: 8px 12px 12px;
  display: none;
  gap: 8px;
}
.va-btn-yes {
  flex: 1;
  padding: 10px 14px;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  font-size: 13px;
  transition: opacity 0.14s, transform 0.14s;
  direction: rtl;
  box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}
.va-btn-yes:hover  { opacity: 0.9; transform: translateY(-1px); }
.va-btn-yes:active { transform: translateY(0); }
.va-btn-no {
  flex: 1;
  padding: 10px 14px;
  background: rgba(30,41,59,0.8);
  color: #64748B;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Assistant', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.14s, color 0.14s;
  direction: rtl;
}
.va-btn-no:hover { background: rgba(51,65,85,0.8); color: #94A3B8; }

/* ── Settings Panel ── */
.va-settings-panel {
  display: none;
  padding: 12px 14px 10px;
  background: rgba(15,23,42,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  direction: rtl;
}
.va-settings-panel.va-settings-open { display: block; }
.va-settings-row { margin-bottom: 9px; }
.va-settings-row label {
  display: block;
  font-size: 10.5px;
  color: #475569;
  margin-bottom: 4px;
  font-family: 'Assistant', sans-serif;
  letter-spacing: 0.03em;
}
.va-settings-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  background: rgba(30,41,59,0.9);
  color: #94A3B8;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  outline: none;
  transition: border-color 0.14s;
}
.va-settings-row input:focus { border-color: #3B82F6; color: #E2E8F0; }
.va-settings-row input::placeholder { color: #1E293B; }
.va-settings-clear-chat-btn {
  width: 100%;
  padding: 9px;
  background: rgba(30,41,59,0.82);
  color: #CBD5E1;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 8px;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.va-settings-clear-chat-btn:hover {
  background: rgba(51,65,85,0.9);
  border-color: rgba(148,163,184,0.3);
  color: #F8FAFC;
}
.va-settings-save-btn {
  width: 100%;
  padding: 9px;
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Assistant', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin-top: 4px;
  transition: opacity 0.14s;
  box-shadow: 0 4px 12px rgba(29,78,216,0.3);
}
.va-settings-save-btn:hover { opacity: 0.88; }
.va-settings-status {
  margin-top: 7px;
  font-size: 11px;
  color: #22C55E;
  text-align: center;
  font-family: 'Assistant', sans-serif;
  min-height: 16px;
  direction: rtl;
}

/* ── Input Row ── */
.va-input-row {
  padding: 10px 10px 12px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.va-text-input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: 'Assistant', sans-serif;
  font-size: 13px;
  outline: none;
  direction: rtl;
  color: #E2E8F0;
  background: rgba(30,41,59,0.8);
  transition: border-color 0.14s;
}
.va-text-input::placeholder { color: #334155; }
.va-text-input:focus { border-color: rgba(59,130,246,0.5); }
.va-send-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.14s, transform 0.14s;
  box-shadow: 0 4px 10px rgba(59,130,246,0.3);
}
.va-send-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.va-send-btn:active { transform: translateY(0); }
.va-send-btn svg { width: 15px; height: 15px; fill: white; }

@media (max-width: 480px), (pointer: coarse) and (max-device-width: 480px) {
  .va-dock {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
  }
  .va-panel {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: calc(100vw - 32px);
    max-height: min(58dvh, 430px);
    overflow-y: auto;
    border-radius: 18px;
  }
  .va-panel-header { padding: 11px 14px 9px; }
  .va-transcript { min-height: 38px; padding: 10px 14px 8px; }
  .va-response { max-height: 110px; padding: 10px 14px; }
  .va-input-row { padding: 8px 8px 10px; }
}

/* ============================================================
   DANA VOICE-FIRST EXPERIENCE
   ============================================================ */
.content { padding-bottom: 24px !important; }
.va-dock.va-dock-hidden { display: none !important; }
body.va-assistant-open { overflow: hidden !important; }

.va-voice-setup {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 18%, rgba(59, 130, 246, 0.24), transparent 34%),
    linear-gradient(155deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  direction: rtl;
}
.va-voice-setup.va-setup-open {
  opacity: 1;
  pointer-events: auto;
}
.va-setup-card {
  width: min(100%, 420px);
  padding: 34px 26px 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.7));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #F8FAFC;
}
.va-setup-orb {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #FFFFFF 0 2%, transparent 12%),
    radial-gradient(circle at 38% 35%, #7DD3FC 0 10%, transparent 34%),
    conic-gradient(from 200deg, #2563EB, #3B82F6, #22D3EE, #4F46E5, #2563EB);
  box-shadow: 0 0 35px rgba(96, 165, 250, 0.55), 0 0 75px rgba(37, 99, 235, 0.28);
  animation: va-setup-float 3.4s ease-in-out infinite;
}
.va-setup-orb span {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 50%;
  animation: va-orbit-pulse 2.4s ease-out infinite;
}
.va-setup-orb span:nth-child(2) { inset: -25px; animation-delay: 0.7s; }
.va-setup-orb span:nth-child(3) { inset: -39px; animation-delay: 1.4s; }
.va-setup-kicker {
  color: #60A5FA;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.va-setup-card h2 {
  margin: 9px 0 10px;
  font-family: 'Assistant', sans-serif;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.1;
}
.va-setup-card p {
  margin: 0 auto 24px;
  max-width: 330px;
  color: #CBD5E1;
  font-size: 15px;
  line-height: 1.65;
}
.va-setup-enable,
.va-setup-later {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-family: 'Assistant', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.va-setup-enable {
  color: #FFFFFF;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}
.va-setup-enable:disabled { opacity: 0.58; cursor: wait; }
.va-setup-later { margin-top: 8px; color: #94A3B8; background: transparent; }
.va-setup-note { margin-top: 14px; color: #64748B; font-size: 11px; }

.va-panel {
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 38%, rgba(37, 99, 235, 0.23), transparent 27%),
    radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.14), transparent 30%),
    linear-gradient(155deg, #020617 0%, #0B1120 48%, #111827 100%);
  transform: scale(1.035);
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.va-panel::before,
.va-panel::after {
  content: '';
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  pointer-events: none;
}
.va-panel::before { top: -35vmax; right: -20vmax; background: #2563EB; }
.va-panel::after { bottom: -42vmax; left: -18vmax; background: #22D3EE; }
.va-panel.va-open { transform: scale(1); }

.va-panel-header {
  position: relative;
  z-index: 4;
  min-height: 68px;
  padding: max(16px, env(safe-area-inset-top)) 20px 12px;
  border: 0;
  background: transparent;
  justify-content: space-between;
  text-transform: none;
}
.va-brand,
.va-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.va-brand span:not(.va-brand-dot) { color: #F8FAFC; font-size: 17px; font-weight: 800; }
.va-brand small { color: #64748B; font-size: 9px; font-weight: 800; letter-spacing: 0.15em; }
.va-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.9);
}
.va-panel-header::after { display: none; }
.va-settings-btn,
.va-mute-btn,
.va-continuous-btn,
.va-stop-btn,
.va-close-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 50%;
  color: #94A3B8;
  background: rgba(15, 23, 42, 0.56);
  font-size: 18px;
}
.va-stop-btn,
.va-mute-btn,
.va-continuous-btn {
  width: auto;
  min-width: 44px;
  padding: 0 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}
.va-stop-btn {
  min-width: 54px;
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.28);
}
.va-stop-btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.va-mute-btn.va-muted {
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.28);
  text-decoration: line-through;
}
.va-continuous-btn.va-continuous-active {
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(6, 78, 59, 0.35);
}
.va-close-btn { cursor: pointer; font-size: 25px; line-height: 1; }

.va-settings-panel {
  position: absolute;
  z-index: 8;
  top: 70px;
  right: 18px;
  left: 18px;
  max-width: 430px;
  margin-right: auto;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
}

.va-stage {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 24px 6px;
  text-align: center;
}
.va-orb-button {
  position: relative;
  width: min(38vw, 160px);
  height: min(38vw, 160px);
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}
.va-orb-core {
  position: absolute;
  inset: 18%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #14254E 0%, #0C1A38 56%, #0A1428 100%);
  box-shadow:
    0 0 40px rgba(59, 130, 246, 0.4),
    0 0 84px rgba(37, 99, 235, 0.22);
  animation: va-orb-breathe 3.2s ease-in-out infinite;
}
/* glowing rotating rim — same loader idea as the FAB, scaled up, app colors */
.va-orb-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: va-orb-loader 5s linear infinite;
}
@keyframes va-orb-loader {
  0% {
    transform: rotate(90deg);
    box-shadow: 0 7px 16px 0 #38bdf8 inset, 0 16px 26px 0 #005dff inset, 0 46px 46px 0 #1e40af inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow: 0 7px 16px 0 #60a5fa inset, 0 16px 10px 0 #0284c7 inset, 0 32px 46px 0 #005dff inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow: 0 7px 16px 0 #4dc8fd inset, 0 16px 26px 0 #005dff inset, 0 46px 46px 0 #1e40af inset;
  }
}
.va-orb-halo {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(96, 165, 250, 0.2);
  opacity: 0.65;
}
.va-orb-halo-one { inset: 8%; animation: va-halo-drift 4s ease-in-out infinite; }
.va-orb-halo-two { inset: 1%; animation: va-halo-drift 4.8s ease-in-out -1.2s infinite reverse; }
.va-orb-wave {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  opacity: 0.62;
}
.va-orb-wave i {
  width: 4px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #E6F4FF, #7DD3FC);
  box-shadow: 0 0 7px rgba(125, 211, 252, 0.65);
  animation: va-wave 0.7s ease-in-out infinite alternate;
}
.va-orb-wave i:nth-child(2),
.va-orb-wave i:nth-child(6) { height: 24px; animation-delay: 0.08s; }
.va-orb-wave i:nth-child(3),
.va-orb-wave i:nth-child(5) { height: 34px; animation-delay: 0.16s; }
.va-orb-wave i:nth-child(4) { height: 42px; animation-delay: 0.24s; }
.va-panel.va-listening .va-orb-wave { opacity: 1; }
.va-panel.va-listening .va-orb-core {
  animation: va-listening-orb 1.1s ease-in-out infinite alternate;
  box-shadow: 0 0 55px rgba(56, 189, 248, 0.7), 0 0 110px rgba(37, 99, 235, 0.4);
}
.va-panel.va-processing .va-orb-wave { opacity: 0.85; }
.va-panel.va-processing .va-orb-core {
  box-shadow: 0 0 52px rgba(99, 102, 241, 0.6), 0 0 110px rgba(37, 99, 235, 0.32);
}
.va-panel.va-processing .va-orb-glow { animation-duration: 2.4s; }
.va-panel.va-speaking .va-orb-wave { opacity: 1; }
.va-panel.va-speaking .va-orb-core {
  box-shadow: 0 0 55px rgba(59, 130, 246, 0.65), 0 0 110px rgba(37, 99, 235, 0.4);
  animation: va-speaking-orb 0.7s ease-in-out infinite alternate;
}
.va-state-label {
  margin-top: 12px;
  color: #93C5FD;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.va-transcript {
  min-height: 28px;
  max-width: 720px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  color: #94A3B8;
  font-size: clamp(15px, 4vw, 20px);
  line-height: 1.45;
}
.va-transcript:empty::before { content: ''; }
.va-transcript.va-interim { color: #CBD5E1; }
.va-response {
  width: min(100%, 720px);
  max-height: 26vh;
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  color: #F8FAFC;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 650;
  line-height: 1.35;
  background: transparent;
}
.va-response:empty { display: block; }

.va-chat-log {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.va-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: clamp(14px, 4vw, 17px);
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
  text-align: right;
}
.va-bubble-user {
  align-self: flex-end;
  background: #2563EB;
  color: #F8FAFC;
  border-bottom-right-radius: 4px;
}
.va-bubble-dana {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #F8FAFC;
  border-bottom-left-radius: 4px;
}
.va-bubble-rich {
  width: min(94%, 560px);
  max-width: 94%;
}
.va-bubble-rich .va-email-preview {
  margin: 0 0 8px;
  background: rgba(15, 23, 42, 0.55);
}
.va-bubble-typing {
  padding: 14px 16px;
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
}
.va-bubble-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94A3B8;
  animation: va-typing-bounce 1s ease-in-out infinite;
}
.va-bubble-typing span:nth-child(2) { animation-delay: 0.15s; }
.va-bubble-typing span:nth-child(3) { animation-delay: 0.30s; }

.va-conversation-dock {
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
  padding: 6px 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.97) 28%);
}
.va-confirm-area {
  width: 100%;
  padding: 0 0 10px;
}
.va-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 19px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.va-text-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #F8FAFC;
  font-size: 14px;
}
.va-text-input::placeholder { color: #64748B; }
.va-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

@keyframes va-setup-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.035); }
}
@keyframes va-orbit-pulse {
  0% { transform: scale(0.86); opacity: 0; }
  35% { opacity: 0.55; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes va-orb-breathe {
  0%, 100% { transform: scale(0.97); }
  50% { transform: scale(1.04); }
}
@keyframes va-halo-drift {
  0%, 100% { transform: scale(0.95) rotate(0deg); opacity: 0.32; }
  50% { transform: scale(1.05) rotate(12deg); opacity: 0.75; }
}
@keyframes va-listening-orb {
  from { transform: scale(0.96); }
  to { transform: scale(1.08); }
}
@keyframes va-processing-orb {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1); }
}
@keyframes va-speaking-orb {
  from { transform: scale(0.94); }
  to { transform: scale(1.09); }
}

@media (min-width: 760px) {
  .va-panel {
    inset: 3vh 3vw !important;
    width: 94vw !important;
    height: 94vh !important;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .va-setup-orb,
  .va-setup-orb span,
  .va-orb-core,
  .va-orb-glow,
  .va-orb-halo,
  .va-orb-wave i {
    animation: none !important;
  }
}
