/* TelePorter Popup — Telegram Light Theme */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #EBEBEB;
  --bg-tertiary: #E2E2E2;
  --bg-hover: #F5F5F5;
  --bg-input: #EBEBEB;
  --text-primary: #171717;
  --text-secondary: #5C5C5C;
  --text-muted: #A4A4A4;
  --accent: #0087FD;
  --accent-hover: #006dd4;
  --accent-dim: rgba(0, 135, 253, 0.08);
  --accent-text: #0087FD;
  --success: #25B33D;
  --success-dim: rgba(37, 179, 61, 0.1);
  --warning: #FF9501;
  --warning-dim: rgba(255, 149, 1, 0.1);
  --danger: #e05d5d;
  --danger-dim: rgba(224, 93, 93, 0.1);
  --premium: #0087FD;
  --premium-dim: rgba(0, 135, 253, 0.08);
  --border: #EBEBEB;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: none;
}

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

body {
  width: 100%;
  min-height: 100vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ─── Header ─── */
.header {
  background: #517DA2;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.header-privacy {
  padding: 0 16px 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}

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

.btn-upgrade-header {
  background: #4CAF50;
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-upgrade-header:hover { background: #43A047; }

.btn-telegram-link {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-telegram-link:hover { background: rgba(255,255,255,0.35); }

.btn-icon {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}
.btn-icon:hover { background: rgba(255,255,255,0.35); }

/* ─── Plan Label (header) ─── */
.plan-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}

/* ─── Header Link ─── */
.btn-header-link {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-header-link:hover { background: rgba(255,255,255,0.35); }

/* ─── Hamburger Menu ─── */
.hamburger-wrap {
  position: relative;
}

.hamburger-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  min-width: 160px;
  z-index: 20;
  overflow: hidden;
}

.hamburger-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
}

.hamburger-item:hover {
  background: var(--bg-secondary);
}

.hamburger-item:last-child {
  color: var(--danger);
}

/* ─── Plan Banner ─── */
.plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
}

.plan-banner.free {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.plan-banner.premium {
  background: var(--premium-dim);
  color: var(--premium);
}

.btn-upgrade {
  background: var(--premium);
  color: #fff;
  border: none;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-upgrade:hover { background: #7562d4; }

/* ─── Connection Banner ─── */
.connection-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}

.connection-banner.connected { background: var(--success-dim); color: #2e8b3a; }
.connection-banner.disconnected { background: var(--danger-dim); color: #c0392b; }
.connection-banner.checking { background: var(--accent-dim); color: var(--accent); }

.connection-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}

.connection-banner.connected .connection-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.connection-banner.disconnected .connection-dot { background: var(--danger); }
.connection-banner.checking .connection-dot { background: var(--accent); animation: pulse 1.2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.connection-label { flex: 1; }
.connection-version { font-size: 11px; opacity: 0.7; font-weight: 400; }

/* (telegram web button moved to header) */

/* ─── Export Presets ─── */
.export-preset-grid {
  display: flex;
  gap: 6px;
}

.export-preset {
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--bg-primary);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: none;
}

.export-preset:hover { background: var(--bg-hover); }
.export-preset.active { background: var(--accent); color: #fff; }
.export-preset.active:hover { background: var(--accent-hover); color: #fff; }
.export-preset.pro-locked { position: relative; opacity: 0.55; cursor: pointer !important; }

.advanced-toggle {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}
.advanced-toggle:hover { color: var(--accent); }
.advanced-toggle.open { color: var(--accent); }

/* ─── Privacy notice ─── */
.privacy-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-dim);
  color: var(--text-secondary);
  font-size: 11px;
}

.btn-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

/* ─── Panels ─── */
.panel {
  margin: 8px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
}

.panel-header {
  padding: 12px 16px;
  font-weight: 500;
  font-size: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.011em;
}

.panel-header.collapsible {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.panel-header.collapsible:hover { background: var(--bg-secondary); }

.chevron { transition: transform 0.2s; font-size: 11px; color: var(--text-muted); }
.chevron.open { transform: rotate(90deg); }

.panel-body { padding: 10px 14px 14px; }
.collapsible-body { padding-top: 6px; }

.hidden { display: none !important; }

/* ─── Buttons ─── */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  letter-spacing: -0.006em;
}

.btn:hover { filter: brightness(0.95); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; }

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ─── Badge & Premium Tag ─── */
.badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.premium-tag {
  background: var(--premium);
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* ─── Folder grid ─── */
.folder-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.folder-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 4px 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.folder-grid::-webkit-scrollbar { height: 4px; }
.folder-grid::-webkit-scrollbar-thumb { background: #c4c4c4; border-radius: 2px; }
.folder-grid::-webkit-scrollbar-track { background: transparent; }

.folder-chip {
  padding: 8px 16px;
  border-radius: 24px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  transition: all 0.15s;
  letter-spacing: -0.006em;
}

.folder-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.folder-chip.active {
  background: var(--accent);
  color: #fff;
}

/* ─── Search ─── */
.search-bar {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.btn-search-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 2px 4px;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s;
}
.btn-search-toggle:hover { color: var(--accent); background: none; }

/* Search pill — collapsed magnifier, expands to rounded bar */
.search-pill {
  display: flex;
  align-items: center;
  margin-left: auto;
  background: transparent;
  border-radius: 20px;
  transition: background 0.2s, width 0.25s ease;
  overflow: hidden;
  height: 32px;
}
.search-pill.expanded {
  background: #D1D1D1;
  flex: 1;
  margin-left: 8px;
}
body.dark-theme .search-pill.expanded {
  background: #2a2a2a;
}
.search-pill-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-pill-icon:hover { color: var(--accent); }
.search-pill-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
}
.search-pill-input::placeholder { color: var(--text-muted); }
.search-pill-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
}
.search-pill-close:hover { color: var(--text-primary); }

.input-search, .input-field {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  letter-spacing: -0.006em;
}

.input-search::placeholder { color: var(--text-muted); }
.input-search:focus, .input-field:focus { border-color: var(--accent); }

/* ─── Chat list ─── */
.chat-list-container {
  height: 260px;
  overflow-y: auto;
  margin-bottom: 8px;
  border: none;
  border-radius: 16px;
  background: var(--bg-primary);
}

/* Skeleton loaders */
.chat-skeleton {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
}
.chat-skeleton:last-child { border-bottom: none; }
.chat-skeleton-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  flex-shrink: 0;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}
.chat-skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.chat-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: var(--bg-secondary);
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}
.chat-skeleton-line.short { width: 55%; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.select-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.selection-summary {
  font-size: 12px;
  color: var(--accent-text);
  font-weight: 600;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  min-height: 64px;
}

.chat-item:last-child { border-bottom: none; }
.chat-item:hover { background: var(--bg-secondary); }

.chat-item input[type="checkbox"],
.select-controls input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
  width: 12px; height: 12px;
  accent-color: var(--accent);
  flex-shrink: 0; cursor: pointer;
}

.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  color: #fff; flex-shrink: 0; text-transform: uppercase;
}

.chat-item-info { flex: 1; min-width: 0; }

.chat-item-title {
  font-size: 16px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
  letter-spacing: -0.011em;
}

.chat-item-subtitle {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}

.chat-type-badge {
  font-size: 10px; padding: 2px 6px;
  border-radius: 4px; background: var(--bg-secondary);
  color: var(--text-muted); flex-shrink: 0;
  text-transform: capitalize; border: 1px solid var(--border);
}

/* ─── Forum topic subfolder ─── */
.forum-topic-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 2px 52px;
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
.forum-topic-toggle:hover { opacity: 0.8; }
.forum-toggle-arrow {
  font-size: 9px;
  transition: transform 0.15s;
}
.forum-toggle-label { font-weight: 500; }

.forum-topics-list {
  width: 100%;
  padding: 2px 0 4px 52px;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}
.forum-topics-list.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 0 0 52px;
}

