:root {
  /* Elite Pastel & Cashmere Palette */
  --bg-main: #111116;
  --bg-sidebar: #0c0c10;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.065);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-message-user: linear-gradient(135deg, rgba(184, 166, 232, 0.22) 0%, rgba(242, 178, 209, 0.16) 100%);
  --bg-message-ai: rgba(255, 255, 255, 0.024);
  
  --border-color: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.035);
  --border-focus: rgba(196, 181, 253, 0.55);
  
  --text-main: #fbfbf9;
  --text-muted: #b8b5ad;
  --text-dim: #78756e;
  
  /* Pastel Luxury Accents: Lavender Mist, Rose Quartz, Champagne Ivory */
  --accent: #c4b5fd;
  --accent-secondary: #fbcfe8;
  --accent-champagne: #faedd9;
  --accent-hover: #ddd6fe;
  --accent-gradient: linear-gradient(135deg, #c4b5fd 0%, #fbcfe8 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(196, 181, 253, 0.4) 0%, rgba(251, 207, 232, 0.25) 100%);
  
  --danger: #f87171;
  --success: #6ee7b7;
  
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sidebar-width: 295px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elite: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px rgba(196, 181, 253, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(at 15% 15%, rgba(196, 181, 253, 0.04) 0px, transparent 55%),
    radial-gradient(at 85% 85%, rgba(251, 207, 232, 0.03) 0px, transparent 55%);
}

/* App Layout */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
}
.mobile-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Left Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.sidebar-header {
  padding: 22px 18px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1625;
  box-shadow: 0 6px 20px rgba(196, 181, 253, 0.28);
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.brand-badge {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.icon-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.new-chat-btn {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-focus);
  box-shadow: 0 4px 16px rgba(196, 181, 253, 0.15);
  transform: translateY(-1px);
}

.sidebar-section-title {
  padding: 16px 18px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
}

.chats-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chats-list::-webkit-scrollbar {
  width: 4px;
}
.chats-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.chat-tab-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  border: 1px solid transparent;
  user-select: none;
}
.chat-tab-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
}
.chat-tab-item.active {
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  border-color: rgba(196, 181, 253, 0.25);
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.chat-tab-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 8px;
}
.chat-tab-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.chat-tab-item:hover .chat-tab-delete,
.chat-tab-item.active .chat-tab-delete {
  opacity: 1;
}
.chat-tab-delete:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}
.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.7);
}
.status-text {
  font-size: 0.76rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.btn-logout {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-logout:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Chat Workspace */
.chat-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.top-bar {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 17, 22, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-shrink: 0;
  gap: 16px;
  position: relative;
  z-index: 30;
}
.current-chat-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.chat-title {
  font-size: 0.98rem;
  font-weight: 600;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.chat-context-badge {
  font-size: 0.7rem;
  background: rgba(196, 181, 253, 0.1);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  border: 1px solid rgba(196, 181, 253, 0.2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Haute Model Selector */
.top-bar-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.model-selector-container {
  position: relative;
  display: inline-block;
}
.model-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 181, 253, 0.22);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  outline: none;
}
.model-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 6px 20px rgba(196, 181, 253, 0.18);
  transform: translateY(-1px);
}
.model-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(196, 181, 253, 0.9);
  animation: pulseGlow 2.5s infinite;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.75; }
}
.model-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: rgba(18, 18, 24, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(196, 181, 253, 0.25);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.06);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: menuDrop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes menuDrop {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.model-option {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.model-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(196, 181, 253, 0.15);
}
.model-option.active {
  background: rgba(196, 181, 253, 0.12);
  border-color: rgba(196, 181, 253, 0.3);
}
.model-opt-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}
.model-option.active .model-opt-name {
  color: var(--accent);
}
.model-opt-desc {
  font-size: 0.73rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.top-bar-actions {
  display: flex;
  align-items: center;
}
.btn-ghost {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  transition: var(--transition);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--border-color);
}

/* Messages Stream */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.messages-container::-webkit-scrollbar {
  width: 5px;
}
.messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
}

/* Welcome Banner */
.welcome-card {
  max-width: 700px;
  margin: auto;
  text-align: center;
  padding: 50px 24px;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.welcome-logo {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a1625;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(196, 181, 253, 0.25);
}
.welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 34px;
  line-height: 1.55;
}
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  text-align: left;
}
.prompt-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.prompt-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(196, 181, 253, 0.35);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 181, 253, 0.08);
}

/* Message Item */
.message-row {
  display: flex;
  gap: 16px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}
