/* =====================================================
   VoiceNotes PM - Dark Theme Design System
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* =====================================================
   CSS Custom Properties
   ===================================================== */
:root {
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --bg-tertiary: #1c1c1e;
  --bg-elevated: #1c1c1e;
  --bg-hover: #2c2c2e;

  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --text-tertiary: #636366;

  --accent-primary: #0a84ff;
  --accent-primary-hover: #007aff;
  --accent-primary-muted: rgba(10, 132, 255, 0.15);

  --accent-success: #32d74b;
  --accent-warning: #ffd60a;
  --accent-danger: #ff453a;

  --border-subtle: #38383a;
  --border-default: #48484a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);

  --transition-fast: 150ms ease;
  --transition-default: 250ms ease;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --sidebar-width: 260px;
  --nav-height: 56px;
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: var(--font-sans);
}

input,
textarea,
select {
  font-family: var(--font-sans);
}

/* =====================================================
   Scrollbar
   ===================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* =====================================================
   Typography Scale
   ===================================================== */
.text-page-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.text-section-header {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.text-body {
  font-size: 14px;
  font-weight: 400;
}

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

.text-mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

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

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

.text-accent {
  color: var(--accent-primary);
}

.text-success {
  color: var(--accent-success);
}

.text-warning {
  color: var(--accent-warning);
}

.text-danger {
  color: var(--accent-danger);
}

/* =====================================================
   Navigation
   ===================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-brand svg {
  color: var(--accent-primary);
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
  border: none;
  background: transparent;
}

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

.nav-link.active {
  color: var(--accent-primary);
  background: var(--accent-primary-muted);
}

/* =====================================================
   Layout
   ===================================================== */
.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - var(--nav-height));
}

/* =====================================================
   Sidebar
   ===================================================== */
.sidebar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--nav-height));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 16px 0;
  z-index: 90;
}

.sidebar-section {
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  margin-bottom: 4px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-add-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.sidebar-add-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}

.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
}

.sidebar-item-icon {
  font-size: 14px;
  flex-shrink: 0;
}

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

.sidebar-item-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 12px;
}

/* Folder inline creation form */
.sidebar-create-form {
  padding: 8px 12px;
  display: none;
}

.sidebar-create-form.visible {
  display: block;
}

.sidebar-mini-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.sidebar-mini-input:focus {
  border-color: var(--accent-primary);
}

/* Color swatches */
.color-swatches {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: var(--text-primary);
}

/* Type filter chips */
.filter-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

/* =====================================================
   Main Content Area
   ===================================================== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
}

.content-header {
  padding: 24px 32px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0.5px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: var(--nav-height);
  z-index: 80;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  max-width: 360px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 36px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
  height: 40px;
}

.search-input:focus {
  border-color: var(--accent-primary);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.sort-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  outline: none;
  height: 40px;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.sort-select:focus {
  border-color: var(--accent-primary);
}

.meetings-list {
  padding: 24px 32px;
  flex: 1;
}

/* =====================================================
   Meeting Cards
   ===================================================== */
.meeting-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--transition-default), transform var(--transition-default), box-shadow var(--transition-default);
  margin-bottom: 12px;
  display: block;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
}

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

.meeting-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.meeting-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.meeting-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.meeting-card-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   Badges and Pills
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-type {
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
}

.badge-folder {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-date {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
}

/* Priority dots */
.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.priority-dot.high {
  background: var(--accent-danger);
}

.priority-dot.medium {
  background: var(--accent-warning);
}

.priority-dot.low {
  background: var(--accent-success);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-primary);
}

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

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--accent-danger);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0 8px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-lg {
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
}

.btn-icon {
  width: 36px;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 30px;
}

/* Record button */
.record-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--accent-danger);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), 0 0 0 0 rgba(255, 69, 58, 0.4);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
  z-index: 200;
  animation: fab-pulse 2.5s infinite;
}

.record-fab:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255, 69, 58, 0.15);
  animation: none;
}

