/* ═══════════════════════════════════════════════════════════════════════════
   Arka AI — Clean, Solid, Premium Stylesheet
   Inspired by Claude.ai / Linear.app — No blur, no glass, solid surfaces
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --accent: #e8622a;
  --accent-hover: #d4521e;
  --accent-soft: #2a1a10;
  --accent-text: #ffffff;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.15s var(--ease);
  --t-base: 0.25s var(--ease);
  --t-slow: 0.4s var(--ease);

  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --r-xl: 20px; --r-2xl: 24px;
  --r-full: 9999px;
  --sidebar-w: 240px;
  --danger: #e05252;
  --success: #4caf82;
  --gold: #c9a84c;
}

/* ─── Dark Theme (default) ───────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg: #0c0c0c;
  --surface: #141414;
  --surface2: #1c1c1c;
  --surface3: #222222;
  --border: #2a2a2a;
  --border-strong: #333333;
  --text: #f0ece6;
  --text2: #8a8580;
  --text3: #555050;
  --text-inverse: #0c0c0c;
  --code-bg: #111111;
  --scrollbar-thumb: rgba(255,255,255,0.08);
  --scrollbar-thumb-hover: rgba(255,255,255,0.15);
  --msg-user: #e8622a;
  --msg-ai: #141414;
  --sidebar-bg: #141414;
  --hover-bg: #222222;
  --active-bg: #1c1c1c;
  --text-primary: #f0ece6;
  --text-secondary: #8a8580;
  --text-muted: #555050;
  --border-subtle: #2a2a2a;
  --accent-gradient: #e8622a;
  --accent-gradient-text: #e8622a;
  --shadow-sm: none;
  --shadow-lg: none;
}

/* ─── Light Theme ────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg: #faf8f5;
  --surface: #f2efe9;
  --surface2: #eae7e0;
  --surface3: #e3dfd8;
  --border: #ddd9d2;
  --border-strong: #ccc8c0;
  --text: #1a1714;
  --text2: #6b6560;
  --text3: #9a9590;
  --text-inverse: #ffffff;
  --accent: #e8622a;
  --accent-hover: #d4521e;
  --accent-soft: #fdf0ea;
  --accent-text: #ffffff;
  --code-bg: #f0eeea;
  --scrollbar-thumb: rgba(0,0,0,0.08);
  --scrollbar-thumb-hover: rgba(0,0,0,0.14);
  --danger: #cc4444;
  --success: #3d9e6e;
  --gold: #b8922a;
  --msg-user: #e8622a;
  --msg-ai: #f2efe9;
  --sidebar-bg: #f2efe9;
  --hover-bg: #e3dfd8;
  --active-bg: #eae7e0;
  --text-primary: #1a1714;
  --text-secondary: #6b6560;
  --text-muted: #9a9590;
  --border-subtle: #ddd9d2;
  --accent-gradient: #e8622a;
  --accent-gradient-text: #e8622a;
  --shadow-sm: none;
  --shadow-lg: none;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  transition: background var(--t-base), color var(--t-base);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
::selection { background: var(--accent-soft); color: var(--accent); }

/* ═══ AMBIENT BACKGROUND — hidden, no blobs ═══ */
.ambient-bg { display: none; }
.blob, .blob-1, .blob-2, .blob-3 { display: none; }

/* ═══ LAYOUT ═══ */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--t-base);
}

.sidebar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header / Logo */
.sidebar-header {
  padding: 18px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-xs);
  transition: all var(--t-fast);
}
.sidebar-close-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

/* New Chat Button */
.new-chat-btn {
  margin: 4px 12px 12px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background var(--t-fast);
}
.new-chat-btn:hover {
  background: var(--accent-hover);
}
.new-chat-btn:active {
  opacity: 0.9;
}

/* Sidebar section */
.sidebar-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-section-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}

/* Chat list */
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.chat-list-item {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1px;
  transition: all var(--t-fast);
  position: relative;
}
.chat-list-item:hover {
  background: var(--surface2);
}
.chat-list-item.active {
  background: var(--accent-soft);
}
.chat-list-item .chat-icon {
  font-size: 14px;
  color: var(--text3);
  flex-shrink: 0;
}
.chat-list-item .chat-title {
  flex: 1;
  font-size: 12.5px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.chat-list-item.active .chat-title {
  color: var(--text);
}

/* Star badge */
.chat-star-badge {
  font-size: 11px;
  color: var(--gold, #c9a84c);
  flex-shrink: 0;
  line-height: 1;
}

/* 3-dot button */
.chat-dots-btn {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all var(--t-fast);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.chat-list-item:hover .chat-dots-btn { opacity: 1; }
.chat-dots-btn:hover { background: var(--hover-bg); color: var(--text); }

/* Inline rename input */
.chat-rename-input {
  flex: 1;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  outline: none;
  font-family: var(--font-sans);
  min-width: 0;
}

/* Context menu */
.chat-context-menu {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px;
  min-width: 160px;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity .15s ease, transform .15s ease;
}
.chat-context-menu.open {
  opacity: 1;
  transform: scale(1);
}
.chat-ctx-item {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  transition: background .12s;
  font-family: var(--font-sans);
}
.chat-ctx-item:hover { background: var(--hover-bg); }
.chat-ctx-item.danger { color: var(--danger); }
.chat-ctx-item.danger:hover { background: rgba(224,82,82,0.1); }
.chat-ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}


/* Sidebar Footer */
.sidebar-footer {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: visible;
}

.sidebar-footer-btn {
  padding: 7px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text3);
  background: none;
  border: none;
  font-family: var(--font-sans);
  transition: all var(--t-fast);
  width: 100%;
  text-align: left;
}
.sidebar-footer-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-footer-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.sidebar-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 0;
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: all var(--t-base);
  display: flex;
  align-items: center;
  padding: 0;
}