.forum-topic-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
}
.forum-topic-item:hover { background: var(--bg-secondary); }
.forum-topic-item input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  flex-shrink: 0; cursor: pointer;
}
.forum-topic-hash {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
}
.forum-topic-name {
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forum-topic-badge {
  background: #2AABEE;
  color: #fff;
  border-radius: 10px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
}

/* ─── Checkbox / options ─── */
.checkbox-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; cursor: pointer; color: var(--text-primary);
}

.checkbox-label input { accent-color: var(--accent); }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}

.checkbox-grid label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; cursor: pointer; color: var(--text-secondary);
}

.checkbox-grid label:hover { color: var(--text-primary); }
.checkbox-grid input { accent-color: var(--accent); }

/* ─── Option groups ─── */
.option-group { margin-bottom: 16px; }

.option-group-title {
  font-weight: 600; font-size: 12px;
  color: var(--accent-text); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.filter-grid label {
  font-size: 12px; color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 3px;
}

.filter-grid label:has(input[type="checkbox"]) {
  flex-direction: row; align-items: center;
}

.filter-grid .input-field { padding: 5px 8px; font-size: 12px; }

/* ─── AI Analysis ─── */
.ai-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}

.ai-type-chip {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.ai-type-chip:hover { border-color: var(--accent); background: var(--bg-hover); }
.ai-type-chip.selected { border-color: var(--accent); background: var(--accent-dim); }
.ai-type-chip.locked { opacity: 0.6; cursor: not-allowed; }

.ai-type-chip .ai-type-name {
  font-size: 12px; font-weight: 600; color: var(--text-primary);
}

.ai-type-chip .ai-type-desc {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
}

.ai-type-chip .premium-tag {
  position: absolute; top: 4px; right: 4px;
}

.ai-status {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 8px;
  background: var(--accent-dim);
  color: var(--accent);
}

.ai-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.ai-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.ai-progress-fill.indeterminate {
  width: 30%;
  animation: ai-progress-pulse 1.5s ease-in-out infinite;
}

@keyframes ai-progress-pulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.ai-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.ai-result {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ai-result-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  gap: 0;
}

.ai-result-tabs::-webkit-scrollbar { height: 0; }

.ai-tab {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.ai-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.ai-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--bg-secondary); }

