/* MeetAI – Dark Mode Whisper-Style UI */
/* Inspired by Whisper App with modern glassmorphism */

/* --------- THEME VARIABLES --------- */
:root {
  /* Dark theme colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --bg-elevated: #22222e;
  --bg-glass: rgba(18, 18, 26, 0.85);
  
  --fg-primary: #ffffff;
  --fg-secondary: #a0a0b0;
  --fg-muted: #6b6b7a;
  --fg-dim: #45454f;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  
  /* Accent colors - vibrant gradient */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #a855f7;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-soft: rgba(99, 102, 241, 0.15);
  
  /* Status colors */
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-soft: rgba(239, 68, 68, 0.15);
  --recording: #ef4444;
  --recording-glow: rgba(239, 68, 68, 0.5);
  
  /* Gradients */
  --gradient-accent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --shadow-recording: 0 0 60px var(--recording-glow);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--gradient-dark);
  color: var(--fg-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --------- GLASSMORPHISM UTILITIES --------- */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass-strong {
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-default);
}

/* --------- ANIMATIONS --------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow); }
}

@keyframes recordingPulse {
  0%, 100% { 
    box-shadow: 0 0 4px var(--recording-glow);
  }
  50% { 
    box-shadow: 0 0 12px var(--recording-glow);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

/* --------- LOGIN OVERLAY --------- */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.5s ease-out;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  animation: fadeInScale 0.6s ease-out;
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo-icon {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  /*background: var(--gradient-accent);*/
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: white;
  /*box-shadow: var(--shadow-glow);*/
  /*animation: float 3s ease-in-out infinite;*/
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--fg-secondary);
  font-size: 15px;
}

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

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 1rem;
}

.login-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-input {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.login-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-input::placeholder {
  color: var(--fg-muted);
}

.login-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--gradient-accent);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-glow);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--accent-glow);
}

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

.login-error {
  padding: 12px 16px;
  background: var(--error-soft);
  border: 1px solid var(--error);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 14px;
  text-align: center;
}

.login-credits {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  text-align: center;
}

.login-credits-label {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.login-credits-value {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Login tabs for Anmelden / Registrieren */
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
}

.login-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--fg-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.login-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
}

.login-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}

.login-success {
  color: var(--success);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
  text-align: center;
}

.login-hint {
  text-align: center;
  font-size: 13px;
  color: var(--fg-secondary);
  margin-top: 16px;
}

/* --------- HEADER --------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  height: 88px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 48px;
  height: 48px;
}

.app-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.app-logo img {
  width: 48px;
  height: 48px;
}

.app-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-title-svg {
  height: 22px;
  width: auto;
}

.app-title-img {
  height: 100px;
  width: auto;
  object-fit: contain;
  margin-top: 2rem;
  margin-left: -1.5rem;
}

.app-subtitle {
  font-size: 13px;
  color: var(--fg-muted);
}

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

.user-credits {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 13px;
}

.user-credits-icon {
  color: var(--accent-primary);
}

.user-credits-value {
  font-weight: 600;
  color: var(--fg-primary);
}

.user-credits-label {
  color: var(--fg-muted);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* --------- MAIN LAYOUT --------- */
.container {
  display: flex;
  min-height: 100vh;
  padding-top: 88px;
}

/* --------- SIDEBAR --------- */
.sidebar {
  position: fixed;
  left: 0;
  top: 88px;
  bottom: 0;
  width: 72px;
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  transition: width 0.25s ease;
  z-index: 100;
}

.sidebar.expanded {
  width: 200px;
}

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

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.sidebar-toggle svg {
  display: block;
}

.sidebar-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--fg-primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 8px 16px;
  flex: 1;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 48px;
  padding: 0;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.sidebar.expanded .sidebar-footer-link {
  justify-content: flex-start;
  padding: 0 12px;
  gap: 10px;
}

.sidebar-footer-link:hover {
  background: var(--bg-tertiary);
  color: var(--fg-secondary);
}

