/* ==========================================================================
   ChatGPT Authenticated UI - Exact Computed CSS Extracted from Live DOM
   Session: Zoe Valentine (Free Tier) | chatgpt.com
   Theme: OLED Dark (#000000) with Custom Accent (#873e60 & #f077af)
   ========================================================================== */

:root {
  /* Computed CSS Tokens from chatgpt.com DOM & Aurora X Palette */
  --bg-primary: #000000;
  --bg-sidebar: #000000;
  --bg-surface: rgb(13, 17, 26);
  --bg-surface-secondary: rgb(23, 33, 51);
  --bg-composer: rgb(21, 28, 42);
  --bg-composer-hover: rgb(28, 38, 56);
  --bg-user-bubble: #172133;
  --border-user-bubble: rgba(56, 189, 248, 0.28);
  --text-user-bubble: rgb(248, 250, 252);
  --text-primary: rgb(241, 245, 249);
  --text-secondary: rgb(175, 185, 200);
  --text-tertiary: rgb(148, 163, 184);
  --text-description: rgb(100, 116, 139);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-divider: rgba(255, 255, 255, 0.12);
  --hover-ghost: rgba(56, 189, 248, 0.08);
  --hover-active: rgba(56, 189, 248, 0.15);
  
  /* Aurora X Official Icon Palette (#38bdf8, #818cf8, #c084fc) */
  --accent-aurora: #38bdf8;
  --accent-aurora-hover: #0ea5e9;
  --accent-aurora-subtle: rgba(56, 189, 248, 0.12);
  --accent-aurora-border: rgba(56, 189, 248, 0.35);
  --accent-aurora-text: #7dd3fc;
  --accent-violet: #818cf8;
  --accent-purple: #c084fc;
  --aurora-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  
  /* Universal accent mapped to Aurora cyan/indigo */
  --accent-pink: var(--accent-aurora);
  --accent-pink-subtle: var(--accent-aurora-subtle);
  --accent-pink-hover: var(--accent-aurora-hover);
  --accent-pink-text: var(--accent-aurora-text);

  /* Computed Sizing & Radii from DOM */
  --sidebar-width: 260px;
  --header-height: 52px;
  --radius-full: 9999px;
  --radius-composer: 28px;
  --radius-bubble: 22px;
  --radius-row: 8px;
  --radius-profile: 12px;
  
  /* Computed Fonts from window.getComputedStyle(document.body) */
  --font-sans: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*:focus, *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

button:focus, button:focus-visible, a:focus, a:focus-visible, div:focus, div:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Eliminate ugly browser drag selection and blue contour */
body, button, aside, header, nav, .sidebar-section, .modal-backdrop, .popover-menu, .browser-drawer, .workspace-drawer-header, .workspace-omnibox-bar, .workspace-bookmarks-bar {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Allow text selection only on real code blocks and input fields */
input, textarea, .message-bubble-content, pre, code, .source-code-view, .console-log-row {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Custom premium Aurora cyan selection highlight instead of browser default blue */
::selection {
  background: rgba(56, 189, 248, 0.28) !important;
  color: #ffffff !important;
}

::-moz-selection {
  background: rgba(56, 189, 248, 0.28) !important;
  color: #ffffff !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

/* App Shell Layout */
#app-root {
  display: flex;
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: relative;
  background-color: var(--bg-primary);
  overflow: hidden;
}

/* ==========================================================================
   UNIVERSAL SVG RULES
   ========================================================================== */

svg {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  flex-shrink: 0;
}

svg path, svg circle, svg rect, svg polygon, svg use {
  fill: currentColor;
}

button svg, a svg, span svg {
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
}

/* ==========================================================================
   SIDEBAR (Computed: background-color: rgb(0,0,0); width: 260px;)
   ========================================================================== */

#sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: #000000;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: width var(--transition-medium), transform var(--transition-medium), opacity var(--transition-medium);
  z-index: 40;
}

#sidebar.collapsed {
  width: 0;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  border-right: none;
}

/* Sidebar Top Header (Computed: height: 52px; padding: 10px 14px 6px 16px;) */
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px 16px;
  height: var(--header-height);
  flex-shrink: 0;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aurora-brand-img-logo {
  height: 28px;
  width: auto;
  display: block;
  user-select: none;
}

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

.icon-btn {
  background: transparent;
  border: none;
  color: rgb(209, 213, 219);
  cursor: pointer;
  border-radius: var(--radius-row);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.icon-btn svg {
  width: 20px !important;
  height: 20px !important;
}

.icon-btn:hover {
  background-color: var(--hover-ghost);
  color: #ffffff;
}

.icon-btn:active {
  background-color: var(--hover-active);
}

/* Sidebar Scroll Area */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Primary Nav Shortcuts (Computed: height: 36px; padding: 0 10px; font-size: 14px;) */
.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 36px;
  border-radius: var(--radius-row);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--hover-ghost);
}