.ai-result-content {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.ai-refine {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.ai-refine .input-field {
  flex: 1;
  font-size: 11px;
  padding: 4px 8px;
}

/* ─── Progress ─── */
.progress-bar-container {
  width: 100%; height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px; overflow: hidden; margin-bottom: 12px;
}

.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px; transition: width 0.6s ease-out;
}

.progress-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 14px; font-size: 12px;
  margin-bottom: 10px; color: var(--text-secondary);
}

.stat-label { color: var(--text-muted); }

/* ─── Info text ─── */
.info-text { font-size: 13px; color: var(--text-secondary); padding: 4px 0; }

/* ─── Log container ─── */
.log-container {
  max-height: 150px; overflow-y: auto;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 11px; background: var(--bg-secondary);
  border-radius: var(--radius-sm); padding: 8px;
  margin-bottom: 8px; border: 1px solid var(--border);
}

.log-entry { padding: 2px 0; color: var(--text-muted); word-break: break-all; }
.log-entry.error { color: var(--danger); }
.log-entry.warn { color: var(--warning); }
.log-entry.info { color: var(--text-secondary); }

/* ─── Loading spinner ─── */
.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 24px 0;
  color: var(--text-secondary); font-size: 13px;
}

.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Auth ─── */
.auth-step { display: flex; flex-direction: column; gap: 10px; }

.auth-step label {
  font-size: 12px; color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 4px;
}

.auth-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

.auth-status {
  font-size: 12px; padding: 6px 10px;
  border-radius: var(--radius-sm); min-height: 0;
}

.auth-status:empty { display: none; }
.auth-status.info { background: var(--accent-dim); color: var(--accent); }
.auth-status.error { background: var(--danger-dim); color: var(--danger); }

.dev-toggle { margin-top: 4px; }
.dev-link { font-size: 11px; color: var(--text-muted); text-decoration: none; }
.dev-link:hover { color: var(--accent); }
.dev-credentials { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }

/* ─── Version Badge ─── */
.version-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.2); color: #fff; font-weight: 500;
}

/* ─── Modals ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.modal {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 100%; max-width: 400px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}

.modal-title { font-weight: 700; font-size: 15px; color: var(--text-primary); }

.modal-body { padding: 16px; }

/* ─── Paywall / Plan Comparison ─── */
.plan-comparison {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}

.plan-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px; text-align: center;
}

.plan-card.premium { border-color: var(--premium); background: var(--premium-dim); }
.plan-card-name { font-weight: 700; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.plan-card.premium .plan-card-name { color: var(--premium); }

.plan-card-price {
  font-size: 22px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 10px;
}

.plan-period { font-size: 11px; font-weight: 400; color: var(--text-muted); }

.plan-features {
  list-style: none; text-align: left;
  font-size: 11px; color: var(--text-secondary);
}

.plan-features li {
  padding: 3px 0; padding-left: 14px; position: relative;
}

.plan-features li::before {
  content: '\2713'; position: absolute; left: 0;
  color: var(--success); font-weight: 700;
}

.activation-section { border-top: 1px solid var(--border); padding-top: 14px; }
.activation-row { display: flex; gap: 8px; margin-top: 8px; }
.activation-row .input-field { flex: 1; }

.activation-status { font-size: 12px; margin-top: 6px; min-height: 0; }
.activation-status:empty { display: none; }
.activation-status.success { color: var(--success); }
.activation-status.error { color: var(--danger); }

/* ─── Settings ─── */
.settings-section {
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.settings-title {
  font-size: 12px; font-weight: 700;
  color: var(--accent-text); text-transform: uppercase;
  letter-spacing: 0.3px; margin-bottom: 10px;
}

.settings-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 4px 0; font-size: 13px;
}

.settings-label { color: var(--text-secondary); }
.settings-value { font-weight: 600; color: var(--text-primary); }

.settings-hint {
  font-size: 11px; color: var(--text-muted);
  margin-top: 6px; line-height: 1.4;
}

/* ─── Footer ─── */
.footer {
  display: flex; justify-content: center;
  padding: 10px 16px 14px;
}

.footer-brand {
  font-size: 10px; color: var(--text-muted); letter-spacing: 0.2px;
}
