:root {
  --navy-950: #061A40;
  --navy-900: #071F4A;
  --navy-800: #092B63;
  --orange-600: #FF6B00;
  --orange-500: #FF7A00;
  --orange-400: #FF8A00;
  --blue-600: #2563EB;
  --purple-600: #7C3AED;
  --cyan-500: #06B6D4;
  --bg: #F7F9FC;
  --bg-soft: #F4F6FA;
  --sidebar-w: 280px;
  --shadow-soft: 0 8px 24px rgba(6, 26, 64, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans Thai", "Manrope", sans-serif;
  background: var(--bg);
  color: #0f172a;
}

h1, h2, h3, h4, .font-display {
  font-family: "Manrope", "IBM Plex Sans Thai", sans-serif;
}

.sidebar {
  width: var(--sidebar-w);
  background-color: var(--navy-950);
  background-image:
    radial-gradient(circle at 85% 8%, rgba(255,107,0,0.28), transparent 34%),
    radial-gradient(circle at 10% 90%, rgba(37,99,235,0.22), transparent 40%),
    linear-gradient(180deg, rgba(4, 20, 51, 0.55) 0%, rgba(6, 26, 64, 0.72) 100%),
    url("../images/sidebar-bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 20, 51, 0.12) 0%,
    rgba(6, 26, 64, 0.28) 50%,
    rgba(4, 16, 40, 0.55) 100%
  );
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(4, 16, 40, 0.55));
  pointer-events: none;
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.9rem 0.9rem;
}

.sidebar-brand {
  padding: 0 0.35rem 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sidebar-brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.sidebar-brand__name {
  color: #fff;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sidebar-brand__tag {
  color: rgba(255, 178, 102, 0.95);
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.55rem 0.15rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}

.sidebar-section { margin-bottom: 1.1rem; }

.sidebar-section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255,255,255,0.45);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.45rem;
  margin-bottom: 0.45rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem 0.55rem;
  border-radius: 14px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.nav-item .nav-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.nav-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
  transition: inherit;
}

.nav-ico svg,
.nav-ico i {
  width: 17px !important;
  height: 17px !important;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-item:hover .nav-ico {
  background: rgba(255,107,0,0.18);
  border-color: rgba(255,107,0,0.25);
  color: #ffb266;
}

.nav-item.active {
  background: linear-gradient(105deg, rgba(255,107,0,0.95), rgba(255,138,0,0.92));
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.28);
  border-color: rgba(255,255,255,0.08);
}

.nav-item.active .nav-ico {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.cat-ico {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  color: #ffb266;
  flex-shrink: 0;
}

.cat-ico svg,
.cat-ico i {
  width: 14px !important;
  height: 14px !important;
}

.cat-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateX(2px);
}

.cat-item:hover .cat-ico {
  background: rgba(255,107,0,0.2);
  border-color: rgba(255,107,0,0.28);
}

.sidebar-footer {
  position: relative;
  z-index: 2;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: block;
  border-radius: 16px;
  padding: 0.85rem;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(255,107,0,0.16), rgba(255,255,255,0.05) 55%),
    rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.sidebar-user:hover {
  border-color: rgba(255,107,0,0.35);
  transform: translateY(-1px);
}

.sidebar-user__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.sidebar-user__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-600), var(--orange-400));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(255,107,0,0.3);
}

.sidebar-user__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user__name {
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #ffb266;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.sidebar-user__chevron {
  color: rgba(255,255,255,0.45);
  display: grid;
  place-items: center;
}

.sidebar-user__chevron svg {
  width: 16px !important;
  height: 16px !important;
}

.sidebar-user__progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  margin-bottom: 0.35rem;
}

.sidebar-user__progress-top span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-user__progress-top strong {
  color: #fff;
  font-weight: 800;
}

.btn-primary {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255,107,0,0.28);
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(255,107,0,0.35); color: #fff; }

.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  text-decoration: none;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.hero-banner {
  background:
    radial-gradient(circle at 85% 40%, rgba(255,107,0,0.45), transparent 28%),
    linear-gradient(120deg, var(--navy-950), var(--navy-800) 60%, #0b3a7a);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  min-height: 320px;
}

.hero-banner::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,122,0,0.55), transparent 65%);
}

/* Home hero image banner */
.home-hero-banner__viewport {
  position: relative;
}

.home-hero-banner__slide {
  display: none;
}

.home-hero-banner__slide.is-active {
  display: block;
  animation: heroFade .45s ease;
}

@keyframes heroFade {
  from { opacity: .35; }
  to { opacity: 1; }
}

.home-hero-banner__frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(6, 26, 64, 0.16);
  background: #F7F9FC;
}

.home-hero-banner__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1560 / 369;
  max-height: 369px;
  object-fit: cover;
  object-position: center;
}

.home-hero-banner__hotspot {
  position: absolute;
  bottom: 10%;
  height: 12%;
  border-radius: 999px;
  z-index: 2;
}

.home-hero-banner__hotspot--primary {
  left: 3.5%;
  width: 18%;
}

.home-hero-banner__hotspot--secondary {
  left: 23%;
  width: 16%;
}

.home-hero-banner__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--navy-900);
  box-shadow: 0 8px 20px rgba(6, 26, 64, 0.15);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.home-hero-banner__nav--prev { left: 12px; }
.home-hero-banner__nav--next { right: 12px; }

.home-hero-banner__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.home-hero-banner__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  padding: 0;
}

.home-hero-banner__dot.is-active {
  width: 22px;
  background: var(--orange-600);
}

.home-hero-banner__actions {
  display: none;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .home-hero-banner__hotspot { display: none; }
  .home-hero-banner__actions { display: flex; }
  .home-hero-banner__img {
    aspect-ratio: 1560 / 369;
    max-height: none;
    min-height: 140px;
  }
  .home-hero-banner__nav { width: 36px; height: 36px; }
}

/* Category icon slide — one row, orange / white / blue */
.category-slide {
  position: relative;
}

.category-slide__track {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.15rem 0.1rem 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-slide__track::-webkit-scrollbar {
  display: none;
}

.category-slide__item {
  flex: 0 0 clamp(108px, 12.5vw, 128px);
  scroll-snap-align: start;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 14px;
  padding: 0.7rem 0.55rem 0.65rem;
  box-shadow: 0 6px 16px rgba(6, 26, 64, 0.045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.category-slide__item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 0, 0.35);
  box-shadow: 0 10px 20px rgba(6, 26, 64, 0.08);
}

.category-slide__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.5rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.category-slide__icon svg,
.category-slide__icon i {
  width: 18px !important;
  height: 18px !important;
}

.category-slide__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
  min-height: 2.2em;
  margin-bottom: 0.15rem;
}

.category-slide__count {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.category-slide__nav {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: #fff;
  color: var(--navy-900);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(6, 26, 64, 0.06);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.category-slide__nav:hover {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  border-color: transparent;
  color: #fff;
}

@media (max-width: 640px) {
  .category-slide__item {
    flex: 0 0 100px;
    min-width: 100px;
  }
}

/* ===== Courses catalog page ===== */
.courses-hero {
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,107,0,0.45), transparent 28%),
    radial-gradient(circle at 10% 80%, rgba(37,99,235,0.35), transparent 30%),
    linear-gradient(120deg, #061A40, #0a2f6b 70%);
  box-shadow: 0 16px 36px rgba(6, 26, 64, 0.16);
}

.courses-hero__inner {
  padding: 1.5rem 1.5rem 1.35rem;
}

@media (min-width: 768px) {
  .courses-hero__inner { padding: 1.75rem 2rem; }
}

.courses-hero__stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.courses-hero__stat {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 130px;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.courses-hero__search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.courses-hero__search-icon {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
}

.courses-hero__search-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  min-width: 0;
  color: var(--navy-900);
}

.courses-icon-chip {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.category-chip-slide {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.category-chip-slide::-webkit-scrollbar { display: none; }

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem 0.45rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(37,99,235,0.1);
  color: var(--navy-900);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(6,26,64,0.04);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.category-chip:hover {
  border-color: rgba(255,107,0,0.35);
  transform: translateY(-1px);
}

.category-chip.is-active {
  border-color: transparent;
  background: linear-gradient(90deg, rgba(255,107,0,0.12), rgba(37,99,235,0.1));
  box-shadow: 0 8px 18px rgba(255,107,0,0.12);
}

.category-chip__icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.category-chip__count {
  font-size: 0.72rem;
  color: #64748b;
  background: #F4F6FA;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.courses-filter__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}

/* Top horizontal filter bar */
.courses-filter-bar {
  padding: 1rem 1.15rem 1.15rem;
}

.courses-filter-bar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eef2f7;
}

.courses-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #e8eef7;
  background: #F7F9FC;
  color: var(--navy-900);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.courses-filter-bar__body.is-collapsed {
  display: none;
}

.courses-filter-bar__row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.85fr 0.85fr 1.15fr;
  gap: 0.85rem;
  align-items: end;
}

.courses-filter-bar__row--levels {
  margin-top: 0.9rem;
  grid-template-columns: 1fr auto;
  align-items: end;
}

.courses-filter-field {
  min-width: 0;
}

.courses-filter-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 0.85rem;
  background: #fff;
  min-height: 46px;
}

.courses-filter-search:focus-within {
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.courses-filter-price {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.courses-filter-price .input {
  min-width: 0;
}

.courses-level-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.courses-level {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e8eef7;
  background: #F7F9FC;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}

.courses-level.is-active,
.courses-level:has(input:checked) {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.35);
  color: var(--orange-600);
}

.courses-filter-actions {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 0.1rem;
}

@media (max-width: 1100px) {
  .courses-filter-bar__row {
    grid-template-columns: 1fr 1fr;
  }
  .courses-filter-field--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .courses-filter-bar__row,
  .courses-filter-bar__row--levels {
    grid-template-columns: 1fr;
  }
  .courses-filter-actions {
    justify-content: stretch;
  }
  .courses-filter-actions .btn-primary {
    width: 100%;
  }
}

.courses-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.courses-view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: #F4F6FA;
}

.courses-view-toggle__btn {
  width: 36px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #64748b;
  text-decoration: none;
}

.courses-view-toggle__btn.is-active {
  background: #fff;
  color: var(--orange-600);
  box-shadow: 0 4px 10px rgba(6,26,64,0.08);
}

.courses-list-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.courses-list-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,107,0,0.25);
  box-shadow: 0 14px 28px rgba(6,26,64,0.08);
}

.courses-list-card__media {
  position: relative;
  width: 180px;
  min-height: 118px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f7;
  flex-shrink: 0;
}

.courses-list-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.courses-list-card__media .badge-pill {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
}

.courses-list-card__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.65rem;
  min-width: 120px;
}

.courses-list-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--orange-600);
}

.courses-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #F7F9FC;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

@media (max-width: 900px) {
  .courses-list-card {
    flex-direction: column;
  }
  .courses-list-card__media {
    width: 100%;
    height: 180px;
  }
  .courses-list-card__price {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

/* Social login */
.auth-social {
  margin-bottom: 1.25rem;
}

.auth-social__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-social__divider::before,
.auth-social__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8eef7;
}

.auth-social__buttons {
  display: grid;
  gap: 0.65rem;
}

.auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid #e5eaf2;
  transition: transform .15s ease, box-shadow .15s ease;
}

.auth-social__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(6,26,64,0.08);
}

.auth-social__btn--google {
  background: #fff;
  color: #1f2937;
}

.auth-social__btn--line {
  background: #06C755;
  border-color: #06C755;
  color: #fff;
}

.auth-social__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.auth-social__hint {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

.auth-social__hint code {
  background: #F4F6FA;
  padding: 0.05rem 0.35rem;
  border-radius: 6px;
  color: #64748b;
}

/* Profile page */
.profile-hero {
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,107,0,0.42), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(37,99,235,0.3), transparent 32%),
    linear-gradient(120deg, #061A40, #0a2f6b 70%);
  box-shadow: 0 16px 36px rgba(6, 26, 64, 0.16);
}

.profile-hero__inner {
  padding: 1.5rem 1.5rem;
}

@media (min-width: 768px) {
  .profile-hero__inner { padding: 1.75rem 2rem; }
}

.profile-hero__avatar {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  border: 3px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.profile-hero__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: var(--shadow-soft);
}

.profile-stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-stat-card__value {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--navy-900);
  line-height: 1;
}

.profile-stat-card__label {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.3rem;
}

.profile-form {
  padding: 1.25rem 1.35rem 1.4rem;
}

.profile-form__head {
  margin-bottom: 1.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #eef2f7;
}

.profile-avatar-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: #F7F9FC;
  border: 1px dashed rgba(37,99,235,0.18);
  margin-bottom: 1.15rem;
}

.profile-avatar-upload__preview {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--navy-900);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-upload__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5eaf2;
  color: var(--navy-900);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-field {
  margin-bottom: 1rem;
}

.profile-field__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}

.profile-readonly {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 0.85rem;
  background: #F8FAFC;
  min-height: 46px;
}

.profile-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #e5eaf2;
  background: #fff;
  color: #64748b;
  font-weight: 700;
  text-decoration: none;
}

.profile-quick-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 600;
  background: #F7F9FC;
  border: 1px solid transparent;
  transition: all .15s ease;
}

.profile-quick-link:hover {
  border-color: rgba(255,107,0,0.25);
  background: rgba(255,107,0,0.06);
  color: var(--navy-900);
}

.profile-quick-link__count {
  margin-left: auto;
  font-size: 0.72rem;
  background: #fff;
  color: #64748b;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.profile-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(244,63,94,0.25);
  background: rgba(244,63,94,0.08);
  color: #e11d48;
  font-weight: 700;
  cursor: pointer;
}

.profile-logout-btn:hover {
  background: rgba(244,63,94,0.14);
}

.float-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  color: #fff;
  animation: floaty 4s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  box-shadow: 0 6px 14px rgba(255,107,0,0.22);
}

.badge-pill--soft {
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

/* Home section heads + recommended */
.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.home-section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.home-section-head__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  color: #3b68b7;
  letter-spacing: -0.02em;
}

.home-section-head__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.home-section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,107,0,0.22);
  background: rgba(255,107,0,0.06);
  transition: background .15s ease, transform .15s ease;
}

.home-section-head__link:hover {
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
  transform: translateX(2px);
}

.home-recommended {
  position: relative;
}

.rec-featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 40px rgba(6, 26, 64, 0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.rec-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(6, 26, 64, 0.12);
}

.rec-featured__media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #0b1f45;
}

.rec-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}

.rec-featured:hover .rec-featured__media img {
  transform: scale(1.04);
}

.rec-featured__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,20,51,0.05), rgba(4,20,51,0.12) 70%, rgba(4,20,51,0.2)),
    radial-gradient(circle at 20% 20%, rgba(255,107,0,0.18), transparent 40%);
  pointer-events: none;
}

