/* 🎨 UpStrainers Admin Panel - Style System */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Mrs+Saint+Delafield&family=Playfair+Display:ital,wght@1,600&display=swap');

:root {
  --bg-primary: #070B19;
  --bg-surface: #0E162D;
  --bg-card: #141F3C;
  --bg-card-hover: #1C2B52;
  --primary: #E5A93C;
  --primary-hover: #F2C063;
  --primary-glow: rgba(229, 169, 60, 0.15);
  --accent: #E5A93C;
  --error: #FF4A4A;
  --error-glow: rgba(255, 74, 74, 0.15);
  --success: #2EE59D;
  --success-glow: rgba(46, 229, 157, 0.15);
  --text-main: #FFFFFF;
  --text-sub: #A0AEC0;
  --text-hint: #718096;
  --border-color: #23355A;
  --sidebar-width: 330px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(20, 31, 60, 0.6);
  --glass-border: rgba(35, 53, 90, 0.8);
  --glass-blur: blur(12px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 🔐 Login Screen Glassmorphism */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 10% 20%, rgba(229, 169, 60, 0.05) 0%, rgba(7, 11, 25, 1) 90%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.6s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo i {
  font-size: 48px;
  color: var(--primary);
  filter: drop-shadow(0 0 10px rgba(229, 169, 60, 0.3));
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.login-logo p {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 4px;
}

/* 🏢 Admin Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 📂 Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100;
  transition: var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header i {
  font-size: 28px;
  color: var(--primary);
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.sidebar-badge {
  margin-right: auto;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-width: 20px;
  animation: pulseBadge 2s infinite;
}

.sidebar-badge.info {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.45);
}

.sidebar-badge.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
}

@keyframes pulseBadge {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.menu-item a:hover {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.menu-item.active a {
  color: var(--bg-primary);
  background-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 8px 20px var(--primary-glow);
}

.menu-item.active a i {
  color: var(--bg-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  color: var(--error);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition-fast);
  background: none;
  border: none;
  width: 100%;
  text-align: right;
  cursor: pointer;
}

.logout-btn:hover {
  background-color: var(--error-glow);
}


/* 📱 Mobile Topbar & Overlay */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  margin: -32px -32px 24px -32px;
}
.mobile-topbar h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.mobile-topbar button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-overlay.show {
  display: block;
  opacity: 1;
}

/* 📄 Main Content Area */
.main-content {
  margin-right: var(--sidebar-width);
  flex-grow: 1;
  padding: 32px;
  min-height: 100vh;
  transition: var(--transition-normal);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.content-header h1 {
  font-size: 26px;
  font-weight: 800;
}

.content-header p {
  color: var(--text-sub);
  font-size: 14px;
  margin-top: 4px;
}

/* 📊 Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(229, 169, 60, 0.08);
}

.stat-info h3 {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-info .value {
  font-size: 28px;
  font-weight: 800;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.primary { background-color: var(--primary-glow); color: var(--primary); }
.stat-icon.success { background-color: var(--success-glow); color: var(--success); }
.stat-icon.error { background-color: var(--error-glow); color: var(--error); }

/* 📉 Dashboard Charts & Logs */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  height: 100%;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 📜 Logs List */
.log-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-left: 4px;
}

.log-item {
  padding: 12px 16px;
  background-color: var(--bg-card);
  border-radius: 12px;
  border-right: 4px solid var(--primary);
  font-size: 13px;
  animation: slideIn 0.3s ease;
}

.log-item.login { border-right-color: var(--success); }
.log-item.video { border-right-color: var(--primary); }

.log-time {
  color: var(--text-hint);
  font-size: 11px;
  margin-top: 4px;
  display: block;
}

/* 📑 Tabs/Sections Viewports */
.viewport-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.viewport-section.active {
  display: block;
}

/* ⌨️ Custom Form Controls */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.input-ctrl, .select-ctrl, .textarea-ctrl {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  transition: var(--transition-fast);
  outline: none;
}

.input-ctrl:focus, .select-ctrl:focus, .textarea-ctrl:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 🔘 Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
}

.btn-danger {
  background-color: var(--error);
  color: var(--text-main);
}

.btn-danger:hover {
  background-shadow: 0 4px 15px var(--error-glow);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 8px;
}

/* 👥 Table & Lists Layouts */
.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background-color: var(--bg-surface);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 14px;
}

.admin-table th {
  background-color: rgba(35, 53, 90, 0.4);
  padding: 16px 20px;
  font-weight: 700;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background-color: rgba(28, 43, 82, 0.2);
}

