:root {
  --bg: #050912;
  --bg-soft: #09111d;
  --panel: rgba(9, 15, 26, 0.82);
  --panel-strong: rgba(10, 16, 28, 0.92);
  --panel-soft: rgba(15, 22, 36, 0.72);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 177, 0, 0.18);
  --text: #eef2f9;
  --muted: #74829b;
  --accent: #f3ae21;
  --accent-strong: #ffbe3d;
  --cyan: #10b7e8;
  --cyan-soft: rgba(16, 183, 232, 0.18);
  --danger: #ff6b6b;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.26);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 86px;
  --transition: 0.22s ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(243, 174, 33, 0.09), transparent 24%),
    linear-gradient(180deg, #02060d 0%, #040913 100%);
  overflow: hidden;
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.no-zoom {
  user-select: none;
}

.app-shell {
  display: flex;
  min-height: 100dvh;
  height: 100dvh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(8, 13, 23, 0.96), rgba(7, 12, 21, 0.92));
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
  position: relative;
  z-index: 3;
  transition: width var(--transition), padding var(--transition);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 20%),
    radial-gradient(circle at 50% 0%, rgba(16, 183, 232, 0.05), transparent 40%);
  pointer-events: none;
}

.sidebar-top,
.sidebar-body,
.sidebar-bottom {
  position: relative;
  z-index: 1;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 174, 33, 0.45);
  box-shadow: 0 0 0 6px rgba(243, 174, 33, 0.06);
}

.brand-dot__core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(243, 174, 33, 0.7);
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.brand-copy__title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-copy__subtitle {
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar-circle-button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #7d8db0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform var(--transition), color var(--transition), border-color var(--transition);
}

.sidebar-circle-button:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-body {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
}

.sidebar-history {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-history::-webkit-scrollbar,
#chat-body::-webkit-scrollbar {
  width: 7px;
}

.sidebar-history::-webkit-scrollbar-thumb,
#chat-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-history li {
  margin: 0;
}

.history-entry {
  width: 100%;
  padding: 11px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  transition: transform var(--transition), color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: slideLeft 0.4s both;
  animation-delay: var(--delay, 0ms);
}

.history-entry:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.history-entry.seleccionada {
  color: var(--accent);
  background:
    linear-gradient(180deg, rgba(243, 174, 33, 0.12), rgba(243, 174, 33, 0.04)),
    rgba(255, 255, 255, 0.02);
  border-color: rgba(243, 174, 33, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(243, 174, 33, 0.08),
    0 0 26px rgba(243, 174, 33, 0.08);
}

.history-entry__icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #95a5c7;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.history-entry.seleccionada .history-entry__icon {
  color: var(--accent);
}

.history-entry__body {
  min-width: 0;
  display: block;
  flex: 1 1 auto;
}

.history-entry__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.83rem;
  font-weight: 500;
}

.sidebar-empty {
  padding: 12px 10px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.sidebar-bottom {
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.sidebar-utility {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition: color var(--transition), background-color var(--transition);
}

.sidebar-utility:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-utility i {
  width: 16px;
  text-align: center;
}

.sidebar-utility span {
  font-size: 0.82rem;
}

.user-card {
  margin-top: 6px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(82, 115, 179, 0.54), rgba(16, 183, 232, 0.28));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  padding-inline: 6px;
}

.sidebar.collapsed .brand-copy,
.sidebar.collapsed .history-entry__title,
.sidebar.collapsed .history-entry__status,
.sidebar.collapsed .sidebar-utility span,
.sidebar.collapsed .user-meta {
  display: none;
}

.sidebar.collapsed .sidebar-top {
  justify-content: center;
}

.sidebar.collapsed .brand-lockup {
  display: none;
}

.sidebar.collapsed .history-entry {
  justify-content: center;
}

.sidebar.collapsed .sidebar-utility,
.sidebar.collapsed .user-card {
  justify-content: center;
}

.main-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100dvh;
  height: 100dvh;
  padding: 26px 28px 22px;
  overflow: hidden;
  display: flex;
}

.tech-grid,
.stage-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tech-grid {
  background-image:
    linear-gradient(rgba(21, 49, 91, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 49, 91, 0.16) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.32;
  mask-image: radial-gradient(circle at center, black 55%, transparent 100%);
}

.tech-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(16, 183, 232, 0.06), transparent),
    radial-gradient(circle at 50% 18%, rgba(243, 174, 33, 0.08), transparent 22%);
  animation: grid-drift 16s linear infinite;
}

.stage-glow--amber {
  background: radial-gradient(circle at 50% 22%, rgba(243, 174, 33, 0.16), transparent 28%);
}

.stage-glow--cyan {
  background: radial-gradient(circle at 58% 52%, rgba(16, 183, 232, 0.12), transparent 30%);
}

#chat-container {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1080px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 18px;
  overflow: hidden;
  transition: max-width 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

#chat-container.initial {
  align-content: center;
  grid-template-rows: auto auto auto auto;
}

.stage-context-bar {
  position: absolute;
  top: 26px;
  left: 28px;
  z-index: 4;
  width: min(420px, calc(100% - 56px));
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 0;
  transition:
    opacity 0.28s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.34s ease,
    margin 0.28s ease;
}