.theme-toggle-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: var(--accent);
  transition: transform var(--t-base);
}
[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.theme-toggle-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 24px;
  color: var(--text3);
  transition: opacity var(--t-fast);
}
.dark-icon { left: 2px; }
.light-icon { right: 2px; }

[data-theme="dark"] .dark-icon { opacity: 0; }
[data-theme="dark"] .light-icon { opacity: 0.5; }
[data-theme="light"] .dark-icon { opacity: 0.5; }
[data-theme="light"] .light-icon { opacity: 0; }

/* User Avatar */
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* ─── Top Bar ────────────────────────────────────────────────────────────── */
.top-bar {
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 10;
  background-image: linear-gradient(to right, transparent, var(--border), transparent);
  background-size: 100% 1px;
  background-position: bottom;
  background-repeat: no-repeat;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: -0.2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-xs);
  transition: all var(--t-fast);
  font-size: 20px;
}
.menu-toggle:hover {
  background: var(--surface2);
  color: var(--text);
}

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

/* ─── Model Selector ─────────────────────────────────────────────────────── */
.model-selector-wrapper {
  position: relative;
}

.model-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 10px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t-fast);
}
.model-selector:hover {
  border-color: var(--accent);
  color: var(--text);
}
.model-selector.open {
  border-color: var(--accent);
}

.model-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.model-selector-label {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selector-chevron {
  font-size: 16px !important;
  opacity: 0.5;
  transition: transform var(--t-fast);
}
.model-selector.open .selector-chevron {
  transform: rotate(180deg);
}

/* Model Dropdown */
.model-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--t-fast);
}
.model-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.model-dropdown-group {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.model-dropdown-group:last-child {
  border-bottom: none;
}

.model-dropdown-group-label {
  padding: 6px 12px 3px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.model-dropdown-group-label .provider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.provider-dot.nvidia     { background: #76b900; }
.provider-dot.openrouter { background: #6366f1; }
.provider-dot.openai     { background: #10a37f; }
.provider-dot.google     { background: #4285f4; }
.provider-dot.anthropic  { background: #d97706; }

.model-dropdown-item {
  padding: 6px 12px 6px 22px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.model-dropdown-item:hover {
  background: var(--surface2);
  color: var(--text);
}
.model-dropdown-item.active {
  color: var(--accent);
  font-weight: 500;
}
.model-dropdown-item .check-icon {
  font-size: 15px;
  opacity: 0;
}
.model-dropdown-item.active .check-icon {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  scroll-behavior: smooth;
}

.chat-messages {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── Welcome Screen ────────────────────────────────────────────────────── */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  text-align: center;
  padding: 40px 20px;
  animation: welcomeFade 0.7s ease-out;
}

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

.welcome-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-orb::before {
  display: none;
}
.welcome-orb::after {
  display: none;
}

@keyframes orbBreath { 0%, 100% { transform: none; } }
@keyframes orbRing { to { transform: none; } }

.welcome-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.welcome-title em {
  font-style: italic;
  color: var(--accent);
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 36px;
  max-width: 380px;
  line-height: 1.5;
}

/* Suggestion Cards (2x2) */
.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 480px;
  width: 100%;
}

.suggestion-card {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: all var(--t-base);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  position: relative;
  overflow: hidden;
}
.suggestion-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
  opacity: 0.3;
  pointer-events: none;
}
.suggestion-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
}
.suggestion-card:active {
  opacity: 0.9;
}

.card-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.card-icon svg {
  color: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}

/* SVG icon alignment in dropdown items */
.user-dropdown-item svg,
.occ-pill svg,
.guidelines-section h3 svg {
  color: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.card-desc {
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.35;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MESSAGE BUBBLES
   ═══════════════════════════════════════════════════════════════════════════ */
.message {
  display: flex;
  gap: 10px;
  max-width: 100%;
  animation: msgIn 0.3s ease-out;
}

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

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 3px;
}
.message.user .message-avatar {
  background: var(--accent);
  color: white;
  font-size: 12px;
}
.message.ai .message-avatar {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 14px;
}

.message-body {
  max-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message-content {
  padding: 10px 14px;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

.message.user .message-content {
  background: var(--accent);
  color: #ffffff;
  border-radius: 12px 12px 2px 12px;
}

.message.ai .message-content {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px 12px 12px 2px;
}

/* ─── Markdown in AI messages ────────────────────────────────────────────── */
.message.ai .message-content h1,
.message.ai .message-content h2,
.message.ai .message-content h3 {
  font-family: var(--font-sans);
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--text);
}
.message.ai .message-content h1 { font-size: 17px; }
.message.ai .message-content h2 { font-size: 15.5px; }
.message.ai .message-content h3 { font-size: 14.5px; }

.message.ai .message-content p {
  margin-bottom: 6px;
}
.message.ai .message-content p:last-child {
  margin-bottom: 0;
}

.message.ai .message-content ul,
.message.ai .message-content ol {
  padding-left: 18px;
  margin-bottom: 6px;
}
.message.ai .message-content li {
  margin-bottom: 3px;
}

.message.ai .message-content code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.message.ai .message-content pre {
  background: var(--code-bg);
  padding: 12px 14px;
  border-radius: var(--r-sm);
  margin: 8px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  position: relative;
}
.message.ai .message-content pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 12.5px;
  line-height: 1.5;
}

.message.ai .message-content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--text2);
  font-style: italic;
}

.message.ai .message-content a {
  color: var(--accent);
  text-decoration: none;
}
.message.ai .message-content a:hover {
  text-decoration: underline;
}

.message.ai .message-content strong {
  color: var(--text);
  font-weight: 600;
}

.message.ai .message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
}
.message.ai .message-content th,
.message.ai .message-content td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.message.ai .message-content th {
  background: var(--surface2);
  font-weight: 600;
}

/* Message meta */
.message-meta {
  font-size: 10.5px;
  color: var(--text3);
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.message.user .message-meta {
  justify-content: flex-end;
}

/* Code copy button */
.code-copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 10px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--t-fast);
  opacity: 0;
}
.message.ai .message-content pre:hover .code-copy-btn {
  opacity: 1;
}
.code-copy-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Image in messages */
.message-image {
  max-width: 280px;
  max-height: 180px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.message-image:hover {
  transform: scale(1.02);
}

/* ─── Typing Indicator ───────────────────────────────────────────────────── */
.typing-indicator {
  display: flex;
  gap: 10px;
  animation: msgIn 0.3s ease-out;
}

.typing-dots {
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: dotBounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   INPUT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.input-area {
  padding: 12px 24px 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.input-container {
  max-width: 740px;
  margin: 0 auto;
}

/* Attachment Preview */
.attachment-preview {
  display: none;
  padding: 0 0 8px;
}
.attachment-preview.has-image {
  display: block;
}
.attachment-thumb {
  position: relative;
  display: inline-block;
}
.attachment-thumb img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.attachment-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: 2px solid var(--bg);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast);
}
.attachment-remove:hover {
  transform: scale(1.1);
}

/* Input wrapper */
.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 5px 5px 5px 4px;
  transition: all var(--t-fast);
}
.input-wrapper:focus-within {
  border-color: var(--accent);
}

.message-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  max-height: 140px;
  min-height: 22px;
  padding: 6px 8px;
}
.message-input::placeholder {
  color: var(--text3);
}

.input-action-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 18px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.input-action-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.send-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.send-btn:hover {
  background: var(--accent-hover);
}
.send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.input-disclaimer {
  text-align: center;
  font-size: 10.5px;
  color: var(--text3);
  margin-top: 7px;
  letter-spacing: 0.1px;
}

/* Hidden file input */
#imageUpload {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   OVERLAYS & MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
}