@keyframes fab-pulse {

  0%,
  100% {
    box-shadow: var(--shadow-lg), 0 0 0 0 rgba(255, 69, 58, 0.4);
  }

  50% {
    box-shadow: var(--shadow-lg), 0 0 0 12px rgba(255, 69, 58, 0);
  }
}

/* =====================================================
   Inputs, Textareas
   ===================================================== */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 40px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.form-textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group {
  margin-bottom: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 5px;
  line-height: 1.5;
}

/* =====================================================
   Modal / Overlay
   ===================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-default);
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition-default);
}

.modal-backdrop.visible .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--border-default);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* =====================================================
   Recording Overlay (full-screen)
   ===================================================== */
.recording-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.97);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-default);
}

.recording-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.recording-overlay-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.recording-overlay-close:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
}

/* Overlay states */
.overlay-state {
  display: none;
  text-align: center;
}

.overlay-state.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Recording state */
.recording-timer {
  font-size: 72px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: -2px;
  line-height: 1;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-danger);
}

.recording-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--accent-danger);
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.waveform-canvas {
  width: 400px;
  height: 80px;
  border-radius: var(--radius-md);
  max-width: 90vw;
}

/* Live transcript during recording */
.live-transcript {
  width: 100%;
  max-width: 500px;
  margin-top: 4px;
}

.live-transcript-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.live-transcript-text {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  max-height: 120px;
  overflow-y: auto;
  text-align: left;
  line-height: 1.6;
  white-space: pre-wrap;
}

.transcription-status {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.transcription-status.active {
  color: var(--accent-primary);
}

/* Meeting type selection grid */
.meeting-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px;
}

.meeting-type-card {
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  cursor: pointer;
  transition: all var(--transition-default);
  text-align: center;
}

.meeting-type-card:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-muted);
  transform: translateY(-2px);
}

.meeting-type-card.selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary-muted);
}

.meeting-type-card-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.meeting-type-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.meeting-type-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Transcript preview */
.transcript-preview {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 160px;
  overflow-y: auto;
  text-align: left;
  width: 100%;
  max-width: 640px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* =====================================================
   Summary View
   ===================================================== */
.summary-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}

.summary-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Old .summary-section-icon overridden below in new section */

.summary-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.executive-summary-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.75;
}

.executive-summary-text p+p {
  margin-top: 12px;
}

/* Action items */
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: opacity var(--transition-default);
}

.action-item:last-child {
  margin-bottom: 0;
}

.action-item.completed {
  opacity: 0.5;
}

.action-item.completed .action-task {
  text-decoration: line-through;
}

.action-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-checkbox:hover {
  border-color: var(--accent-primary);
}

.action-checkbox.checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.action-checkbox.checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.action-item-body {
  flex: 1;
  min-width: 0;
}