.context-switcher {
  min-width: min(100%, 360px);
  max-width: min(100%, 420px);
  padding: 7px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(15, 22, 37, 0.72), rgba(7, 12, 21, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.context-switcher:hover,
.context-switcher:focus-within {
  transform: translateY(-1px);
  border-color: rgba(243, 174, 33, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 22px 48px rgba(0, 0, 0, 0.28);
}

.context-switcher__label {
  padding-left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 241, 0.8);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.context-switcher:hover .context-switcher__label,
.context-switcher:focus-within .context-switcher__label {
  color: rgba(245, 248, 252, 0.92);
}

.context-switcher__select {
  min-width: 0;
  flex: 1 1 auto;
  padding: 11px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(14, 20, 32, 0.84), rgba(8, 13, 23, 0.72));
  color: #f3f6fb;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  transition:
    transform 0.18s ease,
    border-color var(--transition),
    background-color var(--transition),
    box-shadow var(--transition),
    color var(--transition);
}

.context-switcher__select:hover,
.context-switcher__select:focus {
  border-color: rgba(243, 174, 33, 0.24);
  background:
    linear-gradient(180deg, rgba(17, 25, 40, 0.92), rgba(9, 15, 27, 0.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(243, 174, 33, 0.08);
  transform: translateY(-1px);
}

.context-switcher__select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.context-switcher__select option {
  background: #09111d;
  color: #eef2f9;
}

.hero-shell {
  width: min(100%, 640px);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
  animation: riseIn 0.6s ease-out both;
  transition:
    width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    gap 0.34s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.34s ease;
}

.hero-logo-box {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  transition:
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-logo-box::before,
.hero-logo-box::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  border: 1px solid rgba(243, 174, 33, 0.16);
  box-shadow: 0 0 28px rgba(243, 174, 33, 0.14);
  animation: pulse-ring 3s ease-in-out infinite;
}

.hero-logo-box::after {
  inset: -6px;
  opacity: 0.45;
  animation-delay: -1.2s;
}

.hero-logo-core {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(33, 24, 6, 0.92), rgba(20, 18, 12, 0.82)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(243, 174, 33, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(243, 174, 33, 0.06),
    0 18px 40px rgba(0, 0, 0, 0.32),
    0 0 36px rgba(243, 174, 33, 0.12);
  animation: floatCore 4.8s ease-in-out infinite;
  transition:
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.38s ease,
    box-shadow 0.34s ease;
}

#asistente-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(243, 174, 33, 0.22));
  transition:
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

#asistente-nombre {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.03em;
  font-weight: 700;
  transition: font-size 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-subtitle {
  margin: 0;
  max-width: 580px;
  color: #8ea0bf;
  font-size: 1.02rem;
  line-height: 1.55;
}

.hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.78rem;
}

.chat-stream {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

#chat-container.initial .chat-stream {
  display: none;
}

#chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 10px 6px;
}

#messages {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: max-width 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

#typing {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  min-height: 22px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.9rem;
  transition: max-width 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 92%;
  animation: riseIn 0.25s ease-out both;
}

.msg.assistant.msg--chart {
  max-width: min(96%, 1180px);
}

.msg.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.bubble {
  min-width: 0;
  padding: 16px 18px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(11, 17, 28, 0.92), rgba(8, 13, 22, 0.9));
  box-shadow: var(--shadow-soft);
}

.msg--chart .bubble {
  width: 100%;
}

.msg.user .bubble {
  background: linear-gradient(180deg, rgba(44, 32, 11, 0.96), rgba(34, 26, 12, 0.94));
  border-color: rgba(243, 174, 33, 0.16);
}

.bubble-label {
  margin-bottom: 8px;
  color: #8fa0be;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.msg.user .bubble-label {
  color: rgba(255, 214, 145, 0.82);
}

.bubble-content {
  min-width: 0;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.bubble-content > :first-child {
  margin-top: 0;
}

.bubble-content > :last-child {
  margin-bottom: 0;
}

.bubble-content p,
.bubble-content ul,
.bubble-content ol,
.bubble-content pre,
.bubble-content blockquote,
.bubble-content table {
  margin: 0 0 14px;
}

.bubble-content ul,
.bubble-content ol {
  padding-left: 22px;
}

.bubble-content a {
  color: #7fe4ff;
}

.bubble-content code:not([class]) {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.bubble-content pre {
  border-radius: 16px;
  overflow: auto;
}

.bubble-content img {
  max-width: 100%;
  border-radius: 16px;
}

.bubble-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(238, 242, 249, 0.95);
  max-width: 100%;
}

.file-pill i {
  color: var(--accent);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.file-pill__name {
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg.assistant .bubble-content table,
.msg.assistant .bubble-content div[id^="chart-"] {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.msg.assistant table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.msg.assistant th,
.msg.assistant td {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bubble-controls {
  height: 24px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.msg.assistant:hover .bubble-controls {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.bubble-controls i,
.bubble-controls .play-audio {
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.bubble-controls i:hover,
.bubble-controls .play-audio:hover {
  color: var(--accent);
}

.play-audio,
.play-audio-direct {
  background: none;
  border: none;
  cursor: pointer;
}

.play-audio.loading,
.play-audio-direct.loading {
  opacity: 0.6;
  cursor: wait;
}

.mermaid {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.typing-loader span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  animation: bounce 1s infinite ease-in-out;
}

.typing-loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

.typing-status {
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(12, 19, 31, 0.92), rgba(9, 15, 25, 0.9));
  box-shadow: var(--shadow-soft);
}

.typing-status::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(16, 183, 232, 0.08) 44%, transparent 68%);
  transform: translateX(-100%);
  animation: sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}

.typing-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.typing-status__label {
  position: relative;
  z-index: 1;
  color: #c0cbe0;
}

.typing-caret {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

.prompt-shell {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.94), rgba(8, 13, 22, 0.92));
  border: 1px solid rgba(243, 174, 33, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(243, 174, 33, 0.04),
    0 0 28px rgba(243, 174, 33, 0.12),
    0 0 44px rgba(16, 183, 232, 0.08);
  animation: promptGlow 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
  transition:
    max-width 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.36s ease,
    border-radius 0.36s ease,
    box-shadow 0.36s ease,
    transform 0.36s ease;
}

.prompt-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  overflow: hidden;
}

.prompt-toolbar__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  transition:
    opacity 0.28s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.28s ease;
}

.prompt-toolbar__status {
  color: var(--accent-strong);
}

.agent-toolbar {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  max-height: 84px;
  overflow: hidden;
  transform-origin: top left;
  transition:
    opacity 0.34s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    flex-basis 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.34s ease;
}

.agent-toolbar__button {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #90a2c5;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform var(--transition), color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.agent-toolbar__button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.agent-toolbar__button[aria-checked="true"] {
  color: var(--accent);
  background: rgba(243, 174, 33, 0.08);
  border-color: rgba(243, 174, 33, 0.14);
  box-shadow: 0 0 18px rgba(243, 174, 33, 0.08);
}

.agent-toolbar__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.plus-menu-wrap {
  position: relative;
  margin-left: auto;
}

.voice-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 183, 232, 0.08);
  color: #97dff6;
  border: 1px solid rgba(16, 183, 232, 0.16);
  font-size: 0.74rem;
  font-weight: 600;
  transition: transform var(--transition), color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.voice-toggle-button:hover {
  color: var(--text);
  transform: translateY(-1px);
  background: rgba(16, 183, 232, 0.12);
}

.voice-toggle-button.is-listening {
  color: #05111c;
  background: linear-gradient(180deg, rgba(16, 183, 232, 0.95), rgba(15, 147, 186, 0.92));
  border-color: rgba(16, 183, 232, 0.28);
  box-shadow: 0 0 22px rgba(16, 183, 232, 0.18);
}

.voice-toggle-button.is-speaking {
  color: #17120a;
  background: linear-gradient(180deg, rgba(243, 174, 33, 0.95), rgba(214, 149, 18, 0.92));
  border-color: rgba(243, 174, 33, 0.24);
  box-shadow: 0 0 22px rgba(243, 174, 33, 0.18);
}

.voice-toggle-button.is-live {
  color: #07140d;
  background: linear-gradient(180deg, rgba(74, 192, 138, 0.96), rgba(46, 152, 104, 0.92));
  border-color: rgba(74, 192, 138, 0.28);
  box-shadow: 0 0 24px rgba(74, 192, 138, 0.18);
}

.voice-toggle-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.plus-menu-button {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: #93a5c8;
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

.plus-menu-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.plus-menu-button.has-attachments {
  color: #fff;
  background: rgba(16, 183, 232, 0.15);
  box-shadow: inset 0 0 0 1px rgba(16, 183, 232, 0.24);
}

.plus-menu-button.has-attachments::after {
  content: attr(data-attachment-count);
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #04111a;
  background: linear-gradient(135deg, #6ee7ff, #10b7e8);
  box-shadow: 0 0 0 2px rgba(6, 10, 18, 0.96);
}

.plus-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 220px;
  padding: 8px;
  border-radius: 16px;
  display: none;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  z-index: 12;
}

.plus-menu-wrap.open .plus-menu {
  display: block;
}

.plus-menu-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
}

.plus-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.plus-menu-divider {
  height: 1px;
  margin: 8px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.agent-chip {
  display: none;
}

#file-preview {
  display: none;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.composer-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.file-preview__summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-preview__summary-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: flex-start;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  color: #10b7e8;
  background: rgba(16, 183, 232, 0.1);
}

.file-preview__summary-copy {
  min-width: 0;
}

.file-preview__summary-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.file-preview__summary-hint {
  margin-top: 2px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(147, 165, 200, 0.92);
}

.file-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-preview__action {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.file-preview__action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

.file-preview__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.file-preview__action--primary {
  color: #061018;
  border-color: rgba(16, 183, 232, 0.28);
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.95), rgba(16, 183, 232, 0.94));
}

.file-preview__action--primary:hover:not(:disabled) {
  filter: brightness(1.02);
}

#chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  transition: gap 0.3s ease;
}

#file-input {
  display: none;
}