/* 🏷️ Status Badges */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge-active { background-color: var(--success-glow); color: var(--success); }
.badge-inactive { background-color: var(--error-glow); color: var(--error); }
.badge-admin { background-color: var(--primary-glow); color: var(--primary); }
.badge-primary { background-color: rgba(229, 169, 60, 0.15); color: #e5a93c; }
.badge-secondary { background-color: rgba(255, 255, 255, 0.08); color: #cbd5e1; }

/* 📚 Courses List view */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.course-card-web {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.course-card-web:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(229, 169, 60, 0.08);
}

.course-thumb {
  height: 180px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.course-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: rgba(7, 11, 25, 0.85);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

.course-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.course-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-sub);
}

.course-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(14, 22, 45, 0.5);
}

/* 🖼️ Modals / Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(7, 11, 25, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  transform: translateY(20px);
  transition: var(--transition-normal);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

/* 📝 Episodes List Manager in Dialog */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.episode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.episode-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.episode-info h4 {
  font-size: 13px;
  font-weight: 700;
}

.episode-info p {
  font-size: 11px;
  color: var(--text-sub);
}

.episode-item-actions {
  display: flex;
  gap: 8px;
}

/* 🍞 Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 16px 24px;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-right: 4px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 600;
  animation: slideInLeft 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.success { border-right-color: var(--success); }
.toast.error { border-right-color: var(--error); }

/* ⚙️ Settings Layout Grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

/* 📉 Responsive Adjustments */
@media (max-width: 991px) {
  .dashboard-grid, .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-topbar {
    display: flex;
  }
  .sidebar {
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    flex-direction: column;
    bottom: 0;
    top: 0;
    right: -300px; /* Hidden offscreen */
    border-left: 1px solid var(--border-color);
    border-top: none;
    padding: 24px 16px 32px 16px;
    justify-content: flex-start;
    align-items: stretch;
    background: var(--bg-surface);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
  }
  .sidebar.show {
    right: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
  .sidebar-header {
    display: flex;
  }
  .sidebar-menu {
    flex-direction: column;
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
    margin: 0;
    padding: 0 0 20px 0;
  }
  .menu-item {
    flex: none;
  }
  .menu-item a {
    flex-direction: row;
    padding: 14px 16px;
    gap: 12px;
    border-radius: 12px;
    font-size: 15px;
    text-align: right;
    color: var(--text-sub);
  }
  .menu-item a i {
    font-size: 22px;
    margin: 0;
  }
  .menu-item a span {
    display: block;
    font-size: 15px;
  }
  .menu-item.active a {
    background: var(--bg-primary);
    color: var(--bg-card);
  }
  .menu-item.active a::before {
    display: block;
  }
  .sidebar-footer {
    display: flex;
    margin-top: auto;
    padding-bottom: 24px;
  }
  .main-content {
    margin-right: 0;
    margin-bottom: 0;
    padding: 32px 16px 16px 16px;
  }
  .mobile-topbar {
    margin: -32px -16px 24px -16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-controls .input-ctrl, .filter-controls .btn {
    width: 100%;
  }
  .modal-box {
    max-width: 94vw;
    padding: 20px 16px;
    border-radius: 16px;
  }
}

/* Responsive Constraints */
.card {
  max-width: 100%;
  overflow: hidden;
}
.main-content {
  max-width: 100vw;
  overflow-x: hidden;
}

.card {
  background: linear-gradient(145deg, rgba(20, 31, 60, 0.8), rgba(14, 22, 45, 0.9));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.stat-card {
  background: linear-gradient(135deg, rgba(20, 31, 60, 0.9), rgba(14, 22, 45, 1));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-normal);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 16px;
  text-align: right;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 13px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 14px;
  vertical-align: middle;
  transition: background 0.2s ease;
}
.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* 🖼️ Dual-mode Image Upload Tabs */
.image-input-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.img-tab {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-sub);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.img-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.img-tab.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.file-input-ctrl {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1.5px dashed var(--border-color);
  border-radius: 10px;
  color: var(--text-sub);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.file-input-ctrl:hover {
  border-color: var(--primary);
}
.img-preview-wrap {
  margin-top: 10px;
}
.img-preview-wrap img {
  max-height: 140px;
  max-width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  object-fit: cover;
}
.img-upload-progress {
  margin-top: 8px;
  font-size: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ⭐ Reviews & Ratings Panel */
.reviews-card {
  overflow: hidden;
}

.reviews-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-hint);
  font-size: 14px;
}

.reviews-empty-state i {
  font-size: 32px;
  opacity: 0.5;
}

/* Pending request cards */
.pending-review-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(20, 31, 60, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pending-review-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08);
}

.pending-review-card:last-child {
  margin-bottom: 0;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.review-card-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #c47d1a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.review-card-user-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.review-card-user-info small {
  font-size: 11px;
  color: var(--text-hint);
}

.review-card-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.review-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .review-card-body {
    grid-template-columns: 1fr;
  }
}

