/* ==========================================================================
   Koder Kall — style.css
   Brand: #6366f1 (indigo) | Dark theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #6366f1;
  --color-primary-hover: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-primary-rgb: 99, 102, 241;
  --color-bg: #0f0f14;
  --color-surface: #1a1a24;
  --color-surface-2: #232333;
  --color-border: #2a2a3a;
  --color-text: #e4e4e7;
  --color-text-muted: #a1a1aa;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--color-primary);
}

img, video {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

::selection {
  background: rgba(var(--color-primary-rgb), 0.3);
  color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-surface-2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border);
}

/* --------------------------------------------------------------------------
   Loading Screen
   -------------------------------------------------------------------------- */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 1rem;
}

.loading-screen p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-surface-2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(15, 15, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
}

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

.navbar-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-links a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.navbar-links a:hover {
  color: var(--color-text);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.navbar-mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(16px);
  z-index: 99;
  padding: 2rem;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.2s ease;
}

.navbar-mobile-menu.active {
  display: flex;
}

.navbar-mobile-menu a {
  color: var(--color-text);
  font-size: 1.125rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.navbar-user-menu {
  position: relative;
}

.navbar-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.875rem;
  transition: all var(--transition);
}

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

.navbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Dropdown Menu
   -------------------------------------------------------------------------- */
.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  z-index: 200;
  animation: slideUp 0.15s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.dropdown-item.danger {
  color: var(--color-danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.25rem 0;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--color-primary-rgb), 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 50% 120%, rgba(var(--color-primary-rgb), 0.08), transparent);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--color-primary-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
  pointer-events: none;
  animation: gridPulse 8s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(var(--color-primary-rgb), 0.1);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--color-primary-hover);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-text), var(--color-primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-description {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Features Section
   -------------------------------------------------------------------------- */
.section {
  padding: 6rem 2rem;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.0625rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: default;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--color-primary-rgb), 0.4);
  box-shadow: 0 8px 32px rgba(var(--color-primary-rgb), 0.1);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   How It Works Section
   -------------------------------------------------------------------------- */
.steps {
  display: flex;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.66% + 40px);
  right: calc(16.66% + 40px);
  height: 2px;
  background: var(--color-border);
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
}

.step h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Open Source Section
   -------------------------------------------------------------------------- */
.opensource {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.opensource-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.opensource-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--color-success);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.opensource-inner h2 {
  margin-bottom: 1rem;
}

.opensource-inner p {
  font-size: 1.0625rem;
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand p {
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 2px 12px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
  box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.4);
  color: #fff;
}

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

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
  background: rgba(var(--color-primary-rgb), 0.05);
}

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.5rem 0.75rem;
}

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

.btn-koder-id {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 2px 12px rgba(var(--color-primary-rgb), 0.3);
  gap: 0.625rem;
}

.btn-koder-id:hover {
  background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
  box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.4);
  color: #fff;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.125rem;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Form Controls
   -------------------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-input,
.form-select {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  color: var(--color-text);
  font-family: var(--font);
  font-size: 0.875rem;
  transition: all var(--transition);
  outline: none;
  width: 100%;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.form-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.form-toggle-track {
  width: 44px;
  height: 24px;
  background: var(--color-surface-2);
  border-radius: 12px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}

.form-toggle-track.active {
  background: var(--color-primary);
}

.form-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.form-toggle-track.active .form-toggle-thumb {
  transform: translateX(20px);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  margin: 1.5rem 0;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.badge-primary {
  background: rgba(var(--color-primary-rgb), 0.12);
  color: var(--color-primary-hover);
}

.badge-muted {
  background: rgba(161, 161, 170, 0.12);
  color: var(--color-text-muted);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

/* --------------------------------------------------------------------------
   Join Page
   -------------------------------------------------------------------------- */
.join-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.join-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.join-card h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.video-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
}

.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.video-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.video-preview-placeholder .icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.video-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.video-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.video-control-btn:hover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
}

.video-control-btn.muted {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.device-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.audio-level {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  justify-content: center;
}

.audio-level-bar {
  width: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: height 0.1s ease;
  min-height: 3px;
}

.audio-level-bar:nth-child(1) { animation: barLevel 0.8s ease-in-out infinite 0s; }
.audio-level-bar:nth-child(2) { animation: barLevel 0.8s ease-in-out infinite 0.1s; }
.audio-level-bar:nth-child(3) { animation: barLevel 0.8s ease-in-out infinite 0.2s; }
.audio-level-bar:nth-child(4) { animation: barLevel 0.8s ease-in-out infinite 0.15s; }
.audio-level-bar:nth-child(5) { animation: barLevel 0.8s ease-in-out infinite 0.05s; }

.audio-level.silent .audio-level-bar {
  animation: none;
  height: 3px;
}

.join-user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(var(--color-primary-rgb), 0.08);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.join-user-badge-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.join-user-badge-info {
  flex: 1;
  min-width: 0;
}

.join-user-badge-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.join-user-badge-email {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */
.dashboard {
  display: flex;
  min-height: calc(100vh - 64px);
}

.dashboard-sidebar {
  width: 240px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-nav-item:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.sidebar-nav-item.active {
  color: var(--color-primary-hover);
  background: rgba(var(--color-primary-rgb), 0.1);
}

.dashboard-main {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 1100px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
}

.quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-join {
  display: flex;
  gap: 0.5rem;
}

.quick-join .form-input {
  width: 220px;
}

/* --------------------------------------------------------------------------
   Stats Cards
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.stat-card-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
}

.stat-card-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Meeting Cards
   -------------------------------------------------------------------------- */
.meetings-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.meeting-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.meeting-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.meeting-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.meeting-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}

.meeting-card-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.meeting-card-info span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meeting-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  color: var(--color-text);
  pointer-events: auto;
  animation: slideIn 0.3s ease;
  max-width: 380px;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast.info {
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1.125rem;
}

.toast.removing {
  animation: slideOut 0.3s ease forwards;
}

/* --------------------------------------------------------------------------
   Auth Callback Page
   -------------------------------------------------------------------------- */
.auth-callback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}

.auth-callback h2 {
  font-size: 1.5rem;
}

.auth-callback p {
  max-width: 400px;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--color-danger);
  font-size: 0.875rem;
  max-width: 400px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

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

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

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

@keyframes barLevel {
  0%, 100% { height: 3px; }
  50% { height: 20px; }
}

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

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   Responsive — Tablet (< 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .dashboard-sidebar {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile (< 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }

  .navbar {
    padding: 0 1rem;
  }

  .navbar-links {
    display: none;
  }

  .navbar-hamburger {
    display: flex;
  }

  .navbar-actions .btn {
    display: none;
  }

  .navbar-actions .navbar-user-menu,
  .navbar-actions .navbar-hamburger {
    display: flex;
  }

  .hero {
    padding: 4rem 1.5rem;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding: 4rem 1.5rem;
  }

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

  .steps {
    flex-direction: column;
    gap: 2rem;
  }

  .steps::before {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .join-card {
    padding: 1.5rem;
  }

  .device-selectors {
    grid-template-columns: 1fr;
  }

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

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

  .dashboard-main {
    padding: 1.5rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-join {
    flex-direction: column;
  }

  .quick-join .form-input {
    width: 100%;
  }

  .modal {
    padding: 1.5rem;
    margin: 1rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    max-width: 100%;
  }
}