.rec-featured__media-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  z-index: 1;
}

.rec-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.6rem 1.7rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.08), transparent 40%),
    linear-gradient(180deg, #fff, #f8fafc);
}

.rec-featured__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(6, 26, 64, 0.06);
  color: var(--navy-800);
  font-size: 0.72rem;
  font-weight: 800;
}

.rec-featured__title {
  margin: 0 0 0.55rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.25;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.rec-featured__desc {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rec-featured__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.rec-featured__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e8eef7;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.rec-featured__meta em {
  font-style: normal;
  color: #94a3b8;
  font-weight: 600;
}

.rec-featured__meta svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--orange-600);
}

.rec-featured__instructor {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(6, 26, 64, 0.04);
  border: 1px solid rgba(6, 26, 64, 0.06);
}

.rec-featured__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--orange-600), var(--orange-400));
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.rec-featured__instructor-label {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.rec-featured__instructor-name {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--navy-900);
}

.rec-featured__cat {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}

.rec-featured__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.rec-featured__price {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--orange-600);
  line-height: 1;
}

.rec-featured__price small {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.rec-featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 10px 22px rgba(255,107,0,0.28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.rec-featured:hover .rec-featured__cta {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255,107,0,0.36);
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.course-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 24px rgba(6, 26, 64, 0.05);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(6, 26, 64, 0.1);
  border-color: rgba(255,107,0,0.18);
}

.course-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.course-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1f45;
}

.course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}

.course-card:hover .course-card__media img {
  transform: scale(1.06);
}

.course-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,20,51,0.05) 40%, rgba(4,20,51,0.45) 100%);
  pointer-events: none;
}

.course-card__badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  z-index: 1;
}

.course-card__play {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.95);
  color: var(--orange-600);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1;
}

.course-card__play svg {
  width: 16px !important;
  height: 16px !important;
  margin-left: 1px;
}

.course-card:hover .course-card__play {
  opacity: 1;
  transform: translateY(0);
}

.course-card__body {
  padding: 0.8rem 0.9rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.course-card__cat,
.course-card__instructor {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.course-card__cat svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--navy-800);
  flex-shrink: 0;
}

.course-card__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--orange-600), var(--orange-400));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255,107,0,0.25);
}

.course-card__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card__avatar > span {
  line-height: 1;
}

.course-card__cat > span,
.course-card__instructor > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-card__title {
  margin: 0 0 0.3rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--navy-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.45rem;
  margin-bottom: 0.55rem;
}

.course-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.84rem;
}

.course-card__rating svg {
  width: 15px !important;
  height: 15px !important;
  color: #FBBF24;
  fill: #FBBF24;
}

.course-card__rating strong {
  color: var(--navy-900);
  font-weight: 800;
}

.course-card__rating span {
  color: #94a3b8;
  font-size: 0.75rem;
}

.course-card__price {
  text-align: right;
}

.course-card__price small {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  text-decoration: line-through;
  margin-bottom: 0.1rem;
}

.course-card__price strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--orange-600);
}

.course-card__price strong.is-free {
  color: #059669;
}

.course-card__foot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid #eef2f7;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
}

.course-card__foot span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.course-card__foot svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--orange-600);
}

.course-card__foot .ml-auto { margin-left: auto; }
.course-card__foot .ml-auto svg { color: #94a3b8; }

@media (max-width: 1279px) {
  .rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .rec-featured { grid-template-columns: 1fr; }
  .rec-featured__media { min-height: 220px; aspect-ratio: 16 / 9; }
  .rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  /* Home: swipeable course rail */
  .rec-grid {
    display: flex;
    grid-template-columns: none;
    gap: 0.85rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    margin-inline: -1rem;
    padding: 0.15rem 1rem 0.65rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rec-grid::-webkit-scrollbar { display: none; }
  .rec-grid > .course-card {
    flex: 0 0 min(78vw, 290px);
    max-width: min(78vw, 290px);
    scroll-snap-align: start;
  }

  .course-card {
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(6, 26, 64, 0.07);
  }
  .course-card:hover { transform: none; }
  .course-card__media { aspect-ratio: 16 / 10; }
  .course-card__play {
    opacity: 1;
    transform: none;
    width: 34px;
    height: 34px;
  }
  .course-card__body { padding: 0.85rem 0.9rem 0.95rem; gap: 0.35rem; }
  .course-card__title {
    font-size: 0.98rem;
    line-height: 1.35;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .course-card__cat,
  .course-card__instructor { font-size: 0.75rem; }
  .course-card__avatar { width: 20px; height: 20px; font-size: 0.62rem; }
  .course-card__price strong { font-size: 1.02rem; }
  .course-card__rating { font-size: 0.78rem; }
  .course-card__foot {
    font-size: 0.72rem;
    gap: 0.55rem;
    flex-wrap: wrap;
  }
  .course-card__badges { top: 0.55rem; left: 0.55rem; right: 0.55rem; }
  .home-section-head { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
  .rec-featured__cat { display: none; }
  .rec-featured__body { padding: 1.2rem; }
}

.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-500), var(--purple-600));
  border-radius: 999px;
}

.progress-bar.light { background: #e5e7eb; }

.search-box {
  background: #eef2f7;
  border-radius: 999px;
  border: 1px solid transparent;
}
.search-box:focus-within {
  border-color: rgba(37,99,235,0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.topnav {
  background: #fff;
  border-bottom: 1px solid #eef2f7;
  box-shadow: 0 6px 18px rgba(6, 26, 64, 0.04);
}

.topnav__inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 64px;
  padding: 0.55rem 1rem;
}

@media (min-width: 640px) {
  .topnav__inner { padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
  .topnav__inner { padding-inline: 2rem; }
}

.topnav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  text-decoration: none;
  color: var(--navy-900);
  flex: 1;
}

.topnav__brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}

.topnav__brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
}

.topnav__brand-logo + .topnav__brand-mark { display: none; }

.topnav__brand-name {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  flex-shrink: 0;
}

.topnav__user {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  padding-left: 0.15rem;
}

.topnav__user-name {
  display: none;
  max-width: 120px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav__login-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(255, 107, 0, 0.28);
}

.topnav__login-btn { display: none; }

.topbar-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e8eef7;
  color: var(--navy-800);
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-icon .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--orange-600);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

/* Mobile header: compact + no overflow */
@media (max-width: 767px) {
  .topnav__inner {
    min-height: 58px;
    padding: 0.45rem 0.75rem;
    gap: 0.4rem;
  }
  .topnav__search { display: none; }
  .topnav__desk-only { display: none !important; }
  .topnav__login-btn { display: none !important; }
  .topnav__login-icon { display: grid; }
  .topnav__brand-name { max-width: 42vw; }
  .topbar-icon,
  .topnav__login-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .topnav-user__avatar {
    width: 34px;
    height: 34px;
  }
}

@media (min-width: 768px) {
  .topnav__brand { display: none; }
  .topnav__search { display: block; }
  .topnav__search-btn { display: none !important; }
  .topnav__desk-only { display: grid; }
  .topnav__login-icon { display: none !important; }
  .topnav__login-btn { display: inline-flex; }
  .topnav__user-name { display: inline; }
}

@media (min-width: 1024px) {
  .topnav__menu { display: none !important; }
}

.topnav-user__avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
}

.topnav-user__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.topnav-user__avatar > span {
  position: relative;
  z-index: 0;
  line-height: 1;
}

.skeleton {
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 12px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.table-modern {
  width: 100%;
  border-collapse: collapse;
}
.table-modern th, .table-modern td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  font-size: 0.92rem;
}
.table-modern th { color: #64748b; font-weight: 600; background: #fafbfd; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  background: #fff;
  outline: none;
  font: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tab {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.tab.active {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
}

.mobile-drawer { transform: translateX(-105%); transition: transform .25s ease; }
.mobile-drawer.open { transform: translateX(0); }

@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }
  .desktop-sidebar { display: none !important; }
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--orange-600), var(--orange-400));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  box-shadow: 0 8px 18px rgba(255,107,0,0.35);
  flex-shrink: 0;
}

/* ===== Course Detail ===== */
.course-detail-hero {
  background:
    radial-gradient(circle at 88% 35%, rgba(255,107,0,0.55), transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(37,99,235,0.35), transparent 35%),
    linear-gradient(115deg, #041433 0%, #061A40 45%, #0a2f6b 100%);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  min-height: 260px;
  box-shadow: 0 16px 40px rgba(6, 26, 64, 0.18);
}

.course-detail-hero__grid {
  display: grid;
  gap: 1.1rem;
  padding: 1.15rem 1.15rem 1.25rem;
  align-items: center;
}

.course-detail-hero__media {
  position: relative;
  z-index: 1;
}

.course-detail-hero__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

@media (min-width: 768px) {
  .course-detail-hero__grid {
    grid-template-columns: 1.35fr 0.65fr;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
  }
  .course-detail-hero__media {
    order: 2;
  }
  .course-detail-hero__copy {
    order: 1;
  }
}

.course-detail-hero::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -60px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,122,0,0.5), transparent 68%);
  pointer-events: none;
}

.course-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.course-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.course-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.course-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.92);
  font-size: 0.78rem;
  font-weight: 600;
}

.course-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.course-interest-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  border: 1.5px solid var(--orange-500);
  color: var(--orange-400);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}

.course-interest-btn:hover {
  background: rgba(255,107,0,0.15);
  color: #ffb266;
}

.course-interest-btn.is-active {
  background: rgba(255,107,0,0.18);
  color: #fff;
  border-color: var(--orange-400);
}

.course-share__buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.course-share__iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}

.course-share__iconbtn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  color: #fff;
}

.course-share__btn--facebook { background: #1877F2; }
.course-share__btn--linkedin { background: #0A66C2; }
.course-share__btn--x { background: #111827; }
.course-share__btn--line { background: #06C755; }

.course-hero-media--compact {
  height: 180px;
}

.course-hero-media {
  position: relative;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
}

@media (max-width: 767px) {
  .course-hero-media,
  .course-hero-media--compact {
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
  }
}

.course-hero-media-glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,0.55), transparent 70%);
  pointer-events: none;
}

.course-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #e8eef7;
  padding-bottom: 0.15rem;
}

.course-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: #64748b;
  cursor: pointer;
  position: relative;
  border-radius: 10px 10px 0 0;
}

.course-tab:hover { color: var(--navy-800); }

.course-tab.active {
  color: var(--orange-600);
}

.course-tab.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: -0.2rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
}

.course-highlight {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-900);
}

.course-highlight-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,107,0,0.15), rgba(124,58,237,0.12));
  color: var(--orange-600);
}

.course-module {
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.course-module > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
  user-select: none;
}

.course-module > summary::-webkit-details-marker { display: none; }

.course-module[open] {
  background: #fafbfd;
  border-color: #e5ebf5;
}

.course-module[open] .course-module-chevron {
  transform: rotate(180deg);
}

.course-module-chevron {
  transition: transform .2s ease;
  flex-shrink: 0;
}

.course-module-num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.course-module-lessons {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0.85rem;
}

.course-module-lessons li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #475569;
}

.course-module-lessons li:hover {
  background: rgba(255,107,0,0.05);
}

.course-price-card {
  background:
    radial-gradient(circle at 90% 10%, rgba(255,107,0,0.4), transparent 35%),
    linear-gradient(160deg, #061A40, #0a2a5c 70%, #0b3470);
  border-radius: 22px;
  padding: 1.35rem 1.35rem 1.1rem;
  color: #fff;
  box-shadow: 0 18px 40px rgba(6, 26, 64, 0.22);
}

.course-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  background: #fff;
  color: var(--navy-900);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease;
}

.course-btn-secondary:hover {
  transform: translateY(-1px);
  color: var(--navy-900);
}

@media (max-width: 767px) {
  .course-detail-hero {
    min-height: auto;
    border-radius: 18px;
    margin-bottom: 0.85rem;
  }
  .course-detail-hero__grid {
    padding: 0.85rem 0.85rem 1.05rem;
    gap: 0.9rem;
  }
  .course-detail-hero .font-display {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
  }
  .course-hero-chips {
    gap: 0.4rem;
  }
  .course-hero-chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
  }
  .course-hero-actions {
    flex-wrap: wrap;
    gap: 0.55rem;
  }
  .course-interest-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .course-share__buttons {
    width: 100%;
    justify-content: flex-start;
  }
  .course-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.15rem;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
    scrollbar-width: none;
  }
  .course-tabs::-webkit-scrollbar { display: none; }
  .course-tab {
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 0.65rem 0.85rem;
  }
  .home-hero-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
  .home-hero-banner__actions .btn-primary,
  .home-hero-banner__actions .btn-ghost {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.88rem;
    padding-inline: 0.7rem;
  }
  .app-main {
    padding-top: 0.85rem;
  }
}

/* ===== Payment page ===== */
.pay-page { max-width: 1080px; }

.pay-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.16), transparent 42%),
    linear-gradient(135deg, #fff 0%, #f3f7fc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.pay-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.pay-hero__eyebrow svg {
  width: 14px !important;
  height: 14px !important;
}

.pay-hero__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--navy-900);
}

.pay-hero__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.pay-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.pay-hero__order {
  display: grid;
  gap: 0.1rem;
  text-align: right;
}

.pay-hero__order span {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}

.pay-hero__order strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.pay-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pay-status.is-pending { background: #ffedd5; color: #c2410c; }
.pay-status.is-review { background: #e0e7ff; color: #3730a3; }
.pay-status.is-paid { background: #d1fae5; color: #047857; }
.pay-status.is-failed { background: #ffe4e6; color: #be123c; }

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.pay-panel {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
}

.pay-panel--qr { padding-bottom: 1rem; }

.pay-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #eef2f7;
}

.pay-amount span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}

.pay-amount strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange-600);
  line-height: 1;
}

.pay-panel__head {
  margin-bottom: 1rem;
}

.pay-panel__head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy-900);
}

.pay-panel__head h2 svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--orange-600);
}

.pay-panel__head p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.pay-slip-form {
  display: grid;
  gap: 0.9rem;
}

.pay-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}

.pay-file {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1.5px dashed rgba(255,107,0,0.45);
  background: rgba(255,107,0,0.05);
  color: var(--orange-600);
  font-weight: 750;
  font-size: 0.88rem;
  cursor: pointer;
}

.pay-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pay-file svg {
  width: 16px !important;
  height: 16px !important;
}

