/* ============================================================================
   Screen Recorder & Instant Replay — Stylesheet
   Slikyface Dark Aesthetic (Neon Violet & Cyan Accents)
   100% Client-Side Privacy, Responsive Design
   ============================================================================ */

:root {
  --rec-purple: #a855f7;
  --rec-purple-dim: rgba(168, 85, 247, 0.15);
  --rec-purple-border: rgba(168, 85, 247, 0.35);
  --rec-cyan: #38bdf8;
  --rec-cyan-dim: rgba(56, 189, 248, 0.15);
  --rec-lime: #b8ff36;
  --rec-bg: #070907;
  --rec-card-bg: #0b110c;
  --rec-card-inner: #070d08;
  --rec-border: #162417;
  --rec-border-light: #243525;
  --rec-text: #e2e8f0;
  --rec-muted: #94a3b8;
}

/* ============================================================================
   Hero Section & Eyebrow
   ============================================================================ */
.rec-hero {
  text-align: center;
  padding: 40px 16px 24px;
}

.rec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rec-purple-dim);
  border: 1px solid var(--rec-purple-border);
  color: var(--rec-purple);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.rec-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--rec-purple);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--rec-purple);
}

.rec-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: #ffffff;
}

.rec-title span {
  color: var(--rec-purple);
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.rec-subtitle {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.rec-desc {
  max-width: 640px;
  margin: 0 auto 20px;
  color: var(--rec-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Privacy Shield Banner */
.rec-privacy-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: left;
}

.rec-privacy-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.rec-privacy-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.rec-privacy-text strong {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

/* Active Work Protection Banner */
.active-work-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 16px auto 0;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: left;
}

.active-work-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.active-work-text {
  font-size: 12px;
  color: #fef08a;
  line-height: 1.45;
  flex: 1;
}

.active-work-text strong {
  display: block;
  color: #fef08a;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}

.btn-banner-reauth {
  background: #facc15;
  color: #070907;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-banner-reauth:hover {
  background: #eab308;
}

/* ============================================================================
   Auth Gate
   ============================================================================ */
.rec-auth-gate-section {
  margin: 24px 0 40px;
  display: flex;
  justify-content: center;
}

.auth-gate-card {
  background: var(--rec-card-bg);
  border: 1px solid var(--rec-border);
  border-radius: 12px;
  padding: 36px 24px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.auth-gate-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.auth-gate-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.auth-gate-card p {
  color: var(--rec-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.auth-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-action {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action.primary {
  background: var(--rec-purple);
  color: #ffffff;
}

.btn-action.primary:hover {
  background: #c084fc;
}

.btn-action.secondary {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
}

.btn-action.secondary:hover {
  background: #334155;
}

/* ============================================================================
   Completed Recordings Temporary Storage (Max 10 / 500 MB / 24 Hours)
   ============================================================================ */
.completed-storage-section {
  background: #090e09;
  border: 1px solid var(--rec-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
}

.storage-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.storage-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.storage-panel-title h3 {
  font-size: 16px;
  font-weight: 850;
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.storage-badge {
  background: var(--rec-purple-dim);
  color: var(--rec-purple);
  border: 1px solid var(--rec-purple-border);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.storage-badge.storage-quota-full {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.storage-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.storage-auto-delete-note {
  color: var(--rec-muted);
  font-size: 11px;
}

.btn-subtle {
  background: transparent;
  border: 1px solid var(--rec-border);
  color: var(--rec-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle:hover {
  color: #ffffff;
  border-color: #334155;
}

.storage-quota-full-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #fef3c7;
}

.storage-quota-full-notice .quota-full-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.storage-quota-full-notice .quota-full-text {
  font-size: 12px;
  line-height: 1.45;
}

.storage-quota-full-notice .quota-full-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 2px;
}

.completed-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.completed-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--rec-muted);
  font-size: 13px;
  background: #081008;
  border: 1px dashed var(--rec-border);
  border-radius: 8px;
}

.completed-video-card {
  background: #0c140c;
  border: 1px solid var(--rec-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030603;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card-thumb-wrap video,
.video-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-mode-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.video-card-duration-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.video-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--rec-muted);
}

.video-card-expires {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 11px;
}

.video-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-card-action {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--rec-border);
  background: #1e293b;
  color: #ffffff;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-card-action:hover {
  background: #334155;
}

.btn-card-action.primary {
  background: var(--rec-purple);
  border-color: var(--rec-purple);
}

.btn-card-action.primary:hover {
  background: #c084fc;
}

.btn-card-import {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  width: 100%;
  transition: background 0.15s ease;
}

.btn-card-import:hover {
  background: #334155;
}

/* ============================================================================
   Workspace Container & Mode Tabs
   ============================================================================ */
.rec-workspace-card {
  background: var(--rec-card-bg);
  border: 1px solid var(--rec-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.rec-workspace-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.mode-tabs-row {
  display: flex;
  gap: 6px;
  background: #060a06;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--rec-border);
}

.mode-tab {
  background: transparent;
  border: none;
  color: var(--rec-muted);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.mode-tab:hover {
  color: #ffffff;
}

.mode-tab.active {
  background: var(--rec-purple);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.4);
}

/* Mode 2 (Replay) active accent can be cyan */
.mode-tab.active[data-mode="replay"] {
  background: var(--rec-cyan);
  color: #041017;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

/* ============================================================================
   Screen Recorder & Instant Replay Layouts
   ============================================================================ */
.recorder-workspace-wrap,
.replay-workspace-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.recorder-toolbar {
  background: var(--rec-card-inner);
  border: 1px solid var(--rec-border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.recorder-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}

.recorder-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--rec-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recorder-select {
  background: #081008;
  border: 1px solid var(--rec-border);
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.recorder-select:focus {
  outline: none;
  border-color: var(--rec-purple);
}

/* Central State Views */
.recorder-state-view,
.replay-state-view {
  background: var(--rec-card-inner);
  border: 1px solid var(--rec-border);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rec-idle-icon,
.replay-idle-icon {
  font-size: 54px;
  margin-bottom: 14px;
}

.recorder-state-view h2,
.replay-state-view h2 {
  font-size: 24px;
  font-weight: 850;
  color: #ffffff;
  margin: 0 0 8px;
}

.recorder-state-view p,
.replay-state-view p {
  color: var(--rec-muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 24px;
}

/* Primary Action Buttons */
.btn-primary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-start-rec {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.btn-start-rec:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.55);
}

.rec-record-dot {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
}

.btn-start-replay {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #041017;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.btn-start-replay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
}

.replay-lightning {
  font-size: 16px;
}

.rec-feature-pills,
.replay-feature-pills {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

/* Active Recording State */
.rec-live-badge-wrap,
.replay-live-badge-wrap {
  margin-bottom: 14px;
}

.rec-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.rec-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  animation: recPulse 1s ease-in-out infinite;
}

@keyframes recPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #ef4444; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.rec-timer-display {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  margin-bottom: 12px;
}

.rec-progress-bar {
  width: 100%;
  max-width: 440px;
  height: 8px;
  background: #111a12;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 14px;
}

.rec-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 4px;
  transition: width 0.2s linear;
}

.rec-active-hint {
  font-size: 12px;
  color: var(--rec-muted);
  margin-bottom: 20px;
}

.rec-controls-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-rec-control {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--rec-border);
  background: #1e293b;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-rec-control:hover {
  background: #334155;
}

.btn-rec-control.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.btn-rec-control.danger:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Completed Recording Preview */
.rec-preview-header {
  margin-bottom: 14px;
}

.rec-success-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}

.rec-preview-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.rec-player-wrap {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid var(--rec-border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 14px;
}

.rec-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rec-meta-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.meta-pill {
  background: #0d170e;
  border: 1px solid var(--rec-border);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.rec-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary-action {
  background: var(--rec-purple);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary-action:hover {
  background: #c084fc;
}

.btn-secondary-action {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: #334155;
}

/* System Stop Notice */
.rec-system-stop-notice {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
  max-width: 640px;
  width: 100%;
}

/* ============================================================================
   Instant Replay State & Rolling Buffer
   ============================================================================ */
.replay-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.replay-pulse {
  width: 10px;
  height: 10px;
  background: #38bdf8;
  border-radius: 50%;
  animation: replayNeonPulse 1.2s ease-in-out infinite;
}

@keyframes replayNeonPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #38bdf8; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.replay-status-text {
  font-size: 20px;
  font-weight: 850;
  color: #ffffff;
  margin-bottom: 6px;
}

.replay-gauge-text {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 24px;
}

.replay-clip-actions-box {
  background: #081008;
  border: 1px solid var(--rec-border);
  border-radius: 10px;
  padding: 18px 24px;
  max-width: 500px;
  width: 100%;
  margin: 0 auto 16px;
}

.replay-clip-actions-box h4 {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.replay-save-buttons-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-save-replay {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-replay:hover {
  background: #334155;
  border-color: #475569;
}

.btn-save-replay.primary {
  background: var(--rec-cyan);
  color: #070907;
  border-color: var(--rec-cyan);
}

.btn-save-replay.primary:hover {
  background: #7dd3fc;
}

.btn-save-replay.highlight {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  font-weight: 800;
}

.btn-save-replay.highlight:hover {
  background: #0369a1;
}

.replay-live-notice {
  font-size: 11px;
  color: #64748b;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.45;
}

.btn-stop-replay {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-stop-replay:hover {
  background: rgba(239, 68, 68, 0.15);
}

.replay-latest-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rec-border);
  width: 100%;
}

/* ============================================================================
   Pending Replay Clips Queue (Max 3 Clips)
   ============================================================================ */
.pending-clips-card {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rec-border);
  width: 100%;
}

.pending-clips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.pending-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pending-title-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
}

.pending-mem-tag {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

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

.btn-subtle-primary {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #0369a1;
  transition: background 0.15s ease;
}

.btn-subtle-primary:hover {
  background: #0369a1;
}

.btn-subtle-danger {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  transition: background 0.15s ease;
}

.btn-subtle-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.pending-queue-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
}

.pending-clips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pending-clip-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.15s ease;
}

.pending-clip-item:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.pending-clip-thumb-wrap {
  width: 140px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pending-clip-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-clip-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.pending-clip-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  word-break: break-all;
}

.pending-clip-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.pending-clip-pill {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 6px;
}

.pending-clip-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.btn-clip-action {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-clip-dl {
  background: #0284c7;
  color: #ffffff;
}

.btn-clip-dl:hover {
  background: #0369a1;
}

.btn-clip-preview {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

.btn-clip-preview:hover {
  background: #334155;
}

.btn-clip-import {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

.btn-clip-import:hover {
  background: #334155;
}

.btn-clip-discard {
  background: transparent;
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-clip-discard:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ============================================================================
   Real Audio Activity Meter & Status Indicators
   ============================================================================ */
.audio-monitor-card {
  width: 100%;
  max-width: 520px;
  margin: 12px auto 14px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.audio-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.audio-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.audio-source-pill.warn {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #facc15;
}

.audio-source-pill.none {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.audio-level-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.audio-meter-track {
  width: 100%;
  height: 8px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #22c55e 65%, #eab308 85%, #ef4444 100%);
  transition: width 60ms ease-out;
}

.audio-warning-msg {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fef08a;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
}

.live-audio-feedback-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 520px;
  margin: 6px auto 12px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
  text-align: center;
}

.preview-audio-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 8px auto 14px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-sizing: border-box;
}

.preview-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.preview-audio-badge.enabled {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.preview-audio-badge.silent {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.preview-audio-help {
  font-size: 12px;
  color: var(--rec-muted);
  line-height: 1.4;
  text-align: left;
}

/* ============================================================================
   Modals: Diagnostics & Logout Protection
   ============================================================================ */
.diag-drawer-overlay,
.logout-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.diag-drawer-card,
.logout-modal-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.logout-modal-card {
  max-width: 480px;
  text-align: center;
}

.logout-modal-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.logout-modal-card h3 {
  font-size: 20px;
  font-weight: 850;
  color: #ffffff;
  margin: 0 0 10px;
}

.logout-modal-card p {
  font-size: 13px;
  color: var(--rec-muted);
  line-height: 1.5;
  margin: 0 0 20px;
}

.logout-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-modal-cancel {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-cancel:hover {
  background: #334155;
}

.btn-modal-confirm {
  background: #dc2626;
  border: none;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-confirm:hover {
  background: #b91c1c;
}

.diag-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 12px;
}

.diag-drawer-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #f8fafc;
}

.btn-modal-close,
.btn-close-diag {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.btn-modal-close:hover,
.btn-close-diag:hover {
  color: #ffffff;
}

/* Diagnostics Toggle & Log */
.diag-toggle-wrap {
  margin-top: 18px;
  text-align: center;
}

.btn-toggle-diag {
  background: transparent;
  border: 1px dashed #334155;
  color: #64748b;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-diag:hover {
  color: #94a3b8;
  border-color: #64748b;
}

.diag-log-view {
  background: #040704;
  border: 1px solid var(--rec-border);
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #4ade80;
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 180px;
  max-height: 380px;
  margin: 0 0 14px;
}

.diag-drawer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Toast Notifications */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-box.success {
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

.toast-box.error {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.toast-box.info {
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

/* Responsive Rules */
@media (max-width: 640px) {
  .pending-clip-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pending-clip-thumb-wrap {
    width: 100%;
    height: 140px;
  }
  .pending-clip-actions {
    justify-content: flex-start;
  }
  .rec-workspace-card {
    padding: 16px 12px;
  }
  .recorder-state-view,
  .replay-state-view {
    padding: 24px 14px;
  }
  .rec-timer-display {
    font-size: 30px;
  }
}

/* User Auth Pill in Topbar */
.user-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 6px;
}

.user-pill-email {
  color: var(--rec-cyan, #00f0ff);
  font-weight: 600;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout-header {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout-header:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ffffff;
}

/* Modal Stop & Download Button */
.btn-modal-stop-download {
  background: #0284c7;
  border: none;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-modal-stop-download:hover {
  background: #0369a1;
}

/* Inline Reauthentication Modal */
.inline-auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.inline-auth-card {
  background: #0b0f19;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

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

.inline-auth-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-auth-icon {
  font-size: 20px;
}

.inline-auth-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: #ffffff;
}

.inline-auth-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.5;
}

.inline-auth-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 14px;
}

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

.inline-auth-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.inline-auth-form .form-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.inline-auth-form .form-input:focus {
  border-color: #38bdf8;
}

.inline-auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.inline-auth-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1e293b;
  font-size: 11px;
  text-align: center;
  color: #64748b;
}

.inline-auth-footer a {
  color: #38bdf8;
  text-decoration: none;
}

.inline-auth-footer a:hover {
  text-decoration: underline;
}
