/* ═══════════════════════════════════════════════
   VSDNS — Modern Design System
   Vocational Skills Development Network
   ═══════════════════════════════════════════════ */

:root {
  --green-900: #0a2e1a;
  --green-800: #0f3d24;
  --green-700: #14532d;
  --green-600: #166534;
  --green-500: #1a7a3a;
  --green-400: #22c55e;
  --green-300: #4ade80;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --gold-500: #e8a817;
  --gold-400: #f5c842;
  --gold-100: #fef9e7;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --red-700: #b91c1c;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --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;
  --white: #ffffff;
  --black: #0a0a0a;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.04), 0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 2rem;
}
.nav-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-end {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-700);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--green-500), var(--green-400));
  border-radius: 8px;
}
.nav-toggle { display:none; background:none; border:none; font-size:1.5rem; cursor:pointer; color:var(--gray-700); }
.nav-link {
  text-decoration: none;
  color: var(--gray-600);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--green-50); color: var(--green-700); }
.nav-link.shop-link { position: relative !important; display: inline-block !important; overflow: visible !important; }
.cart-bubble {
  position: absolute !important; top: -6px !important; right: -10px !important;
  background: #48bb78 !important; color: #fff !important;
  font-size: 0.68rem !important; font-weight: 700 !important;
  min-width: 20px !important; height: 20px !important;
  border-radius: 10px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 0 6px !important; line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25) !important;
  z-index: 5 !important;
  pointer-events: none !important;
  text-decoration: none !important;
}
.nav-register {
  background: var(--green-600);
  color: #fff !important;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-left: 4px;
}
.nav-register:hover { background: var(--green-700) !important; color: #fff !important; }
.nav-logout { color: var(--red-500) !important; }
.nav-logout:hover { background: var(--red-100); }

/* ═══════════════ USER DROPDOWN (Bootstrap-powered) ═══════════════ */
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
  border: none;
  border-radius: 50px;
  background: var(--gray-50);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-800);
  transition: all 0.2s ease;
  line-height: 1;
}
.nav-user-btn:hover,
.nav-user-btn:focus,
.nav-user-btn.show { 
  background: var(--green-50); 
  box-shadow: 0 0 0 2px var(--green-100); 
}

/* Hide Bootstrap's default caret since we have our own */
.nav-user-btn.dropdown-toggle::after { display: none; }

.nav-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0;
  box-shadow: 0 2px 8px rgba(22,101,52,0.25);
}
.nav-user-name { 
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.85rem; font-weight: 600;
}

/* Boostrap dropdown overrides */
.dropdown-menu {
  animation: bsDropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--gray-200);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
@keyframes bsDropdownIn { 
  from { opacity: 0; transform: translateY(-6px) scale(0.96); } 
  to { opacity: 1; transform: translateY(0) scale(1); } 
}
.dropdown-item { transition: all 0.12s ease; }
.dropdown-item:hover { background: var(--green-50); color: var(--green-800); }
.dropdown-item:active { background: var(--green-100); color: var(--green-900); }