.message-row.user {
  justify-content: flex-end;
}
.message-bubble-wrapper {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.message-row.user .message-bubble-wrapper {
  align-items: flex-end;
}
.message-row.assistant .message-bubble-wrapper {
  align-items: flex-start;
  flex: 1;
  max-width: calc(100% - 48px);
}
.message-bubble {
  width: 100%;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  line-height: 1.7;
  word-break: break-word;
}
.message-row.user .message-bubble {
  background: var(--bg-message-user);
  color: #ffffff;
  border: 1px solid rgba(196, 181, 253, 0.22);
  border-top-right-radius: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.message-row.assistant .message-bubble {
  background: var(--bg-message-ai);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-top-left-radius: 4px;
  width: 100%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 2px;
}
.message-row.assistant .message-avatar {
  background: var(--accent-gradient);
  color: #1a1625;
  box-shadow: 0 4px 14px rgba(196, 181, 253, 0.25);
}

/* Assistant Actions Bar */
.message-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.message-row.assistant:hover .message-actions-bar {
  opacity: 1;
}
.btn-msg-action {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.btn-msg-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border-color: rgba(196, 181, 253, 0.35);
}
.msg-model-tag {
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
}

/* Markdown styling inside bubble */
.message-bubble h1, .message-bubble h2, .message-bubble h3, .message-bubble h4 {
  color: var(--text-main);
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.message-bubble h1:first-child, .message-bubble h2:first-child, .message-bubble h3:first-child {
  margin-top: 0;
}
.message-bubble h1 { font-size: 1.35rem; }
.message-bubble h2 { font-size: 1.18rem; }
.message-bubble h3 { font-size: 1.05rem; }
.message-bubble h4 { font-size: 0.95rem; }

.message-bubble p {
  margin-bottom: 0.9em;
}
.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble code {
  font-family: var(--font-mono);
  background: rgba(196, 181, 253, 0.12);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--accent);
}

.message-bubble blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin: 14px 0;
  color: var(--text-muted);
  background: rgba(196, 181, 253, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.message-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.message-bubble th, .message-bubble td {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.message-bubble th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.message-bubble tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.message-bubble hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
}

.message-bubble strong {
  color: #ffffff;
  font-weight: 600;
}

.message-bubble a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.message-bubble a:hover {
  color: var(--accent-hover);
}

.code-block-container {
  margin: 16px 0;
  background: #09090d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #0e0e13;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.code-lang-tag {
  color: var(--accent);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}
.code-copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  transition: var(--transition);
}
.code-copy-btn:hover {
  color: var(--accent);
}
.code-block-container pre {
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
}
.code-block-container code {
  background: none;
  padding: 0;
  color: #f1f5f9;
}
.message-bubble ul, .message-bubble ol {
  padding-left: 22px;
  margin-bottom: 0.9em;
}
.message-bubble li {
  margin-bottom: 0.35em;
}

/* Typing Cursor */
.streaming-cursor {
  display: inline-block;
  width: 6px;
  height: 15px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 2px;
  animation: blink 0.9s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Floating Input Dock */
.input-container {
  padding: 12px 28px 24px;
  max-width: 890px;
  width: 100%;
  margin: 0 auto;
}
.input-card {
  display: flex;
  align-items: flex-end;
  background: rgba(22, 22, 28, 0.7);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 14px 10px 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  transition: var(--transition);
}
.input-card:focus-within {
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 12px 40px rgba(196, 181, 253, 0.12), 0 0 0 1px rgba(196, 181, 253, 0.15);
}
#chatInput {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  resize: none;
  max-height: 180px;
  outline: none;
  line-height: 1.55;
  padding: 6px 0;
}
#chatInput::placeholder {
  color: var(--text-dim);
}
.input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
}
.btn-send {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #1a1625;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(196, 181, 253, 0.2);
}
.btn-send:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(196, 181, 253, 0.35);
}
.btn-stop {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--danger);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.input-hint {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 10px;
  letter-spacing: 0.02em;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-card {
  background: rgba(20, 20, 26, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--shadow-elite);
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(196, 181, 253, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 26px;
  line-height: 1.5;
}
.modal-desc small {
  color: var(--text-dim);
  display: block;
  margin-top: 5px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.input-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.15);
}
.login-error {
  color: var(--danger);
  font-size: 0.82rem;
  background: rgba(248, 113, 113, 0.1);
  padding: 9px;
  border-radius: var(--radius-sm);
}
.btn-primary {
  background: var(--accent-gradient);
  color: #1a1625;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(196, 181, 253, 0.25);
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 181, 253, 0.35);
}
.full-width {
  width: 100%;
}
.hidden {
  display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
  .sidebar {
    position: fixed;
    top: 58px;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.6);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    inset: 58px 0 0 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 45;
    display: none;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .chat-workspace {
    padding-top: 58px;
  }
  .top-bar {
    display: flex;
    height: 48px;
    padding: 0 14px;
    justify-content: space-between;
  }
  .current-chat-info {
    display: none;
  }
  .top-bar-center {
    flex: 1;
    justify-content: flex-start;
  }
  .model-pill-btn {
    padding: 5px 12px;
    font-size: 0.78rem;
  }
  .model-menu {
    left: 0;
    transform: none;
    width: 290px;
  }
  @keyframes menuDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .top-bar-actions .btn-ghost span {
    display: none;
  }
  .top-bar-actions .btn-ghost {
    padding: 6px 9px;
  }
  .input-container {
    padding: 8px 12px 14px;
  }
  .messages-container {
    padding: 16px 12px;
    gap: 18px;
  }
  .message-bubble-wrapper {
    max-width: 95%;
  }
  .message-row.assistant .message-bubble-wrapper {
    max-width: calc(100% - 40px);
  }
  .message-bubble {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* ========================================================
   QUICK ACTION CHIPS (Photos, Presentations, Code, Audit)
   ======================================================== */
.quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.quick-actions-bar::-webkit-scrollbar {
  display: none;
}
.quick-chip-btn {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  backdrop-filter: blur(10px);
  user-select: none;
}
.quick-chip-btn:hover {
  background: rgba(196, 181, 253, 0.12);
  color: #ffffff;
  border-color: rgba(196, 181, 253, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 181, 253, 0.15);
}
.chip-icon {
  font-size: 0.95rem;
}

/* ========================================================
   ELITE IMAGE CARD & LIGHTBOX
   ======================================================== */
.elite-image-card {
  margin: 16px 0;
  background: #0c0c12;
  border: 1px solid rgba(196, 181, 253, 0.22);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  transition: var(--transition);
}
.elite-image-card:hover {
  border-color: rgba(196, 181, 253, 0.4);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55), 0 0 20px rgba(196, 181, 253, 0.08);
}
.image-card-header {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.image-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.image-viewport {
  position: relative;
  background: #060609;
  min-height: 280px;
  max-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.image-viewport img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.95;
}
.image-viewport:hover img {
  transform: scale(1.02);
  opacity: 1;
}
.image-overlay-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(12, 12, 18, 0.75);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition);
  pointer-events: none;
}
.image-viewport:hover .image-overlay-hint {
  opacity: 1;
  transform: translateY(0);
}
.image-card-footer {
  padding: 10px 14px;
  background: #0f0f16;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.image-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  flex: 1;
  min-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-image-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.btn-image-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(196, 181, 253, 0.35);
}
.btn-image-action.highlight {
  background: rgba(196, 181, 253, 0.12);
  color: var(--accent);
  border-color: rgba(196, 181, 253, 0.35);
}
.btn-image-action.highlight:hover {
  background: rgba(196, 181, 253, 0.22);
  color: #ffffff;
}

