/* ═══════════════════════════════════════════════════════════════
   USG Connect — Complete Stylesheet
   Colors: #F5C518 Yellow | #0D0D0D Black | #64B5F6 Light Blue
           #4CAF50 Green | #8B0000 Deep Dark Red
═══════════════════════════════════════════════════════════════ */

:root {
  --yellow: #F5C518;
  --black: #0D0D0D;
  --light-blue: #64B5F6;
  --green: #4CAF50;
  --red: #8B0000;
  --red-light: #C62828;
  --bg: #0D0D0D;
  --bg2: #141414;
  --bg3: #1A1A1A;
  --bg4: #222222;
  --border: rgba(255,255,255,0.08);
  --text: #F0F0F0;
  --text-muted: #888;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Page accent stripe ────────────────────────────────────── */
.accent-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, #C62828 50%, var(--red) 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
a { color: var(--light-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--yellow); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.15s;
}
.btn:hover::after { opacity: 0.08; }
.btn:active::after { opacity: 0.15; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled::after { display: none; }

.btn-green  { background: var(--green); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-blue   { background: var(--light-blue); color: var(--black); }
.btn-red    { background: var(--red); color: #fff; }
.btn-red-light { background: var(--red-light); color: #fff; }
.btn-ghost  { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.25); }
.btn-icon   { padding: 8px; border-radius: 50%; aspect-ratio: 1; }
.btn-sm     { padding: 6px 14px; font-size: 13px; }
.btn-lg     { padding: 14px 28px; font-size: 16px; }
.btn-full   { width: 100%; justify-content: center; }

/* ── Inputs ────────────────────────────────────────────────── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

input[type="text"], input[type="email"], input[type="password"],
input[type="datetime-local"], textarea, select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(100,181,246,0.15);
  background: var(--bg4);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 80px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg3);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

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

.modal-title { font-size: 20px; color: var(--yellow); }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); }

/* ── Toast notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.hiding { animation: toastOut 0.3s ease forwards; }
.toast-success { background: var(--green); color: #fff; }
.toast-error   { background: var(--red-light); color: #fff; }
.toast-info    { background: var(--light-blue); color: var(--black); }
.toast-warning { background: var(--yellow); color: var(--black); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* ── Loading spinner ───────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg4);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

/* ── Avatar ────────────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--black);
  flex-shrink: 0;
  user-select: none;
}

/* ════════════════════════════════════════════════════════════════
   INDEX PAGE (Login / Register)
════════════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Geometric background animation */
.bg-animation {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  animation: floatShape linear infinite;
}

.bg-shape:nth-child(1) { width: 600px; height: 600px; background: var(--yellow); top: -200px; left: -100px; animation-duration: 25s; }
.bg-shape:nth-child(2) { width: 400px; height: 400px; background: var(--light-blue); bottom: -100px; right: -50px; animation-duration: 20s; animation-delay: -10s; }
.bg-shape:nth-child(3) { width: 300px; height: 300px; background: var(--green); top: 50%; left: 50%; animation-duration: 30s; animation-delay: -5s; }
.bg-shape:nth-child(4) { width: 200px; height: 200px; background: var(--red); top: 20%; right: 10%; animation-duration: 18s; animation-delay: -3s; }

@keyframes floatShape {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); }
  33%  { transform: translate(30px,-40px) rotate(120deg) scale(1.1); }
  66%  { transform: translate(-20px,30px) rotate(240deg) scale(0.95); }
  100% { transform: translate(0,0) rotate(360deg) scale(1); }
}

/* Grid dots overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-text {
  font-size: 36px;
  font-weight: 800;
  color: var(--yellow);
  letter-spacing: -1px;
}

.auth-logo .logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  user-select: none;
}

.auth-tab.active {
  background: var(--bg4);
  color: var(--yellow);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form-panel { display: none; }
.auth-form-panel.active { display: flex; flex-direction: column; gap: 18px; }

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.color-bar {
  display: flex;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
  gap: 2px;
}
.color-bar span { flex: 1; }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD PAGE
════════════════════════════════════════════════════════════════ */

.dashboard-page { min-height: 100vh; padding-top: 4px; }

/* Header */
.dash-header {
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  position: sticky;
  top: 4px;
  z-index: 100;
}

.dash-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--yellow);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.dash-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  margin-left: 8px;
}

.dash-nav-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
}
.dash-nav-btn:hover, .dash-nav-btn.active {
  background: var(--bg3);
  color: var(--text);
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  position: relative;
}

.user-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.user-dropdown-btn:hover { background: var(--bg3); }
.user-dropdown-btn .chevron { color: var(--text-muted); font-size: 12px; transition: var(--transition); }
.user-dropdown-btn.open .chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
  overflow: hidden;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg4); }
.dropdown-item.danger { color: var(--red-light); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Main content */
.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .accent { color: var(--yellow); }

/* Quick actions */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.join-input-group {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}
.join-input-group input { min-width: 0; flex: 1; }

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

.meeting-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.meeting-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--light-blue));
  opacity: 0;
  transition: var(--transition);
}
.meeting-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.meeting-card:hover::before { opacity: 1; }