.sidebar-footer-link.active {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

.sidebar-footer-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer-link svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.footer-label {
  display: none;
}

.sidebar.expanded .footer-label {
  display: inline;
}

.tab-btn {
  width: 100%;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  padding: 0;
}

.tab-btn:hover {
  background: var(--bg-tertiary);
  color: var(--fg-secondary);
}

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

.tab-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-primary);
  border-radius: 0 3px 3px 0;
}

.tab-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.tab-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.2s, width 0.25s;
  white-space: nowrap;
}

.sidebar.expanded .tab-label {
  opacity: 1;
  width: auto;
}

.sidebar.expanded .tab-btn {
  justify-content: flex-start;
  padding: 0 12px;
  gap: 12px;
}

/* --------- MAIN CONTENT --------- */
.main-content {
  flex: 1;
  margin-left: 72px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}

body.sidebar-expanded .main-content {
  margin-left: 200px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

/* --------- HOME TAB - RECORDING WIDGET --------- */
.recording-widget {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Meeting Setup Card */
.meeting-setup {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  animation: fadeInScale 0.4s ease-out;
}

.meeting-setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.meeting-setup-title {
  font-size: 18px;
  font-weight: 600;
}

.meeting-setup-toggle {
  font-size: 13px;
  color: var(--accent-primary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.meeting-setup-toggle:hover {
  color: var(--accent-secondary);
}

.meeting-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.setup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setup-field.full-width {
  grid-column: 1 / -1;
}

.setup-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setup-input,
.setup-select {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.setup-input:focus,
.setup-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.setup-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b7a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Participants Tags */
.participants-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  min-height: 48px;
}

.participant-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--accent-primary);
  animation: fadeInScale 0.2s ease-out;
}

.participant-tag-remove {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

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

.participant-input {
  flex: 1;
  min-width: 120px;
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--fg-primary);
  font-size: 14px;
}

.participant-input:focus {
  outline: none;
}

.participant-input::placeholder {
  color: var(--fg-muted);
}

/* Recording Card */
.recording-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-med);
}

.recording-card.recording {
  border-color: var(--recording);
  animation: recordingPulse 2s ease-in-out infinite;
}

/* WebGL Wave Canvas */
.wave-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity var(--transition-slow);
  z-index: 1;
}

.recording-card.recording .wave-container {
  opacity: 1;
}

#wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Recording Status */
.recording-status {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
}

.recording-time {
  font-size: 64px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.recording-card.recording .recording-time {
  color: var(--recording);
}

.recording-label {
  font-size: 14px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.recording-card.recording .recording-label {
  color: var(--recording);
}

/* Recording Controls */
.recording-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.rec-btn {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-med);
  position: relative;
}

.rec-btn-primary {
  width: 88px;
  height: 88px;
  background: var(--gradient-accent);
  box-shadow: var(--shadow-glow);
}

.rec-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px var(--accent-glow);
}

.rec-btn-primary:active {
  transform: scale(0.98);
}

.rec-btn-primary.recording {
  background: var(--recording);
  box-shadow: var(--shadow-recording);
}

.rec-btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--fg-primary);
}

.rec-btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
}

.rec-btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rec-btn svg {
  width: 28px;
  height: 28px;
  color: white;
}

.rec-btn-secondary svg {
  color: var(--fg-secondary);
}

#pause-btn svg {
  color: white;
}

/* Live Transcript */
.live-transcript {
  margin-top: 32px;
  max-height: 300px;
  overflow-y: auto;
  text-align: left;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-subtle);
}

.transcript-line {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease-out;
}

.transcript-line:last-child {
  border-bottom: none;
}

.transcript-line .ts {
  display: inline-block;
  min-width: 60px;
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 500;
  margin-right: 12px;
}

/* Interim (real-time) transcription styling */
.transcript-line.interim {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
  border-bottom: none;
  animation: pulse 1.5s ease-in-out infinite;
}

.transcript-line.interim span:last-child {
  color: var(--fg-secondary);
  font-style: italic;
}