.review-card-field {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 12px 14px;
}

.review-card-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-hint);
  margin-bottom: 6px;
}

.review-card-field .field-value {
  font-size: 13px;
  color: var(--text-main);
  word-break: break-word;
  line-height: 1.5;
}

.review-stars {
  color: #E5A93C;
  font-size: 15px;
  letter-spacing: 2px;
}

.review-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.review-card-date {
  font-size: 11px;
  color: var(--text-hint);
}

.review-card-actions {
  display: flex;
  gap: 8px;
}

/* Active review cards */
.active-review-card {
  background: rgba(14, 22, 45, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  transition: border-color 0.2s;
}

.active-review-card:hover {
  border-color: rgba(229, 169, 60, 0.3);
}

.active-review-card:last-child {
  margin-bottom: 0;
}

.active-review-left {
  min-width: 0;
}

.active-review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.active-review-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.active-review-course-badge {
  background: rgba(229, 169, 60, 0.1);
  color: var(--primary);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.active-review-id {
  font-size: 10px;
  color: var(--text-hint);
  margin-bottom: 8px;
}

.active-review-comment {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-top: 8px;
}

.active-review-date {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 6px;
}

.active-review-right {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .active-review-card {
    grid-template-columns: 1fr;
  }

  .review-card-header {
    flex-direction: column;
  }
}

/* ─── Reviews Count Badge ─── */
.reviews-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 169, 60, 0.08);
  border: 1px solid rgba(229, 169, 60, 0.2);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.reviews-count-badge i {
  color: var(--primary);
}

.reviews-count-badge strong {
  color: var(--text-main);
  font-size: 15px;
}

/* ─── Reviews Table Wrapper (scrollable) ─── */
.reviews-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  -webkit-overflow-scrolling: touch;
  /* Smooth scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.reviews-table-wrap::-webkit-scrollbar {
  height: 5px;
}
.reviews-table-wrap::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 99px;
}

/* ─── The Table Itself ─── */
.reviews-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
}

/* Header */
.reviews-table thead tr {
  background: linear-gradient(90deg, rgba(229,169,60,0.07) 0%, rgba(35,53,90,0.5) 100%);
  border-bottom: 1.5px solid var(--border-color);
}

.reviews-table thead th {
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-sub);
  white-space: nowrap;
}

/* Rows */
.reviews-table tbody tr {
  border-bottom: 1px solid rgba(35, 53, 90, 0.5);
  transition: background 0.15s;
}

.reviews-table tbody tr:last-child {
  border-bottom: none;
}

.reviews-table tbody tr:hover {
  background: rgba(28, 43, 82, 0.35);
}

.reviews-table tbody td {
  padding: 14px 18px;
  vertical-align: middle;
}

/* Column widths */
.rt-col-num    { width: 44px; text-align: center; }
.rt-col-student{ min-width: 170px; }
.rt-col-course { min-width: 140px; }
.rt-col-rating { width: 100px; text-align: center; }
.rt-col-comment{ min-width: 200px; }
.rt-col-date   { width: 120px; white-space: nowrap; color: var(--text-hint); font-size: 12px; }
.rt-col-action { width: 60px; text-align: center; }

