/* Dashboard CSS - Modern Student Dashboard */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2C3B68;
  --primary-dark: #032152;
  --primary-light: #2539ee;
  --secondary: #f59e0b;
  --accent: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --ink: #1f2937;
  --ink-70: rgba(31, 41, 55, 0.7);
  --ink-50: rgba(31, 41, 55, 0.5);
  --ink-10: rgba(31, 41, 55, 0.1);
  --ink-5: rgba(31, 41, 55, 0.05);
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--ink);
  line-height: 1.6;
  transition: all 0.3s ease;
}

body.sidebar-open {
  overflow: hidden;
}

/* Header */
.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-10);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--ink-10);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--ink);
}

.logo img {
  height: 40px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notification-btn,
.cart-btn {
  position: relative;
  background: none;
  border: 1px solid var(--ink-10);
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.3s ease;
}

.notification-btn:hover,
.cart-btn:hover {
  background: var(--ink-10);
  transform: translateY(-2px);
}

.notification-badge,
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-dropdown {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--ink-10);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.3s ease;
}

.profile-btn:hover {
  background: var(--ink-10);
}

.profile-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.profile-dropdown:hover .profile-menu,
.profile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.3s ease;
}

.profile-menu a:hover {
  background: var(--ink-10);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: white;
  border-right: 1px solid var(--gray-200);
  transform: translateX(0);
  transition: transform 0.3s ease;
  z-index: 999;
  padding-top: 0;
  display: block;
  box-shadow: var(--shadow-lg);
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.sidebar-logo img {
  height: 32px;
  width: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.25rem;
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: var(--primary);
  color: white;
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.nav-item.logout {
  color: var(--danger);
  margin-top: 2rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

.nav-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Main Content */
.main-content {
  margin-left: 0;
  padding-top: 5rem;
  transition: margin-left 0.3s ease;
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.welcome-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.welcome-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.welcome-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.robot-guide {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.robot-avatar {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.robot-message p {
  font-style: italic;
  margin: 0;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.view-all {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.view-all:hover {
  color: var(--primary-dark);
  background: var(--gray-50);
}

/* Progress Section */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.progress-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--gray-200);
}

.progress-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.course-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.course-info p {
  color: var(--ink-70);
  margin-bottom: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--ink-10);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--ink-70);
}

.resume-btn,
.start-btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.resume-btn {
  background: var(--primary);
  color: white;
}

.start-btn {
  background: var(--primary-dark);
  color: white;
}

.resume-btn:hover,
.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Tutorials Section */
.tutorials-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.tutorial-card {
  min-width: 250px;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--ink-10);
}

.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(44, 59, 104, 0.2);
}

.tutorial-thumbnail {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.tutorial-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.tutorial-card:hover .play-overlay {
  opacity: 1;
}

.duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.tutorial-card h3 {
  padding: 1rem 1rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}

.tutorial-card p {
  padding: 0 1rem 1rem;
  color: var(--ink-70);
  font-size: 0.9rem;
}

/* =====================================================
   Kits & Products Section — Premium Card Design
   ===================================================== */
.kits-section {
  margin-bottom: 2.5rem;
}

.kits-sub {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.kits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .kits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .kits-grid { grid-template-columns: 1fr; }
}

/* --- EYE-CATCHING KIT CARD DESIGN --- */
.ref-card {
  width: 100%;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(26, 43, 86, 0.06);
  border: 1px solid rgba(226, 233, 251, 0.7);
  position: relative;
}

.ref-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, transparent 40%, rgba(76, 151, 255, 0.15) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.ref-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px rgba(26, 43, 86, 0.12);
}

.ref-card:hover::after {
  opacity: 1;
}

/* Image Section — BIGGER */
.ref-card-image {
  height: 250px;
  background: linear-gradient(180deg, #f5f8ff 0%, #edf2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  position: relative;
  overflow: hidden;
}

.ref-card-image::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(76, 151, 255, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ref-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #ff9f43 0%, #ff6b35 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  z-index: 3;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

.ref-card-image img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.12));
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ref-card:hover .ref-card-image img {
  transform: scale(1.08);
}

/* Content Body */
.ref-card-body {
  padding: 1.4rem 1.3rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ref-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a2b56;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

/* Details Text */
.ref-card-details-text {
  font-size: 0.88rem;
  color: #6b7fa5;
  line-height: 1.55;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Age Range Chip */
.ref-card-age {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4b63ac;
  background: #f0f4ff;
  padding: 6px 14px;
  border-radius: 10px;
  margin-bottom: 1rem;
  width: fit-content;
  border: 1px solid rgba(75, 99, 172, 0.1);
}

.ref-card-age i {
  color: #4c97ff;
  font-size: 0.9rem;
}

/* Price Row */
.ref-card-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
}

.ref-card-price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ref-card-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a2b56;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.ref-card-original-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: #aab4c8;
  text-decoration: line-through;
  white-space: nowrap;
}

.ref-card-shipping {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
  background: #ecfdf5;
  padding: 6px 14px;
  border-radius: 10px;
  margin-bottom: 1rem;
  width: fit-content;
  border: 1px solid rgba(16, 185, 129, 0.1);
}

.ref-card-shipping i {
  font-size: 0.82rem;
}

/* Buy Button */
.ref-card-btn {
  background: linear-gradient(135deg, #253562 0%, #344580 100%);
  color: #ffffff !important;
  width: 100%;
  padding: 0.9rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.35s ease;
  box-shadow: 0 6px 18px rgba(37, 53, 98, 0.18);
  margin-top: auto;
  letter-spacing: 0.3px;
}

.ref-card-btn:hover {
  background: linear-gradient(135deg, #1a274a 0%, #253562 100%);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(37, 53, 98, 0.28);
}

.ref-card-btn i {
  font-size: 0.95rem;
}

/* --- OUT OF STOCK STYLES --- */
.ref-card.out-of-stock {
  opacity: 0.85;
}

.ref-card.out-of-stock:hover {
  transform: translateY(-4px);
}

.oos-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 4;
  pointer-events: none;
}

.oos-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3) !important;
}

.oos-badge i {
  margin-right: 2px;
}

.ref-card.out-of-stock .ref-card-image img {
  filter: grayscale(60%) drop-shadow(0 12px 25px rgba(0, 0, 0, 0.08));
}

.oos-btn {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.15) !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Quantity Controls */
.ref-card-qty-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8faff;
  border: 1px solid #e2e9fb;
  border-radius: 14px;
  padding: 0.6rem;
  margin-top: auto;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid #d0dbf5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #1a2b56;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(26,43,86,0.05);
}

