/* =========================================================
   SplitLogiX Chat - Clean Premium CSS
   Built for the provided index.php structure.
   Focus: stable chat scrolling + premium white/purple/gold/blue theme.
========================================================= */

:root {
  --bg: #fbf8ff;
  --bg-warm: #fff8df;
  --surface: rgba(255,255,255,.78);
  --surface-strong: rgba(255,255,255,.92);
  --surface-soft: rgba(255,255,255,.58);

  --border: rgba(124,58,237,.16);
  --border-strong: rgba(124,58,237,.30);

  --text: #100b2a;
  --muted: #746b91;

  --primary: #7c3aed;
  --primary-2: #a855f7;
  --blue: #3b82f6;
  --gold: #facc15;
  --danger: #ff6b6b;

  --human: linear-gradient(135deg, #6d28d9 0%, #8b35f6 52%, #a855f7 100%);
  --ai: rgba(255,255,255,.86);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;

  --shadow-soft: 0 16px 44px rgba(80, 53, 140, .10);
  --shadow-card: 0 24px 70px rgba(80, 53, 140, .13);
  --shadow-strong: 0 36px 110px rgba(80, 53, 140, .18);

  color-scheme: light;
}

/* =========================================================
   Base
========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(124,58,237,.20), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(250,204,21,.18), transparent 32%),
    radial-gradient(circle at 86% 84%, rgba(59,130,246,.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #faf6ff 45%, #fff8e6 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.muted {
  color: var(--muted);
}

.xs {
  font-size: 11px;
}

/* =========================================================
   Auth / Login
========================================================= */

.auth-body {
  min-height: 100vh;
  padding: 24px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 34px;

  text-align: center;

  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.72));

  border: 1px solid var(--border);
  border-radius: 28px;

  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);

  box-shadow: var(--shadow-strong);
}

.brand {
  margin-bottom: 22px;
}

.brand h1 {
  margin: 14px 0 4px;

  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.055em;
}

.brand-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto;

  display: grid;
  place-items: center;

  border-radius: 15px;

  background:
    linear-gradient(135deg, #7c3aed 0%, #b45cff 45%, #facc15 100%);

  color: #0f0a2a;
  font-size: 22px;
  font-weight: 900;

  box-shadow:
    0 0 36px rgba(124,58,237,.22),
    0 14px 34px rgba(124,58,237,.22);
}

.brand-mark.sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-radius: 11px;
}

.brand-mark.xl {
  width: 76px;
  height: 76px;
  font-size: 30px;
  border-radius: 20px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin: 18px 0 8px;
}

.legal {
  margin-top: 16px;
  font-size: 12px;
}

/* =========================================================
   Buttons
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 16px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--surface-soft);
  color: var(--text);

  font-size: 14px;
  font-weight: 750;
  text-decoration: none;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  border-color: transparent;

  background:
    linear-gradient(135deg, #6d28d9 0%, #8b35f6 52%, #a855f7 100%);

  color: #fff;

  box-shadow:
    0 14px 32px rgba(124,58,237,.28),
    0 0 32px rgba(124,58,237,.14);
}

.btn-primary:hover {
  box-shadow:
    0 18px 42px rgba(124,58,237,.34),
    0 0 38px rgba(124,58,237,.18);
}

.btn-oauth {
  background: #fff;
  color: #1a1a1a;
  border-color: rgba(15,10,42,.08);
}

.btn-oauth:hover {
  background: #f8f8fb;
}

/* =========================================================
   App Layout - keep stable
========================================================= */

.app-body {
  height: 100vh;
  overflow: hidden;

  display: flex;
}

/* =========================================================
   Sidebar
========================================================= */

.sidebar {
  width: 290px;
  flex-shrink: 0;

  display: flex;
  flex-direction: column;

  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.66));

  border-right: 1px solid rgba(124,58,237,.14);

  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);

  box-shadow:
    22px 0 66px rgba(124,58,237,.09),
    inset 1px 0 0 rgba(255,255,255,.74);
}

