/* ============================================
   meetingplateform — Design System v2
   Premium dark-mode, Inter font
   ============================================ */

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

/* === TOKENS === */
:root {
  /* Colors — deep navy palette */
  --bg-primary: #0f1117;
  --bg-secondary: #161822;
  --bg-tertiary: #1e2030;
  --bg-elevated: #252838;
  --bg-hover: #2a2d42;
  --bg-card: #1a1c2e;

  --text-primary: #e4e6f0;
  --text-secondary: #9498b3;
  --text-muted: #5c6080;
  --text-inverse: #0f1117;

  --accent: #7c6aef;
  --accent-hover: #9585f5;
  --accent-glow: rgba(124, 106, 239, 0.3);
  --accent-subtle: rgba(124, 106, 239, 0.12);

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;

  --border: #2a2d42;
  --border-subtle: #1e2030;
  --border-focus: var(--accent);

  --gradient-brand: linear-gradient(135deg, #7c6aef 0%, #5b4dc7 100%);
  --gradient-card: linear-gradient(145deg, #1a1c2e 0%, #161822 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(124,106,239,0.08) 0%, transparent 60%);

  /* Spacing — 4px base */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;

  /* Layout */
  --header-height: 60px;
  --max-width: 900px;
  --sidebar-width: 280px;
}

/* === BASE === */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--accent); color: white; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hidden { display: none !important; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === APP SHELL === */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === HEADER === */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--sp-xl);
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: opacity var(--duration) var(--ease);
}
.logo:hover { opacity: 0.85; }
.logo-icon { font-size: 1.3rem; }
.logo-accent { color: var(--accent); }

.header-center { flex: 1; max-width: 400px; margin: 0 var(--sp-xl); }
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

/* Search */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: var(--sp-sm) var(--sp-lg);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.search-container.search-focused {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  width: 100%;
  margin-left: var(--sp-sm);
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
}
.search-results-header {
  padding: var(--sp-md) var(--sp-lg);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-type { font-size: 1rem; }
.search-result-title { flex: 1; font-size: 0.875rem; }
.search-result-context { font-size: 0.75rem; color: var(--text-muted); }
.search-highlight { background: var(--accent-subtle); color: var(--accent); font-weight: 600; border-radius: 2px; padding: 0 2px; }
.search-empty { padding: var(--sp-xl); text-align: center; color: var(--text-muted); font-size: 0.875rem; }

/* User badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}
.username-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  width: 100px;
  text-align: right;
  outline: none;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  font-family: inherit;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.btn-glow { box-shadow: var(--shadow-glow); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }

.btn-accent {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid transparent;
}
.btn-accent:hover:not(:disabled) { background: rgba(124, 106, 239, 0.2); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); background: var(--bg-tertiary); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.2); }

.btn-sm { padding: var(--sp-xs) var(--sp-md); font-size: 0.8rem; }
.btn-lg { padding: var(--sp-md) var(--sp-xl); font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  position: relative;
}
.btn-icon:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.settings-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--warning);
}

/* Loading state */
.btn.loading { pointer-events: none; opacity: 0.7; }
.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--sp-sm);
}

/* === MAIN CONTENT === */
main {
  flex: 1;
  padding: var(--sp-xl);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.view { display: none; animation: fadeIn 0.25s var(--ease); }
.view.active { display: block; }

/* === LOGIN OVERLAY === */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  width: 100%;
  max-width: 380px;
  padding: var(--sp-3xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--sp-xs);
}
.login-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--sp-xl);
}
.login-error { font-size: 0.8rem; margin-top: var(--sp-sm); text-align: center; }

/* === FORMS === */
.form-group {
  margin-bottom: var(--sp-lg);
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group .optional {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  font-size: 0.75rem;
}
.settings-input, input[type="text"], input[type="password"], input[type="email"],
input[type="date"], input[type="time"], select, textarea {
  width: 100%;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.settings-input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
textarea { resize: vertical; min-height: 60px; }

/* === DASHBOARD VIEW (1.1 / 2.1) === */
.dashboard-greeting {
  margin-bottom: var(--sp-2xl);
}
.dashboard-greeting h2 {
  font-size: 1.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dashboard-greeting p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: var(--sp-xs);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
}
.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Meeting Cards */
.meetings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-lg);
}
.meeting-card {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  overflow: hidden;
}
.meeting-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.meeting-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.meeting-card:hover::before { opacity: 1; }