.attachments-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.attachments-modal[hidden] {
  display: none;
}

.attachments-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(8px);
}

.attachments-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 15, 25, 0.98), rgba(6, 10, 18, 0.96));
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
}

.attachments-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.attachments-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a5c8;
}

.attachments-modal__header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #eef2f9;
}

.attachments-modal__subtitle {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: rgba(147, 165, 200, 0.92);
}

.attachments-modal__close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #d9e6fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.attachments-modal__close:hover {
  color: #fff;
  border-color: rgba(16, 183, 232, 0.32);
}

.attachments-modal__body {
  display: grid;
  gap: 12px;
}

.attachments-modal__empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 180px;
  padding: 20px;
  border-radius: 18px;
  color: rgba(147, 165, 200, 0.9);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.attachments-modal__empty i {
  font-size: 1.5rem;
  color: #10b7e8;
}

.attachments-modal__list {
  display: grid;
  gap: 10px;
}

.attachments-modal__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.attachments-modal__item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.attachments-modal__item-body {
  min-width: 0;
}

.attachments-modal__item-name {
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

.attachments-modal__item-meta {
  margin-top: 3px;
  font-size: 0.74rem;
  color: rgba(147, 165, 200, 0.92);
}

.attachments-modal__remove {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ff9a9a;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.18);
}

.attachments-modal__remove:hover {
  color: #fff;
  background: rgba(255, 107, 107, 0.18);
}

.attachments-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.attachments-modal__button {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.attachments-modal__button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

.attachments-modal__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.attachments-modal__button--primary {
  color: #061018;
  border-color: rgba(16, 183, 232, 0.28);
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.95), rgba(16, 183, 232, 0.94));
}

.attachments-modal__button--secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.attachments-modal__button--ghost {
  color: #ffd7d7;
  border-color: rgba(255, 107, 107, 0.16);
  background: rgba(255, 107, 107, 0.08);
}

@media (max-width: 720px) {
  #chat-form {
    grid-template-columns: minmax(0, 1fr);
  }

  #sendBtn {
    justify-self: end;
  }

  .attachments-modal {
    padding: 16px;
  }

  .attachments-modal__dialog {
    width: min(100vw - 16px, 760px);
    max-height: 86vh;
    padding: 16px;
  }

  .attachments-modal__header,
  .attachments-modal__footer {
    align-items: stretch;
    justify-content: stretch;
  }

  .attachments-modal__footer {
    flex-direction: column;
  }
}

#message {
  min-height: 62px;
  max-height: 220px;
  resize: none;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  outline: none;
  transition:
    min-height 0.3s ease,
    padding 0.3s ease,
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

#message::placeholder {
  color: #5c6c88;
}

#message:focus {
  border-color: rgba(243, 174, 33, 0.16);
  box-shadow: 0 0 0 4px rgba(243, 174, 33, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

#sendBtn {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(143, 102, 21, 0.95), rgba(110, 80, 19, 0.92));
  color: #17120a;
  border: 1px solid rgba(243, 174, 33, 0.18);
  box-shadow: 0 0 24px rgba(243, 174, 33, 0.16);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    border-radius 0.3s ease,
    transform var(--transition),
    box-shadow var(--transition),
    filter var(--transition);
}

#sendBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(243, 174, 33, 0.22);
  filter: brightness(1.05);
}

#sendBtn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

#sendBtn i {
  font-size: 1rem;
}

.prompt-footnote {
  margin-top: 10px;
  text-align: center;
  color: rgba(116, 130, 155, 0.72);
  font-size: 0.7rem;
  max-height: 24px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.24s ease, margin 0.24s ease;
}

.voice-status {
  margin-top: 8px;
  text-align: center;
  color: #8fcfe6;
  font-size: 0.72rem;
}

.voice-realtime-shell {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 36px 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.voice-realtime-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(16, 183, 232, 0.12), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.18), transparent 48%),
    rgba(2, 6, 12, 0.78);
  opacity: 0;
  backdrop-filter: blur(0);
  transition: opacity 0.36s ease, backdrop-filter 0.42s ease;
}

.main-stage.realtime-immersive .voice-realtime-shell {
  pointer-events: auto;
}

.voice-realtime-shell.is-visible {
  opacity: 1;
}

.voice-realtime-shell.is-visible::before {
  opacity: 1;
  backdrop-filter: blur(18px);
}

.voice-realtime-shell__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  min-height: min(82dvh, 760px);
  padding: 34px 30px 26px;
  border-radius: 32px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 20px;
  background:
    radial-gradient(circle at 50% 24%, rgba(25, 77, 146, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(8, 13, 23, 0.96), rgba(5, 9, 17, 0.92));
  border: 1px solid rgba(102, 190, 255, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 32px 90px rgba(0, 0, 0, 0.42),
    0 0 120px rgba(16, 183, 232, 0.08);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(28px) scale(0.78);
  transform-origin: center center;
  transition:
    opacity 0.34s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.34s ease;
}

.voice-realtime-shell.is-visible .voice-realtime-shell__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.voice-realtime-shell__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #c7d6ed;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voice-realtime-shell__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #40c2ff;
  box-shadow: 0 0 12px rgba(64, 194, 255, 0.72);
  animation: voice-live-pulse 1.8s ease-in-out infinite;
}

