/* HyperTech LMS clone: shared styles for every page in /lms (shell + reusable components) */

:root {
  --green: #22c55e;
  --green-d: #16a34a;
  --mint: #f0fdf4;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --side: #0d1321;
  --side-2: #151c2e;
  --side-text: #a3acbf;
  --white: #fff;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --side-w: 256px;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* page CSS often sets display on panels; keep the hidden attribute authoritative */
[hidden] { display: none !important; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }
ion-icon { display: block; flex-shrink: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--mint);
  color: var(--ink);
  font-size: 15px;
  overflow-x: clip;
}

/* ---------- sidebar ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  background: var(--side);
  color: var(--side-text);
  z-index: 20;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.33, .85, .56, 1.02);
}

.sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .35); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 6px 18px -6px var(--green);
}

.brand strong { display: block; color: var(--white); font-size: 15px; }

.brand small { font-family: var(--mono); font-size: 10.5px; color: var(--side-text); }

.side-scroll { flex: 1; overflow-y: auto; padding: 8px 10px 16px; scrollbar-width: thin; scrollbar-color: #2a3346 transparent; }

.side-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #5c667a;
  padding: 18px 14px 8px;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500;
  transition: background .2s, color .2s, transform .2s;
}

.side-link ion-icon { font-size: 18px; }

.side-link:hover { background: var(--side-2); color: var(--white); transform: translateX(3px); }

.side-link.active {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 8px 20px -8px var(--green);
}

.badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.badge.amber { background: var(--amber); }

.gopro {
  margin: 16px 4px 4px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(150deg, #4c1d95, #6d28d9 60%, #7c3aed);
  color: #ddd6fe;
  font-size: 12.5px;
}

.gopro strong { display: flex; align-items: center; gap: 6px; color: var(--white); font-size: 14px; }

.gopro p { margin: 4px 0 10px; }

.gopro li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-top: 6px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--ink);
  transition: transform .2s;
}

.gopro li:hover { transform: translateX(3px); }

.gopro li span { display: flex; align-items: center; gap: 6px; }

.gopro li:nth-child(1) { background: var(--white); }
.gopro li:nth-child(2) { background: #86efac; }
.gopro li:nth-child(3) { background: #fbcfe8; }
.gopro li:nth-child(4) { background: #fcd34d; }

.signout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  transition: color .2s;
}

.signout:hover { color: var(--red); }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .5);
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  z-index: 15;
}

.scrim.show { opacity: 1; visibility: visible; }

/* ---------- top bar ---------- */

.main { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.menu-btn { font-size: 24px; }

.topbar h2 { font-size: 15.5px; font-weight: 600; }

.topbar h2 [data-name], .hero h1 [data-name] { color: var(--green); }

.user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  border-radius: 10px;
}

.user small { color: var(--muted); font-size: 12px; }

.content { display: grid; gap: 22px; padding: 18px; max-width: 1280px; margin-inline: auto; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 26px 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .06) 0 120px, transparent 121px),
    radial-gradient(circle at 70% 120%, rgba(255, 255, 255, .05) 0 110px, transparent 111px),
    linear-gradient(135deg, #0b3d2a, #0f5a3b 55%, #0d6b45);
  color: #bbf7d0;
  overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(6, 78, 59, .6);
  animation: rise .7s cubic-bezier(.33, .85, .56, 1.02);
}

.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hero > *:not(canvas) { position: relative; }

.portal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  border-radius: 99px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.portal-pill i {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: ping 1.6s ease-out infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); }
  100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}

.hero h1 { margin: 14px 0 4px; color: var(--white); font-size: clamp(24px, 4vw, 34px); font-weight: 800; line-height: 1.15; }

.hero-date { font-size: 13.5px; }

.hero-side { display: flex; gap: 14px; align-items: flex-start; }

.clock {
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  border-radius: 14px;
  text-align: right;
}

.clock b { font-family: var(--mono); color: var(--white); font-size: clamp(24px, 3.4vw, 30px); letter-spacing: 1px; }