.pay-file-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.pay-success,
.pay-wait,
.pay-empty {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.pay-success {
  background: #ecfdf5;
  color: #065f46;
}

.pay-wait {
  background: #eef2ff;
  color: #3730a3;
}

.pay-empty {
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.pay-success svg,
.pay-wait svg,
.pay-empty svg {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0;
}

.pay-success strong,
.pay-wait strong,
.pay-empty strong {
  display: block;
  margin-bottom: 0.15rem;
}

.pay-success p,
.pay-wait p,
.pay-empty p {
  margin: 0;
  font-size: 0.86rem;
  opacity: 0.9;
}

.pay-order-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #eef2f7;
  color: #64748b;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.pay-order-link:hover { color: var(--orange-600); }

.pay-order-link svg {
  width: 15px !important;
  height: 15px !important;
}

.pay-demo { margin-top: 0.85rem; }

.pay-demo__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.pay-demo__btn svg {
  width: 15px !important;
  height: 15px !important;
  color: var(--orange-600);
}

/* ===== PromptPay QR ===== */
.promptpay-box {
  border-radius: 18px;
  padding: 1.15rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,107,0,0.35), transparent 34%),
    linear-gradient(160deg, #061A40, #0a2a5c 70%, #0b3470);
  color: #fff;
  box-shadow: 0 16px 34px rgba(6, 26, 64, 0.18);
}

.promptpay-box__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1rem;
}

.promptpay-box__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
}

.promptpay-box__badge svg {
  width: 13px !important;
  height: 13px !important;
}

.promptpay-box__qrwrap {
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  background: #fff;
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 0.7rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.promptpay-box__qr {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.promptpay-box__meta {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.promptpay-box__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
}

.promptpay-box__row span { color: rgba(255,255,255,0.65); }
.promptpay-box__row strong { color: #fff; font-weight: 700; text-align: right; }
.promptpay-box__row .is-amount { color: #ffb266 !important; }

.promptpay-box__steps {
  margin: 0;
  padding: 0.75rem 0.75rem 0.75rem 1.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  font-size: 0.78rem;
  line-height: 1.55;
}

.promptpay-box__steps li + li { margin-top: 0.2rem; }

@media (max-width: 1023px) {
  .pay-grid { grid-template-columns: 1fr; }
  .pay-hero__order { text-align: left; }
}

/* ===== Checkout ===== */
.checkout-page { max-width: 1120px; }

.checkout-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
  padding: 1.35rem 1.4rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255,107,0,0.45), transparent 32%),
    radial-gradient(circle at 12% 85%, rgba(37,99,235,0.28), transparent 36%),
    linear-gradient(115deg, #041433 0%, #061A40 48%, #0a2f6b 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgba(6, 26, 64, 0.16);
}

.checkout-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffb266;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.checkout-hero__title {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  margin: 0;
}

.checkout-hero__sub {
  margin: 0.35rem 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
}

.checkout-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.checkout-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  font-weight: 700;
}

.checkout-step__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  font-size: 0.7rem;
  font-weight: 800;
}

.checkout-step__dot svg {
  width: 12px !important;
  height: 12px !important;
}

.checkout-step.is-done {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(16, 185, 129, 0.14);
}

.checkout-step.is-done .checkout-step__dot {
  background: #10b981;
  color: #fff;
}

.checkout-step.is-active {
  color: #fff;
  border-color: rgba(255,107,0,0.45);
  background: rgba(255,107,0,0.22);
}

.checkout-step.is-active .checkout-step__dot {
  background: linear-gradient(135deg, var(--orange-600), var(--orange-400));
  color: #fff;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.35rem;
  align-items: start;
}

.checkout-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.25rem;
}

.checkout-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checkout-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255,107,0,0.14), rgba(6,26,64,0.06));
  color: var(--orange-600);
  border: 1px solid rgba(255,107,0,0.16);
  flex-shrink: 0;
}

.checkout-card__icon svg {
  width: 18px !important;
  height: 18px !important;
}

.checkout-card__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.checkout-card__hint {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.checkout-card__link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange-600);
  text-decoration: none;
  white-space: nowrap;
}

.checkout-card__link:hover { color: var(--orange-500); }

.checkout-buyer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.checkout-buyer__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid #eef2f7;
}

.checkout-buyer__ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--navy-800);
  border: 1px solid #e8eef7;
  flex-shrink: 0;
}

.checkout-buyer__ico svg {
  width: 16px !important;
  height: 16px !important;
}

.checkout-buyer__label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.checkout-buyer__value {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.92rem;
  word-break: break-word;
}

.checkout-pay-grid {
  display: grid;
  gap: 0.65rem;
}

.checkout-pay { cursor: pointer; display: block; }
.checkout-pay input { position: absolute; opacity: 0; pointer-events: none; }

.checkout-pay__body {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1.5px solid #e8eef7;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.checkout-pay__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(6, 26, 64, 0.06);
  color: var(--navy-800);
  flex-shrink: 0;
}

.checkout-pay__ico svg {
  width: 20px !important;
  height: 20px !important;
}

.checkout-pay__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.checkout-pay__text strong {
  color: var(--navy-900);
  font-size: 0.95rem;
}

.checkout-pay__text small {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.checkout-pay__check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
}

.checkout-pay__check svg {
  width: 13px !important;
  height: 13px !important;
}

.checkout-pay:hover .checkout-pay__body {
  border-color: rgba(255,107,0,0.35);
}

.checkout-pay:has(input:checked) .checkout-pay__body {
  border-color: var(--orange-500);
  background: linear-gradient(120deg, rgba(255,107,0,0.08), rgba(255,255,255,0.9));
  box-shadow: 0 8px 18px rgba(255,107,0,0.1);
}

.checkout-pay:has(input:checked) .checkout-pay__ico {
  background: linear-gradient(145deg, var(--orange-600), var(--orange-400));
  color: #fff;
}

.checkout-pay:has(input:checked) .checkout-pay__check {
  background: var(--orange-600);
  border-color: var(--orange-600);
  color: #fff;
}

.checkout-note { margin-top: 1rem; }

.checkout-note__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.45rem;
}

.checkout-summary {
  position: sticky;
  top: 5.5rem;
  border-radius: 20px;
  padding: 1.25rem;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 8%, rgba(255,107,0,0.42), transparent 34%),
    linear-gradient(160deg, #061A40, #0a2a5c 72%, #0b3470);
  box-shadow: 0 18px 36px rgba(6, 26, 64, 0.2);
}

.checkout-summary__glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,107,0,0.25), transparent 65%);
  pointer-events: none;
}

.checkout-summary__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checkout-summary__head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.checkout-summary__count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
}

.checkout-items {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 260px;
  overflow-y: auto;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.checkout-card .checkout-item {
  background: #f7f9fc;
  border-color: #eef2f7;
}

.checkout-item img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.checkout-item__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checkout-card .checkout-item__title { color: var(--navy-900); }
.checkout-summary .checkout-item__title { color: rgba(255,255,255,0.92); }

.checkout-item__price {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.checkout-card .checkout-item__price { color: var(--orange-600); }
.checkout-summary .checkout-item__price { color: #ffb266; }

.checkout-coupon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #bbf7d0;
  font-size: 0.78rem;
  font-weight: 600;
}

.checkout-totals {
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 0.85rem;
  margin-bottom: 1rem;
}

.checkout-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 0.4rem;
}

.checkout-totals__row .is-discount { color: #86efac; font-weight: 700; }

.checkout-totals__grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255,255,255,0.16);
}

.checkout-totals__grand span {
  font-weight: 700;
  font-size: 0.95rem;
}

.checkout-totals__grand strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffb266;
}

.checkout-submit {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  box-shadow: 0 10px 22px rgba(255,107,0,0.32);
  transition: transform .15s ease, box-shadow .15s ease;
}

.checkout-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255,107,0,0.38);
}

.checkout-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.7rem;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.checkout-back:hover { color: #fff; }

.checkout-secure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.85rem 0 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-weight: 600;
}

@media (max-width: 1023px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
    order: 2;
  }

  .checkout-main { order: 1; }
}

@media (max-width: 639px) {
  .checkout-buyer { grid-template-columns: 1fr; }
  .checkout-hero { padding: 1.1rem; }
  .checkout-card__link {
    width: 100%;
    margin: 0.35rem 0 0;
    justify-content: flex-start;
  }
  .checkout-card__head { flex-wrap: wrap; }
}

/* ===== Learning Player ===== */
.learn-topbar {
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.9rem;
  background: rgba(6, 26, 64, 0.94);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

.learn-topbar__left,
.learn-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.learn-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.learn-topbar__logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--orange-600), var(--orange-400));
  font-weight: 800;
  flex-shrink: 0;
}

.learn-topbar__course {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 360px);
}

.learn-topbar__lesson {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 360px);
}

.learn-topbar__lesson svg {
  width: 12px !important;
  height: 12px !important;
  color: var(--orange-400);
}

.learn-topbar__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  transition: background .15s ease;
}

.learn-topbar__icon:hover { background: rgba(255,107,0,0.2); color: #ffb266; }

.learn-topbar__icon svg {
  width: 17px !important;
  height: 17px !important;
}

.learn-topbar__progress {
  display: none;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.learn-topbar__progress svg {
  width: 15px !important;
  height: 15px !important;
  color: var(--orange-400);
}

.learn-topbar__bar { width: 88px; height: 6px; }

.learn-topbar__home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,107,0,0.14);
  border: 1px solid rgba(255,107,0,0.28);
  color: #ffb266;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
}

.learn-topbar__home svg {
  width: 14px !important;
  height: 14px !important;
}

.learn-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: calc(100vh - 58px);
}

.learn-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.learn-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  max-height: min(62vh, 640px);
}

.learn-stage__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

.learn-stage__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,107,0,0.18), transparent 35%),
    linear-gradient(160deg, #061A40, #0b1220);
  padding: 1.5rem;
}

.learn-stage__empty--scroll {
  place-items: start;
  overflow: auto;
}

.learn-stage__text {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  white-space: pre-wrap;
}

.learn-empty-card {
  text-align: center;
  max-width: 360px;
}

.learn-empty-card__ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.9rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.16);
  color: #ffb266;
  border: 1px solid rgba(255,107,0,0.25);
}

.learn-empty-card__ico svg {
  width: 30px !important;
  height: 30px !important;
}

.learn-empty-card h3 {
  margin: 0 0 0.35rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}

.learn-empty-card p {
  margin: 0 0 1rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.learn-panel {
  padding: 1.15rem 1.25rem 1.5rem;
  background: #0b1220;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex: 1;
}

.learn-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.learn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.learn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  font-size: 0.72rem;
  font-weight: 700;
}

.learn-chip svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--orange-400);
}

.learn-chip--ok {
  background: rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.28);
  color: #86efac;
}

.learn-chip--ok svg { color: #86efac; }

.learn-title {
  margin: 0 0 0.35rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
}

.learn-sub {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
}

.learn-sub svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--orange-400);
}

.learn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.learn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}

.learn-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.learn-btn:hover { transform: translateY(-1px); }

.learn-btn--primary {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,107,0,0.28);
}

.learn-btn--accent {
  background: rgba(255,107,0,0.16);
  border-color: rgba(255,107,0,0.35);
  color: #ffb266;
}

.learn-btn--ghost {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
}

.learn-btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.learn-btn--block { width: 100%; }

.learn-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.learn-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.learn-tab svg {
  width: 15px !important;
  height: 15px !important;
}

.learn-tab em {
  font-style: normal;
  min-width: 18px;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,107,0,0.25);
  color: #ffb266;
  font-size: 0.68rem;
}

.learn-tab.is-active,
.learn-tab.active {
  background: rgba(255,107,0,0.18);
  border-color: rgba(255,107,0,0.4);
  color: #fff;
}

.learn-card {
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.learn-card__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}

.learn-card__label svg {
  width: 15px !important;
  height: 15px !important;
  color: var(--orange-400);
}

.learn-card__hint {
  margin: 0 0 0.65rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

.learn-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  color: #fff;
  padding: 0.8rem 0.9rem;
  font: inherit;
  resize: vertical;
  outline: none;
}

.learn-textarea:focus {
  border-color: rgba(255,107,0,0.45);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}

.learn-empty-inline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
}

.learn-empty-inline svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--orange-400);
}

.learn-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.learn-files a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.learn-files a:hover {
  background: rgba(255,107,0,0.12);
  border-color: rgba(255,107,0,0.28);
  color: #fff;
}

.learn-files__ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.16);
  color: #ffb266;
  flex-shrink: 0;
}

.learn-files__ico svg,
.learn-files__ext {
  width: 15px !important;
  height: 15px !important;
}

.learn-files__name { flex: 1; min-width: 0; font-weight: 650; font-size: 0.88rem; }
.learn-files__ext { color: rgba(255,255,255,0.4); }

.learn-side {
  border-left: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.14), transparent 40%),
    #061A40;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 58px);
  position: sticky;
  top: 58px;
  overflow: hidden;
}

.learn-side__head {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.learn-side__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #ffb266;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.learn-side__kicker svg {
  width: 13px !important;
  height: 13px !important;
}

.learn-side__title {
  margin: 0 0 0.85rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.3;
}

.learn-side__progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.35rem;
}

.learn-side__progress-top span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.learn-side__progress-top svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--orange-400);
}

.learn-side__progress-top strong {
  color: #fff;
  font-weight: 800;
}

.learn-side__progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}

.learn-side__progress-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.learn-side__progress-meta svg {
  width: 12px !important;
  height: 12px !important;
}

.learn-cert {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 0.65rem;
}

.learn-cert.is-ready {
  border-color: rgba(255, 107, 0, 0.35);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 0, 0.18), transparent 50%),
    rgba(255, 255, 255, 0.05);
}

.learn-cert__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 0, 0.16);
  color: #ffb370;
}

.learn-cert__icon svg {
  width: 18px !important;
  height: 18px !important;
}

.learn-cert__body {
  display: grid;
  gap: 0.15rem;
}

.learn-cert__body strong {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
}

.learn-cert__body span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  line-height: 1.35;
}

.learn-cert__link {
  text-align: center;
  color: rgba(255, 183, 112, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.learn-cert__link:hover { color: #fff; }

.learn-side__list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.learn-section { margin-bottom: 0.85rem; }

.learn-section__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  margin-bottom: 0.35rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.learn-section__title svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--orange-400);
}

.learn-section__title em {
  margin-left: auto;
  font-style: normal;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  font-size: 0.65rem;
}

.learn-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.learn-lesson {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.55rem;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255,255,255,0.82);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.learn-lesson:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  transform: translateX(2px);
}

.learn-lesson.is-active {
  background: linear-gradient(105deg, rgba(255,107,0,0.95), rgba(255,138,0,0.9));
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,107,0,0.25);
}

.learn-lesson__ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.learn-lesson.is-active .learn-lesson__ico {
  background: rgba(255,255,255,0.22);
}

.learn-lesson__ico svg {
  width: 15px !important;
  height: 15px !important;
}

.learn-lesson__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.learn-lesson__name {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.learn-lesson__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  opacity: 0.7;
}

.learn-lesson__meta svg {
  width: 11px !important;
  height: 11px !important;
}