.meeting-card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.meeting-card-meta { font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.meeting-card-meta span { display: flex; align-items: center; gap: 6px; }

.meeting-card-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: monospace;
  color: var(--yellow);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.meeting-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 15px; }

/* Color showcase bar on dashboard */
.color-showcase {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  align-items: center;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   MEETING PAGE
════════════════════════════════════════════════════════════════ */

.meeting-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  padding-top: 4px;
}

/* Top bar */
.meeting-topbar {
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 50;
}

.meeting-title-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.meeting-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg3);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
  color: var(--green);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.meeting-timer.warning { color: var(--yellow); border-color: rgba(245,197,24,0.3); }
.meeting-timer.danger  { color: #ff4444; border-color: rgba(255,68,68,0.3); animation: pulseTimer 1s infinite; }

@keyframes pulseTimer { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.meeting-topbar-spacer { flex: 1; }

.participant-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Main layout */
.meeting-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Video grid */
.video-grid-container {
  flex: 1;
  overflow: hidden;
  padding: 12px;
  position: relative;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  height: 100%;
  align-content: start;
  overflow-y: auto;
}

.video-tile {
  position: relative;
  background: var(--bg3);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.video-tile.speaking {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(245,197,24,0.3);
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-avatar-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
}

.tile-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tile-name {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-host-badge {
  background: var(--yellow);
  color: var(--black);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tile-indicators {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.tile-indicator {
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Right sidebar */
.meeting-sidebar {
  width: 320px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.meeting-sidebar.open { transform: translateX(0); }

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.sidebar-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.sidebar-tab.active {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

.sidebar-panel { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.sidebar-panel.active { display: flex; }

/* Chat */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-header { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.chat-msg-name { font-size: 12px; font-weight: 700; color: var(--text); }
.chat-msg-time { font-size: 11px; color: var(--text-muted); }
.chat-msg-text {
  font-size: 14px;
  color: var(--text);
  background: var(--bg3);
  border-radius: 0 8px 8px 8px;
  padding: 8px 10px;
  word-break: break-word;
  line-height: 1.4;
}
.chat-msg.self .chat-msg-text {
  background: rgba(100,181,246,0.15);
  border-radius: 8px 0 8px 8px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.chat-input {
  flex: 1;
  resize: none;
  max-height: 100px;
  padding: 10px 12px;
  font-size: 14px;
  min-height: 0;
}

/* Participants */
.participants-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.participant-item:hover { background: var(--bg3); }
.participant-name { flex: 1; font-size: 14px; font-weight: 600; }
.participant-badges { display: flex; gap: 4px; }
.host-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--yellow);
  color: var(--black);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.you-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--bg4);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Bottom controls */
.meeting-controls {
  height: 72px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  flex-shrink: 0;
}

.ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  min-width: 64px;
  font-size: 11px;
  font-weight: 600;
}
.ctrl-btn:hover { background: var(--bg4); }
.ctrl-btn.active { background: var(--light-blue); color: var(--black); }
.ctrl-btn.muted  { background: var(--red-light); color: #fff; }
.ctrl-btn.recording-active { background: rgba(198,40,40,0.3); color: #ff6666; }
.ctrl-btn .ctrl-icon { font-size: 20px; line-height: 1; }
.ctrl-btn-leave {
  background: var(--red);
  color: #fff;
  min-width: 80px;
}
.ctrl-btn-leave:hover { background: #6B0000; }

/* Recording indicator */
.recording-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(139,0,0,0.3);
  border: 1px solid var(--red);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ff6666;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-light);
  animation: recPulse 1.2s ease infinite;
}
@keyframes recPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Meeting ended overlay */
.meeting-ended-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  padding: 24px;
}
.meeting-ended-overlay h2 { font-size: 32px; color: var(--yellow); }
.meeting-ended-overlay p { color: var(--text-muted); font-size: 15px; }
.meeting-ended-overlay .end-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .auth-card { padding: 28px 20px; }
  .dash-main { padding: 20px 16px; }
  .quick-actions { flex-direction: column; }
  .meetings-grid { grid-template-columns: 1fr; }
  .meeting-sidebar { position: absolute; right: 0; top: 0; bottom: 0; z-index: 80; box-shadow: var(--shadow); }
  .meeting-title-text { max-width: 120px; }
  .ctrl-btn { min-width: 52px; padding: 8px; font-size: 10px; }
  .ctrl-btn-leave { min-width: 60px; }
  .video-grid { grid-template-columns: 1fr; }
  .meeting-topbar { padding: 0 10px; gap: 8px; }
  .dash-nav { display: none; }
}

@media (max-width: 480px) {
  .auth-card { border-radius: 16px; }
  .modal { padding: 24px 20px; }
  .meeting-controls { gap: 4px; padding: 0 8px; }
  .ctrl-btn .ctrl-icon { font-size: 18px; }
}