.qty-btn:hover {
  background: #1a2b56;
  color: #ffffff;
  border-color: #1a2b56;
}

.qty-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a2b56;
  width: 40px;
  text-align: center;
}

.modal-qty-ctrl {
  margin-top: 0;
  padding: 0.5rem;
  width: 180px;
}

/* ========== PRODUCT DETAIL MODAL (REDESIGNED) ========== */
.kit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  padding: 1.5rem;
}

.kit-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.kit-modal {
  background: #ffffff;
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kit-modal-overlay.active .kit-modal {
  transform: translateY(0) scale(1);
}

.kit-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: #1a2b56;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kit-modal-close:hover {
  background: #fef2f2;
  color: #ef4444;
}

/* Hero Image (Top, Compact) */
.km-hero {
  background: linear-gradient(180deg, #eef3ff 0%, #dfe8ff 50%, #f0f4ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  position: relative;
  border-radius: 24px 24px 0 0;
  height: 280px;
  overflow: hidden;
}

.km-hero::before {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(76, 151, 255, 0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.km-hero img {
  max-width: 80%;
  max-height: 240px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.15));
}

.kit-modal-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: linear-gradient(135deg, #ff9f43 0%, #ff6b35 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
  z-index: 3;
  letter-spacing: 0.3px;
}

.oos-modal-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.discount-modal-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

/* Body Content */
.km-body {
  padding: 1.75rem 2rem 2rem;
}

/* Header */
.km-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.km-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a2b56;
  line-height: 1.3;
  margin: 0;
}