.learn-lesson__now {
  color: #fff;
  display: grid;
  place-items: center;
}

.learn-lesson__now svg {
  width: 14px !important;
  height: 14px !important;
}

.learn-side__foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .learn-topbar__progress { display: inline-flex; }
}

@media (max-width: 1023px) {
  .learn-shell {
    grid-template-columns: 1fr;
  }

  .learn-side {
    position: static;
    max-height: none;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .learn-stage { max-height: none; }
}

@media (max-width: 639px) {
  .learn-topbar__home span { display: none; }
  .learn-topbar__course,
  .learn-topbar__lesson { max-width: 46vw; }
  .learn-panel { padding: 1rem; }
  .learn-actions { width: 100%; }
  .learn-actions .learn-btn { flex: 1; }
}

/* ===== Help Center ===== */
.help-page { max-width: 980px; }

.help-hero {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
  padding: 1.4rem 1.45rem;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 15%, rgba(255,107,0,0.45), transparent 32%),
    radial-gradient(circle at 10% 85%, rgba(37,99,235,0.28), transparent 36%),
    linear-gradient(115deg, #041433 0%, #061A40 48%, #0a2f6b 100%);
  box-shadow: 0 16px 36px rgba(6, 26, 64, 0.16);
}

.help-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #ffb266;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.help-hero__eyebrow svg {
  width: 14px !important;
  height: 14px !important;
}

.help-hero__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
}

.help-hero__sub {
  margin: 0.4rem 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
}

.help-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.2);
}

.help-search svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--orange-600);
  flex-shrink: 0;
}

.help-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--navy-900);
}

.help-hero__hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
}

.help-hint {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.help-hint:hover { background: rgba(255,107,0,0.25); border-color: rgba(255,107,0,0.4); }

.help-topics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.help-topic {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.help-topic:hover {
  transform: translateY(-2px);
  border-color: rgba(255,107,0,0.28);
  box-shadow: 0 14px 28px rgba(6, 26, 64, 0.08);
  color: inherit;
}

.help-topic__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255,107,0,0.14), rgba(6,26,64,0.06));
  color: var(--orange-600);
  border: 1px solid rgba(255,107,0,0.16);
  flex-shrink: 0;
}

.help-topic__ico svg {
  width: 18px !important;
  height: 18px !important;
}

.help-topic__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.help-topic__body strong {
  color: var(--navy-900);
  font-size: 0.92rem;
}

.help-topic__body small {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.35;
}

.help-topic__chev {
  width: 16px !important;
  height: 16px !important;
  color: #94a3b8;
  flex-shrink: 0;
}

.help-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-bottom: 1.35rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.help-quick__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.78rem;
  font-weight: 800;
}

.help-quick__label svg {
  width: 14px !important;
  height: 14px !important;
}

.help-quick__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.help-quick__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #f7f9fc;
  border: 1px solid #e8eef7;
  color: var(--navy-900);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.help-quick__btn:hover {
  background: rgba(255,107,0,0.08);
  border-color: rgba(255,107,0,0.28);
  color: var(--orange-600);
}

.help-quick__btn svg {
  width: 14px !important;
  height: 14px !important;
}

.help-faq-wrap { display: grid; gap: 1.15rem; margin-bottom: 1.35rem; }

.help-faq-group__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.help-faq-group__ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.1);
  color: var(--orange-600);
  border: 1px solid rgba(255,107,0,0.16);
}

.help-faq-group__ico svg {
  width: 17px !important;
  height: 17px !important;
}

.help-faq-group__head h2 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy-900);
}

.help-faq-list { display: grid; gap: 0.55rem; }

.help-faq {
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.help-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  font-weight: 750;
  color: var(--navy-900);
}

.help-faq summary::-webkit-details-marker { display: none; }

.help-faq__q {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.help-faq__q svg {
  width: 17px !important;
  height: 17px !important;
  color: var(--orange-600);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.help-faq__chev {
  width: 16px !important;
  height: 16px !important;
  color: #94a3b8;
  transition: transform .15s ease;
  flex-shrink: 0;
}

.help-faq[open] {
  border-color: rgba(255,107,0,0.25);
}

.help-faq[open] .help-faq__chev { transform: rotate(180deg); color: var(--orange-600); }

.help-faq__a {
  display: flex;
  gap: 0.55rem;
  padding: 0 1rem 1rem 1rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.55;
}

.help-faq__a svg {
  width: 16px !important;
  height: 16px !important;
  color: #94a3b8;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.help-faq__a p { margin: 0; }

.help-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.help-empty svg {
  width: 36px !important;
  height: 36px !important;
  color: var(--orange-500);
  margin-bottom: 0.5rem;
}

.help-empty strong {
  display: block;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.help-contact {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 1.35rem 1.4rem;
  color: #fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(255,107,0,0.4), transparent 34%),
    linear-gradient(155deg, #061A40, #0a2a5c 70%, #0b3470);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.help-contact__content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
}

.help-contact__ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffb266;
  flex-shrink: 0;
}

.help-contact__ico svg {
  width: 22px !important;
  height: 22px !important;
}

.help-contact h2 {
  margin: 0 0 0.25rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}

.help-contact p {
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
}

.help-contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.help-contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 750;
  font-size: 0.86rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
}

.help-contact__btn:hover { color: #fff; background: rgba(255,255,255,0.14); }

.help-contact__btn--primary {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(255,107,0,0.28);
}

.help-contact__btn svg {
  width: 15px !important;
  height: 15px !important;
}

@media (max-width: 1023px) {
  .help-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .help-topics { grid-template-columns: 1fr; }
  .help-hero { padding: 1.15rem; }
  .help-contact__actions { width: 100%; }
  .help-contact__btn { flex: 1; justify-content: center; }
}

/* ===== Shared admin list/modal (.adm-*) ===== */
body.adm-lock { overflow: hidden; }

.adm-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59,104,183,0.12), transparent 40%),
    linear-gradient(135deg, #fff 0%, #fff8f1 55%, #f3f7fc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.adm-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.adm-hero__eyebrow svg { width: 14px !important; height: 14px !important; }

.adm-hero__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
}

.adm-hero__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.adm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
}

.adm-btn svg { width: 15px !important; height: 15px !important; }

.adm-btn--primary {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.22);
}

.adm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.adm-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.adm-stat__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
  flex-shrink: 0;
}

.adm-stat__icon.is-blue { background: rgba(59,104,183,0.12); color: #3b68b7; }
.adm-stat__icon.is-navy { background: rgba(6,26,64,0.08); color: var(--navy-900); }
.adm-stat__icon svg { width: 18px !important; height: 18px !important; }

.adm-stat strong {
  display: block;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
}

.adm-stat span { color: #94a3b8; font-size: 0.78rem; font-weight: 650; }

.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.adm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.adm-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 750;
}

.adm-tab svg { width: 14px !important; height: 14px !important; }

.adm-tab.is-active {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,107,0,0.2);
}

.adm-table-wrap {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.adm-table th,
.adm-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.adm-table th {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  background: linear-gradient(180deg, #fff8f1, #f8fafc);
  white-space: nowrap;
}

.adm-table tbody tr:hover { background: rgba(255, 107, 0, 0.035); }
.adm-table tbody tr:last-child td { border-bottom: 0; }

.adm-table__name {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.adm-table__desc {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.35;
}

.adm-table__thumb {
  width: 64px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: block;
}

.adm-table__thumb--wide {
  width: 96px;
  height: 48px;
}

.adm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.adm-badge svg { width: 12px !important; height: 12px !important; }
.adm-badge.is-on { background: #d1fae5; color: #047857; }
.adm-badge.is-off { background: #e2e8f0; color: #475569; }
.adm-badge.is-pending { background: #fff7ed; color: #c2410c; }
.adm-badge.is-paid { background: #d1fae5; color: #047857; }
.adm-badge.is-failed { background: #ffe4e6; color: #e11d48; }

.adm-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.adm-action svg { width: 14px !important; height: 14px !important; }

.adm-action--primary {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.28);
  color: var(--orange-600);
}

.adm-action--danger {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.22);
  color: #e11d48;
}

.adm-action--ok {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.28);
  color: #047857;
}

.adm-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.adm-empty svg {
  width: 34px !important;
  height: 34px !important;
  color: var(--orange-500);
  margin-bottom: 0.45rem;
}

.adm-empty strong { display: block; color: var(--navy-900); margin-bottom: 0.2rem; }

.adm-pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.adm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 26, 64, 0.58);
  backdrop-filter: blur(3px);
  display: none;
}

.adm-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1rem;
}

.adm-modal-overlay.is-open { display: block; }
.adm-modal.is-open { display: grid; }

.adm-modal__card {
  width: min(620px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 70px rgba(6, 26, 64, 0.28);
}

.ilep-modal__card {
  width: min(860px, 100%);
  max-height: min(94vh, 920px);
}

.ilep-modal__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: min(74vh, 720px);
  overflow: auto;
}

.ilep-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.18);
  color: var(--navy-900);
  font-size: 0.86rem;
  line-height: 1.45;
}

.ilep-hint svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--orange-600);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.ilep-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ilep-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ilep-toolbar__hint {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.ilep-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ilep-empty {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed #dbe3f0;
  border-radius: 16px;
  color: #64748b;
  background: #fafbfd;
}

.ilep-empty svg {
  width: 28px !important;
  height: 28px !important;
  color: var(--orange-600);
}

.ilep-empty strong {
  color: var(--navy-900);
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
}

.ilep-empty p { margin: 0; font-size: 0.86rem; }

.ilep-section {
  border: 1px solid #e8eef7;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.ilep-section__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(180deg, #fff8f1, #fff);
  border-bottom: 1px solid #eef2f7;
  color: var(--navy-900);
  font-size: 0.92rem;
}

.ilep-section__head svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--orange-600);
}

.ilep-section__empty {
  padding: 0.85rem 0.9rem;
  font-size: 0.84rem;
  color: #94a3b8;
}

.ilep-ep {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-top: 1px solid #f1f5f9;
}

.ilep-ep__ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(6, 26, 64, 0.06);
  color: var(--navy-900);
  display: grid;
  place-items: center;
  gap: 0.05rem;
  font-size: 0.65rem;
  font-weight: 800;
}

.ilep-ep__ico svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--orange-600);
}

.ilep-ep__title {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.ilep-ep__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: #64748b;
}

.ilep-ep__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ilep-ep__meta svg {
  width: 12px !important;
  height: 12px !important;
}

.ilep-ep__actions {
  display: flex;
  gap: 0.35rem;
}

.ilep-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
}

.ilep-badge.is-on {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.ilep-badge.is-off {
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
}

.ilep-badge svg {
  width: 11px !important;
  height: 11px !important;
}

.ilep-form {
  border: 1px solid #e8eef7;
  border-radius: 16px;
  padding: 1rem;
  background: #fafbfd;
}

.ilep-form__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: var(--navy-900);
}

.ilep-upload { width: 100%; }

.ilep-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
  padding: 0.65rem 0;
}

.ilep-check input { width: 1rem; height: 1rem; accent-color: #FF6B00; }

@media (max-width: 720px) {
  .ilep-ep {
    grid-template-columns: auto 1fr;
  }
  .ilep-ep__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.adm-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fff8f1, #fff);
}

.adm-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adm-modal__eyebrow svg { width: 13px !important; height: 13px !important; }

.adm-modal__head h3 {
  margin: 0.25rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
}

.adm-modal__head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
}

.adm-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.adm-modal__close svg { width: 18px !important; height: 18px !important; }

.adm-modal__body { padding: 1.1rem 1.25rem 1.2rem; }

.adm-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #eef2f7;
}

.adm-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}

.adm-label span { color: #e11d48; }

.adm-label svg {
  width: 14px !important;
  height: 14px !important;
  color: #3b68b7;
  flex-shrink: 0;
}

.adm-hint {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
}

.adm-upload {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.adm-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.adm-upload svg { width: 16px !important; height: 16px !important; color: #3b68b7; }

.adm-preview-img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  margin-top: 0.55rem;
}

.adm-detail-grid {
  display: grid;
  gap: 0.75rem;
}

.adm-detail-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.adm-detail-row:last-child { border-bottom: 0; }

.adm-detail-row dt {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.78rem;
}

.adm-detail-row dd {
  margin: 0;
  color: var(--navy-900);
  font-weight: 650;
}

.adm-items {
  margin-top: 0.75rem;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  overflow: hidden;
}

.adm-items table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.adm-items th,
.adm-items td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.adm-items th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.adm-items tr:last-child td { border-bottom: 0; }

@media (max-width: 1023px) {
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .adm-stats { grid-template-columns: 1fr; }
  .adm-hero { padding: 1rem; }
  .adm-detail-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .adm-modal__card { width: 100%; border-radius: 18px; }
}

.adm-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ===== Admin orders table icons ===== */
.aord-th {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.aord-th svg {
  width: 13px !important;
  height: 13px !important;
  color: #3b68b7;
}

.aord-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.aord-cell__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.aord-cell__icon.is-blue {
  background: rgba(59,104,183,0.12);
  color: #3b68b7;
}

.aord-cell__icon.is-orange {
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.aord-cell__icon svg { width: 15px !important; height: 15px !important; }

.aord-amount {
  color: var(--navy-900);
  font-weight: 800;
  font-size: 0.92rem;
}

.aord-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.aord-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(160deg, rgba(255,107,0,0.18), rgba(59,104,183,0.14));
  color: var(--navy-900);
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
}

.aord-user__name,
.aord-user__email {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.aord-user__name {
  font-weight: 750;
  color: var(--navy-900);
  font-size: 0.9rem;
}

.aord-user__email {
  margin-top: 0.1rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.aord-user__name svg,
.aord-user__email svg {
  width: 12px !important;
  height: 12px !important;
  color: #3b68b7;
  flex-shrink: 0;
}

.aord-method,
.aord-date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: #475569;
}

.aord-method {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
}

.aord-method svg,
.aord-date svg {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0;
}

.aord-date svg { color: #3b68b7; }

.aord-course {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 220px;
}

.aord-course__thumb {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(6, 26, 64, 0.12);
}

.aord-course__title {
  font-weight: 800;
  color: var(--navy-900);
  font-size: 0.86rem;
  line-height: 1.3;
}

.aord-course__more {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  margin-top: 0.1rem;
}

.aord-modal__card {
  width: min(760px, 100%) !important;
}

.aord-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #061A40 0%, #0b3a7a 100%);
  color: #fff;
  margin-bottom: 1rem;
}

.aord-banner span:not(.adm-badge) {
  color: rgba(255,255,255,0.78);
  font-size: 0.82rem;
  font-weight: 650;
}

.aord-banner strong {
  font-size: 1.25rem;
  color: #FF6B00;
}

.aord-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.aord-facts > div {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.aord-facts span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aord-facts b {
  display: block;
  margin-top: 0.2rem;
  color: var(--navy-900);
  font-size: 0.92rem;
}

.aord-items h4 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy-900);
}

.aord-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #fff;
  margin-bottom: 0.65rem;
  box-shadow: 0 8px 20px rgba(6, 26, 64, 0.05);
}

.aord-item__media {
  width: 112px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.aord-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aord-item__body strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.95rem;
  line-height: 1.35;
}

.aord-item__discount {
  display: inline-block;
  margin-top: 0.25rem;
  color: #c2410c;
  font-size: 0.75rem;
  font-weight: 700;
}

.aord-item__price {
  font-weight: 800;
  color: #FF6B00;
  font-size: 1.05rem;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .aord-item { grid-template-columns: 88px minmax(0, 1fr); }
  .aord-item__price { grid-column: 2; }
  .aord-facts { grid-template-columns: 1fr; }
}

/* ===== Admin announcements modal / upload ===== */
.aann-modal .adm-modal__body { max-height: min(70vh, 620px); overflow: auto; }

.aann-upload {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1.5px dashed rgba(255, 107, 0, 0.45);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.08), transparent 45%),
    #fff8f1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.aann-upload:hover {
  border-color: #FF6B00;
  background: #fff4e8;
}