/* --------- RECORDS TAB --------- */
.meetings-panel {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.search-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 15px;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-select {
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 15px;
  cursor: pointer;
  min-width: 180px;
}

.meetings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Meeting Item (from app.js) */
.meeting-item {
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.meeting-item.active {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.meeting-item .meeting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.meeting-item .meeting-title {
  font-weight: 600;
  font-size: 15px;
}

.meeting-item .meeting-meta {
  font-size: 13px;
  color: var(--fg-muted);
}

.meeting-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.meeting-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.meeting-info {
  flex: 1;
}

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

.meeting-meta {
  font-size: 13px;
  color: var(--fg-muted);
}

.meeting-duration {
  font-size: 14px;
  color: var(--fg-secondary);
  font-weight: 500;
}

/* --------- SETTINGS TAB --------- */
.settings-panel {
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.settings-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.settings-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.setting-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.setting-info {
  flex: 1;
}

.setting-label {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.setting-description {
  font-size: 13px;
  color: var(--fg-muted);
}

.setting-control {
  min-width: 180px;
}

.setting-control .setup-select,
.setting-control .setup-input {
  width: 100%;
}

/* --------- SUMMARY TAB --------- */
.summary-panel {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.summary-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.summary-pane {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

.pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.pane-toolbar h3 {
  font-size: 16px;
  font-weight: 600;
  margin-left: -.5rem;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 420px) {
  .toolbar-actions {
    gap: 6px;
    margin-right: -.7rem;
  }
}

.summary-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.summary-content ul,
.summary-content ol {
  padding-left: 24px;
  margin: 12px 0;
}

.summary-content li {
  margin-bottom: 8px;
  line-height: 1.6;
  margin-left: 1rem;
}

.summary-content p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.summary-content h1,
.summary-content h2,
.summary-content h3 {
  margin-top: 20px;
  margin-bottom: 12px;
}

/* Print styles for PDF export - only summary */
@media print {
  body * {
    visibility: hidden;
  }
  .summary-content,
  .summary-content * {
    visibility: visible;
  }
  .summary-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 40px;
    background: white;
    color: black;
  }
  .summary-content ul,
  .summary-content ol {
    padding-left: 30px;
  }
}

/* --------- BUTTONS --------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--fg-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
}

.btn.primary {
  background: var(--gradient-accent);
  border: none;
  color: white;
  box-shadow: var(--shadow-glow);
  scale: 1;
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px var(--accent-glow);
}

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

/* --------- TOAST NOTIFICATIONS --------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.toast {
  padding: 16px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-size: 14px;
  animation: fadeInScale 0.3s ease-out;
  box-shadow: var(--shadow-lg);
  text-align: center;
  white-space: nowrap;
}

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

.toast.error {
  border-color: var(--error);
  background: var(--error-soft);
}

/* --------- OVERLAY --------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation: fadeIn 0.3s ease-out;
}

.overlay-content {
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

/* --------- EMPTY STATE --------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-muted);
}

/* --------- SCROLLBAR --------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-dim);
}

/* --------- RESPONSIVE --------- */
@media (max-width: 1024px) {
  .summary-split {
    grid-template-columns: 1fr;
  }
  
  .summary-pane {
    max-height: 50vh;
  }
}

@media (max-width: 768px) {
  /* Prevent iOS auto-zoom on form fields */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    justify-content: center;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
    z-index: 1000;
  }
  
  .sidebar.expanded {
    width: 100%;
  }

  .sidebar-header {
    display: none;
  }
  
  .sidebar-nav {
    flex-direction: row;
    padding: 8px;
    gap: 4px;
    width: 100%;
    justify-content: center;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .tab-btn {
    width: 56px;
    height: 48px;
    padding: 0;
  }
  
  .tab-label {
    display: none !important;
  }

  /* Settings: stack label + controls for more room */
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .setting-info {
    width: 100%;
  }

  .setting-control {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }
  
  .tab-btn.active::before {
    left: 50%;
    top: 0;
    bottom: auto;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 0 0 3px 3px;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 24px 16px 80px;
  }
  
  body.sidebar-expanded .main-content {
    margin-left: 0 !important;
  }
  
  .container {
    padding-top: 88px;
  }
  
  header {
    padding: 16px;
  }
  
  .sidebar-toggle {
    display: none;
  }
  
  .app-title-img {
    height: 60px;
    margin-top: 1rem;
    margin-left: -1rem;
  }
  
  .meeting-setup-grid {
    grid-template-columns: 1fr;
  }
  
  .recording-time {
    font-size: 48px;
  }
  
  .rec-btn-primary {
    width: 72px;
    height: 72px;
  }
  
  .rec-btn {
    width: 56px;
    height: 56px;
  }
  
  .search-bar {
    flex-direction: column;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .legal-content {
    padding: 16px;
  }
  
  .legal-content h1 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 12px 16px;
  }
  
  .app-subtitle {
    display: none;
  }
  
  .user-credits-label {
    display: none;
  }
  
  .recording-card {
    padding: 24px;
  }
  
  .meeting-setup {
    padding: 20px;
  }
}

/* Credits Dropdown */
.user-credits-wrapper {
  position: relative;
}

.user-credits {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-credits:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
}

.credits-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 1000;
}

.credits-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.credits-dropdown-content {
  padding: 16px;
}

.credits-dropdown-content p {
  margin: 0 0 12px 0;
  color: var(--fg-secondary);
  font-size: 14px;
}

.credits-request-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: .5rem;
}

.credits-request-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.credits-request-btn svg {
  flex-shrink: 0;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-default);
  padding: 16px 24px;
  z-index: 10000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-content p {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 14px;
  flex: 1;
  min-width: 300px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cookie-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
}

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

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: fadeInScale 0.25s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 32px;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--fg-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--error-soft);
  border-color: var(--error);
  color: var(--error);
  transform: rotate(90deg);
}

/* Legal Content (Datenschutz, Impressum) */
.legal-content {
  max-width: 800px;
  padding: 32px;
  line-height: 1.7;
}

.legal-content h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-content .legal-subtitle {
  color: var(--fg-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--fg-primary);
}

.legal-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--fg-primary);
}

