:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg-color: #000000;
  --sidebar-bg: #000000;
  --new-chat-bg: #212121;
  --capsule-bg: #212121;
  --capsule-hover: #292929;
  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;
  --text-muted: #737373;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --hover-item: rgba(255, 255, 255, 0.08);
  --accent-blue: #2563eb;
  --reasoning-blue: #58a6ff;
  --reasoning-bg: #243347;
  --user-bubble-blue: #173868;
}

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

html, body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  position: fixed;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  height: 100%;
  height: 100dvh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* ------------------- Сайдбар со скриншота 2 ------------------- */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle);
  transition: transform 0.2s ease, width 0.2s ease;
  z-index: 50;
}

.sidebar.collapsed {
  width: 0;
  transform: translateX(-250px);
  border-right: none;
}

.sidebar-top {
  padding: 12px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}

.brand-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.top-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.top-icon-btn:hover {
  background: var(--hover-item);
  color: var(--text-primary);
}

/* Кнопка "Новый чат" со скриншота 2 */
.new-chat-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background-color: var(--new-chat-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  margin: 2px 0 6px;
  transition: background-color 0.15s;
}

.new-chat-box:hover {
  background-color: #2a2a2a;
}

.new-chat-box svg {
  color: var(--text-primary);
  flex-shrink: 0;
}

/* Пункты навигации сайдбара */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.nav-item:hover {
  background: var(--hover-item);
  color: var(--text-primary);
}

.nav-icon {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.nav-item:hover .nav-icon {
  color: var(--text-primary);
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.updated-badge {
  font-size: 9px;
  font-weight: 700;
  background-color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #d4d4d4;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

/* Поиск по чатам */
.sidebar-search-box {
  padding: 4px 14px 8px;
}

.sidebar-search-box input {
  width: 100%;
  background: #171717;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #fff;
  outline: none;
}

/* Список истории со скриншота 2 */
.chat-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #8e8e8e;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.2px;
}

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

.chat-section-header svg {
  color: #8e8e8e;
  transition: transform 0.15s ease;
}

.chat-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-history-list::-webkit-scrollbar {
  width: 4px;
}
.chat-history-list::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 4px;
}

.history-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #e5e5e5;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.history-item:hover, .history-item.active {
  background-color: #212121;
  color: #ffffff;
}

.history-item.pinned {
  border-left: 2.5px solid var(--accent-blue);
}

.chat-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 6px;
}

.history-item-actions {
  display: none;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.history-item:hover .history-item-actions,
.history-item.active .history-item-actions {
  display: flex;
}

.hist-action-btn {
  background: transparent !important;
  border: none !important;
  color: #a1a1aa !important;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
  box-shadow: none !important;
  outline: none !important;
}

.hist-action-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

.hist-action-btn.pinned {
  color: #38bdf8 !important;
}

/* Выпадающее меню настроек чата (...) */
.history-popover-menu {
  position: absolute;
  right: 10px;
  top: 36px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px;
  z-index: 1000;
  min-width: 155px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeIn 0.12s ease;
}

.history-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #e5e5e5;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.12s, color 0.12s;
}

.history-popover-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.history-popover-item.danger {
  color: #f87171;
}

.history-popover-item.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #ffffff;
}

/* Нижняя плашка профиля Mykhail Free Обновить */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.user-card:hover {
  background: var(--hover-item);
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #313d4f;
  color: #c9d5e3;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.user-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-tier {
  font-size: 11.5px;
  color: var(--text-muted);
}

.upgrade-pill-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.upgrade-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ------------------- Главная область ------------------- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  position: relative;
  background-color: var(--bg-color);
  overflow: hidden;
  min-width: 0;
}

/* Шапка со скриншотов 3 и 4 */
.top-header {
  height: 54px;
  min-height: 54px;
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mobile-menu-btn {
  display: none;
  min-width: 38px;
  min-height: 38px;
}

.header-new-chat-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-new-chat-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.mobile-chat-brand-title {
  display: none;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-left: 2px;
}

.close-sidebar-mobile-btn {
  display: none;
}

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

/* Кнопка "✦ Обновить" со скриншота 4 */
.header-upgrade-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--reasoning-blue);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}

.header-upgrade-action:hover {
  background: rgba(88, 166, 255, 0.12);
}

.sparkle-icon {
  flex-shrink: 0;
}

/* Иконка настроек/профиля со скриншота 3 */
.header-user-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.header-user-btn:hover {
  background: var(--hover-item);
}

/* ------------------- Центральный экран ------------------- */
.chat-viewport {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-bottom: 30px;
}

.chat-viewport::-webkit-scrollbar {
  width: 6px;
}
.chat-viewport::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 4px;
}

.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  max-width: 680px;
  width: 90%;
  padding: 40px 0;
}

.hero-title {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
  text-align: center;
  width: 100%;
}

/* Капсула ввода со скриншота */
.center-input-capsule {
  width: 100%;
  background-color: var(--capsule-bg);
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px 12px 8px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: background 0.15s, box-shadow 0.15s;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.capsule-input-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.center-input-capsule:focus-within {
  background-color: var(--capsule-hover);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 20px rgba(0, 0, 0, 0.6);
}

.capsule-plus-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.capsule-plus-btn:hover {
  color: #ffffff;
}

.capsule-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #ffffff;
  padding: 10px 12px;
}

.capsule-input::placeholder {
  color: var(--text-muted);
}

.capsule-right-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Кнопка "Размышление" с оригинальным мозгом */
.capsule-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.capsule-tool-btn.active {
  background-color: var(--reasoning-bg);
  color: var(--reasoning-blue);
}

.capsule-tool-btn.active .brain-icon {
  stroke: var(--reasoning-blue);
}

.brain-icon {
  flex-shrink: 0;
}

.capsule-tool-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 7px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.capsule-tool-icon:hover {
  color: #ffffff;
}

/* Синяя кнопка голосового режима */
.capsule-voice-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.capsule-voice-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* Три действия под полем ввода (Скриншот) */
.quick-actions-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 680px;
  align-items: flex-start;
}

.quick-action-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  text-align: left;
  transition: color 0.15s, background 0.15s;
}

.quick-action-link:hover {
  color: #ffffff;
  background: var(--hover-item);
}

.quick-action-link svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

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