.voice-realtime-shell__context {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.voice-realtime-shell__context-block {
  padding: 14px 16px;
  border-radius: 18px;
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.voice-realtime-shell__context-label,
.voice-realtime-shell__transcript-label {
  color: #8395b6;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.voice-realtime-shell__context-block strong {
  color: #eef3fb;
  font-size: 1rem;
  font-weight: 600;
}

.voice-realtime-core {
  position: relative;
  width: min(58vw, 430px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.voice-realtime-core__halo,
.voice-realtime-core__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.voice-realtime-core__halo--outer {
  inset: 8%;
  background: radial-gradient(circle, rgba(19, 127, 215, 0.09), transparent 67%);
  filter: blur(20px);
}

.voice-realtime-core__halo--mid {
  inset: 18%;
  background: radial-gradient(circle, rgba(28, 160, 255, 0.12), transparent 72%);
  filter: blur(12px);
}

.voice-realtime-core__halo--inner {
  inset: 30%;
  background: radial-gradient(circle, rgba(89, 205, 255, 0.12), transparent 74%);
  filter: blur(8px);
}

.voice-realtime-core__orbit {
  inset: 17%;
  border: 1.4px solid rgba(78, 188, 255, 0.22);
  box-shadow:
    0 0 28px rgba(40, 157, 255, 0.18),
    inset 0 0 22px rgba(40, 157, 255, 0.08);
  mix-blend-mode: screen;
}

.voice-realtime-core__orbit--one {
  border-radius: 46% 54% 52% 48% / 54% 45% 55% 46%;
  animation: voice-orbit-spin 13s linear infinite, voice-orbit-breathe 4.8s ease-in-out infinite;
}

.voice-realtime-core__orbit--two {
  inset: 18%;
  border-color: rgba(70, 174, 255, 0.34);
  border-radius: 57% 43% 49% 51% / 42% 57% 43% 58%;
  animation: voice-orbit-spin-reverse 11s linear infinite, voice-orbit-breathe 4.2s ease-in-out infinite 0.4s;
}

.voice-realtime-core__orbit--three {
  inset: 20%;
  border-color: rgba(124, 212, 255, 0.28);
  border-radius: 51% 49% 59% 41% / 45% 54% 46% 55%;
  animation: voice-orbit-tilt 9.5s linear infinite, voice-orbit-breathe 5.2s ease-in-out infinite 0.8s;
}

.voice-realtime-core__tendrils {
  position: absolute;
  inset: 24% 14% 8%;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 16px rgba(78, 188, 255, 0.16));
}

.voice-realtime-core__tendrils span {
  --angle: 0deg;
  --length: 44%;
  --thickness: 10px;
  --delay: 0s;
  position: absolute;
  left: 50%;
  top: 46%;
  width: var(--thickness);
  height: var(--length);
  border-radius: 999px 999px 72% 72%;
  background:
    linear-gradient(
      180deg,
      rgba(173, 234, 255, 0.02) 0%,
      rgba(145, 227, 255, 0.56) 18%,
      rgba(89, 197, 255, 0.42) 48%,
      rgba(28, 141, 225, 0.18) 72%,
      rgba(28, 141, 225, 0) 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(186, 238, 255, 0.08),
    0 0 14px rgba(70, 174, 255, 0.12);
  opacity: 0.72;
  mix-blend-mode: screen;
  transform: translateX(-50%) rotate(var(--angle)) scaleY(0.92);
  transform-origin: center top;
  animation:
    voice-tendril-drift 5.6s ease-in-out infinite,
    voice-tendril-glow 3.4s ease-in-out infinite;
  animation-delay: var(--delay), calc(var(--delay) * 0.6);
}

.voice-realtime-core__tendrils span::before {
  content: "";
  position: absolute;
  inset: 3% 24% 10%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(233, 248, 255, 0.46), rgba(233, 248, 255, 0));
  opacity: 0.72;
}

.voice-realtime-core__tendrils span:nth-child(1)  { --angle: -78deg; --length: 34%; --thickness: 7px;  --delay: -1.3s; }
.voice-realtime-core__tendrils span:nth-child(2)  { --angle: -64deg; --length: 40%; --thickness: 8px;  --delay: -0.7s; }
.voice-realtime-core__tendrils span:nth-child(3)  { --angle: -52deg; --length: 48%; --thickness: 9px;  --delay: -1.9s; }
.voice-realtime-core__tendrils span:nth-child(4)  { --angle: -39deg; --length: 56%; --thickness: 10px; --delay: -0.3s; }
.voice-realtime-core__tendrils span:nth-child(5)  { --angle: -26deg; --length: 61%; --thickness: 11px; --delay: -2.2s; }
.voice-realtime-core__tendrils span:nth-child(6)  { --angle: -12deg; --length: 67%; --thickness: 12px; --delay: -1.1s; }
.voice-realtime-core__tendrils span:nth-child(7)  { --angle: 0deg;   --length: 72%; --thickness: 13px; --delay: -2.7s; }
.voice-realtime-core__tendrils span:nth-child(8)  { --angle: 12deg;  --length: 67%; --thickness: 12px; --delay: -0.5s; }
.voice-realtime-core__tendrils span:nth-child(9)  { --angle: 25deg;  --length: 61%; --thickness: 11px; --delay: -1.6s; }
.voice-realtime-core__tendrils span:nth-child(10) { --angle: 38deg;  --length: 56%; --thickness: 10px; --delay: -2.4s; }
.voice-realtime-core__tendrils span:nth-child(11) { --angle: 51deg;  --length: 48%; --thickness: 9px;  --delay: -0.9s; }
.voice-realtime-core__tendrils span:nth-child(12) { --angle: 64deg;  --length: 40%; --thickness: 8px;  --delay: -1.8s; }
.voice-realtime-core__tendrils span:nth-child(13) { --angle: 78deg;  --length: 34%; --thickness: 7px;  --delay: -0.1s; }

.voice-realtime-core__center {
  position: relative;
  width: 34%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  z-index: 2;
  background: radial-gradient(circle, rgba(9, 18, 33, 0.96), rgba(4, 8, 15, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(117, 213, 255, 0.08),
    0 0 40px rgba(45, 166, 255, 0.14);
}

.voice-realtime-core__center-ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(120, 214, 255, 0.26);
  box-shadow: 0 0 18px rgba(79, 192, 255, 0.14);
}

.voice-realtime-core__center-dot {
  width: 18%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 236, 255, 0.98), rgba(59, 186, 255, 0.92));
  box-shadow:
    0 0 18px rgba(97, 202, 255, 0.78),
    0 0 40px rgba(68, 183, 255, 0.3);
  animation: voice-core-pulse 2.1s ease-in-out infinite;
}

.voice-realtime-core__bars {
  position: absolute;
  left: 50%;
  bottom: 10%;
  width: min(68%, 250px);
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.voice-realtime-core__bars span {
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(116, 220, 255, 0.94), rgba(33, 140, 222, 0.3));
  box-shadow: 0 0 16px rgba(51, 168, 255, 0.18);
  transform-origin: center bottom;
  animation: voice-bar-idle 1.8s ease-in-out infinite;
}

.voice-realtime-core__bars span:nth-child(2) { animation-delay: 0.12s; }
.voice-realtime-core__bars span:nth-child(3) { animation-delay: 0.24s; }
.voice-realtime-core__bars span:nth-child(4) { animation-delay: 0.36s; }
.voice-realtime-core__bars span:nth-child(5) { animation-delay: 0.48s; }
.voice-realtime-core__bars span:nth-child(6) { animation-delay: 0.6s; }
.voice-realtime-core__bars span:nth-child(7) { animation-delay: 0.72s; }
.voice-realtime-core__bars span:nth-child(8) { animation-delay: 0.84s; }
.voice-realtime-core__bars span:nth-child(9) { animation-delay: 0.96s; }

.voice-realtime-shell__signal {
  width: min(100%, 620px);
  text-align: center;
  display: grid;
  gap: 6px;
}

.voice-realtime-shell__signal strong {
  color: #f6fbff;
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.voice-realtime-shell__signal p {
  color: #93b6d4;
  font-size: 0.95rem;
  line-height: 1.5;
}

.voice-realtime-shell__transcripts {
  width: min(100%, 620px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.voice-realtime-shell__transcript-card {
  min-height: 118px;
  padding: 16px 18px;
  border-radius: 22px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.voice-realtime-shell__transcript-card p {
  color: #edf3fb;
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.voice-realtime-shell__close {
  margin-top: 4px;
  padding: 12px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4dfef;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.voice-realtime-shell__close:hover {
  color: #fff;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 190, 255, 0.18);
  box-shadow: 0 0 24px rgba(46, 160, 255, 0.12);
}

.main-stage.realtime-immersive .stage-context-bar,
.main-stage.realtime-immersive #chat-container {
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  filter: blur(14px);
}

.voice-realtime-shell[data-mode="connecting"] .voice-realtime-core__orbit,
.voice-realtime-shell[data-mode="processing"] .voice-realtime-core__orbit {
  animation-duration: 7.5s, 3.2s;
}

.voice-realtime-shell[data-mode="listening"] .voice-realtime-core__bars span {
  animation-name: voice-bar-listening;
  animation-duration: 0.92s;
}

.voice-realtime-shell[data-mode="listening"] .voice-realtime-core__tendrils span {
  animation-name: voice-tendril-drift-listening, voice-tendril-glow;
  animation-duration: 1.16s, 2.2s;
}

.voice-realtime-shell[data-mode="speaking"] .voice-realtime-core__bars span {
  animation-name: voice-bar-speaking;
  animation-duration: 0.76s;
}

.voice-realtime-shell[data-mode="speaking"] .voice-realtime-core__tendrils span {
  animation-name: voice-tendril-drift-speaking, voice-tendril-glow;
  animation-duration: 0.78s, 1.9s;
}

.voice-realtime-shell[data-mode="processing"] .voice-realtime-core__bars span {
  animation-name: voice-bar-processing;
  animation-duration: 1.1s;
}

.voice-realtime-shell[data-mode="processing"] .voice-realtime-core__tendrils span {
  animation-name: voice-tendril-drift-processing, voice-tendril-glow;
  animation-duration: 1.5s, 2.8s;
}

.voice-realtime-shell[data-mode="listening"] .voice-realtime-core__center-dot,
.voice-realtime-shell[data-mode="speaking"] .voice-realtime-core__center-dot {
  box-shadow:
    0 0 24px rgba(97, 202, 255, 0.86),
    0 0 56px rgba(68, 183, 255, 0.42);
}

.voice-realtime-shell[data-mode="listening"] .voice-realtime-core__tendrils {
  filter:
    drop-shadow(0 0 18px rgba(62, 241, 218, 0.2))
    drop-shadow(0 0 34px rgba(78, 188, 255, 0.14));
}

.voice-realtime-shell[data-mode="speaking"] .voice-realtime-core__orbit {
  border-color: rgba(243, 174, 33, 0.28);
  box-shadow:
    0 0 30px rgba(243, 174, 33, 0.14),
    inset 0 0 24px rgba(243, 174, 33, 0.08);
}

.voice-realtime-shell[data-mode="speaking"] .voice-realtime-shell__eyebrow-dot {
  background: #f3ae21;
  box-shadow: 0 0 14px rgba(243, 174, 33, 0.78);
}

.voice-realtime-shell[data-mode="speaking"] .voice-realtime-core__tendrils {
  filter:
    drop-shadow(0 0 18px rgba(243, 174, 33, 0.18))
    drop-shadow(0 0 40px rgba(78, 188, 255, 0.18));
}

.voice-realtime-shell[data-mode="speaking"] .voice-realtime-core__tendrils span {
  background:
    linear-gradient(
      180deg,
      rgba(255, 241, 197, 0.05) 0%,
      rgba(255, 214, 126, 0.52) 16%,
      rgba(130, 214, 255, 0.38) 50%,
      rgba(28, 141, 225, 0.18) 74%,
      rgba(28, 141, 225, 0) 100%
    );
}

.voice-realtime-shell[data-mode="processing"] .voice-realtime-shell__eyebrow-dot {
  background: #8ad7ff;
}

.voice-realtime-shell[data-mode="listening"] .voice-realtime-shell__eyebrow-dot {
  background: #3ef1da;
  box-shadow: 0 0 14px rgba(62, 241, 218, 0.78);
}

@keyframes voice-orbit-spin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.02); }
}

@keyframes voice-orbit-spin-reverse {
  from { transform: rotate(360deg) scale(1.01); }
  to { transform: rotate(0deg) scale(0.99); }
}

@keyframes voice-orbit-tilt {
  from { transform: rotate(0deg) scale(1.02); }
  50% { transform: rotate(180deg) scale(0.98); }
  to { transform: rotate(360deg) scale(1.02); }
}

@keyframes voice-orbit-breathe {
  0%, 100% { transform: scale(0.98); opacity: 0.72; }
  50% { transform: scale(1.03); opacity: 1; }
}

@keyframes voice-core-pulse {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
}

@keyframes voice-live-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.72; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes voice-bar-idle {
  0%, 100% { transform: scaleY(0.45); opacity: 0.52; }
  50% { transform: scaleY(0.82); opacity: 0.9; }
}

@keyframes voice-bar-listening {
  0%, 100% { transform: scaleY(0.38); opacity: 0.56; }
  25% { transform: scaleY(1.12); opacity: 1; }
  55% { transform: scaleY(0.72); opacity: 0.92; }
}

@keyframes voice-bar-speaking {
  0%, 100% { transform: scaleY(0.4); opacity: 0.58; }
  20% { transform: scaleY(1.34); opacity: 1; }
  45% { transform: scaleY(0.62); opacity: 0.88; }
  70% { transform: scaleY(1.02); opacity: 0.96; }
}

@keyframes voice-bar-processing {
  0%, 100% { transform: scaleY(0.32); opacity: 0.42; }
  50% { transform: scaleY(0.94); opacity: 0.84; }
}

@keyframes voice-tendril-drift {
  0%, 100% { transform: translateX(-50%) rotate(var(--angle)) scaleY(0.88) skewX(-1deg); opacity: 0.54; }
  25% { transform: translateX(-50%) rotate(calc(var(--angle) + 2deg)) scaleY(1.02) skewX(0deg); opacity: 0.82; }
  50% { transform: translateX(-50%) rotate(calc(var(--angle) - 3deg)) scaleY(1.08) skewX(1.5deg); opacity: 0.94; }
  75% { transform: translateX(-50%) rotate(calc(var(--angle) + 1.5deg)) scaleY(0.98) skewX(-0.5deg); opacity: 0.74; }
}

@keyframes voice-tendril-drift-listening {
  0%, 100% { transform: translateX(-50%) rotate(calc(var(--angle) - 1deg)) scaleY(0.92) skewX(-1deg); opacity: 0.66; }
  20% { transform: translateX(-50%) rotate(calc(var(--angle) + 4deg)) scaleY(1.08) skewX(2deg); opacity: 0.92; }
  50% { transform: translateX(-50%) rotate(calc(var(--angle) - 5deg)) scaleY(1.18) skewX(-2.5deg); opacity: 1; }
  80% { transform: translateX(-50%) rotate(calc(var(--angle) + 3deg)) scaleY(1.04) skewX(1deg); opacity: 0.84; }
}

@keyframes voice-tendril-drift-speaking {
  0%, 100% { transform: translateX(-50%) rotate(calc(var(--angle) - 2deg)) scaleY(0.94) skewX(-1.4deg); opacity: 0.7; }
  18% { transform: translateX(-50%) rotate(calc(var(--angle) + 5deg)) scaleY(1.22) skewX(2.4deg); opacity: 1; }
  42% { transform: translateX(-50%) rotate(calc(var(--angle) - 6deg)) scaleY(1.32) skewX(-3deg); opacity: 0.96; }
  70% { transform: translateX(-50%) rotate(calc(var(--angle) + 4deg)) scaleY(1.1) skewX(1.6deg); opacity: 0.88; }
}

@keyframes voice-tendril-drift-processing {
  0%, 100% { transform: translateX(-50%) rotate(var(--angle)) scaleY(0.86); opacity: 0.44; }
  50% { transform: translateX(-50%) rotate(calc(var(--angle) + 1.5deg)) scaleY(1.04); opacity: 0.72; }
}

@keyframes voice-tendril-glow {
  0%, 100% { filter: saturate(0.92) brightness(0.94); }
  50% { filter: saturate(1.18) brightness(1.12); }
}

.prompt-suggestions {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
  max-height: 460px;
  overflow: hidden;
  transform-origin: top center;
  transition:
    opacity 0.36s ease,
    transform 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.36s ease,
    gap 0.3s ease;
}

.prompt-suggestions__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.74rem;
}

.prompt-suggestions__eyebrow {
  color: #c6d0e2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prompt-suggestions__agent {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(243, 174, 33, 0.08);
  border: 1px solid rgba(243, 174, 33, 0.12);
}

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

.prompt-suggestion-card {
  width: 100%;
  min-height: 124px;
  padding: 14px 14px 13px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
  animation: riseIn 0.5s both;
  animation-delay: var(--delay, 0ms);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.prompt-suggestion-card:hover {
  transform: translateY(-3px);
  border-color: rgba(243, 174, 33, 0.14);
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    var(--shadow-soft),
    0 0 24px rgba(243, 174, 33, 0.08);
}

.prompt-suggestion-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.prompt-suggestion-card:nth-child(2n) .prompt-suggestion-card__icon {
  color: var(--accent);
}

.prompt-suggestion-card__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.prompt-suggestion-card__title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}

.prompt-suggestion-card__text {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

#chat-container.conversation-started .agent-toolbar {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  max-width: 0;
  max-height: 0;
  flex-basis: 0;
  margin: 0;
  pointer-events: none;
}

#chat-container.conversation-started .prompt-toolbar__label {
  opacity: 0;
  transform: translateY(-8px);
  max-width: 0;
  margin: 0;
  pointer-events: none;
}

.main-stage.conversation-started .stage-context-bar {
  opacity: 0;
  transform: translateY(-12px);
  max-height: 0;
  margin: 0;
  pointer-events: none;
  overflow: hidden;
}

#chat-container.conversation-started {
  max-width: 1620px;
}

#chat-container.conversation-started .hero-shell {
  width: min(100%, 560px);
  gap: 6px;
  transform: translateY(-8px);
  margin-bottom: -4px;
}