/* Image lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 500;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.active {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

/* ─── Toast Notifications ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toast {
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  animation: toastIn 0.25s ease-out;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.toast.success {
  border-color: rgba(52, 211, 153, 0.3);
  color: #34d399;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  .sidebar-close-btn {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .welcome-title {
    font-size: 28px;
  }
  .welcome-subtitle {
    font-size: 14px;
  }
  .welcome-orb {
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
  }

  .chat-messages {
    padding: 0 14px;
  }
  .input-area {
    padding: 10px 14px 14px;
  }

  .message-body {
    max-width: 85%;
  }

  .top-bar {
    padding: 0 14px;
  }

  .model-selector-label {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .suggestion-card {
    padding: 10px;
  }
  .card-icon-wrap {
    width: 30px;
    height: 30px;
  }
  .card-icon {
    font-size: 15px;
  }
  .message-body {
    max-width: 92%;
  }
  .model-selector-label {
    max-width: 90px;
  }
  .top-bar-title {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.login-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  text-align: center;
  max-width: 380px;
  width: 90%;
  animation: loginFadeIn 0.8s var(--ease) both;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes appFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.app-fade-in {
  animation: appFadeIn 0.3s ease forwards;
}

/* Orb on login */
.login-orb {
  width: 80px;
  height: 80px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-orb::after {
  content: '';
  width: 32px;
  height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2 C12 2 13.5 8 16 10 C18.5 12 24 12 24 12 C24 12 18.5 12 16 14 C13.5 16 12 22 12 22 C12 22 10.5 16 8 14 C5.5 12 0 12 0 12 C0 12 5.5 12 8 10 C10.5 8 12 2 12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  position: absolute;
}
.login-orb .orb-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
}

.login-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.login-title em {
  font-style: italic;
  color: var(--accent);
}

.login-subtitle {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text2);
  margin-bottom: 36px;
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 32px;
  border: none;
  border-radius: var(--r-sm);
  background: #ffffff;
  color: #1a1a2e;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}
