/* ── skillwave Global Styles ─────────────────────────────────────────────── */
:root {
  /* ORANGE COLOR SCHEME */
  --primary:       #ff6b00;
  --primary-dark:  #e55a00;
  --primary-light: #ffe8cc;
  --secondary:     #1a1a2e;
  --accent:        #ffd700;
  
  /* SEMANTIC COLORS */
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --info:          #06B6D4;
  
  /* NEUTRAL PALETTE */
  --dark:          #0F172A;
  --body-bg:       #fff8f0;
  --card-bg:       #FFFFFF;
  --text:          #0F172A;
  --text-muted:    #64748B;
  --border:        #ffe8cc;
  
  /* LAYOUT */
  --sidebar-w:     256px;
  --topbar-h:      64px;
  --radius:        14px;
  --shadow:        0 2px 16px rgba(255,107,0,.07);
  --shadow-md:     0 6px 28px rgba(255,107,0,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--body-bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ── RESPONSIVE UTILITIES ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0; }
}

/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.fade-in { animation: fadeIn 0.3s ease-out; }
.slide-up { animation: slideUp 0.4s ease-out; }
.scale-in { animation: scaleIn 0.3s ease-out; }

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 500;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.brand-icon { font-size: 1.4rem; }
.brand-name { font-family: 'Poppins', sans-serif; font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--primary);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700; color: #fff; font-size: .9rem;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name  { color: #fff; font-weight: 600; font-size: .84rem; line-height: 1.2; }
.user-email { color: rgba(255,255,255,.4); font-size: .7rem; }