/* Row number */
.rt-row-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(229, 169, 60, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

/* User cell */
.rt-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rt-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #b07a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.rt-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rt-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.rt-user-id {
  font-size: 10px;
  color: var(--text-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* Course chip */
.rt-course-chip {
  display: inline-block;
  background: rgba(229, 169, 60, 0.1);
  color: var(--primary);
  border: 1px solid rgba(229, 169, 60, 0.2);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stars */
.rt-stars-row {
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.rs-filled { color: #E5A93C; }
.rs-empty  { color: rgba(255,255,255,0.15); }

.rt-rating-num {
  font-size: 10px;
  color: var(--text-hint);
}

/* Comment cell */
.rt-col-comment {
  color: var(--text-sub);
  line-height: 1.5;
  cursor: default;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-no-comment {
  color: var(--text-hint);
  font-style: italic;
  font-size: 12px;
}

/* ─── Hidden Course Badge ────────────────────────────────────────────────────── */
.course-badge-hidden {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

/* ─── Notifications Platform ─────────────────────────────────────────────────── */
.notif-platform-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .notif-platform-grid {
    grid-template-columns: 1fr;
  }
}

.notif-compose-card,
.notif-history-card {
  padding: 24px;
}

.notif-compose-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.notif-compose-header i {
  font-size: 20px;
  color: var(--primary);
  background: rgba(229, 169, 60, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-compose-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.notif-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-hint);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Target selector cards */
.notif-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.notif-target-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
  user-select: none;
}

.notif-target-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.notif-target-card i {
  font-size: 18px;
  color: var(--text-hint);
  transition: color 0.2s;
}

.notif-target-card span {
  font-size: 10px;
  color: var(--text-hint);
  font-weight: 600;
  transition: color 0.2s;
  line-height: 1.3;
}

.notif-target-card:hover,
.notif-target-card.active {
  border-color: var(--primary);
  background: rgba(229, 169, 60, 0.07);
}

.notif-target-card.active i,
.notif-target-card.active span {
  color: var(--primary);
}

/* Course multi-select for notifications */
.notif-course-select-wrap {
  background: rgba(14, 22, 45, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  animation: fadeInDown 0.2s ease;
}

.notif-course-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-course-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.notif-course-item:hover {
  background: rgba(229, 169, 60, 0.05);
  border-color: rgba(229, 169, 60, 0.3);
}

.notif-course-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.notif-course-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.notif-course-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notif-course-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-course-enrolled {
  font-size: 10px;
  color: var(--text-hint);
}

/* Preview bar */
.notif-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(229, 169, 60, 0.06);
  border: 1px solid rgba(229, 169, 60, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-sub);
}

.notif-preview-bar i {
  color: var(--primary);
}

.notif-preview-bar strong {
  font-size: 18px;
  color: var(--primary);
}

/* History panel */
.notif-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 700px;
  overflow-y: auto;
}

.notif-history-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.notif-history-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.notif-history-body {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.notif-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-hint);
}

.notif-target-chip {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(229, 169, 60, 0.1);
  color: var(--primary);
  border: 1px solid rgba(229, 169, 60, 0.2);
}

/* ── Schedule type options ─── */
.notif-schedule-options {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.notif-schedule-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-hint);
  transition: all 0.2s;
  user-select: none;
  flex: 1;
  justify-content: center;
}

.notif-schedule-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.notif-schedule-opt:hover,
.notif-schedule-opt.active {
  border-color: var(--primary);
  background: rgba(229, 169, 60, 0.07);
  color: var(--primary);
}

.notif-schedule-opt i {
  font-size: 14px;
  color: inherit;
}

/* ── Expiry chips ─── */
.notif-expiry-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-hint);
  transition: all 0.2s;
  user-select: none;
}

.notif-expiry-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.notif-expiry-chip:hover,
.notif-expiry-chip.active {
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.08);
  color: #a78bfa;
}

/* ── Scheduled notification items ─── */
.sched-notif-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(167, 139, 250, 0.04);
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}

.sched-notif-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sched-notif-info {
  flex: 1;
  min-width: 0;
}

.sched-notif-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-notif-meta {
  font-size: 11px;
  color: var(--text-hint);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sched-notif-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sched-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(167, 139, 250, 0.25);
  white-space: nowrap;
}

.sched-expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.2);
  white-space: nowrap;
}

/* ─── Hidden Users Modal ─────────────────────────────────────────────────────── */
.hidden-course-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.hidden-course-info i {
  font-size: 20px;
  color: #a78bfa;
  flex-shrink: 0;
  margin-top: 2px;
}

.hidden-course-info strong {
  font-size: 14px;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.hidden-course-info p {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
}

.hidden-users-search-wrap {
  margin-bottom: 12px;
}

.hidden-users-list {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hidden-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s;
}

.hidden-user-row:hover {
  background: var(--bg-card);
}

.hidden-user-row.has-access {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.05);
}

.hidden-user-row input[type="checkbox"] {
  accent-color: #8b5cf6;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.hidden-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.hidden-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hidden-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden-user-email {
  font-size: 10px;
  color: var(--text-hint);
}

.hidden-access-badge {
  font-size: 10px;
  color: #a78bfa;
  font-weight: 600;
  white-space: nowrap;
}

