/* =============================================
   Minutes — Corporate Professional Theme
   Inspired by Tencent Meeting / Zoom
   Font: Noto Sans SC
   ============================================= */

:root {
  --primary: #0066FF;
  --primary-hover: #0052CC;
  --primary-light: #E8F0FE;
  --bg: #FFFFFF;
  --bg-secondary: #F5F7FA;
  --surface: #FFFFFF;
  --text: #1A2332;
  --text-secondary: #6B7280;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --border: #E5E7EB;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 240px;
  --navbar-height: 56px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 24px rgba(0,0,0,0.1);
  --font-body: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-secondary);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection {
  background: var(--primary);
  color: #fff;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== Loading Screen ===== */
#loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg);
}

#loading-screen .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: block;
}

#loading-screen p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.sidebar-logo svg {
  height: 26px;
  width: auto;
  flex-shrink: 0;
}

.sidebar-nav { padding: 8px 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  position: relative;
  margin: 2px 8px;
  border-radius: 6px;
}

.sidebar-nav a:hover {
  background: var(--gray-100);
  color: var(--text);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

.sidebar-nav a .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-secondary);
}

/* ===== Navbar ===== */
.navbar {
  height: var(--navbar-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

#page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-user {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-user strong {
  color: var(--text);
  font-weight: 600;
}

.role-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* ===== Page Content ===== */
.page-content {
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
  animation: pageFadeIn 0.2s ease-out;
}

/* Page transition spinner — full-page loading (only child of page-content) */
#page-content > .spinner:only-child {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: block;
  margin: 60px auto;
  background: none;
}

/* Base spinner (used inline for transcribing, etc.) */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

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

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--font-body);
  line-height: 1.4;
}

.btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--text);
  border-color: transparent;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font-body);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-select { appearance: auto; }

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

/* ===== Status Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-pending {
  background: #FEF3C7;
  color: #92400E;
}
.badge-pending::before { background: #F59E0B; }

.badge-processing {
  background: #DBEAFE;
  color: #1E40AF;
}
.badge-processing::before { background: #3B82F6; }

.badge-completed {
  background: #D1FAE5;
  color: #065F46;
}
.badge-completed::before { background: #10B981; }

.badge-failed {
  background: #FEE2E2;
  color: #991B1B;
}
.badge-failed::before { background: #EF4444; }

.badge-transcribing {
  background: #E0E7FF;
  color: #3730A3;
}
.badge-transcribing::before { background: #6366F1; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

th {
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--gray-50);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

tr:hover td {
  background: var(--gray-50);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.15s ease-out;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalScaleIn 0.2s ease-out;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

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

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

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastSlideDown 0.25s ease-out;
  max-width: 360px;
  pointer-events: auto;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--primary);
}

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

/* ===== Confirm Dialog ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn 0.15s;
}

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: modalScaleIn 0.2s ease-out;
}

.confirm-text {
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== Microphone Help Modal ===== */
.mic-help-modal {
  text-align: center;
}

.mic-help-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.mic-help-modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.mic-help-modal p {
  text-align: left;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.mic-help-steps {
  text-align: left;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.mic-help-steps p {
  margin-bottom: 8px;
  font-weight: 500;
}

.mic-help-steps ol {
  margin: 0;
  padding-left: 20px;
}

.mic-help-steps li {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.mic-help-steps code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--primary);
  border: 1px solid var(--border);
}

.mic-help-note {
  font-size: 13px;
  color: var(--text-secondary);
}

.mic-help-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* ===== Recorder ===== */
.recorder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.recorder-timer {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--danger);
  min-width: 56px;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
}

.recorder-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.recorder-btn:active {
  transform: scale(0.92);
}

.recorder-btn-rec {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

.recorder-btn-rec:hover {
  box-shadow: 0 4px 12px rgba(239,68,68,0.4);
}

.recorder-btn-stop {
  background: var(--gray-400);
  color: #fff;
}

.recorder-btn-stop:hover {
  background: var(--gray-500);
}

.recorder-btn-upload {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,102,255,0.25);
}

.recording-pulse {
  animation: pulse 1.2s ease-in-out infinite;
}

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

