/**
 * EDUMA — Ekosistem Digital Guru Mengajar
 * Modern UI/UX Enhancement Stylesheet (Fresh Light Theme - Tema Cerah LMS Modern)
 * Inspired by Google Classroom, Linear, and Notion
 * SMA NEGERI 1 Cisalak (Subang)
 */

/* ==========================================================================
   1. ROOT VARIABLES & THEME ACCENTS (LIGHT THEME)
   ========================================================================== */
:root {
  --eduma-primary: #2563eb;
  --eduma-primary-hover: #1d4ed8;
  --eduma-primary-glow: rgba(37, 99, 235, 0.2);
  --eduma-accent: #0284c7;
  --eduma-accent-glow: rgba(2, 132, 199, 0.15);
  --eduma-success: #059669;
  --eduma-success-glow: rgba(5, 150, 105, 0.15);
  --eduma-warning: #d97706;
  --eduma-danger: #dc2626;
  --eduma-bg-base: #f8fafc;
  --eduma-bg-card: #ffffff;
  --eduma-bg-elevated: #ffffff;
  --eduma-border: #e2e8f0;
  --eduma-border-active: #3b82f6;
  --eduma-text-main: #0f172a;
  --eduma-text-muted: #64748b;
  --eduma-radius-sm: 8px;
  --eduma-radius-md: 14px;
  --eduma-radius-lg: 20px;
  --eduma-radius-xl: 28px;
}

/* ==========================================================================
   2. MODERN LIGHT CARDS & ELEVATION
   ========================================================================== */
.eduma-card {
  background: var(--eduma-bg-card);
  border: 1px solid var(--eduma-border);
  border-radius: var(--eduma-radius-lg);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--eduma-text-main);
}

.eduma-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08), 0 0 16px -4px var(--eduma-primary-glow);
  transform: translateY(-2px);
}

.eduma-card-interactive {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.eduma-card-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.eduma-card-interactive:hover::before {
  opacity: 1;
}

/* ==========================================================================
   3. STATS WIDGETS & COUNTERS (LIGHT MODE)
   ========================================================================== */
.eduma-stat-box {
  background: #ffffff;
  border: 1px solid var(--eduma-border);
  border-radius: var(--eduma-radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.04);
}

.eduma-stat-box:hover {
  background: #f8fafc;
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.1);
}

.eduma-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   4. CLASSROOM ASSIGNMENT STATUS BADGES (PASTEL LIGHT)
   ========================================================================== */