.aann-upload__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.14);
  color: var(--orange-600);
  flex-shrink: 0;
}

.aann-upload__icon svg { width: 22px !important; height: 22px !important; }

.aann-upload__text { display: grid; gap: 0.15rem; min-width: 0; }
.aann-upload__text strong {
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aann-upload__text small { color: #94a3b8; font-size: 0.75rem; }

.aann-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.aann-preview {
  position: relative;
  margin-top: 0.65rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  max-height: 180px;
}

.aann-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.aann-preview__clear {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: rgba(6, 26, 64, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.aann-preview__clear svg { width: 16px !important; height: 16px !important; }

.aann-thumb-empty {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #94a3b8;
}

.aann-thumb-empty svg { width: 18px !important; height: 18px !important; }

.aann-audience,
.aann-date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: #475569;
}

.aann-audience {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
}

.aann-audience svg,
.aann-date svg {
  width: 13px !important;
  height: 13px !important;
}

/* ===== Admin settings page ===== */
.aset-logo-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  margin-bottom: 1rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.aset-logo-card__preview {
  min-height: 140px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,107,0,0.12), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59,104,183,0.12), transparent 45%),
    #f8fafc;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.aset-logo-card__preview img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.aset-logo-card__fallback {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 650;
}

.aset-logo-card__fallback svg {
  width: 28px !important;
  height: 28px !important;
  color: var(--orange-500);
}

.aset-logo-card__body {
  padding: 1.1rem 1.2rem;
}

.aset-logo-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.aset-logo-card__eyebrow svg { width: 13px !important; height: 13px !important; }

.aset-logo-card__body h3 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
}

.aset-logo-card__body p {
  margin: 0.35rem 0 0.85rem;
  color: #64748b;
  font-size: 0.86rem;
}

.aset-logo-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.aset-group { margin-bottom: 1rem; }

.aset-group__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.aset-group__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.aset-group__icon svg { width: 16px !important; height: 16px !important; }

.aset-group__head h3 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-900);
}

.aset-group__count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 650;
}

.aset-key {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.aset-key__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
  flex-shrink: 0;
}

.aset-key__icon svg { width: 15px !important; height: 15px !important; }

.aset-key strong {
  color: var(--navy-900);
  font-weight: 750;
}

.aset-code {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  background: rgba(59, 104, 183, 0.08);
  color: #3b68b7;
  font-size: 0.75rem;
  font-weight: 650;
}

.aset-value {
  max-width: 360px;
  color: #64748b;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .aset-logo-card { grid-template-columns: 1fr; }
}

/* ===== Certificates list ===== */
.cert-list-page {
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 1.5rem;
}

.cert-list-page__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.2rem 1.25rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 0, 0.12), transparent 42%),
    linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 30px rgba(6, 26, 64, 0.05);
}

.cert-list-page__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cert-list-page__eyebrow svg {
  width: 14px !important;
  height: 14px !important;
}

.cert-list-page__title {
  margin: 0.2rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.cert-list-page__sub {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 42rem;
}

.cert-list-page__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cert-list-page__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.cert-list-page__stat {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 20px rgba(6, 26, 64, 0.04);
}

.cert-list-page__stat-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange-600);
  flex-shrink: 0;
}

.cert-list-page__stat-ico.is-blue {
  background: rgba(59, 104, 183, 0.1);
  color: #3b68b7;
}

.cert-list-page__stat-ico.is-navy {
  background: rgba(6, 26, 64, 0.08);
  color: var(--navy-900);
}

.cert-list-page__stat-ico svg {
  width: 18px !important;
  height: 18px !important;
}

.cert-list-page__stat strong {
  display: block;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.15;
}

.cert-list-page__stat span {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.cert-list-empty {
  text-align: center;
  padding: 3rem 1.25rem;
  border-radius: 22px;
  background: #fff;
  border: 1px dashed #dbe3f0;
}

.cert-list-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange-600);
}

.cert-list-empty__icon svg {
  width: 28px !important;
  height: 28px !important;
}

.cert-list-empty h2 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.cert-list-empty p {
  margin: 0.4rem 0 1rem;
  color: #64748b;
}

.cert-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
}

.cert-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(6, 26, 64, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(6, 26, 64, 0.12);
}

.cert-card__preview {
  position: relative;
  display: block;
  aspect-ratio: 1024 / 682;
  overflow: hidden;
  background: #f7f4ee;
  container-type: inline-size;
  container-name: certthumb;
  text-decoration: none;
}

.cert-card__preview .cert-canvas {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.cert-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.28);
}

.cert-card__badge svg {
  width: 13px !important;
  height: 13px !important;
}

.cert-card__preview-fade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(6, 26, 64, 0.45));
  pointer-events: none;
  z-index: 3;
}

.cert-card__preview-cta {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.cert-card:hover .cert-card__preview-cta {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.cert-card__preview-cta svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--orange-600);
}

.cert-card__body {
  padding: 1rem 1.05rem 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.cert-card__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.3;
}

.cert-card__student {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
}

.cert-card__student svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--orange-600);
}

.cert-card__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.cert-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cert-card__meta svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--orange-600);
}

.cert-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.cert-card__actions .cert-view__btn {
  min-height: 42px;
  padding: 0.5rem 0.85rem;
  font-size: 0.86rem;
}

/* Compact thumb: name + course only, scaled for card preview */
.cert-canvas--thumb .cert-mid {
  top: 46.5%;
  width: min(58%, 240px);
  padding: 0.1rem 0.25rem;
  transform: translateX(-50%);
}

.cert-canvas--thumb .cert-mid__presented,
.cert-canvas--thumb .cert-mid__instructor,
.cert-canvas--thumb .cert-mid__body,
.cert-canvas--thumb .cert-field--date,
.cert-canvas--thumb .cert-field--number {
  display: none;
}

.cert-canvas--thumb .cert-mid__name {
  font-size: 0.95rem;
  line-height: 1.15;
  margin-bottom: 0.12rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cert-canvas--thumb .cert-mid__course {
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 700;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
}

@container certthumb (min-width: 380px) {
  .cert-canvas--thumb .cert-mid {
    width: min(56%, 280px);
  }
  .cert-canvas--thumb .cert-mid__name {
    font-size: 1.08rem;
  }
  .cert-canvas--thumb .cert-mid__course {
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  .cert-list-page__stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cert-list-page__hero {
    padding: 1rem;
  }
  .cert-card__actions .cert-view__btn span {
    display: none;
  }
  .cert-card__actions .cert-view__btn {
    width: 44px;
    padding: 0;
  }
  .cert-card__actions .cert-view__btn--primary {
    flex: 1;
    width: auto;
    padding: 0 0.85rem;
  }
  .cert-card__actions .cert-view__btn--primary span {
    display: inline;
  }
}

/* ===== Certificate view shell ===== */
.cert-shell {
  position: relative;
  background: #F4F7FB;
}

.cert-shell__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 107, 0, 0.14), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(59, 104, 183, 0.14), transparent 32%),
    linear-gradient(180deg, #EEF3FA 0%, #F7F9FC 42%, #F4F7FB 100%);
}

.cert-shell__header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cert-shell__header-inner {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cert-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy-900);
}

.cert-shell__logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.cert-shell__brand-name {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
}

.cert-shell__brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange-600);
}

.cert-shell__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cert-shell__nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  color: #475569;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.cert-shell__nav a:hover {
  background: rgba(255, 107, 0, 0.08);
  color: var(--orange-600);
}

.cert-shell__nav svg {
  width: 15px !important;
  height: 15px !important;
}

.cert-shell__main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 5.5rem;
}

.cert-view__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  animation: guestRise 480ms ease both;
}

.cert-view__toolbar-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.cert-view__back {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--navy-900);
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 160ms ease, border-color 160ms ease;
}

.cert-view__back:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 0, 0.35);
}

.cert-view__back svg {
  width: 18px !important;
  height: 18px !important;
}

.cert-view__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cert-view__eyebrow svg {
  width: 13px !important;
  height: 13px !important;
}

.cert-view__title {
  margin: 0.15rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.cert-view__sub {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 600;
}

.cert-view__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cert-view__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.cert-view__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 0, 0.28);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.cert-view__btn svg {
  width: 17px !important;
  height: 17px !important;
}

.cert-view__btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 107, 0, 0.28);
}

.cert-view__btn--primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(255, 107, 0, 0.34);
}

.cert-view__btn--ghost {
  background: rgba(255, 255, 255, 0.7);
}

.cert-view__btn--block {
  width: 100%;
}

.cert-view__btn:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.cert-view__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
  animation: guestRise 560ms 40ms ease both;
}

.cert-view__chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 20px rgba(6, 26, 64, 0.04);
}

.cert-view__chip-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange-600);
}

.cert-view__chip-ico svg {
  width: 16px !important;
  height: 16px !important;
}

.cert-view__chip small {
  display: block;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cert-view__chip strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}

.cert-view-stage {
  width: 100%;
  margin: 0 auto 1rem;
  animation: guestRise 620ms 80ms ease both;
}

.cert-view-stage__frame {
  padding: 0.85rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 22px 50px rgba(6, 26, 64, 0.1);
}

.cert-view-stage__frame .cert-canvas {
  border-radius: 14px;
}

.cert-view-stage__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  text-align: center;
}

.cert-view-stage__hint svg {
  width: 15px !important;
  height: 15px !important;
  color: var(--orange-600);
  flex-shrink: 0;
}

.cert-view-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 -10px 30px rgba(6, 26, 64, 0.08);
}

.cert-page {
  max-width: 1100px;
  margin: 0 auto 1.25rem;
}

.cert-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cert-page__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cert-page__eyebrow svg { width: 14px !important; height: 14px !important; }

.cert-page__title {
  margin: 0.2rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
}

.cert-page__sub {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.cert-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cert-stage {
  width: min(1100px, 100%);
  margin: 0 auto 1.5rem;
}

@media (max-width: 767px) {
  .cert-shell__nav a {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }
  .cert-shell__nav a svg {
    width: 18px !important;
    height: 18px !important;
  }
  .cert-view__toolbar-actions .cert-view__btn--primary span {
    display: inline;
  }
  .cert-view__toolbar-actions .cert-view__btn:not(.cert-view__btn--primary) span {
    display: none;
  }
  .cert-view__toolbar-actions .cert-view__btn:not(.cert-view__btn--primary) {
    width: 44px;
    padding: 0;
  }
  .cert-view__toolbar-actions .cert-view__btn--primary {
    display: none;
  }
  .cert-view-dock { display: block; }
  .cert-shell__main { padding-bottom: 6.5rem; }
}

.cert-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 682;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(6, 26, 64, 0.18);
  background: #f7f4ee center / cover no-repeat;
  background-image: var(--cert-bg);
}

.cert-canvas__bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.cert-canvas__layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Center stack — no white panel; text sits on certificate artwork */
.cert-mid-mask {
  display: none;
}

.cert-mid {
  position: absolute;
  left: 50%;
  top: 43.5%;
  transform: translateX(-50%);
  width: min(68%, 680px);
  padding: 0.55rem 0.9rem 0.85rem;
  text-align: center;
  background: none;
  border-radius: 0;
  font-family: "IBM Plex Sans Thai", Manrope, sans-serif;
  z-index: 2;
}

.cert-mid__presented {
  margin: 0 0 0.55rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: clamp(0.56rem, 1vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cert-mid__name {
  margin: 0 0 0.45rem;
  font-family: "IBM Plex Sans Thai", Manrope, sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.35vw, 2.55rem);
  line-height: 1.2;
  color: #0b1f3a;
  letter-spacing: 0;
}

.cert-mid__course {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.95vw, 1.4rem);
  line-height: 1.3;
  color: #FF6B00;
}

.cert-mid__instructor {
  margin: 0.35rem 0 0;
  font-family: "IBM Plex Sans Thai", Manrope, sans-serif;
  font-size: clamp(0.74rem, 1.2vw, 0.9rem);
  font-weight: 600;
  color: #64748b;
}

.cert-mid__body {
  margin: 0.85rem auto 0;
  font-family: "IBM Plex Sans Thai", Manrope, sans-serif;
  font-size: clamp(0.58rem, 0.98vw, 0.78rem);
  font-weight: 500;
  line-height: 1.4;
  color: #64748b;
  white-space: nowrap;
  max-width: 100%;
}

.cert-field {
  position: absolute;
  color: #475569;
  line-height: 1.35;
  font-family: "IBM Plex Sans Thai", Manrope, sans-serif;
  font-size: clamp(0.68rem, 1.15vw, 0.84rem);
  font-weight: 600;
}

.cert-field span {
  display: inline;
  margin-right: 0.35rem;
  color: #94a3b8;
  font-weight: 600;
}

.cert-field strong {
  display: inline;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: inherit;
  font-weight: 800;
  color: #0b1f3a;
}

.cert-field--date {
  top: 79.5%;
  left: 10.5%;
  width: 28%;
  text-align: left;
}

.cert-field--number {
  top: 79.5%;
  right: 10.5%;
  width: 30%;
  text-align: right;
}

.cert-field--number span {
  margin-right: 0.35rem;
}

