/* ==========================================================================
   Design System & Variable Tokens
   ========================================================================== */
:root {
  --font-main: 'Inter', 'Noto Sans JP', sans-serif;
  
  /* Color Palette (Deep Ocean & Spiritual Purple) */
  --bg-app: #090d16;
  --bg-sidebar: #0f1524;
  --bg-card: rgba(30, 41, 59, 0.4);
  --bg-card-hover: rgba(30, 41, 59, 0.6);
  --bg-message-user: #4f46e5;
  --bg-message-assistant: rgba(30, 41, 59, 0.5);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-active: rgba(99, 102, 241, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-link: #818cf8;
  
  --accent-glow: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0) 70%);
  --accent-purple: #818cf8;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
}

/* ==========================================================================
   Base styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  line-height: 1.6;
}

/* ==========================================================================
   Layout structure
   ========================================================================== */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  background-image: var(--accent-glow);
  background-position: top right;
  background-repeat: no-repeat;
}

/* ==========================================================================
   Sidebar component
   ========================================================================== */
.sidebar {
  width: 320px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
  font-size: 24px;
}

.logo h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Settings card */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.settings-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
}

.settings-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  color: var(--accent-purple);
}

.settings-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group input {
  flex: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.input-group input:focus {
  border-color: var(--border-color-active);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-group button {
  background: var(--bg-message-user);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.input-group button:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.status-text {
  font-size: 11px;
  margin-top: 8px;
}

.status-text.success {
  color: #10b981;
}

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

/* Documents list */
.documents-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  background: rgba(30, 41, 59, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  transition: var(--transition-smooth);
}

.doc-item:hover {
  background: rgba(30, 41, 59, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.doc-icon {
  font-size: 16px;
}

.doc-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.doc-item-placeholder {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 12px 0;
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   Main content & Header
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background-color: rgba(9, 13, 22, 0.6);
}

/* Header */
.main-header {
  height: 80px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  gap: 20px;
}

.header-info h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.header-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Tab Navigation Styles
   ========================================================================== */
.tab-container {
  display: flex;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 550;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-message-user);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.tab-panel.active {
  display: flex;
}

/* ==========================================================================
   Search Panel Styles
   ========================================================================== */
.search-box {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.2);
}

.search-form {
  display: flex;
  gap: 12px;
  max-width: 800px;
}

.search-form input {
  flex: 1;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 18px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-form input:focus {
  border-color: var(--border-color-active);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
  background: rgba(30, 41, 59, 0.5);
}

.btn-primary {
  background: var(--bg-message-user);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.search-results-summary {
  padding: 12px 40px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.4);
}

.search-results-container {
  flex: 1;
  overflow-y: auto;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Placeholder for empty search */
.search-placeholder-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px; /* 要素が重ならないよう、最小高さを確保 */
  color: var(--text-muted);
  text-align: center;
  gap: 16px;
  padding: 30px 20px; /* 上下の安全な余白を設定 */
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.5;
}

/* Search result card */
.search-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.search-result-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.result-source {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-purple);
}

.result-index {
  font-size: 11px;
  color: var(--text-muted);
}

.result-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* Keyword highlighting */
mark.highlight {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  border-bottom: 2px solid #eab308;
  padding: 1px 4px;
  border-radius: 2px;
}

/* ==========================================================================
   Chat container & Q&A Panel Styles
   ========================================================================== */
#chat-panel {
  display: none;
  height: calc(100vh - 80px);
  flex-direction: column;
}

#chat-panel.active {
  display: flex;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Messages styling */
.chat-message {
  display: flex;
  gap: 20px;
  max-width: 85%;
  animation: fadeIn 0.4s ease-out;
}

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

.chat-message.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.chat-message.user-message .avatar {
  background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.3);
}

.message-content {
  padding: 16px 20px;
  border-radius: var(--border-radius-lg);
  font-size: 14px;
  line-height: 1.7;
}

.chat-message.user-message .message-content {
  background-color: var(--bg-message-user);
  color: white;
  border-top-right-radius: 0;
}

.chat-message.assistant-message .message-content {
  background-color: var(--bg-message-assistant);
  border: 1px solid var(--border-color);
  border-top-left-radius: 0;
  backdrop-filter: blur(10px);
}

/* Welcome special styling */
.welcome-message {
  max-width: 100%;
}

.welcome-message h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--accent-purple);
}