.action-task {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.action-pills {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.action-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.action-pill.owner {
  color: var(--accent-primary);
  background: var(--accent-primary-muted);
}

.action-pill.deadline {
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
}

.action-pill.deadline:hover {
  color: var(--text-primary);
}

/* Priority pills */
.action-pill.priority-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.action-pill.priority-high {
  color: var(--accent-danger);
  background: rgba(255, 69, 58, 0.15);
}

.action-pill.priority-medium {
  color: var(--accent-warning);
  background: rgba(255, 214, 10, 0.15);
}

.action-pill.priority-low {
  color: var(--accent-success);
  background: rgba(50, 215, 75, 0.15);
}

/* Inline deadline date picker */
.deadline-date-input {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 10;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  padding: 4px 8px;
  color-scheme: dark;
}

/* Action items count badge */
.action-items-count {
  display: none;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
  margin-left: 8px;
}

/* Decisions */
.decision-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
}

.decision-card:last-child {
  margin-bottom: 0;
}

.decision-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.decision-context {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.decision-by {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Bullet lists */
.summary-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-bullet-list li {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.summary-bullet-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
}

.summary-bullet-list.followups li::before {
  background: var(--text-tertiary);
}

/* =====================================================
   Transcript View
   ===================================================== */
.transcript-content {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

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

.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-panel {
  display: none;
}

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

/* =====================================================
   Meeting Detail Page
   ===================================================== */
.detail-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 32px;
}

.detail-header {
  margin-bottom: 24px;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.detail-breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.detail-breadcrumb a:hover {
  color: var(--accent-primary);
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  outline: none;
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  margin: 0 -4px;
  transition: background var(--transition-fast);
}

.detail-title[contenteditable]:hover {
  background: var(--bg-hover);
}

.detail-title[contenteditable]:focus {
  background: var(--bg-tertiary);
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* =====================================================
   Meeting Types Page
   ===================================================== */
.meeting-types-page {
  padding: 40px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.meeting-types-header {
  margin-bottom: 32px;
}

.meeting-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.type-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 20px 16px;
  transition: border-color var(--transition-default), box-shadow var(--transition-default);
}

.type-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.type-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.type-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.type-card-info {
  flex: 1;
}

.type-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.type-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.type-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* "Add new" card */
.type-card-add {
  border: 2px dashed var(--border-default);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  min-height: 120px;
  color: var(--text-tertiary);
  transition: all var(--transition-default);
  text-align: center;
}

.type-card-add:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-primary-muted);
}

.type-card-add-icon {
  font-size: 28px;
}

.type-card-add-label {
  font-size: 13px;
  font-weight: 600;
}

/* Prompt template textarea */
.prompt-textarea {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  min-height: 400px;
  resize: vertical;
}

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--accent-primary);
  transform: translateX(100%);
  transition: transform var(--transition-default), opacity var(--transition-default);
  opacity: 0;
  pointer-events: all;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-left-color: var(--accent-success);
}

.toast.error {
  border-left-color: var(--accent-danger);
}

.toast.info {
  border-left-color: var(--accent-primary);
}

/* =====================================================
   Loading / Skeleton
   ===================================================== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* =====================================================
   Empty States
   ===================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 40px;
  text-align: center;
  color: var(--text-tertiary);
}

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

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: 14px;
  line-height: 1.5;
  max-width: 300px;
}

/* =====================================================
   Icon picker
   ===================================================== */
.icon-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.icon-option {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-elevated);
}

.icon-option:hover {
  border-color: var(--border-default);
}

.icon-option.selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary-muted);
}

/* =====================================================
   Sidebar Toggle Button (mobile filter access)
   ===================================================== */
.sidebar-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.sidebar-toggle:active {
  transform: scale(0.96);
}

.sidebar-toggle svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-toggle-label {
  line-height: 1;
}

/* =====================================================
   Responsive
   ===================================================== */
/* =====================================================
   Responsive - Sidebar
   ===================================================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-default);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

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

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 190;
    display: none;
  }

  .sidebar-backdrop.visible {
    display: block;
  }

  .sidebar-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .record-fab {
    bottom: 24px;
    right: 20px;
  }

  .meetings-list {
    padding: 16px;
  }

  .content-header {
    padding: 16px;
  }

  .detail-page {
    padding: 24px 16px;
  }

  .meeting-types-page {
    padding: 24px 16px;
  }

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

  .waveform-canvas {
    width: 300px;
  }

  .recording-timer {
    font-size: 52px;
  }
}

@media (max-width: 480px) {
  .meeting-type-grid {
    grid-template-columns: 1fr;
  }

  .recording-timer {
    font-size: 42px;
  }
}

/* =====================================================
   Folder context menu
   ===================================================== */
.context-menu {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 6px;
  z-index: 500;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  display: none;
}

.context-menu.visible {
  display: block;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.context-menu-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.context-menu-item.danger:hover {
  color: var(--accent-danger);
  background: rgba(248, 113, 113, 0.08);
}

/* Utility */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.ml-auto {
  margin-left: auto;
}

/* =====================================================
   Auth Pages (Login / Register)
   ===================================================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(10, 132, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(50, 215, 75, 0.04) 0%, transparent 50%),
    var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

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

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

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

.auth-link {
  color: var(--accent-primary);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.auth-link:hover {
  color: var(--accent-primary-hover);
}

.auth-flash {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.auth-flash-error {
  background: rgba(255, 69, 58, 0.12);
  color: var(--accent-danger);
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.auth-flash-success {
  background: rgba(50, 215, 75, 0.12);
  color: var(--accent-success);
  border: 1px solid rgba(50, 215, 75, 0.2);
}

/* =====================================================
   Nav User Menu
   ===================================================== */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border-subtle);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-primary), #5856d6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-link {
  transition: opacity var(--transition-fast);
}