.google-login-btn:hover {
  background: #f0f0f0;
}
.google-login-btn:active {
  transform: scale(0.98);
}

.login-footer-text {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-sans);
}

.login-theme-toggle {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR USER PROFILE AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar-user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
}
.sidebar-user-area:hover {
  background: var(--surface2);
}

.sidebar-user-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

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

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: var(--r-full);
  width: fit-content;
}

.free-badge {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 5px;
}

.pro-badge {
  color: var(--gold);
  border: 1px solid var(--gold);
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 5px;
}

.sidebar-user-chevron {
  color: var(--text3);
  flex-shrink: 0;
  transition: transform var(--t-fast);
}
.sidebar-user-area.open .sidebar-user-chevron {
  transform: rotate(180deg);
}

/* Upgrade button */
.upgrade-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 6px;
}
.upgrade-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.upgrade-btn.hidden { display: none; }

/* User dropdown — Claude-style popup menu */
.user-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 4px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, visibility .2s, transform .2s cubic-bezier(.22,1,.36,1);
  z-index: 1100;
  pointer-events: none;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.user-dropdown-email {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMAGE USAGE BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.image-usage-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.image-usage-badge.hidden { display: none; }
.image-usage-badge.limit-reached {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UPGRADE MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.upgrade-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
}
.upgrade-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.upgrade-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform var(--t-slow);
}
.upgrade-modal-overlay.open .upgrade-modal {
  transform: scale(1) translateY(0);
}

.upgrade-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.upgrade-modal-close:hover {
  background: var(--surface3);
  color: var(--text);
}

.upgrade-modal-orb {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.upgrade-modal-orb::after {
  content: '';
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2 C12 2 13.5 8 16 10 C18.5 12 24 12 24 12 C24 12 18.5 12 16 14 C13.5 16 12 22 12 22 C12 22 10.5 16 8 14 C5.5 12 0 12 0 12 C0 12 5.5 12 8 10 C10.5 8 12 2 12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  position: absolute;
}

.upgrade-modal-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.upgrade-modal-title em {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.upgrade-modal-subtitle {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 28px;
}

.upgrade-benefits {
  list-style: none;
  padding: 0;
  text-align: left;
  margin-bottom: 28px;
}
.upgrade-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-sans);
  border-bottom: 1px solid var(--border-subtle);
}
.upgrade-benefits li:last-child { border-bottom: none; }

.benefit-icon {
  color: var(--accent);
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.coming-soon-chip {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-full);
  margin-left: 4px;
}

.upgrade-cta {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: white;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast);
}
.upgrade-cta:hover {
  background: var(--accent-hover);
}

.upgrade-dismiss {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  background: none;
  color: var(--text3);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: color var(--t-fast);
}
.upgrade-dismiss:hover {
  color: var(--text2);
}

/* ─── App Fade In ────────────────────────────────────────────────────────── */
.app-container.fade-in {
  animation: appFadeIn 0.5s var(--ease) both;
}
@keyframes appFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Disabled image button ──────────────────────────────────────────────── */
.input-action-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* SETTINGS PANEL — Full-screen, sidebar navigation                          */
/* ═══════════════════════════════════════════════════════════════════════════ */

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.settings-overlay.active {
  opacity: 1;
  visibility: visible;
}

.settings-modal {
  position: relative;
  width: 95%;
  max-width: 900px;
  height: 85vh;
  max-height: 85vh;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: row;
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,.18);
}
.settings-overlay.active .settings-modal {
  transform: translateY(0) scale(1);
}

/* Close button — top right of modal */
.settings-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--hover-bg);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.settings-close:hover {
  background: var(--active-bg);
  color: var(--text-primary);
}

/* ─── Left Sidebar ─────────────────────────────────────────────────── */
.settings-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 28px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--sidebar-bg);
}
.settings-sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px 8px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: .875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
  white-space: nowrap;
}
.settings-nav-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.settings-nav-item.active {
  background: var(--active-bg);
  color: var(--accent);
  font-weight: 600;
}
.settings-nav-item svg {
  flex-shrink: 0;
  opacity: .7;
}
.settings-nav-item.active svg {
  opacity: 1;
  stroke: var(--accent);
}

/* ─── Right Content Area ───────────────────────────────────────────── */
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
  scroll-behavior: smooth;
}

/* Panes */
.settings-pane {
  display: none;
  animation: settingsFadeIn .25s ease;
}
.settings-pane.active {
  display: block;
}
@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section header */
.settings-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.settings-section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hover-bg);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}
.settings-section-icon svg { stroke: var(--accent); }
.settings-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.settings-section-subtitle {
  font-size: .82rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

/* Subsection title */
.settings-subsection-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 28px 0 14px;
}
.settings-subsection-title.danger-title {
  color: #ef4444;
}

/* Divider */
.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ─── Fields ───────────────────────────────────────────────────────── */
.settings-field {
  margin-bottom: 22px;
}
.settings-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.settings-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.settings-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,98,42,.08);
}
.settings-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.settings-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,98,42,.08);
}
.settings-subtext {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}
.guidelines-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.guidelines-link:hover {
  color: var(--accent-hover);
}

