:root {
  --neon-blue: #2563eb;
  --neon-purple: #7c3aed;
  --bg-light: #f8fbff;
  --accent-glow: rgba(37, 99, 235, 0.14);
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Geist Var", "Inter", ui-sans-serif, system-ui;
  background: var(--bg-light);
  color: #0f172a;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.12) 0%, transparent 38%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.09) 0%, transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  pointer-events: none;
  z-index: -1;
}

.shell.enterprise {
  width: min(1040px, 96vw);
  margin: 40px auto;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 
    0 20px 48px -20px rgba(37, 99, 235, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  position: relative;
  display: flex;
  flex-direction: column;
}

.enterprise-bar {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand h1 { 
  margin: 0; 
  font-size: 1.75rem; 
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #0f172a, #2563eb);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand p { margin: 2px 0 0; font-size: 0.82rem; color: #334155; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.profile-details {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.86rem;
  color: #334155;
}

.profile-details a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.profile-details a:hover {
  text-decoration: underline;
}

.profile-details span {
  color: #94a3b8;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cost-popover {
  position: relative;
}

.cost-btn {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.cost-tooltip {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, 78vw);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 48px -20px rgba(37, 99, 235, 0.35);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}

.cost-popover:hover .cost-tooltip,
.cost-popover:focus-within .cost-tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cost-tooltip-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.cost-tooltip p {
  margin: 0 0 12px;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cost-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cost-tooltip-metric {
  padding: 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid rgba(37, 99, 235, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cost-tooltip-metric span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.cost-tooltip-metric strong {
  font-size: 1rem;
  color: #0f172a;
}

.cost-tooltip-metric.total {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.08));
}

.voice-toggle {
  font-size: 0.85rem;
  color: #334155;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 99px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.icon-btn {
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: rgba(255, 255, 255, 0.9);
  color: #1e3a8a;
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:hover { 
  background: #eff6ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.prompt-panel {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.prompt-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 16px;
}

.prompt-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.prompt-grid::-webkit-scrollbar { display: none; }

.prompt-chip {
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.chat {
  flex: 1;
  height: 480px;
  overflow-y: auto;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(239, 246, 255, 0.42) 100%);
}

/* AI Core Orb visualization */
.ai-core {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  pointer-events: none;
  opacity: 0.6;
}

.orb {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-radius: 50%;
  filter: blur(8px);
  animation: orb-float 3s ease-in-out infinite;
}

.pulse {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 1px solid var(--neon-blue);
  border-radius: 50%;
  opacity: 0;
  animation: orb-pulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); filter: blur(8px); }
  50% { transform: translateY(-8px) scale(1.1); filter: blur(12px); opacity: 0.8; }
}

@keyframes orb-glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--neon-blue); }
  50% { box-shadow: 0 0 50px var(--neon-purple); }
}

@keyframes orb-pulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { opacity: 0.2; }
  100% { transform: scale(1.8); opacity: 0; }
}

.msg {
  max-width: 85%;
  padding: 16px 20px;
  border-radius: 20px;
  line-height: 1.6;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2);
  white-space: pre-wrap;
}

.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: #0f172a;
  border-bottom-left-radius: 4px;
}

.bot p {
  margin: 0 0 10px;
}

.bot p:last-child {
  margin-bottom: 0;
}

.bot ul {
  margin: 0 0 10px 1.2rem;
  padding: 0;
}

.bot li {
  margin: 0.2rem 0;
}

.bot code {
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 6px;
  padding: 0.05rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.bot pre {
  margin: 0 0 10px;
  padding: 12px;
  overflow-x: auto;
  background: #f8fbff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
}

.bot pre code {
  background: transparent;
  border: none;
  padding: 0;
}

.bot a {
  color: #1d4ed8;
  text-decoration: underline;
}

.composer {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.74);
  border-top: 1px solid rgba(37, 99, 235, 0.12);
  display: flex;
  gap: 16px;
  align-items: center;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: rgba(37, 99, 235, 0.45);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.composer input {
  flex: 1;
  height: 48px;
  background: none;
  border: none;
  color: #0f172a;
  padding: 0 20px;
  font-size: 1rem;
  outline: none;
}

.composer input::placeholder { color: #64748b; }

.mic-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #334155;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.mic-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.mic-btn.active {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  animation: mic-pulse 1.5s infinite;
}

@keyframes mic-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.send-btn {
  height: 48px;
  padding: 0 24px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border: none;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }

.status {
  padding: 0 32px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #334155;
}

.settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: min(480px, 92vw);
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 40px 90px -28px rgba(37, 99, 235, 0.28);
  display: none;
  z-index: 100;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.settings-panel.open { 
  display: block; 
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.settings-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(4px);
  z-index: 99;
  display: none;
}
.settings-backdrop.open { display: block; }

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.settings-head h2 {
  margin: 0;
  font-size: 1.02rem;
  color: #0f172a;
}

.field {
  display: block;
  margin: 10px 0;
}

.field > span {
  display: block;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 4px;
}

.field select {
  width: 100%;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: #ffffff;
  color: #0f172a;
  padding: 0 10px;
}

.field small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.74rem;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  backdrop-filter: blur(10px);
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cookie-banner a {
  color: #93c5fd;
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.cookie-btn.accept {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.cookie-btn.decline {
  background: transparent;
  color: #e2e8f0;
}

@media (max-width: 720px) {
  .chat { height: 54vh; }
  .msg { max-width: 92%; font-size: 0.98rem; }
  .prompt-grid { gap: 6px; }
  .prompt-chip { width: 100%; text-align: left; }
  .cost-tooltip {
    right: -48px;
    width: min(320px, calc(100vw - 32px));
  }
  .cost-tooltip-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}