.badge-eduma {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge-eduma-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-eduma-draft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-eduma-late {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-eduma-graded {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-eduma-revision {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ==========================================================================
   5. MODERN BUTTONS & PILLS
   ========================================================================== */
.btn-eduma-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.625rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-eduma-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-eduma-primary:active {
  transform: translateY(1px);
}

.btn-eduma-ghost {
  background: #f1f5f9;
  color: #334155 !important;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.625rem 1.125rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-eduma-ghost:hover {
  background: #e2e8f0;
  color: #0f172a !important;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* ==========================================================================
   6. EDUMA SPREADSHEET-STYLE GRADING WORKSPACE (LIGHT)
   ========================================================================== */
.eduma-grading-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.eduma-grading-table thead th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  padding: 0.875rem 1rem;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.eduma-grading-table tbody tr {
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.eduma-grading-table tbody tr:hover {
  background: #f8fafc;
}

.eduma-grading-table tbody td {
  padding: 0.875rem 1rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

/* ==========================================================================
   7. NOTIFICATION BADGE & ANIMATION
   ========================================================================== */
@keyframes edumaPulseRing {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.eduma-pulse {
  animation: edumaPulseRing 2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* ==========================================================================
   8. ENHANCED FORM CONTROLS & INPUT FOCUS (LIGHT)
   ========================================================================== */
.eduma-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 12px !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.8125rem !important;
  transition: all 0.2s ease !important;
}

.eduma-input::placeholder {
  color: #94a3b8 !important;
}

.eduma-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
  outline: none !important;
}

/* ==========================================================================
   9. POPULAR LMS LANDING PAGE & CLASSROOM STREAM STYLES
   ========================================================================== */
.lms-glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.lms-hero-pattern {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(20, 184, 166, 0.05) 0px, transparent 50%);
}

.lms-mockup-window {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
  transition: all 0.3s ease;
}

.lms-mockup-window:hover {
  box-shadow: 0 30px 70px -15px rgba(37, 99, 235, 0.2), 0 0 0 1px rgba(147, 197, 253, 0.6);
  transform: translateY(-4px);
}

.lms-stream-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.lms-stream-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.08);
}

.lms-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8125rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.lms-pill-btn:hover {
  transform: translateY(-1px);
}

.lms-role-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.lms-role-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 16px 32px -8px rgba(37, 99, 235, 0.15);
  transform: translateY(-3px);
}

.lms-role-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lms-role-card:hover::after {
  opacity: 1;
}

/* ==========================================================================
   10. LIGHT THEME CANONICAL OVERRIDES FOR DASHBOARD SHELLS
   Guarantees modern, high-contrast, popular LMS light aesthetics everywhere
   ========================================================================== */

/* Outer Shell Backgrounds */
.bg-\[\#0a0f1d\],
.bg-\[\#0f172a\],
.bg-\[\#0f172a\]\/95 {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

/* Sidebar Shell */
#sidebar.bg-\[\#121c2d\]\/95,
#sidebar.bg-\[\#121c2d\],
aside#sidebar {
  background-color: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.04) !important;
}

/* Headers */
header.bg-\[\#121c2d\]\/90,
header.bg-\[\#121c2d\]\/80,
header.bg-\[\#0f172a\]\/95 {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04) !important;
}

/* Ensure headings inside light headers and cards default to dark */
header h1, header h2, header h3,
.glass-card h1, .glass-card h2, .glass-card h3,
.eduma-card h1, .eduma-card h2, .eduma-card h3 {
  color: #0f172a !important;
}

/* Inactive Sidebar Buttons */
#sidebar nav button.text-slate-300,
#sidebar nav button.text-slate-400 {
  color: #475569 !important;
}
#sidebar nav button.text-slate-300:hover,
#sidebar nav button.text-slate-400:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Active Sidebar Buttons */
#sidebar nav button.bg-gradient-to-r.from-blue-600.to-teal-500,
#sidebar nav button.bg-blue-600 {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1) !important;
  font-weight: 700 !important;
}

#sidebar nav button.bg-gradient-to-r.from-blue-600.to-teal-500 svg,
#sidebar nav button.bg-blue-600 svg {
  color: #2563eb !important;
}

/* Sidebar Divider Headers */
#sidebar nav .uppercase.text-cyan-400,
#sidebar nav .uppercase.text-slate-400 {
  color: #64748b !important;
}

/* Form inputs & selects fallback */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
}

/* Modals in Light Mode */
#modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  border-radius: 1.25rem !important;
}

#modal-content select,
#modal-content input[type="text"],
#modal-content input[type="number"],
#modal-content textarea {
  border-width: 2px !important;
  border-style: solid !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
}

#modal-content select:focus,
#modal-content input[type="text"]:focus,
#modal-content input[type="number"]:focus,
#modal-content textarea:focus {
  border-color: #2563eb !important;
  outline: none !important;
}

/* Override text-white inside light containers so text is always crisp and visible */
.bg-white .text-white,
.glass-card .text-white,
.eduma-card .text-white,
#modal-content .text-white,
main .text-white {
  color: #0f172a !important;
}

/* Buttons that explicitly have text-white remain white */
button.btn-primary,
button.btn-danger,
button.btn-success,
button.btn-eduma-primary,
button.bg-blue-600,
button.bg-emerald-600,
button.bg-rose-600,
button.bg-amber-600,
.btn-eduma-primary .text-white,
button.bg-blue-600 .text-white {
  color: #ffffff !important;
}

/* Light backgrounds for modals & nested cards */
#modal-content .bg-slate-800,
#modal-content .bg-slate-900,
#modal-content .bg-slate-900\/60,
#modal-content .bg-slate-800\/50,
#modal-content .bg-slate-800\/70,
#modal-content .bg-white\/5 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

#modal-content .border-slate-700,
#modal-content .border-slate-800,
#modal-content .border-white\/10 {
  border-color: #e2e8f0 !important;
}

#modal-content label,
#modal-content .text-slate-300,
#modal-content .text-slate-200 {
  color: #334155 !important;
}

/* Classroom Assignment Cards in Light Mode */
#eduma-assignments-container .glass-card,
#eduma-student-asn-container .glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05) !important;
}

#eduma-assignments-container .bg-slate-900\/60,
#eduma-student-asn-container .bg-slate-900\/60 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

#eduma-assignments-container .bg-slate-800,
#eduma-assignments-container .bg-slate-800\/70,
#eduma-assignments-container .bg-slate-800\/40 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* ==========================================================================
   5. BUTTON VISIBILITY & CLEAR OUTLINES (Semua Tombol Bergaris Pinggir Jelas)
   ========================================================================== */
