/* ==========================================================================
   TokPulse - Automated TikTok Video Scheduler & Publisher Platform
   Color Palette: Deep Cyber Black, Electric Blue, High-Tech Gray
   ========================================================================== */

:root {
  /* Black Palette */
  --bg-deep: #05070c;
  --bg-dark: #0a0e17;
  --bg-card: #0f1624;
  --bg-surface: #141c2e;
  --bg-input: #0b111e;

  /* Electric Blue Palette */
  --blue-primary: #3b82f6;
  --blue-vibrant: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-light: #60a5fa;
  --blue-glow: rgba(59, 130, 246, 0.35);
  --cyan-neon: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.4);

  /* Gray Palette */
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f8fafc;

  /* Accents */
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber: #f59e0b;
  --rose: #f43f5e;

  /* Shadows & Borders */
  --border-subtle: 1px solid rgba(51, 65, 85, 0.6);
  --border-focus: 1px solid #3b82f6;
  --shadow-neon: 0 8px 30px rgba(37, 99, 235, 0.25);
  --shadow-card: 0 10px 35px rgba(0, 0, 0, 0.5);
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-deep);
  color: var(--gray-300);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   App Layout: Sleek Cyber Sidebar + Main Workspace
   ========================================================================== */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-dark);
  border-right: var(--border-subtle);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-800);
  margin-bottom: 24px;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-title span {
  color: var(--cyan-neon);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
  background: var(--bg-surface);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(15, 22, 36, 0.6) 100%);
  border-color: var(--blue-primary);
  color: #ffffff;
}

.nav-item img {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.nav-item.active img {
  opacity: 1;
  filter: drop-shadow(0 0 4px var(--blue-light));
}

.sidebar-account-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--blue-primary);
  object-fit: cover;
  background: var(--bg-deep);
}

.account-meta h4 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.account-meta p {
  font-size: 11px;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Modern Top Header */
.topbar {
  background: var(--bg-dark);
  border-bottom: var(--border-subtle);
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.queue-ticker {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-light);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background: var(--cyan-neon);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan-neon);
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Button Component Hierarchy */
.btn-cyber {
  background: linear-gradient(135deg, var(--blue-vibrant), var(--blue-deep));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px var(--blue-glow);
}

.btn-cyber:hover {
  background: linear-gradient(135deg, #3b82f6, var(--blue-vibrant));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--gray-200);
  border: var(--border-subtle);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--gray-800);
  border-color: var(--gray-600);
  color: #ffffff;
}

.btn-instant-post {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-instant-post:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Content Container */
.content-body {
  padding: 30px;
  flex: 1;
}

/* Metric Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-primary);
}

.kpi-glow-accent {
  position: absolute;
  top: 0; right: 0;
  width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

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

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-value {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--gray-500);
}

/* Main Dashboard Two-Column Split */
.dashboard-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 25px;
}

/* Video Queue Section */
.queue-panel {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

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

.panel-title h2 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title p {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 2px;
}

.panel-actions {
  display: flex;
  gap: 10px;
}

/* Video Table List */
.video-queue-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-queue-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.2s ease;
}

.video-queue-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.video-thumb-wrap {
  width: 64px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--bg-deep);
  border: 1px solid var(--gray-700);
  cursor: pointer;
}

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

.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-thumb-wrap:hover .video-play-overlay {
  opacity: 1;
}

.video-meta-col {
  flex: 1;
  min-width: 0;
}

.video-caption {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-sub-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-400);
  flex-wrap: wrap;
}

.video-account-tag {
  color: var(--blue-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.interval-pill {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan-neon);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.queued {
  background: rgba(59, 130, 246, 0.2);
  color: var(--blue-light);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.status-badge.published {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* TikTok Mobile Player Simulator */
.preview-panel {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup {
  width: 280px;
  height: 540px;
  background: #000000;
  border: 10px solid #1e293b;
  border-radius: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(59, 130, 246, 0.2);
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background-size: cover;
  background-position: center;
}

.phone-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.phone-overlay {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.phone-creator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.phone-creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.phone-creator-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.phone-caption-text {
  font-size: 12px;
  line-height: 1.3;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.phone-sound-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #e2e8f0;
}

.spinning-disc {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111, #333);
  border: 4px solid #222;
  animation: spin 3s linear infinite;
}

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

.phone-right-actions {
  position: absolute;
  right: 10px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 3;
}

.phone-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.phone-action-icon {
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-xl);
  padding: 30px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--blue-glow);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-300);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   TokPulse Executive Admin Operations Console Styles
   ========================================================================== */
body.admin-body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-deep);
  color: var(--gray-300);
}

.admin-header {
  width: 100%;
  background: rgba(10, 15, 29, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.admin-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0d1b38, #050811);
  border: 1px solid #3b82f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.35);
}

.admin-brand-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.admin-brand-title span {
  color: var(--cyan-neon);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.admin-brand-badge {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.admin-status-pill .pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-dot 1.5s infinite;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
}

.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-primary);
}

.admin-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.admin-user-role {
  font-size: 10px;
  color: var(--blue-light);
  background: rgba(59, 130, 246, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.admin-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 28px 70px 28px;
  box-sizing: border-box;
  flex: 1;
}

/* Login Wrapper & Card */
.admin-login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
  width: 100%;
}

.admin-login-card {
  max-width: 480px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-xl);
  padding: 42px 36px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 35px rgba(37, 99, 235, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.admin-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00f2fe, #3b82f6, #00f2fe);
}

.demo-access-box {
  background: rgba(13, 27, 56, 0.7);
  border: 1px dashed rgba(59, 130, 246, 0.6);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 26px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-buyer-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4), 0 0 15px rgba(0, 242, 254, 0.3);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.btn-buyer-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.6), 0 0 25px rgba(0, 242, 254, 0.5);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Admin Action Bar */
.admin-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 28px;
}

.admin-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Quick Interval Dropdown */
.interval-btn-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.interval-btn-item {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  text-decoration: none;
  border-right: 1px solid var(--border-subtle);
  transition: background 0.2s, color 0.2s;
}

.interval-btn-item:last-child {
  border-right: none;
}

.interval-btn-item:hover, .interval-btn-item.active {
  background: rgba(37, 99, 235, 0.3);
  color: #ffffff;
}

/* Table Enhancements */
.admin-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 30px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: var(--bg-surface);
  padding: 14px 18px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-300);
  border-bottom: 1px solid var(--gray-700);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  color: var(--gray-400);
  vertical-align: middle;
}

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

.admin-table tr:hover {
  background: rgba(20, 28, 46, 0.5);
}

.video-mini-thumb {
  width: 52px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  background: var(--bg-deep);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.code-box {
  background: #050811;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow-x: auto;
}

/* Modal Styling */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 99, 235, 0.25);
  position: relative;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .admin-header {
    padding: 12px 20px;
  }
  .admin-container {
    padding: 20px 16px 50px 16px;
  }
  .dashboard-split {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .admin-nav-actions {
    width: 100%;
    justify-content: space-between;
  }
  .admin-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-action-group {
    flex-direction: column;
    width: 100%;
  }
  .admin-action-group > * {
    width: 100%;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .content-body {
    padding: 16px;
  }
}