#chat-container.conversation-started .hero-logo-box {
  width: 54px;
  height: 54px;
}

#chat-container.conversation-started .hero-logo-core {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(243, 174, 33, 0.04),
    0 12px 26px rgba(0, 0, 0, 0.24),
    0 0 22px rgba(243, 174, 33, 0.08);
}

#chat-container.conversation-started #asistente-logo {
  width: 22px;
  height: 22px;
}

#chat-container.conversation-started #asistente-nombre {
  font-size: 1.45rem;
}

#chat-container.conversation-started #messages,
#chat-container.conversation-started #typing {
  max-width: 1380px;
}

#chat-container.conversation-started .prompt-shell {
  max-width: 990px;
  padding: 10px 12px 8px;
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(243, 174, 33, 0.035),
    0 0 22px rgba(243, 174, 33, 0.1),
    0 0 34px rgba(16, 183, 232, 0.06);
}

#chat-container.conversation-started .prompt-toolbar {
  margin-bottom: 8px;
}

#chat-container.conversation-started #chat-form {
  gap: 10px;
}

#chat-container.conversation-started #message {
  min-height: 50px;
  padding: 13px 16px;
}

#chat-container.conversation-started #sendBtn {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

#chat-container.conversation-started .prompt-footnote {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

#chat-container.conversation-started .prompt-suggestions {
  opacity: 0;
  transform: translateY(-16px) scale(0.985);
  max-height: 0;
  margin-top: -10px;
  gap: 0;
  pointer-events: none;
}

