/* ============================================================
   EduVoice — Component Styles
   Cards, Buttons, Forms, Chat, Nav, Toast, etc.
   ============================================================ */

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-light); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-glow); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  height: auto;
  min-height: 80px;
  padding: 12px 16px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0A0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-item .nav-icon { font-size: 1.4rem; }

.nav-item.active {
  color: var(--accent);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

@media (min-width: 992px) {
  .bottom-nav {
    height: calc(var(--nav-height) + var(--safe-bottom) + 8px);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }

  .nav-item {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 16px;
  }

  .nav-item .nav-icon {
    font-size: 1.55rem;
  }
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: var(--max-width);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  animation: toastSlide 0.3s ease;
  pointer-events: auto;
}

.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-warning { background: var(--warning); color: #000; }
.toast-info { background: var(--accent); color: #fff; }

@keyframes toastSlide {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Loader --- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn .spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

/* --- Progress Bar --- */
.progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* --- Subject Card --- */
.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.subject-card .subject-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.subject-card .color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.subject-card .subject-name {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

.subject-card .mastery-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.subject-card .subject-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* --- Chat Messages Container --- */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  max-height: calc(100vh - 280px);
  scroll-behavior: smooth;
}

.chat-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

/* --- Chat Bubbles --- */
.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble.student {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 18px 18px 18px 4px;
  border: 1px solid var(--border);
}

.chat-bubble .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.chat-bubble .timestamp {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

.chat-bubble.student .timestamp { text-align: right; }

/* --- Chat Bubble Variants (used by chat.js) --- */
.chat-bubble-student {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  max-width: 85%;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.chat-bubble-ai {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 18px 18px 18px 4px;
  border: 1px solid var(--border);
  max-width: 85%;
  padding: 0;
  display: flex;
  gap: 8px;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  margin: 12px 0 0 12px;
}

.chat-bubble-body {
  padding: 12px 16px;
  flex: 1;
  min-width: 0;
}

.chat-bubble-student .chat-bubble-body {
  padding: 12px 16px;
}

.chat-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-text pre {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 8px 0;
  overflow-x: auto;
  font-size: 0.8125rem;
}

.chat-text code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
}

.chat-text pre code {
  background: none;
  padding: 0;
}

.chat-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

.chat-bubble-student .chat-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.6);
}

/* --- Chat Welcome --- */
.chat-welcome {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.chat-welcome-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.chat-welcome p {
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-top: 8px;
}

/* --- Chat Input Bar --- */
.chat-input-bar {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9375rem;
  outline: none;
  resize: none;
  line-height: 1.4;
}

.chat-input-row textarea:focus {
  border-color: var(--accent);
}

.chat-input-row textarea::placeholder {
  color: var(--text-muted);
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.chat-input-bar input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.9375rem;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--accent);
}

.chat-input-bar .send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-input-bar .send-btn:disabled {
  opacity: 0.5;
}

/* --- Camera Mode Pills --- */
.camera-modes {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
.camera-modes::-webkit-scrollbar { display: none; }

.camera-mode-btn {
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: var(--font);
}

.camera-mode-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Camera Preview --- */
#camera-preview-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 200px;
  margin: 8px 0;
}

#camera-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.camera-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
}

.camera-preview-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 200px;
  margin: 8px 16px;
}

.camera-preview-wrap video {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

/* --- Voice Session --- */
.voice-orb-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}

.voice-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.voice-orb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-orb-icon {
  font-size: 2.5rem;
  transition: all 0.2s;
}

.voice-orb-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
  text-align: center;
}

.voice-orb.active {
  animation: pulse 1.5s infinite;
  box-shadow: 0 0 40px rgba(108, 99, 255, 0.4);
  border-color: var(--accent-light);
}

.voice-orb.active .voice-orb-icon {
  filter: drop-shadow(0 0 8px rgba(108, 99, 255, 0.6));
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(108, 99, 255, 0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 60px rgba(108, 99, 255, 0.5); }
}

/* --- Voice Transcript --- */
.voice-transcript {
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  scroll-behavior: smooth;
}

.voice-transcript .ai-text { color: var(--accent-light); }
.voice-transcript .student-text { color: var(--text-primary); }

.transcript-placeholder {
  text-align: center;
  padding: 20px 0;
}

.transcript-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  animation: fadeIn 0.3s ease;
}