.meeting-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--sp-sm);
  padding-right: var(--sp-xl);
}
.meeting-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meeting-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-md);
}
.meeting-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.meeting-card .btn-icon {
  position: absolute;
  top: var(--sp-sm);
  right: var(--sp-sm);
  width: 28px;
  height: 28px;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.meeting-card:hover .btn-icon { opacity: 1; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-3xl);
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: var(--sp-lg); }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: var(--sp-sm); }
.empty-state p { font-size: 0.9rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.badge-date { color: var(--text-muted); }
.badge-draft { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-closed { background: var(--accent-subtle); color: var(--accent); }

/* === MEETING DETAIL VIEW === */
.meeting-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}
.meeting-meta { flex: 1; }
.meeting-title { font-size: 1.4rem; font-weight: 800; margin-bottom: var(--sp-sm); }
.meeting-info {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.meeting-actions {
  display: flex;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

/* Agenda navigation list */
.agenda-container {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.agenda-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.agenda-nav-item:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateX(4px);
}
.agenda-nav-item.dragging { opacity: 0.4; }
.agenda-nav-item.dragging { opacity: 0.3; transform: scale(0.95); }
.agenda-nav-item.drag-over-above {
  margin-top: 20px;
  position: relative;
}
.agenda-nav-item.drag-over-above::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.agenda-nav-item.drag-over-below {
  margin-bottom: 20px;
  position: relative;
}
.agenda-nav-item.drag-over-below::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.agenda-nav-item { transition: margin 0.2s ease, opacity 0.2s ease, transform 0.2s ease; }

/* Meeting card drag */
.meeting-card { transition: margin 0.2s ease, opacity 0.2s ease, transform 0.2s ease; }
.meeting-card.dragging { opacity: 0.3; transform: scale(0.95); }
.meeting-card.drag-over-above { margin-top: 20px; position: relative; }
.meeting-card.drag-over-above::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.meeting-card.drag-over-below { margin-bottom: 20px; position: relative; }
.meeting-card.drag-over-below::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Entry drag */
.entry { transition: margin 0.2s ease, opacity 0.2s ease, transform 0.2s ease; }
.entry.dragging { opacity: 0.3; transform: scale(0.97); }
.entry.drag-over-above { margin-top: 16px; position: relative; }
.entry.drag-over-above::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.entry.drag-over-below { margin-bottom: 16px; position: relative; }
.entry.drag-over-below::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.entry:hover .entry-drag-handle { opacity: 0.6; }

.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity var(--duration) var(--ease);
}
.agenda-nav-item:hover .drag-handle { opacity: 1; }

.agenda-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.agenda-nav-content { flex: 1; min-width: 0; }
.agenda-nav-title { font-weight: 600; font-size: 0.95rem; }
.agenda-nav-meta {
  display: flex;
  gap: var(--sp-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.agenda-nav-arrow { color: var(--text-muted); flex-shrink: 0; }

/* Sub-items */
.agenda-sub-list {
  margin-left: 44px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.agenda-sub-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}
.agenda-sub-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* AI Summary */
.summary-section { margin-bottom: var(--sp-xl); }
.summary-card {
  background: var(--accent-subtle);
  border: 1px solid rgba(124, 106, 239, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
}
.summary-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
  color: var(--accent);
  font-weight: 700;
}
.summary-content { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.summary-content h1, .summary-content h2, .summary-content h3 { color: var(--text-primary); margin-top: var(--sp-lg); margin-bottom: var(--sp-sm); }
.summary-content strong { color: var(--text-primary); }
.summary-content ul, .summary-content ol { padding-left: var(--sp-xl); }
.summary-content li { margin-bottom: var(--sp-xs); }

/* === AGENDA DETAIL VIEW (1.2 Meeting Live) === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-lg);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration) var(--ease);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); margin: 0 2px; }
.breadcrumb .current { color: var(--text-primary); font-weight: 600; }

.agenda-detail-notes {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--sp-sm);
  padding: var(--sp-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.agenda-summary {
  background: var(--accent-subtle);
  border: 1px solid rgba(124, 106, 239, 0.2);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.agenda-summary h1, .agenda-summary h2, .agenda-summary h3 { color: var(--text-primary); margin-top: var(--sp-md); margin-bottom: var(--sp-sm); }
.agenda-summary strong { color: var(--text-primary); }
.agenda-summary ul { padding-left: var(--sp-xl); }
.agenda-summary li { margin-bottom: var(--sp-xs); }

/* Entries feed */
.entries-feed {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  margin-bottom: 100px; /* room for capture bar */
}
.entry {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease);
  animation: slideIn 0.3s var(--ease);
}
.entry:hover { border-color: var(--border); }
.entry-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}
.entry-icon.text { background: var(--accent-subtle); }
.entry-icon.transcription { background: var(--success-bg); }
.entry-icon.photo { background: var(--warning-bg); }
.entry-icon.audio { background: rgba(96, 165, 250, 0.12); }

.entry-content { flex: 1; min-width: 0; }
.entry-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}
.entry-author { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.entry-time { font-size: 0.72rem; color: var(--text-muted); }
.entry-delete {
  margin-left: auto;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--duration) var(--ease), color var(--duration) var(--ease);
}
.entry:hover .entry-delete { opacity: 1; }
.entry-delete:hover { color: var(--danger) !important; }

/* Agenda item delete buttons (hover reveal) */
.agenda-nav-item > .btn-icon { transition: opacity var(--duration) var(--ease); }
.agenda-nav-item:hover > .btn-icon { opacity: 1 !important; }
.agenda-sub-item > .btn-icon { transition: opacity var(--duration) var(--ease); }
.agenda-sub-item:hover > .btn-icon { opacity: 1 !important; }
.entry-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; word-break: break-word; }
.entry-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  margin-top: var(--sp-sm);
  object-fit: cover;
}
.entry-audio {
  width: 100%;
  margin-top: var(--sp-sm);
  border-radius: var(--radius-md);
  height: 36px;
}