.nav-link svg, .nav-link .icon {
  width: 18px !important;
  height: 18px !important;
  color: rgb(209, 213, 219);
  flex-shrink: 0;
}

.nav-link:hover svg {
  color: #ffffff;
}

/* Sidebar Section Headers (Computed: height: 36px; font-size: 14px; font-weight: 500; color: rgb(175,175,175);) */
.sidebar-section {
  margin-top: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  height: 36px;
  font-size: 14px;
  font-weight: 500;
  color: rgb(175, 175, 175);
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-row);
}

.section-header:hover {
  color: #ffffff;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title svg {
  width: 14px !important;
  height: 14px !important;
  color: rgb(175, 175, 175);
  transition: transform var(--transition-fast);
}

.section-header:hover .section-title svg {
  color: #ffffff;
}

.sidebar-section.collapsed .section-title svg {
  transform: rotate(-90deg);
}

.sidebar-section.collapsed .chat-list {
  display: none;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.section-header:hover .section-actions {
  opacity: 1;
}

/* Strict mini-btn (Fixed: No 300x150 bug!) */
.mini-btn {
  background: transparent;
  border: none;
  color: rgb(209, 213, 219);
  cursor: pointer;
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.mini-btn svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.mini-btn:hover {
  background: var(--hover-ghost);
  color: #ffffff;
}

/* Project Empty Item */
.empty-item {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Chat History List (Computed: height: 36px per row; font-size: 14px;) */
.chat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-row);
  padding: 0 4px 0 10px;
  height: 36px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.chat-item:hover {
  background-color: var(--hover-ghost);
}

.chat-item.active {
  background-color: var(--bg-surface-secondary);
}

.chat-item-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 36px;
  display: block;
}

.chat-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  background: linear-gradient(90deg, transparent, #212121 25%);
  padding-left: 8px;
}

.chat-item:hover .chat-item-actions {
  opacity: 1;
}

.action-btn {
  background: transparent;
  border: none;
  color: rgb(209, 213, 219);
  cursor: pointer;
  width: 24px !important;
  height: 24px !important;
  border-radius: 4px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.action-btn svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Sidebar Footer (Computed: profileBtn: height: 48px; border-radius: 12px; avatar: 24px;) */
.sidebar-footer {
  padding: 8px 10px 12px 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: var(--bg-sidebar);
  position: relative;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  height: 48px;
  border-radius: var(--radius-profile);
  cursor: pointer;
  background: transparent;
  border: none;
  color: rgb(248, 166, 200);
  flex: 1;
  min-width: 0;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.profile-card:hover {
  background-color: var(--hover-ghost);
}

.avatar-wrapper {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--bg-user-bubble);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.avatar-fallback {
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
}

.profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-tier {
  font-size: 12px;
  color: var(--text-tertiary);
}

.upgrade-pill-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.upgrade-pill-btn:hover {
  background-color: var(--hover-ghost);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MAIN CHAT AREA (Computed: Header height: 52px;)
   ========================================================================== */

#main-content {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background-color: var(--bg-primary);
  overflow: hidden;
}

#main-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 30;
  position: relative;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Computed titleBtn: font-size: 14px; font-weight: 400; color: rgb(175,175,175); */
.header-title-btn {
  background: transparent;
  border: none;
  color: rgb(175, 175, 175);
  font-size: 14px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 5px 8px;
  height: 36px;
  border-radius: var(--radius-row);
  max-width: 340px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.header-title-btn:hover {
  background-color: var(--hover-ghost);
  color: var(--text-primary);
}

.header-title-btn svg {
  width: 14px !important;
  height: 14px !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-upgrade-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-row);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.header-upgrade-btn:hover {
  background-color: var(--hover-ghost);
}

.header-share-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-row);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.header-share-btn:hover {
  background-color: var(--hover-ghost);
  border-color: rgba(255, 255, 255, 0.2);
}

.header-share-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: #ffffff;
}

/* ==========================================================================
   CONVERSATION THREAD (Computed: max-width: 768px; padding-bottom: 140px;)
   ========================================================================== */

#conversation-scroll {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#conversation-scroll::-webkit-scrollbar {
  width: 6px;
}

#conversation-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.thread-container {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  text-align: center;
  gap: 16px;
}