.transcript-speaker {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.transcript-text {
  font-size: 0.875rem;
  line-height: 1.5;
}

.transcript-ai .transcript-text {
  color: var(--accent-light);
}

.transcript-student .transcript-text {
  color: var(--text-primary);
}

.transcript-system .transcript-text {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8125rem;
}

/* --- Pill Selectors (generic) --- */
.pill-group,
.pill-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Welcome Card --- */
.welcome-card {
  background: linear-gradient(135deg, var(--accent), #4834d4);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
}

.welcome-card .greeting { font-size: 1.25rem; font-weight: 600; }
.welcome-card .streak { font-size: 0.875rem; opacity: 0.9; margin-top: 4px; }

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Onboarding Steps --- */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}

.step-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--accent);
}

.step-dot.done {
  background: var(--success);
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  margin-top: 20px;
}

.section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Review Items --- */
.review-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.review-scroll::-webkit-scrollbar { display: none; }

.review-item {
  flex-shrink: 0;
  width: 140px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.review-item .review-subject {
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.review-item .review-topic {
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* --- Heatmap --- */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-input);
}

.heatmap-cell.level-1 { background: rgba(108, 99, 255, 0.2); }
.heatmap-cell.level-2 { background: rgba(108, 99, 255, 0.4); }
.heatmap-cell.level-3 { background: rgba(108, 99, 255, 0.6); }
.heatmap-cell.level-4 { background: var(--accent); }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.9375rem;
}

/* --- Radio Options --- */
.radio-group,
.radio-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.radio-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.radio-option input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.radio-option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.radio-option .radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radio-option.selected .radio-dot {
  border-color: var(--accent);
}

.radio-option.selected .radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Tag / Chip --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 500;
}

.chip-accent { background: var(--accent-glow); color: var(--accent); }
.chip-success { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.chip-warning { background: rgba(255, 152, 0, 0.15); color: var(--warning); }
.chip-danger { background: rgba(244, 67, 54, 0.15); color: var(--danger); }

/* --- Subject Selector List (chat page) --- */
.subject-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.subject-select-item:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.subject-select-item .subject-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.subject-select-item .subject-info {
  flex: 1;
}

.subject-select-item .subject-info .name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.subject-select-item .subject-info .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.subject-select-item .arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
}

/* --- Typing Indicator --- */
.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* --- Chat page layout fix --- */
#chat-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
}

#chat-view .page-header {
  flex-shrink: 0;
}

#chat-view .chat-messages {
  flex: 1;
  overflow-y: auto;
}

#chat-view .chat-input-bar {
  flex-shrink: 0;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
}

/* --- Voice page camera modes spacing --- */
.camera-modes {
  padding: 8px 16px;
}

/* --- Settings form group spacing --- */
.form-group.mt-16 {
  margin-top: 16px;
}

/* --- Notification Bell --- */
.notif-bell{position:relative;background:none;border:1px solid var(--border);border-radius:6px;color:var(--text-secondary);padding:4px 10px;font-size:1.1rem;cursor:pointer;line-height:1;}
.notif-bell:hover{border-color:var(--accent);color:var(--accent);}
.notif-badge{position:absolute;top:-4px;right:-4px;background:#f44;color:#fff;font-size:.6rem;font-weight:700;min-width:16px;height:16px;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0 3px;}
.notif-badge:empty,.notif-badge.hidden{display:none;}

.notif-dropdown{position:absolute;top:calc(100% + 8px);right:0;width:320px;max-height:400px;overflow-y:auto;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 8px 24px rgba(0,0,0,.15);z-index:100;display:none;}
.notif-dropdown.open{display:block;}
.notif-dropdown-header{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid var(--border);font-size:.82rem;font-weight:600;}
.notif-dropdown-header button{background:none;border:none;color:var(--accent);font-size:.75rem;cursor:pointer;}
.notif-item{padding:10px 14px;border-bottom:1px solid var(--border);font-size:.8rem;cursor:pointer;transition:background .15s;}
.notif-item:hover{background:var(--bg-input);}
.notif-item.unread{background:rgba(108,99,255,.06);}
.notif-item .notif-title{font-weight:600;margin-bottom:2px;}
.notif-item .notif-msg{color:var(--text-secondary);font-size:.75rem;line-height:1.3;}
.notif-item .notif-time{color:var(--text-muted);font-size:.65rem;margin-top:3px;}
.notif-empty{padding:24px;text-align:center;color:var(--text-muted);font-size:.82rem;}
