/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #ff6b35;
  --primary-dark: #e05a28;
  --primary-glow: rgba(255, 107, 53, 0.3);
  --secondary: #0f1729;
  --accent: #162040;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(3deg);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--primary-glow);
  }

  50% {
    box-shadow: 0 0 20px 6px var(--primary-glow);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* ===== NAVBAR ===== */
.navbar {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.brand-icon {
  font-size: 1.3rem;
  margin-right: 0.15rem;
}

.brand-accent {
  color: var(--primary);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.navbar-user {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.btn-register {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition);
}

.btn-register:hover {
  background: var(--primary-dark) !important;
  animation: pulse-glow 1.5s infinite;
}

/* ===== MAIN ===== */
.main-content {
  flex: 1;
  padding: 0;
  animation: fadeInUp 0.4s ease-out;
}

/* ===== FLASH MESSAGES ===== */
.flash-container {
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.flash {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  animation: fadeInUp 0.3s ease-out;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
  border-left: 4px solid #22c55e;
}

.flash-danger {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.flash-info {
  background: #e0f2fe;
  color: #075985;
  border-left: 4px solid #0ea5e9;
}

.flash-warning {
  background: #fef9c3;
  color: #854d0e;
  border-left: 4px solid #eab308;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.btn-success {
  background: #22c55e;
  color: white;
  border-color: #22c55e;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #1a2755 50%, var(--accent) 100%);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
  background: var(--primary);
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 250px;
  height: 250px;
  bottom: -50px;
  left: 10%;
  animation: float 10s ease-in-out infinite 2s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 40%;
  left: 60%;
  animation: float 6s ease-in-out infinite 4s;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 107, 53, 0.15);
  color: var(--primary);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 107, 53, 0.25);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.15;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), #ff9966, #ffb347);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-hero-primary {
  background: var(--primary);
  color: var(--white);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-hero-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
  color: white;
}

.btn-hero-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-hero-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat span {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

.hero-stat small {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

/* ===== FEATURES ===== */
.features {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.features-header {
  text-align: center;
  margin-bottom: 3rem;
}

.features-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.features-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid transparent;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 53, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

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

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  padding: 5rem 2rem;
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.5);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}

.footer-brand span {
  color: var(--primary);
}

.footer p {
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

/* ===== AUTH ===== */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 60px);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--secondary);
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-control {
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--text);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
}

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

.link-muted:hover {
  color: var(--primary);
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.sidebar {
  width: 260px;
  background: var(--secondary);
  color: var(--white);
  padding: 2rem 0;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.sidebar-role {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  display: inline-block;
  margin-top: 0.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-student {
  background: #17a2b8;
  color: var(--white);
}

.badge-instructor {
  background: #28a745;
  color: var(--white);
}

.badge-admin {
  background: var(--primary);
  color: var(--white);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-nav a {
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  text-decoration: none;
}

.sidebar-nav a.active {
  border-left: 3px solid var(--primary);
}

.dashboard-main {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
}

.dashboard-main h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dashboard-section {
  margin-bottom: 2rem;
}

.dashboard-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

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

.section-header h2 {
  margin-bottom: 0;
}

.empty-state {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  color: var(--text-muted);
}

.empty-state p {
  margin-bottom: 1.25rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* ===== 403 ===== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 124px);
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 5rem;
  font-weight: 900;
  color: var(--primary);
}

.error-page h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ===== CMS TABLE ===== */
.cms-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.cms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cms-table th {
  background: var(--bg);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.cms-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.cms-table tr:hover td {
  background: #fafafa;
}

.cms-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.cms-thumb-placeholder {
  width: 72px;
  height: 48px;
  background: var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.course-title-cell {
  font-weight: 600;
}

.course-slug-cell {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.cms-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== BADGE STATUS ===== */
.badge-status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-published {
  background: #d4edda;
  color: #155724;
}

.badge-draft {
  background: #fff3cd;
  color: #856404;
}

.badge-video {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-article {
  background: #e8d5f5;
  color: #5a0080;
}

.badge-free {
  background: #d4edda;
  color: #155724;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

/* ===== BUTTON VARIANTS (CMS) ===== */
.btn-secondary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: #0d1b2e;
  color: var(--white);
}

.btn-success {
  background: #28a745;
  color: var(--white);
  border-color: #28a745;
}

.btn-success:hover {
  background: #218838;
  color: var(--white);
}

.btn-warning {
  background: #ffc107;
  color: #333;
  border-color: #ffc107;
}

.btn-warning:hover {
  background: #e0a800;
  color: #333;
}

.btn-danger {
  background: #dc3545;
  color: var(--white);
  border-color: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
  color: var(--white);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline-dark:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ===== CMS FORM CARD ===== */
.cms-form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 760px;
}

.cms-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

.form-control-sm {
  max-width: 160px;
}

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

.inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form .form-control {
  flex: 1;
  min-width: 160px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.04);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-filename {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--primary);
}

.upload-preview-wrap {
  margin-bottom: 0.75rem;
}

.upload-preview-img {
  max-width: 240px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.video-path-display {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--bg);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  word-break: break-all;
}

/* ===== COURSE MANAGE (chapters/lessons) ===== */
.chapter-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.chapter-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--secondary);
  color: var(--white);
}

.chapter-title {
  flex: 1;
  font-weight: 600;
}

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

.drag-handle {
  cursor: grab;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.rename-form {
  padding: 0.75rem 1.25rem;
  background: #f0f3f7;
}

.lesson-list {
  padding: 0.5rem 1.25rem;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.lesson-item:last-child {
  border-bottom: none;
}

.lesson-item .drag-handle {
  color: var(--text-muted);
  cursor: grab;
}

.lesson-title {
  flex: 1;
  font-size: 0.9rem;
}

.lesson-actions {
  display: flex;
  gap: 0.4rem;
}

.lesson-empty {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.75rem 0;
}

.add-lesson-form {
  padding: 0.75rem 1.25rem;
  background: var(--bg);
}

.hidden {
  display: none !important;
}

/* ===== CATALOG ===== */
.catalog-hero {
  background: var(--secondary);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--white);
}

.catalog-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.catalog-hero p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.catalog-search {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.catalog-search input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
}

.catalog-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.catalog-result-info {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Course Grid (shared between catalog & student dashboard) ── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text);
  text-decoration: none;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.course-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--accent);
  overflow: hidden;
}

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

.course-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-card-thumb-placeholder span {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.6;
}

.course-badge-free {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #22c55e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.course-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.course-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.course-card-price {
  font-weight: 700;
  color: var(--primary);
}

/* ── Progress bar (shared) ── */
.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s;
}

.progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== COURSE DETAIL ===== */
.detail-hero {
  background: var(--secondary);
  color: var(--white);
  padding: 3rem 2rem;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.detail-hero-content {
  flex: 1;
  min-width: 280px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  margin: 0 0.4rem;
}

.detail-hero h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.detail-desc {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.detail-meta {
  display: flex;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  width: 300px;
  min-width: 260px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  color: var(--text);
}

.detail-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.detail-card-body {
  padding: 1.25rem;
}

.detail-price {
  margin-bottom: 1rem;
}

.price-free {
  font-size: 1.5rem;
  font-weight: 700;
  color: #22c55e;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.detail-enrolled-note {
  font-size: 0.85rem;
  color: #22c55e;
  text-align: center;
  margin-top: 0.5rem;
}

.detail-body {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.detail-curriculum h2 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.curriculum-chapter {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.curriculum-chapter-header {
  background: var(--bg);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.curriculum-chapter-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.curriculum-lessons {
  list-style: none;
}

.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.lesson-icon {
  color: var(--text-muted);
}

.lesson-title {
  flex: 1;
}

.lesson-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.badge-preview {
  background: #fef3c7;
  color: #92400e;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-preview-link {
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.badge-preview-link:hover {
  background: #f59e0b;
  color: #fff;
  text-decoration: none;
}

.lesson-preview-link {
  color: var(--primary);
  font-weight: 600;
}

.lesson-preview-link:hover {
  text-decoration: underline;
}

.lesson-free {
  background: #fffbeb;
}

/* ===== PLAYER ===== */
.player-layout {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.player-sidebar {
  width: 320px;
  min-width: 280px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--secondary);
  color: var(--white);
}

.player-course-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.player-course-title:hover {
  text-decoration: underline;
}

.player-sidebar-header .progress-bar {
  background: rgba(255, 255, 255, 0.2);
}

.player-sidebar-header .progress-label {
  color: rgba(255, 255, 255, 0.6);
}

.player-sidebar-body {
  overflow-y: auto;
  flex: 1;
}

.sidebar-chapter {
  border-bottom: 1px solid var(--border);
}

.sidebar-chapter-title {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-lessons {
  list-style: none;
}

.sidebar-lesson a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.sidebar-lesson a:hover {
  background: var(--bg);
  text-decoration: none;
}

.sidebar-lesson.active a {
  background: #fff3ee;
  border-left-color: var(--primary);
  font-weight: 600;
  color: var(--primary);
}

.sidebar-lesson.done a {
  color: var(--text-muted);
}

.sidebar-lesson-check {
  width: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-lesson.done .sidebar-lesson-check {
  color: #22c55e;
}

.sidebar-lesson.active .sidebar-lesson-check {
  color: var(--primary);
}

.sidebar-lesson-name {
  flex: 1;
  line-height: 1.4;
}

.sidebar-lesson-dur {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.player-main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
  gap: 1rem;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.player-lesson-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.player-video-wrap {
  width: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-loading {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  padding: 2rem;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-placeholder {
  color: var(--text-muted);
  padding: 3rem;
  text-align: center;
}

.player-text-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.player-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Player buttons (visible on light background) ── */
.btn-mark-complete {
  background: #eff6ff;
  color: #2563eb;
  border: 2px solid #2563eb;
  font-weight: 600;
}

.btn-mark-complete:hover {
  background: #2563eb;
  color: #fff;
}

.btn-nav-prev {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-nav-prev:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg);
}

/* ── Video security ── */
.player-video {
  -webkit-user-select: none;
  user-select: none;
}

/* btn-success */
.btn-success {
  background: #22c55e;
  color: var(--white);
  border: 2px solid #22c55e;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .dashboard-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 1rem 0;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-nav a {
    padding: 0.6rem 1rem;
    white-space: nowrap;
  }

  .sidebar-nav a.active {
    border-left: none;
    border-bottom: 3px solid var(--primary);
  }

  .dashboard-main {
    padding: 1.5rem;
  }

  .player-layout {
    flex-direction: column;
    height: auto;
  }

  .player-sidebar {
    width: 100%;
    max-height: 40vh;
  }

  .player-main {
    padding: 1rem;
  }

  .detail-hero {
    flex-direction: column;
  }

  .detail-card {
    width: 100%;
  }

  .catalog-search {
    flex-direction: column;
  }

  .checkout-wrapper {
    padding: 1rem;
  }

  .checkout-card {
    padding: 1.5rem;
  }
}

/* ===== CHECKOUT ===== */
.checkout-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 60px);
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 50%, #0f3460 100%);
}

.checkout-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.checkout-header {
  text-align: center;
  margin-bottom: 2rem;
}

.checkout-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.checkout-course-info {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.checkout-thumb {
  width: 80px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.checkout-thumb-placeholder {
  width: 80px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-thumb-placeholder span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.6;
}

.checkout-course-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.checkout-course-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

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

.checkout-summary {
  margin-bottom: 1.5rem;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.checkout-price {
  font-weight: 600;
}

.checkout-total {
  font-weight: 700;
  font-size: 1.1rem;
}

.checkout-price-total {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.btn-pay {
  padding: 0.875rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.checkout-secure-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.checkout-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-left: 4px solid #dc2626;
}

.checkout-back-link {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.checkout-demo-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.checkout-demo-banner span:first-child {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.checkout-demo-banner strong {
  font-size: 0.9rem;
  color: #92400e;
}

.checkout-demo-banner p {
  font-size: 0.8rem;
  color: #a16207;
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* ===== QUIZ ===== */
.quiz-wrapper {
  min-height: calc(100vh - 64px - 60px);
  padding: 2rem 1rem;
  background: var(--accent);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.quiz-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 760px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.quiz-header {
  margin-bottom: 2rem;
}

.quiz-back-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.quiz-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.quiz-prev-attempt {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.quiz-passed {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  color: #166534;
}

.quiz-failed {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.quiz-question {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.quiz-question:focus-within {
  border-color: var(--primary);
}

.quiz-question-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.quiz-question-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.quiz-option:hover {
  background: #f8fafc;
  border-color: var(--primary);
}

.quiz-option.selected {
  background: #eff6ff;
  border-color: var(--primary);
}

.quiz-option input[type=radio] {
  display: none;
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.quiz-option.selected .quiz-option-letter {
  background: var(--primary);
  color: white;
}

.quiz-submit-area {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.quiz-mini-progress {
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.quiz-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff9f7a);
  border-radius: 3px;
  transition: width 0.3s;
}

.btn-quiz-submit {
  padding: 0.875rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-quiz-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Quiz Result ── */
.quiz-result-card {
  text-align: center;
  max-width: 500px;
}

.quiz-result-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.quiz-result-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.quiz-score-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 8px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto 1.5rem;
}

.ring-pass {
  border-color: #22c55e;
}

.ring-fail {
  border-color: #ef4444;
}

.quiz-score-num {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.ring-pass .quiz-score-num {
  color: #22c55e;
}

.ring-fail .quiz-score-num {
  color: #ef4444;
}

.quiz-score-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quiz-score-detail {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.score-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
}

.score-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quiz-result-message {
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.cert-cta-text {
  font-size: 1rem;
  color: var(--secondary);
}

.quiz-result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Quiz CMS ── */
.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== CERTIFICATE ===== */
.cert-page-wrapper {
  min-height: calc(100vh - 64px - 60px);
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #0d1b2a 0%, #1e3a5f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.cert-document {
  width: 100%;
  max-width: 860px;
}

.cert-border-outer {
  background: linear-gradient(135deg, #0d1b2a, #1e3a5f);
  border: 4px solid #f59e0b;
  border-radius: 16px;
  padding: 6px;
}

.cert-border-inner {
  border: 1.5px solid #334155;
  border-radius: 12px;
  padding: 3rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, #0d1b2a 0%, #1a2744 100%);
}

.cert-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.cert-brand-name {
  font-size: 2rem;
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: 0.05em;
}

.cert-brand-sub {
  font-size: 0.85rem;
  color: #64748b;
}

.cert-divider {
  height: 1px;
  background: #1e3a5f;
  margin: 1rem auto;
  width: 80%;
}

.cert-subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.cert-main-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: white;
  margin-bottom: 1.5rem;
}

.cert-presented-to {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.cert-name {
  font-size: 2.5rem;
  font-weight: 900;
  color: #f59e0b;
  margin-bottom: 0.25rem;
}

.cert-name-underline {
  height: 2px;
  background: #f59e0b;
  width: 200px;
  margin: 0 auto 1.5rem;
}

.cert-completed-text {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.cert-course-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2rem;
}

.cert-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.cert-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cert-meta-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cert-meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
}

.cert-code {
  font-family: monospace;
  font-size: 0.85rem;
}

.cert-star {
  font-size: 2rem;
  color: #1e3a5f;
}

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

.cert-verify-note {
  font-size: 0.85rem;
  color: #94a3b8;
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .cert-border-inner {
    padding: 2rem 1.5rem;
  }

  .cert-name {
    font-size: 1.8rem;
  }

  .cert-main-title {
    font-size: 1.5rem;
  }

  .cert-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Certificate mini card (my_certs page) ── */
.cert-card-mini {
  background: linear-gradient(135deg, #0d1b2a, #1e3a5f);
  border: 1px solid #2d4a6e;
  border-top: 3px solid #f59e0b;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cert-card-mini:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.cert-card-badge {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.cert-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cert-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.cert-card-date {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.cert-card-code {
  font-size: 0.75rem;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.cert-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}