.sidebar-head {
  padding: 14px;

  display: flex;
  flex-direction: column;
  gap: 12px;

  border-bottom: 1px solid rgba(124,58,237,.12);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-row .brand-mark {
  margin: 0;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.045em;
}

.sessions {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 8px;

  display: flex;
  flex-direction: column;
  gap: 3px;
}

.session {
  min-height: 38px;
  padding: 9px 10px;

  display: flex;
  align-items: center;
  gap: 8px;

  border-radius: 14px;

  color: var(--text);
  font-size: 13px;

  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.session:hover {
  background: rgba(124,58,237,.09);
  transform: translateY(-1px);
}

.session.active {
  background:
    linear-gradient(90deg, rgba(124,58,237,.16), rgba(255,255,255,.62));

  border-left: 3px solid var(--gold);

  box-shadow:
    inset 0 0 0 1px rgba(124,58,237,.07),
    0 10px 28px rgba(124,58,237,.09);
}

.session .title {
  flex: 1;
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  min-width: 36px;
  height: 36px;
  padding: 6px 8px;

  display: inline-grid;
  place-items: center;

  background: rgba(255,255,255,.42);
  border: 1px solid transparent;
  border-radius: 11px;

  color: var(--muted);
  font-size: 14px;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,.72);
  border-color: var(--border);
  transform: translateY(-1px);
}

.session .icon-btn:hover {
  color: var(--danger);
}

.session .icon-btn {
  background: transparent;
  border: none;
  box-shadow: none;
}

.sidebar-foot {
  padding: 12px;

  border-top: 1px solid rgba(124,58,237,.12);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;

  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;

  background:
    linear-gradient(135deg, var(--primary), var(--gold));

  color: #130c2f;
  font-weight: 900;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 13px;
  font-weight: 750;
}

/* =========================================================
   Chat Layout - scroll-safe
========================================================= */

.chat {
  flex: 1;
  min-width: 0;
  height: 100vh;

  display: flex;
  flex-direction: column;

  background:
    linear-gradient(135deg, #faf7ff 0%, #ffffff 48%, #fff9e5 100%);
}

.chat-head {
  flex: 0 0 auto;

  padding: 14px clamp(24px, 4vw, 56px);

  background: rgba(255,255,255,.38);

  border-bottom: 1px solid rgba(124,58,237,.10);

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.chat-head h1 {
  margin: 0;

  color: #100b2a;

  font-size: 22px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.messages {
  position: relative;

  flex: 1;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 0 clamp(24px, 4vw, 56px);

  background:
    radial-gradient(ellipse 70% 36% at 18% 82%, rgba(124,58,237,.13), rgba(124,58,237,.055) 44%, transparent 72%),
    radial-gradient(ellipse 72% 42% at 88% 82%, rgba(250,204,21,.17), rgba(59,130,246,.08) 46%, transparent 74%),
    linear-gradient(135deg, #faf7ff 0%, #ffffff 48%, #fff9e5 100%);
}

.msg-list {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 860px;

  margin: 0 auto;
  padding: 28px 0 120px;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.msg {
  width: 100%;

  display: flex;
}

.msg.ai {
  justify-content: flex-start;
}

.msg.human {
  justify-content: flex-end;
}

.bubble {
  max-width: min(76%, 680px);

  padding: 14px 17px;

  border-radius: 18px;

  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;

  line-height: 1.58;
  font-size: 14.5px;

  box-shadow: 0 14px 34px rgba(80, 53, 140, .075);
}

.msg.ai .bubble {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.76));

  border: 1px solid rgba(124,58,237,.12);
  border-bottom-left-radius: 6px;

  color: var(--text);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.msg.human .bubble {
  background: var(--human);

  border-bottom-right-radius: 6px;

  color: #fff;

  box-shadow:
    0 16px 38px rgba(124,58,237,.25),
    0 0 24px rgba(124,58,237,.10);
}

.bubble.thinking {
  opacity: .7;
  font-style: italic;
}

/* =========================================================
   Empty / Welcome State
========================================================= */

.empty {
  position: relative;
  z-index: 2;

  width: 100%;
  height: 100%;
  min-height: 0;

  margin: 0 auto;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.hero-glow-purple {
  z-index: -1;

  width: 600px;
  height: 260px;

  left: 35%;
  bottom: 120px;

  transform: translateX(-50%) rotate(4deg);

  background:
    radial-gradient(ellipse, rgba(124,58,237,.13), rgba(124,58,237,.06) 42%, transparent 72%);

  filter: blur(8px);
}

.hero-glow-gold {
  z-index: -1;

  width: 620px;
  height: 280px;

  right: -120px;
  bottom: 80px;

  background:
    radial-gradient(ellipse, rgba(250,204,21,.19), rgba(250,204,21,.09) 42%, rgba(59,130,246,.07) 62%, transparent 78%);

  filter: blur(8px);
}

.empty-brand {
  position: relative;
  z-index: 2;

  margin-bottom: 24px;
}

.sparkles {
  position: absolute;
  left: 50%;
  top: -48px;

  width: 500px;
  height: 96px;

  transform: translateX(-50%);

  pointer-events: none;
}

.sparkles span {
  position: absolute;
  font-weight: 900;
}

.sparkles span:nth-child(1) {
  left: 0;
  top: 42px;
  color: var(--primary);
  font-size: 22px;
}

.sparkles span:nth-child(2) {
  left: 140px;
  top: 8px;
  color: var(--blue);
  font-size: 11px;
}

.sparkles span:nth-child(3) {
  right: 124px;
  top: 18px;
  color: var(--gold);
  font-size: 22px;
}

.sparkles span:nth-child(4) {
  right: 0;
  top: 58px;
  color: var(--gold);
  font-size: 12px;
}

.empty-brand .brand-mark.xl {
  width: 76px;
  height: 76px;

  margin: 0 auto 18px;

  border-radius: 20px;

  font-size: 30px;

  box-shadow:
    0 20px 54px rgba(124,58,237,.18),
    0 0 76px rgba(250,204,21,.22);
}

.empty-brand h2 {
  margin: 0 0 8px;

  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;

  font-weight: 900;
  letter-spacing: -.055em;
}

.empty-brand h2 span {
  background:
    linear-gradient(135deg, var(--primary), var(--blue));

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.empty-brand p {
  margin: 0;

  color: var(--muted);

  font-size: 15px;
}

.quick-cards {
  position: relative;
  z-index: 2;

  width: min(600px, 100%);
  max-width: 420px;

  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px;
}

.card {
  height: 156px;
  min-height: 156px;

  padding: 16px 14px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  border-radius: 19px;

  background: rgba(255,255,255,.72);

  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);

  box-shadow: 0 22px 54px rgba(124,58,237,.085);

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 68px rgba(124,58,237,.13);
}

.card-purple {
  border: 1px solid rgba(124,58,237,.52);
}

.card-gold {
  border: 1px solid rgba(250,204,21,.70);
}

.card-blue {
  border: 1px solid rgba(59,130,246,.55);
}

.card-ico {
  width: 42px;
  height: 42px;

  margin-bottom: 11px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  font-size: 23px;
}

.card-purple .card-ico {
  background: rgba(124,58,237,.12);
  color: var(--primary);
}

.card-gold .card-ico {
  background: rgba(250,204,21,.13);
  color: #d4a000;
}

.card-blue .card-ico {
  background: rgba(59,130,246,.12);
  color: var(--blue);
}

.card b {
  font-size: 15px;
  font-weight: 850;
}

.card p {
  margin: 8px 0 0;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.36;
}

/* =========================================================
   Composer
========================================================= */

.composer {
  flex: 0 0 auto;

  padding: 14px clamp(24px, 4vw, 56px);

  display: flex;
  align-items: center;
  gap: 10px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.66), rgba(255,255,255,.84));

  border-top: 1px solid rgba(124,58,237,.12);

  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);

  box-shadow: 0 -18px 50px rgba(124,58,237,.065);
}

.composer input[type="text"] {
  flex: 1;
  min-width: 0;
  min-height: 54px;

  padding: 13px 16px;

  border: 1px solid rgba(124,58,237,.18);
  border-radius: 18px;

  background: rgba(255,255,255,.88);
  color: var(--text);

  font-size: 15px;

  outline: none;

  box-shadow: 0 14px 38px rgba(124,58,237,.085);

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.composer input[type="text"]:focus {
  border-color: rgba(124,58,237,.42);

  background: rgba(255,255,255,.96);

  box-shadow:
    0 0 0 4px rgba(124,58,237,.10),
    0 18px 44px rgba(124,58,237,.12);
}

#voiceBtn.recording {
  color: var(--gold);
  border-color: rgba(250,204,21,.70);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(250,204,21,.14);
  }
}

.file-chips {
  flex: 0 0 auto;

  padding: 0 clamp(24px, 4vw, 56px) 12px;

  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  background: rgba(255,255,255,.78);
}

.chip {
  padding: 4px 10px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;

  font-size: 12px;
}

.chip button {
  background: transparent;
  border: 0;
  color: var(--muted);
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.hero-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

/* =========================================================
   Sidebar Toggle / Mobile
========================================================= */

.sidebar-toggle {
  display: none;

  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;

  width: 38px;
  height: 38px;

  background: rgba(255,255,255,.78);
  border: 1px solid var(--border);
  border-radius: 11px;

  color: var(--text);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@media (max-width: 820px) {
  .app-body,
  .chat {
    height: 100dvh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 24px 0 70px rgba(124,58,237,.12);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: grid;
    place-items: center;
  }

  .chat-head {
    padding-left: 62px;
  }

  .messages,
  .composer,
  .file-chips {
    padding-left: 18px;
    padding-right: 18px;
  }

  .messages {
    padding-bottom: 110px;
  }

  .composer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .empty {
    justify-content: flex-start;
    padding-top: 18px;
    overflow: hidden;
  }

  .empty-brand {
    margin-bottom: 14px;
  }

  .empty-brand .brand-mark.xl {
    width: 52px;
    height: 52px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  .empty-brand h2 {
    font-size: 28px;
  }

  .empty-brand p {
    font-size: 14px;
  }

  .quick-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 10px;
    padding-bottom: 0;
  }

  .card {
    height: auto;
    min-height: 100px;
    padding: 10px;
  }

  .card-ico {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
    font-size: 18px;
  }

  .card b {
    font-size: 14px;
  }

  .card p {
    font-size: 10px;
    margin-top: 6px;
  }

  .sparkles {
    display: none;
  }

  .bubble {
    max-width: 86%;
  }

   .brand-logo {
    width: 36px;
    height: 36px;
  }

  .hero-logo {
    width: 60px;
    height: 60px;
  }
}


/* =========================================================
   Voice Overlay
========================================================= */

.voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  padding: 16px;

  display: grid;
  place-items: center;

  background:
    radial-gradient(circle at 18% 20%, rgba(124,58,237,.24), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(250,204,21,.22), transparent 30%),
    radial-gradient(circle at 80% 86%, rgba(59,130,246,.20), transparent 34%),
    rgba(248,245,255,.64);

  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.voice-panel-pro {
  position: relative;

  width: min(540px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;

  padding: 22px;

  border: 1px solid rgba(124,58,237,.20);
  border-radius: 26px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.76));

  color: var(--text);

  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);

  box-shadow:
    0 44px 120px rgba(124,58,237,.22),
    0 20px 60px rgba(15,10,31,.12),
    inset 0 1px 0 rgba(255,255,255,.75);
}

.voice-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 34px;
  height: 34px;

  background: rgba(255,255,255,.18);
  border: 0;
  border-radius: 999px;

  color: var(--text);
  font-size: 20px;
}

.voice-title-row {
  padding-right: 42px;
  margin-bottom: 18px;

  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-title-icon {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  color: var(--primary-2);
  font-size: 24px;
}

.voice-title-row h2 {
  margin: 0;

  font-size: 24px;
  line-height: 1.1;
}

.voice-title-row p {
  margin: 5px 0 0;

  color: var(--muted);
  font-size: 14px;
}

.voice-mode-cards {
  display: grid;
  gap: 10px;
}

.voice-mode-card {
  width: 100%;

  padding: 14px;

  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 12px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.68));

  border: 1px solid rgba(124,58,237,.18);
  border-radius: 18px;

  color: var(--text);
  text-align: left;

  box-shadow: 0 16px 42px rgba(124,58,237,.08);

  transition:
    transform .2s ease,
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.voice-mode-card:hover {
  transform: translateY(-2px);

  border-color: var(--primary-2);

  box-shadow: 0 22px 52px rgba(124,58,237,.12);
}

.voice-mode-card.active {
  border-color: rgba(124,58,237,.42);

  background:
    linear-gradient(135deg, rgba(124,58,237,.13), rgba(255,255,255,.86), rgba(250,204,21,.12));

  box-shadow:
    0 0 0 1px rgba(124,58,237,.10),
    0 24px 60px rgba(124,58,237,.15);
}

.voice-card-icon {
  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  border-radius: 999px;

  font-size: 22px;
}

.voice-card-icon.tap {
  background: rgba(124,58,237,.18);
}

.voice-card-icon.auto {
  background: rgba(168,85,247,.18);
}

.voice-card-icon.hold {
  background: rgba(250,204,21,.18);
}

.voice-card-copy strong {
  font-size: 16px;
}

.voice-card-copy p {
  margin: 6px 0 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.35;
}

.voice-pill {
  margin-left: 8px;
  padding: 3px 8px;

  display: inline-flex;

  border-radius: 999px;

  background: rgba(34,197,94,.16);
  color: #159947;

  font-size: 10px;
  font-weight: 800;

  vertical-align: middle;
}

.voice-pill.blue {
  background: rgba(124,58,237,.18);
  color: var(--primary-2);
}

.voice-switch {
  justify-self: end;

  position: relative;

  width: 46px;
  height: 26px;

  border-radius: 999px;

  background: rgba(15,10,42,.08);
}

.voice-switch::after {
  content: "";

  position: absolute;
  top: 4px;
  left: 4px;

  width: 18px;
  height: 18px;

  border-radius: 50%;

  background: #fff;

  transition: transform .2s ease;
}

.voice-mode-card.active .voice-switch {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.voice-mode-card.active .voice-switch::after {
  transform: translateX(20px);
}

.voice-info-box {
  color: var(--text);
}

.voice-transcript-pro {
  min-height: auto;
  margin: 14px 0 8px;
  padding: 0;

  background: transparent;
  border: 0;
  box-shadow: none;

  color: var(--text);
  text-align: center;
  font-size: 15px;
}

.voice-big-mic {
  width: 96px;
  height: 96px;
  margin: 12px auto 14px;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 999px;

  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 30%),
    linear-gradient(135deg, #7c3aed 0%, #a855f7 48%, #facc15 100%);

  color: #fff;
  font-size: 38px;

  box-shadow:
    0 0 0 18px rgba(124,58,237,.10),
    0 0 0 38px rgba(124,58,237,.045),
    0 24px 64px rgba(124,58,237,.30);

  overflow: visible;
}



.voice-big-mic span {
  display: block;
  width: auto;
  height: auto;

  background: transparent;
  border: 0;
  box-shadow: none;

  line-height: 1;
  transform: translateY(1px);
}

.voice-big-mic.listening {
  animation: voicePulse 1.2s infinite;
}

@keyframes voicePulse {
  50% {
    box-shadow:
      0 0 0 16px rgba(124,58,237,.12),
      0 20px 52px rgba(124,58,237,.45);
  }
}

.voice-status-pro {
  margin: 0 0 16px;

  color: var(--text);

  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

.voice-close-bottom {
  width: 100%;

  padding: 12px 16px;

  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 0;
  border-radius: 14px;

  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.voice-label {
  display: inline-block;

  margin-bottom: 6px;
  padding: 2px 8px;

  border-radius: 999px;

  background: rgba(124,58,237,.13);
  color: var(--primary-2);

  font-size: 11px;
  font-weight: 800;
}

.voice-select-wrap {
  position: relative;

  margin: 12px 0 14px;

  text-align: left;
}

.voice-select-wrap label {
  display: block;

  margin-bottom: 6px;

  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.voice-select-wrap select {
  width: 100%;

  appearance: none;

  padding: 11px 38px 11px 12px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.68));

  border: 1px solid var(--border);
  border-radius: 14px;

  color: var(--text);
  font-size: 13px;
  font-weight: 700;

  outline: none;
}

.voice-select-wrap::after {
  content: "⌄";

  position: absolute;
  right: 14px;
  bottom: 10px;

  color: var(--muted);
  font-size: 18px;

  pointer-events: none;
}

.voice-select-wrap select:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(124,58,237,.16);
}

.voice-select-wrap select option {
  background: #fff;
  color: var(--text);
}

@media (max-width: 620px) {
  .voice-panel-pro {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .voice-mode-card {
    grid-template-columns: 46px 1fr 46px;
    gap: 10px;
    padding: 12px;
  }

  .voice-card-icon {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }

  .voice-card-copy strong {
    font-size: 15px;
  }

  .voice-card-copy p {
    font-size: 12px;
  }

  .voice-big-mic {
    width: 82px;
    height: 82px;
    font-size: 32px;
  }
}

.user-micro-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(124,58,237,.13);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.58));
  box-shadow: 0 12px 32px rgba(124,58,237,.08);
  text-align: left;
}

.user-micro-card .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.user-email {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chevron {
  margin-left: auto;
  color: var(--primary);
  font-size: 24px;
}

.logout-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(16,11,42,.34);
  backdrop-filter: blur(14px);
}

.logout-modal.hidden {
  display: none;
}

.logout-card {
  width: min(360px, calc(100% - 32px));
  padding: 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  text-align: center;
  box-shadow: 0 30px 90px rgba(80,53,140,.22);
}

.logout-card h3 {
  margin: 0 0 8px;
}

.logout-card p {
  margin: 0;
  color: var(--muted);
}

.logout-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

#voiceMainBtn {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}