/* ------------------- Модальное окно Размышления (Скриншот 1) ------------------- */
.reasoning-modal-card {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  width: 90%;
  max-width: 460px;
  padding: 30px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  animation: scaleFade 0.2s ease;
}

@keyframes scaleFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.reasoning-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

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

.reasoning-preview-pill {
  background: #242424;
  border-radius: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 6px 4px 6px;
  gap: 10px;
  margin-bottom: 22px;
}

.preview-brain-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--reasoning-bg);
  color: var(--reasoning-blue);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.preview-mic {
  display: flex;
  align-items: center;
}

.preview-wave {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reasoning-modal-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.reasoning-modal-desc {
  font-size: 14px;
  color: #c4c4c4;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 380px;
}

.reasoning-modal-link {
  color: var(--reasoning-blue);
  font-size: 13.5px;
  text-decoration: none;
  margin-bottom: 26px;
  display: inline-block;
  line-height: 1.4;
}

.reasoning-modal-link:hover {
  text-decoration: underline;
}

.reasoning-modal-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn-upgrade-plus {
  background-color: #2b3848;
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.15s;
  flex: 1;
}

.btn-upgrade-plus:hover {
  background-color: #35455a;
}

.btn-enable-reasoning {
  background-color: #ffffff;
  color: #000000;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 24px;
  cursor: pointer;
  transition: opacity 0.15s;
  flex: 1;
}

.btn-enable-reasoning:hover {
  opacity: 0.9;
}

/* ------------------- СООБЩЕНИЯ В ЧАТЕ (В ТОЧНОСТИ СО СКРИНШОТА 2) ------------------- */
.messages-list {
  width: 100%;
  max-width: 760px;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.message-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.2s ease;
}

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

/* Сообщение пользователя со скриншота 2: темно-синий кругляш/капсула справа */
.message-row.user {
  align-items: flex-end;
}

.message-row.user .message-bubble {
  background-color: var(--user-bubble-blue);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  max-width: 80%;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Сообщение ассистента со скриншота 2: чистый текст слева без рамок */
.message-row.assistant {
  align-items: flex-start;
}

.assistant-content {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: #e2e8f0;
  max-width: 100%;
  overflow-x: auto;
  word-break: break-word;
}

.assistant-content h1, 
.assistant-content h2, 
.assistant-content h3 {
  color: #ffffff;
  font-weight: 700;
  margin: 18px 0 8px 0;
  letter-spacing: -0.02em;
}

.assistant-content h1 { font-size: 19px; }
.assistant-content h2 { font-size: 17px; }
.assistant-content h3 { font-size: 15.5px; }

.assistant-content p { 
  margin-bottom: 12px; 
  line-height: 1.7;
}

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

.assistant-content strong {
  color: #ffffff;
  font-weight: 600;
}

.assistant-content em {
  color: #cbd5e1;
}

.assistant-content ul, 
.assistant-content ol { 
  margin: 8px 0 12px 22px; 
}

.assistant-content li { 
  margin-bottom: 5px; 
  line-height: 1.65;
}

.assistant-content blockquote {
  border-left: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.05);
  padding: 8px 14px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  color: #94a3b8;
  font-style: italic;
}

.assistant-content code:not(.hljs) {
  background: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
}
  font-family: monospace;
  font-size: 13.5px;
}

.message-row.user {
  align-items: flex-end;
  margin-bottom: 4px;
}

.user-bubble-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 82%;
}

.user-message-bubble {
  background: #1d4ed8;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 14.5px;
  line-height: 1.5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  word-break: break-word;
}

.user-msg-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding-right: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.message-row.user:hover .user-msg-toolbar {
  opacity: 1;
}

.user-toolbar-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
}

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

/* Analysis / Thought Pill */
.analysis-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12.5px;
  color: #e5e5e5;
  cursor: pointer;
  margin: 6px 0 12px;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.analysis-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.analysis-pill svg {
  transition: transform 0.2s ease;
}

.analysis-pill.collapsed svg {
  transform: rotate(180deg);
}

.analysis-content {
  background: #141415;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #a1a1aa;
  line-height: 1.5;
}

/* Code Block Card */
.code-block-wrapper {
  margin: 14px 0;
  border-radius: 12px;
  overflow: hidden;
  background-color: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background-color: #232326;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-lang-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #d4d4d8;
}

.code-lang-symbol {
  color: #a1a1aa;
  font-family: monospace;
  font-size: 12px;
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}

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

.code-copy-btn.copied {
  color: #38bdf8;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.65;
  background: transparent;
}

.code-block-wrapper code {
  font-family: inherit;
  font-size: inherit;
  background: transparent !important;
  padding: 0 !important;
}