/* Lightbox Modal */
.lightbox-card {
  background: rgba(16, 16, 22, 0.95);
  border: 1px solid rgba(196, 181, 253, 0.25);
  border-radius: var(--radius-lg);
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-header {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lightbox-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}
.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-lightbox-action {
  background: var(--accent-gradient);
  color: #1a1625;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-lightbox-action:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.btn-lightbox-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}
.btn-lightbox-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.lightbox-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(90vh - 60px);
  overflow: hidden;
}
.lightbox-body img {
  max-width: 100%;
  max-height: calc(85vh - 60px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ========================================================
   INTERACTIVE SLIDE DECK PLAYER (Presentations)
   ======================================================== */
.deck-player {
  margin: 18px 0;
  background: #0d0d14;
  border: 1px solid rgba(196, 181, 253, 0.25);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}
.deck-player:hover {
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6), 0 0 25px rgba(196, 181, 253, 0.1);
}
.deck-header {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.deck-title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.deck-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.deck-main-title {
  font-size: 1.05rem;
  font-weight: 650;
  color: #faedd9;
  letter-spacing: -0.01em;
}
.deck-main-subtitle {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.deck-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-deck-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.btn-deck-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(196, 181, 253, 0.35);
}
.btn-deck-action.highlight {
  background: var(--accent-gradient);
  color: #1a1625;
  font-weight: 600;
  border: none;
}
.btn-deck-action.highlight:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 181, 253, 0.25);
}

.deck-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  width: 100%;
  overflow: hidden;
}
.deck-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 16:9 Slide Screen */
.deck-screen {
  background: radial-gradient(at 80% 20%, rgba(196, 181, 253, 0.05) 0px, transparent 60%), #0a0a0f;
  padding: 28px 32px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.slide-content {
  animation: slideFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.slide-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(196, 181, 253, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(196, 181, 253, 0.2);
}
.slide-num-tag {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.slide-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #faedd9;
  line-height: 1.3;
  margin-bottom: 4px;
  letter-spacing: -0.015em;
}
.slide-subtitle {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 500;
}
.slide-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-left: 0;
}
.slide-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.94rem;
  color: #e2e8f0;
  line-height: 1.55;
}
.point-bullet {
  color: var(--accent);
  font-size: 0.72rem;
  margin-top: 4px;
}
.slide-highlight-box {
  background: rgba(196, 181, 253, 0.06);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}