.welcome-message p {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.welcome-message ol {
  margin-left: 20px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.welcome-message li {
  margin-bottom: 8px;
}

/* Sources section inside assistant response */
.sources-container {
  margin-top: 24px;      /* 回答文との間に十分な余白を確保 */
  padding-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15); /* ダッシュ線にして上の要約文との区切りを強調 */
}

.sources-title {
  font-size: 13px;
  font-weight: 700;
  color: #a5b4fc; /* 明るめのラベンダーパープルに変更 */
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px; /* リスト間の余白を広げる */
}

.source-item {
  font-size: 13px; /* 少し大きくして可読性を向上 */
  background: rgba(30, 41, 59, 0.35); /* やや明るいカード背景 */
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-md);
  padding: 14px 16px; /* 余白を増やして見やすく */
  transition: var(--transition-smooth);
}

.source-item:hover {
  background: rgba(99, 102, 241, 0.15); /* ホバー時にうっすら紫色に光る */
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.source-meta {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11.5px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
}

.source-text {
  color: #e2e8f0; /* 暗いグレーから非常に明るいグレーに変更し可読性を劇的アップ */
  font-style: normal; /* 斜体を廃止して、すっきり読める標準書体にする */
  line-height: 1.6;
}

/* Loader animation */
.loader-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: dotPulse 1.4s infinite ease-in-out both;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* ==========================================================================
   Footer Input Area
   ========================================================================== */
.input-area {
  padding: 20px 40px 30px;
  background: linear-gradient(0deg, var(--bg-app) 40%, rgba(9, 13, 22, 0) 100%);
}

.chat-form {
  position: relative;
  display: flex;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 8px 16px;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.chat-form:focus-within {
  border-color: var(--border-color-active);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
  background: rgba(30, 41, 59, 0.6);
}

.chat-form textarea {
  flex: 1;
  background: transparent;
  border: none;
  resize: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  padding: 12px 0;
  max-height: 200px;
  min-height: 24px;
}

.chat-form button {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.chat-form button:not(:disabled) {
  color: var(--accent-purple);
}

.chat-form button:not(:disabled):hover {
  background: rgba(99, 102, 241, 0.15);
  transform: scale(1.05);
}

.send-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   Responsive modifications
   ========================================================================== */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .main-header {
    flex-direction: column;
    height: auto;
    padding: 20px;
    gap: 12px;
  }
  .chat-container {
    padding: 20px;
  }
  .input-area {
    padding: 16px 20px 20px;
  }
  .chat-message {
    max-width: 95%;
  }
}

/* ==========================================================================
   Detail Modal Styles (Spiritual & Glassmorphism UI)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-card {
  width: 90%;
  max-width: 820px;
  height: 80%;
  max-height: 720px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.08);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-section {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
}

.modal-date-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  letter-spacing: 0.5px;
}

.modal-source-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 32px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px; /* 縦40px, 横48px にパディングを広げ、優雅な余白を確保 */
  display: flex;
  flex-direction: column;
  gap: 24px; /* 段落間のスペースを広く */
  background: linear-gradient(180deg, rgba(9, 13, 22, 0.2) 0%, rgba(9, 13, 22, 0.4) 100%);
}

.modal-paragraph {
  font-size: 15.5px;
  line-height: 1.9;  /* 行間を広げて視認性を向上 */
  color: var(--text-secondary);
  padding: 18px 24px; /* 左右のパディングを24pxに広げ、文字が端に接しないようにする */
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}

.modal-paragraph.active-paragraph {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.12);
  border-left: 4px solid var(--accent-purple);
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.05);
}

.modal-footer-section {
  padding: 18px 28px;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.4);
}

.modal-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.nav-btn:hover:not(:disabled) {
  background: var(--bg-message-user);
  border-color: var(--border-color-active);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
}

.nav-arrow {
  font-size: 14px;
  font-weight: bold;
}

.modal-page-info {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* 検索結果カードやAI根拠アイテムにクリック可能な質感を与える */
.search-result-card, .source-item {
  cursor: pointer;
}

/* ==========================================================================
   Auth Container Styles (Premium Spiritual Theme)
   ========================================================================== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
  background-image: radial-gradient(circle at center, rgba(99, 102, 241, 0.18) 0%, rgba(9, 13, 22, 0) 70%);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  overflow-y: auto;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(15, 21, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.1);
  animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  font-size: 32px;
  display: inline-block;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.auth-header h2 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-box h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-purple);
  padding-left: 10px;
}

.auth-input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-input-group input {
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.auth-input-group input:focus {
  border-color: var(--border-color-active);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
  background: rgba(9, 13, 22, 0.8);
}

.btn-auth-primary {
  width: 100%;
  background: var(--bg-message-user);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  margin-top: 10px;
}

.btn-auth-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.auth-switch {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
}

.auth-switch a {
  color: var(--text-link);
  text-decoration: none;
  font-weight: 550;
  transition: var(--transition-smooth);
}

.auth-switch a:hover {
  text-decoration: underline;
  color: #a5b4fc;
}

.auth-message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-out;
}

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

.auth-message.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.auth-message.info {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