button, 
.btn,
a.btn,
input[type="button"],
input[type="submit"] {
  border-width: 1px !important;
  border-style: solid !important;
  transition: all 0.2s ease-in-out !important;
}

/* Default buttons without explicit border color get crisp outline */
button:not([class*="border-"]),
.btn:not([class*="border-"]) {
  border-color: #cbd5e1 !important;
}

/* Primary blue buttons */
button.bg-blue-600,
button.bg-blue-700,
.btn-primary {
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}
button.bg-blue-600:hover,
button.bg-blue-700:hover {
  border-color: #1e40af !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}

/* Emerald / Green buttons */
button.bg-emerald-600,
button.bg-green-600,
button.bg-teal-600 {
  border-color: #047857 !important;
  color: #ffffff !important;
}

/* Secondary / Light buttons */
button.bg-slate-100,
button.bg-slate-200,
button.bg-white {
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
button.bg-white:hover,
button.bg-slate-100:hover {
  border-color: #94a3b8 !important;
  background-color: #f1f5f9 !important;
}

/* Danger / Red buttons */
button.bg-rose-600,
button.bg-red-600 {
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

/* Amber / Warning buttons */
button.bg-amber-500,
button.bg-amber-600 {
  border-color: #b45309 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   6. CLEAN & CLEAR TYPOGRAPHY & HIGH CONTRAST (Keterbacaan Huruf Maksimal)
   ========================================================================== */
body, 
p, 
span, 
div, 
label, 
input, 
select, 
textarea, 
th, 
td {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure table headers and cell text are bold and high contrast */
th {
  color: #1e293b !important;
  font-weight: 700 !important;
}

td {
  color: #0f172a !important;
}

/* Table score inputs in Light Mode */
.table-container input[type="number"] {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  font-weight: 800 !important;
}

.table-container input[type="number"]:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
  background-color: #eff6ff !important;
}

/* ==========================================================================
   7. GLOBAL CONTRAST SAFEGUARDS & LEGACY OVERRIDES (Anti Teks Pudar / Hilang)
   ========================================================================== */
.glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}

.glass-card thead {
  background-color: #f8fafc !important;
}

.glass-card thead th {
  color: #1e293b !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.glass-card tbody tr {
  border-bottom: 1px solid #f1f5f9 !important;
}

/* Safeguard legacy text classes against faint contrast on light backgrounds */
main table .text-gray-100,
main table .text-gray-200,
main table .text-gray-300,
main table .text-slate-100,
main table .text-slate-200,
main table .text-slate-300,
.glass-card .text-gray-100,
.glass-card .text-gray-200,
.glass-card .text-gray-300,
.eduma-card .text-gray-100,
.eduma-card .text-gray-200,
.eduma-card .text-gray-300,
#modal-content .text-gray-100,
#modal-content .text-gray-200,
#modal-content .text-gray-300,
#eduma-student-content-container .text-gray-100,
#eduma-student-content-container .text-gray-200,
#eduma-student-content-container .text-gray-300 {
  color: #0f172a !important;
  font-weight: 600;
}

main table .text-gray-400,
main table .text-slate-400,
.glass-card .text-gray-400,
.glass-card .text-slate-400,
.eduma-card .text-gray-400,
.eduma-card .text-slate-400,
#modal-content .text-gray-400,
#modal-content .text-slate-400,
#eduma-student-content-container .text-gray-400,
#eduma-student-content-container .text-slate-400 {
  color: #334155 !important;
  font-weight: 500;
}

main table .text-gray-500,
.glass-card .text-gray-500,
.eduma-card .text-gray-500,
#modal-content .text-gray-500,
#eduma-student-content-container .text-gray-500 {
  color: #475569 !important;
}

/* Ensure inputs and selects inside modals and tables have crisp visible borders */
#modal-content input:not([type="checkbox"]):not([type="radio"]),
#modal-content select,
#modal-content textarea {
  border: 1.5px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
}

#modal-content input:focus,
#modal-content select:focus,
#modal-content textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Modal sizing and backdrop */
#modal-container {
  border: none !important;
  box-shadow: none !important;
}

/* Master protection: Exactly ONE scrollbar in modals (Eliminasi Dua Fungsi Scroll) */
.modal-scroll-body {
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.modal-scroll-body form,
.modal-scroll-body > div > form,
#modal-content form {
  max-height: none !important;
  overflow-y: visible !important;
  overflow: visible !important;
}



