/* Meguru Admin Dashboard Styles (meguru.id) */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: #f1f5f9;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-hover:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.15);
}

.glass-modal {
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Gradients */
.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Drip Timeline Visualizer */
.drip-step {
  position: relative;
}
.drip-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 36px;
  left: 18px;
  bottom: -16px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.drip-step.active:not(:last-child)::after {
  background: #6366f1;
}

/* Tab Navigation Active State */
.nav-tab.active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.4);
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* OTP Digit Inputs */
.otp-digit-input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: all 0.2s ease;
}
.otp-digit-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(30, 41, 59, 0.9);
}


/* ═══════════════════════════════════════════════════════════
   CERTIFICATE STUDIO & A4 WYSIWYG CANVAS STYLES
   ═══════════════════════════════════════════════════════════ */
.cert-frame-outer {
  background: #ffffff;
  color: #0f172a;
  position: relative;
  width: 100%;
  aspect-ratio: 297 / 210; /* Exact ISO A4 Landscape Proportion */
  margin: 0 auto;
  border: 8px solid #0f172a;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 24px;
  overflow: hidden;
  transition: all 0.25s ease;
}

@media (min-width: 640px) {
  .cert-frame-outer {
    padding: 22px 32px;
    border-width: 10px;
  }
}

/* Guilloche & Inset Borders */
.cert-frame-inner {
  position: absolute;
  inset: 5px;
  border: 2px solid #b45309;
  pointer-events: none;
  transition: all 0.25s ease;
}
.cert-frame-inner::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed #d97706;
  transition: all 0.25s ease;
}

/* Corner Accents */
.corner-accent {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #b45309;
  pointer-events: none;
  transition: all 0.25s ease;
}
.corner-tl { top: 10px; left: 10px; border-top: 3px solid #b45309; border-left: 3px solid #b45309; }
.corner-tr { top: 10px; right: 10px; border-top: 3px solid #b45309; border-right: 3px solid #b45309; }
.corner-bl { bottom: 10px; left: 10px; border-bottom: 3px solid #b45309; border-left: 3px solid #b45309; }
.corner-br { bottom: 10px; right: 10px; border-bottom: 3px solid #b45309; border-right: 3px solid #b45309; }

/* Watermark background logo */
.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  opacity: 0.04;
  pointer-events: none;
  background-image: url('../assets/img/meguru-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Seals */
.gold-seal {
  width: 62px;
  height: 62px;
  background: radial-gradient(circle, #fef08a 0%, #eab308 45%, #ca8a04 80%, #92400e 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #78350f;
  transition: all 0.25s ease;
}

.blue-seal {
  width: 62px;
  height: 62px;
  background: radial-gradient(circle, #e0f2fe 0%, #38bdf8 45%, #0284c7 80%, #075985 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #0369a1;
  transition: all 0.25s ease;
}

.indigo-seal {
  width: 62px;
  height: 62px;
  background: radial-gradient(circle, #ede9fe 0%, #a855f7 45%, #6366f1 80%, #3730a3 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #4338ca;
  transition: all 0.25s ease;
}

.emerald-seal {
  width: 62px;
  height: 62px;
  background: radial-gradient(circle, #d1fae5 0%, #34d399 45%, #059669 80%, #064e3b 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #047857;
  transition: all 0.25s ease;
}

.studio-control-group {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.2s ease;
}
.studio-control-group:hover {
  border-color: rgba(99, 102, 241, 0.35);
}


/* ═══════════════════════════════════════════════════════════
   COURSE MATERIAL & LESSON BUILDER STUDIO STYLES
   ═══════════════════════════════════════════════════════════ */
.lesson-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #090d16;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lesson-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* In-App Read-Only Document Reader Container */
.doc-reader-container {
  width: 100%;
  height: 420px;
  background: #0f172a;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}
.doc-reader-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mobile Simulator Phone Frame */
.mobile-simulator-frame {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  border: 12px solid #1e293b;
  border-radius: 2.75rem;
  background: #070a12;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  height: 700px;
  display: flex;
  flex-direction: column;
}

/* Curriculum Tree Nodes */
.tree-node-module {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.22s ease, border-color 0.2s ease, opacity 0.2s ease;
  position: relative;
}
.tree-node-module:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.tree-node-lesson {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, border-color 0.15s ease, background-color 0.15s ease, opacity 0.2s ease;
  position: relative;
}
.tree-node-lesson:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}
.tree-node-lesson.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.6);
}

/* ═══════════════════════════════════════════════════════════
   MEGURU STUDIO: MAGNETIC FLOATING DRAG & DROP WITH CLEAN GRAY DROP SLOTS
   Precision Target Snapping, Floating Elevation & Zero Jitter
   ═══════════════════════════════════════════════════════════ */

/* Grip Handle */
.drag-grip {
  cursor: grab;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  user-select: none;
}
.drag-grip:hover {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.25);
}
.drag-grip:active {
  cursor: grabbing;
}

/* 1. Original Item being dragged (Hidden from flow so placeholder takes exact spot) */
.is-dragging-hidden {
  display: none !important;
}

/* 2. Floating Drag Ghost Follower (Magnetik Melayang di Atas Blok) */
.magnetic-floating-card {
  position: fixed !important;
  z-index: 999999 !important;
  pointer-events: none !important;
  background: rgba(15, 23, 42, 0.98) !important;
  border: 1.5px solid rgba(129, 140, 248, 0.85) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(99, 102, 241, 0.4) !important;
  border-radius: 0.75rem;
  backdrop-filter: blur(16px);
  transform: scale(1.025) rotate(1.2deg);
  transform-origin: center center;
  transition: transform 0.1s ease-out, border-color 0.15s ease;
  will-change: left, top, transform;
}

.magnetic-floating-card.snapped {
  transform: scale(1.01) rotate(0deg);
  border-color: #818cf8 !important;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.95), 0 0 40px rgba(99, 102, 241, 0.55) !important;
}

/* 3. Dedicated Clean Gray Drop Slot for Lessons (Area Abu-Abu yang Menggeser Blok) */
.drop-slot-placeholder {
  height: 42px;
  border-radius: 0.75rem;
  background: #1e293b !important; /* Area abu-abu slate */
  border: 2px dashed #64748b !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  pointer-events: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.drop-slot-placeholder.snapped {
  background: #243147 !important;
  border-color: #818cf8 !important;
  color: #c7d2fe !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.35);
}

/* 4. Dedicated Clean Gray Drop Slot for Modules (Bab Penuh) */
.drop-slot-module-placeholder {
  height: 64px;
  border-radius: 0.875rem;
  background: #1e293b !important; /* Area abu-abu slate */
  border: 2px dashed #64748b !important;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.5);
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  pointer-events: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.drop-slot-module-placeholder.snapped {
  background: #243147 !important;
  border-color: #818cf8 !important;
  color: #c7d2fe !important;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6), 0 0 24px rgba(99, 102, 241, 0.4);
}

/* Highlight saat Drag over modul */
.module-drop-zone-active {
  border-color: rgba(99, 102, 241, 0.75) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.25) !important;
}
/* ═══════════════════════════════════════════════════════════
   INSTRUCTOR MANAGEMENT & PERFORMANCE STYLING
   ═══════════════════════════════════════════════════════════ */
.instructor-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.instructor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.2);
  border-color: rgba(129, 140, 248, 0.5);
}
.signature-preview-box {
  font-family: 'Great Vibes', cursive;
  font-size: 1.75rem;
  color: #c7d2fe;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.kpi-stat-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}
.kpi-stat-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}