.empty-state-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

/* Message Rows */
.turn-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* User Message (Computed: bg: rgb(135,62,96); color: rgb(254,248,251); radius: 22px; padding: 10px 16px; font-size: 16px; line-height: 24px; max-width: 70%;) */
.user-turn {
  align-items: flex-end;
}

.user-bubble {
  background-color: var(--bg-user-bubble);
  border: 1px solid var(--border-user-bubble);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), 0 0 1px rgba(56, 189, 248, 0.25);
  color: var(--text-user-bubble);
  border-radius: var(--radius-bubble);
  padding: 10px 16px;
  font-size: 16px;
  line-height: 24px;
  max-width: 70%;
  word-break: break-word;
  white-space: pre-wrap;
  position: relative;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  margin-right: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.user-turn:hover .user-actions {
  opacity: 1;
}

.turn-action-btn {
  background: transparent;
  border: none;
  color: rgb(209, 213, 219);
  cursor: pointer;
  width: 28px !important;
  height: 28px !important;
  border-radius: var(--radius-full);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.turn-action-btn svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  color: rgb(209, 213, 219);
}

.turn-action-btn:hover {
  background-color: var(--hover-ghost);
  color: #ffffff;
}

.turn-action-btn:hover svg {
  color: #ffffff;
}

/* Assistant Message (Computed: color: rgb(237,237,237); font-size: 16px; line-height: 26px;) */
.assistant-turn {
  align-items: flex-start;
}

.assistant-body {
  width: 100%;
  font-size: 16px;
  line-height: 26px;
  color: var(--text-primary);
  word-break: break-word;
}

.assistant-body p {
  margin-bottom: 14px;
}

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

.assistant-body pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 12px 0;
}

.assistant-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.assistant-body pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.assistant-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}

/* Model indicator badge removed - model identity is strictly hidden */

/* ==========================================================================
   COMPOSER (Computed: bg: rgb(27,27,27); radius: 28px; inset box-shadow: rgba(255,255,255,0.2) 0 0 1px 0;)
   ========================================================================== */

#composer-container {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px 14px 16px;
  background: var(--bg-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: auto;
  z-index: 35;
}

.composer-wrapper {
  position: relative;
  width: 100%;
  max-width: 768px;
  pointer-events: auto;
}

.composer-card {
  min-height: 52px;
  background-color: var(--bg-composer);
  border-radius: var(--radius-composer);
  display: flex;
  align-items: flex-end;
  padding: 8px 10px 8px 14px;
  gap: 8px;
  box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 1px 0px inset;
  border: none;
  transition: box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.composer-card:focus-within {
  box-shadow: rgba(255, 255, 255, 0.4) 0px 0px 1px 1px inset;
}

.composer-left {
  display: flex;
  align-items: center;
  padding-bottom: 2px;
}

/* Computed: plusBtn: width: 36px; height: 36px; border-radius: 9999px; color: rgb(175,175,175); */
.composer-plus-btn {
  background: transparent;
  border: none;
  color: rgb(175, 175, 175);
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.composer-plus-btn svg {
  width: 20px !important;
  height: 20px !important;
}

.composer-plus-btn:hover {
  background-color: var(--hover-ghost);
  color: #ffffff;
}

.composer-input-area {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

/* Computed textarea: font-size: 16px; line-height: 26px; color: rgb(237,237,237); padding: 5px 0; */
.composer-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  max-height: 200px;
  min-height: 26px;
  padding: 5px 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.composer-textarea::-webkit-scrollbar {
  display: none;
}

#main-header .header-left {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

#main-header .header-right {
  flex: 0 0 auto;
}

#current-chat-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-title-wrapper {
  min-width: 0;
}

.composer-textarea::placeholder {
  color: var(--text-secondary);
}

.composer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
}

/* Think button removed - thinking mode handled internally */