.km-type {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4b63ac;
  background: #f0f4ff;
  padding: 3px 12px;
  border-radius: 6px;
  margin-top: 6px;
}

.km-stock {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.km-stock.in-stock {
  background: #ecfdf5;
  color: #10b981;
}

.km-stock.out-stock {
  background: #fef2f2;
  color: #ef4444;
}

/* Info */
.km-info {
  font-size: 0.95rem;
  color: #6b7fa5;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Sections */
.km-section {
  margin-bottom: 1.25rem;
}

.km-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a2b56;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.km-section-title i {
  color: #4c97ff;
  font-size: 0.9rem;
}

.km-text {
  font-size: 0.92rem;
  color: #607296;
  line-height: 1.7;
  background: #f8faff;
  padding: 12px 16px;
  border-radius: 12px;
  border-left: 3px solid #4c97ff;
}

/* Specs Row */
.km-specs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 1.25rem;
}

.km-spec {
  background: #f8faff;
  border: 1px solid #eef2f8;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.km-spec i {
  font-size: 1.1rem;
  color: #4c97ff;
  margin-bottom: 2px;
}

.km-spec-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #8694b1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.km-spec-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1a2b56;
}

/* Assembly List */
.km-assembly-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.km-assembly-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #344580;
  background: #f8faff;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #eef2f8;
  transition: all 0.2s ease;
}

.km-assembly-list li:hover {
  background: #edf2ff;
  border-color: #d0dbf5;
}

.km-assembly-list li i {
  color: #10b981;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.km-assembly-list li span {
  text-transform: capitalize;
}

/* Footer: Price + Buy */
.km-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef2f8;
  margin-top: 0.5rem;
}

.km-price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.km-price {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1a2b56;
  letter-spacing: -1px;
}

.km-original {
  font-size: 1rem;
  font-weight: 600;
  color: #aab4c8;
  text-decoration: line-through;
}

.km-save-tag {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
}

.km-buy-btn {
  background: linear-gradient(135deg, #253562 0%, #344580 100%);
  color: #ffffff !important;
  padding: 0.85rem 2rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(37, 53, 98, 0.18);
  white-space: nowrap;
  flex-shrink: 0;
}

.km-buy-btn:hover {
  background: linear-gradient(135deg, #1a274a 0%, #253562 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 53, 98, 0.28);
}

.oos-modal-btn {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.15) !important;
  cursor: not-allowed;
}

.oos-modal-btn:hover {
  transform: none !important;
}

/* Modal Mobile */
@media (max-width: 600px) {
  .km-hero { height: 220px; padding: 1.5rem; }
  .km-hero img { max-height: 180px; max-width: 85%; }
  .km-body { padding: 1.25rem 1.5rem 1.5rem; }
  .km-header { flex-direction: column; gap: 0.5rem; }
  .km-title { font-size: 1.25rem; }
  .km-specs-row { grid-template-columns: repeat(2, 1fr); }
  .km-assembly-list { grid-template-columns: 1fr; }
  .km-footer { flex-direction: column; }
  .km-buy-btn { width: 100%; justify-content: center; }
}

/* =====================================================
   Arduino Code Lab Section
   ===================================================== */
.arduino-codelab-section {
  position: relative;
  background: linear-gradient(135deg, #e8f0ff 0%, #f0f4ff 50%, #eaf6ff 100%);
  border-radius: 24px;
  padding: 3rem 2.5rem 2rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(62, 111, 244, 0.12);
  border: 1px solid rgba(99, 132, 255, 0.15);
}

/* Floating decorative bubbles */
.acl-bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.acl-bubble-1 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(62,111,244,0.13) 0%, transparent 70%);
  top: -80px; left: -80px;
  animation: acl-float 7s ease-in-out infinite;
}
.acl-bubble-2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  bottom: -60px; right: 120px;
  animation: acl-float 9s ease-in-out infinite 2s;
}
.acl-bubble-3 {
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
  top: 50%; right: -40px;
  animation: acl-float 6s ease-in-out infinite 1s;
}