.stage-footer {
  width: min(100%, 860px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: rgba(116, 130, 155, 0.58);
  font-size: 0.68rem;
}

.stage-footer__copy:last-child {
  text-align: right;
}

#chat-container:not(.initial) .hero-shell {
  width: min(100%, 720px);
  gap: 10px;
}

#chat-container:not(.initial) .hero-logo-box {
  width: 66px;
  height: 66px;
}

#chat-container:not(.initial) .hero-logo-core {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

#chat-container:not(.initial) #asistente-logo {
  width: 28px;
  height: 28px;
}

#chat-container:not(.initial) #asistente-nombre {
  font-size: 1.8rem;
}

#chat-container:not(.initial) .hero-subtitle,
#chat-container:not(.initial) .hero-hint {
  display: none;
}

.swal2-popup.mi-feedback-popup {
  background-color: #242c38 !important;
  color: white;
}

.swal2-title.mi-feedback-titulo {
  color: white !important;
}

.swal2-confirm.mi-feedback-boton {
  background-color: #4480b7 !important;
  color: white !important;
  border: none !important;
}

.swal2-cancel.mi-feedback-cancelar {
  background-color: #555 !important;
  color: white !important;
}

#feedback-modal[hidden] {
  display: none !important;
}

#feedback-form {
  width: 300px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: white;
  background: #222;
}

#feedback-comment {
  resize: none;
}

#feedback-form button[type="submit"] {
  padding: 8px;
  border-radius: 10px;
  background: orange;
  color: black;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(9, 15, 26, 0.96);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

[hidden] {
  display: none !important;
}

.bubble-content .chart-card,
.bubble-content .security-note {
  margin: 0 0 14px;
}

.security-note {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 107, 0.18);
  background: rgba(255, 107, 107, 0.08);
  color: #ffd7d7;
}

.chart-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(16, 183, 232, 0.12);
  background: rgba(5, 12, 23, 0.88);
}

.chart-card--interactive {
  cursor: zoom-in;
}

.chart-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-card__title {
  margin: 0;
  color: #d9e6fb;
  font-size: 0.96rem;
}

.chart-card__expand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d9e6fb;
  flex-shrink: 0;
}

.chart-card__expand:hover {
  border-color: rgba(16, 183, 232, 0.32);
  color: #fff;
}

.chart-card__svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-card__meta {
  margin-top: 12px;
  color: #8fa6c5;
  font-size: 0.78rem;
  line-height: 1.5;
}

.chart-map {
  display: grid;
  gap: 10px;
}

.chart-map__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-map__hint {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 183, 232, 0.16);
  background: rgba(16, 183, 232, 0.08);
  color: #c8e6f3;
  font-size: 0.73rem;
  letter-spacing: 0.01em;
}

.chart-map__controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-map__control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #d9e6fb;
  font-size: 0.74rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.chart-map__control:hover:not(:disabled) {
  border-color: rgba(16, 183, 232, 0.32);
  background: rgba(16, 183, 232, 0.08);
  transform: translateY(-1px);
}

.chart-map__control:disabled {
  opacity: 0.45;
  cursor: default;
}

.chart-map__stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 22, 39, 0.9);
}

.chart-map__canvas {
  width: 100%;
  min-height: 360px;
}

.chart-map__canvas .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 360px;
  background: rgba(11, 22, 39, 0.9);
}

.chart-map__canvas .leaflet-control-attribution {
  background: rgba(5, 12, 23, 0.82);
  color: #a9b7cd;
  backdrop-filter: blur(8px);
}

.chart-map__canvas .leaflet-control-attribution a {
  color: #d9e6fb;
}

.chart-map__canvas .leaflet-popup-content-wrapper,
.chart-map__canvas .leaflet-popup-tip {
  background: rgba(8, 14, 26, 0.94);
  color: #eef2f9;
}

.chart-map__canvas .leaflet-popup-content {
  margin: 12px 14px;
  line-height: 1.5;
}

.chart-map__canvas .leaflet-marker-icon,
.chart-map__canvas .leaflet-interactive {
  outline: none;
}

.chart-viewer__body .chart-map__stage,
.chart-viewer__body .chart-map__canvas,
.chart-viewer__body .chart-map__canvas .leaflet-container {
  min-height: 72vh;
}