/* Occupation pills */
.occupation-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.occ-pill {
  padding: 7px 14px;
  font-size: .8rem;
  font-family: 'Inter', sans-serif;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.occ-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--hover-bg);
}
.occ-pill.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.occ-other-input {
  margin-top: 10px;
}

/* Toggle switch */
.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.settings-toggle-info {
  flex: 1;
}
.settings-toggle-label {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.settings-toggle-desc {
  display: block;
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Action button (inline) */
.settings-action-btn {
  padding: 8px 18px;
  font-size: .82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-primary);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.settings-action-btn:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
}
.settings-action-btn.danger-outlined {
  color: #ef4444;
  border-color: rgba(239,68,68,.3);
}
.settings-action-btn.danger-outlined:hover {
  background: rgba(239,68,68,.08);
  border-color: #ef4444;
}

/* Settings footer (inside pane) */
.settings-footer {
  padding: 20px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.settings-save-btn {
  padding: 10px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.settings-save-btn:hover {
  background: var(--accent-hover);
}
.settings-save-btn:active {
  transform: scale(.97);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ACCOUNT TAB                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* User card */
.account-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
}
.account-user-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.account-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.account-user-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-user-email {
  font-size: .8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-plan-badge {
  padding: 4px 12px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

/* Connected account row */
.account-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.account-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-row-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.account-row-sub {
  display: block;
  font-size: .78rem;
  color: var(--text-secondary);
}
.account-connected-tag {
  font-size: .78rem;
  font-weight: 600;
  color: #22c55e;
  padding: 4px 10px;
  background: rgba(34,197,94,.08);
  border-radius: 6px;
}

/* Account info table */
.account-info-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.account-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.account-info-row:last-child { border-bottom: none; }
.account-info-label {
  font-size: .82rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.account-info-value {
  font-size: .82rem;
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-uid {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .75rem;
  padding: 3px 8px;
  background: var(--surface);
  border-radius: 4px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hover-bg);
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.account-copy-btn:hover {
  background: var(--active-bg);
  color: var(--accent);
}
.account-plan-badge-sm {
  padding: 3px 10px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
}

/* Session card */
.session-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}
.session-row.no-border { border-bottom: none; }
.session-label {
  font-size: .82rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.session-label svg {
  flex-shrink: 0;
  opacity: .6;
}
.session-value {
  font-size: .82rem;
  color: var(--text-primary);
  font-weight: 500;
}
.session-badge-active {
  font-size: .75rem;
  font-weight: 600;
  color: #22c55e;
  padding: 3px 10px;
  background: rgba(34,197,94,.08);
  border-radius: 6px;
}

/* Usage stats grid */
.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.usage-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}
.usage-stat-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
}
.usage-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Danger zone */
.danger-zone-card {
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 10px;
  overflow: hidden;
}
.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(239,68,68,.12);
  gap: 16px;
}
.danger-row.no-border { border-bottom: none; }
.danger-row-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.danger-row-desc {
  display: block;
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.danger-btn {
  padding: 8px 16px;
  font-size: .8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.danger-btn.outlined {
  background: none;
  border: 1px solid rgba(239,68,68,.35);
  color: #ef4444;
}
.danger-btn.outlined:hover {
  background: rgba(239,68,68,.08);
  border-color: #ef4444;
}
.danger-btn.filled {
  background: #ef4444;
  border: 1px solid #ef4444;
  color: #fff;
}
.danger-btn.filled:hover {
  background: #dc2626;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* PRIVACY TAB                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.privacy-intro {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Expandable sections */
.expandable-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.expandable-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: none;
  font-size: .88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  transition: background .15s;
}
.expandable-header:hover {
  background: var(--hover-bg);
}
.expandable-chevron {
  transition: transform .25s;
  flex-shrink: 0;
  opacity: .5;
}
.expandable-section.open .expandable-chevron {
  transform: rotate(90deg);
}
.expandable-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  padding: 0 18px;
}
.expandable-section.open .expandable-body {
  max-height: 400px;
  padding: 4px 18px 16px;
}
.expandable-body ul {
  margin: 0;
  padding-left: 18px;
}
.expandable-body li {
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BILLING TAB                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Plan card */
.billing-plan-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}
.billing-plan-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  border-radius: 12px;
  color: #fff;
  flex-shrink: 0;
}
.billing-plan-icon svg { stroke: #fff; }
.billing-plan-info { flex: 1; }
.billing-plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.billing-plan-sub {
  font-size: .8rem;
  color: var(--text-secondary);
  margin: 0;
}
.billing-upgrade-btn {
  padding: 9px 20px;
  font-size: .82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.billing-upgrade-btn:hover {
  background: var(--accent-hover);
}

/* Billing features list */
.billing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.billing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-primary);
}

/* Pro benefits grid */
.pro-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.pro-benefit-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  transition: border-color .2s, transform .15s;
}
.pro-benefit-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.pro-benefit-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hover-bg);
  border-radius: 8px;
  margin-bottom: 10px;
  color: var(--accent);
}
.pro-benefit-icon svg { stroke: var(--accent); }
.pro-benefit-card h5 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.pro-benefit-card p {
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}
.pro-coming-soon {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  background: rgba(232,98,42,.1);
  color: var(--accent);
  border-radius: 4px;
  margin-top: 8px;
}

/* Pricing card */
.pricing-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
}
.pricing-toggle {
  display: inline-flex;
  background: var(--hover-bg);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 20px;
}
.pricing-toggle-btn {
  padding: 7px 18px;
  font-size: .8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.pricing-toggle-btn.active {
  background: var(--sidebar-bg);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.pricing-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.pricing-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pricing-price span {
  font-size: .9rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.pricing-sub {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.pricing-cta {
  display: inline-block;
  padding: 12px 36px;
  font-size: .9rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  margin-bottom: 14px;
}
.pricing-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,98,42,.25);
}
.pricing-note {
  font-size: .75rem;
  color: var(--text-secondary);
  opacity: .7;
  margin: 0;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* APPEARANCE TAB                                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Font size pills */
.font-size-pills {
  display: flex;
  gap: 8px;
}
.font-pill {
  padding: 8px 20px;
  font-size: .82rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.font-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.font-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* EXPORT DATA MODAL                                                          */
/* ═══════════════════════════════════════════════════════════════════════════ */

.export-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.export-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.export-modal {
  width: 95%;
  max-width: 420px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.export-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.export-modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.export-modal-sub {
  font-size: .84rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.export-filter-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.export-pill {
  padding: 6px 16px;
  font-size: .78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.export-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.export-includes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.export-include-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--text-primary);
}
.export-include-item span {
  color: var(--text-secondary);
  font-size: .78rem;
}
.export-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* SETTINGS — RESPONSIVE                                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 700px) {
  .settings-modal {
    flex-direction: column;
    height: 95vh;
    max-height: 95vh;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
  }
  .settings-sidebar {
    width: 100%;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px 12px 0;
    gap: 0;
  }
  .settings-sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    margin-left: 4px;
  }
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav-item {
    padding: 8px 14px;
    font-size: .8rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    gap: 6px;
    flex-shrink: 0;
  }
  .settings-nav-item.active {
    background: none;
    border-bottom-color: var(--accent);
  }
  .settings-nav-item:hover {
    background: none;
  }
  .settings-content {
    padding: 20px 16px;
  }
  .settings-close {
    top: 12px;
    right: 12px;
  }
  .pro-benefits-grid {
    grid-template-columns: 1fr;
  }
  .usage-stats-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .danger-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .account-user-card {
    flex-wrap: wrap;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* VYOMA'S GUIDELINES MODAL                                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */

.guidelines-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.guidelines-overlay.active {
  opacity: 1;
  visibility: visible;
}

.guidelines-modal {
  width: 95%;
  max-width: 640px;
  max-height: 85vh;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.guidelines-overlay.active .guidelines-modal {
  transform: translateY(0) scale(1);
}

.guidelines-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.guidelines-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.guidelines-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--hover-bg);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.guidelines-close:hover {
  background: var(--active-bg);
  color: var(--text-primary);
}

.guidelines-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.guidelines-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 4px;
}
.guidelines-effective {
  font-size: .8rem;
  color: var(--text-muted, var(--text-secondary));
  opacity: .6;
  margin: 0 0 24px;
}

.guidelines-section {
  margin-bottom: 24px;
}
.guidelines-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.guidelines-section p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 6px;
}
.guidelines-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.guidelines-section li {
  font-size: .875rem;
  color: var(--text-secondary);
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.5;
}
.guidelines-section li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: bold;
}
.guidelines-section a {
  color: var(--accent);
}
.guidelines-section a:hover {
  text-decoration: underline;
}

.guidelines-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.guidelines-close-btn {
  padding: 10px 40px;
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.guidelines-close-btn:hover {
  background: var(--active-bg);
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* UPDATED PROFILE POPUP MENU                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.user-dropdown .upgrade-menu-item {
  color: var(--accent);
}

/* Dropdown items — refined layout */
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.user-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--text2);
  flex-shrink: 0;
}
.user-dropdown-item:hover {
  background: var(--hover-bg);
}
.user-dropdown-item .shortcut-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-sans);
}
.user-dropdown-item .submenu-arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--text3);
}
.user-dropdown-item.sign-out-item {
  color: var(--danger);
}
.user-dropdown-item.sign-out-item svg {
  color: var(--danger);
}
.user-dropdown-item.sign-out-item:hover {
  background: rgba(224, 82, 82, 0.08);
}

