/* ── CSS Variables & Design System ─────────────────────────────── */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(25, 33, 52, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.06);

  --border-primary: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-glow: rgba(99, 102, 241, 0.35);
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  --accent-danger: #ef4444;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;

  --sidebar-width: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --font-sans: 'Inter', 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--accent-primary-glow);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

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

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

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

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.nav-link:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
}

.nav-icon { font-size: 18px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-primary);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-warning);
  animation: pulse-dot 2s infinite;
}

.status-dot.connected { background: var(--accent-success); }
.status-dot.error { background: var(--accent-danger); }

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

/* ── Main Content ─────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 32px 40px;
  max-width: 960px;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

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

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}
.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Record Page ──────────────────────────────────────────────── */
.record-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.record-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 0;
}

.record-button {
  position: relative;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
  outline: none;
}

.record-button:hover {
  transform: scale(1.05);
}

.record-button.recording {
  background: linear-gradient(135deg, #ef4444, #f87171);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.record-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  opacity: 0;
}

.record-button.recording .record-pulse {
  animation: record-pulse 1.5s ease-out infinite;
}

@keyframes record-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.record-icon {
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-timer {
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.record-status {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Audio Level Meter ────────────────────────────────────────── */
.audio-level-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 8px 0;
}

.level-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.level-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-primary);
}

.level-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--accent-success);
  transition: width 0.1s ease, background-color 0.3s ease;
}

.level-bar-fill.low { background: var(--accent-success); }
.level-bar-fill.medium { background: var(--accent-warning); }
.level-bar-fill.high { background: var(--accent-danger); }

.level-value {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: right;
}

.mic-hint {
  font-size: 13px;
  color: var(--accent-warning);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* ── Transcribing Progress ────────────────────────────────────── */
.transcribing-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.transcribing-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.transcribing-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.transcribing-bar-track {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border-primary);
}

.transcribing-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--accent-gradient);
  transition: width 30s cubic-bezier(0.1, 0.5, 0.3, 1);
}

.meeting-title-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meeting-title-input label,
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

textarea { resize: vertical; line-height: 1.6; }

.transcript-area {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

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

.transcript-header h3 { font-size: 14px; font-weight: 600; }
.char-count { font-size: 12px; color: var(--text-muted); }

.transcript-box {
  padding: 20px;
  min-height: 180px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-transcript {
  max-height: 300px;
}

.placeholder-text {
  color: var(--text-muted);
  font-style: italic;
}

.record-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── Import Page ──────────────────────────────────────────────── */
.import-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.import-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: white;
}

.tab-content { display: none; }
.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.mt-3 {
  margin-top: 16px;
}

/* Audio Player Container */
.audio-player-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  padding: 24px;
}

.audio-playback-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(0,0,0,0.2);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
}

.audio-playback-card audio {
  width: 100%;
  height: 40px;
  outline: none;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-rec-status {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.audio-transcript-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -4px;
  padding-right: 4px;
}

.tab-btn.active {
  background: var(--accent-primary);
  color: white;
}

.tab-content { display: none; }
.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.file-dropzone {
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon { font-size: 48px; margin-bottom: 12px; }
.dropzone-text { font-size: 16px; color: var(--text-primary); margin-bottom: 4px; }
.dropzone-hint { font-size: 13px; color: var(--text-muted); }

/* ── Meetings List ────────────────────────────────────────────── */
.meetings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meeting-item {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meeting-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.meeting-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.meeting-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.meeting-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.meeting-item:hover .meeting-arrow {
  transform: translateX(4px);
  color: var(--accent-primary);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state.hidden { display: none; }
.empty-icon { font-size: 56px; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); }

/* ── Detail Page ──────────────────────────────────────────────── */
.detail-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

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

.card-header h3 { font-size: 14px; font-weight: 600; }

.summary-box {
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
  max-height: 500px;
  overflow-y: auto;
}

.summary-box h2 { font-size: 16px; margin: 16px 0 8px; }
.summary-box h2:first-child { margin-top: 0; }
.summary-box ul, .summary-box ol { padding-left: 20px; }
.summary-box li { margin-bottom: 4px; }

/* ── Chat ─────────────────────────────────────────────────────── */
.chat-card {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  padding: 20px;
  min-height: 200px;
  max-height: 450px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-welcome {
  text-align: center;
  padding: 20px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.suggestion-chip {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.suggestion-chip:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  animation: bubbleIn 0.3s ease;
}

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

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble.assistant p { margin-bottom: 8px; }
.chat-bubble.assistant p:last-child { margin-bottom: 0; }
.chat-bubble.assistant ul, .chat-bubble.assistant ol { padding-left: 20px; margin-bottom: 8px; }

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-primary);
}

.chat-input-area input {
  flex: 1;
}

.chat-input-area .btn {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.chat-typing span {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s ease-in-out infinite;
}

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

@keyframes typing {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* ── Danger card ──────────────────────────────────────────────── */
.danger-card {
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.15);
}

/* ── Toast ─────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.8s forwards;
  max-width: 360px;
}

.toast-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-success);
}

.toast-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--accent-danger);
}

.toast-info {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: var(--accent-primary);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* ── Mobile menu button ───────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 200;
  width: 44px; height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  border: 1px solid var(--border-primary);
}

/* ── Loading spinner ──────────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Login Overlay ──────────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.85); /* Dark transparent backdrop */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

.login-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.hidden-until-login {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.authenticated .hidden-until-login {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-overlay.active .login-card {
  transform: translateY(0);
}

.login-header {
  text-align: center;
}

.login-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4));
}

.login-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-error {
  color: var(--accent-danger);
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  margin-top: 8px;
}

/* Auth mode switching */
.auth-mode {
  display: none;
}

.auth-mode.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.35s ease;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-switch a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.auth-switch a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* User info in sidebar */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-primary);
}

.user-avatar {
  font-size: 22px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border-radius: 50%;
}

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

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
    padding: 24px 16px;
    padding-top: 72px;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .page-header h1 { font-size: 22px; }

  .record-button {
    width: 100px; height: 100px;
  }

  .record-timer { font-size: 26px; }

  .chat-bubble { max-width: 92%; }
}

@media (max-width: 480px) {
  .main-content { padding: 16px 12px; padding-top: 64px; }
  .import-tabs { flex-direction: column; }
  .record-actions { flex-direction: column; }
}