/* Syntax Highlighting Colors (Screenshot 3 styling) */
.hljs-keyword, .token-keyword { color: #ff7b72; font-weight: 500; }
.hljs-string, .token-string { color: #a5d6ff; }
.hljs-number, .token-number { color: #79c0ff; }
.hljs-comment, .token-comment { color: #8b949e; font-style: italic; }
.hljs-title, .hljs-function, .token-function { color: #d2a8ff; }
.hljs-variable, .token-variable { color: #ffa657; }
.hljs-attr, .hljs-property, .token-property { color: #79c0ff; }
.hljs-built_in, .token-builtin { color: #ffa657; }
.hljs-params, .token-params { color: #c9d1d9; }
.hljs-operator, .token-operator { color: #ff7b72; }

/* Assistant Hover Actions Toolbar */
.assistant-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.message-row.assistant:hover .assistant-actions-toolbar {
  opacity: 1;
}

.toolbar-action-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
}

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

/* ------------------- МИГАЮЩИЙ СИНИЙ КРУГ "РАССУЖДЕНИЕ" (Скриншот 1) ------------------- */
.thinking-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
  animation: fadeIn 0.2s ease;
}

/* Синий мигающий/пульсирующий круг со скриншота 1 */
.thinking-blue-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #60a5fa, #2563eb 70%, #1d4ed8);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
  animation: blueCirclePulse 1.3s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes blueCirclePulse {
  0%, 100% {
    transform: scale(0.92);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 22px rgba(59, 130, 246, 0.95);
    opacity: 1;
  }
}

.thinking-label {
  font-size: 14px;
  color: #a3a3a3;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Блок "Рассуждал в течение N сек" после завершения размышлений */
.thought-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #a3a3a3;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background 0.15s;
}

.thought-summary-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.thought-details {
  display: none;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  font-size: 13.5px;
  color: #8e8e8e;
  line-height: 1.5;
}

.thought-details.open {
  display: block;
}

/* ------------------- Полоса ввода в чате ------------------- */
.bottom-input-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
  background: linear-gradient(180deg, transparent 0%, #000000 35%);
}

.bottom-capsule-wrapper {
  max-width: 760px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.capsule-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-family);
  font-size: 15px;
  color: #ffffff;
  max-height: 180px;
  padding: 6px 12px;
}

.capsule-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

/* ------------------- Модальные окна с размытием фона (Скриншот 3) ------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeInModal 0.2s ease-out;
}

.modal-backdrop.open {
  display: flex;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ------------------- Диалоговое окно Настроек (Скриншоты 1, 2, 3) ------------------- */
.settings-dialog-card {
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 820px;
  max-width: 95%;
  height: 570px;
  max-height: 88vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  overflow: hidden;
  position: relative;
  animation: scaleInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Левая навигационная колонка настроек */
.settings-sidebar {
  width: 240px;
  min-width: 240px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  background: #171717;
}

.settings-sidebar-top {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.settings-close-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #a3a3a3;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

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

.settings-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 12px;
}

.settings-search-box .search-svg {
  color: #737373;
  flex-shrink: 0;
}

.settings-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13px;
  width: 100%;
}

.settings-search-box input::placeholder {
  color: #737373;
}

.settings-nav-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

.settings-nav-list::-webkit-scrollbar {
  width: 4px;
}
.settings-nav-list::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #d1d1d1;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.settings-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 500;
  border-color: rgba(255, 255, 255, 0.16);
}

.settings-nav-icon {
  color: #a3a3a3;
  flex-shrink: 0;
}

.settings-nav-item.active .settings-nav-icon,
.settings-nav-item:hover .settings-nav-icon {
  color: #ffffff;
}

/* Правая панель настроек */
.settings-content-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

.settings-content-panel::-webkit-scrollbar {
  width: 6px;
}
.settings-content-panel::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}

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

.settings-pane.active {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.settings-pane-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
}

/* Баннер безопасности МФА со скриншота 1 */
.mfa-security-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 24px;
  position: relative;
}

.mfa-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mfa-shield-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mfa-close-btn {
  background: transparent;
  border: none;
  color: #737373;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

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

.mfa-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.mfa-card-text {
  font-size: 13px;
  color: #a3a3a3;
  line-height: 1.45;
  margin-bottom: 16px;
}

.mfa-action-btn {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.mfa-action-btn:hover {
  background: #1a1a1a;
}

/* Строки настроек */
.settings-rows-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 2px;
}

.settings-row.vertical {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.settings-row-label {
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
}

.settings-row-desc {
  font-size: 12.5px;
  color: #8e8e8e;
  margin-top: 2px;
}

.settings-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.settings-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  font-size: 14px;
  padding: 6px 26px 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: background 0.15s;
  text-align: right;
}

.settings-select:hover {
  background: rgba(255, 255, 255, 0.08);
}

.settings-select option {
  background: #212121;
  color: #ffffff;
}

.select-chevron {
  position: absolute;
  right: 8px;
  pointer-events: none;
  color: #8e8e8e;
}

/* iOS-переключатель со скриншота 1 */
.settings-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #333333;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.settings-toggle input:checked + .toggle-track {
  background: #2563eb;
}

.settings-toggle input:checked + .toggle-track::before {
  transform: translateX(20px);
}

/* Горячие клавиши */
.shortcuts-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

kbd {
  background: #262626;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-family: monospace;
  color: #e5e5e5;
}

.settings-actions-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}
.btn-danger:hover {
  background: #b91c1c;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-control {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
}

.form-control:focus {
  border-color: #2563eb;
}

.btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}

.btn-secondary {
  background: #2a2a2a;
  color: #ffffff;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-secondary {
  background: #2a2a2a;
  color: #ffffff;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

/* ------------------- Мобильная адаптивность ------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 45;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* ------------------- Меню профиля со скриншота 2 ------------------- */
.profile-popover-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  right: 8px;
  background: #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 150;
  backdrop-filter: blur(20px);
}

.profile-popover-menu.open {
  display: flex;
  animation: popoverAnim 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverAnim {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popover-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.popover-user-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.popover-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #313d4f;
  color: #c9d5e3;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

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

.popover-name {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.popover-sub {
  font-size: 12px;
  color: #9e9e9e;
  line-height: 1.2;
}

.popover-chevron {
  color: #8e8e8e;
  flex-shrink: 0;
  margin-left: auto;
}

.popover-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 4px;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: #ececec;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

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

.popover-icon {
  color: #d1d1d1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.popover-item:hover .popover-icon {
  color: #ffffff;
}

/* ------------------- Модальное окно выбора тарифа (Скриншоты 3 и 4) ------------------- */
.upgrade-plan-backdrop {
  z-index: 210;
}

.upgrade-plan-card {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 92%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  color: #ffffff;
}

.upgrade-plan-card::-webkit-scrollbar {
  width: 6px;
}
.upgrade-plan-card::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}

.upgrade-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.plan-tabs-bar {
  display: inline-flex;
  background: #212121;
  padding: 4px;
  border-radius: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.plan-tab-btn {
  background: transparent;
  border: none;
  color: #a3a3a3;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.plan-tab-btn:hover {
  color: #ffffff;
}

.plan-tab-btn.active {
  background: #2f2f2f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.plan-tab-content {
  display: none;
}

.plan-tab-content.active {
  display: block;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
}

.plan-column {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.plus-plan {
  border-color: rgba(88, 166, 255, 0.4);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, #1f1f1f 40%);
}

.plan-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-tier-label {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
}

.recommend-badge {
  font-size: 11px;
  font-weight: 700;
  color: #58a6ff;
  background: rgba(56, 139, 253, 0.15);
  border: 1px solid rgba(56, 139, 253, 0.4);
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.plan-heading {
  font-size: 14px;
  font-weight: 500;
  color: #d4d4d4;
  margin-bottom: 6px;
}

.plan-desc {
  font-size: 12.5px;
  color: #8e8e8e;
  line-height: 1.45;
  margin-bottom: 18px;
  min-height: 36px;
}

.plan-price {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.plan-price .currency {
  font-size: 20px;
}

.plan-price .price-period {
  font-size: 13px;
  font-weight: 400;
  color: #8e8e8e;
  margin-left: 4px;
}

.btn-current-plan {
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  background: #2a2a2a;
  color: #8e8e8e;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  cursor: default;
  margin-bottom: 22px;
}

.btn-upgrade-action {
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  color: #000000;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-upgrade-action:hover {
  opacity: 0.92;
  transform: scale(1.01);
}

.plan-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: #c4c4c4;
}

.features-title {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.feature-icon {
  color: #737373;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-icon.blue {
  color: #58a6ff;
}

.business-card-wrap {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 26px;
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================================================
   Account Switcher Flyout Menu (Скриншот 2 / media_1789667946855)
   ========================================================================== */
.account-flyout-menu {
  position: absolute;
  left: calc(100% + 8px);
  bottom: 0;
  width: 250px;
  background: #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 150;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  animation: fadeIn 0.15s ease-out;
}

.account-flyout-menu.open {
  display: flex;
}

.flyout-email-label {
  font-size: 11px;
  color: #8e8e8e;
  padding: 6px 10px;
  font-weight: 500;
  word-break: break-all;
}

.flyout-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s;
}

.flyout-user-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.flyout-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flyout-user-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  flex: 1;
}

.flyout-check {
  flex-shrink: 0;
}

.flyout-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.flyout-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.flyout-action-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   OpenAI / ChatGPT Registration & Login Modal (AuthModal)
   ========================================================================== */
.auth-modal-card {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 420px;
  max-width: 92%;
  padding: 36px 30px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  animation: scaleInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #8e8e8e;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

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

.auth-openai-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: #8e8e8e;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.45;
}

.auth-input-group {
  margin-bottom: 16px;
}

.auth-input-field {
  width: 100%;
  padding: 13px 16px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input-field:focus {
  border-color: #10a37f;
  box-shadow: 0 0 0 1px #10a37f;
}

.auth-primary-btn {
  width: 100%;
  padding: 13px;
  background: #10a37f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.auth-primary-btn:hover {
  opacity: 0.92;
}

.auth-switch-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: #8e8e8e;
  margin-top: 16px;
}

.auth-link-text {
  background: transparent;
  border: none;
  color: #10a37f;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.auth-divider-line {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: #737373;
  font-size: 11px;
  font-weight: 600;
}

.auth-divider-line::before,
.auth-divider-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider-line span {
  padding: 0 12px;
}

.auth-social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Full Settings Styles for all Panes (Personalization, Plugins, Billing, etc.)
   ========================================================================== */
.settings-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

.settings-section-head {
  margin-top: 16px;
  margin-bottom: 8px;
}

.settings-subheading {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.settings-subheading-large {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.settings-field-group {
  margin-bottom: 14px;
}

.settings-input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #d1d1d1;
  margin-bottom: 6px;
}

.settings-dark-input {
  width: 100%;
  padding: 10px 12px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.settings-dark-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.settings-dark-textarea {
  width: 100%;
  padding: 10px 12px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  resize: vertical;
}

.settings-dark-textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.settings-wide-card-btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-wide-card-btn:hover {
  background: #0f0f0f;
}

.settings-pill-action-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.settings-pill-action-btn:hover {
  background: #2b2b2b;
}

.settings-pill-action-btn.danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
  background: transparent;
}

.settings-pill-action-btn.danger:hover {
  background: rgba(248, 113, 113, 0.1);
}

.settings-pill-white-btn {
  padding: 7px 18px;
  border-radius: 20px;
  background: #ffffff;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.settings-pill-white-btn:hover {
  opacity: 0.9;
}

.settings-chevron-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.settings-chevron-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.settings-val-text {
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
}

.settings-nav-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.settings-nav-action-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.settings-nav-action-row.plain {
  justify-content: space-between;
}

.settings-nav-action-row.plain-stack {
  justify-content: space-between;
  align-items: center;
}

.plugin-icon-teal {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plugin-icon-dark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #262626;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-action-title {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  flex: 1;
}

.chevron-right {
  color: #8e8e8e;
  margin-left: auto;
}

/* Карточки использования и аналитики */
.gpt-card-box {
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  margin-top: 12px;
}

.gpt-card-box.empty-center-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  color: #8e8e8e;
  font-size: 13.5px;
  text-align: center;
}

.gpt-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.gpt-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #ffffff;
}

.gpt-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-history-pill {
  padding: 4px 12px;
  background: #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-history-pill:hover {
  background: #3a3a3a;
}

.subdued-text {
  color: #8e8e8e;
  font-size: 12.5px;
}

.gpt-card-empty-msg {
  margin-top: 14px;
  font-size: 13px;
  color: #8e8e8e;
}

.gpt-progress-bar-wrap {
  height: 4px;
  background: #333333;
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.gpt-progress-bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
}

.dotted-underline {
  border-bottom: 1px dotted #a3a3a3;
  cursor: help;
}

.gpt-bold-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
}

.gpt-sublink {
  color: #ffffff;
  text-decoration: underline;
  font-size: 12.5px;
}

.days-toggle-capsule {
  display: inline-flex;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  margin-top: 10px;
}

.days-toggle-btn {
  padding: 4px 14px;
  border-radius: 16px;
  background: transparent;
  border: none;
  color: #8e8e8e;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.days-toggle-btn.active {
  background: #333333;
  color: #ffffff;
}

.storage-slider-track {
  height: 4px;
  background: #2f2f2f;
  border-radius: 2px;
  position: relative;
  margin: 14px 0 10px 0;
}

.storage-slider-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  left: 0;
  top: -5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.badge-risk-pill {
  font-size: 11px;
  font-weight: 600;
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 12px;
  padding: 2px 8px;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
}

.gpt-builder-preview-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px;
  margin-top: 12px;
  position: relative;
}

.builder-card-top-tag {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 12px;
  color: #8e8e8e;
}

.builder-preview-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 0;
}

.builder-cube-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 10px;
}

.builder-preview-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.builder-preview-by {
  font-size: 12.5px;
  color: #8e8e8e;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gpt-builder-info-card {
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.builder-info-icon {
  color: #a3a3a3;
  flex-shrink: 0;
  margin-top: 2px;
}

.builder-info-bold {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.builder-info-sub {
  font-size: 12.5px;
  color: #8e8e8e;
  line-height: 1.4;
}

.builder-link-row {
  display: flex;
  align-items: center;
  color: #ffffff;
}

.builder-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 13.5px;
  margin-top: 6px;
}

.builder-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1d1d1;
  font-size: 13px;
  cursor: pointer;
}

.kbd-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kbd-label-text {
  font-size: 13.5px;
  color: #ffffff;
  flex: 1;
}

.kbd-badge {
  font-family: inherit;
  font-size: 12px;
  background: #262626;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 8px;
  color: #d1d1d1;
}

.settings-wide-reset-btn {
  padding: 9px 24px;
  border-radius: 20px;
  background: #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-wide-reset-btn:hover {
  background: #3a3a3a;
}

/* Сворачиваемая группа в Персонализации */
.collapsible-group {
  margin-top: 8px;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}

.collapsible-chevron {
  color: #8e8e8e;
  transition: transform 0.2s;
}

.collapsible-group.open .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.collapsible-group.open .collapsible-body {
  display: flex;
}




/* ================================================================ */
/* MYKHAIL GPT: BRANDING, AUTH GATE, ADMIN PANEL & RESPONSIVE SUITE */
/* ================================================================ */

/* 1. Brand Logo Styling */
.brand-badge-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mini-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.hero-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.hero-logo-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.55), 0 4px 16px rgba(0, 0, 0, 0.6);
  margin-bottom: 14px;
  animation: logoGlowPulse 4s infinite alternate ease-in-out;
}