/* Capture bar */
.capture-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: var(--sp-md) var(--sp-xl);
  z-index: 50;
}
.capture-input-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: var(--sp-sm);
}
.capture-input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color var(--duration) var(--ease);
  max-height: 120px;
}
.capture-input:focus { border-color: var(--accent); }
.capture-input::placeholder { color: var(--text-muted); }
.capture-actions {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-xs);
}
.capture-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}
.capture-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.capture-btn-send {
  background: var(--gradient-brand);
  color: white;
}
.capture-btn-send:hover { box-shadow: var(--shadow-glow); }
.capture-btn.recording {
  background: var(--danger);
  color: white;
  animation: pulse 1.5s ease infinite;
}
.capture-btn.listening {
  background: var(--success);
  color: white;
  animation: pulse 1.5s ease infinite;
}

/* === MODALS === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl);
  animation: fadeIn 0.2s var(--ease);
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease);
}
.modal-sm { max-width: 400px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-xl);
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal form, .modal .settings-section { padding: var(--sp-xl); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
  padding-top: var(--sp-lg);
}

/* Settings */
.settings-section { padding: var(--sp-xl); }
.settings-section-title { font-size: 1rem; font-weight: 700; margin-bottom: var(--sp-sm); }
.settings-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: var(--sp-lg); }
.settings-status {
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: var(--sp-lg);
}
.settings-status.active { background: var(--success-bg); color: var(--success); }
.settings-status.inactive { background: var(--warning-bg); color: var(--warning); }
.settings-actions {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.settings-test-result {
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: var(--sp-lg);
}
.settings-test-result.success { background: var(--success-bg); color: var(--success); }
.settings-test-result.error { background: var(--danger-bg); color: var(--danger); }
.settings-help {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.settings-help p { margin-bottom: var(--sp-sm); }
.settings-help ol { padding-left: var(--sp-xl); }
.settings-help li { margin-bottom: var(--sp-xs); }

/* Agenda builder in create modal */
.agenda-builder {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.agenda-field {
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
}
.agenda-field input {
  flex: 1;
}

/* === FAB (Floating Action Button) === */
.fab {
  position: fixed;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transition: all var(--duration) var(--ease);
  z-index: 40;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 0 30px var(--accent-glow), var(--shadow-lg); }

/* === TOAST === */
.toast-container {
  position: fixed;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.toast {
  padding: var(--sp-md) var(--sp-xl);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  animation: slideIn 0.3s var(--ease);
  white-space: nowrap;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast-undo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.toast-undo .btn-undo {
  background: rgba(124, 106, 239, 0.2);
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.toast-undo .btn-undo:hover { background: rgba(124, 106, 239, 0.35); }

/* Markdown rendered */
.markdown h1 { font-size: 1.2rem; font-weight: 700; margin-top: var(--sp-lg); margin-bottom: var(--sp-sm); color: var(--text-primary); }
.markdown h2 { font-size: 1.05rem; font-weight: 700; margin-top: var(--sp-md); margin-bottom: var(--sp-sm); color: var(--text-primary); }
.markdown h3 { font-size: 0.95rem; font-weight: 600; margin-top: var(--sp-md); margin-bottom: var(--sp-sm); color: var(--text-primary); }
.markdown strong { color: var(--text-primary); }
.markdown ul, .markdown ol { padding-left: var(--sp-xl); }
.markdown li { margin-bottom: var(--sp-xs); }

/* Help text */
.help-text { font-size: 0.8rem; color: var(--text-muted); }

/* Admin styles */
.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Guest badge */
.guest-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(124, 106, 239, 0.15);
  color: var(--accent);
  border: 1px solid rgba(124, 106, 239, 0.25);
}

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50% { box-shadow: 0 0 0 8px transparent; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .app-header { padding: 0 var(--sp-lg); }
  .header-center { display: none; }
  .logo-text { display: none; }
  main { padding: var(--sp-lg); }
  .meetings-grid { grid-template-columns: 1fr; }
  .meeting-header-bar { flex-direction: column; }
  .meeting-actions { width: 100%; justify-content: flex-end; }
  .meeting-card .btn-icon { opacity: 1; }
  .entry-delete { opacity: 0.5 !important; }
  .capture-bar { padding: var(--sp-sm) var(--sp-md); }
  .fab { bottom: 80px; right: var(--sp-lg); }
}

@media (max-width: 480px) {
  .breadcrumb { font-size: 0.72rem; }
  .meeting-title { font-size: 1.15rem; }
  .agenda-nav-item { padding: var(--sp-md); }
}

/* === EXPORT MODAL === */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.modal-footer {
  padding: var(--sp-lg) var(--sp-xl);
  border-top: 1px solid var(--border);
}

/* === LIGHTBOX === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.2s var(--ease);
}
.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