.mermaid-card__stage {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 8px 12px 4px;
}

.mermaid-card__svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.mermaid-card__svg text,
.mermaid-card__svg tspan {
  fill: #eef2f9;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.chart-legend__swatch {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.chart-placeholder {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.chart-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chart-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.78);
  backdrop-filter: blur(6px);
}

.chart-viewer__panel {
  position: relative;
  z-index: 1;
  width: min(1280px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 13, 23, 0.98), rgba(5, 9, 17, 0.96));
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
}

.chart-viewer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-viewer__header h3 {
  margin: 0;
  font-size: 1rem;
  color: #eef2f9;
}

.chart-viewer__close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #d9e6fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-viewer__close:hover {
  color: #fff;
  border-color: rgba(16, 183, 232, 0.32);
}

.chart-viewer__body .chart-card {
  padding: 18px;
  margin: 0;
}

.chart-viewer__body .chart-card__svg {
  max-height: 78vh;
}

.chart-viewer__body .mermaid-card__stage {
  min-height: 0;
  padding-inline: 18px;
}

#toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#toast.is-error {
  border-color: rgba(255, 107, 107, 0.18);
}

#toast.is-success {
  border-color: rgba(74, 192, 138, 0.2);
}

.skeleton-placeholder {
  position: relative;
  overflow: hidden;
  margin: 8px 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: loading-shimmer 1.2s infinite;
}

.placeholder-chart-google {
  height: 300px;
}

.placeholder-mermaid {
  height: 180px;
}

.placeholder-raw-html {
  height: 120px;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
  }

  40% {
    transform: scale(1);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.45;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.75;
  }
}

@keyframes floatCore {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes promptGlow {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(243, 174, 33, 0.04),
      0 0 28px rgba(243, 174, 33, 0.12),
      0 0 44px rgba(16, 183, 232, 0.08);
  }

  50% {
    box-shadow:
      inset 0 0 0 1px rgba(243, 174, 33, 0.07),
      0 0 36px rgba(243, 174, 33, 0.16),
      0 0 54px rgba(16, 183, 232, 0.11);
  }
}

@keyframes loading-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes grid-drift {
  0% {
    transform: translateX(-2%);
  }

  50% {
    transform: translateX(2%);
  }

  100% {
    transform: translateX(-2%);
  }
}