.sidebar-nav { flex: 1; padding: 10px 12px; }
.nav-section {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.25);
  padding: 10px 10px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,.58);
  font-size: .84rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .18s;
}
.nav-link i { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-logout { color: rgba(239,68,68,.7) !important; }
.nav-logout:hover { background: rgba(239,68,68,.1) !important; color: #ef4444 !important; }

.sidebar-wallet {
  margin: 10px 14px 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg,rgba(108,99,255,.22),rgba(108,99,255,.06));
  border: 1px solid rgba(108,99,255,.25);
  border-radius: 12px;
  flex-shrink: 0;
}
.wallet-lbl { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); }
.wallet-val { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 800; color: #FFD700; margin: 3px 0 8px; }
.btn-withdraw {
  display: block; text-align: center;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  font-size: .75rem; font-weight: 600;
  padding: 6px; border-radius: 8px;
  transition: background .18s;
}
.btn-withdraw:hover { background: rgba(255,255,255,.18); color: #fff; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 490;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-overlay.active {
  display: block;
  animation: fadeIn .2s ease-out;
}

/* ── TOPBAR ───────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 495;
}
.topbar-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--dark);
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--body-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  position: relative;
  transition: background .18s;
}
.topbar-icon:hover { background: var(--border); color: var(--text); }
.notif-dot {
  position: absolute; top: -2px; right: -2px;
  background: var(--danger); color: #fff;
  font-size: .58rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--primary);
}
.avatar-fallback {
  background: var(--primary);
  color: #fff; font-weight: 700; font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle { background: none; border: none; font-size: 1.35rem; color: var(--text); padding: 4px 8px; cursor: pointer; }

/* ── MAIN LAYOUT ─────────────────────────────────────────────────────────── */
.main-wrap { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); min-height: 100vh; }
.content-area { padding: 28px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.page-header p  { color: var(--text-muted); font-size: .875rem; }

/* ── CARDS ────────────────────────────────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card-bg); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); background: transparent; }
.card-header h5, .card-header .card-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .95rem; color: var(--dark); margin: 0; }
.card-body { padding: 20px; }

/* ── STAT CARDS ───────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 15px;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-val { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat-lbl { font-size: .76rem; color: var(--text-muted); margin-top: 3px; }

/* ── TABLE ────────────────────────────────────────────────────────────────── */
.biz-table { width: 100%; border-collapse: collapse; }
.biz-table th {
  background: var(--body-bg);
  padding: 11px 15px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.biz-table td {
  padding: 12px 15px;
  font-size: .855rem;
  border-bottom: 1px solid var(--body-bg);
  vertical-align: middle;
}
.biz-table tbody tr:hover td { background: #F8FAFF; }
.biz-table tbody tr:last-child td { border-bottom: none; }

/* ── FORMS ────────────────────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: .81rem; color: var(--text); margin-bottom: 5px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  transition: border-color .2s, box-shadow .2s;
  background: var(--card-bg);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(108,99,255,.12) !important;
  outline: none;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn { font-weight: 600; font-size: .855rem; border-radius: 10px; }
.btn-primary  { background: var(--primary) !important; border-color: var(--primary) !important; }
.btn-primary:hover { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background: var(--primary) !important; color: #fff !important; }
.btn-pill { border-radius: 50px !important; }

/* ── ALERTS ───────────────────────────────────────────────────────────────── */
.alert { border: none; border-radius: 12px; font-size: .875rem; font-weight: 500; }
.alert-success { background: #ECFDF5; color: #065F46; }
.alert-danger  { background: #FEF2F2; color: #991B1B; }
.alert-warning { background: #FFFBEB; color: #92400E; }
.alert-info    { background: #EFF6FF; color: #1E40AF; }

/* ── BADGE ────────────────────────────────────────────────────────────────── */
.badge { font-size: .7rem; font-weight: 600; padding: 4px 9px; border-radius: 50px; }

/* ── PLAN CARDS ───────────────────────────────────────────────────────────── */
.plan-card {
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  transition: all .25s;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}
.plan-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.plan-card.featured { border-color: var(--primary); background: linear-gradient(135deg, #F5F3FF, #fff); }
.plan-featured-badge {
  position: absolute; top: 16px; right: -26px;
  background: var(--primary); color: #fff;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  padding: 4px 36px; transform: rotate(45deg);
  letter-spacing: .08em;
}
.plan-price { font-family: 'Poppins', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.plan-original { font-size: .88rem; color: var(--text-muted); text-decoration: line-through; }
.plan-feature { font-size: .84rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.plan-feature::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── COURSE CARD ──────────────────────────────────────────────────────────── */
.course-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-thumb {
  height: 150px;
  background: linear-gradient(135deg, #0F172A, #1E3A5F);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-meta { display: flex; gap: 12px; font-size: .74rem; color: var(--text-muted); }
.course-meta span { display: flex; align-items: center; gap: 4px; }
.progress-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #A78BFA); border-radius: 3px; transition: width .4s; }

/* ── CHAT / TICKET ────────────────────────────────────────────────────────── */
.chat-bubble { max-width: 75%; padding: 12px 16px; border-radius: 14px; font-size: .86rem; line-height: 1.6; }
.chat-bubble.user  { background: var(--primary-light); border-radius: 14px 14px 2px 14px; align-self: flex-end; }
.chat-bubble.admin { background: #F1F5F9; border-radius: 14px 14px 14px 2px; align-self: flex-start; }
.chat-meta { font-size: .7rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }

/* ── ADMIN LAYOUT ─────────────────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: #0F172A;
  position: fixed; top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 300;
  display: flex; flex-direction: column;
  flex-shrink: 0;
}
.admin-main { margin-left: 240px; flex: 1; padding-top: 60px; }
.admin-topbar {
  position: fixed; top: 0; left: 240px; right: 0;
  height: 60px; background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 200;
}
.admin-content { padding: 24px; }

/* ── MISC ─────────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 4rem; margin-bottom: 14px; opacity: .5; }
.avatar-md { width: 46px; height: 46px; border-radius: 50%; }
.cursor-pointer { cursor: pointer; }
.text-primary { color: var(--primary) !important; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar  { transform: translateX(-100%); width: 270px; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  .topbar   { left: 0; }
  .main-wrap { margin-left: 0; }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main    { margin-left: 0; }
  .admin-topbar  { left: 0; }
  .content-area  { padding: 16px; }
  .admin-content { padding: 16px; }
}

/* ── AUTH PAGES ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #0F172A 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: #fff;
  border-radius: 22px;
  padding: 44px 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
}
.auth-logo { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.auth-logo span { color: var(--primary); }
@media (max-width: 480px) {
  .auth-card { padding: 32px 22px; }
}