@keyframes acl-float {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Top badge */
.acl-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(18,43,90,0.08);
  border: 1px solid rgba(18,43,90,0.2);
  backdrop-filter: blur(8px);
  color: #122B5A;
  border-radius: 30px;
  padding: 0.4rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

/* Main inner layout */
.acl-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

/* ---------- LEFT SIDE ---------- */
.acl-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #122B5A;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.acl-highlight {
  background: linear-gradient(90deg, #122B5A, #2a5faa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.acl-subtitle {
  color: #3a4f6e;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Feature list */
.acl-features {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}
.acl-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(62,111,244,0.12);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(62,111,244,0.06);
}
.acl-feature:hover {
  background: #fff;
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(62,111,244,0.14);
}
.acl-feature-icon {
  width: 38px; height: 38px;
  min-width: 38px;
  background: linear-gradient(135deg, #3e6ff4, #2ab7ff);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(62,111,244,0.45);
}
.acl-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.acl-feature-text strong {
  color: #122B5A;
  font-size: 0.95rem;
  font-weight: 700;
}
.acl-feature-text span {
  color: #4a6080;
  font-size: 0.82rem;
}

/* CTA buttons */
.acl-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.acl-btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, #122B5A, #1e4a8a);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(18,43,90,0.35);
}
.acl-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(18,43,90,0.5);
  background: linear-gradient(135deg, #1a3d7a, #2558a8);
}
.acl-btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff;
  color: #122B5A;
  border: 1.5px solid #122B5A;
  border-radius: 12px;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.acl-btn-secondary:hover {
  background: #eaf0fa;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(18,43,90,0.15);
}

/* ---------- RIGHT SIDE: Editor ---------- */
.acl-editor {
  background: #1c2340;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.07);
  animation: acl-editor-in 0.8s ease both;
}
@keyframes acl-editor-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.acl-editor-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #141929;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.acl-editor-dots { display: flex; gap: 6px; }
.acl-editor-dots .dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.acl-editor-title {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Editor body: sidebar + workspace */
.acl-editor-body {
  display: flex;
  height: 220px;
}
.acl-sidebar-categories {
  width: 68px;
  background: #141929;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  gap: 0.5rem;
}
.acl-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0.5rem 0.25rem;
  width: 100%;
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.acl-cat i { font-size: 1.1rem; }
.acl-cat:hover, .acl-cat.active {
  background: rgba(62,111,244,0.3);
  color: #fff;
}

/* Block workspace */
.acl-workspace {
  flex: 1;
  padding: 1rem 0.9rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}
.acl-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  animation: acl-block-in 0.5s ease both;
}
.acl-block:nth-child(1) { animation-delay: 0.1s; }
.acl-block:nth-child(2) { animation-delay: 0.2s; }
.acl-block:nth-child(3) { animation-delay: 0.3s; }
.acl-block:nth-child(4) { animation-delay: 0.4s; }

@keyframes acl-block-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.acl-block-inset { margin-left: 20px; }

.acl-block-green  { background: linear-gradient(90deg, #10b981, #059669); box-shadow: 0 3px 10px rgba(16,185,129,0.35); }
.acl-block-blue   { background: linear-gradient(90deg, #1c3d7a, #2563eb); box-shadow: 0 3px 10px rgba(59,130,246,0.35); }
.acl-block-orange { background: linear-gradient(90deg, #f59e0b, #d97706); box-shadow: 0 3px 10px rgba(245,158,11,0.35); }
.acl-block-purple { background: linear-gradient(90deg, #8b5cf6, #6d28d9); box-shadow: 0 3px 10px rgba(139,92,246,0.35); }

.acl-val {
  background: rgba(255,255,255,0.25);
  border-radius: 5px;
  padding: 1px 8px;
  font-weight: 700;
}

/* Ghost dragging block */
.acl-ghost-block {
  display: flex; align-items: center; gap: 0.5rem;
  position: absolute;
  bottom: 12px; right: 10px;
  background: rgba(245,158,11,0.25);
  border: 2px dashed rgba(245,158,11,0.7);
  color: rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  animation: acl-ghost-pulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes acl-ghost-pulse {
  0%,100% { opacity: 0.6; transform: scale(1) rotate(-1deg); }
  50% { opacity: 1; transform: scale(1.04) rotate(0deg); }
}

/* Editor footer */
.acl-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141929;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.acl-status {
  display: flex; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
}
.acl-status-dot {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: acl-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px #10b981;
}
@keyframes acl-pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}
.acl-footer-btns { display: flex; gap: 0.5rem; }
.acl-run-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; border: none; border-radius: 8px;
  padding: 0.4rem 0.9rem; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}
.acl-run-btn:hover { transform: translateY(-2px); }
.acl-upload-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; padding: 0.4rem 0.9rem; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.acl-upload-btn:hover { background: rgba(255,255,255,0.18); }

/* Stats row */
.acl-stats-row {
  display: flex;
  justify-content: space-around;
  margin-top: 1.2rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(62,111,244,0.12);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(62,111,244,0.07);
}
.acl-stat {
  display: flex; align-items: center; gap: 0.75rem;
  color: #122B5A;
}
.acl-stat i {
  font-size: 1.5rem;
  color: #122B5A;
}
.acl-stat div {
  display: flex; flex-direction: column;
}
.acl-stat strong {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  color: #122B5A;
}
.acl-stat span {
  font-size: 0.72rem;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  .acl-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .acl-title { font-size: 2rem; }
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.achievement-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  border: 1px solid var(--ink-10);
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(44, 59, 104, 0.2);
}

.achievement-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.achievement-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.achievement-info p {
  color: var(--ink-70);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.achievement-date {
  font-size: 0.8rem;
  color: var(--ink-70);
}

/* Announcements Section */
.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.announcement-item {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--ink-10);
}

.announcement-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(44, 59, 104, 0.15);
}

.announcement-icon {
  width: 40px;
  height: 40px;
  background: var(--ink-10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-700);
  flex-shrink: 0;
}

.announcement-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.announcement-content p {
  color: var(--ink-70);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.announcement-time {
  font-size: 0.8rem;
  color: var(--ink-70);
}

/* Chatbot */
.chatbot {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 400px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: var(--primary);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
}

.chatbot-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  max-width: 80%;
}

.chat-message.bot {
  background: var(--ink-10);
  margin-right: auto;
}

.chatbot-input {
  display: flex;
  padding: 1rem;
  border-top: 1px solid var(--ink-10);
  gap: 0.5rem;
}

.chatbot-input input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--ink-10);
  border-radius: var(--radius);
  outline: none;
}

.chatbot-input button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: block;
  }

  .dashboard-header {
    left: 0;
  }

  .sidebar {
    width: 100%;
    z-index: 1001;
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .dashboard-container {
    padding: 1rem;
  }

  .welcome-section {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .welcome-content h1 {
    font-size: 2rem;
  }

  .progress-grid,
  .kits-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .tutorials-scroll {
    flex-direction: column;
  }

  .tutorial-card {
    min-width: auto;
  }

  .battle-content {
    flex-direction: column;
    text-align: center;
  }

  .battle-stats {
    justify-content: center;
  }

  .battle-image img {
    width: 100%;
    height: auto;
  }

  .chatbot-window {
    width: 300px;
    height: 350px;
  }
}

@media (max-width: 480px) {
  .dashboard-header {
    padding: 1rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .profile-btn span {
    display: none;
  }

  .welcome-content h1 {
    font-size: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .chatbot {
    bottom: 1rem;
    right: 1rem;
  }

  .chatbot-window {
    width: calc(100vw - 2rem);
    right: -1rem;
  }
}

/* --- New Dashboard Layout & Sections --- */
.dashboard-header.full-width {
  left: 0;
}

.main-content.full-width {
  margin-left: 0;
}

/* Arduino Code Lab */
.code-lab-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}

.code-lab-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.code-lab-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.code-lab-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
}

.code-lab-container {
  display: flex;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 992px) {
  .code-lab-container {
    flex-direction: column;
  }
}

.code-lab-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.feature-text p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin: 0;
}

.code-lab-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.primary-btn,
.secondary-btn {
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(44, 59, 104, 0.3);
}

.secondary-btn {
  background: var(--gray-100);
  color: var(--ink);
  border: 1px solid var(--gray-300);
}

.secondary-btn:hover {
  background: var(--gray-200);
}

.code-lab-preview {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ide-window {
  background: #1e1e2e;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #333;
}

.ide-header {
  background: #2a2a3c;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  position: relative;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.window-controls .close {
  background: #ff5f56;
}

.window-controls .minimize {
  background: #ffbd2e;
}

.window-controls .maximize {
  background: #27c93f;
}

.ide-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #a0a0b0;
  font-size: 0.85rem;
  font-weight: 500;
}

.ide-body {
  display: flex;
  height: 280px;
}

.ide-sidebar {
  width: 80px;
  background: #181825;
  border-right: 1px solid #2a2a3c;
  display: flex;
  flex-direction: column;
}

.ide-category {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #a0a0b0;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ide-category i {
  font-size: 1.25rem;
}

.ide-category:hover,
.ide-category.active {
  color: white;
  background: #2a2a3c;
}

.ide-category.active {
  border-left: 3px solid var(--primary-light);
}

.ide-workspace {
  flex: 1;
  padding: 1.5rem;
  background: #1e1e2e;
  overflow: hidden;
}

.code-block {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
}

.code-block strong {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.event-block {
  background: #2ed573;
}

.motion-block {
  background: #3742fa;
  margin-left: 1rem;
}

.loop-block {
  background: #ffa502;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.inner-blocks {
  margin-left: 1.5rem;
  width: 100%;
}

.inner-blocks .code-block {
  margin-bottom: 0;
}

.ide-footer {
  background: #181825;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #2a2a3c;
}

.connection-status {
  color: #a0a0b0;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #2ed573;
  border-radius: 50%;
  box-shadow: 0 0 8px #2ed573;
}

.ide-actions {
  display: flex;
  gap: 0.75rem;
}

.run-btn,
.upload-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.run-btn {
  background: #2ed573;
  color: white;
}

.upload-btn {
  background: #3742fa;
  color: white;
}

.code-lab-stats {
  display: flex;
  gap: 1rem;
}

.stat-card {
  flex: 1;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--gray-200);
}

.stat-card i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card p {
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Products Section */
.products-section {
  margin-bottom: 4rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.product-image {
  position: relative;
  height: 220px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: white;
}

.product-badge.new {
  background: #10b981;
}

.product-badge.hot {
  background: #ef4444;
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.product-desc {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.product-old-price {
  font-size: 1.1rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.add-to-cart-btn {
  width: 100%;
  padding: 0.8rem;
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-card:hover .add-to-cart-btn {
  background: var(--primary);
  color: white;
}

/* Footer Section */
.main-footer {
  background: var(--ink);
  color: white;
  padding: 4rem 2rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.brand-col p {
  color: var(--gray-400);
  margin: 1.5rem 0;
  line-height: 1.6;
}

.footer-logo img {
  height: 48px;
  filter: brightness(0) invert(1);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.footer-col h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-light);
  border-radius: 2px;
}

.contact-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: var(--gray-300);
}

.contact-list i {
  color: var(--primary-light);
  margin-top: 0.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a::before {
  content: '→';
  color: var(--primary-light);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* --- Welcome Banner & Interactive Sections --- */
.welcome-banner {
  background: #1e2640;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(55, 66, 250, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-text h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-text p {
  color: #a0a0b0;
  font-size: 1.1rem;
}

.welcome-robot-msg {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.robot-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.msg-text {
  font-style: italic;
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.4;
}

/* Interactive Dashboard Section */
.interactive-dashboard {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .interactive-dashboard {
    grid-template-columns: 1fr;
  }

  .welcome-banner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .welcome-robot-msg {
    margin: 0 auto;
  }
}

.daily-challenge {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.daily-challenge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #3742fa, #2ed573);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.challenge-badge {
  background: rgba(55, 66, 250, 0.1);
  color: #3742fa;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.time-left {
  color: var(--gray-500);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.challenge-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.challenge-body p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.progress-container {
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3742fa, #2ed573);
  border-radius: 4px;
}

.challenge-footer {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.glow-btn {
  box-shadow: 0 4px 15px rgba(55, 66, 250, 0.4);
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(55, 66, 250, 0.6);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  background: white;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.icon-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
  border-color: var(--primary);
}

.quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}

.streak-box .stat-icon {
  background: linear-gradient(135deg, #ff9f43, #ff7f50);
}

.rank-box .stat-icon {
  background: linear-gradient(135deg, #feca57, #ff9f43);
}

.xp-box .stat-icon {
  background: linear-gradient(135deg, #2ed573, #1dd1a1);
}

.community-box .stat-icon {
  background: linear-gradient(135deg, #3742fa, #5352ed);
}

.stat-info h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.1rem;
}

.stat-info span {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 600;
}

/* --- New Dashboard Styles --- */
@keyframes antigravity {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes antigravity-hero {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.antigravity {
  animation: antigravity 4s ease-in-out infinite;
}

.antigravity-hero {
  animation: antigravity-hero 5s ease-in-out infinite;
}

.pulse-glow {
  animation: pulse-glow 2s infinite;
}

.step-delay-1 { animation-delay: 0.5s; }
.step-delay-2 { animation-delay: 1s; }

.shadow-hover {
  transition: all 0.3s ease;
}

/* Prevent double transform via animation and transition by combining hover state correctly */
.antigravity.shadow-hover:hover {
  box-shadow: var(--shadow-xl);
  animation-play-state: paused;
  transform: translateY(-8px) scale(1.02);
}

.effect-lift {
  transition: all 0.3s ease;
}

.effect-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.collab-input {
  width: 100%;
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: white;
  font-family: inherit;
  transition: all 0.3s ease;
}

.collab-input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(55, 66, 250, 0.2);
}

.collab-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.glass-panel {
  background: linear-gradient(135deg, var(--ink), #111827);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}

/* =====================================================
   Quick Actions Section
   ===================================================== */
.quick-actions-section {
  margin-bottom: 2.5rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.qa-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(18, 43, 90, 0.08);
  box-shadow: 0 4px 20px rgba(18, 43, 90, 0.05);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.qa-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(18, 43, 90, 0.1);
  border-color: rgba(18, 43, 90, 0.15);
}

.qa-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.qa-blue { background: #eef2ff; color: #1c3d7a; }
.qa-indigo { background: #e0e7ff; color: #4f46e5; }
.qa-teal { background: #ccfbf1; color: #14b8a6; }

.qa-body {
  flex: 1;
}

.qa-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #122B5A;
  margin-bottom: 0.5rem;
}

.qa-body p {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.qa-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.qa-meta li {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.qa-meta li i {
  font-size: 0.4rem;
  color: #10b981;
}

.qa-btn {
  width: 100%;
  background: transparent;
  color: #122B5A;
  border: 1.5px solid #122B5A;
  border-radius: 12px;
  padding: 0.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.qa-btn:hover {
  background: #122B5A;
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 43, 90, 0.2);
}

/* =====================================================
   School Collaboration Section
   ===================================================== */
.collaboration-section {
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, #f5f7ff, #eef2ff);
  border-radius: 24px;
  overflow: hidden;
  color: #122B5A;
  border: 1px solid rgba(18, 43, 90, 0.08);
}

.collab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem;
}

.collab-info {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.collab-info h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.collab-info p {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.collab-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.collab-benefits li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.collab-benefits li i {
  color: #10b981;
  font-size: 1.2rem;
}

.collab-form-wrapper {
  flex: 1.2;
  min-width: 300px;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(18, 43, 90, 0.06);
  border: 1px solid rgba(18, 43, 90, 0.05);
}

.collab-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #122B5A;
}

.form-group input,
.form-group textarea {
  padding: 0.8rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #f9fafb;
  color: #1f2937;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3e6ff4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(62, 111, 244, 0.15);
}

.collab-submit-btn {
  background: linear-gradient(135deg, #122B5A, #1e4a8a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(18, 43, 90, 0.2);
  margin-top: 0.5rem;
}

.collab-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(18, 43, 90, 0.3);
  background: linear-gradient(135deg, #1a3d7a, #2558a8);
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
  .collab-container {
    padding: 2rem 1.5rem;
  }
}

/* =====================================================
   Chatbot Floating Button
   ===================================================== */
.chatbot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
}

.chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #1c3d7a, #122B5A);
  box-shadow: 0 18px 40px rgba(44, 59, 104, .35);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  font-size: 24px;
  pointer-events: auto;
  position: relative;
  z-index: 10000;
}

.chatbot-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 22px 48px rgba(44, 59, 104, .45);
  filter: drop-shadow(0 0 8px rgba(44, 59, 104, .35));
}

.chatbot-toggle:active {
  transform: translateY(0) scale(0.98);
}

/* Chatbot Window */
.chatbot-window {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: min(340px, 92vw);
  max-height: 500px;
  background: #ffffff;
  border: 1px solid #e6eef8;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(11, 27, 43, .22);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  transform: translateY(14px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
  z-index: 9998;
}

.chatbot-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, #1c3d7a, #122B5A);
  color: #fff;
  font-weight: 800;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chatbot-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  background: #fbfdff;
}

.chatbot-body::-webkit-scrollbar {
  width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-body::-webkit-scrollbar-thumb {
  background: #d1d9e6;
  border-radius: 3px;
}

.chatbot-body::-webkit-scrollbar-thumb:hover {
  background: #b8c4d6;
}

.chat-message {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-message.bot {
  background: #eef3ff;
  color: #122B5A;
  align-self: flex-start;
}

.chat-message.bot p {
  margin: 0;
  line-height: 1.5;
}

.chat-message.user {
  background: #e9fbf5;
  color: #0a7a5e;
  align-self: flex-end;
}

.chat-message.user p {
  margin: 0;
  line-height: 1.5;
}

.chatbot-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e6eef8;
  background: #fff;
}

.chatbot-input input {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dfe8f4;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chatbot-input input:focus {
  border-color: #1c3d7a;
}

.chatbot-input button {
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1c3d7a, #122B5A);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chatbot-input button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.chatbot-input button:active {
  transform: scale(0.95);
}

/* Chatbot User Registration Form */
.chatbot-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border-radius: 14px;
  border: 1px solid #e6eef8;
  box-shadow: 0 4px 16px rgba(44, 59, 104, 0.08);
}

.chatbot-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chatbot-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #122B5A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chatbot-form-group label i {
  font-size: 12px;
  opacity: 0.7;
}

.chatbot-form-group input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #dfe8f4;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #fff;
}

.chatbot-form-group input:focus {
  border-color: #1c3d7a;
  box-shadow: 0 0 0 3px rgba(44, 59, 104, 0.1);
}

.chatbot-form-group input::placeholder {
  color: #a0aec0;
}

.chatbot-submit-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #1c3d7a, #122B5A);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(44, 59, 104, 0.25);
}

.chatbot-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 59, 104, 0.35);
}

.chatbot-submit-btn:active {
  transform: translateY(0);
}

.chatbot-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator Animation */
.typing-indicator p {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-indicator i {
  font-size: 6px;
  color: #1c3d7a;
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing-indicator i:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator i:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingPulse {
  0%, 60%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  30% {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-message p strong {
  font-weight: 700;
  color: inherit;
}

.chatbot-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid #e6eef8;
  color: #fff;
  background: linear-gradient(135deg, #1c3d7a, #122B5A);
  box-shadow: 0 18px 40px rgba(44, 59, 104, .35);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 200;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.chatbot-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* =====================================================
   Dashboard Footer
   ===================================================== */
.dashboard-footer {
  background: #122B5A;
  color: #e2e8f0;
  padding: 4rem 1rem 1.5rem;
  margin-top: 4rem;
  font-family: 'Poppins', sans-serif;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .footer-logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.footer-brand .footer-tagline {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  max-width: 320px;
}

.footer-links-group h4,
.footer-contact h4 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-links-group h4::after,
.footer-contact h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 2px;
  background: #3b82f6; 
  border-radius: 2px;
}

.footer-links-group ul,
.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links-group a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links-group a:hover,
.footer-contact a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.footer-contact i {
  color: #3b82f6;
  font-size: 1.1rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .dashboard-footer {
    padding-top: 3rem;
  }
}