.cert-verify-form {
  max-width: 640px;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.cert-verify-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cert-verify-form__row .input { flex: 1 1 220px; }

.cert-verify-ok,
.cert-verify-bad {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
}

.cert-verify-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.cert-verify-bad {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.cert-verify-ok svg,
.cert-verify-bad svg {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0;
}

.cert-verify-ok strong { display: block; font-weight: 800; }
.cert-verify-ok p { margin: 0.15rem 0 0; opacity: 0.9; }
.cert-verify-ok .adm-btn { margin-left: auto; }

@media (max-width: 767px) {
  .cert-mid {
    top: 41%;
    width: min(68%, 560px);
    padding: 0.4rem 0.5rem 0.55rem;
  }

  .cert-mid__name {
    font-size: clamp(1.25rem, 5.4vw, 1.75rem);
  }

  .cert-field--date,
  .cert-field--number {
    top: 81%;
  }
}

@media print {
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print,
  .sidebar,
  .desktop-sidebar,
  header,
  .bottom-nav,
  .flash,
  nav {
    display: none !important;
  }

  .cert-stage,
  .cert-view-stage,
  .cert-shell__main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cert-view-stage__frame {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .cert-canvas {
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    page-break-inside: avoid;
  }

  @page {
    size: landscape;
    margin: 8mm;
  }
}

/* ===== Admin recommendation page ===== */
.arec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.arec-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.arec-panel {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 1.05rem 1.15rem;
}

.arec-panel--table { padding: 1.05rem 0 0; margin-bottom: 0.25rem; }
.arec-panel--table .arec-panel__head { padding: 0 1.15rem 0.85rem; }

.arec-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.arec-panel__head h3 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-900);
}

.arec-panel__head p {
  margin: 0.15rem 0 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.arec-panel__head p strong { color: var(--orange-600); }

.arec-panel__head .adm-btn { margin-left: auto; }

.arec-panel__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
  flex-shrink: 0;
}

.arec-panel__icon.is-blue { background: rgba(59,104,183,0.12); color: #3b68b7; }
.arec-panel__icon.is-navy { background: rgba(6,26,64,0.08); color: var(--navy-900); }
.arec-panel__icon svg { width: 18px !important; height: 18px !important; }

.arec-weights { display: grid; gap: 0.75rem; }

.arec-weight {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.arec-weight__label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.arec-weight__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.arec-weight__icon svg { width: 15px !important; height: 15px !important; }

.arec-weight__label strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 800;
}

.arec-weight__label small {
  color: #94a3b8;
  font-size: 0.72rem;
}

.arec-weight__ctrl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 0.55rem;
  align-items: center;
}

.arec-weight__ctrl input[type="range"] {
  width: 100%;
  accent-color: #FF6B00;
}

.arec-weight__num {
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.arec-panel__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f7;
}

.arec-list { display: grid; gap: 0.2rem; }

.arec-list__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.84rem;
}

.arec-list__row:last-child { border-bottom: 0; }

.arec-list__row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #475569;
  min-width: 0;
}

.arec-list__row span svg {
  width: 14px !important;
  height: 14px !important;
  color: #3b68b7;
  flex-shrink: 0;
}

.arec-list__row strong {
  color: var(--navy-900);
  font-weight: 800;
  white-space: nowrap;
}

.arec-rank {
  font-style: normal;
  font-weight: 800;
  color: var(--orange-600);
  margin-right: 0.15rem;
}

.arec-empty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.84rem;
  padding: 0.5rem 0;
}

.arec-empty svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--orange-500);
}

.arec-course {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.arec-course__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
  flex-shrink: 0;
}

.arec-course__icon svg { width: 15px !important; height: 15px !important; }

.arec-course strong {
  color: var(--navy-900);
  font-weight: 750;
}

.arec-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
  font-size: 0.75rem;
  font-weight: 750;
}

.arec-type svg { width: 13px !important; height: 13px !important; }

.arec-weight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.arec-weight-pill svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--orange-600);
}

@media (max-width: 1023px) {
  .arec-grid { grid-template-columns: 1fr; }
}

/* ===== Admin reviews student avatar ===== */
.arev-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.arev-user__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,107,0,0.18), rgba(59,104,183,0.14));
  color: var(--navy-900);
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}

.arev-user__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.arev-user__avatar > span {
  position: relative;
  z-index: 0;
}

.arev-user__name {
  font-weight: 750;
  color: var(--navy-900);
  line-height: 1.25;
  word-break: break-word;
}

/* ===== Admin users page ===== */
body.aus-lock { overflow: hidden; }

.aus-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59,104,183,0.12), transparent 40%),
    linear-gradient(135deg, #fff 0%, #fff8f1 55%, #f3f7fc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.aus-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.aus-hero__eyebrow svg { width: 14px !important; height: 14px !important; }

.aus-hero__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
}

.aus-hero__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.aus-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.aus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
}

.aus-btn svg { width: 15px !important; height: 15px !important; }

.aus-btn--primary {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.22);
}

.aus-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.aus-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.aus-stat__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
  flex-shrink: 0;
}

.aus-stat__icon.is-blue { background: rgba(59,104,183,0.12); color: #3b68b7; }
.aus-stat__icon.is-navy { background: rgba(6,26,64,0.08); color: var(--navy-900); }
.aus-stat__icon svg { width: 18px !important; height: 18px !important; }

.aus-stat strong {
  display: block;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
}

.aus-stat span { color: #94a3b8; font-size: 0.78rem; font-weight: 650; }

.aus-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.aus-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.aus-search svg { width: 16px !important; height: 16px !important; color: #3b68b7; flex-shrink: 0; }
.aus-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  color: var(--navy-900);
}

.aus-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.aus-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 750;
}

.aus-tab svg { width: 14px !important; height: 14px !important; }

.aus-tab.is-active {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,107,0,0.2);
}

.aus-list { display: grid; gap: 0.75rem; }

.aus-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.aus-card__avatar {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  background: linear-gradient(160deg, rgba(255,107,0,0.18), rgba(59,104,183,0.14));
  color: var(--navy-900);
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  overflow: hidden;
}

.aus-card__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.aus-card__avatar span {
  position: relative;
  z-index: 0;
}

.aus-card__body {
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.aus-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.aus-card__top h3 {
  margin: 0 0 0.3rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-900);
}

.aus-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.aus-card__meta span { display: inline-flex; align-items: center; gap: 0.25rem; }
.aus-card__meta svg { width: 13px !important; height: 13px !important; color: #3b68b7; }

.aus-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.aus-badge svg { width: 12px !important; height: 12px !important; }
.aus-badge.is-on { background: #d1fae5; color: #047857; }
.aus-badge.is-off { background: #e2e8f0; color: #475569; }

.aus-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.aus-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.aus-action svg { width: 14px !important; height: 14px !important; }

.aus-action--primary {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.28);
  color: var(--orange-600);
}

.aus-action--danger {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.22);
  color: #e11d48;
}

.aus-action--ok {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.25);
  color: #047857;
}

.aus-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.aus-empty svg {
  width: 34px !important;
  height: 34px !important;
  color: var(--orange-500);
  margin-bottom: 0.45rem;
}

.aus-empty strong { display: block; color: var(--navy-900); margin-bottom: 0.2rem; }

.aus-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.aus-pager__page {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
  font-weight: 750;
  font-size: 0.86rem;
}

.aus-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 26, 64, 0.58);
  backdrop-filter: blur(3px);
  display: none;
}

.aus-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1rem;
}

.aus-modal-overlay.is-open { display: block; }
.aus-modal.is-open { display: grid; }

.aus-modal__card {
  width: min(560px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 70px rgba(6, 26, 64, 0.28);
}

.aus-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fff8f1, #fff);
}

.aus-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aus-modal__eyebrow svg { width: 13px !important; height: 13px !important; }

.aus-modal__head h3 {
  margin: 0.25rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
}

.aus-modal__head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
}

.aus-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.aus-modal__close svg { width: 18px !important; height: 18px !important; }

.aus-modal__body { padding: 1.1rem 1.25rem 1.2rem; }

.aus-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}

.aus-label span { color: #e11d48; }

.aus-hint {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
}

.aus-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #eef2f7;
}

@media (max-width: 1023px) {
  .aus-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .aus-stats { grid-template-columns: 1fr; }
  .aus-card { grid-template-columns: 56px minmax(0, 1fr); }
}

/* ===== Admin categories page ===== */
body.acat-lock { overflow: hidden; }

.acat-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59,104,183,0.12), transparent 40%),
    linear-gradient(135deg, #fff 0%, #fff8f1 55%, #f3f7fc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.acat-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.acat-hero__eyebrow svg { width: 14px !important; height: 14px !important; }

.acat-hero__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
}

.acat-hero__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.acat-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
}

.acat-btn svg { width: 15px !important; height: 15px !important; }

.acat-btn--primary {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.22);
}

.acat-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.acat-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.acat-stat__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.acat-stat__icon.is-blue { background: rgba(59,104,183,0.12); color: #3b68b7; }
.acat-stat__icon.is-navy { background: rgba(6,26,64,0.08); color: var(--navy-900); }
.acat-stat__icon svg { width: 18px !important; height: 18px !important; }

.acat-stat strong {
  display: block;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
}

.acat-stat span { color: #94a3b8; font-size: 0.78rem; font-weight: 650; }

.acat-table-wrap {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.acat-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.acat-table th,
.acat-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.acat-table th {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  background: linear-gradient(180deg, #fff8f1, #f8fafc);
  white-space: nowrap;
}

.acat-table tbody tr:hover { background: rgba(255, 107, 0, 0.035); }
.acat-table tbody tr:last-child td { border-bottom: 0; }

.acat-table__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.acat-table__icon svg { width: 18px !important; height: 18px !important; }

.acat-table__name {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.acat-table__desc {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.35;
  max-width: 320px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acat-table__slug {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  background: rgba(59, 104, 183, 0.08);
  color: #3b68b7;
  font-size: 0.75rem;
  font-weight: 650;
}

.acat-table__count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--navy-900);
  font-weight: 750;
}

.acat-table__count svg { width: 14px !important; height: 14px !important; color: #3b68b7; }

.acat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.acat-badge svg { width: 12px !important; height: 12px !important; }
.acat-badge.is-on { background: #d1fae5; color: #047857; }
.acat-badge.is-off { background: #e2e8f0; color: #475569; }

.acat-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.acat-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.acat-action svg { width: 14px !important; height: 14px !important; }

.acat-action--primary {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.28);
  color: var(--orange-600);
}

.acat-action--danger {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.22);
  color: #e11d48;
}

.acat-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.acat-empty svg {
  width: 34px !important;
  height: 34px !important;
  color: var(--orange-500);
  margin-bottom: 0.45rem;
}

.acat-empty strong { display: block; color: var(--navy-900); margin-bottom: 0.2rem; }

.acat-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 26, 64, 0.58);
  backdrop-filter: blur(3px);
  display: none;
}

.acat-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1rem;
}

.acat-modal-overlay.is-open { display: block; }
.acat-modal.is-open { display: grid; }

.acat-modal__card {
  width: min(560px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 70px rgba(6, 26, 64, 0.28);
}

.acat-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fff8f1, #fff);
}

.acat-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acat-modal__eyebrow svg { width: 13px !important; height: 13px !important; }

.acat-modal__head h3 {
  margin: 0.25rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
}

.acat-modal__head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
}

.acat-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.acat-modal__close svg { width: 18px !important; height: 18px !important; }

.acat-modal__body { padding: 1.1rem 1.25rem 1.2rem; }

.acat-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}

.acat-label span { color: #e11d48; }

.acat-color {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.acat-color input[type="color"] {
  width: 48px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.15rem;
  background: #fff;
  cursor: pointer;
}

.acat-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.acat-preview__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.acat-preview__icon svg { width: 22px !important; height: 22px !important; }

.acat-preview strong {
  display: block;
  color: var(--navy-900);
  font-weight: 800;
}

.acat-preview small {
  color: #94a3b8;
  font-size: 0.75rem;
}

.acat-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #eef2f7;
}

@media (max-width: 767px) {
  .acat-stats { grid-template-columns: 1fr; }
}

/* ===== Admin courses page (list + edit modal) ===== */
body.ac-lock { overflow: hidden; }

.ac-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59,104,183,0.12), transparent 40%),
    linear-gradient(135deg, #fff 0%, #fff8f1 55%, #f3f7fc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.ac-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.ac-hero__eyebrow svg { width: 14px !important; height: 14px !important; }

.ac-hero__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
}

.ac-hero__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.ac-hero__actions,
.ac-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ac-toolbar { margin-bottom: 0.85rem; }

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
}

.ac-btn svg { width: 15px !important; height: 15px !important; }

.ac-btn--primary {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.22);
}

.ac-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.ac-search svg { width: 16px !important; height: 16px !important; color: var(--orange-600); }
.ac-search input { width: 100%; border: 0; outline: none; font: inherit; background: transparent; }

.ac-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ac-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.ac-tab svg { width: 14px !important; height: 14px !important; }

.ac-tab.is-active {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
}

.ac-list { display: grid; gap: 0.85rem; }

.ac-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.ac-card__media {
  position: relative;
  background: #0b1f45;
  min-height: 130px;
}

.ac-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ac-status {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: #fff;
  color: #475569;
}

.ac-status svg { width: 12px !important; height: 12px !important; }
.ac-status.is-published { background: #d1fae5; color: #047857; }
.ac-status.is-pending { background: #ffedd5; color: #c2410c; }
.ac-status.is-draft { background: #e2e8f0; color: #475569; }
.ac-status.is-rejected { background: #ffe4e6; color: #be123c; }

.ac-card__body {
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ac-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.ac-card__top h3 {
  margin: 0 0 0.35rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.ac-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.ac-card__meta span { display: inline-flex; align-items: center; gap: 0.25rem; }
.ac-card__meta svg { width: 13px !important; height: 13px !important; color: #3b68b7; }

.ac-card__price strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.15rem;
  color: var(--orange-600);
}
.ac-card__price strong.is-free { color: #059669; }

.ac-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.ac-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.ac-action svg { width: 14px !important; height: 14px !important; }

.ac-action--primary {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.28);
  color: var(--orange-600);
}

.ac-action--ok {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.28);
  color: #059669;
}

.ac-action--danger {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.22);
  color: #e11d48;
}

.ac-reject { display: inline-flex; align-items: center; gap: 0.35rem; }
.ac-reject input {
  width: 140px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
}

.ac-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.ac-empty svg {
  width: 34px !important;
  height: 34px !important;
  color: var(--orange-500);
  margin-bottom: 0.45rem;
}

.ac-empty strong { display: block; color: var(--navy-900); margin-bottom: 0.2rem; }

.ac-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.ac-pager__page {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
  font-weight: 800;
  font-size: 0.84rem;
}

.ac-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 26, 64, 0.58);
  backdrop-filter: blur(3px);
  display: none;
}

.ac-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1rem;
}

.ac-modal-overlay.is-open { display: block; }
.ac-modal.is-open { display: grid; }

.ac-modal__card {
  width: min(980px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 70px rgba(6, 26, 64, 0.28);
}

.ac-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fff8f1, #fff);
}

.ac-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ac-modal__eyebrow svg { width: 13px !important; height: 13px !important; }

.ac-modal__head h3 {
  margin: 0.25rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.ac-modal__head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
}

.ac-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ac-modal__close svg { width: 18px !important; height: 18px !important; }

.ac-modal__body { padding: 1.1rem 1.25rem 1.2rem; }

.ac-modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: start;
}