/* ─── Submenus (Language / Learn More) ───────────────────────────────────── */
.dropdown-submenu {
  position: absolute;
  left: calc(100% + 4px);
  top: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  z-index: 1200;
  pointer-events: none;
}
.dropdown-submenu.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}
.dropdown-submenu.right-overflow {
  left: auto;
  right: calc(100% + 4px);
  transform: translateX(4px);
}
.dropdown-submenu.right-overflow.open {
  transform: translateX(0);
}

.submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}
.submenu-item:hover {
  background: var(--hover-bg);
}
.submenu-item .lang-check {
  width: 16px;
  text-align: center;
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}
.submenu-item .external-icon {
  margin-left: auto;
  color: var(--text3);
  flex-shrink: 0;
}

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

/* ═══════════════════════════════════════════════════════════════════════════ */
/* KEYBOARD SHORTCUTS MODAL                                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.shortcuts-overlay.active {
  opacity: 1;
  visibility: visible;
}

.shortcuts-modal {
  width: 95%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.shortcuts-overlay.active .shortcuts-modal {
  transform: translateY(0) scale(1);
}

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.shortcuts-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.shortcuts-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--hover-bg);
  border-radius: 8px;
  color: var(--text2);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.shortcuts-close:hover {
  background: var(--active-bg);
  color: var(--text);
}

.shortcuts-body {
  padding: 16px 24px 24px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.shortcut-row:last-child {
  border-bottom: none;
}
.shortcut-action {
  font-size: 14px;
  color: var(--text);
}
.shortcut-keys {
  display: flex;
  gap: 4px;
}
kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  line-height: 1.3;
}


/* ─── Responsive for new components ──────────────────────────────────────── */
@media (max-width: 768px) {
  .login-title { font-size: 2.4rem; }
  .upgrade-modal { padding: 28px 24px; }
  .image-usage-badge { font-size: 10px; padding: 3px 8px; }

  .settings-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .settings-tabs {
    padding: 12px 16px 0;
  }
  .settings-tab {
    padding: 8px 12px;
    font-size: .8rem;
  }
  .settings-body {
    padding: 16px;
  }
  .settings-header {
    padding: 16px 16px 0;
  }
  .settings-footer {
    padding: 12px 16px;
  }

  .guidelines-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .guidelines-body {
    padding: 16px;
  }

  /* Submenus on mobile — position above/below instead of side */
  .dropdown-submenu {
    position: fixed;
    left: 8px !important;
    right: 8px !important;
    bottom: 80px !important;
    top: auto !important;
    min-width: auto;
    max-height: 60vh;
    overflow-y: auto;
  }
  .dropdown-submenu.right-overflow {
    left: 8px !important;
    right: 8px !important;
  }

  /* Shortcuts modal — full width on mobile */
  .shortcuts-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* HELP CENTER PANEL                                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */
.help-panel-backdrop {
  position: fixed; inset: 0; z-index: 9998;
  display: none;
}
.help-panel-backdrop.open { display: block; }

.help-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 380px; height: 560px; max-height: 80vh;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
  pointer-events: none;
}
.help-panel.open {
  opacity: 1; visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.help-panel-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.15);
  border: none; border-radius: 50%;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.help-panel-close:hover { background: rgba(255,255,255,0.25); }

