:root {
  --bg: #0e1520;
  --panel: #111827;
  --muted: #9aa6b2;
  --accent1: #6f42c1;
  --accent2: #00c2ff;
  --accent3: #ff7b00;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Poppins, Segoe UI, Arial, sans-serif;
  background: linear-gradient(180deg, #071129, #020617);
  color: #e6eef8;
  margin: 0;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  background: linear-gradient(90deg, rgba(12, 18, 30, 0.95), rgba(6, 11, 20, 0.95));
  padding: 12px 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.brand-logo {
  height: 42px;
  margin-right: 5px;
  padding: 6px;
  border-radius: 2px;
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

/* Hero Section */
.hero {
  padding: 80px 0;
  background: linear-gradient(90deg, rgba(10, 18, 30, 0.6), rgba(30, 12, 60, 0.6));
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
}

/* Buttons */
.btn-cta {
  background: linear-gradient(90deg, var(--accent3), var(--accent1));
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

/* Containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.course-card img {
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.course-card .card-body {
  color: var(--muted);
}

/* Trainer */
.trainer-card {
  background: rgba(255, 255, 255, 0.01);
  border-radius: 10px;
  padding: 18px;
}

/* Dashboard Layout */
.s-layout {
  display: flex;
  min-height: 70vh;
  flex-wrap: wrap;
}

.s-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0b1220, #0a0f16);
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.s-main {
  flex: 1;
  padding: 28px;
}

.s-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin-bottom: 18px;
}

.s-nav {
  margin-top: 18px;
}

.s-nav a {
  display: block;
  color: var(--muted);
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
}

.s-nav a.active {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: white;
}

/* Stats */
.stat-card {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 16px;
  border-radius: 10px;
}

#perfChart {
  height: 180px;
}

/* Chat Button */
.chat-btn {
  position: fixed;
  right: 24px;
  bottom: 18px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  padding: 12px 14px;
  border-radius: 36px;
  color: white;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.chat-btn img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: white;
  padding: 6px;
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 86px;
  width: 380px;
  max-width: 90vw;
  background: #1e1d1d;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(2, 6, 23, 0.6);
  overflow: hidden;
  display: none;
}

/* 🌐 Responsive Fixes */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero {
    padding: 60px 0;
  }

  .s-layout {
    flex-direction: column;
  }

  .s-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .s-main {
    padding: 20px;
  }

  .chat-panel {
    right: 10px;
    bottom: 80px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero .lead {
    font-size: 16px;
  }

  .chat-btn {
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
  }

  .chat-btn img {
    width: 38px;
    height: 38px;
  }

  .s-sidebar {
    padding: 15px;
  }

  .s-main {
    padding: 16px;
  }
}
/* Sidebar Toggle Button */
.menu-toggle {
  display: none;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

/* Mobile sidebar behavior */
@media (max-width: 992px) {
  .menu-toggle {
    display: inline-block;
  }

  .s-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100vh;
    width: 260px;
    z-index: 1500;
    transition: left 0.3s ease;
  }

  .s-sidebar.active {
    left: 0;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
  }

  /* Overlay for sidebar */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1400;
  }

  .sidebar-overlay.active {
    display: block;
  }
}
/* ============================================================
   UpSkills AI Chat v3 – Isolated, No Conflict With Existing UI
   ============================================================ */

#chat-popup {
  background: #141820 !important; 
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
  color: #e6eef8 !important;
}

#chat-popup-header {
  background: linear-gradient(90deg, var(--accent3), var(--accent1)) !important;
  color: #fff !important;
  padding: 10px 15px !important;
  font-weight: 600 !important;
}

#chat-messages {
  background: #11141a !important;
  padding: 12px !important;
  color: #e6eef8 !important;
  overflow-y: auto !important;
}

.chat-user-msg {
  margin: 6px 0;
  color: #a2d2ff !important;
}

.chat-bot-msg {
  margin: 6px 0;
  color: #ffd89e !important;
}

#chat-input {
  background: #1b1f27 !important;
  border: 1px solid #2a3140 !important;
  color: #e6eef8 !important;
  border-radius: 6px !important;
}

#chat-send {
  background: linear-gradient(90deg, var(--accent3), var(--accent1)) !important;
  border: none !important;
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