@keyframes logoGlowPulse {
  0% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.4); transform: scale(1); }
  100% { box-shadow: 0 0 34px rgba(16, 185, 129, 0.6); transform: scale(1.02); }
}

/* 2. Top Header Elements: Admin Crown & Language Selector */
.admin-top-btn {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #facc15;
  border-radius: 18px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 6px;
}

.admin-top-btn:hover {
  background: rgba(234, 179, 8, 0.25);
  border-color: rgba(234, 179, 8, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
}

.lang-selector-capsule {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #212121;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 18px;
  color: #a3a3a3;
  margin-right: 6px;
}

.lang-dropdown-select {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.lang-dropdown-select option {
  background: #1e1e1e;
  color: #ffffff;
}

/* 3. Premium Plan / Disappearing 'Free' Badge */
.user-tier.plus {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff !important;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.user-tier.business {
  background: linear-gradient(135deg, #9333ea, #ec4899);
  color: #ffffff !important;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.5);
}

.upgrade-pill-btn.hidden-plan {
  display: none !important;
}

/* 4. Auth Gate Fullscreen Modal */
.modal-backdrop#authGateModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.auth-gate-card {
  width: 100%;
  max-width: 440px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  padding: 30px 28px 34px;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: authFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-gate-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.auth-brand-name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.auth-brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #10b981;
}

.dev-code-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dev-code-banner code {
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.dev-paste-btn {
  background: #10b981;
  color: #000;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.dev-paste-btn:hover {
  opacity: 0.85;
}

.auth-code-prompt {
  font-size: 13px;
  color: #a3a3a3;
  margin-bottom: 12px;
  text-align: center;
}

.auth-code-prompt strong {
  color: #ffffff;
  display: block;
  margin-top: 2px;
}

.auth-input-field.code-input {
  letter-spacing: 6px;
  font-size: 20px;
  text-align: center;
  font-weight: 700;
}

.auth-back-link {
  background: transparent;
  border: none;
  color: #8e8e8e;
  font-size: 12.5px;
  cursor: pointer;
  margin-top: 14px;
  width: 100%;
  text-align: center;
  transition: color 0.15s;
}

.auth-back-link:hover {
  color: #ffffff;
}

/* 5. Admin Panel Modal Card */
.modal-backdrop#adminPanelModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 20px;
}

.admin-modal-card {
  width: 100%;
  max-width: 960px;
  height: 82vh;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(234, 179, 8, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-crown {
  font-size: 20px;
}

.admin-header-title h2 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.admin-badge-super {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-nav-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #181818;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: #8e8e8e;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

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

.admin-tab-btn.active {
  color: #ffffff;
  background: #282828;
  font-weight: 600;
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
}

.admin-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.admin-stat-box {
  background: #1d1d1d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.admin-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.admin-stat-label {
  font-size: 12px;
  color: #8e8e8e;
  margin-top: 6px;
}

.admin-table-container {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.admin-table th {
  background: #1e1e1e;
  color: #8e8e8e;
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #d1d1d1;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.role-badge.superadmin {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.role-badge.admin {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.role-badge.user {
  background: rgba(255, 255, 255, 0.08);
  color: #a3a3a3;
}

.admin-btn-sm {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-btn-sm:hover {
  background: #383838;
}

.admin-btn-sm.danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.admin-btn-sm.danger:hover {
  background: rgba(248, 113, 113, 0.15);
}

.admin-grant-card {
  max-width: 500px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
}

.admin-grant-card h3 {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 8px;
}

.admin-grant-card p {
  font-size: 13px;
  color: #8e8e8e;
  margin-bottom: 18px;
}

.admin-grant-form {
  display: flex;
  gap: 10px;
}

.admin-input-field {
  flex: 1;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 9px 14px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
}

.admin-input-field:focus {
  border-color: #38bdf8;
}

.admin-action-btn.primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-action-btn.primary:hover {
  background: #1d4ed8;
}

.admin-status-msg {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.admin-status-msg.success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-status-msg.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-chats-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: 480px;
}

.admin-chats-list {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-chat-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  background: #222;
  transition: background 0.15s;
}

.admin-chat-item:hover {
  background: #2b2b2b;
}

.admin-chat-item.active {
  background: #2563eb;
  color: #ffffff;
}

.admin-chat-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-chat-user {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 3px;
}

.admin-chat-viewer {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-viewer-placeholder {
  color: #737373;
  font-size: 13px;
  text-align: center;
  margin: auto;
}

.admin-security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.sec-card {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
}

.sec-card h4 {
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 14px;
}

.sec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.sec-row span {
  color: #8e8e8e;
}

/* ================================================================ */
/* 6. RESPONSIVE DESIGN (PHONES, TABLETS, IPAD, PC, MACBOOK)        */
/* ================================================================ */

/* ================================================================ */
/* 6. RESPONSIVE DESIGN (IPHONES, ANDROID, IPADS, TABLETS, DESKTOP) */
/* ================================================================ */

/* Safe area support for iPhone notch & Home bar */
.top-header {
  padding-top: max(10px, env(safe-area-inset-top));
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}

.bottom-input-bar {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Tablets & iPads (<= 1024px) */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  .center-input-capsule {
    width: 94%;
    max-width: 720px;
  }
  .settings-modal-card {
    width: 94%;
    height: 88vh;
  }
  .admin-modal-card.luxury-admin {
    width: 96%;
    height: 90vh;
  }
  .admin-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones & Small Screens (<= 768px) */
@media (max-width: 768px) {
  /* Prevent iOS Safari zoom-on-focus by using 16px base */
  input[type="text"], input[type="email"], input[type="password"], textarea, select {
    font-size: 16px !important;
  }

  .app-layout {
    position: relative;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  .main-content {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    min-width: 0;
  }

  /* Off-canvas mobile drawer sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.95);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Mobile Backdrop Overlay */
  .sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .header-new-chat-btn {
    display: inline-flex !important;
  }

  .mobile-chat-brand-title {
    display: inline-block !important;
  }

  .close-sidebar-mobile-btn {
    display: flex !important;
  }

  .top-header {
    height: 54px !important;
    min-height: 54px !important;
    flex-shrink: 0 !important;
    padding: 0 10px !important;
    padding-top: max(8px, env(safe-area-inset-top)) !important;
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .header-right {
    gap: 6px !important;
  }

  .center-input-capsule {
    width: 100%;
    border-radius: 24px;
    padding: 8px 10px;
  }

  .chat-viewport {
    min-height: 0 !important;
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .messages-list {
    padding: 12px 10px 110px 10px;
  }

  .user-bubble-wrapper {
    max-width: 92%;
  }

  .hero-title {
    font-size: 22px;
    text-align: center;
    padding: 0 10px;
  }

  .hero-logo-img {
    width: 52px;
    height: 52px;
  }

  /* Responsive Admin Modal on iPhone/Phones */
  .admin-modal-card,
  .admin-modal-card.luxury-admin {
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    position: fixed !important;
    inset: 0 !important;
  }

  .admin-modal-header {
    padding: 14px 16px;
  }

  .admin-modal-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 6px;
  }

  .admin-tab-btn, .admin-nav-tab {
    flex-shrink: 0;
    font-size: 13px;
    padding: 6px 12px;
  }

  .admin-users-table-container,
  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .admin-users-table {
    min-width: 580px;
  }

  .admin-stats-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-chats-split {
    grid-template-columns: 1fr;
    height: auto;
  }

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

  /* Responsive Settings Modal on iPhone/Android */
  .settings-dialog-card {
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    flex-direction: column !important;
    margin: 0 !important;
    position: fixed !important;
    inset: 0 !important;
  }

  .settings-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-height: 140px !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
  }

  .settings-sidebar-top {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-bottom: 6px !important;
  }

  .settings-close-circle-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
  }

  .settings-nav-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 6px !important;
    padding-bottom: 6px !important;
  }

  .settings-nav-item {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .settings-content-area {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 14px 60px !important;
  }
}

/* Extra Small Phones (iPhone SE, <= 480px) */
@media (max-width: 480px) {
  .brand-title {
    display: none;
  }

  .capsule-tool-btn#reasoningBtn span {
    display: none;
  }

  .capsule-tool-btn#reasoningBtn {
    padding: 6px;
  }

  .lang-selector-capsule span,
  .admin-btn-text {
    display: none;
  }

  .admin-top-btn {
    padding: 6px 9px;
  }

  .header-upgrade-action {
    padding: 4px 8px;
    font-size: 12px;
  }

  .auth-gate-card {
    padding: 22px 14px;
    width: 95%;
  }
}


/* ================================================================ */
/* LUXURY ADMIN PANEL & ULTRA-POLISHED DASHBOARD (v2.0)            */
/* ================================================================ */
.admin-modal-card.luxury-admin {
  max-width: 1040px;
  width: 95%;
  height: 86vh;
  background: radial-gradient(circle at 50% 0%, #171c26 0%, #0c0e12 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.95), 0 0 50px rgba(56, 189, 248, 0.12);
  border-radius: 24px;
}

.admin-modal-header {
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-logo-crown-wrap {
  position: relative;
  display: inline-flex;
}

.admin-header-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.admin-crown-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.8));
}

.admin-header-text h2 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.admin-header-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.admin-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d1d1;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* Tab Navigation */
.admin-nav-tabs {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 28px;
  gap: 8px;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 12px;
  transition: all 0.2s;
}

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

.admin-tab-btn.active {
  color: #ffffff;
  background: #1e2533;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Luxury KPI Cards */
.admin-stats-cards {
  gap: 16px;
  margin-bottom: 24px;
}

.luxury-stat {
  background: #151821;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.luxury-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-icon-wrap {
  font-size: 22px;
}

.stat-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.stat-tag.gold {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
}

.stat-tag.cyan {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
}

.stat-tag.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.admin-stat-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

/* Table Toolbar */
.admin-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.admin-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 14px;
  width: 320px;
  color: #9ca3af;
}

.admin-search-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13px;
  width: 100%;
  outline: none;
}

.admin-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d1d1d1;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-btn-outline.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  background: rgba(239, 68, 68, 0.06);
}

.admin-btn-outline.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffffff;
}

/* Table Wrap */
.luxury-table-wrap {
  background: #13161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 18px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.user-table-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-table-name {
  font-weight: 600;
  color: #ffffff;
}

.role-badge.superadmin {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.25));
  border: 1px solid #eab308;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.role-badge.admin {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* SMTP Config Form */
.smtp-config-card {
  max-width: 640px;
}

.smtp-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.smtp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.smtp-field.full-width {
  grid-column: span 2;
}

.smtp-field label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.smtp-actions-row {
  display: flex;
  gap: 12px;
}

.luxury-btn-glow {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.luxury-btn-glow:hover {
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.65);
}

/* ------------------- UPGRADE PLAN MODAL ------------------- */
.upgrade-plan-card {
  position: relative;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 92%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 32px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  animation: scaleFade 0.2s ease;
  display: flex;
  flex-direction: column;
}

.upgrade-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  color: #a3a3a3 !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  z-index: 10;
  box-shadow: none !important;
  outline: none !important;
}

.upgrade-modal-close:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.plan-tabs-capsule {
  display: inline-flex;
  align-self: center;
  background: #111111;
  padding: 4px;
  border-radius: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-tab {
  background: transparent !important;
  border: none !important;
  color: #a1a1aa !important;
  padding: 8px 22px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

.plan-tab.active {
  background: #27272a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
}

.plan-column {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.plan-column.plus-plan {
  border-color: rgba(59, 130, 246, 0.5);
  background: #161c28;
}

.plan-tier-label {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.recommend-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.plan-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.plan-heading {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.plan-desc {
  font-size: 13px;
  color: #a1a1aa;
  line-height: 1.45;
  margin-bottom: 16px;
}

.plan-price {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price .currency {
  font-size: 18px;
}

.plan-price .price-period {
  font-size: 13px;
  color: #a1a1aa;
  font-weight: 400;
}

.btn-current-plan {
  background: #2a2a2a !important;
  color: #888888 !important;
  border: none !important;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  cursor: not-allowed;
  margin-bottom: 20px;
}

.btn-upgrade-action {
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}

.btn-upgrade-action:hover {
  opacity: 0.9;
}

.plan-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.features-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #d4d4d8;
  line-height: 1.4;
}

.feature-icon {
  flex-shrink: 0;
  color: #71717a;
  margin-top: 2px;
}

.feature-icon.blue {
  color: #60a5fa;
}

.business-card-wrap {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================================================
   IMAGE ATTACHMENTS, OCR VISION & IMAGE GENERATION CARDS
   ========================================================================== */
/* ==========================================================================
   IMAGE ATTACHMENTS - MODERN CHATGPT-STYLE INLINE PREVIEW (SCREENSHOT 2)
   ========================================================================== */
.input-attachment-preview {
  display: flex;
  align-items: flex-start;
  background: transparent !important;
  border: none !important;
  padding: 4px 6px 6px 6px !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  box-shadow: none !important;
  animation: fadeIn 0.2s ease-out;
}

.attachment-thumb-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  flex-shrink: 0;
  background: #0d1117;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.attachment-thumb-wrap:hover {
  transform: scale(1.02);
}

.attachment-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: block;
  background: #11141d;
}

/* Close button: White circle with black cross, hidden by default, visible strictly on hover */
.attachment-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  color: #000000 !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s;
  z-index: 10;
}

/* User requirement: "етот крестик должен поевлятса только если навожусь" */
.attachment-thumb-wrap:hover .attachment-remove-btn {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.attachment-remove-btn:hover {
  background: #f1f5f9 !important;
  color: #ef4444 !important;
  transform: scale(1.15) !important;
}

/* Touchscreens (iPhone/iPad/Android) where hover does not exist */
@media (hover: none) and (pointer: coarse) {
  .attachment-thumb-wrap .attachment-remove-btn {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
}

/* Raw meta text hidden to preserve pure ChatGPT look from Screenshot 2 */
.input-attachment-preview .attachment-meta {
  display: none !important;
}

/* ==========================================================================
   ELEGANT TYPOGRAPHY, TABLES & LISTS (SCREENSHOT: media_1789677416491)
   ========================================================================== */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #11141c;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.markdown-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.6;
}

.markdown-table th {
  background: #181d28;
  color: #38bdf8;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.markdown-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.markdown-table tr:last-child td {
  border-bottom: none;
}

.markdown-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.md-list {
  margin: 8px 0 12px 22px;
  padding: 0;
}

.md-list li {
  margin-bottom: 5px;
  line-height: 1.65;
  color: #e2e8f0;
}

.md-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}

/* Quick action links monochrome styling */
.quick-actions-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  width: 100%;
  max-width: 620px;
}

.quick-action-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px;
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-align: left;
  width: fit-content;
}

.quick-action-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.quick-action-svg {
  color: #94a3b8;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.quick-action-link:hover .quick-action-svg {
  color: #38bdf8;
}

/* Thumbnail inside message bubble */
.chat-msg-attachment {
  margin-top: 10px;
  margin-bottom: 4px;
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.chat-msg-attachment:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
}

.chat-msg-attachment img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

/* Image Generation Card */
.image-gen-card {
  margin: 14px 0;
  background: #0f1318;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-width: 520px;
}

.image-gen-header {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.image-gen-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.image-gen-prompt {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.image-gen-thumb-wrap {
  position: relative;
  background: #07090e;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gen-img-preview {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.image-gen-actions {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.image-gen-btn {
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.image-gen-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.image-gen-btn svg {
  flex-shrink: 0;
}

/* Image Watermark Tag in Bottom-Right Corner */
.image-watermark-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  pointer-events: none;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease-out;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: -40px;
  right: -10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-close-btn:hover {
  background: #ef4444;
}

.lightbox-actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
}

.lightbox-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.lightbox-btn:hover {
  background: #38bdf8;
  color: #000000;
  border-color: #38bdf8;
}

/* School Superpower Badge */
.school-tutor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Google Profile Registration Step */
.auth-fields-row {
  display: flex;
  gap: 12px;
}

.auth-fields-row .auth-input-group {
  flex: 1;
}

.auth-input-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

.auth-input-field.date-input {
  color-scheme: dark;
}

.google-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.google-avatar-preview {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.google-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.google-connected-badge {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.google-profile-email {
  font-size: 13.5px;
  color: #f1f5f9;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Admin Broadcast Recipient Chips */
.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.recipient-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
}

.recipient-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

/* Microphone Listening Active State */
.capsule-tool-icon.listening {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  border-radius: 50%;
  animation: pulseMic 1.2s infinite ease-in-out;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.12); box-shadow: 0 0 16px 4px rgba(239, 68, 68, 0.4); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ================================================================ */
/* ADVANCED REAL-TIME VOICE CHAT MODE (ChatGPT Advanced Voice Mode) */
/* ================================================================ */
.voice-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 30%, #151b29 0%, #08090d 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: voiceFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes voiceFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.voice-modal-card {
  width: 100%;
  max-width: 540px;
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px 36px;
  box-sizing: border-box;
}

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

.voice-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

.voice-title {
  font-size: 16px;
  color: #f1f5f9;
  letter-spacing: -0.2px;
}

.voice-title strong {
  color: #38bdf8;
  font-weight: 700;
}

.voice-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

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

/* Glowing Central Voice Orb */
.voice-orb-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto 0;
}

.voice-orb-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 75%);
  filter: blur(28px);
  animation: orbGlowPulse 3s infinite ease-in-out alternate;
  pointer-events: none;
}

@keyframes orbGlowPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 1; }
}

.voice-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #38bdf8 100%);
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.voice-orb.speaking {
  animation: orbSpeaking 0.8s infinite alternate ease-in-out;
  box-shadow: 0 0 65px rgba(56, 189, 248, 0.9), inset 0 0 25px rgba(255, 255, 255, 0.6);
}

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

.voice-orb.listening {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  box-shadow: 0 0 50px rgba(14, 165, 233, 0.8);
}

.voice-wave-bars {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
}

.voice-wave-bars .vbar {
  width: 4px;
  height: 12px;
  border-radius: 4px;
  background: #ffffff;
  transition: height 0.15s ease;
}

.voice-orb.speaking .vbar:nth-child(1) { animation: vbarWave 0.6s infinite ease-in-out alternate; }
.voice-orb.speaking .vbar:nth-child(2) { animation: vbarWave 0.8s infinite ease-in-out alternate 0.15s; }
.voice-orb.speaking .vbar:nth-child(3) { animation: vbarWave 0.5s infinite ease-in-out alternate 0.3s; }
.voice-orb.speaking .vbar:nth-child(4) { animation: vbarWave 0.7s infinite ease-in-out alternate 0.1s; }
.voice-orb.speaking .vbar:nth-child(5) { animation: vbarWave 0.9s infinite ease-in-out alternate 0.25s; }

@keyframes vbarWave {
  0% { height: 8px; }
  100% { height: 38px; }
}

.voice-status-section {
  text-align: center;
  margin: 12px auto 24px;
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 18px 22px;
  box-sizing: border-box;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.voice-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.voice-transcript-user {
  font-size: 14px;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-transcript-assistant {
  font-size: 18px;
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.55;
  width: 100%;
  max-height: 130px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  text-align: center;
  padding: 4px 0;
  word-break: break-word;
}

.voice-transcript-assistant::-webkit-scrollbar {
  display: none;
}

/* Live Word-by-word streaming & highlight effect */
.voice-word {
  display: inline;
  transition: color 0.15s ease, opacity 0.15s ease, text-shadow 0.15s ease;
  color: rgba(255, 255, 255, 0.35);
}

.voice-word.spoken {
  color: #ffffff;
  opacity: 1;
}

.voice-word.active {
  color: #38bdf8;
  font-weight: 600;
  opacity: 1;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.9);
}

/* Voice Bottom Controls */
.voice-modal-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.voice-control-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.voice-control-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.voice-control-btn.muted {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.voice-end-call-btn {
  height: 56px;
  padding: 0 28px;
  border-radius: 28px;
  background: #dc2626;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
  transition: all 0.2s;
}

.voice-end-call-btn:hover {
  background: #b91c1c;
  transform: scale(1.03);
}

/* ==========================================
   Admin Panel Action Buttons (SVG icons)
   ========================================== */
.action-btn-small {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0;
  transition: all 0.15s;
}
.action-btn-small:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.08);
}
.action-btn-small svg { pointer-events: none; }

/* ==========================================
   Mobile Responsive — Admin Panel
   ========================================== */
@media (max-width: 768px) {
  .admin-modal-card, .admin-modal-card.luxury-admin {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  .admin-modal-header {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-header-title h2 { font-size: 14px; }
  .admin-header-logo { width: 28px !important; height: 28px !important; }
  .admin-nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    gap: 4px;
    scrollbar-width: none;
  }
  .admin-nav-tabs::-webkit-scrollbar { display: none; }
  .admin-tab-btn {
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .admin-tab-btn .tab-icon { display: none; }
  .admin-modal-body { padding: 14px 10px; }
  .admin-stats-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .admin-stat-num { font-size: 20px; }
  .admin-stat-label { font-size: 11px; }
  .admin-stat-box { padding: 12px; }
  .admin-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 600px; font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .admin-search-wrap { width: 100%; }
  .admin-search-input { width: 100%; font-size: 13px; }
  .admin-table-toolbar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch !important;
  }
  .admin-toolbar-actions { width: 100%; }
  .admin-grant-card, .smtp-config-card { padding: 16px !important; }
  .smtp-fields-grid { grid-template-columns: 1fr !important; }
  .admin-chats-split {
    flex-direction: column !important;
    height: auto !important;
  }
  .admin-chats-list { max-height: 40vh; overflow-y: auto; }
  .admin-chat-viewer { min-height: 200px; }
  .table-user-cell { gap: 6px; }
  .table-avatar { width: 28px; height: 28px; font-size: 12px; }
  .user-cell-name { font-size: 12px; }
  .user-cell-id { font-size: 10px; }
  .email-cell { font-size: 11px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .table-actions { gap: 3px !important; }
  .action-btn-small { width: 26px; height: 26px; font-size: 12px; }
}

/* Image Gen Card mobile */
@media (max-width: 768px) {
  .image-gen-card { max-width: 100%; border-radius: 12px; }
  .image-gen-header { padding: 8px 10px; gap: 6px; }
  .image-gen-badge { font-size: 9px; padding: 2px 8px; }
  .image-gen-prompt { font-size: 11px; }
  .image-gen-actions { padding: 8px 10px; gap: 6px; }
  .image-gen-btn { padding: 6px 10px; font-size: 11.5px; }
  .image-watermark-tag { font-size: 10px; padding: 3px 8px; bottom: 6px; right: 6px; }
}

/* Broadcast form mobile */
@media (max-width: 768px) {
  .broadcast-audience-bar { flex-direction: column; gap: 6px; align-items: flex-start !important; }
}