.nav-user-link:hover {
  opacity: 0.8;
}

.nav-user-link:hover .nav-user-name {
  color: var(--text-primary);
}

.nav-logout-btn {
  padding: 4px 6px !important;
  color: var(--text-tertiary) !important;
}

.nav-logout-btn:hover {
  color: var(--accent-danger) !important;
  background: rgba(255, 69, 58, 0.1) !important;
}

/* =====================================================
   Admin Panel
   ===================================================== */
.admin-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: center;
}

.admin-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.admin-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-table-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

.admin-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr.row-disabled td {
  opacity: 0.5;
}

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

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-primary), #5856d6);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.user-email {
  font-size: 12px;
  color: var(--text-tertiary);
}

.badge-admin {
  background: rgba(50, 215, 75, 0.12);
  color: var(--accent-success);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.badge-user {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.meeting-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  margin-right: 6px;
}

.status-dot.status-active {
  background: var(--accent-success);
  box-shadow: 0 0 6px rgba(50, 215, 75, 0.4);
}

.status-dot.status-disabled {
  background: var(--text-tertiary);
}

/* Admin responsive */
@media (max-width: 640px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4) {
    display: none;
  }
}

/* =====================================================
   Meeting Card Layout (body + actions)
   ===================================================== */
.meeting-card {
  display: flex;
  align-items: stretch;
  padding: 0;
  gap: 0;
}

.meeting-card-body {
  flex: 1;
  padding: 20px;
  cursor: pointer;
  min-width: 0;
}

.meeting-card-actions {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.card-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.card-action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.card-action-btn svg,
.card-action-btn i {
  width: 16px;
  height: 16px;
}

/* =====================================================
   Move-to-Folder Modal
   ===================================================== */
.move-folder-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.move-folder-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
  font-family: var(--font-sans);
}

.move-folder-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.move-folder-option.active {
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
}

.move-folder-option i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.move-folder-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* =====================================================
   Detail Page Action Bar (split layout)
   ===================================================== */
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

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

.detail-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-folder-move {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-folder-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.detail-folder-select {
  min-width: 160px;
  height: 36px;
  font-size: 13px;
}

/* =====================================================
   Summary Section Icons (Lucide)
   ===================================================== */
.summary-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary-muted);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.summary-section-icon i,
.summary-section-icon svg {
  width: 16px;
  height: 16px;
}

/* =====================================================
   Hamburger Menu Button
   ===================================================== */
.nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
  margin-left: auto;
}

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

/* =====================================================
   Account Settings Page
   ===================================================== */
.account-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 32px;
}

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

.account-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}

.account-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.account-save-btn {
  margin-top: 8px;
}

.account-flash {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.account-flash-success {
  background: rgba(50, 215, 75, 0.12);
  color: var(--accent-success);
  border: 1px solid rgba(50, 215, 75, 0.2);
}

.account-flash-error {
  background: rgba(255, 69, 58, 0.12);
  color: var(--accent-danger);
  border: 1px solid rgba(255, 69, 58, 0.2);
}

/* =====================================================
   Mobile-First Nav Responsive
   ===================================================== */
@media (max-width: 1024px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    width: 260px;
    height: calc(100vh - var(--nav-height));
    background: var(--bg-elevated);
    border-left: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 12px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform var(--transition-default);
    z-index: 300;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 15px;
  }

  .nav-user {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-menu-backdrop {
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: 290;
    display: none;
  }

  .nav-menu-backdrop.visible {
    display: block;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 0 16px;
    gap: 12px;
  }

  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions-left,
  .detail-actions-right {
    width: 100%;
  }

  .detail-actions-right {
    flex-wrap: wrap;
  }

  .detail-folder-select {
    flex: 1;
    min-width: 0;
  }

  .account-page {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .detail-actions-right .btn {
    flex: 1;
    min-width: 0;
  }
}

/* =====================================================
   Auto Title Generation
   ===================================================== */
.title-input-wrapper {
  position: relative;
}

.title-input-wrapper .form-input {
  width: 100%;
  padding-right: 40px;
}

.title-spinner {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
}

/* =====================================================
   Meeting Chat UI
   ===================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 340px);
  min-height: 400px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

/* Empty state */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 40px 20px;
  gap: 12px;
}

.chat-empty-icon {
  color: var(--text-tertiary);
  opacity: 0.5;
  margin-bottom: 4px;
}

.chat-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.5;
}

/* Suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  max-width: 460px;
}

.chat-suggestion-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
  background: var(--accent-primary-muted);
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chat-suggestion-btn:hover {
  background: rgba(10, 132, 255, 0.25);
  border-color: var(--accent-primary);
}

/* Message rows */
.chat-bubble-row {
  display: flex;
  animation: chatBubbleIn 0.2s ease-out;
}

.chat-bubble-row-user {
  justify-content: flex-end;
}

.chat-bubble-row-assistant {
  justify-content: flex-start;
}

/* Bubbles */
.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-bubble-user {
  background: var(--accent-primary);
  color: #ffffff;
  border-bottom-right-radius: 6px;
  margin-left: 40px;
}

.chat-bubble-assistant {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 6px;
  margin-right: 40px;
}

.chat-bubble-content {
  white-space: pre-wrap;
}

.chat-bubble-content p {
  margin: 0 0 8px 0;
}

.chat-bubble-content p:last-child {
  margin-bottom: 0;
}

.chat-bubble-content ul {
  margin: 4px 0 8px 0;
  padding-left: 18px;
}

.chat-bubble-content li {
  margin-bottom: 4px;
}

.chat-bubble-content strong {
  font-weight: 600;
}

.chat-bubble-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}

.chat-bubble-assistant .chat-bubble-content code {
  background: rgba(255, 255, 255, 0.06);
}

.chat-error {
  color: var(--accent-danger);
  font-style: italic;
}

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--text-tertiary);
  border-radius: 50%;
  animation: chatTypingDot 1.4s infinite;
}

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

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

@keyframes chatTypingDot {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  30% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes chatBubbleIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input area */
.chat-input-area {
  border-top: 1px solid var(--border-subtle);
  padding: 12px 16px;
  background: var(--bg-secondary);
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color var(--transition-fast);
}

.chat-input::placeholder {
  color: var(--text-tertiary);
}

.chat-input:focus {
  border-color: var(--accent-primary);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--accent-primary-hover);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.chat-input-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.chat-clear-btn {
  font-size: 12px;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.chat-clear-btn:hover {
  color: var(--accent-danger);
}

/* Mobile adjustments for chat */
@media (max-width: 768px) {
  .chat-container {
    height: calc(100vh - 300px);
    min-height: 350px;
    border-radius: var(--radius-sm);
  }

  .chat-messages {
    padding: 16px 12px;
  }

  .chat-bubble {
    max-width: 90%;
    font-size: 14px;
  }

  .chat-bubble-user {
    margin-left: 24px;
  }

  .chat-bubble-assistant {
    margin-right: 24px;
  }

  .chat-input-area {
    padding: 10px 12px;
  }

  .chat-suggestions {
    flex-direction: column;
    align-items: center;
  }

  .chat-suggestion-btn {
    white-space: normal;
    text-align: center;
  }
}

/* =====================================================
   iOS zoom prevention
   ===================================================== */
/* Prevent pinch-to-zoom (iOS ignores user-scalable=no) */
html {
  touch-action: manipulation;
}

/* 16px minimum on all inputs — iOS auto-zooms under 16px */
@supports (-webkit-touch-callout: none) {

  input,
  textarea,
  select,
  .form-input,
  .form-textarea,
  .form-select,
  .search-input,
  .chat-input {
    font-size: 16px !important;
  }
}