.highlight-icon {
  font-size: 1.1rem;
}
.highlight-text {
  font-size: 0.88rem;
  color: #faedd9;
  font-style: italic;
  line-height: 1.45;
}

/* Deck Navbar */
.deck-navbar {
  padding: 10px 18px;
  background: rgba(18, 18, 24, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.deck-nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.deck-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(196, 181, 253, 0.35);
}
.deck-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.deck-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.deck-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: var(--transition);
}
.deck-dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(196, 181, 253, 0.5);
}
.deck-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.35);
}

/* ========================================================
   FULLSCREEN PRESENTATION STAGE MODAL
   ======================================================== */
.deck-fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: #09090e;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 36px;
  animation: fadeIn 0.25s ease;
}
.deck-fs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.deck-fs-title-box h3 {
  font-size: 1.25rem;
  color: #faedd9;
  letter-spacing: -0.01em;
}
.deck-fs-title-box span {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.deck-fs-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.deck-fs-counter {
  font-size: 0.88rem;
  color: var(--accent);
  font-family: var(--font-mono);
  background: rgba(196, 181, 253, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.btn-deck-fs-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-deck-fs-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.deck-fs-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.deck-fs-nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.deck-fs-nav-btn:hover:not(:disabled) {
  background: rgba(196, 181, 253, 0.15);
  color: #ffffff;
  border-color: rgba(196, 181, 253, 0.4);
  transform: scale(1.08);
}
.deck-fs-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.deck-fs-slide-viewport {
  flex: 1;
  background: #11111a;
  border: 1px solid rgba(196, 181, 253, 0.25);
  border-radius: var(--radius-lg);
  padding: 48px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.deck-fs-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.deck-fs-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.deck-fs-shortcuts {
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* ========================================================
   PERSONA TOGGLE & TELEGRAM CHAT STYLE MODAL
   ======================================================== */
.top-bar-center {
  display: flex;
  align-items: center;
  gap: 12px;
}
.persona-toggle-container {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(196, 181, 253, 0.2);
  border-radius: var(--radius-pill);
  padding: 3px 4px 3px 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
.persona-toggle-container:hover {
  border-color: rgba(196, 181, 253, 0.4);
}
.persona-pill-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  outline: none;
  user-select: none;
}
.persona-pill-btn:hover {
  color: var(--text-main);
}
.persona-pill-btn.active {
  color: #ffffff;
}
.persona-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: var(--transition);
}
.persona-pill-btn.active .persona-dot {
  background: #6ee7b7;
  box-shadow: 0 0 10px rgba(110, 231, 183, 0.8);
  animation: pulseGlow 2.5s infinite;
}
.persona-settings-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  outline: none;
}
.persona-settings-btn:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(30deg);
}

/* Persona Modal */
.persona-modal-card {
  max-width: 560px;
  text-align: left;
  padding: 28px 30px;
}
.persona-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.persona-modal-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.persona-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(196, 181, 253, 0.05);
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 22px;
}
.persona-switch-text strong {
  display: block;
  font-size: 0.94rem;
  color: var(--text-main);
  margin-bottom: 3px;
}
.persona-switch-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Toggle Switch Slider */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 25px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #2a2a35;
  border-radius: 25px;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 17px;
  width: 17px;
  left: 3px;
  bottom: 3px;
  background: #cbd5e1;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-gradient);
  border-color: rgba(196, 181, 253, 0.5);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(21px);
  background: #1a1625;
}

.persona-section-title {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.persona-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.persona-preset-btn {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.persona-preset-btn:hover {
  border-color: rgba(196, 181, 253, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
.persona-preset-btn.active {
  background: rgba(196, 181, 253, 0.12);
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 4px 14px rgba(196, 181, 253, 0.12);
}
.preset-icon {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 6px;
}
.preset-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3px;
}
.preset-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.35;
}
.telegram-examples-box textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.86rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}
.telegram-examples-box textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.15);
}
.persona-modal-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 768px) {
  .top-bar-center {
    gap: 8px;
  }
  .persona-pill-btn {
    padding: 4px 6px;
    font-size: 0.74rem;
  }
  .persona-presets-grid {
    grid-template-columns: 1fr;
  }
}
