
/* Selected active session in sidebar: Royal Stormwind Velvet & Gold Hairline */
html.theme-alliance [class*="border-emerald-500"],
html.theme-alliance .border-emerald-500\/50 {
  border-color: rgba(212, 175, 55, 0.5) !important;
}
html.theme-alliance [class*="bg-emerald-500/"],
html.theme-alliance .bg-emerald-500\/15 {
  background: linear-gradient(90deg, rgba(28, 56, 115, 0.55) 0%, rgba(12, 22, 44, 0.35) 100%) !important;
  border-left: 3px solid #D4AF37 !important;
}
html.theme-alliance [class*="ring-emerald-500"],
html.theme-alliance .ring-emerald-500\/30 {
  --tw-ring-color: rgba(212, 175, 55, 0.35) !important;
}

/* Unselected session hover state */
html.theme-alliance div[class*="border-border/40"]:hover,
html.theme-alliance div[class*="hover:bg-muted/40"]:hover {
  background-color: rgba(18, 32, 62, 0.4) !important;
  border-color: rgba(212, 175, 55, 0.25) !important;
}


/* =========================================================================
   ZERO-GREEN MASTER RULE: ALLIANCE PALADIN GOLD & ROYAL SAPPHIRE CRESTS
   Transform all green AVO & Antigravity logos into Noble Paladin Gold (#D4AF37)
   ========================================================================= */
html.theme-alliance img[src*="avo-logo"],
html[data-theme="alliance"] img[src*="avo-logo"],
.theme-alliance img[src*="avo-logo"],
html.theme-alliance [class*="w-72"] img[src*="avo-logo"],
html[data-theme="alliance"] [class*="w-72"] img[src*="avo-logo"],
.theme-alliance [class*="w-72"] img[src*="avo-logo"],
html.theme-alliance header img[src*="avo-logo"],
html[data-theme="alliance"] header img[src*="avo-logo"] {
  filter: brightness(0) invert(72%) sepia(75%) saturate(550%) hue-rotate(5deg) brightness(102%) contrast(95%) drop-shadow(0 0 6px rgba(212, 175, 55, 0.65)) !important;
  transition: filter 220ms ease, transform 220ms ease !important;
}

html.theme-alliance img[src*="avo-logo"]:hover,
html[data-theme="alliance"] img[src*="avo-logo"]:hover,
.theme-alliance img[src*="avo-logo"]:hover,
html.theme-alliance [class*="w-72"] img[src*="avo-logo"]:hover,
html[data-theme="alliance"] [class*="w-72"] img[src*="avo-logo"]:hover {
  filter: brightness(0) invert(85%) sepia(80%) saturate(600%) hue-rotate(8deg) brightness(115%) contrast(98%) drop-shadow(0 0 12px rgba(243, 216, 137, 0.85)) !important;
}

/* Header logo can have subtle gold border */
html.theme-alliance div:has(> img[src*="avo-logo"].h-7) {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4)) !important;
}


/* =========================================================================
   WARCRAFT: ALLIANCE (STORMWIND) V2 MASTER REFINEMENT
   Zero Slop / High-Fidelity Blizzard SOTD Standard
   Section 1: Atmospheric Flag Backdrop, Cinematic Blur & Vignette Stage
   ========================================================================= */

/* 1.0 Global Design Tokens for Alliance Background & Atmospheric Layer */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) {
  --background: 222 47% 6% !important;
  --alliance-flag-blur: 3px;
  --alliance-vignette-center: rgba(8, 14, 26, 0.70);
  --alliance-vignette-mid: rgba(6, 10, 18, 0.86);
  --alliance-vignette-edge: #050811;
}

/* 1.1 Structural Panel Transparency - Guarantees Zero-Div Backdrop Block */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) body,
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) #root,
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) #root > div,
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) main,
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) .bg-background,
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) [class*=bg-background],
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) [data-slot=chat-feed],
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) .chat-messages-pane,
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) div[class*=min-h-0][class*=flex-1] {
  background-color: transparent !important;
}

/* 1.2 Body Root Atmospheric Stage */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) body {
  background-color: #060912 !important;
  color: #DDE7F8 !important;
  position: relative !important;
}

/* 1.3 Global Viewport Ambient Flag Backdrop (Stormwind Lion & Silk Banners) */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) body::before {
  content:  !important;
  position: fixed !important;
  inset: -10px !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background-image:
    radial-gradient(ellipse 68% 62% at calc(50% + 144px) 45%, rgba(8, 14, 26, 0.68) 0%, rgba(6, 10, 18, 0.86) 62%, #050811 100%),
    linear-gradient(to bottom, rgba(5, 8, 17, 0.90) 0%, rgba(5, 8, 17, 0.20) 15%, rgba(5, 8, 17, 0.30) 85%, #050811 100%),
    url(/themes/alliance/flag.jpg) !important;
  background-position: center center, center center, calc(50% + 144px) 45% !important;
  background-size: cover, 100% 100%, cover !important;
  background-repeat: no-repeat !important;
  filter: blur(3px) !important;
  transform: scale(1.02) !important;
  opacity: 0.92 !important;
  will-change: transform;
}

@media (max-width: 768px) {
  :is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) body::before {
    background-image:
      radial-gradient(ellipse 75% 70% at 50% 45%, rgba(8, 14, 26, 0.70) 0%, rgba(6, 10, 18, 0.88) 65%, #050811 100%),
      linear-gradient(to bottom, rgba(5, 8, 17, 0.90) 0%, rgba(5, 8, 17, 0.20) 15%, rgba(5, 8, 17, 0.30) 85%, #050811 100%),
      url(/themes/alliance/flag.jpg) !important;
    background-position: center center, center center, center 45% !important;
  }
}

/* 1.4 Golden Stormwind Crest Watermark with Arcane Blue & Holy Gold Halos */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) body::after {
  content:  !important;
  position: fixed !important;
  top: 45% !important;
  left: calc(50% + 144px) !important;
  transform: translate(-50%, -50%) !important;
  width: min(500px, 46vw) !important;
  aspect-ratio: 366 / 400 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background: url(/themes/alliance/crest.png) center/contain no-repeat !important;
  opacity: 0.28 !important;
  filter: drop-shadow(0 0 35px rgba(212, 175, 55, 0.38)) drop-shadow(0 0 75px rgba(37, 99, 235, 0.42)) !important;
}

@media (max-width: 768px) {
  :is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) body::after {
    left: 50% !important;
    width: min(320px, 75vw) !important;
    opacity: 0.22 !important;
  }
}

/* 1.5 Direct Chat Messages Pane Anchor (Bulletproof Local Stage) */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) .chat-messages-pane {
  position: relative !important;
  background-color: transparent !important;
}

:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) .chat-messages-pane::before {
  content:  !important;
  position: fixed !important;
  inset: -8px !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background-image:
    radial-gradient(ellipse 68% 62% at calc(50% + 144px) 45%, rgba(8, 14, 26, 0.70) 0%, rgba(6, 10, 18, 0.88) 62%, #050811 100%),
    linear-gradient(to bottom, rgba(5, 8, 17, 0.92) 0%, rgba(5, 8, 17, 0.20) 15%, rgba(5, 8, 17, 0.30) 85%, #050811 100%),
    url(/themes/alliance/flag.jpg) !important;
  background-position: center center, center center, calc(50% + 144px) 45% !important;
  background-size: cover, 100% 100%, cover !important;
  background-repeat: no-repeat !important;
  filter: blur(3px) !important;
  transform: scale(1.02) !important;
  opacity: 0.90 !important;
}

@media (max-width: 768px) {
  :is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) .chat-messages-pane::before {
    background-image:
      radial-gradient(ellipse 75% 70% at 50% 45%, rgba(8, 14, 26, 0.72) 0%, rgba(6, 10, 18, 0.90) 65%, #050811 100%),
      linear-gradient(to bottom, rgba(5, 8, 17, 0.92) 0%, rgba(5, 8, 17, 0.20) 15%, rgba(5, 8, 17, 0.30) 85%, #050811 100%),
      url(/themes/alliance/flag.jpg) !important;
    background-position: center center, center center, center 45% !important;
  }
}

/* 1.6 Message Stream Elevation: Messages Float Crystal-Clear on z-index 1 */
:is(html.theme-alliance, html[data-theme=alliance], .theme-alliance) .chat-messages-pane > * {
  position: relative !important;
  z-index: 1 !important;
}

/* --- 2. SIDEBAR (STORMWIND CITADEL STEEL & PALADIN GOLD) --- */

html.theme-alliance aside,
html.theme-alliance [data-slot="sidebar"],
html.theme-alliance .border-r {
  background-color: rgba(7, 12, 22, 0.92) !important;
  border-color: rgba(212, 175, 55, 0.15) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Project picker card */
html.theme-alliance .bg-muted,
html.theme-alliance .bg-card,
html.theme-alliance [class*="bg-card"] {
  background-color: rgba(13, 20, 36, 0.75) !important;
  border-color: rgba(212, 175, 55, 0.2) !important;
}

/* "Новый сеанс" Paladin Gold Crest Button */
html.theme-alliance button:has-text("Новый сеанс"),
html.theme-alliance button.bg-primary,
html.theme-alliance .bg-primary {
  background: linear-gradient(135deg, #F5D36C 0%, #D4AF37 50%, #A07818 100%) !important;
  color: #060A14 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 240, 180, 0.6) !important;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: all 0.2s ease !important;
}
html.theme-alliance button:has-text("Новый сеанс"):hover,
html.theme-alliance button.bg-primary:hover {
  background: linear-gradient(135deg, #FFE082 0%, #E5C158 50%, #B88B22 100%) !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-1px) !important;
}

/* --- 3. ZERO-GREEN LAW: REPLACE ALL EMERALD ACCENTS WITH SAPPHIRE GEMS --- */
html.theme-alliance .bg-emerald-500,
html.theme-alliance .bg-green-500,
html.theme-alliance span.rounded-full[class*="bg-emerald"],
html.theme-alliance [class*="bg-emerald-500"] {
  background-color: #3B82F6 !important;
  box-shadow: 0 0 8px #60A5FA, 0 0 14px rgba(59, 130, 246, 0.6) !important;
}

html.theme-alliance .text-emerald-400,
html.theme-alliance .text-emerald-500,
html.theme-alliance .text-green-500,
html.theme-alliance [class*="text-emerald"] {
  color: #60A5FA !important;
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.5) !important;
}

html.theme-alliance .border-emerald-500,
html.theme-alliance [class*="border-emerald"] {
  border-color: rgba(96, 165, 250, 0.4) !important;
}

/* Active session item in sidebar */
html.theme-alliance [data-session-id].active,
html.theme-alliance div[class*="bg-accent"]:has([class*="truncate"]) {
  background: linear-gradient(90deg, rgba(30, 64, 130, 0.55) 0%, rgba(14, 25, 50, 0.35) 100%) !important;
  border-left: 3px solid #D4AF37 !important;
  color: #FFFFFF !important;
}

/* Notification badges (e.g. 23) */
html.theme-alliance span.bg-emerald-500.text-white,
html.theme-alliance [class*="bg-emerald-500"][class*="rounded-full"] {
  background: linear-gradient(135deg, #D4AF37 0%, #A07818 100%) !important;
  color: #060A14 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5) !important;
}

/* AVO logo in sidebar header */
html.theme-alliance svg:has([fill*="emerald"]),
html.theme-alliance [class*="text-emerald"] svg {
  color: #D4AF37 !important;
}

/* --- 4. CHAT FEED & MESSAGE BUBBLES --- */
/* User message bubble */
html.theme-alliance .rounded-br-md.bg-blue-600,
html.theme-alliance div[class*="rounded-br-md"],
html.theme-alliance .dark .rounded-br-md {
  background: linear-gradient(135deg, #101C34 0%, #0A1222 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.42) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  color: #E8EEF8 !important;
  border-radius: 14px 14px 3px 14px !important;
}

/* Assistant tool cards */
html.theme-alliance div:has(> [class*="font-mono"]),
html.theme-alliance div[class*="rounded-lg"][class*="border"]:has(> div:has-text("Команда")),
html.theme-alliance div[class*="rounded-lg"][class*="border"]:has(> div:has-text("Чтение файла")) {
  background: rgba(10, 16, 28, 0.8) !important;
  border-color: rgba(212, 175, 55, 0.25) !important;
}

/* Thinking block (Kirin Tor Arcane Academy) */
html.theme-alliance div:has-text("Размышление:") {
  border-color: rgba(139, 92, 246, 0.4) !important;
  background: rgba(18, 14, 34, 0.65) !important;
}

/* --- 5. INPUT COMPOSER (HOLY LIGHT AURA & LION SEND BUTTON) --- */
html.theme-alliance [data-slot="prompt-input"],
html.theme-alliance div[class*="border-input"]:has(textarea) {
  background: rgba(10, 16, 28, 0.85) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

html.theme-alliance [data-slot="prompt-input"]:focus-within,
html.theme-alliance div[class*="border-input"]:has(textarea:focus) {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.5), 0 0 24px rgba(212, 175, 55, 0.22) !important;
}

/* Send button: Golden Lion Crest Sunburst */
html.theme-alliance button:has(svg.lucide-arrow-up),
html.theme-alliance button[aria-label*="Отправить"],
html.theme-alliance button[class*="rounded-full"]:has(svg path[d*="M12 19V5"]) {
  background: linear-gradient(135deg, #F5D36C 0%, #D4AF37 50%, #A07818 100%) !important;
  color: #060A14 !important;
  border: 1px solid rgba(255, 240, 180, 0.6) !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.5) !important;
}

html.theme-alliance button:has(svg.lucide-arrow-up):hover {
  background: linear-gradient(135deg, #FFE082 0%, #E5C158 50%, #B88B22 100%) !important;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.8) !important;
  transform: scale(1.05) !important;
}

/* Model pill in input composer */
html.theme-alliance div[class*="rounded-full"]:has-text("Argon"),
html.theme-alliance button:has-text("Argon") {
  background: rgba(24, 46, 88, 0.55) !important;
  border: 1px solid rgba(96, 165, 250, 0.35) !important;
  color: #DDE7FA !important;
}

/* Floating "Команда" button */
html.theme-alliance button:has-text("Команда") {
  background: rgba(14, 22, 38, 0.85) !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
  color: #E5C158 !important;
}
html.theme-alliance button:has-text("Команда"):hover {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.4) !important;
}



/* ==========================================================================
   WARCRAFT: ALLIANCE (STORMWIND) COMPREHENSIVE THEME SYSTEM
   AVOdigital Studio Standard — AAA Game UI Architecture
   Zero Bleed Rule: All styles scoped strictly to:
   :is(html.theme-alliance, [data-theme="alliance"], .theme-alliance)
   ========================================================================== */


/* --- Module: alliance-chat-feed.css --- */
/**
 * ════════════════════════════════════════════════════════════════════════════
 * WARCRAFT: ALLIANCE — CHAT FEED & DIALOGUE CHOREOGRAPHY SPECIFICATION
 * Module: Chat Feed, Message Bubbles, Typography & Reasoning Accordion
 * Scope: 100% Isolated under `html[data-theme="alliance"]`, `[data-theme="alliance"]`, `.theme-alliance`
 * ════════════════════════════════════════════════════════════════════════════
 */

/* ─── 0. KEYFRAMES ─── */
@keyframes allianceArcanePulse {
  0%, 100% {
    opacity: 0.85;
    filter: drop-shadow(0 0 2px rgba(96, 165, 250, 0.4));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 7px rgba(96, 165, 250, 0.85)) drop-shadow(0 0 12px rgba(218, 165, 32, 0.45));
  }
}

@keyframes allianceSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes allianceToolShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ─── 1. USER MESSAGE BUBBLE (Stormwind Plate Steel & Polished Gold Bevel) ─── */

/* Container alignment and spacing */
html[data-theme="alliance"] .chat-message.user,
[data-theme="alliance"] .chat-message.user,
.theme-alliance .chat-message.user {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 0.85rem !important;
  margin-bottom: 0.85rem !important;
}

/* User message speech bubble */
html[data-theme="alliance"] .chat-message.user .rounded-br-md.bg-blue-600,
html[data-theme="alliance"] .chat-message.user [class*="bg-blue-600"]:not(.rounded-full),
html[data-theme="alliance"] .chat-message.user [class*="rounded-2xl"],
[data-theme="alliance"] .chat-message.user .rounded-br-md.bg-blue-600,
[data-theme="alliance"] .chat-message.user [class*="bg-blue-600"]:not(.rounded-full),
[data-theme="alliance"] .chat-message.user [class*="rounded-2xl"],
.theme-alliance .chat-message.user .rounded-br-md.bg-blue-600,
.theme-alliance .chat-message.user [class*="bg-blue-600"]:not(.rounded-full),
.theme-alliance .chat-message.user [class*="rounded-2xl"] {
  background: linear-gradient(145deg, #162032 0%, #101726 55%, #0B101B 100%) !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(218, 165, 32, 0.42) !important;
  border-radius: 16px 16px 4px 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(212, 168, 67, 0.18),
              inset 0 1px 0 rgba(255, 230, 150, 0.16),
              inset 0 -1px 0 rgba(0, 0, 0, 0.4) !important;
  padding: 12px 18px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.935rem !important;
  line-height: 1.58 !important;
  letter-spacing: -0.01em !important;
  max-width: 85% !important;
  word-break: break-word !important;
  position: relative !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

html[data-theme="alliance"] .chat-message.user .rounded-br-md.bg-blue-600:hover,
[data-theme="alliance"] .chat-message.user .rounded-br-md.bg-blue-600:hover,
.theme-alliance .chat-message.user .rounded-br-md.bg-blue-600:hover {
  border-color: rgba(235, 185, 55, 0.65) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55),
              0 0 12px rgba(200, 153, 38, 0.25),
              inset 0 1px 0 rgba(255, 230, 150, 0.25) !important;
}

/* User text selection */
html[data-theme="alliance"] .chat-message.user ::selection,
[data-theme="alliance"] .chat-message.user ::selection,
.theme-alliance .chat-message.user ::selection {
  background: rgba(200, 153, 38, 0.35) !important;
  color: #FFFFFF !important;
}

/* Inline code inside user message */
html[data-theme="alliance"] .chat-message.user code,
[data-theme="alliance"] .chat-message.user code,
.theme-alliance .chat-message.user code {
  background: rgba(218, 165, 32, 0.14) !important;
  color: #F0D38D !important;
  border: 1px solid rgba(218, 165, 32, 0.3) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.88em !important;
}

/* User Avatar (Heraldic Stormwind Shield / Crest Icon) */
html[data-theme="alliance"] .chat-message.user .rounded-full.bg-blue-600,
html[data-theme="alliance"] .chat-message.user [class*="rounded-full"][class*="bg-blue-600"],
[data-theme="alliance"] .chat-message.user .rounded-full.bg-blue-600,
[data-theme="alliance"] .chat-message.user [class*="rounded-full"][class*="bg-blue-600"],
.theme-alliance .chat-message.user .rounded-full.bg-blue-600,
.theme-alliance .chat-message.user [class*="rounded-full"][class*="bg-blue-600"] {
  background: linear-gradient(135deg, #1A2438 0%, #0F1626 100%) !important;
  border: 1.5px solid #C89926 !important;
  color: #F0D38D !important;
  box-shadow: 0 0 12px rgba(200, 153, 38, 0.35),
              inset 0 0 6px rgba(200, 153, 38, 0.25) !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em !important;
}

/* User message footer: Copy button & timestamp */
html[data-theme="alliance"] .chat-message.user [class*="text-blue-100"],
[data-theme="alliance"] .chat-message.user [class*="text-blue-100"],
.theme-alliance .chat-message.user [class*="text-blue-100"] {
  color: rgba(214, 226, 245, 0.65) !important;
  font-size: 0.75rem !important;
}

html[data-theme="alliance"] .chat-message.user [class*="text-blue-100"] button,
[data-theme="alliance"] .chat-message.user [class*="text-blue-100"] button,
.theme-alliance .chat-message.user [class*="text-blue-100"] button {
  color: rgba(214, 226, 245, 0.7) !important;
  transition: color 0.15s ease !important;
}

html[data-theme="alliance"] .chat-message.user [class*="text-blue-100"] button:hover,
[data-theme="alliance"] .chat-message.user [class*="text-blue-100"] button:hover,
.theme-alliance .chat-message.user [class*="text-blue-100"] button:hover {
  color: #F0D38D !important;
}

/* ─── 2. AGENT MESSAGES (Seamless Flow, Royal Archive Typography) ─── */

/* Seamless container */
html[data-theme="alliance"] .chat-message.assistant,
[data-theme="alliance"] .chat-message.assistant,
.theme-alliance .chat-message.assistant {
  background: transparent !important;
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
  position: relative !important;
}

/* Assistant Header / Avatar & Title */
html[data-theme="alliance"] .chat-message.assistant .mb-2.flex.items-center,
[data-theme="alliance"] .chat-message.assistant .mb-2.flex.items-center,
.theme-alliance .chat-message.assistant .mb-2.flex.items-center {
  gap: 0.65rem !important;
}

html[data-theme="alliance"] .chat-message.assistant .rounded-full.p-1,
[data-theme="alliance"] .chat-message.assistant .rounded-full.p-1,
.theme-alliance .chat-message.assistant .rounded-full.p-1 {
  background: linear-gradient(135deg, #172134 0%, #0F1626 100%) !important;
  border: 1px solid rgba(218, 165, 32, 0.45) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="alliance"] .chat-message.assistant .text-sm.font-medium,
[data-theme="alliance"] .chat-message.assistant .text-sm.font-medium,
.theme-alliance .chat-message.assistant .text-sm.font-medium {
  color: #F1F5F9 !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

/* Markdown typography in Agent messages */
html[data-theme="alliance"] .chat-message.assistant .prose,
[data-theme="alliance"] .chat-message.assistant .prose,
.theme-alliance .chat-message.assistant .prose {
  color: #D6DEEB !important;
  line-height: 1.68 !important;
  font-size: 0.945rem !important;
  max-width: none !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose p,
[data-theme="alliance"] .chat-message.assistant .prose p,
.theme-alliance .chat-message.assistant .prose p {
  color: #D6DEEB !important;
  margin-top: 0.75em !important;
  margin-bottom: 0.75em !important;
}

/* Headings H1 to H6 */
html[data-theme="alliance"] .chat-message.assistant .prose h1,
[data-theme="alliance"] .chat-message.assistant .prose h1,
.theme-alliance .chat-message.assistant .prose h1 {
  color: #F6E6BC !important;
  font-weight: 700 !important;
  font-size: 1.45rem !important;
  letter-spacing: -0.02em !important;
  border-bottom: 1px solid rgba(218, 165, 32, 0.3) !important;
  padding-bottom: 0.45rem !important;
  margin-top: 1.6rem !important;
  margin-bottom: 0.8rem !important;
  display: flex !important;
  align-items: center !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose h2,
[data-theme="alliance"] .chat-message.assistant .prose h2,
.theme-alliance .chat-message.assistant .prose h2 {
  color: #EED08E !important;
  font-weight: 650 !important;
  font-size: 1.25rem !important;
  letter-spacing: -0.015em !important;
  margin-top: 1.4rem !important;
  margin-bottom: 0.65rem !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose h3,
[data-theme="alliance"] .chat-message.assistant .prose h3,
.theme-alliance .chat-message.assistant .prose h3 {
  color: #DEB968 !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin-top: 1.2rem !important;
  margin-bottom: 0.5rem !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose h4,
html[data-theme="alliance"] .chat-message.assistant .prose h5,
html[data-theme="alliance"] .chat-message.assistant .prose h6,
[data-theme="alliance"] .chat-message.assistant .prose h4,
[data-theme="alliance"] .chat-message.assistant .prose h5,
[data-theme="alliance"] .chat-message.assistant .prose h6,
.theme-alliance .chat-message.assistant .prose h4,
.theme-alliance .chat-message.assistant .prose h5,
.theme-alliance .chat-message.assistant .prose h6 {
  color: #CFB069 !important;
  font-weight: 600 !important;
  font-size: 0.98rem !important;
  letter-spacing: 0.02em !important;
  margin-top: 1rem !important;
  margin-bottom: 0.45rem !important;
}

/* Bold / Strong */
html[data-theme="alliance"] .chat-message.assistant .prose strong,
[data-theme="alliance"] .chat-message.assistant .prose strong,
.theme-alliance .chat-message.assistant .prose strong {
  color: #FFFFFF !important;
  font-weight: 650 !important;
}

/* Links (Royal Alliance Sapphire with Gold Glow on Hover) */
html[data-theme="alliance"] .chat-message.assistant .prose a,
[data-theme="alliance"] .chat-message.assistant .prose a,
.theme-alliance .chat-message.assistant .prose a {
  color: #5EA2FF !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(94, 162, 255, 0.4) !important;
  padding-bottom: 1px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose a:hover,
[data-theme="alliance"] .chat-message.assistant .prose a:hover,
.theme-alliance .chat-message.assistant .prose a:hover {
  color: #F0D38D !important;
  border-bottom-color: #F0D38D !important;
  text-shadow: 0 0 8px rgba(240, 211, 141, 0.45) !important;
}

/* Blockquotes (Illuminated Manuscript / Heraldic Order) */
html[data-theme="alliance"] .chat-message.assistant .prose blockquote,
[data-theme="alliance"] .chat-message.assistant .prose blockquote,
.theme-alliance .chat-message.assistant .prose blockquote {
  border-left: 3px solid #C89926 !important;
  background: linear-gradient(90deg, rgba(200, 153, 38, 0.12) 0%, rgba(20, 28, 44, 0.4) 100%) !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 10px 18px !important;
  color: #CBD5E1 !important;
  font-style: italic !important;
  margin: 1rem 0 !important;
  box-shadow: inset 1px 0 0 rgba(255, 230, 150, 0.2) !important;
}

/* Lists */
html[data-theme="alliance"] .chat-message.assistant .prose ul,
html[data-theme="alliance"] .chat-message.assistant .prose ol,
[data-theme="alliance"] .chat-message.assistant .prose ul,
[data-theme="alliance"] .chat-message.assistant .prose ol,
.theme-alliance .chat-message.assistant .prose ul,
.theme-alliance .chat-message.assistant .prose ol {
  margin-top: 0.6em !important;
  margin-bottom: 0.6em !important;
  padding-left: 1.4em !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose li,
[data-theme="alliance"] .chat-message.assistant .prose li,
.theme-alliance .chat-message.assistant .prose li {
  margin-top: 0.35em !important;
  margin-bottom: 0.35em !important;
  line-height: 1.62 !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose ul > li::marker,
[data-theme="alliance"] .chat-message.assistant .prose ul > li::marker,
.theme-alliance .chat-message.assistant .prose ul > li::marker {
  color: #DEB968 !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose ol > li::marker,
[data-theme="alliance"] .chat-message.assistant .prose ol > li::marker,
.theme-alliance .chat-message.assistant .prose ol > li::marker {
  color: #DEB968 !important;
  font-weight: 600 !important;
}

/* Code Blocks & Preformatted Text */
html[data-theme="alliance"] .chat-message.assistant .prose pre,
[data-theme="alliance"] .chat-message.assistant .prose pre,
.theme-alliance .chat-message.assistant .prose pre {
  background: #0D131F !important;
  border: 1px solid rgba(218, 165, 32, 0.22) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  padding: 1rem 1.25rem !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose :not(pre) > code,
[data-theme="alliance"] .chat-message.assistant .prose :not(pre) > code,
.theme-alliance .chat-message.assistant .prose :not(pre) > code {
  background: rgba(18, 26, 42, 0.9) !important;
  color: #E3BB66 !important;
  border: 1px solid rgba(218, 165, 32, 0.25) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-size: 0.86em !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* Tables (Ironforge Ledger / Tactical Grid) */
html[data-theme="alliance"] .chat-message.assistant .prose table,
[data-theme="alliance"] .chat-message.assistant .prose table,
.theme-alliance .chat-message.assistant .prose table {
  border: 1px solid rgba(218, 165, 32, 0.25) !important;
  border-radius: 6px !important;
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 1.25rem 0 !important;
  overflow: hidden !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose th,
[data-theme="alliance"] .chat-message.assistant .prose th,
.theme-alliance .chat-message.assistant .prose th {
  background: rgba(20, 29, 46, 0.92) !important;
  color: #F0D38D !important;
  border-bottom: 2px solid rgba(218, 165, 32, 0.35) !important;
  text-transform: uppercase !important;
  font-size: 0.76rem !important;
  letter-spacing: 0.05em !important;
  padding: 9px 14px !important;
  text-align: left !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose td,
[data-theme="alliance"] .chat-message.assistant .prose td,
.theme-alliance .chat-message.assistant .prose td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  padding: 9px 14px !important;
  color: #CBD5E1 !important;
  font-size: 0.88rem !important;
}

html[data-theme="alliance"] .chat-message.assistant .prose tr:hover td,
[data-theme="alliance"] .chat-message.assistant .prose tr:hover td,
.theme-alliance .chat-message.assistant .prose tr:hover td {
  background: rgba(30, 44, 70, 0.4) !important;
}

/* Horizontal Rule divider */
html[data-theme="alliance"] .chat-message.assistant .prose hr,
[data-theme="alliance"] .chat-message.assistant .prose hr,
.theme-alliance .chat-message.assistant .prose hr {
  border: none !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.4), transparent) !important;
  margin: 1.75rem 0 !important;
}

/* ─── 3. THINKING / CHAIN-OF-THOUGHT ACCORDION (Dalaran Arcane Scroll) ─── */

/* Trigger Button / Accordion Header */
html[data-theme="alliance"] [data-radix-collapsible-root] > [data-radix-collapsible-trigger],
html[data-theme="alliance"] .chat-message [data-radix-collapsible-trigger],
html[data-theme="alliance"] .chat-message button:has(.rotate-180),
html[data-theme="alliance"] .chat-message button:has(.rotate-0),
[data-theme="alliance"] [data-radix-collapsible-root] > [data-radix-collapsible-trigger],
[data-theme="alliance"] .chat-message [data-radix-collapsible-trigger],
[data-theme="alliance"] .chat-message button:has(.rotate-180),
[data-theme="alliance"] .chat-message button:has(.rotate-0),
.theme-alliance [data-radix-collapsible-root] > [data-radix-collapsible-trigger],
.theme-alliance .chat-message [data-radix-collapsible-trigger],
.theme-alliance .chat-message button:has(.rotate-180),
.theme-alliance .chat-message button:has(.rotate-0) {
  background: linear-gradient(90deg, rgba(16, 23, 36, 0.88) 0%, rgba(20, 31, 51, 0.65) 100%) !important;
  border: 1px solid rgba(80, 120, 180, 0.28) !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  color: #94A3B8 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  font-size: 0.84rem !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  user-select: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="alliance"] [data-radix-collapsible-root] > [data-radix-collapsible-trigger]:hover,
html[data-theme="alliance"] .chat-message [data-radix-collapsible-trigger]:hover,
html[data-theme="alliance"] .chat-message button:has(.rotate-180):hover,
html[data-theme="alliance"] .chat-message button:has(.rotate-0):hover,
[data-theme="alliance"] [data-radix-collapsible-root] > [data-radix-collapsible-trigger]:hover,
[data-theme="alliance"] .chat-message [data-radix-collapsible-trigger]:hover,
[data-theme="alliance"] .chat-message button:has(.rotate-180):hover,
[data-theme="alliance"] .chat-message button:has(.rotate-0):hover,
.theme-alliance [data-radix-collapsible-root] > [data-radix-collapsible-trigger]:hover,
.theme-alliance .chat-message [data-radix-collapsible-trigger]:hover,
.theme-alliance .chat-message button:has(.rotate-180):hover,
.theme-alliance .chat-message button:has(.rotate-0):hover {
  background: linear-gradient(90deg, rgba(22, 33, 54, 0.95) 0%, rgba(28, 44, 74, 0.78) 100%) !important;
  border-color: rgba(218, 165, 32, 0.45) !important;
  color: #E2E8F0 !important;
  box-shadow: 0 3px 14px rgba(59, 130, 246, 0.18),
              0 0 8px rgba(218, 165, 32, 0.12) !important;
}

/* Thinking spark / icon pulse */
html[data-theme="alliance"] [data-radix-collapsible-trigger] svg:first-child,
[data-theme="alliance"] [data-radix-collapsible-trigger] svg:first-child,
.theme-alliance [data-radix-collapsible-trigger] svg:first-child {
  color: #5EA2FF !important;
  animation: allianceArcanePulse 2.8s ease-in-out infinite !important;
}

/* Chevron arrow rotation */
html[data-theme="alliance"] [data-radix-collapsible-trigger] svg:last-child,
[data-theme="alliance"] [data-radix-collapsible-trigger] svg:last-child,
.theme-alliance [data-radix-collapsible-trigger] svg:last-child {
  color: #DEB968 !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Thinking timer text and badges */
html[data-theme="alliance"] [data-radix-collapsible-trigger] p,
[data-theme="alliance"] [data-radix-collapsible-trigger] p,
.theme-alliance [data-radix-collapsible-trigger] p {
  color: #CBD5E1 !important;
  font-size: 0.83rem !important;
  font-weight: 500 !important;
}

/* Reasoning content body */
html[data-theme="alliance"] [data-radix-collapsible-content],
html[data-theme="alliance"] .chat-message [data-radix-collapsible-content],
[data-theme="alliance"] [data-radix-collapsible-content],
[data-theme="alliance"] .chat-message [data-radix-collapsible-content],
.theme-alliance [data-radix-collapsible-content],
.theme-alliance .chat-message [data-radix-collapsible-content] {
  margin-top: 8px !important;
  padding: 12px 18px !important;
  background: rgba(12, 17, 27, 0.78) !important;
  border-left: 2px solid rgba(218, 165, 32, 0.45) !important;
  border-radius: 0 8px 8px 0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03),
              0 4px 16px rgba(0, 0, 0, 0.35) !important;
  animation: allianceSlideDown 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Soft silver-steel color for thought text */
html[data-theme="alliance"] [data-radix-collapsible-content],
html[data-theme="alliance"] [data-radix-collapsible-content] .prose,
html[data-theme="alliance"] [data-radix-collapsible-content] p,
html[data-theme="alliance"] [data-radix-collapsible-content] div,
[data-theme="alliance"] [data-radix-collapsible-content],
[data-theme="alliance"] [data-radix-collapsible-content] .prose,
[data-theme="alliance"] [data-radix-collapsible-content] p,
[data-theme="alliance"] [data-radix-collapsible-content] div,
.theme-alliance [data-radix-collapsible-content],
.theme-alliance [data-radix-collapsible-content] .prose,
.theme-alliance [data-radix-collapsible-content] p,
.theme-alliance [data-radix-collapsible-content] div {
  color: #94A4B8 !important; /* Soft silver-steel / Mithril */
  font-size: 0.855rem !important;
  line-height: 1.62 !important;
}

/* ─── 4. SYSTEM BADGES & STATUSES (Heraldic Seals, Tools & Tasks) ─── */

/* Tool Bar Header Button */
html[data-theme="alliance"] .chat-message.tool button,
[data-theme="alliance"] .chat-message.tool button,
.theme-alliance .chat-message.tool button {
  background: rgba(16, 23, 36, 0.82) !important;
  border-left: 2px solid #C89926 !important;
  border-radius: 0 6px 6px 0 !important;
  transition: all 0.2s ease !important;
}

html[data-theme="alliance"] .chat-message.tool button:hover,
[data-theme="alliance"] .chat-message.tool button:hover,
.theme-alliance .chat-message.tool button:hover {
  background: rgba(24, 35, 54, 0.95) !important;
  border-left-color: #F0D38D !important;
  box-shadow: inset 0 0 10px rgba(200, 153, 38, 0.12) !important;
}

/* Tool execution icon / badge */
html[data-theme="alliance"] .chat-message.tool button span:nth-child(2),
[data-theme="alliance"] .chat-message.tool button span:nth-child(2),
.theme-alliance .chat-message.tool button span:nth-child(2) {
  background: rgba(26, 38, 62, 0.85) !important;
  color: #F0D38D !important;
  border: 1px solid rgba(218, 165, 32, 0.3) !important;
  border-radius: 4px !important;
}

/* Tool badge count pill: "x1", "x2" */
html[data-theme="alliance"] .chat-message.tool button span:nth-child(4),
[data-theme="alliance"] .chat-message.tool button span:nth-child(4),
.theme-alliance .chat-message.tool button span:nth-child(4) {
  background: rgba(218, 165, 32, 0.15) !important;
  color: #E5C378 !important;
  border: 1px solid rgba(218, 165, 32, 0.25) !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
}

/* Tool running state (Arcane Blue / Gold Shimmer) */
html[data-theme="alliance"] .chat-message.tool[data-status="running"],
html[data-theme="alliance"] .chat-message.tool:has(.animate-spin),
[data-theme="alliance"] .chat-message.tool[data-status="running"],
[data-theme="alliance"] .chat-message.tool:has(.animate-spin),
.theme-alliance .chat-message.tool[data-status="running"],
.theme-alliance .chat-message.tool:has(.animate-spin) {
  border-left: 3px solid #3B82F6 !important;
  background: linear-gradient(90deg, rgba(20, 35, 65, 0.7) 0%, rgba(32, 60, 110, 0.35) 50%, rgba(20, 35, 65, 0.7) 100%) !important;
  background-size: 200% 100% !important;
  animation: allianceToolShimmer 2.8s ease-in-out infinite !important;
}

/* Success status (Paladin Holy Light / Lordaeron Seal) */
html[data-theme="alliance"] [id^="tool-result-"]:not([class*="red"]):not(.border-red-200),
[data-theme="alliance"] [id^="tool-result-"]:not([class*="red"]):not(.border-red-200),
.theme-alliance [id^="tool-result-"]:not([class*="red"]):not(.border-red-200) {
  border-color: rgba(218, 165, 32, 0.35) !important;
  background: rgba(15, 22, 34, 0.7) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

/* Completed indicator dots */
html[data-theme="alliance"] .bg-green-400,
html[data-theme="alliance"] .bg-green-500,
[data-theme="alliance"] .bg-green-400,
[data-theme="alliance"] .bg-green-500,
.theme-alliance .bg-green-400,
.theme-alliance .bg-green-500 {
  background-color: #22C55E !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7) !important;
}

/* Error status (Ironforge Ember / Crimson Inquisitor) */
html[data-theme="alliance"] .chat-message.error,
html[data-theme="alliance"] [id^="tool-result-"][class*="red"],
html[data-theme="alliance"] [id^="tool-result-"] .border-red-200,
html[data-theme="alliance"] [id^="tool-result-"] .bg-red-50,
[data-theme="alliance"] .chat-message.error,
[data-theme="alliance"] [id^="tool-result-"][class*="red"],
[data-theme="alliance"] [id^="tool-result-"] .border-red-200,
[data-theme="alliance"] [id^="tool-result-"] .bg-red-50,
.theme-alliance .chat-message.error,
.theme-alliance [id^="tool-result-"][class*="red"],
.theme-alliance [id^="tool-result-"] .border-red-200,
.theme-alliance [id^="tool-result-"] .bg-red-50 {
  border-left: 3px solid #DC2626 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: linear-gradient(90deg, rgba(50, 16, 20, 0.75) 0%, rgba(26, 12, 14, 0.85) 100%) !important;
}

html[data-theme="alliance"] .chat-message.error span,
html[data-theme="alliance"] [id^="tool-result-"][class*="red"] span,
html[data-theme="alliance"] [id^="tool-result-"][class*="red"] p,
[data-theme="alliance"] .chat-message.error span,
[data-theme="alliance"] [id^="tool-result-"][class*="red"] span,
[data-theme="alliance"] [id^="tool-result-"][class*="red"] p,
.theme-alliance .chat-message.error span,
.theme-alliance [id^="tool-result-"][class*="red"] span,
.theme-alliance [id^="tool-result-"][class*="red"] p {
  color: #FCA5A5 !important;
}

/* Interactive Prompt Box (Stormwind War Council Decision) */
html[data-theme="alliance"] [class*="border-amber-200"],
html[data-theme="alliance"] [class*="bg-amber-50"],
html[data-theme="alliance"] [class*="dark:bg-amber-900"],
[data-theme="alliance"] [class*="border-amber-200"],
[data-theme="alliance"] [class*="bg-amber-50"],
[data-theme="alliance"] [class*="dark:bg-amber-900"],
.theme-alliance [class*="border-amber-200"],
.theme-alliance [class*="bg-amber-50"],
.theme-alliance [class*="dark:bg-amber-900"] {
  border-color: rgba(218, 165, 32, 0.45) !important;
  background: linear-gradient(135deg, rgba(32, 24, 14, 0.8) 0%, rgba(18, 15, 10, 0.85) 100%) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45),
              inset 0 0 10px rgba(218, 165, 32, 0.1) !important;
}

html[data-theme="alliance"] [class*="text-amber-900"],
html[data-theme="alliance"] [class*="dark:text-amber-100"],
[data-theme="alliance"] [class*="text-amber-900"],
[data-theme="alliance"] [class*="dark:text-amber-100"],
.theme-alliance [class*="text-amber-900"],
.theme-alliance [class*="dark:text-amber-100"] {
  color: #F6E6BC !important;
}


/* --- Module: alliance-modals-popovers.css --- */
/**
 * CloudCLI — Warcraft: Alliance Theme (Штормград / Альянс)
 * Module: Modals, Popovers, Context Menus & Tooltips
 * Specialization: Agent 8
 * 
 * Strict WCAG AAA Contrast & Zero-Slop Standard
 * 100% isolated under: html.theme-alliance, body.theme-alliance, [data-theme="alliance"], .theme-alliance
 */

/* ==========================================================================
   1. SETTINGS MODAL & DIALOG WINDOWS
   ========================================================================== */

/* Modal Backdrop */
html.theme-alliance .modal-backdrop,
body.theme-alliance .modal-backdrop,
[data-theme="alliance"] .modal-backdrop,
.theme-alliance .modal-backdrop,
html.theme-alliance [data-state="open"].fixed.inset-0,
body.theme-alliance [data-state="open"].fixed.inset-0 {
  background-color: rgba(4, 8, 16, 0.82) !important;
  /* backdrop-filter cleaned for zero-slop */ saturate(140%) !important;
  -webkit-/* backdrop-filter cleaned for zero-slop */ saturate(140%) !important;
}

/* Modal Main Container / Card */
html.theme-alliance .modal-backdrop > div,
body.theme-alliance .modal-backdrop > div,
[data-theme="alliance"] .modal-backdrop > div,
.theme-alliance .modal-backdrop > div,
html.theme-alliance [role="dialog"],
body.theme-alliance [role="dialog"],
[data-theme="alliance"] [role="dialog"],
.theme-alliance [role="dialog"],
html.theme-alliance .animate-dialog-content-show,
body.theme-alliance .animate-dialog-content-show {
  background: linear-gradient(180deg, #0e1726 0%, #0a101b 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  box-shadow: 
    0 25px 60px -12px rgba(0, 0, 0, 0.9),
    0 0 35px rgba(212, 175, 55, 0.15),
    inset 0 1px 0 rgba(255, 223, 120, 0.18) !important;
  border-radius: 14px !important;
  color: #f1f5f9 !important;
}

/* Modal Header Bar */
html.theme-alliance .modal-backdrop > div > div:first-child,
body.theme-alliance .modal-backdrop > div > div:first-child,
[data-theme="alliance"] .modal-backdrop > div > div:first-child,
.theme-alliance .modal-backdrop > div > div:first-child,
html.theme-alliance [role="dialog"] > div:first-child,
body.theme-alliance [role="dialog"] > div:first-child {
  background: linear-gradient(90deg, rgba(20, 32, 54, 0.9) 0%, rgba(14, 23, 38, 0.95) 100%) !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28) !important;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Modal Title */
html.theme-alliance .modal-backdrop h2,
body.theme-alliance .modal-backdrop h2,
[data-theme="alliance"] .modal-backdrop h2,
.theme-alliance .modal-backdrop h2,
html.theme-alliance [role="dialog"] h2,
body.theme-alliance [role="dialog"] h2 {
  color: #f6d365 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
  letter-spacing: 0.02em !important;
  font-weight: 600 !important;
}

/* Close & Header Action Buttons */
html.theme-alliance .modal-backdrop button:hover,
body.theme-alliance .modal-backdrop button:hover,
[data-theme="alliance"] .modal-backdrop button:hover,
.theme-alliance .modal-backdrop button:hover {
  color: #ffdf78 !important;
  background-color: rgba(212, 175, 55, 0.12) !important;
}

/* ==========================================================================
   2. SETTINGS TABS (Desktop Left Sidebar & Mobile Navigation)
   ========================================================================== */

/* Left Sidebar (aside) */
html.theme-alliance .modal-backdrop aside,
body.theme-alliance .modal-backdrop aside,
[data-theme="alliance"] .modal-backdrop aside,
.theme-alliance .modal-backdrop aside {
  background: rgba(10, 15, 25, 0.92) !important;
  border-right: 1px solid rgba(212, 175, 55, 0.2) !important;
}

/* Inactive Tab Button */
html.theme-alliance .modal-backdrop aside nav button,
body.theme-alliance .modal-backdrop aside nav button,
[data-theme="alliance"] .modal-backdrop aside nav button,
.theme-alliance .modal-backdrop aside nav button {
  position: relative !important;
  color: #94a3b8 !important;
  transition: all 150ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
}

/* Inactive Tab Hover */
html.theme-alliance .modal-backdrop aside nav button:hover,
body.theme-alliance .modal-backdrop aside nav button:hover,
[data-theme="alliance"] .modal-backdrop aside nav button:hover,
.theme-alliance .modal-backdrop aside nav button:hover {
  color: #f1f5f9 !important;
  background: rgba(212, 175, 55, 0.07) !important;
  border-color: rgba(212, 175, 55, 0.15) !important;
}

/* ACTIVE TAB: Imperial Gold Indicator Bar & Radiant Gold Text */
html.theme-alliance .modal-backdrop aside nav button.bg-accent,
body.theme-alliance .modal-backdrop aside nav button.bg-accent,
[data-theme="alliance"] .modal-backdrop aside nav button.bg-accent,
.theme-alliance .modal-backdrop aside nav button.bg-accent,
html.theme-alliance .modal-backdrop aside nav button[data-state="active"],
body.theme-alliance .modal-backdrop aside nav button[data-state="active"] {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.05) 100%) !important;
  color: #ffdf78 !important;
  font-weight: 600 !important;
  border-left: 3px solid #d4af37 !important;
  border-radius: 4px 8px 8px 4px !important;
  box-shadow: 
    inset 3px 0 8px rgba(212, 175, 55, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Active Tab Icon Glow */
html.theme-alliance .modal-backdrop aside nav button.bg-accent svg,
body.theme-alliance .modal-backdrop aside nav button.bg-accent svg,
[data-theme="alliance"] .modal-backdrop aside nav button.bg-accent svg,
.theme-alliance .modal-backdrop aside nav button.bg-accent svg {
  color: #ffdf78 !important;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.45)) !important;
}

/* Mobile Tabs Container */
html.theme-alliance .modal-backdrop .border-b,
body.theme-alliance .modal-backdrop .border-b,
[data-theme="alliance"] .modal-backdrop .border-b,
.theme-alliance .modal-backdrop .border-b {
  border-color: rgba(212, 175, 55, 0.2) !important;
}

/* Mobile Active Tab Pill */
html.theme-alliance .modal-backdrop [aria-selected="true"],
body.theme-alliance .modal-backdrop [aria-selected="true"],
[data-theme="alliance"] .modal-backdrop [aria-selected="true"],
.theme-alliance .modal-backdrop [aria-selected="true"] {
  border-bottom: 2px solid #d4af37 !important;
  color: #ffdf78 !important;
  background: rgba(212, 175, 55, 0.12) !important;
}

/* Main Settings Content Area */
html.theme-alliance .modal-backdrop main,
body.theme-alliance .modal-backdrop main,
[data-theme="alliance"] .modal-backdrop main,
.theme-alliance .modal-backdrop main {
  background: transparent !important;
}

/* Section Dividers & Borders in Settings */
html.theme-alliance .modal-backdrop .border-border,
body.theme-alliance .modal-backdrop .border-border,
[data-theme="alliance"] .modal-backdrop .border-border,
.theme-alliance .modal-backdrop .border-border,
html.theme-alliance .modal-backdrop .border-input,
body.theme-alliance .modal-backdrop .border-input {
  border-color: rgba(212, 175, 55, 0.22) !important;
}

/* ==========================================================================
   3. FORM CONTROLS: SWITCHES, CHECKBOXES, RADIOS & SELECTS
   ========================================================================== */

/* --- SWITCHES (TOGGLES) --- */
html.theme-alliance button[role="switch"],
body.theme-alliance button[role="switch"],
[data-theme="alliance"] button[role="switch"],
.theme-alliance button[role="switch"] {
  background-color: #131c2d !important;
  border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
  transition: all 200ms ease-in-out !important;
}

/* Switch Active (Checked) */
html.theme-alliance button[role="switch"][aria-checked="true"],
body.theme-alliance button[role="switch"][aria-checked="true"],
[data-theme="alliance"] button[role="switch"][aria-checked="true"],
.theme-alliance button[role="switch"][aria-checked="true"],
html.theme-alliance button[role="switch"].bg-primary,
body.theme-alliance button[role="switch"].bg-primary {
  background: linear-gradient(135deg, #e5b842 0%, #aa820a 100%) !important;
  border-color: #ffe484 !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45) !important;
}

/* Switch Thumb */
html.theme-alliance button[role="switch"] > span:last-child,
body.theme-alliance button[role="switch"] > span:last-child,
[data-theme="alliance"] button[role="switch"] > span:last-child,
.theme-alliance button[role="switch"] > span:last-child {
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Switch Thumb Icon (Sun / Moon) */
html.theme-alliance button[role="switch"][aria-checked="true"] svg,
body.theme-alliance button[role="switch"][aria-checked="true"] svg {
  color: #996515 !important;
}

/* Focus Ring for Switch */
html.theme-alliance button[role="switch"]:focus-visible,
body.theme-alliance button[role="switch"]:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px #0a101b, 0 0 0 4px rgba(212, 175, 55, 0.5) !important;
}

/* --- CHECKBOXES --- */
html.theme-alliance input[type="checkbox"],
body.theme-alliance input[type="checkbox"],
[data-theme="alliance"] input[type="checkbox"],
.theme-alliance input[type="checkbox"],
html.theme-alliance button[role="checkbox"],
body.theme-alliance button[role="checkbox"],
[data-theme="alliance"] button[role="checkbox"],
.theme-alliance button[role="checkbox"] {
  background-color: #0d1524 !important;
  border: 1.5px solid rgba(212, 175, 55, 0.4) !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: all 150ms ease !important;
}

/* Checkbox Checked */
html.theme-alliance input[type="checkbox"]:checked,
body.theme-alliance input[type="checkbox"]:checked,
[data-theme="alliance"] input[type="checkbox"]:checked,
.theme-alliance input[type="checkbox"]:checked,
html.theme-alliance button[role="checkbox"][data-state="checked"],
body.theme-alliance button[role="checkbox"][data-state="checked"],
[data-theme="alliance"] button[role="checkbox"][data-state="checked"],
.theme-alliance button[role="checkbox"][data-state="checked"] {
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%) !important;
  border-color: #ffdf78 !important;
  color: #0a101b !important;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.35) !important;
}

/* Checkbox Focus */
html.theme-alliance input[type="checkbox"]:focus-visible,
body.theme-alliance input[type="checkbox"]:focus-visible,
html.theme-alliance button[role="checkbox"]:focus-visible,
body.theme-alliance button[role="checkbox"]:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px #0a101b, 0 0 0 4px rgba(212, 175, 55, 0.45) !important;
}

/* --- RADIO BUTTONS --- */
html.theme-alliance input[type="radio"],
body.theme-alliance input[type="radio"],
[data-theme="alliance"] input[type="radio"],
.theme-alliance input[type="radio"],
html.theme-alliance button[role="radio"],
body.theme-alliance button[role="radio"],
[data-theme="alliance"] button[role="radio"],
.theme-alliance button[role="radio"] {
  background-color: #0d1524 !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  accent-color: #d4af37 !important;
  cursor: pointer !important;
  transition: all 150ms ease !important;
}

html.theme-alliance input[type="radio"]:checked,
body.theme-alliance input[type="radio"]:checked,
[data-theme="alliance"] input[type="radio"]:checked,
.theme-alliance input[type="radio"]:checked,
html.theme-alliance button[role="radio"][data-state="checked"],
body.theme-alliance button[role="radio"][data-state="checked"] {
  border-color: #ffdf78 !important;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.35) !important;
}

/* --- SELECTS & COMBOBOXES --- */
html.theme-alliance select,
body.theme-alliance select,
[data-theme="alliance"] select,
.theme-alliance select,
html.theme-alliance button[role="combobox"],
body.theme-alliance button[role="combobox"],
[data-theme="alliance"] button[role="combobox"],
.theme-alliance button[role="combobox"],
html.theme-alliance [data-radix-select-trigger],
body.theme-alliance [data-radix-select-trigger] {
  background-color: #0d1524 !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
  transition: border-color 150ms ease, box-shadow 150ms ease !important;
}

html.theme-alliance select:focus,
body.theme-alliance select:focus,
html.theme-alliance button[role="combobox"]:focus,
body.theme-alliance button[role="combobox"]:focus,
html.theme-alliance select:focus-visible,
body.theme-alliance select:focus-visible {
  border-color: #ffdf78 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35) !important;
}

html.theme-alliance select option,
body.theme-alliance select option {
  background-color: #0b1220 !important;
  color: #f1f5f9 !important;
}

/* ==========================================================================
   4. DROPDOWNS, POPOVERS & CONTEXT MENUS
   ========================================================================== */

/* Universal Dropdown & Popover Container */
html.theme-alliance .bg-popover,
body.theme-alliance .bg-popover,
[data-theme="alliance"] .bg-popover,
.theme-alliance .bg-popover,
html.theme-alliance [role="menu"],
body.theme-alliance [role="menu"],
[data-theme="alliance"] [role="menu"],
.theme-alliance [role="menu"],
html.theme-alliance [role="listbox"],
body.theme-alliance [role="listbox"],
[data-theme="alliance"] [role="listbox"],
.theme-alliance [role="listbox"],
html.theme-alliance .command-menu,
body.theme-alliance .command-menu,
[data-theme="alliance"] .command-menu,
.theme-alliance .command-menu,
html.theme-alliance [data-radix-menu-content],
body.theme-alliance [data-radix-menu-content],
html.theme-alliance .shell-mobile-selection-menu,
body.theme-alliance .shell-mobile-selection-menu {
  background-color: rgba(11, 17, 28, 0.96) !important;
  /* backdrop-filter cleaned for zero-slop */ saturate(140%) !important;
  -webkit-/* backdrop-filter cleaned for zero-slop */ saturate(140%) !important;
  border: 1px solid rgba(212, 175, 55, 0.38) !important;
  box-shadow: 
    0 16px 40px -4px rgba(0, 0, 0, 0.85),
    0 0 20px rgba(212, 175, 55, 0.14),
    inset 0 1px 0 rgba(255, 223, 120, 0.16) !important;
  border-radius: 10px !important;
  color: #f1f5f9 !important;
}

/* Message Context Menu Specifics (fixed popup) */
html.theme-alliance div[style*="position: fixed"][class*="bg-popover"],
body.theme-alliance div[style*="position: fixed"][class*="bg-popover"] {
  border: 1px solid rgba(212, 175, 55, 0.42) !important;
  box-shadow: 
    0 18px 45px -4px rgba(0, 0, 0, 0.9),
    0 0 25px rgba(212, 175, 55, 0.18),
    inset 0 1px 0 rgba(255, 223, 120, 0.2) !important;
}

/* Menu Items */
html.theme-alliance [role="menuitem"],
body.theme-alliance [role="menuitem"],
[data-theme="alliance"] [role="menuitem"],
.theme-alliance [role="menuitem"],
html.theme-alliance [role="option"],
body.theme-alliance [role="option"],
[data-theme="alliance"] [role="option"],
.theme-alliance [role="option"],
html.theme-alliance .bg-popover button,
body.theme-alliance .bg-popover button,
[data-theme="alliance"] .bg-popover button,
.theme-alliance .bg-popover button,
html.theme-alliance .command-menu [role="option"],
body.theme-alliance .command-menu [role="option"] {
  color: #e2e8f0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  transition: all 120ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Menu Items Hover & Selected States (Subtle Imperial Glow) */
html.theme-alliance [role="menuitem"]:hover,
body.theme-alliance [role="menuitem"]:hover,
[data-theme="alliance"] [role="menuitem"]:hover,
.theme-alliance [role="menuitem"]:hover,
html.theme-alliance [role="menuitem"][data-highlighted],
body.theme-alliance [role="menuitem"][data-highlighted],
html.theme-alliance [role="option"]:hover,
body.theme-alliance [role="option"]:hover,
html.theme-alliance [role="option"][aria-selected="true"],
body.theme-alliance [role="option"][aria-selected="true"],
html.theme-alliance .bg-popover button:hover,
body.theme-alliance .bg-popover button:hover,
[data-theme="alliance"] .bg-popover button:hover,
.theme-alliance .bg-popover button:hover,
html.theme-alliance .command-menu [role="option"]:hover,
body.theme-alliance .command-menu [role="option"]:hover,
html.theme-alliance .command-menu [role="option"][aria-selected="true"],
body.theme-alliance .command-menu [role="option"][aria-selected="true"] {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.06) 100%) !important;
  color: #fff9e6 !important;
  box-shadow: 
    inset 2.5px 0 0 #d4af37,
    0 0 12px rgba(212, 175, 55, 0.22) !important;
}

/* Menu Item Icons on Hover */
html.theme-alliance [role="menuitem"]:hover svg,
body.theme-alliance [role="menuitem"]:hover svg,
html.theme-alliance .bg-popover button:hover svg,
body.theme-alliance .bg-popover button:hover svg {
  color: #ffdf78 !important;
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4)) !important;
}

/* Dividers & Separators inside Menus */
html.theme-alliance .bg-popover hr,
body.theme-alliance .bg-popover hr,
html.theme-alliance .bg-popover .border-b,
body.theme-alliance .bg-popover .border-b,
html.theme-alliance [role="separator"],
body.theme-alliance [role="separator"] {
  border-color: rgba(212, 175, 55, 0.18) !important;
  background-color: rgba(212, 175, 55, 0.18) !important;
}

/* ==========================================================================
   5. TOOLTIPS (Icon Hints & Navigation Labels)
   ========================================================================== */

/* Tooltip Body: Deep Obsidian Slate with Polished Gold Micro-Border */
html.theme-alliance div[style*="position: fixed"][class*="whitespace-nowrap"],
body.theme-alliance div[style*="position: fixed"][class*="whitespace-nowrap"],
[data-theme="alliance"] div[style*="position: fixed"][class*="whitespace-nowrap"],
.theme-alliance div[style*="position: fixed"][class*="whitespace-nowrap"],
html.theme-alliance [role="tooltip"],
body.theme-alliance [role="tooltip"],
[data-theme="alliance"] [role="tooltip"],
.theme-alliance [role="tooltip"],
html.theme-alliance [data-radix-tooltip-content],
body.theme-alliance [data-radix-tooltip-content] {
  background-color: #060a12 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(212, 175, 55, 0.6) !important;
  box-shadow: 
    0 6px 20px -2px rgba(0, 0, 0, 0.85),
    0 0 10px rgba(212, 175, 55, 0.25),
    inset 0 1px 0 rgba(255, 223, 120, 0.2) !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.015em !important;
  padding: 4px 8px !important;
  /* backdrop-filter cleaned for zero-slop */ !important;
}

/* Tooltip Little Triangle Pointer (Arrow) */
html.theme-alliance div[style*="position: fixed"][class*="whitespace-nowrap"] > div.border-transparent,
body.theme-alliance div[style*="position: fixed"][class*="whitespace-nowrap"] > div.border-transparent {
  filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.4)) !important;
}


/* --- Module: alliance-sidebar.module.css --- */
/* ==========================================================================
   WARCRAFT: ALLIANCE THEME (STORMWIND) — NAVIGATION & SIDEBAR STYLER
   Agent 6: Navigation, Sidebar & Workspace Styler
   Strictly isolated to:
     html.theme-alliance,
     html[data-theme="alliance"],
     .theme-alliance
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Alliance Navigation Design Tokens
   -------------------------------------------------------------------------- */
html.theme-alliance,
html.theme-alliance.dark,
html[data-theme="alliance"],
html[data-theme="alliance"].dark,
.theme-alliance {
  /* Sidebar Surfaces (Forged Dark Midnight Steel) */
  --alliance-nav-bg: #0B101D;
  --alliance-nav-bg-glass: rgba(11, 16, 29, 0.92);
  --alliance-nav-surface: #0E1526;
  --alliance-nav-surface-elevated: #141D32;
  --alliance-nav-surface-hover: #1A253E;
  --alliance-nav-surface-active: rgba(197, 155, 39, 0.14);

  /* Gold & Brass Trim */
  --alliance-nav-gold-primary: #C59B27;
  --alliance-nav-gold-hover: #D8AF38;
  --alliance-nav-gold-highlight: #F3D889;
  --alliance-nav-gold-deep: #8C6818;
  --alliance-nav-gold-border: rgba(197, 155, 39, 0.32);
  --alliance-nav-gold-glow: rgba(197, 155, 39, 0.20);
  --alliance-nav-gold-seam: rgba(197, 155, 39, 0.40);

  /* Steel Borders & Dividers */
  --alliance-nav-border-steel: #1B2640;
  --alliance-nav-border-subtle: rgba(27, 38, 64, 0.75);

  /* High-Contrast Typographic System (WCAG AAA Compliant) */
  --alliance-nav-text-primary: #F1F5F9;     /* 14.2:1 contrast against #0B101D */
  --alliance-nav-text-secondary: #94A3B8;   /* 7.4:1 contrast */
  --alliance-nav-text-muted: #64748B;       /* 4.6:1 contrast */
  --alliance-nav-text-gold: #F3D889;        /* Warm paladin gold text */
  --alliance-nav-text-dark: #080C14;        /* For gold CTA button labels */
}

/* --------------------------------------------------------------------------
   1. Left Sidebar Root Container & Right Seam Border
   -------------------------------------------------------------------------- */
html.theme-alliance .md\:w-72,
html.theme-alliance [data-sidebar],
html.theme-alliance aside.sidebar,
html.theme-alliance .app-sidebar,
html[data-theme="alliance"] .md\:w-72,
html[data-theme="alliance"] [data-sidebar],
.theme-alliance .md\:w-72 {
  /* Forged dark steel background with authentic Stormwind armor microtexture */
  background:
    radial-gradient(130% 90% at 0% 0%, rgba(26, 38, 64, 0.45) 0%, rgba(11, 16, 29, 0.96) 65%, #070A12 100%),
    linear-gradient(180deg, #0E1424 0%, #080C16 100%) !important;
  /* backdrop-filter cleaned for zero-slop */ !important;
  -webkit-/* backdrop-filter cleaned for zero-slop */ !important;

  /* Burnished Gold/Brass Seam on the right */
  border-right: 1px solid var(--alliance-nav-gold-border) !important;
  box-shadow:
    inset -1px 0 0 rgba(243, 216, 137, 0.12),
    inset 0 1px 0 rgba(243, 216, 137, 0.08),
    2px 0 16px rgba(0, 0, 0, 0.45) !important;
  position: relative;
  z-index: 20;
}

/* Delicate golden divider lines across sidebar sections */
html.theme-alliance .nav-divider,
html[data-theme="alliance"] .nav-divider,
.theme-alliance .nav-divider {
  height: 1px !important;
  border: none !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 155, 39, 0.15) 15%,
    rgba(197, 155, 39, 0.45) 50%,
    rgba(197, 155, 39, 0.15) 85%,
    transparent 100%
  ) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  margin: 4px 8px !important;
}

/* Sidebar Top Logo & Brand Area */
html.theme-alliance .md\:w-72 h1,
html[data-theme="alliance"] .md\:w-72 h1,
.theme-alliance .md\:w-72 h1 {
  color: var(--alliance-nav-text-primary) !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

html.theme-alliance .md\:w-72 img[src*="avo-logo"],
html[data-theme="alliance"] .md\:w-72 img[src*="avo-logo"] {
  filter: brightness(0) invert(72%) sepia(75%) saturate(550%) hue-rotate(5deg) brightness(102%) contrast(95%) drop-shadow(0 0 6px rgba(212, 175, 55, 0.65)) !important;
  transition: filter 200ms ease;
}

html.theme-alliance .md\:w-72 img[src*="avo-logo"]:hover,
html[data-theme="alliance"] .md\:w-72 img[src*="avo-logo"]:hover {
  filter: brightness(0) invert(85%) sepia(80%) saturate(600%) hue-rotate(8deg) brightness(115%) contrast(98%) drop-shadow(0 0 12px rgba(243, 216, 137, 0.85)) !important;
}

/* Sidebar Action Buttons (Refresh, Create Project, Collapse Sidebar) */
html.theme-alliance .md\:w-72 button.h-7.w-7,
html[data-theme="alliance"] .md\:w-72 button.h-7.w-7 {
  color: var(--alliance-nav-text-secondary) !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  transition: all 180ms ease !important;
}

html.theme-alliance .md\:w-72 button.h-7.w-7:hover,
html[data-theme="alliance"] .md\:w-72 button.h-7.w-7:hover {
  background: var(--alliance-nav-surface-hover) !important;
  border-color: var(--alliance-nav-gold-border) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  box-shadow: 0 0 8px rgba(197, 155, 39, 0.25) !important;
}

/* --------------------------------------------------------------------------
   2. Search, Filters & Navigation Tabs
   -------------------------------------------------------------------------- */

/* Filter Mode Pills Container (Projects / Conversations / Running / Archive) */
html.theme-alliance .md\:w-72 .bg-muted\/50,
html[data-theme="alliance"] .md\:w-72 .bg-muted\/50 {
  background: #080C16 !important;
  border: 1px solid var(--alliance-nav-border-steel) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  border-radius: 9px !important;
}

/* Inactive Filter Tab */
html.theme-alliance .md\:w-72 .bg-muted\/50 button,
html[data-theme="alliance"] .md\:w-72 .bg-muted\/50 button {
  color: var(--alliance-nav-text-secondary) !important;
  font-weight: 500 !important;
  transition: all 150ms ease !important;
  border: 1px solid transparent !important;
}

html.theme-alliance .md\:w-72 .bg-muted\/50 button:hover,
html[data-theme="alliance"] .md\:w-72 .bg-muted\/50 button:hover {
  color: var(--alliance-nav-text-primary) !important;
  background: rgba(26, 37, 62, 0.6) !important;
}

/* Active Filter Tab */
html.theme-alliance .md\:w-72 .bg-muted\/50 button[aria-pressed="true"],
html.theme-alliance .md\:w-72 .bg-muted\/50 button.bg-background,
html[data-theme="alliance"] .md\:w-72 .bg-muted\/50 button[aria-pressed="true"],
html[data-theme="alliance"] .md\:w-72 .bg-muted\/50 button.bg-background {
  background: linear-gradient(180deg, #1A243C 0%, #101727 100%) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  border: 1px solid var(--alliance-nav-gold-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(243, 216, 137, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.4) !important;
  font-weight: 600 !important;
}

/* Running badge counter inside search filter */
html.theme-alliance .md\:w-72 .bg-emerald-500,
html[data-theme="alliance"] .md\:w-72 .bg-emerald-500 {
  background: var(--alliance-nav-gold-primary) !important;
  color: var(--alliance-nav-text-dark) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 8px rgba(197, 155, 39, 0.5) !important;
}

/* Search Input Field */
html.theme-alliance .nav-search-input,
html.theme-alliance input[type="text"].nav-search-input,
html[data-theme="alliance"] .nav-search-input,
html[data-theme="alliance"] input[type="text"].nav-search-input,
.theme-alliance .nav-search-input {
  background: #080C16 !important;
  border: 1px solid var(--alliance-nav-border-steel) !important;
  color: var(--alliance-nav-text-primary) !important;
  border-radius: 10px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  font-size: 13px !important;
  transition: all 180ms ease !important;
}

html.theme-alliance .nav-search-input::placeholder,
html[data-theme="alliance"] .nav-search-input::placeholder {
  color: rgba(148, 163, 184, 0.55) !important;
}

/* Search Input Focus with Paladin Holy Light Aura */
html.theme-alliance .nav-search-input:focus,
html[data-theme="alliance"] .nav-search-input:focus,
.theme-alliance .nav-search-input:focus {
  border-color: var(--alliance-nav-gold-primary) !important;
  box-shadow:
    0 0 0 1px var(--alliance-nav-gold-primary),
    0 0 12px var(--alliance-nav-gold-glow),
    inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  outline: none !important;
}

/* Magnifier Glass Icon */
html.theme-alliance .md\:w-72 .relative svg.h-3\.5.w-3\.5,
html[data-theme="alliance"] .md\:w-72 .relative svg.h-3\.5.w-3\.5 {
  color: var(--alliance-nav-gold-primary) !important;
  opacity: 0.9 !important;
}

/* Command Palette Keyboard Shortcut (⌘K / Ctrl+K) */
html.theme-alliance .md\:w-72 kbd,
html[data-theme="alliance"] .md\:w-72 kbd {
  background: #11182B !important;
  border: 1px solid var(--alliance-nav-gold-border) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  box-shadow: inset 0 1px 0 rgba(243, 216, 137, 0.15) !important;
  border-radius: 4px !important;
}

/* --------------------------------------------------------------------------
   3. CTA Button: 'Новый чат' / New Session & Folders
   -------------------------------------------------------------------------- */

/* 'Новый сеанс' / New Chat Button (Desktop & Mobile) */
html.theme-alliance .md\:w-72 button.bg-primary,
html.theme-alliance .md\:w-72 button.justify-start.bg-primary,
html[data-theme="alliance"] .md\:w-72 button.bg-primary,
html[data-theme="alliance"] .md\:w-72 button.justify-start.bg-primary,
.theme-alliance .md\:w-72 button.bg-primary {
  /* Radiant Imperial Stormwind Gold gradient */
  background: linear-gradient(180deg, #E5C365 0%, #C59B27 50%, #9E7718 100%) !important;
  color: var(--alliance-nav-text-dark) !important;
  border: 1px solid var(--alliance-nav-gold-highlight) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 12px rgba(197, 155, 39, 0.3) !important;
  transition: all 160ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

html.theme-alliance .md\:w-72 button.bg-primary svg,
html[data-theme="alliance"] .md\:w-72 button.bg-primary svg {
  color: var(--alliance-nav-text-dark) !important;
  stroke-width: 2.5px !important;
}

html.theme-alliance .md\:w-72 button.bg-primary:hover,
html[data-theme="alliance"] .md\:w-72 button.bg-primary:hover,
.theme-alliance .md\:w-72 button.bg-primary:hover {
  background: linear-gradient(180deg, #F0D58A 0%, #D8AF38 50%, #AD841E 100%) !important;
  border-color: #FFF !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 4px 14px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(216, 175, 56, 0.5) !important;
  transform: translateY(-1px) !important;
}

html.theme-alliance .md\:w-72 button.bg-primary:active,
html[data-theme="alliance"] .md\:w-72 button.bg-primary:active {
  transform: translateY(1px) scale(0.98) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Secondary Button: '+ Папка' (Folder Creation in Project) */
html.theme-alliance .md\:w-72 button:has(svg.text-primary):not(.bg-primary),
html[data-theme="alliance"] .md\:w-72 button:has(svg.text-primary):not(.bg-primary) {
  background: var(--alliance-nav-surface) !important;
  border: 1px solid var(--alliance-nav-gold-border) !important;
  color: var(--alliance-nav-text-primary) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 160ms ease !important;
}

html.theme-alliance .md\:w-72 button:has(svg.text-primary):not(.bg-primary):hover,
html[data-theme="alliance"] .md\:w-72 button:has(svg.text-primary):not(.bg-primary):hover {
  background: var(--alliance-nav-surface-hover) !important;
  border-color: var(--alliance-nav-gold-primary) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  box-shadow: 0 0 8px rgba(197, 155, 39, 0.25) !important;
}

/* --------------------------------------------------------------------------
   4. Projects & Chat / Session List Items
   -------------------------------------------------------------------------- */

/* Project Header / Folders Group Container */
html.theme-alliance .md\:w-72 .border-border\/40,
html.theme-alliance .md\:w-72 .border-border\/60,
html.theme-alliance .md\:w-72 .border-border\/70,
html[data-theme="alliance"] .md\:w-72 .border-border\/40,
html[data-theme="alliance"] .md\:w-72 .border-border\/60,
html[data-theme="alliance"] .md\:w-72 .border-border\/70 {
  border-color: var(--alliance-nav-border-steel) !important;
}

/* Session Item (Base Inactive State) */
html.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start,
html[data-theme="alliance"] .md\:w-72 button.h-auto.w-full.justify-start,
.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start {
  background: rgba(14, 21, 38, 0.7) !important;
  border: 1px solid rgba(27, 38, 64, 0.8) !important;
  border-radius: 8px !important;
  color: var(--alliance-nav-text-secondary) !important;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 3px !important;
}

/* Session Title (Inactive) */
html.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start .text-muted-foreground,
html[data-theme="alliance"] .md\:w-72 button.h-auto.w-full.justify-start .text-muted-foreground {
  color: #CBD5E1 !important; /* High contrast silver-slate */
  font-weight: 500 !important;
}

/* Provider Icon Avatar (Inactive) */
html.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start .bg-muted\/50,
html[data-theme="alliance"] .md\:w-72 button.h-auto.w-full.justify-start .bg-muted\/50 {
  background: #121A2C !important;
  border: 1px solid rgba(197, 155, 39, 0.2) !important;
  color: #94A3B8 !important;
  border-radius: 6px !important;
  transition: all 160ms ease !important;
}

/* Session Item (Hover State) */
html.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start:hover,
html[data-theme="alliance"] .md\:w-72 button.h-auto.w-full.justify-start:hover {
  background: linear-gradient(90deg, rgba(26, 37, 62, 0.9) 0%, rgba(16, 24, 42, 0.95) 100%) !important;
  border-color: var(--alliance-nav-gold-border) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 0 12px rgba(197, 155, 39, 0.08) !important;
}

html.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start:hover .text-muted-foreground,
html[data-theme="alliance"] .md\:w-72 button.h-auto.w-full.justify-start:hover .text-muted-foreground {
  color: #FFFFFF !important;
}

html.theme-alliance .md\:w-72 button.h-auto.w-full.justify-start:hover .bg-muted\/50,
html[data-theme="alliance"] .md\:w-72 button.h-auto.w-full.justify-start:hover .bg-muted\/50 {
  background: #18233C !important;
  border-color: var(--alliance-nav-gold-primary) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  box-shadow: 0 0 6px rgba(197, 155, 39, 0.3) !important;
}

/* --------------------------------------------------------------------------
   Session Item (Active / Selected State) — The Paladin Crest
   -------------------------------------------------------------------------- */
html.theme-alliance .md\:w-72 button[class*="border-emerald-500"],
html.theme-alliance .md\:w-72 button[class*="bg-emerald-500"],
html.theme-alliance .md\:w-72 button.active,
html.theme-alliance .md\:w-72 button[aria-selected="true"],
html[data-theme="alliance"] .md\:w-72 button[class*="border-emerald-500"],
html[data-theme="alliance"] .md\:w-72 button[class*="bg-emerald-500"],
html[data-theme="alliance"] .md\:w-72 button.active,
html[data-theme="alliance"] .md\:w-72 button[aria-selected="true"],
.theme-alliance .md\:w-72 button[class*="border-emerald-500"] {
  /* Radiant Alliance Active Gradient */
  background: linear-gradient(
    90deg,
    rgba(197, 155, 39, 0.18) 0%,
    rgba(22, 33, 56, 0.9) 35%,
    rgba(12, 18, 32, 0.95) 100%
  ) !important;
  border: 1px solid var(--alliance-nav-gold-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(243, 216, 137, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(197, 155, 39, 0.15) !important;
}

/* Paladin Gold Accent Blade (Left Active Notch) */
html.theme-alliance .md\:w-72 button[class*="border-emerald-500"]::before,
html.theme-alliance .md\:w-72 button[class*="bg-emerald-500"]::before,
html.theme-alliance .md\:w-72 button.active::before,
html.theme-alliance .md\:w-72 button[aria-selected="true"]::before,
html[data-theme="alliance"] .md\:w-72 button[class*="border-emerald-500"]::before,
html[data-theme="alliance"] .md\:w-72 button[class*="bg-emerald-500"]::before,
.theme-alliance .md\:w-72 button[class*="border-emerald-500"]::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 15% !important;
  bottom: 15% !important;
  width: 3.5px !important;
  border-radius: 0 2px 2px 0 !important;
  background: linear-gradient(
    180deg,
    var(--alliance-nav-gold-highlight) 0%,
    var(--alliance-nav-gold-primary) 50%,
    var(--alliance-nav-gold-deep) 100%
  ) !important;
  box-shadow:
    0 0 8px rgba(197, 155, 39, 0.8),
    0 0 14px rgba(243, 216, 137, 0.4) !important;
}

/* Active Session Title */
html.theme-alliance .md\:w-72 button[class*="border-emerald-500"] .text-foreground,
html.theme-alliance .md\:w-72 button[class*="bg-emerald-500"] .text-foreground,
html.theme-alliance .md\:w-72 button[class*="border-emerald-500"] div.truncate,
html.theme-alliance .md\:w-72 button[class*="bg-emerald-500"] div.truncate,
html[data-theme="alliance"] .md\:w-72 button[class*="border-emerald-500"] .text-foreground,
html[data-theme="alliance"] .md\:w-72 button[class*="border-emerald-500"] div.truncate {
  color: #FFFFFF !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Active Provider Icon */
html.theme-alliance .md\:w-72 button[class*="border-emerald-500"] .bg-emerald-500\/20,
html.theme-alliance .md\:w-72 button[class*="bg-emerald-500"] .bg-emerald-500\/20,
html[data-theme="alliance"] .md\:w-72 button[class*="border-emerald-500"] .bg-emerald-500\/20 {
  background: rgba(197, 155, 39, 0.22) !important;
  border: 1px solid var(--alliance-nav-gold-primary) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  box-shadow: 0 0 8px rgba(197, 155, 39, 0.4) !important;
}

/* Active Session Message Count Badge */
html.theme-alliance .md\:w-72 button[class*="border-emerald-500"] .text-xs,
html[data-theme="alliance"] .md\:w-72 button[class*="border-emerald-500"] .text-xs {
  background: rgba(197, 155, 39, 0.18) !important;
  border: 1px solid rgba(197, 155, 39, 0.35) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  border-radius: 4px !important;
}

/* --------------------------------------------------------------------------
   5. Bottom User / Workspace Panel, Automations & Settings
   -------------------------------------------------------------------------- */

/* Bottom Section Footer Container */
html.theme-alliance .md\:w-72 > div:last-child,
html[data-theme="alliance"] .md\:w-72 > div:last-child {
  background: rgba(8, 12, 22, 0.95) !important;
  border-top: 1px solid var(--alliance-nav-gold-border) !important;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Version / Update Notification Banner */
html.theme-alliance .md\:w-72 .bg-amber-50\/80,
html.theme-alliance .md\:w-72 .dark\:bg-amber-900\/15,
html.theme-alliance .md\:w-72 .bg-blue-50\/80,
html.theme-alliance .md\:w-72 .dark\:bg-blue-900\/15,
html[data-theme="alliance"] .md\:w-72 .bg-amber-50\/80,
html[data-theme="alliance"] .md\:w-72 .bg-blue-50\/80 {
  background: linear-gradient(90deg, #18233C 0%, #0F1728 100%) !important;
  border: 1px solid var(--alliance-nav-gold-border) !important;
  box-shadow: inset 0 1px 0 rgba(243, 216, 137, 0.15) !important;
  border-radius: 8px !important;
}

html.theme-alliance .md\:w-72 .text-amber-500,
html.theme-alliance .md\:w-72 .text-blue-500,
html[data-theme="alliance"] .md\:w-72 .text-amber-500,
html[data-theme="alliance"] .md\:w-72 .text-blue-500 {
  color: var(--alliance-nav-gold-primary) !important;
}

/* Settings Trigger Button in Sidebar Footer */
html.theme-alliance .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span),
html[data-theme="alliance"] .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span),
.theme-alliance .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span) {
  color: var(--alliance-nav-text-secondary) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  transition: all 180ms ease !important;
}

html.theme-alliance .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span):hover,
html[data-theme="alliance"] .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span):hover,
.theme-alliance .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span):hover {
  background: var(--alliance-nav-surface-hover) !important;
  border-color: var(--alliance-nav-gold-border) !important;
  color: var(--alliance-nav-gold-highlight) !important;
  box-shadow: 0 0 10px rgba(197, 155, 39, 0.25) !important;
}

/* Settings Gear Icon Micro-Interaction */
html.theme-alliance .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span) svg,
html[data-theme="alliance"] .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span) svg {
  color: var(--alliance-nav-gold-primary) !important;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html.theme-alliance .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span):hover svg,
html[data-theme="alliance"] .md\:w-72 button:has(svg.h-3\.5.w-3\.5):has(span):hover svg {
  transform: rotate(60deg) scale(1.1) !important;
  color: var(--alliance-nav-gold-highlight) !important;
}

/* User Avatar & Shield Ring */
html.theme-alliance .user-avatar,
html.theme-alliance [data-testid="user-avatar"],
html[data-theme="alliance"] .user-avatar {
  border: 2px solid var(--alliance-nav-gold-primary) !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 8px rgba(197, 155, 39, 0.4) !important;
  border-radius: 50% !important;
}

/* Connection Status Indicator (Holy Light / Crystal Blue Glow) */
html.theme-alliance .status-indicator,
html.theme-alliance [data-status="connected"],
html[data-theme="alliance"] .status-indicator {
  background: var(--alliance-nav-gold-highlight) !important;
  box-shadow:
    0 0 6px var(--alliance-nav-gold-highlight),
    0 0 12px rgba(197, 155, 39, 0.6) !important;
}

/* Version Footnote Text */
html.theme-alliance .md\:w-72 a[href*="github"],
html[data-theme="alliance"] .md\:w-72 a[href*="github"] {
  color: rgba(148, 163, 184, 0.4) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 10px !important;
  transition: color 150ms ease !important;
}

html.theme-alliance .md\:w-72 a[href*="github"]:hover,
html[data-theme="alliance"] .md\:w-72 a[href*="github"]:hover {
  color: var(--alliance-nav-gold-highlight) !important;
}

/* --------------------------------------------------------------------------
   6. Custom Forged-Steel Scrollbar for Session List
   -------------------------------------------------------------------------- */
html.theme-alliance .md\:w-72 .overflow-y-auto::-webkit-scrollbar,
html[data-theme="alliance"] .md\:w-72 .overflow-y-auto::-webkit-scrollbar {
  width: 5px !important;
}

html.theme-alliance .md\:w-72 .overflow-y-auto::-webkit-scrollbar-track,
html[data-theme="alliance"] .md\:w-72 .overflow-y-auto::-webkit-scrollbar-track {
  background: transparent !important;
}

html.theme-alliance .md\:w-72 .overflow-y-auto::-webkit-scrollbar-thumb,
html[data-theme="alliance"] .md\:w-72 .overflow-y-auto::-webkit-scrollbar-thumb {
  background: #1B2640 !important;
  border-radius: 4px !important;
  border: 1px solid rgba(197, 155, 39, 0.15) !important;
  transition: background 200ms ease !important;
}

html.theme-alliance .md\:w-72 .overflow-y-auto::-webkit-scrollbar-thumb:hover,
html[data-theme="alliance"] .md\:w-72 .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: var(--alliance-nav-gold-primary) !important;
  box-shadow: 0 0 8px rgba(197, 155, 39, 0.5) !important;
}


/* --- Module: alliance-input-engine.css --- */
/**
 * ═══════════════════════════════════════════════════════════════════════════
 * WARCRAFT: ALLIANCE THEME — INPUT ENGINE & TOOL CALL RIBBON CSS MODULE
 * Agent 7: Input Engine & Tool Call Ribbon Specialist
 * ═══════════════════════════════════════════════════════════════════════════
 * Scope: Strictly isolated under .theme-alliance / html[data-theme="alliance"]
 * Zero Bleed Rule: No styling spills over to default dark or light themes.
 * WCAG 2.2 AAA Compliant:
 *   - Golden text: #E5C365 / #F0D58A (Contrast > 10.6:1 on slate)
 *   - Secondary text: #A5B3C6 (Contrast 8.5:1)
 *   - Dark text on gold button: #0A0E15 on #C59B27 (Contrast 11.34:1)
 */

/* ─── 0. Alliance Input Tokens ────────────────────────────────────────── */
html.theme-alliance,
[data-theme="alliance"],
.theme-alliance {
  --al-slate-deep: #090D15;
  --al-slate-input: #121824;
  --al-slate-input-bottom: #0D121B;
  --al-slate-card: #0E1422;
  --al-slate-border: rgba(197, 155, 39, 0.22);
  --al-slate-border-subtle: rgba(165, 179, 198, 0.15);

  --al-gold-primary: #C59B27;
  --al-gold-hover: #D8AF38;
  --al-gold-highlight: #F3D889;
  --al-gold-text: #E5C365;
  --al-gold-bright: #F0D58A;
  --al-gold-pale: #F7E7B4;
  --al-gold-glow: rgba(212, 175, 55, 0.25);
  --al-gold-focus-glow: rgba(212, 175, 55, 0.35);

  --al-navy-deep: #103362;
  --al-sapphire: #1B447E;
  --al-sapphire-glow: rgba(44, 90, 150, 0.22);

  --al-text-white: #EAEFF8;
  --al-text-silver: #A5B3C6;
  --al-text-muted: #7E8B9F;
  --al-btn-text-dark: #0A0E15;
}

/* ─── 1. Prompt Input Container (Noble Dark Slate with Depth) ──────────── */
html.theme-alliance [data-slot="prompt-input"],
[data-theme="alliance"] [data-slot="prompt-input"],
.theme-alliance [data-slot="prompt-input"],
html.theme-alliance form[data-slot="prompt-input"],
.theme-alliance .prompt-input-box {
  background: linear-gradient(180deg, var(--al-slate-input) 0%, var(--al-slate-input-bottom) 100%) !important;
  border: 1px solid var(--al-slate-border) !important;
  border-radius: 14px !important;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(197, 155, 39, 0.1),
    0 4px 20px -2px rgba(0, 0, 0, 0.5),
    0 0 12px -2px rgba(16, 51, 98, 0.2) !important;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

/* ─── 1.1 Focus-Within State: Stormwind Holy Light Aura ────────────────── */
html.theme-alliance [data-slot="prompt-input"]:focus-within,
[data-theme="alliance"] [data-slot="prompt-input"]:focus-within,
.theme-alliance [data-slot="prompt-input"]:focus-within,
.theme-alliance .prompt-input-box:focus-within {
  border-color: #D4AF37 !important;
  background: linear-gradient(180deg, #141B29 0%, #0F1522 100%) !important;
  box-shadow: 
    0 0 0 1px rgba(212, 175, 55, 0.42),
    0 0 24px -2px rgba(212, 175, 55, 0.24),
    0 0 45px -4px rgba(44, 90, 150, 0.2),
    inset 0 1px 0 rgba(243, 216, 137, 0.22),
    inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* ─── 1.2 Prompt Header & Divider ──────────────────────────────────────── */
html.theme-alliance [data-slot="prompt-input-header"],
[data-theme="alliance"] [data-slot="prompt-input-header"],
.theme-alliance [data-slot="prompt-input-header"] {
  border-bottom: 1px solid rgba(197, 155, 39, 0.12) !important;
  background: transparent !important;
}

/* ─── 1.3 Textarea & Placeholder ───────────────────────────────────────── */
html.theme-alliance [data-slot="prompt-input-textarea"],
[data-theme="alliance"] [data-slot="prompt-input-textarea"],
.theme-alliance [data-slot="prompt-input-textarea"],
.theme-alliance textarea.chat-input-placeholder {
  color: var(--al-text-white) !important;
  caret-color: var(--al-gold-text) !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

/* Accessible, crisp placeholder (Contrast 8.5:1, NO 40% slop opacity) */
html.theme-alliance [data-slot="prompt-input-textarea"]::placeholder,
[data-theme="alliance"] [data-slot="prompt-input-textarea"]::placeholder,
.theme-alliance [data-slot="prompt-input-textarea"]::placeholder,
.theme-alliance textarea.chat-input-placeholder::placeholder {
  color: var(--al-text-silver) !important;
  opacity: 0.92 !important;
  font-style: normal !important;
}

/* Custom slim golden scrollbar for textarea */
html.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar,
[data-theme="alliance"] [data-slot="prompt-input-textarea"]::-webkit-scrollbar,
.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar {
  width: 5px !important;
}
html.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar-track,
[data-theme="alliance"] [data-slot="prompt-input-textarea"]::-webkit-scrollbar-track,
.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar-track {
  background: transparent !important;
}
html.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar-thumb,
[data-theme="alliance"] [data-slot="prompt-input-textarea"]::-webkit-scrollbar-thumb,
.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar-thumb {
  background: rgba(197, 155, 39, 0.3) !important;
  border-radius: 9999px !important;
}
html.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar-thumb:hover,
[data-theme="alliance"] [data-slot="prompt-input-textarea"]::-webkit-scrollbar-thumb:hover,
.theme-alliance [data-slot="prompt-input-textarea"]::-webkit-scrollbar-thumb:hover {
  background: var(--al-gold-primary) !important;
}

/* ─── 1.4 Prompt Footer ────────────────────────────────────────────────── */
html.theme-alliance [data-slot="prompt-input-footer"],
[data-theme="alliance"] [data-slot="prompt-input-footer"],
.theme-alliance [data-slot="prompt-input-footer"] {
  border-top: 1px solid rgba(197, 155, 39, 0.14) !important;
  background: rgba(9, 13, 21, 0.45) !important;
  padding: 8px 12px !important;
}

/* ─── 2. Model Selector & Model Badges ─────────────────────────────────── */
html.theme-alliance .model-selector-trigger,
[data-theme="alliance"] .model-selector-trigger,
.theme-alliance [data-slot="model-selector"],
.theme-alliance .alliance-model-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  background: rgba(14, 20, 34, 0.85) !important;
  border: 1px solid rgba(197, 155, 39, 0.3) !important;
  border-radius: 8px !important;
  color: var(--al-gold-bright) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

html.theme-alliance .model-selector-trigger:hover,
[data-theme="alliance"] .model-selector-trigger:hover,
.theme-alliance [data-slot="model-selector"]:hover,
.theme-alliance .alliance-model-btn:hover {
  background: rgba(22, 32, 53, 0.95) !important;
  border-color: var(--al-gold-primary) !important;
  box-shadow: 0 0 10px rgba(197, 155, 39, 0.22) !important;
  color: var(--al-gold-pale) !important;
}

/* Model Dropdown Menu / Popover */
html.theme-alliance .model-dropdown-menu,
[data-theme="alliance"] .model-dropdown-menu,
.theme-alliance [data-radix-popper-content-wrapper] [role="menu"],
.theme-alliance .alliance-model-popover {
  background: #0E1422 !important;
  border: 1px solid rgba(197, 155, 39, 0.32) !important;
  border-radius: 10px !important;
  box-shadow: 
    0 12px 36px rgba(0, 0, 0, 0.75),
    0 0 16px rgba(16, 51, 98, 0.4),
    inset 0 1px 0 rgba(243, 216, 137, 0.15) !important;
  padding: 6px !important;
  /* backdrop-filter cleaned for zero-slop */ !important;
}

/* Dropdown Menu Item */
html.theme-alliance [role="menuitem"],
[data-theme="alliance"] [role="menuitem"],
.theme-alliance .alliance-model-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  color: var(--al-text-silver) !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.14s ease !important;
}

html.theme-alliance [role="menuitem"]:hover,
html.theme-alliance [role="menuitem"][data-highlighted],
[data-theme="alliance"] [role="menuitem"]:hover,
.theme-alliance .alliance-model-item:hover {
  background: linear-gradient(90deg, rgba(197, 155, 39, 0.18) 0%, rgba(16, 51, 98, 0.25) 100%) !important;
  color: var(--al-gold-bright) !important;
  border-left: 2px solid var(--al-gold-primary) !important;
  padding-left: 8px !important;
}

/* Model Specific Badges */
/* Gemini: Stormwind Paladin Holy Gold */
.theme-alliance .badge-gemini,
html.theme-alliance [data-model*="gemini"] .model-badge {
  background: rgba(197, 155, 39, 0.18) !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  color: var(--al-gold-bright) !important;
  border-radius: 4px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 1px 6px !important;
  letter-spacing: 0.03em !important;
}

/* Claude: Royal Sapphire Blue */
.theme-alliance .badge-claude,
html.theme-alliance [data-model*="claude"] .model-badge {
  background: rgba(27, 68, 126, 0.4) !important;
  border: 1px solid rgba(104, 160, 229, 0.45) !important;
  color: #B8D6FD !important;
  border-radius: 4px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 1px 6px !important;
  letter-spacing: 0.03em !important;
}

/* Flash: Silver Vanguard Steel */
.theme-alliance .badge-flash,
html.theme-alliance [data-model*="flash"] .model-badge {
  background: rgba(80, 105, 135, 0.3) !important;
  border: 1px solid rgba(165, 179, 198, 0.38) !important;
  color: #E2EAF4 !important;
  border-radius: 4px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 1px 6px !important;
  letter-spacing: 0.03em !important;
}

/* Context Window Indicator Bar (Индикатор контекста) */
html.theme-alliance .context-meter-track,
[data-theme="alliance"] .context-meter-track,
.theme-alliance .alliance-context-track {
  width: 56px !important;
  height: 4px !important;
  background: rgba(9, 13, 21, 0.9) !important;
  border: 1px solid rgba(197, 155, 39, 0.2) !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  position: relative !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

html.theme-alliance .context-meter-fill,
[data-theme="alliance"] .context-meter-fill,
.theme-alliance .alliance-context-fill {
  height: 100% !important;
  background: linear-gradient(90deg, var(--al-navy-deep) 0%, var(--al-sapphire) 50%, var(--al-gold-primary) 100%) !important;
  box-shadow: 0 0 6px var(--al-gold-primary) !important;
  border-radius: 9999px !important;
  transition: width 0.3s ease !important;
}

/* ─── 3. Submit Button: Stormwind Burnished Gold Chevron ───────────────── */
html.theme-alliance [data-slot="prompt-input-submit"],
[data-theme="alliance"] [data-slot="prompt-input-submit"],
.theme-alliance [data-slot="prompt-input-submit"],
html.theme-alliance form[data-slot="prompt-input"] button[type="submit"],
.theme-alliance .prompt-submit-chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #E5C365 0%, #C59B27 55%, #9D7415 100%) !important;
  border: 1px solid rgba(243, 216, 137, 0.6) !important;
  color: var(--al-btn-text-dark) !important;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(197, 155, 39, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  padding: 0 !important;
}

/* Submit Icon (Sharp dark chevron on gold) */
html.theme-alliance [data-slot="prompt-input-submit"] svg,
[data-theme="alliance"] [data-slot="prompt-input-submit"] svg,
.theme-alliance [data-slot="prompt-input-submit"] svg,
.theme-alliance .prompt-submit-chevron svg {
  stroke: var(--al-btn-text-dark) !important;
  stroke-width: 2.25px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  width: 16px !important;
  height: 16px !important;
  transition: transform 0.18s ease !important;
}

/* Submit Hover */
html.theme-alliance [data-slot="prompt-input-submit"]:hover:not(:disabled),
[data-theme="alliance"] [data-slot="prompt-input-submit"]:hover:not(:disabled),
.theme-alliance [data-slot="prompt-input-submit"]:hover:not(:disabled),
.theme-alliance .prompt-submit-chevron:hover:not(:disabled) {
  transform: translateY(-1.5px) scale(1.03) !important;
  background: linear-gradient(135deg, #F3D889 0%, #D8AF38 55%, #B3861E 100%) !important;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(229, 195, 101, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

html.theme-alliance [data-slot="prompt-input-submit"]:hover:not(:disabled) svg,
.theme-alliance .prompt-submit-chevron:hover:not(:disabled) svg {
  transform: translateY(-1px) !important;
}

/* Submit Active / Click */
html.theme-alliance [data-slot="prompt-input-submit"]:active:not(:disabled),
[data-theme="alliance"] [data-slot="prompt-input-submit"]:active:not(:disabled),
.theme-alliance [data-slot="prompt-input-submit"]:active:not(:disabled),
.theme-alliance .prompt-submit-chevron:active:not(:disabled) {
  transform: translateY(1px) scale(0.97) !important;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Submit Disabled */
html.theme-alliance [data-slot="prompt-input-submit"]:disabled,
[data-theme="alliance"] [data-slot="prompt-input-submit"]:disabled,
.theme-alliance [data-slot="prompt-input-submit"]:disabled,
.theme-alliance .prompt-submit-chevron:disabled {
  background: #141A26 !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
  color: #4E5A6C !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.65 !important;
}

html.theme-alliance [data-slot="prompt-input-submit"]:disabled svg,
.theme-alliance .prompt-submit-chevron:disabled svg {
  stroke: #4E5A6C !important;
}

/* ─── 4. Tool Ribbon & Tool Chips (Web search, Terminal, MCP) ─────────── */
html.theme-alliance [data-slot="prompt-input-tools"],
[data-theme="alliance"] [data-slot="prompt-input-tools"],
.theme-alliance [data-slot="prompt-input-tools"],
.theme-alliance .prompt-tools-ribbon {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

/* Tool chip pill */
html.theme-alliance [data-slot="prompt-input-tools"] > button,
[data-theme="alliance"] [data-slot="prompt-input-tools"] > button,
.theme-alliance [data-slot="prompt-input-tools"] > button,
.theme-alliance .alliance-tool-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  background: rgba(18, 25, 39, 0.75) !important;
  border: 1px solid rgba(165, 179, 198, 0.18) !important;
  color: var(--al-text-silver) !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.015em !important;
  cursor: pointer !important;
  transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  height: 26px !important;
}

/* Tool chip hover */
html.theme-alliance [data-slot="prompt-input-tools"] > button:hover,
[data-theme="alliance"] [data-slot="prompt-input-tools"] > button:hover,
.theme-alliance [data-slot="prompt-input-tools"] > button:hover,
.theme-alliance .alliance-tool-chip:hover {
  background: rgba(26, 36, 54, 0.95) !important;
  border-color: rgba(212, 175, 55, 0.45) !important;
  color: var(--al-gold-bright) !important;
  box-shadow: 0 0 10px rgba(197, 155, 39, 0.2) !important;
}

/* Tool chip active / selected state */
html.theme-alliance [data-slot="prompt-input-tools"] > button[aria-pressed="true"],
html.theme-alliance [data-slot="prompt-input-tools"] > button.active,
[data-theme="alliance"] [data-slot="prompt-input-tools"] > button[aria-pressed="true"],
.theme-alliance .alliance-tool-chip.active {
  background: linear-gradient(135deg, rgba(16, 51, 98, 0.65) 0%, rgba(27, 68, 126, 0.55) 100%) !important;
  border-color: rgba(212, 175, 55, 0.6) !important;
  color: var(--al-gold-pale) !important;
  box-shadow: 
    0 0 10px rgba(16, 51, 98, 0.5),
    inset 0 0 0 1px rgba(243, 216, 137, 0.25) !important;
}

/* Tool Chip Specific Accents */
/* Web Search Chip */
.theme-alliance .tool-web-search svg,
html.theme-alliance [data-tool="web_search"] svg {
  color: #79ABEA !important;
}

/* Terminal Chip */
.theme-alliance .tool-terminal svg,
html.theme-alliance [data-tool="terminal"] svg {
  color: var(--al-gold-primary) !important;
}

/* MCP / Plugins Chip */
.theme-alliance .tool-mcp svg,
html.theme-alliance [data-tool="mcp"] svg {
  color: var(--al-gold-highlight) !important;
}

/* Keyboard shortcut chip inside tool */
html.theme-alliance [data-slot="prompt-input-tools"] kbd,
.theme-alliance .alliance-tool-chip kbd {
  background: rgba(9, 13, 21, 0.7) !important;
  border: 1px solid rgba(197, 155, 39, 0.22) !important;
  color: var(--al-gold-primary) !important;
  border-radius: 3px !important;
  font-size: 9.5px !important;
  padding: 0 4px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

/* ─── 5. Loading & Response Streaming Indicator (Holy Light Pulse) ──────── */
/* Streaming progress hairline at the base of prompt */
html.theme-alliance [data-slot="prompt-input"].is-streaming::after,
[data-theme="alliance"] [data-slot="prompt-input"].is-streaming::after,
.theme-alliance .prompt-input-box.is-streaming::after {
  content: "" !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, 
    #103362 0%, 
    #1B447E 25%, 
    #D4AF37 50%, 
    #F3D889 75%, 
    #103362 100%
  ) !important;
  background-size: 200% 100% !important;
  animation: holy-stream-shimmer 2.2s linear infinite !important;
}

@keyframes holy-stream-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Paladin Holy Glow Pulse animation for loading container */
@keyframes holy-light-pulse {
  0%, 100% {
    box-shadow: 
      0 0 0 1px rgba(212, 175, 55, 0.35),
      0 0 16px -2px rgba(212, 175, 55, 0.18),
      0 0 30px -4px rgba(44, 90, 150, 0.15);
  }
  50% {
    box-shadow: 
      0 0 0 1px rgba(243, 216, 137, 0.55),
      0 0 28px 2px rgba(212, 175, 55, 0.38),
      0 0 50px -2px rgba(44, 90, 150, 0.28);
  }
}

html.theme-alliance [data-slot="prompt-input"].is-generating,
[data-theme="alliance"] [data-slot="prompt-input"].is-generating,
.theme-alliance .prompt-input-box.is-generating {
  animation: holy-light-pulse 3s ease-in-out infinite !important;
}

/* Grand Marshal Ruby Stop Button (When model is generating response) */
html.theme-alliance [data-slot="prompt-input-submit"].is-stop-btn,
[data-theme="alliance"] [data-slot="prompt-input-submit"].is-stop-btn,
.theme-alliance [data-slot="prompt-input-submit"].is-stop-btn,
.theme-alliance .prompt-stop-btn {
  background: linear-gradient(135deg, #991B1B 0%, #7F1D1D 55%, #591010 100%) !important;
  border: 1px solid rgba(254, 202, 202, 0.5) !important;
  color: #FFFFFF !important;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(153, 27, 27, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

html.theme-alliance [data-slot="prompt-input-submit"].is-stop-btn:hover,
.theme-alliance .prompt-stop-btn:hover {
  background: linear-gradient(135deg, #B91C1C 0%, #991B1B 55%, #6B1212 100%) !important;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(185, 28, 28, 0.65) !important;
  transform: translateY(-1.5px) scale(1.03) !important;
}

html.theme-alliance [data-slot="prompt-input-submit"].is-stop-btn svg rect,
.theme-alliance .prompt-stop-btn svg rect {
  fill: #FFFFFF !important;
  stroke: none !important;
}


/* --- Module: theme-alliance-code.css --- */
/* ==========================================================================
   WARCRAFT: ALLIANCE THEME — CODE, TERMINAL & ARTIFACTS STYLING MODULE
   Scoped strictly under html[data-theme="alliance"] and .theme-alliance
   Zero-Bleed Architecture: No leaking into AVO Dark or Light themes
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES (Scoped to Alliance theme)
   -------------------------------------------------------------------------- */
:is(html[data-theme="alliance"], .theme-alliance) {
  /* Palette: Stormwind Gold & Arcane Sapphire */
  --alliance-gold-base: #C89B3C;
  --alliance-gold-bright: #E5C158;
  --alliance-gold-light: #F0D58A;
  --alliance-gold-glow: rgba(229, 193, 88, 0.35);
  --alliance-gold-border: rgba(200, 155, 60, 0.30);
  --alliance-gold-subtle: rgba(200, 155, 60, 0.12);

  --alliance-sapphire-dark: #0F172A;
  --alliance-sapphire-surface: #0C1018;
  --alliance-sapphire-card: #111624;
  --alliance-sapphire-elevated: #161F33;
  --alliance-sapphire-border: rgba(59, 130, 246, 0.22);
  --alliance-sapphire-accent: #68A0E5;
  --alliance-sapphire-glow: rgba(104, 160, 229, 0.25);

  /* Code Syntax Palette (WCAG AAA compliant on #0C1018) */
  --alliance-syntax-bg: #0C1018;
  --alliance-syntax-header-bg: #101624;
  --alliance-syntax-fg: #E2E8F0;
  --alliance-syntax-keyword: #E5C158;      /* Stormwind Warm Gold (15.7:1) */
  --alliance-syntax-string: #68D391;       /* Elven Emerald / Soft Mint (15.2:1) */
  --alliance-syntax-function: #68A0E5;     /* Ice Sapphire / Arcane Blue (10.4:1) */
  --alliance-syntax-number: #E5A048;       /* Amber / Dwarven Bronze (12.6:1) */
  --alliance-syntax-comment: #8FA0B5;      /* Matte Steel Grey (10.1:1) */
  --alliance-syntax-operator: #CBD5E1;     /* Polished Steel (14.2:1) */
  --alliance-syntax-type: #93C5FD;         /* High Elven Azure (12.8:1) */
  --alliance-syntax-variable: #F1F5F9;     /* Silver White (18.1:1) */
  --alliance-syntax-constant: #F6AD55;     /* Warm Topaz (13.5:1) */

  /* Diff Palette (Noble muted tones, zero neon/radioactive glare) */
  --alliance-diff-add-bg: rgba(22, 60, 38, 0.45);
  --alliance-diff-add-border: #38A169;
  --alliance-diff-add-text: #D1FAE5;
  --alliance-diff-add-hl: rgba(72, 187, 120, 0.32);

  --alliance-diff-remove-bg: rgba(74, 21, 28, 0.45);
  --alliance-diff-remove-border: #E53E3E;
  --alliance-diff-remove-text: #FEE2E2;
  --alliance-diff-remove-hl: rgba(229, 62, 62, 0.32);

  --alliance-diff-hunk-bg: rgba(30, 58, 138, 0.28);
  --alliance-diff-hunk-border: #3B82F6;
  --alliance-diff-hunk-text: #93C5FD;

  /* Terminal Obsidian Palette */
  --alliance-term-bg: #070A0F;
  --alliance-term-header-bg: #0F1420;
  --alliance-term-fg: #E2E8F0;
  --alliance-term-cursor: #E5C158;
  --alliance-term-selection: rgba(212, 175, 55, 0.30);
}

/* --------------------------------------------------------------------------
   2. CODE BLOCKS & SYNTAX HIGHLIGHTING (Prism / Shiki / hljs / CodeMirror)
   -------------------------------------------------------------------------- */

/* Code block container */
:is(html[data-theme="alliance"], .theme-alliance) pre,
:is(html[data-theme="alliance"], .theme-alliance) .prose pre,
:is(html[data-theme="alliance"], .theme-alliance) div[class*="code-block"],
:is(html[data-theme="alliance"], .theme-alliance) div[data-code-block] {
  background: var(--alliance-syntax-bg) !important;
  background-image: linear-gradient(180deg, #0E1422 0%, #090C14 100%) !important;
  color: var(--alliance-syntax-fg) !important;
  border: 1px solid var(--alliance-gold-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.65), 
              inset 0 1px 0 rgba(212, 175, 55, 0.15) !important;
  position: relative !important;
  overflow: hidden !important;
  margin: 1.25rem 0 !important;
}

/* Code block scroll area */
:is(html[data-theme="alliance"], .theme-alliance) pre > code,
:is(html[data-theme="alliance"], .theme-alliance) div[class*="code-block"] pre {
  background: transparent !important;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, monospace !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  letter-spacing: -0.01em !important;
  tab-size: 2 !important;
  text-shadow: none !important;
}

/* Inline code snippet */
:is(html[data-theme="alliance"], .theme-alliance) :not(pre) > code {
  background-color: rgba(22, 31, 48, 0.75) !important;
  color: var(--alliance-gold-bright) !important;
  border: 1px solid rgba(200, 155, 60, 0.28) !important;
  border-radius: 5px !important;
  padding: 0.15rem 0.4rem !important;
  font-size: 0.875em !important;
  font-weight: 500 !important;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace !important;
}

/* Code block header chrome */
:is(html[data-theme="alliance"], .theme-alliance) .code-block-header,
:is(html[data-theme="alliance"], .theme-alliance) div[class*="code-header"],
:is(html[data-theme="alliance"], .theme-alliance) div[data-code-header],
:is(html[data-theme="alliance"], .theme-alliance) pre + div[class*="copy"],
:is(html[data-theme="alliance"], .theme-alliance) .flex.items-center.justify-between.border-b {
  background: linear-gradient(90deg, #111726 0%, #0D1320 100%) !important;
  border-bottom: 1px solid var(--alliance-gold-border) !important;
  padding: 0.45rem 0.85rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Language Badge */
:is(html[data-theme="alliance"], .theme-alliance) .code-lang,
:is(html[data-theme="alliance"], .theme-alliance) span[class*="language-"],
:is(html[data-theme="alliance"], .theme-alliance) span[data-language],
:is(html[data-theme="alliance"], .theme-alliance) [class*="code-block"] span.text-xs {
  background: rgba(200, 155, 60, 0.12) !important;
  border: 1px solid rgba(200, 155, 60, 0.35) !important;
  color: var(--alliance-gold-light) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
}

/* Copy Button with Alliance Gold Feedback */
:is(html[data-theme="alliance"], .theme-alliance) button[class*="copy"],
:is(html[data-theme="alliance"], .theme-alliance) button[aria-label*="Copy" i],
:is(html[data-theme="alliance"], .theme-alliance) button[title*="Copy" i],
:is(html[data-theme="alliance"], .theme-alliance) button[data-copy-button] {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(200, 155, 60, 0.25) !important;
  color: #CBD5E1 !important;
  border-radius: 5px !important;
  padding: 4px 9px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

:is(html[data-theme="alliance"], .theme-alliance) button[class*="copy"]:hover,
:is(html[data-theme="alliance"], .theme-alliance) button[aria-label*="Copy" i]:hover,
:is(html[data-theme="alliance"], .theme-alliance) button[title*="Copy" i]:hover {
  background: rgba(229, 193, 88, 0.16) !important;
  border-color: var(--alliance-gold-bright) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 10px var(--alliance-gold-glow) !important;
  transform: translateY(-0.5px) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) button[class*="copy"]:active,
:is(html[data-theme="alliance"], .theme-alliance) button[class*="copied"],
:is(html[data-theme="alliance"], .theme-alliance) button[data-copied="true"] {
  background: linear-gradient(135deg, #C89B3C 0%, #E5C158 100%) !important;
  border-color: var(--alliance-gold-light) !important;
  color: #0A0E15 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 14px rgba(229, 193, 88, 0.6) !important;
}

/* Line Numbers */
:is(html[data-theme="alliance"], .theme-alliance) .react-syntax-highlighter-line-number,
:is(html[data-theme="alliance"], .theme-alliance) .line-numbers .line-numbers-rows,
:is(html[data-theme="alliance"], .theme-alliance) .cm-lineNumbers .cm-gutterElement {
  color: var(--alliance-syntax-comment) !important;
  opacity: 0.7 !important;
  user-select: none !important;
  padding-right: 12px !important;
  border-right: 1px solid rgba(200, 155, 60, 0.15) !important;
  font-size: 12px !important;
}

/* Token Highlights: Prism & hljs syntax */
:is(html[data-theme="alliance"], .theme-alliance) .token.keyword,
:is(html[data-theme="alliance"], .theme-alliance) .token.selector,
:is(html[data-theme="alliance"], .theme-alliance) .token.tag,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-keyword,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-selector-tag,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-tag {
  color: var(--alliance-syntax-keyword) !important;
  font-weight: 600 !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.string,
:is(html[data-theme="alliance"], .theme-alliance) .token.char,
:is(html[data-theme="alliance"], .theme-alliance) .token.attr-value,
:is(html[data-theme="alliance"], .theme-alliance) .token.regex,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-string,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-regexp {
  color: var(--alliance-syntax-string) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.function,
:is(html[data-theme="alliance"], .theme-alliance) .token.class-name,
:is(html[data-theme="alliance"], .theme-alliance) .token.builtin,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-title.class_,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-title.function_,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-built_in {
  color: var(--alliance-syntax-function) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.number,
:is(html[data-theme="alliance"], .theme-alliance) .token.constant,
:is(html[data-theme="alliance"], .theme-alliance) .token.symbol,
:is(html[data-theme="alliance"], .theme-alliance) .token.boolean,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-number,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-literal {
  color: var(--alliance-syntax-number) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.comment,
:is(html[data-theme="alliance"], .theme-alliance) .token.prolog,
:is(html[data-theme="alliance"], .theme-alliance) .token.doctype,
:is(html[data-theme="alliance"], .theme-alliance) .token.cdata,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-comment,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-quote {
  color: var(--alliance-syntax-comment) !important;
  font-style: italic !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.operator,
:is(html[data-theme="alliance"], .theme-alliance) .token.punctuation,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-punctuation,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-operator {
  color: var(--alliance-syntax-operator) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.property,
:is(html[data-theme="alliance"], .theme-alliance) .token.variable,
:is(html[data-theme="alliance"], .theme-alliance) .token.parameter,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-variable,
:is(html[data-theme="alliance"], .theme-alliance) .hljs-attr {
  color: var(--alliance-syntax-variable) !important;
}

/* CodeMirror 6 Theme Overrides */
:is(html[data-theme="alliance"], .theme-alliance) .cm-editor {
  background: var(--alliance-syntax-bg) !important;
  color: var(--alliance-syntax-fg) !important;
  border: 1px solid var(--alliance-gold-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .cm-editor .cm-scroller {
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace !important;
  line-height: 1.65 !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .cm-editor .cm-gutters {
  background: #090D15 !important;
  color: var(--alliance-syntax-comment) !important;
  border-right: 1px solid var(--alliance-gold-border) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .cm-editor .cm-activeLineGutter {
  background: rgba(212, 175, 55, 0.14) !important;
  color: var(--alliance-gold-bright) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .cm-editor .cm-activeLine {
  background: rgba(30, 58, 138, 0.16) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .cm-editor .cm-cursor {
  border-left: 2px solid var(--alliance-gold-bright) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .cm-editor .cm-selectionBackground,
:is(html[data-theme="alliance"], .theme-alliance) .cm-editor.cm-focused .cm-selectionBackground {
  background: rgba(43, 76, 126, 0.55) !important;
}

/* --------------------------------------------------------------------------
   3. DIFF BLOCKS (Muted Royal Crimson & Forest Emerald)
   -------------------------------------------------------------------------- */

/* Diff container */
:is(html[data-theme="alliance"], .theme-alliance) .diff-view,
:is(html[data-theme="alliance"], .theme-alliance) pre.language-diff,
:is(html[data-theme="alliance"], .theme-alliance) div[class*="diff-container"] {
  background: #080C14 !important;
  border: 1px solid var(--alliance-gold-border) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace !important;
}

/* Diff Additions (+) */
:is(html[data-theme="alliance"], .theme-alliance) .token.inserted,
:is(html[data-theme="alliance"], .theme-alliance) .diff-line-add,
:is(html[data-theme="alliance"], .theme-alliance) .diff-add,
:is(html[data-theme="alliance"], .theme-alliance) [class*="diff-added"],
:is(html[data-theme="alliance"], .theme-alliance) tr.diff-add,
:is(html[data-theme="alliance"], .theme-alliance) div[data-diff-type="add"] {
  background-color: var(--alliance-diff-add-bg) !important;
  border-left: 3px solid var(--alliance-diff-add-border) !important;
  color: var(--alliance-diff-add-text) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.inserted::before,
:is(html[data-theme="alliance"], .theme-alliance) .diff-line-add .diff-prefix {
  color: #68D391 !important;
  font-weight: 700 !important;
}

/* Word diff insert highlight */
:is(html[data-theme="alliance"], .theme-alliance) .diff-add-word,
:is(html[data-theme="alliance"], .theme-alliance) ins {
  background-color: var(--alliance-diff-add-hl) !important;
  color: #FFFFFF !important;
  border-radius: 3px !important;
  padding: 1px 4px !important;
  text-decoration: none !important;
}

/* Diff Deletions (-) */
:is(html[data-theme="alliance"], .theme-alliance) .token.deleted,
:is(html[data-theme="alliance"], .theme-alliance) .diff-line-del,
:is(html[data-theme="alliance"], .theme-alliance) .diff-del,
:is(html[data-theme="alliance"], .theme-alliance) [class*="diff-removed"],
:is(html[data-theme="alliance"], .theme-alliance) tr.diff-del,
:is(html[data-theme="alliance"], .theme-alliance) div[data-diff-type="delete"] {
  background-color: var(--alliance-diff-remove-bg) !important;
  border-left: 3px solid var(--alliance-diff-remove-border) !important;
  color: var(--alliance-diff-remove-text) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .token.deleted::before,
:is(html[data-theme="alliance"], .theme-alliance) .diff-line-del .diff-prefix {
  color: #FC8181 !important;
  font-weight: 700 !important;
}

/* Word diff delete highlight */
:is(html[data-theme="alliance"], .theme-alliance) .diff-del-word,
:is(html[data-theme="alliance"], .theme-alliance) del {
  background-color: var(--alliance-diff-remove-hl) !important;
  color: #FFFFFF !important;
  border-radius: 3px !important;
  padding: 1px 4px !important;
  text-decoration: line-through !important;
}

/* Diff Hunk / Chunk Headers (@@ ... @@) */
:is(html[data-theme="alliance"], .theme-alliance) .token.coord,
:is(html[data-theme="alliance"], .theme-alliance) .diff-hunk,
:is(html[data-theme="alliance"], .theme-alliance) .diff-line-hunk {
  background-color: var(--alliance-diff-hunk-bg) !important;
  border-left: 3px solid var(--alliance-diff-hunk-border) !important;
  color: var(--alliance-diff-hunk-text) !important;
  font-weight: 600 !important;
}

/* --------------------------------------------------------------------------
   4. MARKDOWN TABLES (Zebra Striping & Gold Divider)
   -------------------------------------------------------------------------- */

:is(html[data-theme="alliance"], .theme-alliance) .prose table,
:is(html[data-theme="alliance"], .theme-alliance) .markdown-body table,
:is(html[data-theme="alliance"], .theme-alliance) table:not([class*="xterm"]) {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 1.25rem 0 !important;
  border: 1px solid var(--alliance-gold-border) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-color: #0B0F18 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
}

/* Table Header */
:is(html[data-theme="alliance"], .theme-alliance) table thead,
:is(html[data-theme="alliance"], .theme-alliance) table th {
  background: linear-gradient(180deg, #151D2C 0%, #0F1624 100%) !important;
  color: var(--alliance-gold-light) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 11px 16px !important;
  text-align: left !important;
  border-bottom: 2px solid var(--alliance-gold-base) !important; /* Stormwind Gold Divider */
  border-right: 1px solid rgba(200, 155, 60, 0.15) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) table th:last-child {
  border-right: none !important;
}

/* Table Rows & Zebra Striping */
:is(html[data-theme="alliance"], .theme-alliance) table tbody tr {
  transition: background-color 0.15s ease !important;
}

/* Even rows */
:is(html[data-theme="alliance"], .theme-alliance) table tbody tr:nth-child(even) {
  background-color: #0A0E17 !important;
}

/* Odd rows (Subtle sapphire-navy tint) */
:is(html[data-theme="alliance"], .theme-alliance) table tbody tr:nth-child(odd) {
  background-color: rgba(18, 27, 43, 0.6) !important;
}

/* Row Hover */
:is(html[data-theme="alliance"], .theme-alliance) table tbody tr:hover {
  background-color: rgba(37, 54, 82, 0.65) !important;
}

/* Table Cells */
:is(html[data-theme="alliance"], .theme-alliance) table td {
  padding: 10px 16px !important;
  color: #E2E8F0 !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
  font-variant-numeric: tabular-nums !important;
}

:is(html[data-theme="alliance"], .theme-alliance) table td:last-child {
  border-right: none !important;
}

:is(html[data-theme="alliance"], .theme-alliance) table tbody tr:last-child td {
  border-bottom: none !important;
}

/* --------------------------------------------------------------------------
   5. TERMINAL (xterm / CLI Obsidian Shell)
   -------------------------------------------------------------------------- */

/* Terminal outer window */
:is(html[data-theme="alliance"], .theme-alliance) div[class*="terminal"],
:is(html[data-theme="alliance"], .theme-alliance) .xterm-container,
:is(html[data-theme="alliance"], .theme-alliance) div:has(> .xterm) {
  background: var(--alliance-term-bg) !important;
  border: 1px solid var(--alliance-gold-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75),
              inset 0 1px 0 rgba(212, 175, 55, 0.15) !important;
  overflow: hidden !important;
}

/* Terminal Chrome / Header */
:is(html[data-theme="alliance"], .theme-alliance) div[class*="terminal"] > .border-b,
:is(html[data-theme="alliance"], .theme-alliance) .terminal-header {
  background: linear-gradient(90deg, #121827 0%, #0C111C 100%) !important;
  border-bottom: 1px solid var(--alliance-gold-border) !important;
  padding: 0.5rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Terminal Title */
:is(html[data-theme="alliance"], .theme-alliance) .terminal-title {
  color: var(--alliance-gold-light) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}

/* xterm core viewport and canvas */
:is(html[data-theme="alliance"], .theme-alliance) .xterm {
  background: var(--alliance-term-bg) !important;
  padding: 8px !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .xterm-viewport {
  background-color: var(--alliance-term-bg) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .xterm-screen {
  background-color: var(--alliance-term-bg) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .xterm .xterm-cursor-block {
  background-color: var(--alliance-term-cursor) !important;
  box-shadow: 0 0 8px var(--alliance-gold-glow) !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .xterm-selection div {
  background-color: var(--alliance-term-selection) !important;
}

/* --------------------------------------------------------------------------
   6. ARTIFACTS & SYSTEM CARDS (Antigravity & CloudCLI)
   -------------------------------------------------------------------------- */

:is(html[data-theme="alliance"], .theme-alliance) [data-artifact],
:is(html[data-theme="alliance"], .theme-alliance) .artifact-container,
:is(html[data-theme="alliance"], .theme-alliance) .artifact-card,
:is(html[data-theme="alliance"], .theme-alliance) div[class*="artifact"] {
  background: linear-gradient(180deg, #111827 0%, #0B0F19 100%) !important;
  border: 1px solid var(--alliance-gold-border) !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.65), 
              inset 0 1px 0 rgba(212, 175, 55, 0.2) !important;
  overflow: hidden !important;
  margin: 1.25rem 0 !important;
}

/* Artifact Header */
:is(html[data-theme="alliance"], .theme-alliance) .artifact-header,
:is(html[data-theme="alliance"], .theme-alliance) div[class*="artifact-header"] {
  background: linear-gradient(90deg, #182236 0%, #101726 100%) !important;
  border-bottom: 1px solid var(--alliance-gold-border) !important;
  padding: 0.65rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

:is(html[data-theme="alliance"], .theme-alliance) .artifact-title {
  color: var(--alliance-gold-light) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
}

/* Callouts / Markdown Alerts inside Artifacts */
:is(html[data-theme="alliance"], .theme-alliance) blockquote[data-alert="note"],
:is(html[data-theme="alliance"], .theme-alliance) .markdown-alert-note {
  border-left: 4px solid var(--alliance-sapphire-accent) !important;
  background: rgba(27, 46, 75, 0.35) !important;
  color: #E2E8F0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 6px 6px 0 !important;
}

:is(html[data-theme="alliance"], .theme-alliance) blockquote[data-alert="tip"],
:is(html[data-theme="alliance"], .theme-alliance) .markdown-alert-tip {
  border-left: 4px solid #48BB78 !important;
  background: rgba(22, 60, 38, 0.35) !important;
  color: #E2E8F0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 6px 6px 0 !important;
}

:is(html[data-theme="alliance"], .theme-alliance) blockquote[data-alert="important"],
:is(html[data-theme="alliance"], .theme-alliance) .markdown-alert-important {
  border-left: 4px solid var(--alliance-gold-bright) !important;
  background: rgba(74, 58, 20, 0.35) !important;
  color: #E2E8F0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 6px 6px 0 !important;
}

:is(html[data-theme="alliance"], .theme-alliance) blockquote[data-alert="warning"],
:is(html[data-theme="alliance"], .theme-alliance) .markdown-alert-warning {
  border-left: 4px solid #ED8936 !important;
  background: rgba(74, 45, 18, 0.35) !important;
  color: #E2E8F0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 6px 6px 0 !important;
}

:is(html[data-theme="alliance"], .theme-alliance) blockquote[data-alert="caution"],
:is(html[data-theme="alliance"], .theme-alliance) .markdown-alert-caution {
  border-left: 4px solid #F56565 !important;
  background: rgba(74, 21, 28, 0.35) !important;
  color: #E2E8F0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 6px 6px 0 !important;
}
/* ═══════════════════════════════════════════════════════════════════════════
   WARCRAFT: ALLIANCE THEME — COMPOSER, MODEL BADGES & TEAM LAUNCHER
   Specialist: Agent 6 (Composer & Model Badges Specialist)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. COMPOSER CONTAINER: STORMWIND STEEL & HOLY LIGHT AURA ─────────── */
html.theme-alliance [data-slot="prompt-input"],
html.theme-alliance div[class*="border-input"]:has(textarea),
[data-theme="alliance"] [data-slot="prompt-input"],
.theme-alliance [data-slot="prompt-input"],
.theme-alliance .prompt-input-box {
  background: linear-gradient(180deg, #0E1626 0%, #090E18 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.32) !important;
  border-radius: 14px !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(212, 175, 55, 0.06),
    0 6px 24px -2px rgba(0, 0, 0, 0.65),
    0 0 16px -2px rgba(16, 51, 98, 0.35) !important;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
  position: relative !important;
}

/* Holy Light Aura on focus-within (Radiant Golden Ring) */
html.theme-alliance [data-slot="prompt-input"]:focus-within,
html.theme-alliance div[class*="border-input"]:has(textarea:focus),
[data-theme="alliance"] [data-slot="prompt-input"]:focus-within,
.theme-alliance [data-slot="prompt-input"]:focus-within,
.theme-alliance .prompt-input-box:focus-within {
  border-color: #D4AF37 !important;
  background: linear-gradient(180deg, #121C30 0%, #0A111E 100%) !important;
  box-shadow: 
    0 0 0 2px rgba(212, 175, 55, 0.5),
    0 0 24px 2px rgba(212, 175, 55, 0.28),
    0 0 45px -4px rgba(44, 90, 150, 0.3),
    inset 0 1px 0 rgba(255, 240, 180, 0.22),
    inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* Textarea typography & caret */
html.theme-alliance [data-slot="prompt-input-textarea"],
[data-theme="alliance"] [data-slot="prompt-input-textarea"],
.theme-alliance [data-slot="prompt-input-textarea"],
.theme-alliance textarea.chat-input-placeholder {
  color: #EDF3FC !important;
  caret-color: #D4AF37 !important;
  background: transparent !important;
}

html.theme-alliance [data-slot="prompt-input-textarea"]::placeholder,
[data-theme="alliance"] [data-slot="prompt-input-textarea"]::placeholder,
.theme-alliance [data-slot="prompt-input-textarea"]::placeholder {
  color: rgba(165, 185, 215, 0.55) !important;
}

/* Footer divider */
html.theme-alliance [data-slot="prompt-input-footer"],
[data-theme="alliance"] [data-slot="prompt-input-footer"],
.theme-alliance [data-slot="prompt-input-footer"] {
  border-top: 1px solid rgba(212, 175, 55, 0.14) !important;
}

/* ─── 2. SEND BUTTON: STORMWIND GOLDEN LION SHIELD (#D4AF37) ───────────── */
html.theme-alliance [data-slot="prompt-input-submit"],
html.theme-alliance [data-slot="prompt-input-footer"] button[type="submit"],
html.theme-alliance [data-slot="prompt-input"] button:has(svg path[d*="M12 19V5"]),
html.theme-alliance button[aria-label*="Отправить" i],
html.theme-alliance button[title*="Отправить" i],
html.theme-alliance button[title*="очередь" i],
[data-theme="alliance"] [data-slot="prompt-input-submit"],
.theme-alliance [data-slot="prompt-input-submit"] {
  background: linear-gradient(135deg, #F5D36C 0%, #D4AF37 50%, #A07818 100%) !important;
  border: 1px solid rgba(255, 245, 200, 0.6) !important;
  color: #060B14 !important;
  border-radius: 9999px !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(212, 175, 55, 0.5) !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Deep navy arrow inside the golden shield */
html.theme-alliance [data-slot="prompt-input-submit"] svg,
html.theme-alliance [data-slot="prompt-input-footer"] button[type="submit"] svg,
html.theme-alliance [data-slot="prompt-input"] button:has(svg path[d*="M12 19V5"]) svg {
  color: #060B14 !important;
  stroke: #060B14 !important;
  stroke-width: 2.4 !important;
}

/* Golden Lion Send Button Hover */
html.theme-alliance [data-slot="prompt-input-submit"]:hover:not(:disabled),
html.theme-alliance [data-slot="prompt-input-footer"] button[type="submit"]:hover:not(:disabled),
html.theme-alliance [data-slot="prompt-input"] button:has(svg path[d*="M12 19V5"]):hover:not(:disabled) {
  background: linear-gradient(135deg, #FFE48E 0%, #E5C158 50%, #B88B22 100%) !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(212, 175, 55, 0.8) !important;
  transform: translateY(-1px) scale(1.04) !important;
}

/* Disabled state */
html.theme-alliance [data-slot="prompt-input-submit"]:disabled,
html.theme-alliance [data-slot="prompt-input-footer"] button[type="submit"]:disabled,
html.theme-alliance [data-slot="prompt-input"] button:has(svg path[d*="M12 19V5"]):disabled {
  background: rgba(22, 32, 50, 0.5) !important;
  border: 1px solid rgba(212, 175, 55, 0.15) !important;
  color: rgba(140, 160, 190, 0.35) !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: not-allowed !important;
}

html.theme-alliance [data-slot="prompt-input-submit"]:disabled svg,
html.theme-alliance [data-slot="prompt-input-footer"] button[type="submit"]:disabled svg {
  color: rgba(140, 160, 190, 0.35) !important;
  stroke: rgba(140, 160, 190, 0.35) !important;
}

/* ─── 3. MODEL & MODE BADGES (SAPPHIRE CAPSULES, NO GREEN DOTS!) ────────── */
/* Base Sapphire Capsule styling for all tools toolbar buttons */
html.theme-alliance [data-slot="prompt-input-tools"] button,
[data-theme="alliance"] [data-slot="prompt-input-tools"] button,
.theme-alliance [data-slot="prompt-input-tools"] button {
  background: linear-gradient(180deg, rgba(16, 32, 58, 0.85) 0%, rgba(10, 20, 38, 0.95) 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  border-radius: 9999px !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.35) !important;
  color: #CFE0F5 !important;
  transition: all 0.18s ease !important;
}

html.theme-alliance [data-slot="prompt-input-tools"] button:hover,
[data-theme="alliance"] [data-slot="prompt-input-tools"] button:hover,
.theme-alliance [data-slot="prompt-input-tools"] button:hover {
  background: linear-gradient(180deg, rgba(24, 48, 86, 0.95) 0%, rgba(15, 30, 56, 1) 100%) !important;
  border-color: rgba(212, 175, 55, 0.55) !important;
  box-shadow: 
    0 0 12px rgba(212, 175, 55, 0.25),
    inset 0 1px 0 rgba(255, 240, 180, 0.15) !important;
  color: #FFFFFF !important;
}

/* A. "Авто" Mode Badge */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="режима" i],
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="mode" i],
[data-theme="alliance"] [data-slot="prompt-input-tools"] button[title*="режима" i] {
  color: #DDE8F8 !important;
  font-weight: 500 !important;
}

/* Eliminate green dot in Mode Badge -> Sapphire Crystal / Holy Light dot */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="режима" i] div.rounded-full,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="mode" i] div.rounded-full,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="режима" i] .bg-green-500,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="mode" i] .bg-green-500,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="режима" i] .bg-primary {
  background: #3B82F6 !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.85) !important;
}

/* B. Model Selector Badge ("4 Argon Low" / "Авто · 4 Argon") */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Выбрать модель" i],
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Argon" i],
[data-theme="alliance"] [data-slot="prompt-input-tools"] button[title*="Выбрать модель" i] {
  color: #F0D58A !important;
  font-weight: 600 !important;
  border-color: rgba(212, 175, 55, 0.38) !important;
}

/* Model icon: transform green leaf into Alliance Royal Gold */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Выбрать модель" i] img,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Argon" i] img {
  filter: sepia(1) hue-rotate(10deg) saturate(2.8) brightness(1.2) drop-shadow(0 0 3px rgba(212, 175, 55, 0.5)) !important;
}

/* Caret ▾ */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Выбрать модель" i] span:last-child {
  color: #D4AF37 !important;
}

/* C. Quota Badge ("G 16% · C 96%") */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Лимиты" i],
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Antigravity" i],
[data-theme="alliance"] [data-slot="prompt-input-tools"] button[title*="Лимиты" i] {
  color: #C8DBF2 !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
}

/* Eliminate green dot in Quota -> Arcane Sapphire Cyan glow */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Лимиты" i] span.rounded-full,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Antigravity" i] span.rounded-full,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Лимиты" i] .bg-primary,
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Antigravity" i] .bg-primary {
  background: #38BDF8 !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.95), 0 0 14px rgba(56, 189, 248, 0.4) !important;
}

/* Quota percentage values highlight */
html.theme-alliance [data-slot="prompt-input-tools"] button[title*="Лимиты" i] span.whitespace-nowrap {
  color: #EDF3FC !important;
}

/* D. Popover dropdowns for Model & Quota */
html.theme-alliance div.fixed.z-\[200\].rounded-xl,
[data-theme="alliance"] div.fixed.z-\[200\].rounded-xl {
  background: rgba(12, 18, 30, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 51, 98, 0.35) !important;
}

/* Model item buttons in popover */
html.theme-alliance div.fixed.z-\[200\] button:hover {
  background: rgba(26, 44, 78, 0.8) !important;
  color: #FFFFFF !important;
}

/* ─── 4. "КОМАНДА" BUTTON (STEEL BADGE + GOLD ACCENT, NO GREEN DOT!) ────── */
/* A. Inline Button in Toolbar */
html.theme-alliance #avo-tc-inline-btn,
[data-theme="alliance"] #avo-tc-inline-btn,
.theme-alliance #avo-tc-inline-btn {
  background: linear-gradient(180deg, #1C273C 0%, #121A28 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-radius: 9999px !important;
  color: #E2EDF8 !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.45) !important;
  font-weight: 600 !important;
  transition: all 0.18s ease !important;
}

html.theme-alliance #avo-tc-inline-btn:hover,
[data-theme="alliance"] #avo-tc-inline-btn:hover {
  background: linear-gradient(180deg, #24344E 0%, #182436 100%) !important;
  border-color: #D4AF37 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.4) !important;
}

/* B. Floating Launcher Button (Bottom Right) */
html.theme-alliance #avo-tc-launcher,
[data-theme="alliance"] #avo-tc-launcher,
.theme-alliance #avo-tc-launcher {
  background: linear-gradient(180deg, #1A2438 0%, #0F1624 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.38) !important;
  border-radius: 9999px !important;
  color: #F0D58A !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(212, 175, 55, 0.25) !important;
  transition: all 0.2s ease !important;
}

html.theme-alliance #avo-tc-launcher:hover,
[data-theme="alliance"] #avo-tc-launcher:hover {
  background: linear-gradient(180deg, #24344E 0%, #162033 100%) !important;
  border-color: #D4AF37 !important;
  color: #FFFFFF !important;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(212, 175, 55, 0.5) !important;
  transform: translateY(-2px) scale(1.03) !important;
}

/* C. Online Dot -> Royal Stormwind Gold (ABSOLUTELY NO GREEN!) */
html.theme-alliance .avo-tc-online-dot,
[data-theme="alliance"] .avo-tc-online-dot,
.theme-alliance .avo-tc-online-dot,
#avo-tc-inline-btn .avo-tc-online-dot,
#avo-tc-launcher .avo-tc-online-dot {
  background: #D4AF37 !important;
  box-shadow: 
    0 0 8px rgba(212, 175, 55, 0.95),
    0 0 14px rgba(212, 175, 55, 0.5) !important;
}

/* D. SVG icon in "Команда" button */
html.theme-alliance #avo-tc-inline-btn svg,
html.theme-alliance #avo-tc-launcher svg {
  color: #D4AF37 !important;
  stroke: #D4AF37 !important;
}

/* E. Unread Badge -> Stormwind Golden Emblem */
html.theme-alliance .avo-tc-badge,
[data-theme="alliance"] .avo-tc-badge,
.theme-alliance .avo-tc-badge {
  background: linear-gradient(135deg, #F3D889 0%, #D4AF37 50%, #A67C1E 100%) !important;
  color: #060B14 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 245, 200, 0.6) !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6) !important;
}


/* =========================================================================
   ZERO-GREEN MASTER LAWS: ABSOLUTE ALLIANCE DE-GREENING (SOTD BLIZZARD)
   Eliminates 100% of green/emerald pixels across all components, badges,
   team chat buttons, model cards, pulses, dots, queues, and logos.
   ========================================================================= */

/* 1. UNIVERSAL LOGO & PROVIDER CRESTS (PALADIN GOLD #D4AF37) */
html.theme-alliance img[src*="avo-logo"],
html[data-theme="alliance"] img[src*="avo-logo"],
.theme-alliance img[src*="avo-logo"],
[data-theme="alliance"] img[src*="avo-logo"] {
  filter: brightness(0) invert(72%) sepia(75%) saturate(550%) hue-rotate(5deg) brightness(102%) contrast(95%) drop-shadow(0 0 6px rgba(212, 175, 55, 0.65)) !important;
}

html.theme-alliance img[src*="avo-logo"]:hover,
html[data-theme="alliance"] img[src*="avo-logo"]:hover,
.theme-alliance img[src*="avo-logo"]:hover,
[data-theme="alliance"] img[src*="avo-logo"]:hover {
  filter: brightness(0) invert(85%) sepia(80%) saturate(600%) hue-rotate(8deg) brightness(115%) contrast(98%) drop-shadow(0 0 12px rgba(243, 216, 137, 0.85)) !important;
}

/* 2. TEAM CHAT ("КОМАНДА") - ZERO GREEN OVERRIDES */
html.theme-alliance .avo-tc-online-dot,
html[data-theme="alliance"] .avo-tc-online-dot,
.theme-alliance .avo-tc-online-dot,
[data-theme="alliance"] .avo-tc-online-dot,
html.theme-alliance .dark .avo-tc-online-dot,
html[data-theme="alliance"] .dark .avo-tc-online-dot,
.dark html.theme-alliance .avo-tc-online-dot,
#avo-tc-inline-btn .avo-tc-online-dot,
#avo-tc-launcher .avo-tc-online-dot {
  background: #3B82F6 !important;
  background-color: #3B82F6 !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.9), 0 0 14px rgba(59, 130, 246, 0.5), 0 0 0 2px rgba(10, 16, 28, 0.95) !important;
}

html.theme-alliance #avo-tc-inline-btn.avo-tc-inline-active,
html[data-theme="alliance"] #avo-tc-inline-btn.avo-tc-inline-active,
.theme-alliance #avo-tc-inline-btn.avo-tc-inline-active {
  border-color: #D4AF37 !important;
  background-color: rgba(59, 130, 246, 0.16) !important;
  color: #F6E6BC !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
}

html.theme-alliance .avo-tc-send-btn,
html[data-theme="alliance"] .avo-tc-send-btn,
.theme-alliance .avo-tc-send-btn,
[data-theme="alliance"] .avo-tc-send-btn {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4) !important;
}

html.theme-alliance .avo-tc-send-btn:hover,
html[data-theme="alliance"] .avo-tc-send-btn:hover,
.theme-alliance .avo-tc-send-btn:hover {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
  background-color: #3B82F6 !important;
  border-color: #D4AF37 !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.5) !important;
}

html.theme-alliance .avo-tc-voice-play,
html[data-theme="alliance"] .avo-tc-voice-play,
.theme-alliance .avo-tc-voice-play,
[data-theme="alliance"] .avo-tc-voice-play {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%) !important;
  background-color: #D4AF37 !important;
  color: #080D18 !important;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4) !important;
}

html.theme-alliance .avo-tc-wave-bar.played,
html[data-theme="alliance"] .avo-tc-wave-bar.played,
.theme-alliance .avo-tc-wave-bar.played,
[data-theme="alliance"] .avo-tc-wave-bar.played,
html.theme-alliance .dark .avo-tc-wave-bar.played,
html[data-theme="alliance"] .dark .avo-tc-wave-bar.played {
  background-color: #3B82F6 !important;
  background: #3B82F6 !important;
}

/* 3. RUNNING DOTS, PULSES & BADGES (SAPPHIRE ARCANE JEWELS) */
html.theme-alliance .animate-pulse.bg-emerald-500,
html.theme-alliance .animate-pulse.bg-green-500,
html[data-theme="alliance"] .animate-pulse.bg-emerald-500,
html[data-theme="alliance"] .animate-pulse.bg-green-500,
.theme-alliance .animate-pulse.bg-emerald-500,
.theme-alliance .animate-pulse.bg-green-500,
[data-theme="alliance"] .animate-pulse.bg-emerald-500,
[data-theme="alliance"] .animate-pulse.bg-green-500,
html.theme-alliance span.rounded-full[class*="bg-emerald"],
html.theme-alliance span.rounded-full[class*="bg-green"],
html[data-theme="alliance"] span.rounded-full[class*="bg-emerald"],
html[data-theme="alliance"] span.rounded-full[class*="bg-green"],
.theme-alliance span.rounded-full[class*="bg-emerald"],
.theme-alliance span.rounded-full[class*="bg-green"] {
  background-color: #3B82F6 !important;
  background: #3B82F6 !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.9), 0 0 16px rgba(59, 130, 246, 0.45) !important;
}

/* Running badge count pill */
html.theme-alliance span.bg-emerald-500.text-white,
html.theme-alliance [class*="bg-emerald-500"][class*="rounded-full"],
html[data-theme="alliance"] span.bg-emerald-500.text-white,
html[data-theme="alliance"] [class*="bg-emerald-500"][class*="rounded-full"],
.theme-alliance span.bg-emerald-500.text-white,
.theme-alliance [class*="bg-emerald-500"][class*="rounded-full"],
[data-theme="alliance"] span.bg-emerald-500.text-white,
[data-theme="alliance"] [class*="bg-emerald-500"][class*="rounded-full"] {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(212, 175, 55, 0.5) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6) !important;
}

/* Running text & status labels */
html.theme-alliance .text-emerald-500,
html.theme-alliance .text-emerald-400,
html.theme-alliance .text-green-500,
html.theme-alliance .text-green-400,
html[data-theme="alliance"] .text-emerald-500,
html[data-theme="alliance"] .text-emerald-400,
html[data-theme="alliance"] .text-green-500,
html[data-theme="alliance"] .text-green-400,
.theme-alliance .text-emerald-500,
.theme-alliance .text-emerald-400,
.theme-alliance .text-green-500,
.theme-alliance .text-green-400,
[data-theme="alliance"] .text-emerald-500,
[data-theme="alliance"] .text-emerald-400,
[data-theme="alliance"] .text-green-500,
[data-theme="alliance"] .text-green-400,
html.theme-alliance [class*="text-emerald"],
html[data-theme="alliance"] [class*="text-emerald"] {
  color: #60A5FA !important;
}

/* Running tab ring / focus */
html.theme-alliance .ring-emerald-500,
html.theme-alliance [class*="ring-emerald-500"],
html[data-theme="alliance"] .ring-emerald-500,
html[data-theme="alliance"] [class*="ring-emerald-500"],
.theme-alliance .ring-emerald-500,
.theme-alliance [class*="ring-emerald-500"] {
  --tw-ring-color: rgba(212, 175, 55, 0.45) !important;
}

/* 4. SUCCESS CHECKMARKS & COMPLETION ICONS (PALADIN GOLD) */
html.theme-alliance svg.text-green-500,
html.theme-alliance svg.text-green-400,
html.theme-alliance svg.text-emerald-500,
html.theme-alliance svg.text-emerald-400,
html[data-theme="alliance"] svg.text-green-500,
html[data-theme="alliance"] svg.text-green-400,
html[data-theme="alliance"] svg.text-emerald-500,
html[data-theme="alliance"] svg.text-emerald-400,
.theme-alliance svg.text-green-500,
.theme-alliance svg.text-green-400,
.theme-alliance svg.text-emerald-500,
.theme-alliance svg.text-emerald-400,
[data-theme="alliance"] svg.text-green-500,
[data-theme="alliance"] svg.text-green-400,
[data-theme="alliance"] svg.text-emerald-500,
[data-theme="alliance"] svg.text-emerald-400 {
  color: #D4AF37 !important;
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5)) !important;
}

/* 5. GENERIC EMERALD / GREEN REPLACEMENTS */
html.theme-alliance .bg-emerald-500,
html.theme-alliance .bg-emerald-600,
html.theme-alliance .bg-green-500,
html.theme-alliance .bg-green-600,
html[data-theme="alliance"] .bg-emerald-500,
html[data-theme="alliance"] .bg-emerald-600,
html[data-theme="alliance"] .bg-green-500,
html[data-theme="alliance"] .bg-green-600,
.theme-alliance .bg-emerald-500,
.theme-alliance .bg-emerald-600,
.theme-alliance .bg-green-500,
.theme-alliance .bg-green-600,
[data-theme="alliance"] .bg-emerald-500,
[data-theme="alliance"] .bg-emerald-600,
[data-theme="alliance"] .bg-green-500,
[data-theme="alliance"] .bg-green-600 {
  background-color: #3B82F6 !important;
  background: #3B82F6 !important;
}

html.theme-alliance .bg-emerald-50,
html.theme-alliance .bg-green-50,
html[data-theme="alliance"] .bg-emerald-50,
html[data-theme="alliance"] .bg-green-50,
.theme-alliance .bg-emerald-50,
.theme-alliance .bg-green-50 {
  background-color: rgba(30, 58, 138, 0.25) !important;
}

html.theme-alliance .bg-emerald-950,
html.theme-alliance .bg-green-950,
html[data-theme="alliance"] .bg-emerald-950,
html[data-theme="alliance"] .bg-green-950,
.theme-alliance .bg-emerald-950,
.theme-alliance .bg-green-950 {
  background-color: rgba(10, 16, 28, 0.85) !important;
}

/* 6. MODEL CARD ON WELCOME SCREEN */
html.theme-alliance .group.mx-auto.max-w-xs.cursor-pointer,
html[data-theme="alliance"] .group.mx-auto.max-w-xs.cursor-pointer,
.theme-alliance .group.mx-auto.max-w-xs.cursor-pointer,
[data-theme="alliance"] .group.mx-auto.max-w-xs.cursor-pointer {
  background: linear-gradient(145deg, rgba(16, 25, 43, 0.95) 0%, rgba(10, 16, 28, 0.98) 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(59, 130, 246, 0.15) !important;
}

html.theme-alliance .group.mx-auto.max-w-xs.cursor-pointer:hover,
html[data-theme="alliance"] .group.mx-auto.max-w-xs.cursor-pointer:hover,
.theme-alliance .group.mx-auto.max-w-xs.cursor-pointer:hover,
[data-theme="alliance"] .group.mx-auto.max-w-xs.cursor-pointer:hover {
  border-color: #D4AF37 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(212, 175, 55, 0.35) !important;
}

html.theme-alliance .group.mx-auto.max-w-xs.cursor-pointer img,
html[data-theme="alliance"] .group.mx-auto.max-w-xs.cursor-pointer img,
.theme-alliance .group.mx-auto.max-w-xs.cursor-pointer img,
[data-theme="alliance"] .group.mx-auto.max-w-xs.cursor-pointer img {
  filter: brightness(0) invert(72%) sepia(75%) saturate(550%) hue-rotate(5deg) brightness(102%) contrast(95%) drop-shadow(0 0 6px rgba(212, 175, 55, 0.65)) !important;
}