.clock b small { font-size: 12px; margin-left: 4px; }

.clock span { display: block; font-size: 11px; opacity: .7; }

.hero-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  font-weight: 800;
  font-size: 20px;
  border-radius: 14px;
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob { 50% { transform: translateY(-6px); } }

.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-stats li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  border-radius: 99px;
  line-height: 1.1;
  font-size: 11.5px;
  transition: transform .25s, background .25s;
}

.hero-stats li:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .12); }

.hero-stats b { display: block; color: var(--white); font-size: 17px; }

.hero-stats .ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  font-size: 15px;
}

/* ---------- banner slider ---------- */

.banner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  width: 100%;            /* without it, min-height + aspect-ratio widens the banner past the screen */
  aspect-ratio: 4 / 1;
  min-height: 140px;
}

.banner-track { display: flex; height: 100%; transition: transform .8s cubic-bezier(.33, .85, .56, 1.02); }

.banner-slide { position: relative; flex: 0 0 100%; height: 100%; }

.banner-slide img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.banner-slide figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 24px 14px;
  background: linear-gradient(to top, rgba(15, 10, 40, .8), transparent);
  color: var(--white);
  font-weight: 700;
  font-size: 17px;
}

.banner-dots { position: absolute; right: 18px; bottom: 16px; display: flex; gap: 6px; }

.banner-dots button { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .5); transition: .3s; }

.banner-dots button.on { width: 22px; background: var(--white); }

/* ---------- stat cards ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.stat {
  position: relative;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  animation: rise .6s backwards cubic-bezier(.33, .85, .56, 1.02);
  animation-delay: calc(var(--i) * 70ms);
}

.stat::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--c);
  opacity: .1;
  filter: blur(6px);
  transition: transform .4s;
}

.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.stat:hover::after { transform: scale(1.5); }

.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 14%, white);
  color: var(--c);
  font-size: 19px;
  margin-bottom: 18px;
}

.stat b { display: block; font-size: 28px; line-height: 1; margin-bottom: 6px; }

.stat span { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }

@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* ---------- quick actions ---------- */

.quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick > span { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px; margin-right: 6px; }

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-weight: 500;
  font-size: 14px;
  transition: .25s;
}

.chip:hover { border-color: var(--green); color: var(--green-d); transform: translateY(-2px); }

.chip.primary { background: var(--green); border-color: var(--green); color: var(--white); box-shadow: 0 8px 18px -8px var(--green); }

/* ---------- pro cards ---------- */

.pro-grid { display: grid; gap: 14px; }

.pro {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 20px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, .8);
  background: var(--bg);
  background-size: 200% 200%;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  animation: shift 10s ease infinite;
}

@keyframes shift { 50% { background-position: 100% 100%; } }

.pro::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .14), transparent);
  transform: skewX(-20deg);
  transition: left .7s;
}

.pro:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .45); }

.pro:hover::before { left: 130%; }

.pro-tag { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }

.pro h3 { margin: 12px 0 18px; color: var(--white); font-size: 17px; line-height: 1.3; }

.pro-price { margin-top: auto; color: var(--white); font-size: 26px; font-weight: 800; }

.pro-price small { font-size: 13px; font-weight: 500; opacity: .8; }

.pro .sub {
  align-self: flex-start;
  margin-top: 10px;
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--btn);
  color: var(--white);
  font-weight: 600;
  font-size: 13.5px;
  transition: transform .25s;
}

.pro .sub:hover { transform: scale(1.06); }

