/* ============================================================
   Joel Kids Ministry - Class Media Panel & Admin Styles
   Ocean-themed glassmorphism, responsive slideshow, and admin UI
   ============================================================ */

/* ── 1. Timeline Layout Alignment with Media Panel ──────────── */
/* Equal columns: keeps center dashed line perfectly aligned with the center marker */
.timeline-stop {
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) !important;
  align-items: center !important;
}

.timeline-stop .timeline-media-panel {
  grid-column: 3 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 28px !important;   /* gap from center dashed line */
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  justify-self: stretch !important;
  align-self: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.timeline-stop:nth-child(even) .timeline-media-panel {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-right: 28px !important;  /* gap from center dashed line */
  padding-left: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  justify-self: stretch !important;
  align-self: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* ── 2. Media Card — Compact Floating Polaroid Companion ── */
.class-media-card {
  position: relative;
  /* Contained within timeline column: responsive width, auto height */
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 460px !important;
  aspect-ratio: var(--active-aspect, 16 / 10);
  border-radius: 14px;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  outline: none;
  background: rgba(0, 12, 34, 0.75);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  /* Idle: subtly dimmed — hover restores full vivid presence */
  opacity: 0.72;
  transition: opacity 0.35s ease,
              transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s ease;
  color: #ffffff;
  display: block;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  box-sizing: border-box;
}

.class-media-card:hover {
  /* Hover: fully vivid + subtle lift */
  opacity: 1;
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    0 26px 52px rgba(0, 0, 0, 0.75),
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(0, 220, 210, 0.22);
}


/* ── Mobile Layout for Timeline Media (max-width: 820px) ── */
@media (max-width: 820px) {
  .timeline-stop {
    align-items: start !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .timeline-marker {
    align-self: start !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 16px !important;
    margin: 0 !important;
  }

  .timeline-stop .timeline-card,
  .timeline-stop:nth-child(even) .timeline-card {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  .timeline-stop .timeline-media-panel,
  .timeline-stop:nth-child(even) .timeline-media-panel {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 12px 0 0 0 !important;
    padding: 0 !important;
    justify-self: stretch !important;
    align-self: auto !important;
    align-items: stretch !important;
    display: block !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .class-media-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: var(--active-aspect, 16 / 10) !important;
    border-radius: 14px !important;
    opacity: 1 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  .media-slideshow-viewport {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: radial-gradient(circle at 50% 50%, rgba(3, 20, 52, 0.95) 0%, rgba(1, 8, 24, 0.98) 100%) !important;
  }

  .media-slide-content {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .media-slide-img,
  .media-slide-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
  }

  .media-nav-btn {
    opacity: 0.85 !important;
  }

  .media-recap-bubble {
    top: 8px !important;
    left: 8px !important;
    font-size: 10px !important;
    padding: 3px 10px !important;
  }
}

/* ── 3. Themed "This Week Recap" Ocean Bubble ────────────────── */
.media-card-header,
.media-badge-tag,
.media-date-pill {
  display: none !important;
}

.media-recap-bubble {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--stop-accent, var(--accent-cyan, #00eedd));
  background: rgba(0, 18, 48, 0.72);
  border: 1px solid var(--stop-accent, rgba(0, 238, 221, 0.45));
  padding: 5px 13px 5px 10px;
  border-radius: var(--radius-pill, 999px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(0, 8, 28, 0.5),
              0 0 16px rgba(0, 238, 221, 0.22);
  text-shadow: 0 0 12px rgba(0, 238, 221, 0.45);
  pointer-events: none;
  user-select: none;
  animation: recapBubbleDrift 4.5s ease-in-out infinite alternate;
  line-height: 1.3;
}

.recap-bubble-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stop-accent, var(--accent-cyan, #00eedd));
  box-shadow: 0 0 8px var(--stop-accent, var(--accent-cyan, #00eedd)),
              inset 0 1px 1px rgba(255, 255, 255, 0.8);
  animation: recapDotPulse 2.2s ease-in-out infinite alternate;
  flex-shrink: 0;
}

@keyframes recapBubbleDrift {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes recapDotPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--stop-accent, var(--accent-cyan, #00eedd));
  }
}

@media (max-width: 768px) {
  .media-recap-bubble {
    top: 10px;
    left: 10px;
    font-size: 10px;
    padding: 4px 10px 4px 8px;
    gap: 5px;
  }
  .recap-bubble-dot {
    width: 6px;
    height: 6px;
  }
}

/* ── 4. Viewport fills card, slides fill viewport, image fills slide ── */
.media-slideshow-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(3, 20, 52, 0.95) 0%, rgba(1, 8, 24, 0.98) 100%);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  border-radius: 12px;
}

/* Crossfade slideshow: slides stack absolutely */
.is-slideshow .media-slideshow-viewport {
  display: block; /* reset grid — use absolute stacking instead */
}

.is-slideshow .media-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1),
              visibility 0.5s ease;
  display: block;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.is-slideshow .media-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

/* slide-content fills its container */
.media-slide-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  display: block;
  background: transparent;
  overflow: hidden;
}

/* Image fills the card — uncropped contain preserving full original frame */
.media-slide-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
  object-fit: contain !important;
  object-position: center center !important;
  border: none !important;
  outline: none !important;
  margin: 0 !important;
  opacity: 1;
  filter: none;
  -webkit-filter: none;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.media-slide-video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000000;
  border: none !important;
  outline: none !important;
  margin: 0 !important;
  filter: none;
}


/* YouTube Click-To-Load Poster */
.media-yt-poster {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  filter: none;
}

.media-yt-play-btn {
  width: 56px;
  height: 40px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 0, 0, 0.6);
  transition: transform 0.3s ease, background 0.3s ease;
}

.media-yt-play-btn::after {
  content: "";
  display: block;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 3px;
}

.media-yt-poster:hover .media-yt-play-btn {
  transform: scale(1.15);
  background: #ff0000;
}

.media-yt-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Audio control badge on videos */
.media-audio-toggle {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 8;
  background: rgba(0, 12, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}

.media-audio-toggle:hover {
  background: var(--stop-accent, #00d4c8);
  transform: scale(1.1);
}

/* Expand hint removed */
.media-expand-hint {
  display: none !important;
}



/* ── 5. Caption Chip (Matches "Lihat Banner" style) ──────────── */
.media-caption-chip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 7;
  background: rgba(0, 12, 35, 0.72);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: var(--radius-pill, 999px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  max-width: calc(100% - 90px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  line-height: 1.4;
}

/* ── 6. Slideshow Controls (Arrows & Inside Dots) ────────────── */
.media-nav-btn {
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 12, 35, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

/* Nav arrows float over the stacked slides in the slideshow grid */
.is-slideshow .media-nav-btn {
  position: absolute;
  grid-area: 1 / 1;
}

.class-media-card:hover .media-nav-btn {
  opacity: 0.92;
}

.media-nav-btn:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  transform: translateY(-50%) scale(1.12);
}

.is-slideshow .media-nav-prev { left: 10px; }
.is-slideshow .media-nav-next { right: 10px; }

/* Dots Indicator — overlaid at bottom of image, no extra height */
.media-dots-bar {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0;
  background: transparent;
  border: none;
  pointer-events: none;
}

.media-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease;
}

.media-dot.active {
  width: 24px;
  background: rgba(255, 255, 255, 0.95);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ── 7. Placeholder State (0 Items) ─────────────────────────── */
.class-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  background: rgba(1, 22, 70, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none !important;
  border-radius: var(--radius-lg, 24px);
  color: rgba(255, 255, 255, 0.6);
  min-height: 140px;
  transition: background 0.3s;
}

.class-media-placeholder:hover {
  background: rgba(1, 22, 70, 0.35);
  border: none !important;
}

.placeholder-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.placeholder-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.placeholder-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── 8. Media Fullscreen Lightbox Modal ─────────────────────── */
.jk-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10008;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 8, 24, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jk-media-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.jk-media-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(1, 20, 60, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.jk-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 16, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.jk-lightbox-close:hover {
  background: #ff3355;
  transform: scale(1.1);
}

.jk-lightbox-body {
  max-width: 88vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jk-lightbox-body img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.jk-lightbox-body video {
  max-width: 100%;
  max-height: 75vh;
  outline: none;
}

.jk-lightbox-body iframe {
  width: 80vw;
  height: 45vw;
  max-width: 860px;
  max-height: 485px;
  border: none;
}

.jk-lightbox-caption {
  width: 100%;
  padding: 14px 20px;
  background: rgba(0, 12, 38, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   SECRET ADMIN PANEL STYLES
   ============================================================ */

/* ── 9. PIN Overlay Dialog ──────────────────────────────────── */
.jk-admin-pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0, 8, 26, 0.92);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jk-admin-pin-overlay.active {
  opacity: 1;
  visibility: visible;
}

.jk-admin-pin-dialog {
  width: 100%;
  max-width: 380px;
  background: rgba(1, 24, 76, 0.95);
  border: 1.5px solid rgba(0, 212, 200, 0.4);
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 32px rgba(0, 212, 200, 0.2);
  color: #ffffff;
}

.jk-admin-pin-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.jk-admin-pin-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
  color: #ffffff;
}

.jk-admin-pin-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 24px;
}

.jk-admin-pin-input {
  width: 100%;
  text-align: center;
  font-size: 26px;
  letter-spacing: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 14, 46, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  outline: none;
  margin-bottom: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.jk-admin-pin-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 212, 200, 0.3);
}

.jk-admin-pin-actions {
  display: flex;
  gap: 12px;
}

.jk-admin-pin-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-size: 14px;
}

.btn-pin-submit {
  background: linear-gradient(135deg, #00d4c8, #00a2ff);
  color: #001230;
}

.btn-pin-cancel {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.jk-admin-pin-error {
  margin-top: 12px;
  font-size: 12.5px;
  color: #ff4766;
  min-height: 18px;
}

/* ── 10. Admin Dashboard Window ─────────────────────────────── */
.jk-admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0, 8, 26, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
  color: #ffffff;
}

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

.jk-admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(0, 16, 52, 0.95);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12);
}

.jk-admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jk-admin-brand-icon {
  font-size: 24px;
}

.jk-admin-brand-title {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
}

.jk-admin-brand-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 212, 200, 0.2);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 200, 0.4);
}

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

.jk-storage-gauge {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-admin-action {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.2s;
}

.btn-admin-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-admin-primary {
  background: linear-gradient(135deg, #00d4c8, #0088ff);
  color: #001230;
  border: none;
}

.btn-admin-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-admin-close {
  background: rgba(255, 60, 90, 0.25);
  border-color: rgba(255, 60, 90, 0.5);
  color: #ff6b85;
}

.btn-admin-close:hover {
  background: rgba(255, 60, 90, 0.45);
}

/* Dashboard Body Layout */
.jk-admin-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Class Tabs Sidebar */
.jk-admin-tabs-sidebar {
  width: 260px;
  background: rgba(0, 14, 44, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.jk-class-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jk-class-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.jk-class-tab-btn.active {
  background: rgba(0, 36, 100, 0.85);
  border-color: var(--tab-accent, #00d4c8);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 0 12px rgba(var(--tab-accent-rgb, 0, 212, 200), 0.2);
}

.jk-tab-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tab-accent, #00d4c8);
  box-shadow: 0 0 8px var(--tab-accent, #00d4c8);
}

.jk-tab-count {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

/* Dashboard Main Content Area */
.jk-admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 32px;
}

.jk-admin-notice-bar {
  background: rgba(255, 215, 38, 0.12);
  border: 1px solid rgba(255, 215, 38, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  color: #ffd726;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.jk-main-title-wrap h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 4px;
}

.jk-main-title-wrap p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* Media Item List Cards */
.jk-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jk-item-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  background: rgba(1, 22, 68, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 16px;
  transition: border-color 0.2s, background 0.2s;
}

.jk-item-row:hover {
  background: rgba(1, 26, 80, 0.9);
  border-color: rgba(0, 212, 200, 0.35);
}

.jk-item-thumb-box {
  width: 80px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #000a1c;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.jk-item-thumb-box img,
.jk-item-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jk-item-thumb-type {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #00d4c8;
}

.jk-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jk-item-caption {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.jk-item-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  gap: 12px;
  align-items: center;
}

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

/* Visibility Switch Pill */
.jk-vis-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
}

.jk-vis-toggle.active {
  background: rgba(0, 200, 117, 0.2);
  border-color: rgba(0, 200, 117, 0.5);
  color: #00e676;
}

/* ── 11. Add/Edit Form Modal ────────────────────────────────── */
.jk-form-modal {
  position: fixed;
  inset: 0;
  z-index: 10015;
  background: rgba(0, 6, 20, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

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

.jk-form-dialog {
  width: 100%;
  max-width: 520px;
  background: rgba(1, 24, 76, 0.96);
  border: 1.5px solid rgba(0, 212, 200, 0.35);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 90vh;
  overflow-y: auto;
}

.jk-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jk-form-group label {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.jk-form-control {
  background: rgba(0, 12, 40, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.jk-form-control:focus {
  border-color: var(--accent-cyan);
}

.jk-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.jk-type-btn {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.jk-type-btn.active {
  background: rgba(0, 212, 200, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.jk-file-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background: rgba(0, 10, 36, 0.5);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.jk-file-dropzone:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 18, 54, 0.6);
}

.jk-dropzone-preview {
  margin-top: 10px;
  max-height: 140px;
  border-radius: 8px;
  object-fit: cover;
  display: none;
}

/* ── 12. Toast Notifications ────────────────────────────────── */
.jk-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10020;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.jk-toast {
  pointer-events: auto;
  background: rgba(1, 20, 60, 0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 212, 200, 0.5);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: jkToastSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jk-toast.error {
  border-color: #ff3355;
  background: rgba(48, 4, 16, 0.95);
}

@keyframes jkToastSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Admin Layout */
@media (max-width: 820px) {
  .jk-admin-body {
    flex-direction: column;
  }
  .jk-admin-tabs-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }
  .jk-class-tab-btn {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .jk-admin-main {
    padding: 16px;
  }
  .jk-item-row {
    grid-template-columns: 60px 1fr;
    gap: 10px;
  }
  .jk-item-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
/* Bigger recap card: grows outward, away from the center timeline */
@media (min-width: 821px) {
  .class-journey-path {
    --media-grow: clamp(0px, calc((100vw - 1000px) / 2), 200px);
  }
  .class-media-card {
    width: calc(100% + var(--media-grow)) !important;
    max-width: none !important;
    max-height: 640px !important;
  }
  /* media on the left side (even stops): grow to the left instead */
  .timeline-stop:nth-child(even) .class-media-card {
    margin-left: calc(var(--media-grow) * -1) !important;
  }
}
/* Let the media card extend past the section edge */
#kelas {
  content-visibility: visible !important;
}
/* Bigger, centered class titles */
.class-text-wrap {
  width: 100%;
  text-align: center;
}

.class-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem) !important;  /* ~45px max, was ~29px */
  letter-spacing: 0.01em !important;
  line-height: 1.1 !important;
  text-align: center;
  margin-top: 6px;
}

.class-desc {
  font-size: clamp(14px, 1.6vw, 16px) !important;
  text-align: center;
}