/* Computed dictateBtn: width: 36px; height: 36px; color: rgb(175,175,175); */
.dictate-btn {
  background: transparent;
  border: none;
  color: rgb(175, 175, 175);
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dictate-btn svg {
  width: 18px !important;
  height: 18px !important;
}

.dictate-btn:hover {
  background-color: var(--hover-ghost);
  color: #ffffff;
}

.dictate-btn.listening {
  color: #ef4444;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Computed voiceBtn with official Aurora gradient */
.voice-orb-btn {
  background: var(--aurora-gradient);
  border: none;
  color: #07090e;
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}

.voice-orb-btn svg {
  width: 18px !important;
  height: 18px !important;
  color: #07090e;
}

.voice-orb-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.7);
}

/* Send Button */
.send-btn {
  background-color: var(--text-primary);
  border: none;
  color: #000000;
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.send-btn.visible {
  display: flex;
}

.send-btn svg {
  width: 18px !important;
  height: 18px !important;
  color: #000000;
}

.send-btn:hover {
  transform: scale(1.05);
}

/* Computed disclaimer: font-size: 12px; color: rgb(175,175,175); line-height: 16px; text-align: center; */
.composer-disclaimer {
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  color: rgb(175, 175, 175);
  margin-top: 8px;
  user-select: none;
  pointer-events: auto;
}

/* ==========================================================================
   DROPDOWN MENUS & MODALS
   ========================================================================== */

.popover-menu {
  position: absolute;
  background-color: #212121;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 6px;
  min-width: 260px;
  z-index: 100;
  display: none;
  animation: popoverFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.popover-menu.open {
  display: block;
}

@keyframes popoverFade {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.popover-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.popover-item svg {
  width: 18px !important;
  height: 18px !important;
  color: rgb(209, 213, 219);
}

.popover-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 4px 0;
}

#profile-popover {
  bottom: 60px;
  left: 10px;
}

#model-popover {
  top: 54px;
  left: 16px;
  min-width: 290px;
}

#tools-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  top: auto !important;
  right: auto;
  min-width: 230px;
  background-color: #212121;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 6px;
  z-index: 100;
}

/* ==========================================================================
   VOICE MODE OVERLAY
   ========================================================================== */

#voice-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  animation: fadeIn 0.3s ease;
}

#voice-overlay.active {
  display: flex;
}

.voice-overlay-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.voice-overlay-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-canvas-container {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#voice-canvas {
  width: 100%;
  height: 100%;
}

.voice-status-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  min-height: 28px;
}

.voice-overlay-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.voice-ctrl-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-secondary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.voice-ctrl-btn:hover {
  transform: scale(1.08);
  background-color: rgba(255, 255, 255, 0.15);
}

.voice-ctrl-btn.hangup {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.voice-ctrl-btn.hangup:hover {
  background-color: #dc2626;
}

/* Toast */
#toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #262626;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium), transform var(--transition-medium);
  z-index: 300;
}

#toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Thinking Indicator */
.thinking-spinner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-pink-text);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.thinking-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-pink);
  animation: thinkPulse 1.2s infinite ease-in-out;
}

@keyframes thinkPulse {
  0%, 100% { transform: scale(0.7); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* ==========================================================================
   HEADER BROWSER BUTTON
   ========================================================================== */
.header-browser-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-workspace-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background-color: #121826;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  color: #f1f5f9;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-workspace-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-aurora);
  color: #ffffff;
  transform: translateY(-1px);
}

.header-workspace-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-aurora);
  color: var(--accent-aurora);
}

/* ==========================================================================
   AUTHENTIC GOOGLE CHROME UI THEME (ORIGINAL CHROME THEME & RUNTIME)
   ========================================================================== */