/* User type chips */
.utype-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.utype-chip.student {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.utype-chip.graduate {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 📊 Student Courses Progress Styles */
.user-course-progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-course-progress-item:last-child {
  margin-bottom: 0;
}

.user-course-progress-item .course-name {
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-course-progress-item .progress-bar-outer {
  width: 70px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.user-course-progress-item .progress-bar-inner {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), #00f2fe);
}

.user-course-progress-item .progress-percentage {
  font-size: 11px;
  font-weight: 700;
  color: #00f2fe;
  min-width: 32px;
  text-align: left;
}

.device-id-badge {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-hint);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.device-id-active {
  color: #60a5fa !important;
}

.btn-reset-device {
  background: transparent;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 2px;
  margin-right: 4px;
  transition: color 0.2s;
  font-size: 11px;
}

.btn-reset-device:hover {
  color: #f87171;
}

/* 🎓 Certificate Print & Style Configurations */
.cert-print-card {
  width: 297mm;
  height: 210mm;
  padding: 18mm;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #1A2E22;
  position: relative;
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  direction: ltr !important; /* Certificates are in English */
  border: 4px solid #14352C;
  overflow: hidden;
}

/* Canva-style SVG corner decorations */
.cert-corner-top-left-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}
.cert-corner-bottom-right-svg {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}
.cert-corner-bottom-left-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10mm;
  padding-left: 20px;
  z-index: 2;
  position: relative;
}

.cert-title-container {
  text-align: center;
  margin-top: 5mm;
  position: relative;
  z-index: 2;
}

.cert-title {
  font-size: 46px;
  font-weight: 800;
  color: #0E1D33;
  letter-spacing: 4px;
  margin: 0;
  text-transform: uppercase;
}

.cert-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #1A2E22;
  letter-spacing: 2px;
  margin: 5px 0 0 0;
  text-transform: uppercase;
}

.cert-present {
  font-size: 12px;
  color: #666;
  letter-spacing: 1px;
  margin: 15px 0;
  text-transform: uppercase;
}

.cert-name {
  font-size: 24px;
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  font-weight: bold;
  color: #14352C;
  border-bottom: 2px solid #E2AD34;
  display: inline-block;
  padding-bottom: 4px;
  margin: 6px 0;
}

.cert-sig-hand {
  font-family: 'Mrs Saint Delafield', cursive;
  font-size: 52px;
  color: #14352C;
  margin-bottom: -15px;
  line-height: 0.5;
}

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 110px;
  font-weight: 800;
  color: rgba(20, 53, 44, 0.04) !important;
  z-index: 1;
  pointer-events: none;
  letter-spacing: 12px;
  white-space: nowrap;
}

.cert-body {
  font-size: 11px;
  line-height: 1.6;
  color: #333;
  max-width: 80%;
  margin: 15px auto;
  text-align: center;
  font-family: 'Segoe UI', Arial, sans-serif;
  position: relative;
  z-index: 2;
}

.cert-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  margin-top: 16mm;
  padding: 0 10mm;
  position: relative;
  z-index: 2;
}

.cert-sig-block {
  text-align: center;
}

.cert-sig-line {
  border-top: 1.5px solid #14352C;
  width: 50mm;
  margin: 8px auto;
}

.cert-sig-name {
  font-size: 13px;
  font-weight: 700;
  color: #0E1D33;
}

.cert-sig-title {
  font-size: 10px;
  color: #666;
}

.cert-qr-container {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-qr-image {
  width: 25mm;
  height: 25mm;
  background-color: white;
  border: 1px solid #ddd;
  padding: 2px;
}

.cert-serial {
  font-size: 9px;
  font-weight: bold;
  color: #333;
  margin-top: 5px;
  letter-spacing: 0.5px;
}

/* Print Stylesheet overrides */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  /* Hide dashboard elements */
  #loginScreen, #appScreen, .modal-overlay, .toast-container {
    display: none !important;
  }
  
  #certificatePrintArea {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 297mm;
    height: 210mm;
    page-break-after: avoid;
    page-break-before: avoid;
  }

  @page {
    size: A4 landscape;
    margin: 0;
  }
}

/* 💬 Q&A PREMIUM STYLING SYSTEM */
.qa-card-premium {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.qa-card-premium.unanswered {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.08);
}

.qa-card-premium.answered {
  border-color: rgba(46, 229, 157, 0.3);
}

.qa-card-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.qa-header-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.qa-course-badge {
  background: linear-gradient(135deg, rgba(229, 169, 60, 0.15), rgba(229, 169, 60, 0.05));
  color: #F2C063;
  border: 1px solid rgba(229, 169, 60, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qa-episode-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qa-student-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.qa-student-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #b87b1c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(229, 169, 60, 0.3);
}

.qa-question-box {
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.qa-quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.qa-chip-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qa-chip-btn:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

.qa-reply-box-wrapper {
  background: rgba(7, 11, 25, 0.4);
  border: 1px solid rgba(229, 169, 60, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.qa-reply-textarea {
  width: 100%;
  background: rgba(14, 22, 45, 0.8);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qa-reply-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 169, 60, 0.2);
}
