/* ==========================================================================
   site-template.css — the website's design system, ported from the HTML
   template in "html template/my-html-template" (LearnHub style).

   Part 1 sets the palette. Every colour, radius and font below comes from a
   CSS variable, so Super Admin → Theme can recolour the whole site (public
   pages, sign-in pages and the portals) by overriding these few variables.

   Part 2 is the template's own components (header, hero, cards, footer,
   auth, portal shell). Part 3 maps the classes the application already uses
   (.pb-*, .c-card, .auth-*, .btn-*, tables) onto the same look, so every
   page follows the template without its markup being rewritten.
   ========================================================================== */

/* ========================= 1. Palette ========================= */
:root {
  --primary: #5b2bd0;
  --primary-dark: #3b1a96;
  --accent: #f5a623;
  --dark: #120b3a;
  --text: #1c1b33;
  --muted: #6b6a80;
  --bg: #ffffff;
  --soft: #f6f5fb;
  --border: #e8e6f1;
  --radius: 10px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-heading: var(--font);
  --shadow: 0 6px 24px rgba(30, 20, 80, .08);

  /* The application's older variables now follow the template. */
  --ke-green: var(--primary);
  --ke-green-dark: var(--primary-dark);
  --ke-red: #c0392b;
  --ke-red-dark: #96281b;
  --ke-black: var(--dark);
  --ke-ink: var(--text);
  --ke-muted: var(--muted);
  --ke-line: var(--border);
  --ke-paper: var(--soft);
  --site-gold: var(--accent);
  --pb-accent: var(--primary);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}
body.public-page, body.account-shell { background: var(--soft); }
h1, h2, h3, h4, h5, .font-serif-heading { font-family: var(--font-heading); letter-spacing: -.02em; }
.tpl img { max-width: 100%; }
.container { width: min(1200px, 100% - 2 * clamp(16px, 4vw, 32px)); margin-inline: auto; }

/* ========================= 2. Template components ========================= */

