:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #6366f1;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #06b6d4;
  --background-color: #f1f5f9;
  --card-bg-color: rgba(255, 255, 255, 0.7);
  --text-color: #1e293b;
  --heading-color: #0f172a;
  --shadow-color: rgba(0, 0, 0, 0.05);
  --font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);

  /* Bootstrap Overrides */
  --bs-primary: var(--primary-color);
  --bs-primary-rgb: 79, 70, 229;
  --bs-success: var(--success-color);
  --bs-danger: var(--danger-color);
  --bs-warning: var(--warning-color);
  --bs-info: var(--info-color);
}

body {
  zoom: 0.7;
  background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), 
              url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&q=80&w=2070');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: var(--font-family);
  color: var(--text-color);
  min-height: 100vh;
}

@media (max-width: 991px) {
  body {
    zoom: 0.95; /* Keep it larger on mobile for touch targets */
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 95%; /* Maintain side-to-side width as requested */
  }
}

/* Glassmorphism Navbar */
.navbar {
  background: rgba(79, 70, 229, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 0.4rem 1rem;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 18px !important;
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.75rem;
  font-weight: 500;
}

.nav-link i {
  font-size: 1.4rem;
  margin-bottom: 6px;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.nav-link:hover i {
  transform: scale(1.1);
}

.nav-item .nav-link.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Premium Cards */
.card {
  border: 1px solid var(--glass-border);
  background: var(--card-bg-color);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
  font-size: 1.1rem;
}

/* Stat Cards */
.stat-card {
  border-left: 6px solid var(--primary-color);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.stat-icon {
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.15;
  transition: all 0.3s ease;
}

.card:hover .stat-icon {
  opacity: 0.25;
  transform: scale(1.1) rotate(-10deg);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Live Monitor Cards */
.live-monitor-card {
  border-top: 4px solid var(--primary-color);
}

.live-monitor-card .countdown {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin: 1rem 0;
}

/* Animations */
.page {
  display: none;
  animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page.active {
  display: block;
}

/* Buttons */
.btn {
  border-radius: 12px;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* Tables */
.table {
  border-radius: 16px;
  overflow: hidden;
}

.table thead th {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 1.25rem;
}

.table tbody td {
  padding: 1.25rem;
  vertical-align: middle;
}

/* Login Page */
#login-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: linear-gradient(rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.1)), url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&q=80&w=2070');
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(5px);
}

#login-page .card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-footer {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-footer strong {
  color: #fff;
}

/* Form Inputs */
.form-control, .form-select {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mobile Nav Enhancements */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1050;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-link, .mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  transition: all 0.3s ease;
  border: none;
  background: none;
  padding: 0;
}

.mobile-nav-link i, .mobile-nav-btn i {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.mobile-nav-link.active {
  color: var(--primary-color) !important;
}

.mobile-nav-btn.btn-kirim {
  color: var(--success-color);
}

.mobile-nav-btn.btn-logout {
  color: var(--danger-color);
}

/* Ensure content doesn't get hidden behind bottom nav */
body {
  padding-bottom: 85px;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

/* Assessment Rubric Items */
.rubric-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
  transition: border-color 0.3s ease;
}

.rubric-item:hover {
  border-color: var(--primary-color);
}

.btn-check:checked + .btn-outline-primary {
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Micro-interactions */
.badge {
  padding: 0.5em 0.8em;
  font-weight: 600;
  border-radius: 8px;
}

.spinner-border {
  color: var(--primary-color);
}

/* About Developer Page */
.container-about {
  max-width: 700px;
  margin: 40px auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.profile-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%; /* Oval/Circle */
  border: 4px solid #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  margin-bottom: 25px;
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05) rotate(3deg);
}

.container-about h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 10px;
}

.container-about h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 20px;
  text-align: left;
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
}

.container-about ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.container-about ul li {
  margin-bottom: 12px;
  padding: 10px 15px;
  background: rgba(241, 245, 249, 0.5);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.container-about ul li:hover {
  background: rgba(241, 245, 249, 0.8);
  transform: translateX(5px);
}

.container-about a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.portfolio-item {
  display: block;
  padding: 12px 15px;
  background: rgba(241, 245, 249, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  background: #fff;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.portfolio-item i {
  color: var(--primary-color);
  width: 20px;
}

.contact-box {
  margin-top: 40px;
  padding: 25px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-radius: 20px;
  border: 1px dashed var(--primary-color);
  text-align: center;
}

.footer-about {
  margin-top: 40px;
  font-size: 0.8rem;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  text-align: center;
}

/* Table Scrollable Container */
.table-scroll-container {
  max-height: 500px;
  overflow-y: auto;
}
.table-scroll-container thead {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

.card-body canvas {
  max-height: 400px !important;
  width: 100% !important;
}

#station-analytics-container, 
#rubric-performance-container, 
#session-comparison-container,
#rubric-difficulty-container {
  position: relative;
  height: 400px;
}

@media (max-width: 768px) {
  .card-body canvas {
    max-height: 300px !important;
  }
  #station-analytics-container, 
  #rubric-performance-container, 
  #session-comparison-container,
  #rubric-difficulty-container {
    height: 300px;
  }
}

/* Session Adjustment Tabs specific styling to prevent global nav-link style leak */
#sessionAdjustTabs {
  border-bottom: none;
  gap: 10px;
  margin-bottom: 1.5rem !important;
}

#sessionAdjustTabs .nav-item {
  flex: 1;
}

#sessionAdjustTabs .nav-link {
  display: block !important;
  text-align: center !important;
  flex-direction: row !important;
  padding: 12px 10px !important;
  border-radius: 12px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
  transition: all 0.3s ease !important;
  width: 100%;
}

/* Default state colors for each tab (colourful icons and borders/text) */
#sessionAdjustTabs #swap-tab {
  color: #6366f1 !important; /* Indigo */
  background-color: #f5f3ff !important;
  border-color: #ddd6fe !important;
}
#sessionAdjustTabs #swap-tab:hover {
  background-color: #ede9fe !important;
}
#sessionAdjustTabs #swap-tab.active {
  color: #ffffff !important;
  background-color: #6366f1 !important;
  border-color: #6366f1 !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

#sessionAdjustTabs #move-tab {
  color: #3b82f6 !important; /* Blue */
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
}
#sessionAdjustTabs #move-tab:hover {
  background-color: #dbeafe !important;
}
#sessionAdjustTabs #move-tab.active {
  color: #ffffff !important;
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

#sessionAdjustTabs #move-session-tab {
  color: #f59e0b !important; /* Amber */
  background-color: #fffbeb !important;
  border-color: #fef3c7 !important;
}
#sessionAdjustTabs #move-session-tab:hover {
  background-color: #fef3c7 !important;
}
#sessionAdjustTabs #move-session-tab.active {
  color: #ffffff !important;
  background-color: #f59e0b !important;
  border-color: #f59e0b !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

#sessionAdjustTabs #manual-schedule-tab {
  color: #10b981 !important; /* Green */
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}
#sessionAdjustTabs #manual-schedule-tab:hover {
  background-color: #d1fae5 !important;
}
#sessionAdjustTabs #manual-schedule-tab.active {
  color: #ffffff !important;
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

#sessionAdjustTabs .nav-link i {
  font-size: 1rem !important;
  margin-bottom: 0 !important;
  margin-right: 6px !important;
  display: inline-block !important;
}