.ac-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}

.ac-label span { color: #e11d48; }

.ac-thumb-preview {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0b1f45;
  border: 1px solid #e2e8f0;
}

.ac-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ac-meta-box {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 0.75rem;
  color: #475569;
  display: grid;
  gap: 0.25rem;
}

.ac-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #eef2f7;
}

@media (max-width: 1023px) {
  .ac-card { grid-template-columns: 120px minmax(0, 1fr); }
  .ac-modal__grid { grid-template-columns: 1fr; }
}

@media (max-width: 639px) {
  .ac-card { grid-template-columns: 1fr; }
  .ac-card__media { aspect-ratio: 16 / 10; }
}

/* ===== Admin courses / banners ===== */
.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.admin-page-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.admin-page-head__eyebrow svg {
  width: 14px !important;
  height: 14px !important;
}

.admin-page-head__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--navy-900);
}

.admin-page-head__sub {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.admin-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,107,0,0.08);
  border: 1px solid rgba(255,107,0,0.22);
  color: var(--orange-600);
  text-decoration: none;
  font-weight: 750;
  font-size: 0.86rem;
}

.admin-link-btn svg {
  width: 15px !important;
  height: 15px !important;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.admin-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.admin-search svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--orange-600);
}

.admin-search input {
  width: 100%;
  border: 0;
  outline: none;
  font: inherit;
  background: transparent;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-tab svg {
  width: 14px !important;
  height: 14px !important;
}

.admin-tab.is-active {
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
  color: #fff;
}

.admin-course-list {
  display: grid;
  gap: 0.85rem;
}

.admin-course-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.admin-course-card__media {
  background: #0b1f45;
  min-height: 120px;
}

.admin-course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-course-card__body {
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-course-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.admin-course-card__top h3 {
  margin: 0 0 0.35rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--navy-900);
}

.admin-course-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-course-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.admin-course-card__meta svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--orange-600);
}

.admin-course-card__price strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.1rem;
  color: var(--orange-600);
}

.admin-course-card__price strong.is-free { color: #059669; }

.admin-course-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.admin-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.admin-action svg {
  width: 14px !important;
  height: 14px !important;
}

.admin-action--primary {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.28);
  color: var(--orange-600);
}

.admin-action--ok {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.28);
  color: #059669;
}

.admin-action--danger {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.22);
  color: #e11d48;
}

.admin-reject {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-reject input {
  width: 140px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-status.is-published { background: #d1fae5; color: #047857; }
.admin-status.is-pending { background: #ffedd5; color: #c2410c; }
.admin-status.is-draft { background: #e2e8f0; color: #475569; }
.admin-status.is-rejected { background: #ffe4e6; color: #be123c; }

.admin-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.admin-empty svg {
  width: 34px !important;
  height: 34px !important;
  color: var(--orange-500);
  margin-bottom: 0.45rem;
}

.admin-empty strong {
  display: block;
  color: var(--navy-900);
  margin-bottom: 0.2rem;
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.1rem;
  align-items: start;
}

.admin-thumb-preview {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0b1f45;
  border: 1px solid #e2e8f0;
}

.admin-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-upload-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1.5px dashed rgba(255,107,0,0.45);
  background: rgba(255,107,0,0.06);
  color: var(--orange-600);
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
}

.admin-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-upload-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.admin-banner-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  aspect-ratio: 1560 / 369;
  background: #0b1f45;
}

.admin-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-details {
  border-top: 1px solid #eef2f7;
  padding-top: 0.75rem;
}

.admin-details summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-weight: 750;
  font-size: 0.88rem;
}

.admin-details summary::-webkit-details-marker { display: none; }

.admin-details summary svg {
  width: 15px !important;
  height: 15px !important;
}

@media (max-width: 1023px) {
  .admin-edit-grid { grid-template-columns: 1fr; }
  .admin-course-card { grid-template-columns: 120px minmax(0, 1fr); }
}

@media (max-width: 639px) {
  .admin-course-card { grid-template-columns: 1fr; }
  .admin-course-card__media { aspect-ratio: 16 / 10; }
}

/* ===== Admin dashboard ===== */
.ad-dash { max-width: 1200px; }

.ad-dash__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.25rem 1.35rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.18), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(59,104,183,0.12), transparent 40%),
    linear-gradient(135deg, #ffffff 0%, #fff8f1 55%, #f3f7fc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.ad-dash__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.ad-dash__eyebrow svg { width: 14px !important; height: 14px !important; }

.ad-dash__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy-900);
}

.ad-dash__sub {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.ad-dash__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ad-dash__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 750;
  font-size: 0.86rem;
}

.ad-dash__btn svg { width: 15px !important; height: 15px !important; }

.ad-dash__btn--primary {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.25);
}

.ad-dash__btn--sm {
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.ad-todo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 1px solid rgba(255, 107, 0, 0.2);
}

.ad-todo__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--navy-900);
  font-weight: 800;
}

.ad-todo__head svg { width: 18px !important; height: 18px !important; color: #c2410c; }
.ad-todo__head span { color: #c2410c; font-size: 0.8rem; font-weight: 750; }

.ad-todo__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ad-todo__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #fed7aa;
  color: var(--navy-900);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 750;
}

.ad-todo__item svg { width: 14px !important; height: 14px !important; color: #c2410c; }
.ad-todo__item b { color: #FF6B00; }
.ad-todo__item.is-hot { background: #fff7ed; }

.ad-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.ad-kpi-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ad-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 0.95rem;
  margin-bottom: 0.95rem;
}

.ad-charts--stack { grid-template-columns: 1fr; }

.ad-recent { display: grid; gap: 0.5rem; }

.ad-recent__item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
}

.ad-recent__item:hover {
  background: #fff8f1;
  border-color: rgba(255,107,0,0.22);
}

.ad-recent__item img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.ad-recent__meta strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-recent__meta small {
  display: block;
  margin-top: 0.12rem;
  color: #94a3b8;
  font-size: 0.72rem;
}

.ad-recent__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.ad-recent__right b {
  color: #FF6B00;
  font-size: 0.86rem;
}

.ad-popular__thumb {
  width: 48px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.ad-kpi {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.ad-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(6, 26, 64, 0.08);
  border-color: rgba(255,107,0,0.22);
}

.ad-kpi__top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.ad-kpi__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,107,0,0.12);
  color: var(--orange-600);
}

.ad-kpi__icon svg { width: 18px !important; height: 18px !important; }

.ad-kpi--navy .ad-kpi__icon { background: rgba(6,26,64,0.08); color: var(--navy-900); }
.ad-kpi--blue .ad-kpi__icon { background: rgba(59,104,183,0.12); color: #3b68b7; }
.ad-kpi--warn .ad-kpi__icon { background: #ffedd5; color: #c2410c; }

.ad-kpi__label {
  font-size: 0.82rem;
  font-weight: 750;
  color: #64748b;
}

.ad-kpi__value {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.15;
}

.ad-kpi--orange .ad-kpi__value { color: var(--orange-600); }

.ad-kpi__sub {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.ad-quick {
  margin-bottom: 1.1rem;
  padding: 1.05rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.ad-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ad-section-head h3,
.ad-panel__head h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-900);
}

.ad-section-head h3 svg,
.ad-panel__head h3 svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--orange-600);
}

.ad-section-head p,
.ad-panel__head p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.ad-quick__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.ad-quick__card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 68px;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fffaf5, #fff);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ad-quick__card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,107,0,0.28);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.ad-quick__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(59,104,183,0.1);
  color: #3b68b7;
  flex-shrink: 0;
}

.ad-quick__icon svg { width: 18px !important; height: 18px !important; }

.ad-quick__card strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 800;
}

.ad-quick__card small {
  display: block;
  margin-top: 0.1rem;
  color: #94a3b8;
  font-size: 0.74rem;
}

.ad-quick__arrow {
  margin-left: auto;
  width: 16px !important;
  height: 16px !important;
  color: #cbd5e1;
}

.ad-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.ad-panel {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 1.05rem 1.15rem 1.15rem;
}

.ad-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ad-empty {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 160px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
}

.ad-empty svg {
  width: 28px !important;
  height: 28px !important;
  color: var(--orange-500);
}

.ad-popular { display: grid; gap: 0.45rem; }

.ad-popular__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
  transition: background 160ms ease, border-color 160ms ease;
}

.ad-popular__item:hover {
  background: #fff8f1;
  border-color: rgba(255,107,0,0.22);
}

.ad-popular__rank {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ad-popular__meta {
  min-width: 0;
  flex: 1;
}

.ad-popular__meta strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-popular__meta small {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.74rem;
}

.ad-popular__meta svg {
  width: 12px !important;
  height: 12px !important;
  color: var(--orange-600);
}

.ad-popular__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.ad-popular__stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ad-popular__stats svg {
  width: 12px !important;
  height: 12px !important;
  color: #3b68b7;
}

@media (max-width: 1279px) {
  .ad-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .ad-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-charts { grid-template-columns: 1fr; }
  .ad-main { grid-template-columns: 1fr; }
}

@media (max-width: 639px) {
  .ad-kpi-grid,
  .ad-quick__grid { grid-template-columns: 1fr; }
  .ad-dash__title { font-size: 1.35rem; }
  .ad-kpi__value { font-size: 1.35rem; }
}

/* ===== Guest / Login shell ===== */
.guest-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 107, 0, 0.34), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(59, 104, 183, 0.32), transparent 32%),
    radial-gradient(circle at 70% 88%, rgba(255, 138, 0, 0.18), transparent 36%),
    linear-gradient(150deg, #061A40 0%, #071F4A 48%, #0A2F6B 100%);
}

.guest-shell__grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}

.guest-shell__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  opacity: 0.55;
  animation: guestFloat 10s ease-in-out infinite;
}

.guest-shell__orb--a {
  width: 220px;
  height: 220px;
  left: -40px;
  top: 12%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.45), transparent 68%);
}

.guest-shell__orb--b {
  width: 280px;
  height: 280px;
  right: -60px;
  bottom: 8%;
  background: radial-gradient(circle, rgba(59, 104, 183, 0.4), transparent 70%);
  animation-delay: -3s;
}

.guest-shell__orb--c {
  width: 140px;
  height: 140px;
  left: 42%;
  top: 8%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  animation-delay: -6s;
  animation-duration: 12s;
}

@keyframes guestFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -18px, 0) scale(1.05); }
}

.guest-shell__inner {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
}

.guest-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  animation: guestRise 520ms ease both;
}

.guest-brand__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.guest-brand__name {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  color: #fff;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.guest-brand__tag {
  color: #ffb370;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.guest-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 28px 70px rgba(6, 26, 64, 0.35);
  padding: 1.5rem 1.35rem 1.35rem;
  animation: guestRise 620ms 80ms ease both;
}

.guest-shell__copy {
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  margin-top: 1.25rem;
  animation: guestRise 700ms 140ms ease both;
}

.guest-shell__copy a {
  color: #ffb370;
  text-decoration: none;
  font-weight: 700;
}

.guest-shell__copy a:hover { color: #fff; }

@keyframes guestRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-panel__intro { text-align: center; margin-bottom: 1.15rem; }

.login-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.login-panel__eyebrow svg {
  width: 13px !important;
  height: 13px !important;
}

.login-panel__title {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.login-panel__sub {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-demo-cta {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(255, 107, 0, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 0, 0.16), transparent 42%),
    linear-gradient(180deg, #fff8f1, #ffffff);
  cursor: pointer;
  text-align: left;
  font: inherit;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.login-demo-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 0, 0.5);
  box-shadow: 0 12px 28px rgba(255, 107, 0, 0.16);
}

.login-demo-cta__glow {
  position: absolute;
  inset: -40% auto -40% -30%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: loginShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes loginShimmer {
  0%, 100% { left: -30%; opacity: 0; }
  40% { opacity: 0.8; }
  70% { left: 110%; opacity: 0; }
}

.login-demo-cta__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #FF6B00, #FF8A00);
  color: #fff;
}

.login-demo-cta__icon svg {
  width: 18px !important;
  height: 18px !important;
}

.login-demo-cta__text {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.1rem;
}

.login-demo-cta__text strong {
  color: var(--navy-900);
  font-weight: 800;
  font-size: 0.98rem;
}

.login-demo-cta__text small {
  color: #64748b;
  font-size: 0.78rem;
}

.login-demo-cta__arrow {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange-600);
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.login-demo-cta:hover .login-demo-cta__arrow { transform: translateX(3px); }

.login-demo-cta__arrow svg {
  width: 16px !important;
  height: 16px !important;
}

.login-form {
  display: grid;
  gap: 0.9rem;
}

.login-field label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}

.login-field label svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--orange-600);
}

.login-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field__icon {
  position: absolute;
  left: 0.85rem;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
  display: grid;
  place-items: center;
}

.login-field__icon svg {
  width: 16px !important;
  height: 16px !important;
}

.login-field__control input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 0.7rem 2.8rem 0.7rem 2.55rem;
  font: inherit;
  color: var(--navy-900);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-field__control input:focus {
  border-color: rgba(255, 107, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.12);
  transform: translateY(-1px);
}

.login-field__toggle {
  position: absolute;
  right: 0.45rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.login-field__toggle:hover {
  background: #f8fafc;
  color: var(--navy-900);
}

.login-field__toggle svg {
  width: 16px !important;
  height: 16px !important;
}

.login-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
}

.login-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #FF6B00;
}

.login-link {
  color: var(--orange-600);
  font-weight: 700;
  text-decoration: none;
}

.login-link:hover { text-decoration: underline; }

.login-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 107, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(255, 107, 0, 0.34);
}

.login-submit svg {
  width: 18px !important;
  height: 18px !important;
}

.login-panel__foot {
  text-align: center;
  margin: 1.15rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.login-panel__foot a {
  color: var(--orange-600);
  font-weight: 800;
  text-decoration: none;
}

.login-panel__foot a:hover { text-decoration: underline; }

.guest-shell:has(.register-panel) .guest-shell__inner {
  width: min(520px, 100%);
}
.guest-shell:has(.register-panel) {
  align-items: flex-start;
  padding-top: 2rem;
  padding-bottom: 5.5rem;
}
.register-perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: -0.15rem 0 1.15rem;
}
.register-perks span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 800;
}
.register-perks svg {
  width: 12px !important;
  height: 12px !important;
  color: #FF6B00;
}
.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.register-hint {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
}
.register-hint svg {
  width: 13px !important;
  height: 13px !important;
  color: #FF6B00;
  flex-shrink: 0;
}
.login-field label em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 0.15rem;
}
@media (max-width: 520px) {
  .register-grid { grid-template-columns: 1fr; }
}