/* ===== Progress Bar ===== */
.progress-wrap {
  width: 100%;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

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

/* ===== Meeting Cards ===== */
.meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.meeting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.meeting-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.meeting-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.meeting-card:hover::before {
  opacity: 1;
}

.meeting-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text);
}

.meeting-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.meeting-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 4px 0;
}

.meeting-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.15s;
}

.meeting-card:hover .meeting-card-actions {
  opacity: 1;
}

/* ===== Segment List ===== */
.segment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.segment-item:last-child { border-bottom: none; }

.segment-time {
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
  min-width: 70px;
  font-family: var(--font-body);
}

.speaker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
  vertical-align: middle;
  line-height: 1;
}

.speaker-badge:hover {
  opacity: 0.8;
}

.segment-text {
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  margin-top: 2px;
  width: 100%;
  color: var(--text);
}

/* ===== Speaker Rename ===== */
.speaker-rename-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.speaker-label-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
}

.speaker-rename-input {
  font-size: 13px;
}

/* ===== Summary ===== */
#summary-area h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 600;
}

#summary-area p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.key-points-list {
  list-style: none;
}

.key-points-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.key-points-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.action-items-list {
  list-style: none;
}

.action-items-list li {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.action-items-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===== Page Header ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ===== Auth Page ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--gray-50);
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.auth-card::before {
  content: '';
  display: block;
  text-align: center;
  margin: 0 auto 16px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 13l-4-4 1.41-1.41L11 12.17l6.59-6.59L19 7l-8 8z'/%3E%3C/svg%3E");
  background-size: 28px;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ===== Audio Playback ===== */
.recording-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  transition: background 0.15s;
  border-radius: 4px;
  margin: 0 -8px;
  padding: 10px 8px;
}

.recording-item:hover {
  background: var(--gray-50);
}

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

.recording-name {
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}

.recording-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.recording-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.play-btn {
  font-size: 12px;
}

.audio-player-wrap {
  width: 100%;
  padding: 6px 0 2px 0;
}

.audio-player {
  width: 100%;
  height: 40px;
  border-radius: var(--radius);
  background: var(--gray-50);
}

.audio-player::-webkit-media-controls-panel {
  background: var(--gray-50);
}

/* ===== Volume Meter ===== */
.vu-meter {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gray-50);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== Inline Editing ===== */
.editable-field {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  padding: 2px 4px;
  margin: 0 -4px;
}

.editable-field:hover {
  background: var(--gray-50);
}

.editable-field h2,
.editable-field p {
  pointer-events: none;
}

.edit-input {
  font-size: 20px;
  font-weight: 600;
  width: 100%;
  padding: 4px 8px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  outline: none;
  font-family: var(--font-body);
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
}

.edit-textarea {
  font-size: 13px;
  width: 100%;
  min-height: 48px;
  padding: 4px 8px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  outline: none;
  resize: vertical;
  font-family: var(--font-body);
  box-sizing: border-box;
  color: var(--text);
  background: var(--bg);
}

/* ===== Inline Edit Buttons ===== */
.edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  vertical-align: middle;
  margin-left: 4px;
}

.edit-btn:hover {
  background: var(--gray-100);
}

.edit-btn-save {
  color: var(--success);
  border-color: var(--success);
}

.edit-btn-save:hover {
  background: #d1fae5;
}

.edit-btn-cancel {
  color: var(--danger);
  border-color: var(--danger);
}

.edit-btn-cancel:hover {
  background: #fee2e2;
}

/* ===== Tags ===== */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  min-height: 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  user-select: none;
  border: 1px solid rgba(0,102,255,0.12);
}

.tag-sm {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
}

.tag-remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
  margin-left: 2px;
}

.tag-remove:hover {
  opacity: 1;
}

.tag-add {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 2px 10px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  transition: all 0.15s;
}

.tag-add:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.tag-input-wrap {
  display: inline-flex;
}