/* ---- Buttons ---- */
.btn, .btn-primary, .btn-secondary, .btn-danger, .auth-btn-primary, .auth-btn-secondary,
.btn-green, .btn-enroll, .btn-view-more, .srms-btn-green, .srms-btn-blue, .srms-btn-red, .srms-btn-orange {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 14px; line-height: 1.2;
  border: 1.5px solid transparent; cursor: pointer; transition: .2s; font-family: inherit; text-decoration: none;
  text-transform: none; letter-spacing: 0;
}
.btn-primary, .auth-btn-primary, .btn-green, .btn-enroll, .srms-btn-green { background: var(--primary); color: #fff; }
.btn-primary:hover, .auth-btn-primary:hover, .btn-green:hover, .btn-enroll:hover, .srms-btn-green:hover { background: var(--primary-dark); color: #fff; }
.btn-outline, .btn-secondary, .auth-btn-secondary, .btn-view-more { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover, .btn-secondary:hover, .auth-btn-secondary:hover, .btn-view-more:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--soft); }
.btn-danger, .srms-btn-red { background: var(--ke-red); color: #fff; }
.btn-danger:hover, .srms-btn-red:hover { background: var(--ke-red-dark); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: #fff; color: var(--primary-dark); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn:hover, .btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(91, 43, 208, .22); }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; }
.link-more { color: var(--primary); font-weight: 600; font-size: 13px; }

/* ---- Contact strip ---- */
.topbar { background: var(--dark); color: #d9d5f2; font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0; }
.topbar a, .topbar-center { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar .social { display: inline-flex; gap: 10px; }
.topbar-cta { background: var(--accent); color:var(--accent-ink,#1f1300); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 8px 16px; }

/* ---- Header ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 300; transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(20, 10, 60, .1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand span.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 21px; font-weight: 800; color: var(--dark); letter-spacing: -.02em; }
.brand small { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: 14px; padding: 8px 0; border-bottom: 2px solid transparent; color: inherit; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); border-color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: grid; place-items: center; color: var(--text); width: 36px; height: 36px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--soft); color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--text); }

/* ---- "Who is signing in?" dropdown ---- */
.pick { position: relative; }
.pick > summary { list-style: none; cursor: pointer; }
.pick > summary::-webkit-details-marker { display: none; }
.pick-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 400; width: 310px; max-height: 76vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px rgba(20, 10, 60, .18); padding: 8px;
  animation: pickIn .16s ease both;
}
@keyframes pickIn { from { opacity: 0; transform: translateY(-6px); } }
.pick-menu h4 { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 10px 12px 4px; margin: 0; }
.pick-item { display: flex; gap: 11px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; }
.pick-item:hover { background: var(--soft); }
.pick-item .ico { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--soft); color: var(--primary); display: grid; place-items: center; }
.pick-item:hover .ico { background: var(--primary); color: #fff; }
.pick-item b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.pick-item small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.pick-sep { height: 1px; background: var(--border); margin: 6px 10px; border: 0; }
@media (max-width: 560px) { .pick-menu { position: fixed; left: 10px; right: 10px; top: auto; width: auto; } }

/* ---- Page hero (inner pages) ---- */
.page-hero { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: clamp(40px, 8vw, 64px) 0; text-align: center; }
.page-hero h1 { font-size: clamp(28px, 6vw, 40px); }
.page-hero p { opacity: .85; }

/* ---- Footer ---- */
.site-footer { background: var(--dark); color: #c9c5e3; padding-top: 48px; font-size: 13.5px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 2fr 1.3fr; gap: 40px; align-items: start; }
.footer-grid.no-news { grid-template-columns: 1.3fr 2.4fr; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.site-footer h4 { color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 9px 0; line-height: 1.45; }
.footer-about .brand { margin-bottom: 14px; }
.footer-about .brand strong { color: #fff; font-size: 20px; }
.footer-about .brand-logo { background: rgba(255, 255, 255, .14); }
.footer-about p { margin: 0 0 16px; line-height: 1.7; max-width: 32ch; }
.social { display: flex; gap: 16px; }
.social a { color: #b9b4dd; display: grid; place-items: center; }
.social a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 9px; align-items: flex-start; }
.footer-contact svg { flex: none; margin-top: 2px; color: var(--accent); }
.footer-news p { margin: 0 0 14px; line-height: 1.6; }
.inline-form { display: flex; max-width: 320px; }
.inline-form input { flex: 1; min-width: 0; padding: 12px 14px; border: 0; border-radius: 6px 0 0 6px; font: inherit; font-size: 13.5px; }
.inline-form input:focus { outline: 2px solid var(--primary); }
.inline-form button {
  border: 0; border-radius: 0 6px 6px 0; background: var(--primary); color: #fff;
  padding: 0 20px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.inline-form button:hover { background: var(--primary-dark); }
.footer-note { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 20px 0; margin-top: 32px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12.5px;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---- Auth: split screen ---- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 78vh; }
.auth-art { background: linear-gradient(140deg, var(--dark), var(--primary)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .07); right: -120px; bottom: -120px; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; max-width: 420px; margin: 0 0 12px; }
.auth-art p { opacity: .85; max-width: 420px; margin: 0; line-height: 1.7; }
.auth-art ul { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.auth-art li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.auth-art li svg { flex: none; margin-top: 3px; color: var(--accent); }
.auth-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-form-wrap { display: grid; place-items: center; padding: 48px 24px; background: #fff; }
.auth-form { width: min(420px, 100%); display: grid; gap: 15px; }
.auth-form h1 { font-size: 28px; margin: 0; }
.auth-form > p.lede { color: var(--muted); margin: -8px 0 0; }
.auth-form label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.auth-form input, .auth-form select, .auth-form textarea { padding: 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; width: 100%; background: #fff; color: var(--text); }
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pw { position: relative; }
.pw input { padding-right: 62px; }
.pw button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--primary); font-weight: 600; font-size: 12px; cursor: pointer; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.row-between a { color: var(--primary); font-weight: 600; }
.check { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; }
.check input { width: auto; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin: 0; }
.auth-switch a { color: var(--primary); font-weight: 600; }
.auth-other { border-top: 1px solid var(--border); padding-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-other a { color: var(--primary); font-weight: 600; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { padding: 28px 22px; }
  .auth-art ul, .auth-art p { display: none; }
  .auth-form-wrap { padding: 30px 18px; }
}

/* ---- Portal shell ---- */
body.portal { background: var(--soft); }
.portal-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100dvh; }
.p-sidebar { background: var(--dark); color: #c9c5e3; height: 100dvh; position: sticky; top: 0; padding: 20px 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.p-sidebar .brand strong { color: #fff; font-size: 17px; }
.p-sidebar .brand small { color: #a59ed0; }
.p-role { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #8d85c2; padding: 0 10px; font-weight: 800; }
.p-nav { display: flex; flex-direction: column; gap: 2px; }
.p-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: inherit; text-decoration: none; transition: .2s; }
.p-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(3px); }
.p-nav a.active { background: var(--primary); color: #fff; }
.p-nav svg { flex: none; width: 18px; height: 18px; }
.p-logout { margin-top: auto; font-size: 13px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; color: #ffb4b4; text-decoration: none; }
.p-logout:hover { background: rgba(255, 90, 90, .14); color: #fff; }
.portal-main { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.p-topbar { display: flex; align-items: center; gap: 14px; background: #fff; padding: 12px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.p-title { font-size: 15px; font-weight: 800; }
.p-search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px; background: var(--soft); border: 0; border-radius: 8px; padding: 9px 12px; color: var(--muted); font: inherit; cursor: pointer; text-align: left; }
.p-search .ss-kbd { margin-left: auto; font-size: 10px; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; background: #fff; }
.p-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.p-bell { position: relative; color: var(--muted); display: grid; place-items: center; }
.p-bell:hover { color: var(--primary); }
.p-bell .dot { position: absolute; top: -4px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--ke-red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.p-user { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.p-user::-webkit-details-marker { display: none; }
.p-user b { display: block; font-size: 13px; line-height: 1.2; }
.p-user small { color: var(--muted); font-size: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; object-fit: cover; flex: none; }
.p-toggle { display: none; background: none; border: 0; cursor: pointer; }
.portal-content { padding: 24px; flex: 1; min-width: 0; }
.p-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.p-head h1 { font-size: 23px; margin: 0; }
.p-head p { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.p-stat, .p-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.p-stat { display: flex; gap: 14px; align-items: center; transition: .25s; }
.p-stat:hover { transform: translateY(-4px); }
.p-stat .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.p-stat b { display: block; font-size: 22px; line-height: 1.2; }
.p-stat small { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--primary); }
.pill-paid, .pill-active, .pill-published, .pill-approved { background: #e3f7ec; color: #1a8a4a; }
.pill-pending, .pill-draft { background: #fff3dc; color: #b87400; }
.pill-refunded, .pill-suspended, .pill-rejected { background: #fde6e6; color: #c0392b; }
.progress { height: 8px; background: var(--soft); border-radius: 8px; overflow: hidden; min-width: 90px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 8px; }

/* Phone tab bar inside the portal */
.p-tabbar { display: none; }

@media (max-width: 1024px) { .p-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .portal-shell { grid-template-columns: 1fr; }
  .p-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(272px, 82vw); z-index: 500; height: 100dvh; transform: translateX(-100%); transition: transform .3s; }
  .portal-shell.menu-open .p-sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 5, 40, .5); }
  .p-toggle { display: grid; place-items: center; width: 42px; height: 42px; }
  .p-topbar { padding: 10px 14px; gap: 10px; }
  .p-search { flex: 0 0 auto; width: 42px; justify-content: center; }
  .p-search span, .p-search .ss-kbd { display: none; }
  .p-user .who { display: none; }
  .portal-content { padding: 16px 14px 86px; }
  .p-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; background: #fff;
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .p-tabbar a, .p-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px;
    font-size: 10px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none;
  }
  .p-tabbar .is-active { color: var(--primary); }
}
@media (max-width: 560px) { .p-stats { grid-template-columns: 1fr 1fr; gap: 12px; } .p-head h1 { font-size: 20px; } }

/* ========================= 3. The application's own classes ========================= */

/* ---- Page-builder sections ---- */
.pb { font-family: var(--font); color: var(--text); }
.pb-title, .pbx-title { font-family: var(--font-heading); letter-spacing: -.025em; }
.pb-label, .pbx-label { color: var(--primary); }
.pbx-label { color: var(--accent); }
.pb-bg-light { background: var(--soft); }
.pb-bg-mint { background: radial-gradient(1200px 400px at 80% -10%, color-mix(in srgb, var(--primary) 10%, #fff) 0%, #fff 60%); }
.pb-bg-green { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); }
.pb-bg-dark { background: var(--dark); }
.pb .pb-btn { border-radius: 8px; font-weight: 600; min-height: 44px; }
.pb .pb-btn-main { background: var(--primary); color: #fff; }
.pb .pb-btn-main:hover { background: var(--primary-dark); }
.pb .pb-dark .pb-btn-main, .pb .pb-cta .pb-btn-main { background: #fff; color: var(--primary-dark); }
.pb-card, .pb-person, .pb-faq-item, .pb-role, .pbx-icon-card, .pbx-pic-card, .pb-signup, .pb-contact-form {
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff;
}
.pb-card:hover, .pbx-icon-card:hover, .pbx-pic-card:hover { transform: translateY(-4px); }
.pb-card-icon, .pbx-icon-card .pbx-icon { background: var(--soft); color: var(--primary); }
.pb-stat { background: var(--soft); }
.pb-stat strong { color: var(--primary); }
.pb-dark .pb-stat { background: rgba(255, 255, 255, .1); }
.pb-quote { border-left-color: var(--primary); }
.pb-divider { color: var(--border); }

/* Course cards on the page-builder pages */
.pb-course { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: .25s; background: #fff; }
.pb-course:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(30, 20, 80, .14); }
.pb-course-cover { transition: transform .5s; }
.pb-course:hover .pb-course-cover { transform: scale(1.07); }
.pb-course-cat { color: var(--primary); font-weight: 700; }
.pb-course-new { background: var(--primary); color: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 4px; }
.pb-course-foot span:first-child { color: var(--accent); font-weight: 800; }
.pb-course-body { gap: 6px; padding: 13px 14px 14px; }
.pb-course-title { font-size: .95em; font-weight: 700; line-height: 1.35; }
.pb-course-org { display: flex; align-items: center; gap: 7px; font-size: .78em; color: var(--muted); }
.pb-course-av {
  flex: none; width: 21px; height: 21px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: .72em; font-weight: 700;
}
.pb-course-fallback { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

/* Course catalog cards (/courses) */
.c-card { border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow) !important; overflow: hidden; transition: .25s; }
.c-card:hover { transform: translateY(-4px); }
.c-card-img img { transition: transform .5s; }
.c-card:hover .c-card-img img { transform: scale(1.07); }
.c-card-cat { color: var(--primary) !important; font-weight: 700; }
.c-card-price { color: var(--accent) !important; }
.c-card-badge { background: var(--primary) !important; color: #fff !important; }
.c-card-badge.paid { background: var(--accent) !important; color:var(--accent-ink,#1f1300) !important; }
.courses-container { background: transparent; }

/* ---- The centred auth card (forgot password, verify, locked …) ---- */
.auth-shell { min-height: 60vh; padding: 48px 16px; }
.auth-card { border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 34px 30px; max-width: 27rem; }
.auth-head h1 { font-size: 26px; font-family: var(--font-heading); }
.auth-head p, .auth-fine-print { color: var(--muted); }
.auth-head p a, .auth-link-row a { color: var(--primary); font-weight: 600; }
.auth-field label { font-weight: 600; font-size: 13px; color: var(--text); }
.auth-field input, .auth-field select { border: 1px solid var(--border); border-radius: 8px; padding: 12px; font: inherit; }
.auth-field input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.auth-mark { background: var(--soft); border-color: var(--border); }
.auth-mark svg { color: var(--primary); }
.auth-btn-primary { background: var(--primary); width: 100%; }
.auth-btn-primary:hover { background: var(--primary-dark); }

/* ---- Flash messages ---- */
.flash-success { background: #e3f7ec; color: #1a8a4a; border: 1px solid #b7e1c7; border-radius: 10px; padding: 11px 15px; font-weight: 600; }
.flash-error { background: #fde6e6; color: #c0392b; border: 1px solid #f5c6c6; border-radius: 10px; padding: 11px 15px; font-weight: 600; }

/* ---- Tables and cards used across the portals ---- */
.srms-card, .excel-sheet { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.excel-table, .srms-table, .admin-data-table { font-size: 13px; }
.excel-table th, .srms-table th, .admin-data-table th {
  text-align: left; color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; padding: 10px 10px; border-bottom: 1px solid var(--border); background: var(--soft);
}
.excel-table td, .srms-table td, .admin-data-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); }
.excel-table tr:hover td, .admin-data-table tr:hover td { background: var(--soft); }
.srms-stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.srms-stat-icon { background: var(--soft); color: var(--primary); }

/* ---- Scroll niceties shared by the public pages ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: .6s; }
.reveal.in { opacity: 1; transform: none; }
.no-effects .reveal { opacity: 1; transform: none; }
#to-top {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px);
  pointer-events: none; transition: .3s; z-index: 900;
}
#to-top.show { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; }
  .main-nav {
    display: block; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: 0 14px 24px rgba(20, 10, 60, .1);
    padding: 6px max(16px, 4vw) 12px; max-height: 0; overflow: hidden; visibility: hidden; opacity: 0;
    transition: max-height .35s ease, opacity .25s, visibility .25s; z-index: 310;
  }
  .main-nav.open { max-height: 80vh; opacity: 1; visibility: visible; overflow-y: auto; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li a { display: flex; padding: 13px 4px; border-bottom: 1px solid var(--border); }
  .main-nav li:last-child a { border-bottom: 0; }
  .topbar-right { display: none; }
  .topbar-inner { justify-content: center; }
  /* Nothing left to show once the links are hidden: drop the empty strip. */
  .topbar.no-contact { display: none; }
  .header-actions .hide-sm { display: none; }
}
@media (max-width: 1024px) {
  .footer-grid, .footer-grid.no-news { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-cols { grid-column: 1 / -1; order: 3; }
  .topbar-center { display: none; }
}
@media (max-width: 640px) {
  .footer-grid, .footer-grid.no-news { grid-template-columns: 1fr; gap: 28px; }
  .footer-cols { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 20px; }
  .footer-about p { max-width: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* ========================= 4. The template's motion ========================= */

/* ---- Loading screen: blurred orbs behind the word, letters rippling ---- */
#page-loader {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4);
  transition: opacity .8s ease, filter .8s ease, visibility .8s;
}
#page-loader.done { opacity: 0; filter: blur(18px); visibility: hidden; }
#page-loader .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: orbFloat 7s ease-in-out infinite alternate; }
#page-loader .o1 { width: 46vmax; height: 46vmax; background: var(--primary); left: -12vmax; top: -14vmax; }
#page-loader .o2 { width: 38vmax; height: 38vmax; background: var(--accent); right: -10vmax; bottom: -12vmax; animation-delay: -2s; opacity: .4; }
#page-loader .o3 { width: 26vmax; height: 26vmax; background: var(--primary-dark); left: 38%; top: 55%; animation-delay: -4s; opacity: .3; }
@keyframes orbFloat { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); } }
.loader-text {
  position: relative; font-family: var(--font-heading); font-size: clamp(30px, 8vw, 64px);
  font-weight: 800; letter-spacing: -.02em; white-space: pre; color: var(--dark);
}
.loader-text .l { display: inline-block; animation: blurWave 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * 110ms); }
.loader-text .dots { display: inline-block; width: 1.7em; text-align: left; color: var(--primary); animation: blurWave 2.2s ease-in-out infinite; animation-delay: .9s; }
@keyframes blurWave {
  0%, 100% { filter: blur(0); opacity: 1; transform: translateY(0); }
  50% { filter: blur(9px); opacity: .2; transform: translateY(-4px); }
}

/* ---- Page transitions ---- */
body.fx-on { animation: pageIn .6s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.page-leave { opacity: 0; transform: translateY(-8px); transition: .28s ease; }

/* ---- Scroll progress ---- */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); z-index: 9000; }

/* ---- Reveal, with a stagger set per item ---- */
.reveal { transition-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  #page-loader { display: none; }
  body.fx-on { animation: none; }
  .loader-text .l, .loader-text .dots, #page-loader .orb { animation: none; }
}
