/* LMS Dashboard - Complete Styles */
.lms-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, sans-serif;
  background: #fafbfc;
  min-height: 70vh;
}

.lms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.lms-header h2 {
  padding: 4px 16px 8px 12px;
  border: 1px solid #94c5ec;
  border-radius: 16px;
  color: #1a1a1a;
  font-size: 1.75rem;
  text-align: center;
}

.lms-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 2rem;
  border-bottom: 3px solid #e9ecef;
  padding-bottom: 0.5rem;
  justify-content: flex-start;
  align-items: center;
}

.lms-tab {
  padding: 0.875rem 1.75rem;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px 12px 0 0;
  transition: all 0.25s;
  color: #6c757d;
  position: relative;
}

.lms-tab:hover,
.lms-sheets:hover, 
.lms-export:hover,
.lms-refresh:hover {
  background: #e8f5e9;
  color: #495057;
}

.lms-tab.active {
  color: #007bff;
  background: white;
  box-shadow: 0 -3px 0 #007bff;
}

.lms-tab-content {
  display: none;
  animation: fadeSlideIn 0.3s ease-out;
}

.lms-tab-content.active {
  display: block;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.lms-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h3 {
  margin: 0;
  color: #212529;
  font-size: 1.5rem;
  font-weight: 700;
}

.lms-list {
  min-height: 250px;
  display: grid;
  gap: 1.25rem;
}

.lms-card {
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  transition: all 0.3s ease;
  background: white;
  position: relative;
  overflow: hidden;
}

.lms-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #00c851);
}

.lms-card:hover {
  border-color: #007bff;
  box-shadow: 0 12px 40px rgba(0,123,255,0.15);
  transform: translateY(-4px);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.25rem;
}

.card-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
}

.delete-btn {
  background: #6c757d !important;
  color: white !important;
}

.delete-btn:hover {
  background: #545b62 !important;
}

.empty-state {
  text-align: center;
  color: #6c757d;
  padding: 7rem 2rem;
  font-style: italic;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  border: 2px dashed #dee2e6;
}

.lms-btn-primary .lms-btn-secondary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0,123,255,0.3);
  transition: all 0.3s;
}
.lms-btn-primary {
  background: #32b6a9 !important;
}
.lms-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,123,255,0.4);
}

.lms-back-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.lms-back-btn:hover {
  background: #545b62;
  transform: translateY(-1px);
}

.grade-card { border-left: 4px solid #10b981; }
.score-badge { background: #10b981; color: white; padding: 4px 8px; border-radius: 12px; }
.sync-status.success { color: #10b981; }
.grade-header { display: flex; justify-content: space-between; align-items: center; }
.grade-meta { color: #6b7280; margin: 4px 0; }
.grade-feedback { font-size: 14px; margin: 8px 0; }

/* Responsive */
@media (max-width: 768px) {
  .lms-container { padding: 1rem; }
  .lms-tabs { flex-direction: column; }
  .lms-list { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 1rem; align-items: stretch; }
}
button.btn.btn-sm {
  padding: 12px;
}
#qr-container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.qrcode {
  margin: 0 auto !important;
}
#test-timer.warning {
  animation: blink 0.6s infinite;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
}

@keyframes blink {
  0%, 50% { opacity: 1; transform: scale(1); }
  51%, 100% { opacity: 0.7; transform: scale(1.05); }
}

/* LMS Mobile — Google Classroom Style */
@media (max-width: 768px) {
  .sfb-simulator {
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    height: 100vh !important;
  }
  
  /* Header fixed + timer kanan */
  .sfb-simulator > div:first-child {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  }
  
  #test-timer {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    font-size: 16px !important; /* lebih besar di mobile */
    padding: 8px 12px !important;
    min-width: 70px !important;
  }
  
  /* Soal full-width */
  #sfb-sim-body {
    padding: 24px 20px !important;
  }
  
  .sim-opt-label {
    padding: 20px 16px !important; /* touch target 48px min */
    margin-bottom: 12px !important;
    font-size: 16px !important;
  }
  
  /* Bottom nav fixed */
  div[style*="padding:16px 24px"][style*="space-between"] {
    position: sticky !important;
    bottom: 0 !important;
    background: white !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 16px 20px !important;
    z-index: 99 !important;
  }
  
  #sfb-prev-btn, #sfb-next-btn {
    padding: 14px 24px !important;
    font-size: 16px !important;
    min-height: 52px !important; /* touch-friendly */
    border-radius: 12px !important;
  }
  
  /* Scroll soal smooth */
  #sfb-sim-body {
    scroll-snap-type: y mandatory !important;
    scroll-behavior: smooth !important;
  }
}
#lms-title {
  cursor: pointer;
  transition: color 0.2s;
}
#lms-title:hover {
  color: #3b82f6;
}
.class-overlay {
  position: relative;
  min-height: 400px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  background: white;
}