/* ═══════════════ FLASH ═══════════════ */
.flash-message {
  padding: 0.85rem 2rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.flash-success { background: var(--green-100); color: var(--green-800); border-bottom: 2px solid var(--green-400); }
.flash-error { background: var(--red-100); color: var(--red-700); border-bottom: 2px solid var(--red-500); }
.flash-info { background: var(--blue-100); color: #1e40af; border-bottom: 2px solid var(--blue-500); }
.flash-close { position:absolute; right:1.2rem; cursor:pointer; font-size:1.3rem; opacity:0.5; }

/* ═══════════════ MAIN ═══════════════ */
.main-content { flex:1; width:100%; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  background: linear-gradient(160deg, #0a2e1a 0%, #14532d 30%, #166534 60%, #0f3d24 100%);
  color: #fff;
  padding: 6rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}
.hero h1 span { color: var(--gold-400); }
.hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--gold-500); color: var(--gray-900); }
.btn-accent:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border: 2px solid var(--green-600); color: var(--green-600); }
.btn-outline:hover { background: var(--green-600); color: #fff; }
.btn-outline-light { background: transparent; border: 2px solid rgba(255,255,255,0.5); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-white { background: #fff; color: var(--green-700); }
.btn-white:hover { background: #f0fdf4; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-danger { background: var(--red-500); color: #fff; }
.btn-danger:hover { background: var(--red-700); }
.btn-success { background: var(--green-500); color: #fff; }
.btn-success:hover { background: var(--green-600); }
.btn-info { background: var(--blue-500); color: #fff; }
.btn-info:hover { opacity: 0.9; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; border-radius: 6px; }
.btn-lg { padding: 0.95rem 2.2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ═══════════════ SECTION ═══════════════ */
.section {
  padding: 5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green-600);
  background: var(--green-100);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}
.section-header p {
  color: var(--gray-500);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ═══════════════ SKILLS GRID ═══════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1200px) {
  .skills-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}

.skill-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}
.skill-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--gray-100);
}
.skill-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.skill-card-body h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
.skill-card-body p {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.skill-card .skill-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--green-600);
  background: var(--green-50);
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  width: fit-content;
}

/* ═══════════════ FEES ═══════════════ */
.fees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.fee-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: all var(--transition);
}
.fee-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.fee-card.featured { border: 2px solid var(--green-500); background: var(--green-50); }
.fee-card h4 { font-size: 0.85rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.fee-card .fee-amount { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.25rem; }
.fee-card .fee-label { font-size: 0.82rem; color: var(--gray-500); }

/* ═══════════════ HOW IT WORKS ═══════════════ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.step-card {
  text-align: center;
  padding: 2rem 1.25rem;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.step-card h4 { font-weight: 700; margin-bottom: 0.4rem; color: var(--gray-900); }
.step-card p { font-size: 0.9rem; color: var(--gray-500); }

/* ═══════════════ CTA BANNER ═══════════════ */
.cta-banner {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 1280px;
  margin: 0 auto 4rem;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}
.cta-banner h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.75rem; position: relative; }
.cta-banner p { opacity: 0.8; margin-bottom: 1.5rem; font-size: 1rem; position: relative; }

/* ═══════════════ CARDS ═══════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ═══════════════ STAT CARDS ═══════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green-700);
  line-height: 1.2;
}
.stat-card .stat-label { font-size: 0.82rem; color: var(--gray-500); margin-top: 0.25rem; }

/* ═══════════════ FORMS ═══════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: var(--gray-700);
}
.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  transition: all var(--transition);
  background: var(--white);
  color: var(--gray-900);
}
.form-control:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}
select.form-control { cursor:pointer; }
textarea.form-control { resize:vertical; min-height:100px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }

/* ═══════════════ TABLES ═══════════════ */
.table-container { overflow-x:auto; border-radius: var(--radius-sm); }
table { width:100%; border-collapse:collapse; font-size:0.88rem; }
table th, table td { padding:0.75rem 0.9rem; text-align:left; border-bottom:1px solid var(--gray-200); }
table th { background:var(--gray-50); font-weight:600; color:var(--gray-600); white-space:nowrap; font-size:0.8rem; text-transform:uppercase; letter-spacing:0.5px; }
table tbody tr { transition: background var(--transition); }
table tbody tr:hover { background: var(--green-50); }

/* ═══════════════ STATUS BADGES ═══════════════ */
.status {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-success, .status-passed { background:#dcfce7; color:#166534; }
.status-pending { background:#fef9c3; color:#854d0e; }
.status-failed { background:#fee2e2; color:#991b1b; }
.status-open { background:#dbeafe; color:#1e40af; }
.status-closed { background:#f3f4f6; color:#6b7280; }
.status-in_progress { background:#fef3c7; color:#92400e; }
.status-reversed { background:#fce7f3; color:#9d174d; }

/* ═══════════════ AUTH ═══════════════ */
.auth-container { max-width:460px; margin:3rem auto; }
.auth-container .card { padding:2rem; }
.auth-container h2 { text-align:center; margin-bottom:1.5rem; color:var(--gray-900); font-weight:800; }
.auth-footer { text-align:center; margin-top:1.25rem; font-size:0.9rem; color:var(--gray-500); }
.auth-footer a { color:var(--green-600); font-weight:600; }

/* ═══════════════ DASHBOARD LAYOUT ═══════════════ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: calc(100vh - 200px);
}

/* Sidebar toggle button — hidden on desktop, visible on mobile */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 1050;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(22,101,52,0.35);
  align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.sidebar-toggle:hover { transform: scale(1.05); }
.sidebar-toggle:active { transform: scale(0.95); }

/* Sidebar overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1035;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1rem 0;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.sidebar-header {
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-close {
  display: none;
  background: none; border: none;
  font-size: 1.4rem; cursor: pointer;
  color: var(--gray-400); padding: 0 4px;
  line-height: 1;
}
.sidebar-link {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: var(--green-50); color: var(--green-700); }
.sidebar-link.active {
  background: var(--green-50);
  color: var(--green-700);
  border-left-color: var(--green-500);
  font-weight: 600;
}
.dashboard-main { min-width:0; }

/* ═══════════════ SIDEBAR ACCORDION GROUPS ═══════════════ */
.sidebar-group { margin: 2px 0; }
.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-align: left;
}
.sidebar-group-toggle:hover { background: var(--green-50); color: var(--green-800); }
.sidebar-group-toggle:not(.collapsed) {
  background: var(--green-50);
  color: var(--green-700);
}
.sidebar-group-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.5;
}
.sidebar-group-toggle:not(.collapsed) .sidebar-group-chevron {
  transform: rotate(180deg);
  opacity: 0.8;
}

.sidebar-group-menu { 
  background: var(--gray-50);
  border-left: 3px solid var(--gray-200);
  margin-left: 1rem;
}
.sidebar-sublink {
  display: block;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  font-size: 0.84rem;
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-sublink:hover { background: #fff; color: var(--green-700); }
.sidebar-sublink.active {
  background: #fff;
  color: var(--green-700);
  border-left-color: var(--green-500);
  font-weight: 600;
}

.sidebar-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.5rem 1rem;
}
.sidebar-section-label {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
}
.sidebar-logout {
  color: var(--red-500) !important;
  font-weight: 600;
}
.sidebar-logout:hover {
  background: #fef2f2 !important;
  color: var(--red-700) !important;
}

/* ═══════════════ TICKET CHAT ═══════════════ */
.ticket-messages {
  max-height: 420px;
  overflow-y: auto;
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.message-bubble {
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  max-width: 80%;
  line-height: 1.5;
  font-size: 0.9rem;
}
.message-user {
  background: var(--green-600);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.message-admin {
  background: var(--white);
  border: 1px solid var(--gray-200);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.message-meta { font-size:0.75rem; opacity:0.7; margin-bottom:0.25rem; }

/* ═══════════════ EXAM ═══════════════ */
/* Full-screen exam mode */
.exam-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.exam-fullscreen .navbar,
.exam-fullscreen .sidebar,
.exam-fullscreen .footer { display: none !important; }

/* Exam top bar */
.exam-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  z-index: 10;
}
.exam-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.exam-skill-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1a202c;
}
.exam-progress-text {
  font-size: 0.8rem;
  color: #718096;
  background: #edf2f7;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* Exam timer */
.exam-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  background: #edf2f7;
  color: #2d3748;
  transition: all 0.3s;
}
.exam-timer.warning { background: #fef3c7; color: #92400e; animation: pulse-warn 1s infinite; }
.exam-timer.danger  { background: #fee2e2; color: #991b1b; animation: pulse-danger 0.5s infinite; }
@keyframes pulse-warn  { 0%,100%{opacity:1;} 50%{opacity:0.7;} }
@keyframes pulse-danger { 0%,100%{opacity:1;} 50%{opacity:0.5;} }

/* Exam body: sidebar palette + main question area */
.exam-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Question palette (left sidebar) */
.exam-palette {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.exam-palette-header {
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  border-bottom: 1px solid #edf2f7;
}
.exam-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  padding: 1rem;
}
.exam-palette-btn {
  aspect-ratio: 1;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exam-palette-btn:hover { border-color: #48bb78; background: #f0fff4; }
.exam-palette-btn.active { border-color: #48bb78; background: #48bb78; color: #fff; }
.exam-palette-btn.answered { border-color: #48bb78; background: #c6f6d5; color: #22543d; }
.exam-palette-btn.review { border-color: #f6ad55; background: #fef3c7; color: #92400e; }
.exam-palette-btn.answered.review { border-color: #48bb78; background: linear-gradient(135deg, #c6f6d5 50%, #fef3c7 50%); color: #22543d; }

.palette-legend {
  padding: 0.75rem 1rem;
  border-top: 1px solid #edf2f7;
  font-size: 0.7rem;
  color: #a0aec0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.palette-legend span { display:flex; align-items:center; gap:0.25rem; }
.palette-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.palette-dot.answered { background: #c6f6d5; border: 1.5px solid #48bb78; }
.palette-dot.review   { background: #fef3c7; border: 1.5px solid #f6ad55; }
.palette-dot.current  { background: #48bb78; }

/* Main question area */
.exam-main {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Question card */
.exam-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.exam-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.exam-q-number {
  font-weight: 700;
  font-size: 0.85rem;
  color: #48bb78;
  background: #f0fff4;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
}
.exam-q-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
}
.exam-q-badge.review { background: #fef3c7; color: #92400e; }

.exam-card-body {
  padding: 1.5rem;
  flex: 1;
}
.exam-q-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Option cards */
.exam-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.exam-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.exam-opt:hover { border-color: #a0aec0; background: #f7fafc; }
.exam-opt.selected { border-color: #48bb78; background: #f0fff4; }
.exam-opt input[type="radio"] { display: none; }
.exam-opt-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #edf2f7;
  color: #4a5568;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.exam-opt.selected .exam-opt-letter { background: #48bb78; color: #fff; }
.exam-opt-text {
  flex: 1;
  font-size: 0.95rem;
  color: #2d3748;
  line-height: 1.5;
  padding-top: 0.25rem;
}

/* Exam nav footer */
.exam-nav {
  padding: 1rem 1.5rem;
  border-top: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.exam-nav-buttons {
  display: flex;
  gap: 0.5rem;
}
.exam-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.exam-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.exam-btn-prev { background: #edf2f7; color: #4a5568; }
.exam-btn-prev:hover:not(:disabled) { background: #e2e8f0; }
.exam-btn-next { background: #48bb78; color: #fff; }
.exam-btn-next:hover:not(:disabled) { background: #38a169; }
.exam-btn-review { background: #fef3c7; color: #92400e; }
.exam-btn-review:hover:not(:disabled) { background: #fde68a; }
.exam-btn-submit { background: #e53e3e; color: #fff; }
.exam-btn-submit:hover:not(:disabled) { background: #c53030; }
.exam-btn-clear { background: transparent; color: #a0aec0; border: 1px solid #e2e8f0; }
.exam-btn-clear:hover { color: #e53e3e; border-color: #e53e3e; }

/* Submit confirmation modal */
.exam-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.exam-modal {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.exam-modal h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.exam-modal p { color: #718096; font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.25rem; }
.exam-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.exam-summary-item {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}
.exam-summary-item.answered { background: #f0fff4; color: #22543d; }
.exam-summary-item.unanswered { background: #fff5f5; color: #991b1b; }
.exam-summary-item.review { background: #fef3c7; color: #92400e; }
.exam-summary-item.total { background: #edf2f7; color: #4a5568; }
.exam-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Exam results */
.exam-result {
  text-align: center;
  padding: 2rem;
}
.exam-result-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.exam-result-score {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.exam-result.passed .exam-result-score { color: #38a169; }
.exam-result.failed .exam-result-score { color: #e53e3e; }

/* Mobile responsive */
@media (max-width: 768px) {
  .exam-body { flex-direction: column; }
  .exam-palette {
    width: 100%; min-width: 100%; max-height: 140px;
    border-right: none; border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
  }
  .exam-palette-grid { grid-template-columns: repeat(10, 1fr); gap: 0.35rem; padding: 0.6rem; }
  .exam-palette-btn { font-size: 0.7rem; border-radius: 6px; }
  .palette-legend { display: none; }
  .exam-main { padding: 0.75rem; }
  .exam-card-body { padding: 1rem; }
  .exam-q-text { font-size: 1rem; }
  .exam-nav { padding: 0.75rem 1rem; }
  .exam-topbar { padding: 0.5rem 0.75rem; }
  .exam-skill-name { font-size: 0.85rem; }
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
  padding: 3rem 1.5rem 0;
}
.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
}
.footer-section h4 { color:#fff; margin-bottom:0.85rem; font-size:0.95rem; font-weight:700; }
.footer-section p, .footer-section a { font-size:0.88rem; margin-bottom:0.35rem; }
.footer-section a { display:block; color:rgba(255,255,255,0.6); text-decoration:none; transition:color var(--transition); }
.footer-section a:hover { color:var(--green-400); }
.footer-bottom {
  text-align: center;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
  .nav-toggle { display:block; }
  .nav-links {
    display:none;
    flex-direction:column;
    position:absolute;
    top:64px;
    left:0; right:0;
    background:var(--white);
    padding:1rem;
    border-bottom:1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active { display:flex; }
  .nav-toggle-check:checked ~ .nav-links { display: flex !important; }
  .form-row { grid-template-columns:1fr; }
  .dashboard-layout { grid-template-columns:1fr; }
  
  /* Off-canvas sidebar on mobile */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1040;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-top: 1rem;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-close { display: block; }
  .footer-content { grid-template-columns:1fr; text-align:center; }
  .hero { padding:4rem 1.25rem 3rem; }
  .hero h1 { font-size:1.7rem; }
  .section { padding:3rem 1rem; }
  .skills-grid { grid-template-columns:1fr; }
  .fees-grid { grid-template-columns:1fr; }
  .hero-stats { gap:1.5rem; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction:column; gap:1rem; }
  .hero-buttons { flex-direction:column; align-items:center; }
}

/* ═══════════════ RESPONSIVE: TABLES ═══════════════ */
@media (max-width: 768px) {
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-container table { min-width: 600px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .steps-grid { grid-template-columns: 1fr !important; }
  .fees-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════ RESPONSIVE: SHOP ═══════════════ */
@media (max-width: 768px) {
  /* Single product page: stack image + details */
  .shop-product-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  /* Shop grid: 2 columns */
  .shop-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Cart & checkout: full width */
  .shop-cart-layout, .shop-checkout-layout {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ═══════════════ RESPONSIVE: NAVIGATION ═══════════════ */
@media (max-width: 768px) {
  .nav-container { padding: 0 0.75rem; }
  .nav-brand { font-size: 1rem; }
  .nav-user-btn { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
  .nav-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
  
  /* Mobile nav dropdown: show cart bubble inline */
  .nav-links .shop-link .cart-bubble {
    position: static !important;
    display: inline-flex !important;
    margin-left: 0.4rem;
    vertical-align: middle;
  }
}

/* ═══════════════ RESPONSIVE: DASHBOARD ═══════════════ */
@media (max-width: 768px) {
  .dashboard-main { padding: 1rem; }
  .card-header { font-size: 0.9rem; padding: 0.75rem 1rem; }
  .card { padding: 1rem; }
  .form-row { grid-template-columns: 1fr !important; }
  .certificate { padding: 1rem; }
  .cert-inner { padding: 1.5rem 1rem; }
  .cert-title { font-size: 1.3rem; }
  .cert-recipient { font-size: 2rem; }
  .cert-skill { font-size: 1.2rem; }
  .cert-footer { flex-direction: column; gap: 1rem; text-align: center !important; }
  .cert-footer-item { text-align: center !important; }
}

/* ═══════════════ RESPONSIVE: FOOTER ═══════════════ */
@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .footer { padding: 2rem 1rem 0; }
}

/* ═══════════════ RESPONSIVE: HERO ═══════════════ */
@media (max-width: 768px) {
  .hero { padding: 3rem 1rem 2rem; text-align: center; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.85rem; }
  .hero-badge { font-size: 0.7rem; }
  .hero-stats { justify-content: center; gap: 1rem; }
  .hero-stat-value { font-size: 1.3rem; }
  .hero-stat-label { font-size: 0.7rem; }
  .section { padding: 2rem 0.75rem; }
  .section-header h2 { font-size: 1.3rem; }
}
