/* ==========================================================================
   Modern Admin Portal Theme & Design System (Autonomous Engineering Team)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Almarai:wght@400;700;800&display=swap');

:root {
  /* Admin Palette - Sleek Executive Dashboard */
  --admin-primary: #3B82F6;
  --admin-primary-dark: #2563EB;
  --admin-secondary: #8B5CF6;
  --admin-accent: #F59E0B;
  --admin-success: #10B981;
  --admin-danger: #EF4444;
  
  /* Backgrounds & Panels */
  --bg-dashboard: #F1F5F9;
  --bg-panel: #FFFFFF;
  --bg-sidebar: #0F172A;
  --bg-sidebar-hover: #1E293B;
  --bg-glass-panel: rgba(255, 255, 255, 0.9);
  
  /* Text & Borders */
  --text-main: #0F172A;
  --text-sub: #475569;
  --text-light: #F8FAFC;
  --border-light: #E2E8F0;
  --border-dark: #334155;
  
  /* Elevation */
  --elevation-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --elevation-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --elevation-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --elevation-card-hover: 0 14px 24px -4px rgba(59, 130, 246, 0.15);
  
  /* Transitions */
  --anim-fast: 0.15s ease-in-out;
  --anim-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Radii */
  --rad-sm: 0.375rem;
  --rad-md: 0.75rem;
  --rad-lg: 1rem;
  --rad-full: 9999px;
}

/* Base Dashboard Reset & Typography */
body, .content-wrapper, .main-container {
  background-color: var(--bg-dashboard) !important;
  color: var(--text-main) !important;
  font-family: 'Almarai', 'Inter', sans-serif !important;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .page-title, .card-title {
  font-family: 'Outfit', 'Almarai', sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-main);
}

/* Modern Dashboard Cards (KPIs and Analytics) */
.card, .panel, .dashboard-card, .uk-card {
  background: var(--bg-glass-panel) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light) !important;
  border-radius: var(--rad-lg) !important;
  box-shadow: var(--elevation-sm) !important;
  transition: var(--anim-smooth) !important;
}

.card:hover, .panel:hover, .dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--elevation-card-hover), var(--elevation-md) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Sidebar & Navigation Styling */
.sidebar, .left-sidebar, .nav-sidebar, #sidebar {
  background-color: var(--bg-sidebar) !important;
  color: var(--text-light) !important;
  box-shadow: var(--elevation-lg);
  border-right: 1px solid var(--border-dark);
}

.sidebar a, .nav-sidebar a, .sidebar-menu li a {
  color: #94A3B8 !important;
  font-weight: 500;
  transition: var(--anim-fast);
  border-radius: var(--rad-md);
  margin: 0.2rem 0.75rem;
}

.sidebar a:hover, .sidebar a.active, .nav-sidebar a:hover {
  background-color: var(--bg-sidebar-hover) !important;
  color: #FFFFFF !important;
  transform: translateX(4px);
}

/* Admin Table & Data Grid Modernization */
table, .table, .data-table {
  background: #FFFFFF !important;
  border-radius: var(--rad-md);
  overflow: hidden;
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100%;
  box-shadow: var(--elevation-sm);
}

table th, .table th {
  background-color: #F8FAFC !important;
  color: var(--text-sub) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem !important;
  border-bottom: 2px solid var(--border-light) !important;
}

table td, .table td {
  padding: 1rem !important;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

table tr:hover td, .table tr:hover {
  background-color: #F1F5F9 !important;
}

/* Buttons and Action Controls */
.btn, button, .uk-button {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600 !important;
  border-radius: var(--rad-md) !important;
  padding: 0.5rem 1.25rem;
  transition: var(--anim-smooth) !important;
  border: none;
  cursor: pointer;
}

.btn-primary, .btn-info, .uk-button-primary {
  background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3) !important;
}

.btn-primary:hover, .btn-info:hover, .uk-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.45) !important;
}

/* Status Badges */
.badge, .label, .status-pill {
  padding: 0.35em 0.8em !important;
  border-radius: var(--rad-full) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}

.badge-success, .label-success { background-color: rgba(16, 185, 129, 0.15) !important; color: #059669 !important; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning, .label-warning { background-color: rgba(245, 158, 11, 0.15) !important; color: #D97706 !important; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger, .label-danger   { background-color: rgba(239, 68, 68, 0.15) !important; color: #DC2626 !important; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Responsive Layout Anpassungen */
@media (max-width: 992px) {
  .sidebar, #sidebar {
    width: 100%;
    position: relative;
  }
  .main-container, .content-wrapper {
    margin-left: 0 !important;
  }
}

/* ==========================================================================
   Advanced UI/UX Enhancements (Autonomous UI/UX Designer & Frontend Role)
   ========================================================================== */

/* Glassmorphism & Card Glows */
.card, .panel, .dashboard-card, .uk-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card:hover, .panel:hover, .dashboard-card:hover {
  transform: translateY(-5px) scale(1.008);
  box-shadow: 0 20px 30px -10px rgba(59, 130, 246, 0.18), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dashboard);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--rad-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Glowing Badges & Status Indicators */
.badge-success, .label-success {
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.badge-warning, .label-warning {
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.badge-danger, .label-danger {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Micro-animations for Interactive Elements */
input, select, textarea, .form-control {
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  border-radius: var(--rad-md) !important;
}

input:focus, select:focus, textarea:focus, .form-control:focus {
  border-color: var(--admin-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
  outline: none !important;
}

/* Pulse Loading State */
@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}
.loading-pulse {
  animation: pulseGlow 2s infinite ease-in-out;
}


/* Lecture drag-to-order (SortableJS / mdsSortable) */
.lecture-drag-handle {
  cursor: grab;
}
.lecture-drag-handle:active {
  cursor: grabbing;
}
.mds-sort-ghost {
  opacity: 0.4;
}
.mds-sort-chosen {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