@media (max-width: 1080px) {
  .main-stage {
    padding: 22px 20px 18px;
  }

  .stage-context-bar {
    top: 22px;
    left: 20px;
    width: min(420px, calc(100% - 40px));
  }

  .prompt-suggestions__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .app-shell {
    flex-direction: column;
  }

  .sidebar,
  .sidebar.collapsed {
    width: 100%;
    padding: 12px;
  }

  .sidebar.collapsed .brand-lockup,
  .sidebar.collapsed .history-entry__title,
  .sidebar.collapsed .history-entry__status,
  .sidebar.collapsed .sidebar-utility span,
  .sidebar.collapsed .user-meta {
    display: initial;
  }

  .sidebar.collapsed .sidebar-top {
    justify-content: space-between;
  }

  .sidebar.collapsed .brand-lockup {
    display: flex;
  }

  .sidebar.collapsed .history-entry,
  .sidebar.collapsed .sidebar-utility,
  .sidebar.collapsed .user-card {
    justify-content: initial;
  }

  .main-stage {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .stage-footer {
    width: min(100%, 660px);
    flex-direction: column;
    text-align: center;
  }

  .stage-footer__copy:last-child {
    text-align: center;
  }

  .voice-realtime-shell__panel {
    min-height: min(84dvh, 720px);
    padding: 28px 22px 22px;
    gap: 18px;
  }

  .voice-realtime-core {
    width: min(70vw, 390px);
  }
}

@media (max-width: 720px) {
  .prompt-toolbar {
    align-items: flex-start;
  }

  .plus-menu-wrap {
    margin-left: 0;
  }

  .stage-context-bar {
    justify-content: stretch;
  }

  .context-switcher {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
  }

  .context-switcher__label {
    padding-left: 2px;
  }

  .voice-realtime-shell {
    padding: 18px 14px;
  }

  .voice-realtime-shell__panel {
    width: 100%;
    min-height: calc(100dvh - 36px);
    padding: 24px 18px 20px;
    border-radius: 26px;
  }

  .voice-realtime-shell__context,
  .voice-realtime-shell__transcripts {
    grid-template-columns: 1fr;
  }

  .voice-realtime-core {
    width: min(86vw, 360px);
  }

  .voice-realtime-shell__signal strong {
    font-size: 1.35rem;
  }

  #chat-form {
    grid-template-columns: 1fr;
  }

  #sendBtn {
    width: 100%;
    height: 48px;
  }

  .prompt-suggestions__grid {
    grid-template-columns: 1fr;
  }

  .msg {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .main-stage {
    padding: 18px 14px 16px;
  }

  .stage-context-bar {
    top: 18px;
    left: 14px;
    width: calc(100% - 28px);
  }

  .voice-realtime-shell__panel {
    min-height: calc(100dvh - 24px);
    padding: 20px 14px 18px;
    border-radius: 22px;
  }

  .voice-realtime-shell__context-block,
  .voice-realtime-shell__transcript-card {
    padding: 14px;
    border-radius: 18px;
  }

  .voice-realtime-core {
    width: min(92vw, 330px);
  }

  .hero-shell {
    gap: 14px;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .agent-toolbar {
    flex-basis: 100%;
  }

  #toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(243, 174, 33, 0.24), transparent 30%),
    radial-gradient(circle at bottom right, rgba(16, 183, 232, 0.22), transparent 35%),
    linear-gradient(135deg, #07111f, #0f1e36 58%, #081320);
}

.login-card {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 24px;
  background: rgba(11, 17, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
}

.login-brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.login-brand__logo {
  width: 64px;
  height: 64px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #fff;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.login-form button {
  margin-top: 8px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, #f3ae21, #f97316);
  color: #08111f;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.login-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.22);
  filter: saturate(1.04);
}

.login-meta-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.login-meta-actions--stack {
  margin-top: 18px;
  justify-content: flex-start;
}

.login-meta-actions a {
  color: #9fd9ff;
  font-size: 0.94rem;
  text-decoration: none;
}

.login-meta-actions a:hover {
  color: #d5f0ff;
  text-decoration: underline;
}

.login-error {
  margin: 12px 0 0;
  color: #ff8b8b;
}

.login-success,
.login-info {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.login-success {
  color: #d7ffe5;
  background: rgba(14, 116, 57, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.login-info {
  color: #d9ecff;
  background: rgba(14, 70, 122, 0.24);
  border: 1px solid rgba(96, 165, 250, 0.24);
}

.password-policy {
  margin-top: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.password-policy__title {
  margin-bottom: 10px;
  color: #d7deea;
  font-size: 0.92rem;
}

.password-policy__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.password-policy__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #ff9a9a;
  background: rgba(127, 29, 29, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.14);
  transform: translateY(0);
  transition:
    color 0.26s ease,
    background-color 0.26s ease,
    border-color 0.26s ease,
    transform 0.26s ease,
    box-shadow 0.26s ease;
}

.password-policy__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffd5d5;
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.22);
  transition:
    color 0.26s ease,
    background-color 0.26s ease,
    border-color 0.26s ease,
    transform 0.24s ease;
}

.password-policy__item.is-idle {
  color: #b4bfd3;
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.password-policy__item.is-idle .password-policy__icon {
  color: #d9e2f2;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.18);
  transform: none;
}

.password-policy__item.is-valid {
  color: #bff7cf;
  background: rgba(20, 83, 45, 0.18);
  border-color: rgba(74, 222, 128, 0.24);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.08);
}

.password-policy__item.is-valid .password-policy__icon {
  color: #e8fff0;
  background: rgba(74, 222, 128, 0.18);
  border-color: rgba(74, 222, 128, 0.3);
  transform: scale(1.06);
}

.admin-body {
  min-height: 100vh;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 10%, rgba(243, 174, 33, 0.12), transparent 26%),
    radial-gradient(circle at 90% 8%, rgba(16, 183, 232, 0.1), transparent 24%),
    linear-gradient(180deg, #050912 0%, #07101c 100%);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: rgba(7, 12, 21, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav a,
.admin-link-button {
  padding: 11px 12px;
  border-radius: 13px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-nav a:hover,
.admin-link-button:hover {
  color: var(--text);
  border-color: rgba(243, 174, 33, 0.2);
}

.admin-sidebar__bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.admin-main {
  width: min(100%, 1360px);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.admin-hero {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(13, 21, 35, 0.95), rgba(9, 15, 26, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-soft);
}

.admin-eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-hero h1,
.admin-card h2 {
  margin: 0;
}

.admin-hero p,
.admin-card__header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-secondary-button,
.admin-form__actions button {
  padding: 11px 14px;
  border-radius: 12px;
  color: #07101c;
  font-weight: 700;
  background: linear-gradient(120deg, #f3ae21, #f97316);
}

.admin-secondary-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-status {
  padding: 12px 14px;
  border-radius: 14px;
  color: #d7e5ff;
  background: rgba(16, 183, 232, 0.08);
  border: 1px solid rgba(16, 183, 232, 0.14);
}

.admin-status.is-error {
  color: #ffd0d0;
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.22);
}

.admin-status.is-success {
  color: #d9ffe9;
  background: rgba(74, 192, 138, 0.1);
  border-color: rgba(74, 192, 138, 0.2);
}

.admin-kpis,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-kpi,
.admin-card {
  border-radius: 20px;
  background: rgba(10, 16, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-soft);
}

.admin-kpi {
  padding: 18px;
}

.admin-kpi span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.admin-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.admin-card--wide {
  grid-column: 1 / -1;
}

.admin-card__header {
  display: grid;
  gap: 2px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label,
.admin-form .admin-field {
  display: grid;
  gap: 7px;
  color: #c8d3e7;
  font-size: 0.84rem;
}

.admin-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.admin-field__label {
  color: #c8d3e7;
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-field--span-2 {
  grid-column: 1 / -1;
}

.admin-field--stack-end {
  align-self: end;
}

.admin-form input,
.admin-form select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.admin-form option {
  background: #0b1220;
}

.admin-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
}

.admin-checkbox input {
  width: auto;
  min-height: auto;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  white-space: pre-line;
}

.admin-table th {
  color: #93a4c4;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list-item,
.admin-empty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-list-item {
  display: grid;
  gap: 5px;
}

.admin-list-item span,
.admin-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #dfffea;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(74, 192, 138, 0.14);
  border: 1px solid rgba(74, 192, 138, 0.28);
}

.admin-badge.is-muted {
  color: #a9b5ca;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  border-radius: 14px;
  color: #fff;
  background: rgba(10, 16, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.is-error {
  border-color: rgba(255, 107, 107, 0.35);
}

.admin-toast.is-success {
  border-color: rgba(74, 192, 138, 0.35);
}

@media (max-width: 960px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-kpis,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-hero {
    flex-direction: column;
  }
}

.admin-nav__button {
  width: 100%;
  padding: 11px 12px;
  border-radius: 13px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: color var(--transition), border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.admin-nav__button:hover {
  color: var(--text);
  border-color: rgba(243, 174, 33, 0.2);
  transform: translateY(-1px);
}

.admin-nav__button.is-active {
  color: #111723;
  font-weight: 700;
  background: linear-gradient(135deg, #f3ae21, #f97316);
  border-color: rgba(243, 174, 33, 0.3);
}

.admin-tabs {
  display: grid;
  gap: 18px;
}

.admin-panel {
  display: none;
  gap: 16px;
}

.admin-panel.is-active {
  display: grid;
}

.admin-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-panel__header h2 {
  margin: 0;
}

.admin-panel__header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.admin-primary-button,
.admin-action-button,
.admin-icon-button,
.admin-nav__button {
  appearance: none;
}

.admin-primary-button {
  padding: 11px 14px;
  border-radius: 12px;
  color: #07101c;
  font-weight: 700;
  background: linear-gradient(120deg, #f3ae21, #f97316);
  box-shadow: 0 10px 24px rgba(243, 174, 33, 0.12);
}

.admin-primary-button:hover {
  transform: translateY(-1px);
}

.admin-form .admin-secondary-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.admin-card--tight {
  padding: 18px;
}

.admin-section-stack {
  display: grid;
  gap: 16px;
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-action-button {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color var(--transition), color var(--transition), background-color var(--transition), transform var(--transition);
}

.admin-action-button:hover {
  color: #fff;
  transform: translateY(-1px);
  border-color: rgba(243, 174, 33, 0.18);
}

.admin-action-button.is-danger {
  color: #ffd4d4;
  border-color: rgba(255, 107, 107, 0.24);
  background: rgba(255, 107, 107, 0.08);
}

.admin-action-button.is-success {
  color: #d9ffe9;
  border-color: rgba(74, 192, 138, 0.24);
  background: rgba(74, 192, 138, 0.08);
}

.admin-table__empty {
  color: var(--muted);
  text-align: center !important;
}

.admin-mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-mini-badge,
.admin-muted-inline {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
}

.admin-mini-badge {
  color: #dae7ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-muted-inline {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.admin-form-help {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.admin-password-policy {
  margin-top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.09);
}

.admin-dual-list {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(280px, 1fr) 38px minmax(280px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.admin-dual-list__column {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-dual-list__caption {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-dual-list__select {
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  scrollbar-gutter: stable;
}

.admin-dual-list__select option {
  padding: 6px 8px;
}

.admin-dual-list__controls {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-content: center;
}

.admin-dual-list__button {
  width: 38px;
  height: 34px;
  border-radius: 10px;
  color: #c8d3e7;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color var(--transition), color var(--transition), background-color var(--transition), transform var(--transition);
}

.admin-dual-list__button:hover {
  color: #fff;
  border-color: rgba(243, 174, 33, 0.22);
  background: rgba(243, 174, 33, 0.08);
  transform: translateY(-1px);
}

.admin-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(8px);
}

.admin-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - clamp(32px, 6vw, 96px)));
  max-height: calc(100vh - clamp(24px, 4vw, 56px));
  padding: clamp(18px, 2vw, 28px);
  overflow: auto;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 17, 28, 0.98), rgba(8, 13, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

.admin-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-code {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #d7e5ff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .admin-panel__header,
  .admin-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-form__grid {
    grid-template-columns: 1fr;
  }

  .admin-field--span-2 {
    grid-column: auto;
  }

  .admin-dual-list {
    grid-template-columns: 1fr;
  }

  .admin-dual-list__controls {
    grid-auto-flow: column;
    justify-content: flex-start;
  }

  .admin-table-actions {
    min-width: 170px;
  }

  .admin-modal__dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 16px;
  }
}