/* Views */
.help-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Home header (orange) */
.help-home-header {
  background: var(--accent);
  padding: 24px 20px 20px;
  flex-shrink: 0;
}
.help-home-title {
  color: white; font-size: 22px; font-weight: 600;
  margin: 12px 0 4px; font-family: var(--font-sans);
}
.help-home-subtitle {
  color: rgba(255,255,255,0.85); font-size: 16px; margin: 0;
  font-family: var(--font-sans);
}

/* Home body */
.help-home-body { flex: 1; overflow-y: auto; }

/* Status card */
.help-status-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px;
  display: flex; align-items: center; gap: 10px;
}
.help-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%,100% { opacity: 1; } 50% { opacity: .5; }
}
.help-status-text { font-size: 13px; font-weight: 500; color: var(--text); }
.help-status-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* Send message button */
.help-message-btn {
  margin: 0 16px;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; text-decoration: none; color: var(--text);
  font-size: 14px; font-weight: 500; font-family: var(--font-sans);
  transition: border-color .15s;
}
.help-message-btn:hover { border-color: var(--accent); }

/* Search bar */
.help-search-bar {
  margin: 12px 16px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text2);
}
.help-search-bar input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 14px; font-family: var(--font-sans);
  color: var(--text);
}
.help-search-bar input::placeholder { color: var(--text3); }

/* FAQ label */
.help-faq-label {
  margin: 16px 16px 8px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
}

/* FAQ items */
.help-faq-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: 14px; color: var(--text);
  font-family: var(--font-sans);
  transition: background .15s, color .15s;
}
.help-faq-item:hover { background: var(--hover-bg); color: var(--accent); }
.help-faq-item svg { flex-shrink: 0; color: var(--text3); }

/* Help tab header */
.help-help-header {
  padding: 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.help-help-search {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text2);
}
.help-help-search input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 14px; font-family: var(--font-sans); color: var(--text);
}
.help-help-search input::placeholder { color: var(--text3); }

/* Collections */
.help-collections-body { flex: 1; overflow-y: auto; }
.help-collection-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background .15s;
}
.help-collection-item:hover { background: var(--hover-bg); }
.help-collection-title { font-size: 14px; font-weight: 500; color: var(--text); }
.help-collection-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.help-collection-meta {
  text-align: right; flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
}
.help-collection-count { font-size: 12px; color: var(--text3); white-space: nowrap; }

/* Article view */
.help-article-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.help-article-back {
  width: 32px; height: 32px;
  border: none; background: var(--hover-bg);
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: background .15s, color .15s;
}
.help-article-back:hover { background: var(--surface2); color: var(--text); }
.help-article-header-title {
  font-size: 14px; font-weight: 600; color: var(--text);
}
.help-article-body {
  flex: 1; overflow-y: auto; padding: 20px;
}
.help-article-body h3 {
  font-size: 16px; font-weight: 600; margin: 0 0 12px;
  color: var(--text); font-family: var(--font-sans);
}
.help-article-body p {
  font-size: 14px; line-height: 1.7; color: var(--text2);
  margin: 0; font-family: var(--font-sans);
}