.pro.labs { --bg: linear-gradient(135deg, #3b1d8f, #5b21b6, #2e1065); --btn: linear-gradient(90deg, #f97316, #ec4899); }
.pro.jobs { --bg: linear-gradient(135deg, #0f766e, #065f46, #134e4a); --btn: #059669; }
.pro.talk { --bg: linear-gradient(135deg, #9d174d, #831843, #6b1036); --btn: #e11d48; }
.pro.refer { --bg: linear-gradient(135deg, #9a3412, #7c2d12, #5b2a12); --btn: #f97316; }

/* ---------- panels ---------- */

.two-col { display: grid; gap: 22px; }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.panel-head .ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 14%, white);
  color: var(--c);
}

.view-all {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, white);
  background: color-mix(in srgb, var(--c) 8%, white);
  color: var(--c);
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  transition: .25s;
}

.view-all:hover { background: var(--c); color: var(--white); }

.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 56px 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.empty ion-icon { font-size: 38px; color: #cbd5e1; animation: bob 3.5s ease-in-out infinite; }

.job {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}

.job:last-child { border-bottom: 0; }

.job:hover { background: #f8fafc; }

.job-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff7ed;
  color: #f59e0b;
  font-size: 18px;
}

.job p { min-width: 0; }

.job strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.job small { color: var(--muted); }

.job-side { margin-left: auto; display: grid; justify-items: end; gap: 6px; flex-shrink: 0; }

.type { padding: 2px 8px; border-radius: 6px; background: #dcfce7; color: var(--green-d); font-size: 11.5px; font-weight: 600; }

.apply {
  padding: 5px 14px;
  border-radius: 99px;
  background: var(--green);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  transition: .25s;
}

.apply:hover { background: var(--green-d); transform: scale(1.06); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  border-radius: 99px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: .3s;
  z-index: 30;
}

.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .pro-grid { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 24px; }
}

@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .scrim, .menu-btn { display: none; }
  .main { margin-left: var(--side-w); }
  .hero { grid-template-columns: 1fr auto; padding: 32px 34px; }
  .hero-stats { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: repeat(6, 1fr); }
  .pro-grid { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; align-items: start; }
  .content { padding: 28px 34px; }
}

/* ---------- shared page bits ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }

.page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; }

.page-head h1 ion-icon { color: var(--green); }

.page-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s, background .2s, box-shadow .2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-green { background: var(--green); color: var(--white); box-shadow: 0 8px 18px -8px var(--green); }

.btn-green:hover { background: var(--green-d); }

.btn-outline { border: 1px solid var(--line); background: var(--white); color: var(--ink); }

.btn-outline:hover { border-color: var(--green); color: var(--green-d); }

.btn-red { background: var(--red); color: var(--white); }

.pill-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }

.pill-tag.ok { background: #dcfce7; color: var(--green-d); }

.pill-tag.warn { background: #fef3c7; color: #b45309; }

.pill-tag.bad { background: #fee2e2; color: #b91c1c; }

.pill-tag.info { background: #e0f2fe; color: #0369a1; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .3s, box-shadow .3s;
}

.card:hover { box-shadow: var(--shadow); }

.field-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }

.input {
  width: 100%;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }

.input.invalid { border-color: var(--red); }

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }

.table th { text-align: left; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }

.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }

.table tr:hover td { background: #f8fafc; }

.reveal { animation: rise .6s backwards cubic-bezier(.33, .85, .56, 1.02); animation-delay: calc(var(--i, 0) * 60ms); }

/* new-lesson notification (top right) */

.notify {
  position: fixed;
  top: 76px;
  right: 18px;
  display: flex;
  gap: 12px;
  width: min(330px, calc(100% - 36px));
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid #ddd6fe;
  border-left: 4px solid #7c3aed;
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(76, 29, 149, .45);
  z-index: 25;
  animation: notifyIn .6s cubic-bezier(.68, -.55, .265, 1.55);
}

.notify.hide { animation: notifyOut .4s forwards; }

@keyframes notifyIn { from { opacity: 0; transform: translateX(40px); } }

@keyframes notifyOut { to { opacity: 0; transform: translateX(40px); } }

.notify-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #ede9fe; color: #7c3aed; flex-shrink: 0; }

.notify strong { display: block; font-size: 14px; }

.notify p { color: var(--muted); font-size: 13px; }

.notify small { color: #94a3b8; font-size: 11px; }

.notify-close { position: absolute; top: 8px; right: 10px; color: #94a3b8; }