.tag-input {
  width: 140px;
  padding: 3px 8px;
  font-size: 12px;
  border: 1px solid var(--primary);
  border-radius: 12px;
  outline: none;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

/* ===== Sidebar Tags ===== */
.sidebar-tags {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  display: none;
}

.sidebar-tags-label {
  padding: 8px 20px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-tag {
  display: block;
  padding: 6px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-tag:hover {
  background: var(--gray-100);
  color: var(--primary);
  text-decoration: none;
}

/* ===== Tag Filter ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.active-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  user-select: none;
}

.tag-badge-close {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.tag-badge-close:hover {
  opacity: 1;
}

/* ===== Sidebar Search ===== */
.sidebar-search {
  padding: 8px 12px;
}

.sidebar-search-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  outline: none;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sidebar-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}

.sidebar-search-input::placeholder {
  color: var(--gray-400);
}

/* ===== Search Results ===== */
.search-result-item {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
}

.search-result-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow);
}

.search-result-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.search-result-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.search-result-snippet mark {
  background: #FEF3C7;
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}

/* ===== Responsive ===== */
.hamburger {
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.hamburger:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .page-content {
    padding: 16px;
  }

  .meeting-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    padding: 0 16px;
  }

  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    padding: 4px 0;
    justify-content: space-around;
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    font-size: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
  }

  .mobile-nav a.active {
    color: var(--primary);
  }

  .mobile-nav a .nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-hidden {
    display: none;
  }

  .mobile-sidebar {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 150;
    animation: fadeIn 0.2s ease-out;
  }

  .mobile-sidebar .sidebar-nav a {
    padding: 14px 24px;
    font-size: 16px;
  }
}

@media (min-width: 769px) {
  .mobile-nav { display: none; }
  .hamburger { display: none; }
}

.quick-recorder {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--navbar-height) - 48px);
  min-height: 400px;
}
.quick-recorder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 16px 4px;
  border-bottom: 1px solid var(--border);
}
.quick-recorder-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.quick-recorder-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
}
.quick-recorder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--primary-light);
}
.quick-recorder-icon-svg {
  color: var(--primary);
  animation: pulse-icon 1.6s ease-in-out infinite;
}
@keyframes pulse-icon {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}
.quick-recorder-timer {
  font-size: 48px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 2px;
  line-height: 1;
}
.quick-recorder-wave {
  width: 280px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--gray-50);
}
.quick-recorder-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(239,68,68,0.35);
  transition: all 0.2s ease;
}
.quick-recorder-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(239,68,68,0.45);
}
.quick-recorder-btn:active {
  transform: scale(0.95);
}
.quick-recorder-hint {
  font-size: 13px;
  color: var(--text-secondary);
}
.quick-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 20px;
  min-height: 300px;
}
.quick-processing p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ===== Mobile recording adjustments ===== */
@media (max-width: 768px) {
  .quick-recorder-timer {
    font-size: 40px;
  }
  .quick-recorder-wave {
    width: 240px;
  }
  .quick-recorder {
    height: calc(100vh - var(--navbar-height) - 32px - 56px);
  }
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.assistant-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  max-width: 800px;
  margin: 0 auto;
}
.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.assistant-welcome {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 20px;
}
.assistant-avatar { font-size: 36px; }
.assistant-avatar-sm { font-size: 20px; margin-right: 8px; flex-shrink: 0; }
.assistant-welcome-text { line-height: 1.6; }
.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.assistant-message {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
}
.assistant-message-user { justify-content: flex-end; }
.assistant-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.6;
  font-size: 14px;
}
.assistant-bubble-user {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.assistant-bubble-ai {
  background: var(--bg-secondary);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.assistant-thinking {
  color: var(--text-secondary);
  font-size: 13px;
}
.dot-pulse {
  display: inline-block;
  animation: dotPulse 1.4s infinite;
}
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}
.assistant-sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.assistant-sources-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.assistant-source {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}
.assistant-source:hover { background: var(--primary-light); }
.assistant-source-title { font-weight: 500; }
.assistant-source-time { color: var(--text-secondary); font-size: 12px; }
.assistant-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.assistant-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.assistant-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: none;
  font-size: 14px;
  font-family: inherit;
  max-height: 120px;
  outline: none;
}
.assistant-input:focus { border-color: var(--primary); }
.assistant-send {
  height: 40px;
  min-width: 60px;
}
.assistant-answer { white-space: pre-wrap; }
.assistant-keywords {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.assistant-kw {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 0 2px;
  font-size: 12px;
}