/* Tab bar */
.help-tab-bar {
  display: flex; border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--surface);
}
.help-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 10px 0;
  border: none; background: none;
  color: var(--text2); cursor: pointer;
  font-size: 11px; font-family: var(--font-sans);
  transition: color .15s;
}
.help-tab:hover { color: var(--text); }
.help-tab.active { color: var(--accent); }
.help-tab.active svg { stroke: var(--accent); }

/* Mobile */
@media (max-width: 768px) {
  .help-panel {
    bottom: 0; right: 0; left: 0;
    width: 100%; height: 100%; max-height: 100%;
    border-radius: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* FONT SIZE & COMPACT MODE (Appearance settings)                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
html.font-small .message-text { font-size: 13px; }
html.font-medium .message-text { font-size: 15px; }
html.font-large .message-text { font-size: 17px; }

html.compact-mode .message-row { padding: 10px 0; }
html.compact-mode .chat-messages { gap: 4px; }
html.compact-mode .message-text { line-height: 1.45; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* CAPABILITIES TAB — Memory & Tool Access                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */
.cap-section-title {
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* Memory toggle info box */
.memory-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text2);
  animation: fadeSlideIn .2s ease;
}

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

/* Custom radio buttons */
.tool-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tool-radio-option:hover {
  border-color: var(--accent);
  background: var(--surface2);
}
.custom-radio {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--text3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: border-color .15s;
}
.custom-radio.selected {
  border-color: var(--accent);
}
.custom-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .15s;
}
.custom-radio.selected .custom-radio-dot {
  transform: scale(1);
}
.tool-radio-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tool-radio-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.tool-radio-desc {
  font-size: 12.5px;
  color: var(--text3);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* MEMORY MANAGER & IMPORT MODALS                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */
.memory-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeOverlay .15s ease;
}
.memory-modal-overlay.active {
  display: flex;
}
.memory-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 700px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: scaleIn .2s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.import-memory-modal {
  width: 680px;
}
.memory-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.memory-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.memory-modal-sub {
  font-size: 13px;
  color: var(--text3);
  margin: 2px 0 0;
}
.memory-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.memory-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.memory-footer-right {
  display: flex;
  gap: 8px;
}

/* Empty state */
.memory-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  gap: 8px;
}
.memory-empty-icon {
  color: var(--text3);
  opacity: .5;
  margin-bottom: 4px;
}
.memory-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
}
.memory-empty-desc {
  font-size: 13px;
  color: var(--text3);
}

/* Accordion categories */
.memory-category {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.memory-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--surface2);
  border: none;
  width: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  transition: background .15s;
}
.memory-category-header:hover {
  background: var(--surface);
}
.memory-category-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.memory-category-count {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
}
.memory-category-chevron {
  transition: transform .2s;
  color: var(--text3);
}
.memory-category.open .memory-category-chevron {
  transform: rotate(90deg);
}
.memory-category-body {
  display: none;
  padding: 0;
}
.memory-category.open .memory-category-body {
  display: block;
}

/* Memory items */
.memory-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  gap: 10px;
}
.memory-item-text {
  flex: 1;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}
.memory-item-date {
  color: var(--text3);
  font-size: 11px;
  font-family: var(--font-mono, monospace);
}
.memory-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.memory-item-actions button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  color: var(--text3);
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
}
.memory-item-actions button:hover {
  background: var(--surface2);
  color: var(--text);
}
.memory-item-actions button.delete-mem:hover {
  color: var(--danger);
}
.memory-add-btn {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  padding: 10px 14px;
  color: var(--accent);
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 500;
  text-align: left;
  border-top: 1px solid var(--border);
  transition: background .15s;
}
.memory-add-btn:hover {
  background: var(--surface2);
}

/* Memory edit inline input */
.memory-edit-input {
  flex: 1;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--surface2);
  color: var(--text);
  outline: none;
}

/* Import modal steps */
.import-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.import-step-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.import-step-badge {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.import-step-content {
  flex: 1;
  min-width: 0;
}
.import-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}
.import-step-desc {
  font-size: 13px;
  color: var(--text3);
  margin: 0 0 10px;
}

/* Code block for import prompt */
.import-code-block {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.import-prompt-text {
  padding: 14px;
  font-family: monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  margin: 0;
}
.import-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text2);
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
  z-index: 2;
}
.import-copy-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Textarea */
.import-textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.55;
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.import-textarea:focus {
  border-color: var(--accent);
}
.import-textarea::placeholder {
  color: var(--text3);
}

/* Mobile */
@media (max-width: 700px) {
  .memory-modal {
    width: 100%;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }
  .import-step-card {
    flex-direction: column;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MIC / VOICE DICTATION BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */
.mic-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.mic-btn:hover {
  color: #e8622a;
  background: rgba(232, 98, 42, 0.08);
}

.mic-btn.recording {
  color: #e8622a;
  background: rgba(232, 98, 42, 0.12);
  animation: micPulse 1.2s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 98, 42, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(232, 98, 42, 0); }
}