.legal-content p {
  margin-bottom: 12px;
  color: var(--fg-secondary);
}

.legal-content ul {
  margin: 0 0 16px 20px;
  color: var(--fg-secondary);
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--fg-primary);
  font-weight: 600;
}

.legal-content a {
  color: var(--accent-primary);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 0;
}

.legal-box p {
  margin-bottom: 8px;
}

.legal-box p:last-child {
  margin-bottom: 0;
}

.legal-date {
  color: var(--fg-muted);
  font-size: 12px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* Credit Package Cards */
.credit-package {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.credit-package:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(24, 187, 247, 0.2);
}

.credit-package-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.credit-package-info p {
  color: var(--fg-muted);
  font-size: 14px;
}

.credit-package-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.credit-package-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.credit-package-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.impressum-modal {
  padding: 32px;
}

.impressum-modal h2 {
  margin: 0 0 24px 0;
  color: var(--fg-primary);
  font-size: 24px;
}

.impressum-modal h3 {
  margin: 20px 0 8px 0;
  color: var(--fg-primary);
  font-size: 16px;
}

.impressum-modal p {
  margin: 0 0 12px 0;
  color: var(--fg-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.impressum-modal a {
  color: var(--accent-primary);
  text-decoration: none;
}

.impressum-modal a:hover {
  text-decoration: underline;
}

/* Impressum Icon (bottom left) */
.impressum-icon {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 36px;
  height: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--fg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 100;
}

.impressum-icon:hover {
  background: var(--bg-tertiary);
  color: var(--fg-primary);
  border-color: var(--accent-primary);
}

/* Remove Summary Editor styles - feature removed */
.summary-editor {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  margin-top: 12px;
}

.summary-editor:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.summary-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