body.login-demo-lock { overflow: hidden; }

.login-demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 26, 64, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms ease;
}

.login-demo-overlay.is-open { opacity: 1; }

.login-demo-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  pointer-events: none;
}

.login-demo-modal.is-open { pointer-events: auto; }

.login-demo-modal__card {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 70px rgba(6, 26, 64, 0.35);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.login-demo-modal.is-open .login-demo-modal__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.login-demo-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.25rem 0.9rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fff8f1, #fff);
}

.login-demo-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.login-demo-modal__eyebrow svg {
  width: 13px !important;
  height: 13px !important;
}

.login-demo-modal__head h2 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.login-demo-modal__head p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
}

.login-demo-modal__close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy-900);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.login-demo-modal__close svg {
  width: 18px !important;
  height: 18px !important;
}

.login-demo-modal__grid {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.25rem;
}

.login-demo-role { margin: 0; }

.login-demo-modal.is-open .login-demo-role {
  animation: guestRise 420ms ease both;
  animation-delay: var(--delay, 0ms);
}

.login-demo-role__btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 92px;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.login-demo-role__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.login-demo-role[data-tone="blue"] .login-demo-role__btn:hover { border-color: rgba(59, 104, 183, 0.45); }
.login-demo-role[data-tone="orange"] .login-demo-role__btn:hover { border-color: rgba(255, 107, 0, 0.45); }
.login-demo-role[data-tone="navy"] .login-demo-role__btn:hover { border-color: rgba(6, 26, 64, 0.35); }

.login-demo-role__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.login-demo-role[data-tone="blue"] .login-demo-role__icon {
  background: linear-gradient(145deg, #3b68b7, #5b86d0);
}
.login-demo-role[data-tone="orange"] .login-demo-role__icon {
  background: linear-gradient(145deg, #FF6B00, #FF8A00);
}
.login-demo-role[data-tone="navy"] .login-demo-role__icon {
  background: linear-gradient(145deg, #061A40, #0A2F6B);
}

.login-demo-role__icon svg {
  width: 20px !important;
  height: 20px !important;
}

.login-demo-role__meta {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.login-demo-role__role {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--orange-600);
}

.login-demo-role[data-tone="blue"] .login-demo-role__role { color: #3b68b7; }
.login-demo-role[data-tone="navy"] .login-demo-role__role { color: #061A40; }

.login-demo-role__label {
  font-weight: 800;
  color: var(--navy-900);
  font-size: 1rem;
}

.login-demo-role__desc {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.login-demo-role__email {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
}

.login-demo-role__email svg {
  width: 11px !important;
  height: 11px !important;
}

.login-demo-role__go {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange-600);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.login-demo-role[data-tone="blue"] .login-demo-role__go {
  background: rgba(59, 104, 183, 0.1);
  color: #3b68b7;
}
.login-demo-role[data-tone="navy"] .login-demo-role__go {
  background: rgba(6, 26, 64, 0.08);
  color: #061A40;
}

.login-demo-role__go svg {
  width: 14px !important;
  height: 14px !important;
}

.login-demo-modal__hint {
  padding: 0 1.25rem 1.15rem;
  text-align: center;
  color: #64748b;
  font-size: 0.78rem;
}

.login-demo-modal__hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  color: var(--navy-900);
  font-weight: 700;
}

@media (max-width: 520px) {
  .login-demo-role__btn {
    grid-template-columns: auto 1fr;
  }
  .login-demo-role__go {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* ===== Mobile bottom nav ===== */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 0.15rem;
  min-height: 64px;
  padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -8px 28px rgba(6, 26, 64, 0.08);
}

.bottom-nav__item {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 52px;
  padding: 0.35rem 0.2rem;
  color: #64748b;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.bottom-nav__icon svg {
  width: 20px !important;
  height: 20px !important;
}

.bottom-nav__label {
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav__item.active {
  color: var(--orange-600);
}

.bottom-nav__item.active .bottom-nav__icon {
  background: rgba(255, 107, 0, 0.12);
  color: var(--orange-600);
}

.bottom-nav__item--finder {
  position: relative;
  top: -0.55rem;
}

.bottom-nav__finder {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8A00 55%, #FFB000 100%);
  box-shadow: 0 10px 22px rgba(255, 107, 0, 0.35);
  border: 3px solid #fff;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.bottom-nav__finder svg {
  width: 22px !important;
  height: 22px !important;
}

.bottom-nav__item--finder .bottom-nav__label {
  color: var(--orange-600);
  margin-top: 0.1rem;
}

.bottom-nav__item--finder:active .bottom-nav__finder,
.bottom-nav__item--finder:hover .bottom-nav__finder {
  transform: scale(1.05);
  box-shadow: 0 12px 26px rgba(255, 107, 0, 0.42);
}

body.has-bottom-nav .app-main {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  body.has-bottom-nav .app-main { padding-bottom: 1.5rem; }
}

/* ===== Course Finder ===== */
body.cf-lock { overflow: hidden; }

.cf-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.35rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.85rem 1.15rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  pointer-events: auto;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8A00 55%, #FFB000 100%);
  box-shadow: 0 14px 34px rgba(255, 107, 0, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cf-fab__glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(168,85,247,0.25));
  filter: blur(10px);
  opacity: 0;
  z-index: -1;
  transition: opacity 180ms ease;
}

.cf-fab__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.cf-fab__icons svg {
  width: 18px !important;
  height: 18px !important;
}

.cf-fab__tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  white-space: nowrap;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  background: #061A40;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.cf-fab:hover {
  transform: scale(1.04);
  box-shadow: 0 18px 40px rgba(255, 107, 0, 0.45);
}

.cf-fab:hover .cf-fab__glow,
.cf-fab:hover .cf-fab__tip { opacity: 1; }
.cf-fab:hover .cf-fab__tip { transform: translateY(0); }

.cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 26, 64, 0.62);
  backdrop-filter: blur(3px);
  display: none;
  pointer-events: none;
}

.cf-overlay.is-open {
  display: block;
  pointer-events: auto;
}

.cf-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  place-items: center;
  padding: 1rem;
  pointer-events: none;
}

.cf-modal.is-open {
  display: grid;
  pointer-events: auto;
}

.cf-modal.hidden,
.cf-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
}

.cf-modal__card {
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(6, 26, 64, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}

.cf-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 0.75rem;
}

.cf-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.cf-modal__eyebrow svg { width: 14px !important; height: 14px !important; }

.cf-modal__head h2 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy-900);
}

.cf-modal__head p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.cf-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cf-modal__close svg { width: 18px !important; height: 18px !important; }

.cf-progress { padding: 0 1.35rem 0.75rem; }

.cf-progress__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.cf-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.cf-progress__bar span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b68b7, #7c3aed, #FF6B00);
  transition: width 200ms ease;
}

.cf-steps { padding: 0.25rem 1.35rem 1rem; }

.cf-step h3 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
}

.cf-step__hint {
  margin: 0.25rem 0 0.9rem;
  color: #94a3b8;
  font-size: 0.84rem;
}

.cf-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.cf-options--level { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cf-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 56px;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cf-option:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  border-color: rgba(255, 107, 0, 0.35);
}

.cf-option.is-selected {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #3b68b7, #7c3aed, #FF6B00) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.12);
}

.cf-option__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(59,104,183,0.12), rgba(255,107,0,0.12));
  color: var(--orange-600);
  flex-shrink: 0;
}

.cf-option__icon svg { width: 18px !important; height: 18px !important; }

.cf-option__label {
  display: block;
  font-weight: 750;
  color: var(--navy-900);
  font-size: 0.88rem;
  line-height: 1.25;
}

.cf-option__desc {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.75rem;
}

.cf-option__check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
}

.cf-option.is-selected .cf-option__check {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  border-color: transparent;
  color: #fff;
}

.cf-option__check svg { width: 13px !important; height: 13px !important; }

.cf-modal__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.35rem 1.25rem;
  border-top: 1px solid #eef2f7;
}

.cf-btn,
.cf-btn-soft,
.cf-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  border-radius: 999px;
  font: inherit;
  font-weight: 750;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  border: 0;
}

.cf-btn { padding: 0.7rem 1.2rem; }
.cf-btn--ghost { background: #f1f5f9; color: #334155; }
.cf-btn--ghost:disabled { opacity: 0.45; cursor: not-allowed; }
.cf-btn--primary {
  background: linear-gradient(135deg, #FF6B00, #FF8A00);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,0,0.25);
}

.cf-btn-soft {
  padding: 0.65rem 1rem;
  background: rgba(255,107,0,0.08);
  color: var(--orange-600);
  border: 1px solid rgba(255,107,0,0.2);
}

.cf-icon-btn {
  width: 44px;
  padding: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--navy-900);
}

.cf-icon-btn svg { width: 16px !important; height: 16px !important; }

.cf-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.cf-loading__ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  border: 4px solid #ffe4cc;
  border-top-color: #FF6B00;
  animation: cf-spin 0.8s linear infinite;
}

@keyframes cf-spin { to { transform: rotate(360deg); } }

.cf-loading strong {
  display: block;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.15rem;
  color: var(--navy-900);
}

.cf-loading p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.cf-result__hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(124,58,237,0.12), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255,107,0,0.12), transparent 42%),
    #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.cf-result__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--orange-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cf-result__hero h1 {
  margin: 0.35rem 0 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy-900);
}

.cf-result__hero p {
  margin: 0.35rem 0 0;
  color: #64748b;
  max-width: 42rem;
}

.cf-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cf-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.cf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 750;
}

.cf-chip svg { width: 13px !important; height: 13px !important; }
.cf-chip--accent { background: #ffedd5; color: #c2410c; }

.cf-reco-list { display: grid; gap: 0.9rem; }

.cf-reco-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.cf-reco-card__media {
  position: relative;
  background: #0b1f45;
  min-height: 180px;
}

.cf-reco-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cf-match {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background:
    radial-gradient(closest-side, #fff 78%, transparent 80% 100%),
    conic-gradient(#FF6B00 calc(var(--p) * 1%), #e2e8f0 0);
  color: var(--navy-900);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.cf-match strong {
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 0.95rem;
  line-height: 1;
}

.cf-match span {
  font-size: 0.58rem;
  font-weight: 800;
  color: #64748b;
}

.cf-reco-card__body { padding: 1.05rem 1.15rem; }

.cf-reco-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.cf-reco-card__body h3 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
}

.cf-reco-card__instructor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
}

.cf-reco-card__instructor svg { width: 14px !important; height: 14px !important; color: var(--orange-600); }
.cf-stars { display: inline-flex; align-items: center; gap: 0.2rem; color: #c2410c; }
.cf-stars svg { width: 13px !important; height: 13px !important; }

.cf-reasons {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.cf-reasons li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.84rem;
}

.cf-reasons svg {
  width: 14px !important;
  height: 14px !important;
  color: #059669;
  margin-top: 0.15rem;
}

.cf-reco-card__flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.cf-reco-card__flags span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
}

.cf-reco-card__flags svg { width: 13px !important; height: 13px !important; }
.cf-price { margin-left: auto; color: var(--orange-600); font-size: 1rem; }

.cf-reco-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
  align-items: center;
}

.cf-path, .cf-because {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
}

.cf-path__head h2,
.cf-because h2,
.cf-mypath h1 {
  margin: 0;
  font-family: Manrope, "IBM Plex Sans Thai", sans-serif;
  font-weight: 800;
  color: var(--navy-900);
}

.cf-path__head p { margin: 0.3rem 0 0.9rem; color: #64748b; font-size: 0.9rem; }

.cf-path__track { display: grid; gap: 0.45rem; }

.cf-path__arrow {
  display: grid;
  place-items: center;
  color: var(--orange-600);
}

.cf-path__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.cf-path__item.is-current {
  background: rgba(255,107,0,0.06);
  border-color: rgba(255,107,0,0.25);
}

.cf-path__index {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b68b7, #7c3aed);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.cf-path__meta {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.cf-because__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.cf-because__card {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cf-because__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.cf-because__card strong {
  color: var(--navy-900);
  font-size: 0.9rem;
}

.cf-because__card span {
  color: var(--orange-600);
  font-size: 0.78rem;
  font-weight: 800;
}

.cf-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.cf-empty svg {
  width: 36px !important;
  height: 36px !important;
  color: var(--orange-500);
  margin-bottom: 0.4rem;
}

.cf-empty strong {
  display: block;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

@media (max-width: 1023px) {
  .cf-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-reco-card { grid-template-columns: 160px minmax(0, 1fr); }
  .cf-because__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  /* On mobile, Course Finder lives in bottom nav — hide floating CTA */
  .cf-fab { display: none !important; }
}

@media (max-width: 639px) {
  .cf-options,
  .cf-options--level,
  .cf-because__grid { grid-template-columns: 1fr; }
  .cf-reco-card { grid-template-columns: 1fr; }
  .cf-reco-card__media { aspect-ratio: 16 / 10; }
  .cf-modal__head h2 { font-size: 1.2rem; }
  .bottom-nav__label { font-size: 0.62rem; }
}

/* LINE Flex receipt after purchase */
.line-flex {
  max-width: 420px;
  margin: 0 auto 1.75rem;
}
.line-flex__bubble {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(6, 26, 64, 0.14);
  border: 1px solid #e8eef6;
}
.line-flex__header {
  background: linear-gradient(160deg, #061A40 0%, #0B3A7A 100%);
  color: #fff;
  padding: 1.25rem 1.35rem 1.15rem;
}
.line-flex__brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #FF6B00;
  font-size: 0.78rem;
}
.line-flex__brand small {
  color: #94A3B8;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.line-flex__header h2 {
  margin: 0.55rem 0 0.25rem;
  font-size: 1.55rem;
  font-weight: 800;
}
.line-flex__header p {
  margin: 0;
  color: #CBD5E1;
  font-size: 0.92rem;
}
.line-flex__body { padding: 1.2rem 1.35rem 0.4rem; }
.line-flex__course {
  font-weight: 800;
  color: #061A40;
  font-size: 1.1rem;
  line-height: 1.4;
}
.line-flex__meta {
  margin: 1rem 0 0;
}
.line-flex__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}
.line-flex__meta dt { color: #94A3B8; }
.line-flex__meta dd { margin: 0; font-weight: 700; color: #061A40; text-align: right; }
.line-flex__hint {
  margin: 1rem 0 0;
  color: #64748B;
  font-size: 0.86rem;
  line-height: 1.55;
}
.line-flex__footer {
  padding: 1rem 1.2rem 1.2rem;
  display: grid;
  gap: 0.55rem;
}
.line-flex__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.line-flex__btn--line {
  background: #06C755;
  color: #fff;
}
.line-flex__btn--learn {
  background: #FF6B00;
  color: #fff;
}
.line-flex__btn:hover { filter: brightness(1.05); color: #fff; }