.browser-drawer.workspace-drawer {
  position: relative;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  height: 100%;
  background-color: #0b0e14;
  border-left: 0 solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 45;
  overflow: hidden;
  transition: flex-basis 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.browser-drawer.active {
  flex-basis: min(54vw, 1000px);
  width: min(54vw, 1000px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-drawer.maximized {
  flex-basis: 90vw;
  width: 90vw;
}

.workspace-drawer-header {
  height: 44px;
  background-color: #080b10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
  user-select: none;
}

/* workspace-window-dots removed */

.workspace-tabs-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.workspace-tab {
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  border-radius: 6px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.workspace-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.workspace-tab.active {
  background: #141b27;
  border-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-weight: 600;
}

.workspace-tab .console-count {
  background: #1e293b;
  color: #38bdf8;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.workspace-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace-sandbox-bar {
  height: 42px;
  background-color: #0f141e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
}

.sandbox-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.sandbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

.sandbox-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.sandbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sandbox-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

.workspace-viewport-toggles {
  display: flex;
  align-items: center;
  background: #080b10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.viewport-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.viewport-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.viewport-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 600;
}

.workspace-tool-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #080b10;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.15);
}

.browser-content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #07090e;
}

.browser-tab-pane {
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.browser-tab-pane.active {
  display: flex;
  flex-direction: column;
}

.iframe-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #07090e;
  overflow: auto;
  position: relative;
  scrollbar-width: none !important;
}

#browser-sandbox-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #080b12;
  display: block;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#browser-sandbox-iframe.tablet {
  width: 768px;
  height: calc(100% - 40px);
  max-height: 1024px;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  margin: auto;
}

#browser-sandbox-iframe.mobile {
  width: 375px;
  height: min(740px, calc(100% - 40px));
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
  margin: auto;
}

/* Console Logs Tab */
.console-toolbar {
  padding: 8px 12px;
  background-color: #121826;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.console-clear-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.console-clear-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.console-status {
  font-size: 11px;
  color: #64748b;
}

.console-logs-list {
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-log-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.console-log-row.info .log-level { color: #38bdf8; }
.console-log-row.warn .log-level { color: #eab308; }
.console-log-row.error .log-level { color: #ef4444; }
.console-log-row.log .log-level { color: #818cf8; }

.log-time { color: #475569; flex-shrink: 0; }
.log-level { font-weight: 700; flex-shrink: 0; font-size: 10px; width: 44px; }
.log-msg { color: #e2e8f0; word-break: break-all; }

/* Source Inspector Tab */
.source-toolbar {
  padding: 8px 12px;
  background: #121826;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

.copy-source-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.source-code-view {
  flex: 1;
  padding: 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
  overflow: auto;
  white-space: pre-wrap;
}

/* ==========================================================================
   CODE BLOCK RUN BUTTONS
   ========================================================================== */
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background-color: #172133;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-lang-label {
  font-size: 11px;
  font-weight: 700;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.run-browser-btn {
  background: var(--aurora-gradient);
  border: none;
  color: #07090e;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.run-browser-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.copy-code-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ==========================================================================
   COMPOSER FILE ATTACHMENTS
   ========================================================================== */
.composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px 8px 4px;
}

.composer-attachments:empty {
  display: none;
}

.attachment-chip {
  background-color: #172133;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  color: #7dd3fc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.15s ease-out;
}

.attachment-chip .remove-file-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.attachment-chip .remove-file-btn:hover {
  color: #ef4444;
}

/* ==========================================================================
   MODALS SYSTEM
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
}

/* Search Modal (Spotlight) */
.search-modal-card {
  width: 100%;
  max-width: 580px;
  background-color: #0f1523;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.15);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-input-wrapper svg {
  color: #38bdf8;
}

.search-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 15px;
}

.search-modal-kbd {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
}

.search-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:hover, .search-result-item.selected {
  background: rgba(56, 189, 248, 0.12);
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-snippet {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-modal-footer {
  padding: 10px 16px;
  background-color: #0b0f17;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-modal-footer kbd {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: inherit;
}

/* Settings Modal */
.settings-modal-card {
  width: 100%;
  max-width: 680px;
  background-color: #0f1523;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  overflow: hidden;
}

.settings-body {
  display: flex;
  min-height: 380px;
}

.settings-sidebar {
  width: 180px;
  background: #090d15;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.settings-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.settings-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.settings-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.settings-pane.active {
  display: flex;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-name {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.setting-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.setting-select {
  background: #172133;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  outline: none;
}

.setting-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.setting-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: 0.2s;
  border-radius: 22px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--aurora-gradient);
}

input:checked + .slider::before {
  transform: translateX(18px);
}

/* Upgrade Modal */
.upgrade-modal-card {
  width: 100%;
  max-width: 640px;
  background-color: #0f1523;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  overflow: hidden;
}

.upgrade-billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}

.billing-label {
  font-size: 13px;
  color: #94a3b8;
}

.savings-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.upgrade-tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 20px 24px 20px;
}

.tier-card {
  background: #121826;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tier-card.featured {
  border-color: rgba(56, 189, 248, 0.4);
  background: #141d2e;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.1);
}

.featured-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--aurora-gradient);
  color: #07090e;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}

.tier-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.tier-price {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 10px 0;
}

.tier-price span {
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
}

.tier-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 14px;
  min-height: 34px;
}

.tier-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.tier-btn {
  margin-top: auto;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.tier-btn.current {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: default;
}

.tier-btn.primary {
  background: var(--aurora-gradient);
  color: #07090e;
}

/* Share Modal & Prompt Modals */
.share-modal-card, .prompt-modal-card {
  width: 100%;
  max-width: 460px;
  background-color: #0f1523;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 20px;
}

.share-desc, .prompt-modal-text {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 16px;
}

.share-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-url-input, .prompt-modal-input {
  flex: 1;
  background: #172133;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.share-copy-btn, .modal-confirm-btn {
  background: var(--aurora-gradient);
  border: none;
  color: #07090e;
  font-weight: 700;
  font-size: 13px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
}

.share-export-md-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  width: 100%;
}

.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.modal-cancel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.modal-danger-btn {
  background: #ef4444;
  border: none;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   LIVE CHROME STAGE
   ========================================================================== */
.chrome-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #202124;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.chrome-viewport {
  position: relative;
  height: 100%;
  max-width: 100%;
  background: #ffffff;
  outline: none;
  cursor: default;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.chrome-viewport.device {
  box-shadow: 0 0 0 1px #3c4043, 0 12px 32px rgba(0, 0, 0, 0.5);
}

.chrome-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px #8ab4f8;
}

.chrome-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}

.chrome-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 12px;
  background: #28292c;
  color: #bdc1c6;
  font-size: 12px;
  border-top: 1px solid #3c4043;
  transition: opacity 0.2s ease;
}

.chrome-status.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   COMPUTE QUOTA STYLES
   ========================================================================== */
.header-quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.header-quota-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}

.quota-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.popover-quota-card {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #111622;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quota-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quota-card-title {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
}

.quota-card-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.quota-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.quota-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.quota-card-details {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
}

.quota-cycle-info {
  font-size: 10px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 4px;
}

/* ==========================================================================
   COMPOSER LOCKED STATE (SESSION LIMIT REACHED)
   ========================================================================== */
.composer-locked-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-composer);
  color: #fca5a5;
  font-size: 13.5px;
  font-weight: 500;
  user-select: none;
  margin-bottom: 8px;
  animation: popoverFade 0.2s ease-out;
}

.composer-locked-banner.active {
  display: flex;
}

.composer-card.locked {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* ==========================================================================
   UPGRADED MINIMALIST COPY BUTTON (ANTI-SLOP SENIOR DESIGN)
   ========================================================================== */
.turn-action-btn.copy-ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.turn-action-btn.copy-ai-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.turn-action-btn.copy-ai-btn.copied {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.turn-action-btn.copy-ai-btn.copied svg {
  stroke: #10b981;
}

.turn-action-btn.copy-ai-btn svg {
  width: 13px !important;
  height: 13px !important;
  color: inherit !important;
}


/* ==========================================================================
   WORKSPACE RESIZE HANDLE (MOUSE DRAG RESIZING)
   ========================================================================== */
.workspace-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 55;
  user-select: none;
}

.workspace-resize-handle::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: transparent;
  transition: background-color 0.15s ease;
}

.workspace-resize-handle:hover::before,
.workspace-resize-handle.resizing::before {
  background-color: #38bdf8;
}

.browser-drawer.workspace-drawer.resizing {
  transition: none !important;
  user-select: none !important;
}

.browser-drawer.workspace-drawer.resizing iframe {
  pointer-events: none !important;
}

/* ==========================================================================
   AUTH MODAL & HCAPTCHA CHALLENGE
   ========================================================================== */
.auth-modal-card {
  width: 100%;
  max-width: 440px;
  background-color: #161618;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
}

.auth-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-modal-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.hcaptcha-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  min-height: 82px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
}

.auth-provider-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}

.auth-provider-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.auth-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  margin-top: 4px;
}


/* Strict closed state for workspace drawer */
.browser-drawer.workspace-drawer:not(.active) {
  width: 0 !important;
  flex-basis: 0 !important;
  min-width: 0 !important;
  border-left: none !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.auth-status-msg {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  line-height: 1.4;
}

.auth-pat-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.auth-pat-input {
  flex: 1;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.15s;
}

.auth-pat-input:focus {
  border-color: #818cf8;
}

.auth-pat-btn {
  height: 38px;
  padding: 0 16px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-pat-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
