/* ==================== Adsngam.com — Cream Light Theme ==================== */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #FEEFDD;
  color: #201E1F;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  background-image:
    radial-gradient(ellipse 800px 600px at 10% -10%, rgba(255, 64, 0, 0.10), transparent 50%),
    radial-gradient(ellipse 600px 500px at 90% 10%, rgba(80, 178, 192, 0.12), transparent 50%),
    radial-gradient(ellipse 700px 500px at 50% 100%, rgba(250, 170, 141, 0.18), transparent 50%);
  background-attachment: fixed;
}

/* Display headings */
.font-display {
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* ==================== Scroll Reveal Animations ==================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-reveal-delay="50"] { transition-delay: 50ms; }
.reveal[data-reveal-delay="100"] { transition-delay: 100ms; }
.reveal[data-reveal-delay="150"] { transition-delay: 150ms; }
.reveal[data-reveal-delay="200"] { transition-delay: 200ms; }
.reveal[data-reveal-delay="300"] { transition-delay: 300ms; }

/* ==================== Hover animations for buttons ==================== */
/* Primary CTA buttons get a subtle lift + soft shadow on hover */
.btn-hover {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease;
  will-change: transform;
}

.btn-hover:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 12px 28px -10px rgba(255, 64, 0, 0.4);
}

.btn-hover:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

/* Arrow inside button slides forward on hover */
.btn-hover svg {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-hover:hover svg {
  transform: translateX(3px);
}

/* Ghost / secondary buttons — subtle border + background tint */
.btn-ghost {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease,
              border-color 0.2s ease;
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background-color: rgba(32, 30, 31, 0.04);
  border-color: rgba(255, 64, 0, 0.4);
}

.btn-ghost:active {
  transform: translateY(0);
}

/* Card hover lift — applies via .group hover */
.card-hover {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(250, 170, 141, 0.45);
  border-color: rgba(255, 64, 0, 0.4);
}

/* Nav link hover */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #FF4000;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Logo gentle pulse on hover */
.logo-hover {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-hover:hover {
  transform: scale(1.05);
}

/* ==================== Reduced motion ==================== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible,
  .btn-hover,
  .btn-ghost,
  .card-hover,
  .nav-link::after,
  .logo-hover {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== Custom scrollbar (light) ==================== */
@media (min-width: 1024px) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: #FEEFDD;
  }
  ::-webkit-scrollbar-thumb {
    background: #F2C5A5;
    border-radius: 10px;
    border: 2px solid #FEEFDD;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #FAAA8D;
  }
}

/* ==================== Selection ==================== */
::selection {
  background: rgba(255, 64, 0, 0.25);
  color: #201E1F;
}

/* ==================== Focus styles ==================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #FF4000;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ==================== Pulse animation ==================== */
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse {
  animation: softPulse 2s ease-in-out infinite;
}

/* ==================== Subtle paper texture (optional grain) ==================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

/* ==================== Login (Session 7) ==================== */

/* Card fade-in on load */
@keyframes authFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card {
  animation: authFadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 24px 60px -20px rgba(250, 170, 141, 0.45),
              0 8px 20px -10px rgba(255, 64, 0, 0.12);
}

/* Form input — pill style with focus ring */
.auth-input {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 15px;
  color: #201E1F;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input::placeholder {
  color: #B8AFA6;
}

.auth-input.is-error {
  border-color: #FF4000 !important;
  background-color: rgba(255, 64, 0, 0.04);
}

.auth-input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.18) !important;
}

/* Show/hide password eye button */
.password-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background-color: rgba(255, 64, 0, 0.06);
}

/* Inline error message */
.auth-error-msg {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============ Google button (official branding) ============ */
.google-btn {
  height: 48px;
  background-color: #FFFFFF;
  color: #3C4043;
  border: 1px solid #DADCE0;
  border-radius: 9999px;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
  position: relative;
}

.google-btn:hover {
  background-color: #F8F9FA;
  border-color: #C0C4C8;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.16), 0 4px 12px -4px rgba(60, 64, 67, 0.12);
}

.google-btn:active {
  transform: scale(0.985);
  background-color: #F1F3F4;
}

.google-btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.google-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.google-btn.is-loading .google-btn-icon {
  display: none;
}

.google-btn.is-loading .google-btn-text::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -3px;
  border: 2px solid #DADCE0;
  border-top-color: #3C4043;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

.google-btn.is-loading .google-btn-text {
  font-size: 14px;
}

/* ============ Spinner (used in submit button + Google btn) ============ */
@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(254, 239, 221, 0.4);
  border-top-color: #FEEFDD;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

/* ============ Toast notifications ============ */
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#toastRoot {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

.toast {
  background-color: #5BA85A;
  color: #FEEFDD;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 12px 28px -10px rgba(91, 168, 90, 0.45),
              0 4px 12px -4px rgba(0, 0, 0, 0.08);
  animation: toastSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-error {
  background-color: #FF4000;
  box-shadow: 0 12px 28px -10px rgba(255, 64, 0, 0.45),
              0 4px 12px -4px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  #toastRoot {
    top: 16px;
    left: 16px;
    right: 16px;
    align-items: stretch;
  }
  .toast {
    text-align: center;
    white-space: normal;
  }
}

/* Reduced motion respect (extend existing rule) */
@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .toast,
  .google-btn.is-loading .google-btn-text::before,
  .spinner {
    animation: none !important;
  }
  .google-btn:hover,
  .google-btn:active {
    transform: none !important;
  }
}

/* ==================== Account page (Session 8a) ==================== */

/* ---- Layout: sidebar + main ---- */
.account-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .account-shell {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
  }
}

/* ---- Sidebar ---- */
.account-sidebar {
  position: sticky;
  top: 88px;
}

@media (max-width: 1023px) {
  .account-sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
}

/* ---- Sidebar nav ---- */
.account-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.account-nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .account-nav {
    flex-direction: column;
    overflow-x: visible;
  }
}

/* ---- Nav item base ---- */
.account-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 14px;
  color: #4A4548;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.account-nav-item:hover {
  background-color: rgba(255, 64, 0, 0.06);
  color: #201E1F;
}

/* Active state — desktop: left border accent + tint; mobile: solid pill */
@media (min-width: 1024px) {
  .account-nav-item.is-active {
    background-color: rgba(255, 64, 0, 0.1);
    color: #FF4000;
    box-shadow: inset 3px 0 0 #FF4000;
    font-weight: 600;
  }
}

@media (max-width: 1023px) {
  .account-nav-item.is-active {
    background-color: #FF4000;
    color: #FEEFDD;
    font-weight: 600;
  }
}

/* ---- Tab content area ---- */
.account-tab-content[hidden] {
  display: none;
}

/* ---- Confirm modal ---- */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(32, 30, 31, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}

.confirm-modal-backdrop.hidden {
  display: none;
}

.confirm-modal {
  background-color: #FFFFFF;
  border-radius: 24px;
  padding: 28px;
  padding-top: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px -20px rgba(32, 30, 31, 0.4);
  animation: modalScaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

/* Modal close X button — góc trên phải. Tránh click backdrop để đóng nhầm
   (vd verify mail modal, mất state phải re-send). */
.modal-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(254, 239, 221, 0.85);
  color: #4A4548;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #F2C5A5;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
  line-height: 1;
  padding: 0;
  z-index: 1;
}
.modal-close-x:hover {
  background: #FAAA8D;
  color: #201E1F;
  transform: scale(1.08);
}
.modal-close-x:focus-visible {
  outline: 2px solid #FF4000;
  outline-offset: 2px;
}

/* ---- Password strength bar ---- */
.password-strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength-bar .seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background-color: #F8DBC0;
  transition: background-color 0.2s ease;
}

.password-strength-bar.is-weak .seg:nth-child(1) {
  background-color: #FF4000;
}

.password-strength-bar.is-medium .seg:nth-child(-n+2) {
  background-color: #FAAA8D;
}

.password-strength-bar.is-strong .seg {
  background-color: #5BA85A;
}

.password-strength-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.password-strength-label.is-weak { color: #FF4000; }
.password-strength-label.is-medium { color: #FAAA8D; }
.password-strength-label.is-strong { color: #5BA85A; }

/* ---- User dropdown (navbar logged-in state) ---- */
.user-nav-dropdown {
  min-width: 200px;
  z-index: 60;
  border: 1px solid #F8DBC0;
  box-shadow: 0 12px 32px -12px rgba(32, 30, 31, 0.18);
  animation: modalScaleIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-nav-dropdown a,
.user-nav-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4A4548;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.user-nav-dropdown a:hover,
.user-nav-dropdown button:hover {
  background-color: rgba(255, 64, 0, 0.08);
  color: #201E1F;
}

.user-nav-dropdown hr {
  border: 0;
  border-top: 1px solid #F8DBC0;
  margin: 6px 4px;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .confirm-modal-backdrop,
  .confirm-modal,
  .user-nav-dropdown {
    animation: none !important;
  }
}

/* ==================== Account page Tabs (Session 8b) ==================== */

/* ---- Order filter pills ---- */
.order-filter button {
  padding: 8px 16px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #F2C5A5;
  color: #4A4548;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.order-filter button:hover {
  border-color: #FF4000;
  color: #201E1F;
}

.order-filter button.is-active {
  background-color: #201E1F;
  color: #FEEFDD;
  border-color: #201E1F;
}

/* ---- Order card ---- */
.order-card {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 20px;
  padding: 18px 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.order-card:hover {
  border-color: #F2C5A5;
  box-shadow: 0 8px 24px -12px rgba(250, 170, 141, 0.4);
}

.order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F8DBC0;
  margin-bottom: 4px;
}

/* ---- Order status badge (3 variants) ---- */
.order-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.order-status-badge.is-completed {
  background-color: rgba(91, 168, 90, 0.15);
  color: #3F7E3F;
}

.order-status-badge.is-processing {
  background-color: rgba(250, 170, 141, 0.25);
  color: #B25E3E;
}

.order-status-badge.is-cancelled {
  background-color: rgba(142, 133, 136, 0.15);
  color: #6B6366;
}

/* ---- Course mini card ---- */
.course-mini-card {
  background-color: #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.course-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(250, 170, 141, 0.5);
}

.course-mini-cover {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.course-mini-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.08) 100%);
}

.course-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #F8DBC0;
  border-radius: 9999px;
  overflow: hidden;
}

.course-progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #FF4000 0%, #FAAA8D 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ---- Settings row ---- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #F8DBC0;
}

.settings-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-row:first-of-type {
  padding-top: 0;
}

.settings-row-label {
  flex: 1;
  min-width: 0;
}

/* ---- Toggle switch (iOS-style) ---- */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-switch-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #F2C5A5;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

.toggle-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.toggle-switch input[type="checkbox"]:checked ~ .toggle-switch-track {
  background-color: #FF4000;
}

.toggle-switch input[type="checkbox"]:checked ~ .toggle-switch-track .toggle-switch-thumb {
  transform: translateX(20px);
}

.toggle-switch input[type="checkbox"]:focus-visible ~ .toggle-switch-track {
  outline: 2px solid #FF4000;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .order-card,
  .course-mini-card,
  .course-progress-bar > div,
  .toggle-switch-track,
  .toggle-switch-thumb {
    transition: none !important;
  }
}

/* ==================== Learn portal (Session 9a) ==================== */

/* ---- Layout: sidebar + main ---- */
.learn-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .learn-shell {
    flex-direction: row;
    gap: 28px;
    align-items: flex-start;
  }
}

.learn-sidebar {
  position: sticky;
  top: 88px;
}

@media (max-width: 1023px) {
  .learn-sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
}

/* ---- Sidebar user mini card ---- */
.learn-user-card {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

@media (max-width: 1023px) {
  .learn-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
  }
  .learn-user-card img {
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }
}

/* ---- Sidebar courses list ---- */
.learn-sidebar-course-card {
  display: block;
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  min-width: 200px;
}

.learn-sidebar-course-card:hover {
  border-color: #F2C5A5;
  background-color: #FEEFDD;
}

.learn-sidebar-course-card.is-active {
  border: 2px solid #FF4000;
  background-color: rgba(255, 64, 0, 0.05);
  padding: 11px 13px; /* compensate border-2 width */
}

/* ---- Progress bar mini (sidebar + continue card) ---- */
.learn-progress-mini {
  width: 100%;
  height: 4px;
  background-color: #F8DBC0;
  border-radius: 9999px;
  overflow: hidden;
}

.learn-progress-mini > div {
  height: 100%;
  background: linear-gradient(90deg, #FF4000 0%, #FAAA8D 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ---- Dashboard sections ---- */
.learn-welcome {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.08) 0%, rgba(250, 170, 141, 0.1) 50%, #FEEFDD 100%);
  border: 1px solid #F8DBC0;
  border-radius: 24px;
  padding: 24px 28px;
}

.learn-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 13px;
  color: #4A4548;
  box-shadow: 0 2px 6px -2px rgba(255, 64, 0, 0.15);
}

.learn-continue-card {
  background-color: #FFFFFF;
  border: 2px solid rgba(255, 64, 0, 0.3);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 32px -16px rgba(255, 64, 0, 0.2);
}

.learn-stat-card {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learn-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -10px rgba(250, 170, 141, 0.45);
}

.learn-section-heading {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #201E1F;
  margin-bottom: 14px;
  margin-top: 32px;
  letter-spacing: -0.01em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .learn-sidebar-course-card,
  .learn-stat-card,
  .learn-progress-mini > div {
    transition: none !important;
  }
  .learn-stat-card:hover {
    transform: none !important;
  }
}

/* ==================== Course detail + Lesson player (Session 9b) ==================== */

/* ---- Breadcrumb ---- */
.learn-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8E8588;
  margin-bottom: 16px;
}

.learn-breadcrumb a {
  color: #4A4548;
  transition: color 0.15s ease;
}

.learn-breadcrumb a:hover {
  color: #FF4000;
}

.learn-breadcrumb .sep {
  color: #C0B5A8;
}

.learn-breadcrumb .current {
  color: #201E1F;
  font-weight: 600;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Course header ---- */
.course-header {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 24px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

/* ---- Course tabs (Curriculum / Notes) ---- */
.course-tabs {
  display: inline-flex;
  gap: 4px;
  background-color: #FCE0CE;
  padding: 4px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.course-tab-btn {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #4A4548;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.course-tab-btn:hover:not(.is-active) {
  color: #201E1F;
}

.course-tab-btn.is-active {
  background-color: #FFFFFF;
  color: #FF4000;
  box-shadow: 0 1px 3px rgba(255, 64, 0, 0.15);
}

.course-tab-content[hidden] {
  display: none;
}

/* ---- Module accordion ---- */
.module-accordion {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
}

.module-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  background-color: #FFFFFF;
  border: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.2s ease;
}

.module-accordion-header:hover {
  background-color: #FEEFDD;
}

.module-accordion-header .chevron {
  transition: transform 0.2s ease;
  color: #8E8588;
  flex-shrink: 0;
}

.module-accordion[data-expanded="true"] .module-accordion-header .chevron {
  transform: rotate(90deg);
}

.module-accordion[data-expanded="true"] .module-accordion-header {
  background-color: #FEEFDD;
}

.module-accordion-body {
  border-top: 1px solid #F8DBC0;
  padding: 4px 0;
}

.module-accordion[data-expanded="false"] .module-accordion-body {
  display: none;
}

/* ---- Lesson row (3 status variants) ---- */
.lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 14px;
  color: #4A4548;
  cursor: pointer;
  border-left: 3px solid transparent;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lesson-row:hover {
  background-color: rgba(255, 64, 0, 0.04);
}

.lesson-row .lesson-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  background-color: #F2C5A5;
  color: #FFFFFF;
  font-weight: 700;
}

.lesson-row .lesson-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-row .lesson-duration {
  font-size: 11px;
  color: #8E8588;
  flex-shrink: 0;
}

.lesson-row.is-completed .lesson-icon {
  background-color: #5BA85A;
  color: #FEEFDD;
}

.lesson-row.is-completed .lesson-name {
  color: #8E8588;
  text-decoration: line-through;
  text-decoration-color: rgba(91, 168, 90, 0.4);
}

.lesson-row.is-current {
  background-color: rgba(255, 64, 0, 0.08);
  border-left-color: #FF4000;
}

.lesson-row.is-current .lesson-icon {
  background-color: #FF4000;
  color: #FEEFDD;
}

.lesson-row.is-current .lesson-name {
  color: #201E1F;
  font-weight: 600;
}

/* ---- Notes textarea ---- */
.course-notes-textarea {
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border-radius: 16px;
  background-color: #FFFFFF;
  border: 2px solid #F2C5A5;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 14px;
  color: #201E1F;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-notes-textarea:focus {
  border-color: #FF4000;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.18);
}

.course-notes-textarea::placeholder {
  color: #B8AFA6;
}

.course-notes-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: #8E8588;
}

/* ---- Video placeholder (16:9) ---- */
.video-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #201E1F 0%, #4A4548 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  cursor: pointer;
}

.video-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,64,0,0.2) 0%, transparent 60%);
}

.video-placeholder .play-icon {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #FF4000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FEEFDD;
  box-shadow: 0 8px 24px -8px rgba(255, 64, 0, 0.6);
  transition: transform 0.2s ease;
}

.video-placeholder:hover .play-icon {
  transform: scale(1.08);
}

.video-placeholder .placeholder-caption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  font-size: 11px;
  color: rgba(254, 239, 221, 0.7);
  font-weight: 500;
}

/* ---- Lesson nav footer (Prev / Mark complete / Next) ---- */
.lesson-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 20px;
  margin-top: 20px;
}

@media (min-width: 640px) {
  .lesson-nav-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.lesson-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #4A4548;
  background-color: #FEEFDD;
  border: 1px solid #F2C5A5;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.lesson-nav-btn:hover:not(:disabled) {
  background-color: #FCE0CE;
  color: #201E1F;
  transform: translateY(-1px);
}

.lesson-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .module-accordion-header .chevron,
  .lesson-row,
  .video-placeholder .play-icon,
  .lesson-nav-btn,
  .course-notes-textarea {
    transition: none !important;
  }
  .video-placeholder:hover .play-icon,
  .lesson-nav-btn:hover {
    transform: none !important;
  }
}

/* ==================== Blog page (Session 10) ==================== */

/* ---- Featured post hero ---- */
.blog-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  box-shadow: 0 16px 40px -20px rgba(250, 170, 141, 0.4);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px -24px rgba(255, 64, 0, 0.3);
}

@media (min-width: 768px) {
  .blog-hero {
    grid-template-columns: 5fr 4fr;
  }
}

.blog-hero-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.1) 100%);
}

.blog-hero-cover .emoji {
  font-size: 7rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2));
  position: relative;
  z-index: 1;
}

.blog-hero-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .blog-hero-body {
    padding: 40px;
  }
}

/* ---- Category pills (filter) ---- */
.blog-category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.blog-category-pills::-webkit-scrollbar { display: none; }

.blog-category-pills button {
  padding: 8px 16px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #F2C5A5;
  color: #4A4548;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.blog-category-pills button:hover:not(.is-active) {
  border-color: #FF4000;
  color: #201E1F;
}

.blog-category-pills button.is-active {
  background-color: #201E1F;
  color: #FEEFDD;
  border-color: #201E1F;
}

/* ---- Search input ---- */
.blog-search-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #F2C5A5;
  font-family: inherit;
  font-size: 14px;
  color: #201E1F;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-search-input:focus {
  border-color: #FF4000;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.15);
}

.blog-search-input::placeholder {
  color: #B8AFA6;
}

@media (min-width: 640px) {
  .blog-search-input {
    width: 240px;
  }
}

/* ---- Blog post card ---- */
.blog-card {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 64, 0, 0.3);
  box-shadow: 0 16px 32px -16px rgba(250, 170, 141, 0.5);
}

.blog-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.08) 100%);
}

.blog-card-cover .emoji {
  font-size: 4rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18));
  position: relative;
  z-index: 1;
}

.blog-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-category-mini {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background-color: rgba(255, 64, 0, 0.1);
  color: #FF4000;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  align-self: flex-start;
}

.blog-card-title {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #201E1F;
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 13px;
  color: #4A4548;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8E8588;
  padding-top: 10px;
  border-top: 1px solid #F8DBC0;
}

.blog-card-meta .sep { color: #C0B5A8; }

/* ---- Sidebar widget ---- */
.sidebar-widget {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 22px;
  padding: 20px;
}

.sidebar-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F8DBC0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.sidebar-popular-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar-popular-item:first-child {
  padding-top: 0;
}

.sidebar-popular-item:hover {
  opacity: 0.7;
}

.sidebar-popular-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-popular-info {
  flex: 1;
  min-width: 0;
}

.sidebar-popular-info .title {
  font-size: 13px;
  font-weight: 600;
  color: #201E1F;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-popular-info .meta {
  font-size: 11px;
  color: #8E8588;
}

/* ---- Post detail modal ---- */
.post-detail-modal {
  background-color: #FFFFFF;
  border-radius: 28px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalScaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
}

.post-detail-modal::-webkit-scrollbar { width: 8px; }
.post-detail-modal::-webkit-scrollbar-thumb { background: #F2C5A5; border-radius: 4px; }
.post-detail-modal::-webkit-scrollbar-track { background: transparent; }

.post-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #F2C5A5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #4A4548;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.post-detail-close:hover {
  background-color: #FF4000;
  color: #FEEFDD;
  border-color: #FF4000;
}

.post-detail-cover {
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-detail-cover .emoji {
  font-size: 5rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
}

.post-detail-body {
  padding: 28px;
}

@media (min-width: 640px) {
  .post-detail-body { padding: 36px; }
}

.post-detail-content p {
  font-size: 15px;
  color: #4A4548;
  line-height: 1.7;
  margin-bottom: 14px;
}

.post-detail-content p:last-child { margin-bottom: 0; }

.post-detail-content strong {
  color: #201E1F;
  font-weight: 700;
}

.post-detail-content em {
  color: #8E8588;
  font-style: italic;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blog-hero,
  .blog-card,
  .post-detail-modal,
  .blog-search-input,
  .post-detail-close {
    transition: none !important;
    animation: none !important;
  }
  .blog-hero:hover,
  .blog-card:hover {
    transform: none !important;
  }
}

/* ==================== Admin (Session 12a) ==================== */

/* ---- Demo banner (fixed below navbar) ---- */
.admin-banner-demo {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 40;
  background-color: rgba(80, 178, 192, 0.12);
  border-bottom: 1px solid rgba(80, 178, 192, 0.35);
  color: #201E1F;
  padding: 10px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.admin-banner-demo .banner-msg {
  flex: 1 1 auto;
  max-width: 980px;
}

.admin-banner-demo .banner-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(80, 178, 192, 0.18);
  color: #201E1F;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background-color 0.2s ease;
}

.admin-banner-demo .banner-close:hover {
  background: rgba(80, 178, 192, 0.32);
}

.admin-banner-demo.hidden {
  display: none;
}

/* Body padding adjust khi banner active — main content cần đẩy xuống */
body.has-admin-banner {
  padding-top: 44px;
}

@media (max-width: 640px) {
  .admin-banner-demo {
    font-size: 12px;
    padding: 8px 14px;
  }
  body.has-admin-banner {
    padding-top: 56px;
  }
}

/* ---- Shell layout (reuses account-shell pattern) ---- */
.admin-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .admin-shell {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
  }
}

/* ---- Sidebar ---- */
.admin-sidebar {
  position: sticky;
  top: 132px;
}

@media (max-width: 1023px) {
  .admin-sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
}

/* ---- Sidebar nav (extends .account-nav pattern) ---- */
.admin-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.admin-nav::-webkit-scrollbar { display: none; }

@media (min-width: 1024px) {
  .admin-nav {
    flex-direction: column;
    overflow-x: visible;
  }
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 14px;
  color: #4A4548;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-nav-item:hover {
  background-color: rgba(255, 64, 0, 0.06);
  color: #201E1F;
}

@media (min-width: 1024px) {
  .admin-nav-item.is-active {
    background-color: rgba(255, 64, 0, 0.1);
    color: #FF4000;
    box-shadow: inset 3px 0 0 #FF4000;
    font-weight: 600;
  }
}

@media (max-width: 1023px) {
  .admin-nav-item.is-active {
    background-color: #FF4000;
    color: #FEEFDD;
    font-weight: 600;
  }
}

/* Disabled state (for S12b tabs) */
.admin-nav-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.admin-nav-item .item-soon-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(80, 178, 192, 0.18);
  color: #50B2C0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- Sidebar profile mini ---- */
.admin-profile-mini {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-profile-mini .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #FAAA8D;
  flex-shrink: 0;
}

.admin-profile-mini .info {
  min-width: 0;
  flex: 1;
}

.admin-profile-mini .name {
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Tab content ---- */
.admin-tab-content[hidden] { display: none; }

/* ---- Role badges ---- */
.admin-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  letter-spacing: 0.02em;
}

.admin-role-badge.is-admin {
  background-color: rgba(255, 64, 0, 0.12);
  color: #FF4000;
  border-color: rgba(255, 64, 0, 0.3);
}

.admin-role-badge.is-editor {
  background-color: rgba(80, 178, 192, 0.12);
  color: #2d8e9c;
  border-color: rgba(80, 178, 192, 0.35);
}

.admin-role-badge.is-viewer {
  background-color: rgba(142, 133, 136, 0.1);
  color: #4A4548;
  border-color: rgba(142, 133, 136, 0.25);
}

/* S12.1: 4-role refactor — viewer split into thành viên (peach) + học viên (success green) */
.admin-role-badge.is-thanh-vien {
  background-color: rgba(250, 170, 141, 0.18);
  color: #c25e3c;
  border-color: rgba(250, 170, 141, 0.4);
}

.admin-role-badge.is-hoc-vien {
  background-color: rgba(91, 168, 90, 0.14);
  color: #4d9b4d;
  border-color: rgba(91, 168, 90, 0.3);
}

/* ---- Status badges ---- */
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.admin-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.admin-status-badge.is-active {
  background-color: rgba(91, 168, 90, 0.14);
  color: #4d9b4d;
}

.admin-status-badge.is-suspended {
  background-color: rgba(255, 64, 0, 0.12);
  color: #FF4000;
}

/* ---- Stat card (Dashboard) ---- */
.admin-stat-card {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 24px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -18px rgba(250, 170, 141, 0.4);
}

.admin-stat-card .icon-tile {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}

.admin-stat-card .stat-number {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: #201E1F;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.admin-stat-card .stat-label {
  font-size: 13px;
  color: #8E8588;
  margin-top: 4px;
  font-weight: 500;
}

.admin-stat-card .stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(91, 168, 90, 0.14);
  color: #4d9b4d;
}

.admin-stat-card .stat-trend.is-warn {
  background: rgba(255, 64, 0, 0.12);
  color: #FF4000;
}

/* ---- Data table ---- */
.admin-data-table-wrap {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 20px;
  overflow: hidden;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-data-table thead th {
  background: #FCE0CE;
  color: #4A4548;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #F2C5A5;
  white-space: nowrap;
}

.admin-data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #F8DBC0;
  vertical-align: middle;
}

.admin-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-data-table tbody tr {
  transition: background-color 0.15s ease;
}

.admin-data-table tbody tr:hover {
  background-color: #FEEFDD;
}

.admin-data-table .user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-data-table .user-cell img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #F2C5A5;
  flex-shrink: 0;
}

.admin-data-table .user-cell .name {
  font-weight: 600;
  color: #201E1F;
}

.admin-data-table .actions-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* Mobile: convert table → card stack dưới 768px */
@media (max-width: 767px) {
  .admin-data-table thead {
    display: none;
  }
  .admin-data-table,
  .admin-data-table tbody,
  .admin-data-table tr,
  .admin-data-table td {
    display: block;
    width: 100%;
  }
  .admin-data-table tr {
    background: #FFFFFF;
    border: 1px solid #F8DBC0;
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 14px;
  }
  .admin-data-table tbody td {
    border: 0;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .admin-data-table tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    color: #8E8588;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }
  .admin-data-table tbody td.user-cell-td::before { display: none; }
  .admin-data-table .actions-cell { justify-content: flex-end; }
  .admin-data-table-wrap {
    background: transparent;
    border: 0;
    overflow: visible;
  }
}

/* ---- Action button (small ghost) ---- */
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #F2C5A5;
  background: #FFFFFF;
  color: #4A4548;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-action-btn:hover {
  background: #FEEFDD;
  border-color: #FF4000;
  color: #FF4000;
}

.admin-action-btn.is-danger:hover {
  background: rgba(255, 64, 0, 0.08);
  color: #FF4000;
}

/* Hiện/Ẩn toggle khi đang bật trạng thái "ẩn" — nổi xanh báo "click để hiện" */
.admin-action-btn.is-success {
  background: #E8F7E6;
  border-color: #5BA85A;
  color: #2F7A2E;
}
.admin-action-btn.is-success:hover {
  background: #D6EFD3;
  border-color: #2F7A2E;
  color: #2F7A2E;
}

/* Card đang ẩn khỏi public — mờ + dải caution + cursor info */
.admin-catalog-card.is-inactive {
  opacity: 0.6;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 12px,
    rgba(255, 64, 0, 0.04) 12px,
    rgba(255, 64, 0, 0.04) 24px
  );
}
.admin-catalog-card.is-inactive:hover { opacity: 0.85; }

/* Inline status badge cạnh tên (Ẩn / Hết hàng) */
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.admin-status-badge.is-hidden {
  background: rgba(255, 64, 0, 0.12);
  color: #C53000;
  border: 1px solid rgba(255, 64, 0, 0.25);
}
.admin-status-badge.is-warn {
  background: rgba(250, 170, 141, 0.18);
  color: #8E5430;
  border: 1px solid rgba(250, 170, 141, 0.4);
}
.admin-status-badge.is-oos {
  background: rgba(255, 64, 0, 0.10);
  color: #C53000;
  border: 1px solid rgba(255, 64, 0, 0.3);
}

/* Card khi item Hết hàng — viền đỏ nhạt + gạch chéo nhẹ ở giá */
.admin-catalog-card.is-oos {
  border-color: rgba(255, 64, 0, 0.35);
}
.admin-catalog-card.is-oos .cc-price-sale,
.admin-catalog-card.is-oos .cc-price-original {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.65;
}

/* Inline status select trên catalog card — pill đổi màu theo status */
.admin-status-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 26px 6px 12px;
  border-radius: 999px;
  border: 1px solid #F2C5A5;
  background: #FFFFFF;
  color: #4A4548;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%234A4548' d='M5 6 0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.admin-status-select:hover { border-color: #FF4000; }
.admin-status-select:focus-visible { outline: 2px solid #FF4000; outline-offset: 1px; }
.admin-status-select.is-active {
  background-color: #E8F7E6;
  border-color: #5BA85A;
  color: #2F7A2E;
}
.admin-status-select.is-inactive {
  background-color: #FCE0CE;
  border-color: rgba(255, 64, 0, 0.35);
  color: #C53000;
}
.admin-status-select.is-out-of-stock {
  background-color: #FFE5DC;
  border-color: rgba(255, 64, 0, 0.5);
  color: #C53000;
}

/* ⭐ Featured toggle — star button cạnh status select */
.admin-featured-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #F2C5A5;
  background: #FFFFFF;
  color: #8E8588;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  line-height: 1;
}
.admin-featured-toggle:hover {
  border-color: #FF4000;
  color: #FF4000;
  transform: scale(1.08);
}
.admin-featured-toggle.is-on {
  background: linear-gradient(135deg, #FFB930, #FF4000);
  color: #FFFFFF;
  border-color: #FF4000;
  box-shadow: 0 4px 12px -4px rgba(255, 64, 0, 0.45);
}
.admin-featured-toggle.is-on:hover {
  filter: brightness(1.1);
}
.admin-featured-toggle:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Card khi item nổi bật — accent border + subtle glow để admin nhận diện nhanh */
.admin-catalog-card.is-featured {
  border-color: rgba(255, 64, 0, 0.4);
  box-shadow: 0 12px 24px -12px rgba(255, 64, 0, 0.18), 0 0 0 1px rgba(255, 185, 48, 0.25) inset;
  position: relative;
}
.admin-catalog-card.is-featured::before {
  content: "⭐ Nổi bật";
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(135deg, #FFB930, #FF4000);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 10px -3px rgba(255, 64, 0, 0.4);
  z-index: 1;
}

/* ---- Filter pills (reused from .order-filter pattern) ---- */
.admin-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-filter button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #F2C5A5;
  background: #FFFFFF;
  color: #4A4548;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-filter button:hover {
  border-color: #FF4000;
  color: #FF4000;
}

.admin-filter button.is-active {
  background: #FF4000;
  border-color: #FF4000;
  color: #FEEFDD;
}

/* ---- Search input ---- */
.admin-search {
  width: 100%;
  max-width: 320px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #F2C5A5;
  background: #FFFFFF;
  font-size: 14px;
  font-family: inherit;
  color: #201E1F;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-search:focus {
  outline: none;
  border-color: #FF4000;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.15);
}

/* ---- Activity feed (Dashboard recent activity) ---- */
.admin-activity-list {
  display: flex;
  flex-direction: column;
}

.admin-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F8DBC0;
}

.admin-activity-item:last-child {
  border-bottom: 0;
}

.admin-activity-item .icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(80, 178, 192, 0.12);
  color: #50B2C0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.admin-activity-item .body {
  flex: 1;
  min-width: 0;
}

.admin-activity-item .body .actor {
  font-weight: 600;
  color: #201E1F;
  font-size: 13px;
}

.admin-activity-item .body .desc {
  color: #4A4548;
  font-size: 13px;
}

.admin-activity-item .body .time {
  color: #8E8588;
  font-size: 11px;
  margin-top: 2px;
}

/* ---- Quick action card ---- */
.admin-quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #F2C5A5;
  background: #FFFFFF;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.admin-quick-action:hover {
  transform: translateY(-2px);
  border-color: #FF4000;
  box-shadow: 0 12px 24px -12px rgba(255, 64, 0, 0.25);
}

.admin-quick-action .qa-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 64, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-quick-action .qa-title {
  font-weight: 600;
  font-size: 13px;
  color: #201E1F;
}

.admin-quick-action .qa-desc {
  font-size: 11px;
  color: #8E8588;
  margin-top: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .admin-stat-card,
  .admin-quick-action,
  .admin-action-btn,
  .admin-filter button,
  .admin-search {
    transition: none !important;
  }
  .admin-stat-card:hover,
  .admin-quick-action:hover {
    transform: none !important;
  }
}

/* ==================== Admin (Session 12b) ==================== */

/* ---- Catalog sub-tabs (underline pills, smaller than main admin-nav) ---- */
.admin-catalog-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #F8DBC0;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-catalog-tabs::-webkit-scrollbar { display: none; }

.admin-catalog-tabs button {
  padding: 10px 16px;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #4A4548;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.admin-catalog-tabs button:hover {
  color: #FF4000;
}

.admin-catalog-tabs button.is-active {
  color: #FF4000;
  border-bottom-color: #FF4000;
  font-weight: 600;
}

/* ---- Catalog item card (table-like row) ---- */
.admin-catalog-card {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-catalog-card:hover {
  border-color: #F2C5A5;
  box-shadow: 0 8px 18px -10px rgba(250, 170, 141, 0.45);
}

.admin-catalog-card .cc-emoji {
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 64, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-catalog-card .cc-info {
  flex: 1;
  min-width: 0;
}

.admin-catalog-card .cc-name {
  font-weight: 600;
  font-size: 15px;
  color: #201E1F;
  margin-bottom: 4px;
}

.admin-catalog-card .cc-meta {
  font-size: 12px;
  color: #8E8588;
}

.admin-catalog-card .cc-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.admin-catalog-card .cc-price-original {
  font-size: 11px;
  color: #8E8588;
  text-decoration: line-through;
}

.admin-catalog-card .cc-price-sale {
  font-weight: 700;
  font-size: 15px;
  color: #FF4000;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}

.admin-catalog-card .cc-price-from {
  font-size: 11px;
  color: #8E8588;
  margin-right: 4px;
}

@media (max-width: 640px) {
  .admin-catalog-card {
    flex-wrap: wrap;
  }
  .admin-catalog-card .cc-price {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
}

/* ---- Inline price input ---- */
.admin-inline-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-inline-price input {
  width: 110px;
  padding: 4px 8px;
  border: 1px solid #FF4000;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #FF4000;
  background: #FFFFFF;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.12);
  text-align: right;
}

.admin-inline-price input:focus {
  border-color: #FF4000;
}

.admin-inline-edit-trigger {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease;
}

.admin-inline-edit-trigger:hover {
  border-bottom-color: #FF4000;
}

/* ---- Blog editor modal (extends confirm-modal) ---- */
.admin-blog-editor {
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .admin-form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4A4548;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-form-field input[type="text"],
.admin-form-field input[type="number"],
.admin-form-field select,
.admin-form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #F2C5A5;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: #201E1F;
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-form-field input:focus,
.admin-form-field select:focus,
.admin-form-field textarea:focus {
  outline: none;
  border-color: #FF4000;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.15);
}

.admin-form-field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.admin-form-field .field-help {
  font-size: 11px;
  color: #8E8588;
  margin-top: 4px;
}

.admin-form-field.has-error input,
.admin-form-field.has-error textarea {
  border-color: #FF4000;
}

/* ---- Settings section ---- */
.admin-settings-section {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
}

.admin-settings-section .section-title {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #201E1F;
  margin-bottom: 4px;
}

.admin-settings-section .section-desc {
  font-size: 13px;
  color: #8E8588;
  margin-bottom: 18px;
}

.admin-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #F8DBC0;
}

.admin-toggle-row:last-child {
  border-bottom: 0;
}

.admin-toggle-row .row-label {
  font-weight: 500;
  color: #201E1F;
  font-size: 14px;
}

.admin-toggle-row .row-desc {
  font-size: 12px;
  color: #8E8588;
  margin-top: 2px;
}

/* ---- Blog list item ---- */
.admin-blog-item {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.admin-blog-item .bi-emoji {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(80, 178, 192, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-blog-item .bi-info {
  flex: 1;
  min-width: 0;
}

.admin-blog-item .bi-title {
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-blog-item .bi-meta {
  font-size: 11px;
  color: #8E8588;
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-blog-item .bi-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-blog-item .is-custom-tag {
  background: rgba(80, 178, 192, 0.15);
  color: #2d8e9c;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .admin-blog-item {
    flex-wrap: wrap;
  }
  .admin-blog-item .bi-info {
    min-width: 60%;
  }
  .admin-blog-item .bi-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 6px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .admin-catalog-card,
  .admin-catalog-tabs button,
  .admin-form-field input,
  .admin-form-field textarea,
  .admin-form-field select {
    transition: none !important;
  }
}

/* ==================== Blog typography (S12.1 — admin auto-format text) ==================== */
/* Apply to <p> wraps generated by plainTextToBlogHTML(). Render trong post-detail-modal
   của blog.html cũng như preview admin. Override post-detail-content p với justify. */
.blog-justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  line-height: 1.75;
  font-size: 15px;
  color: #4A4548;
  margin-bottom: 14px;
}

.blog-justify:last-child { margin-bottom: 0; }

.blog-justify strong {
  color: #201E1F;
  font-weight: 700;
}

.blog-justify em {
  color: #8E8588;
  font-style: italic;
}

/* Mobile: bỏ justify để tránh khoảng trắng quá lớn giữa từ */
@media (max-width: 640px) {
  .blog-justify {
    text-align: left;
    hyphens: none;
  }
}

/* ==================== Admin catalog actions (S12.1 — Sửa/Xóa per item) ==================== */
.admin-catalog-actions {
  display: flex;
  gap: 6px;
  margin-left: 12px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .admin-catalog-card .admin-catalog-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
    justify-content: flex-end;
  }
}

/* "Thêm mới" button row */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.admin-toolbar .toolbar-info {
  font-size: 13px;
  color: #8E8588;
}

/* ==================== Settings: Theme picker (S12.1) ==================== */
.admin-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .admin-color-grid { grid-template-columns: 1fr; }
}

.admin-color-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4A4548;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-row input[type="color"] {
  width: 44px;
  height: 40px;
  border: 1px solid #F2C5A5;
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.color-input-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #F2C5A5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  background: #FFFFFF;
  color: #201E1F;
}

.color-input-row input[type="text"]:focus {
  outline: none;
  border-color: #FF4000;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.15);
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #F2C5A5;
  flex-shrink: 0;
  background: #FFFFFF;
}

/* ==================== Settings: Image fields with preview (S12.1) ==================== */
.admin-image-field {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.admin-image-field .admin-form-field {
  flex: 1;
  min-width: 0;
}

.admin-image-field .image-preview {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px dashed #F2C5A5;
  background: #FCE0CE;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #8E8588;
}

.admin-image-field .image-preview.has-image {
  border-style: solid;
  background-color: #FFFFFF;
}

.admin-image-field .image-preview::before {
  content: '🖼️';
  opacity: 0.4;
}

.admin-image-field .image-preview.has-image::before { content: ''; }

@media (max-width: 480px) {
  .admin-image-field {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-image-field .image-preview {
    width: 100%;
    height: 80px;
  }
}

/* ==================== Orders (S12.1) ==================== */
.admin-order-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.admin-order-status.is-completed { background: rgba(91, 168, 90, 0.15); color: #4d9b4d; }
.admin-order-status.is-processing { background: rgba(80, 178, 192, 0.15); color: #2d8e9c; }
.admin-order-status.is-pending { background: rgba(250, 170, 141, 0.18); color: #c25e3c; }
.admin-order-status.is-cancelled { background: rgba(142, 133, 136, 0.15); color: #4A4548; }

.admin-enrollment-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
}

.admin-enrollment-status.is-enrolled { background: rgba(91, 168, 90, 0.12); color: #4d9b4d; border-color: rgba(91, 168, 90, 0.3); }
.admin-enrollment-status.is-in-progress { background: rgba(255, 64, 0, 0.12); color: #FF4000; border-color: rgba(255, 64, 0, 0.3); }
.admin-enrollment-status.is-completed { background: rgba(80, 178, 192, 0.12); color: #2d8e9c; border-color: rgba(80, 178, 192, 0.3); }
.admin-enrollment-status.is-not-enrolled { background: rgba(142, 133, 136, 0.1); color: #4A4548; border-color: rgba(142, 133, 136, 0.25); }
.admin-enrollment-status.is-na { background: transparent; color: #8E8588; border-color: transparent; }

.admin-order-products {
  font-size: 12px;
  color: #4A4548;
  max-width: 220px;
}

.admin-order-products .product-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== Admin Order Cards (S12.3 — thay table) ==================== */
.admin-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-order-card {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 18px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-order-card:hover {
  border-color: #F2C5A5;
  box-shadow: 0 8px 18px -10px rgba(250, 170, 141, 0.4);
}

.admin-order-card .order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #F8DBC0;
  padding-bottom: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-order-card .order-id-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-order-card .order-id {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  background: #FCE0CE;
  color: #4A4548;
  padding: 3px 9px;
  border-radius: 8px;
}

.admin-order-card .order-date {
  font-size: 12px;
  color: #8E8588;
}

.admin-order-card .order-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .admin-order-card .order-body { grid-template-columns: 1fr; gap: 10px; }
}

.admin-order-card .order-customer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.admin-order-card .order-customer-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 64, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.admin-order-card .order-customer-info { min-width: 0; }

.admin-order-card .order-customer-info .name {
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-order-card .order-customer-info .email {
  font-size: 12px;
  color: #8E8588;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-order-card .order-products-block {
  font-size: 13px;
  color: #4A4548;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.admin-order-card .order-products-block .icon {
  flex-shrink: 0;
  font-size: 16px;
  margin-top: 1px;
}

.admin-order-card .order-products-block .lines { min-width: 0; flex: 1; }

.admin-order-card .order-products-block .product-line {
  display: block;
  font-weight: 500;
  color: #201E1F;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-order-card .order-products-block .product-line:last-child { margin-bottom: 0; }

.admin-order-card .order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid #F8DBC0;
  flex-wrap: wrap;
}

.admin-order-card .order-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.admin-order-card .order-total {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #FF4000;
  letter-spacing: -0.01em;
}

.admin-order-card .order-payment {
  font-size: 12px;
  color: #8E8588;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-order-card .order-enrollment-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8E8588;
}

@media (max-width: 480px) {
  .admin-order-card .order-footer { flex-direction: column; align-items: stretch; }
  .admin-order-card .order-footer .admin-action-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-order-card { transition: none !important; }
}

/* ==================== Cart icon trong navbar (S12.4) ====================
   Cart đã được ẩn toàn site — mọi giao dịch chuyển sang Zalo/Messenger.
   Giữ markup để admin/checkout cũ vẫn hoạt động nội bộ. */
.cart-nav-btn {
  position: relative;
  display: none !important;
}

.cart-nav-btn .cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FF4000;
  color: #FEEFDD;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #FEEFDD;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cart-nav-btn .cart-badge.is-empty {
  display: none;
}

/* ==================== Checkout page (S12.4) ==================== */
.cart-item {
  display: grid;
  grid-template-columns: 48px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #F8DBC0;
}

.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-item:first-child { padding-top: 0; }

.cart-item-emoji {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 64, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.cart-item-info {
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-meta {
  font-size: 12px;
  color: #8E8588;
}

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #F2C5A5;
  border-radius: 999px;
  padding: 2px;
  background: #FFFFFF;
}

.cart-item-qty .qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #4A4548;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}

.cart-item-qty .qty-btn:hover {
  background: rgba(255, 64, 0, 0.1);
  color: #FF4000;
}

.cart-item-qty .qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  font-variant-numeric: tabular-nums;
}

.cart-item-total {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #FF4000;
  text-align: right;
  min-width: 90px;
}

.cart-item-remove {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #8E8588;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cart-item-remove:hover {
  background: rgba(255, 64, 0, 0.1);
  color: #FF4000;
}

@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "emoji info"
      "qty total"
      "remove remove";
    gap: 8px 14px;
  }
  .cart-item-emoji { grid-area: emoji; }
  .cart-item-info { grid-area: info; }
  .cart-item-qty { grid-area: qty; justify-self: start; }
  .cart-item-total { grid-area: total; justify-self: end; }
  .cart-item-remove { grid-area: remove; justify-self: end; }
}

/* Payment method cards */
.payment-method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #F2C5A5;
  border-radius: 16px;
  cursor: pointer;
  background: #FFFFFF;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.payment-method-card:hover {
  border-color: #FAAA8D;
  background: #FEEFDD;
}

.payment-method-card.is-active {
  border-color: #FF4000;
  background: rgba(255, 64, 0, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.12);
}

.payment-method-card input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #F2C5A5;
  border-radius: 999px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  margin: 0;
}

.payment-method-card input[type="radio"]:checked {
  border-color: #FF4000;
}

.payment-method-card input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: #FF4000;
}

.payment-method-card .pm-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 64, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-method-card .pm-info {
  flex: 1;
  min-width: 0;
}

.payment-method-card .pm-name {
  font-weight: 700;
  font-size: 14px;
  color: #201E1F;
  margin-bottom: 2px;
}

.payment-method-card .pm-desc {
  font-size: 12px;
  color: #8E8588;
  line-height: 1.4;
}

/* QR payment block */
.qr-payment-block {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #F2C5A5;
  border-radius: 16px;
  align-items: flex-start;
}

.qr-image-wrap {
  width: 140px;
  height: 140px;
  border: 1px solid #F8DBC0;
  border-radius: 12px;
  padding: 8px;
  background: #FFFFFF;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.qr-bank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.qr-bank-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qr-bank-label {
  font-size: 11px;
  color: #8E8588;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.qr-bank-value {
  font-weight: 600;
  color: #201E1F;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

@media (max-width: 480px) {
  .qr-payment-block {
    flex-direction: column;
    align-items: center;
  }
  .qr-bank-info { width: 100%; }
}

/* Admin: Payment methods config (S12.4) */
.admin-payment-method-config {
  border: 1px solid #F8DBC0;
  border-radius: 16px;
  padding: 16px;
  background: #FFFFFF;
  margin-bottom: 14px;
}

.admin-payment-method-config .pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-payment-method-config .pm-name-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-payment-method-config .pm-icon-large {
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 64, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .payment-method-card,
  .cart-item-remove,
  .cart-item-qty .qty-btn {
    transition: none !important;
  }
}

/* ==================== Course CMS (S12.2) ==================== */
.admin-course-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #4A4548;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 10px;
}

.admin-course-detail-back:hover { color: #FF4000; }

/* Course summary card (detail header) */
.admin-course-summary {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.06), rgba(80, 178, 192, 0.04));
  border: 1px solid #F2C5A5;
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.admin-course-summary .summary-emoji {
  font-size: 40px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid #F2C5A5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-course-summary .summary-info {
  flex: 1;
  min-width: 240px;
}

.admin-course-summary .summary-name {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #201E1F;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.admin-course-summary .summary-meta {
  font-size: 13px;
  color: #4A4548;
  margin-bottom: 8px;
}

.admin-course-summary .summary-desc {
  font-size: 13px;
  color: #4A4548;
  line-height: 1.55;
}

.admin-course-summary .summary-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .admin-course-summary .summary-actions {
    flex-direction: row;
    width: 100%;
  }
}

/* Modules wrapper */
.admin-course-modules {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-module-card {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 18px;
  overflow: hidden;
}

.admin-module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #FCE0CE;
  border-bottom: 1px solid #F2C5A5;
}

.admin-module-header .module-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FF4000;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 64, 0, 0.12);
}

.admin-module-header .module-name {
  font-weight: 700;
  font-size: 15px;
  color: #201E1F;
  flex: 1;
  min-width: 0;
}

.admin-module-header input.module-name-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #FF4000;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #201E1F;
  background: #FFFFFF;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.12);
}

.admin-module-header .module-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-module-lessons {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-lesson-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #F8DBC0;
  border-radius: 12px;
  background: #FEEFDD;
}

.admin-lesson-row .lesson-num {
  font-weight: 700;
  font-size: 13px;
  color: #FF4000;
  width: 24px;
  flex-shrink: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.admin-lesson-row .lesson-info {
  flex: 1;
  min-width: 0;
}

.admin-lesson-row .lesson-name {
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  margin-bottom: 2px;
}

.admin-lesson-row .lesson-duration {
  font-size: 11px;
  color: #8E8588;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.admin-lesson-row .lesson-content-snippet {
  font-size: 12px;
  color: #4A4548;
  margin-top: 4px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-lesson-row .lesson-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .admin-lesson-row {
    flex-wrap: wrap;
  }
  .admin-lesson-row .lesson-actions {
    flex-direction: row;
    width: 100%;
  }
}

/* Attachments chips */
.admin-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1px solid #F2C5A5;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: #4A4548;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.admin-attachment-chip:hover {
  border-color: #FF4000;
  color: #FF4000;
}

.admin-attachment-chip .chip-remove {
  background: transparent;
  border: 0;
  color: #8E8588;
  cursor: pointer;
  font-size: 12px;
  padding: 0 0 0 2px;
  line-height: 1;
}

.admin-attachment-chip .chip-remove:hover { color: #FF4000; }

.admin-attachment-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px dashed #F2C5A5;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: #4A4548;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.admin-attachment-add-btn:hover {
  border-color: #FF4000;
  color: #FF4000;
}

/* "Thêm bài học" + "Thêm danh mục" buttons */
.admin-course-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px dashed #F2C5A5;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #4A4548;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.admin-course-add-btn:hover {
  border-color: #FF4000;
  color: #FF4000;
  background: rgba(255, 64, 0, 0.04);
}

.admin-course-add-btn.is-module {
  margin-top: 8px;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-attachment-chip,
  .admin-attachment-add-btn,
  .admin-course-add-btn,
  .admin-course-detail-back {
    transition: none !important;
  }
}

/* ==================== Neon running border + Logo mirror shine (S12.11) ====================
   Hai hiệu ứng visual khác:
   1. Neon ánh sáng chạy quanh khung mỗi <section> — top stripe đỏ→vàng chạy LR,
      bottom stripe teal→peach chạy RL, lệch chu kỳ tạo motion bất đồng bộ.
   2. Logo "tráng gương" — diagonal shine sweep ngang qua logo định kỳ. */

/* Neon section frame — chỉ áp khi <body class="has-neon-sections">
   (index.html homepage). Tránh áp lên <section> trong admin tab content,
   blog post detail, account tab v.v. */

.has-neon-sections section {
  position: relative;
  isolation: isolate;
}

.has-neon-sections section::before,
.has-neon-sections section::after {
  pointer-events: none;
  content: '';
  position: absolute;
  height: 2px;
  width: 35%;
  z-index: 5;
}

.has-neon-sections section::before {
  top: 0;
  left: -35%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 64, 0, 0.95) 30%,
    rgba(255, 220, 100, 1) 50%,
    rgba(255, 64, 0, 0.95) 70%,
    transparent 100%);
  box-shadow:
    0 0 12px 1px rgba(255, 64, 0, 0.7),
    0 0 28px 2px rgba(255, 180, 60, 0.35);
  animation: neonRunTop 6s linear infinite;
}

.has-neon-sections section::after {
  bottom: 0;
  right: -35%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(80, 178, 192, 0.95) 30%,
    rgba(250, 170, 141, 1) 50%,
    rgba(80, 178, 192, 0.95) 70%,
    transparent 100%);
  box-shadow:
    0 0 12px 1px rgba(80, 178, 192, 0.7),
    0 0 28px 2px rgba(250, 170, 141, 0.35);
  animation: neonRunBottom 7s linear infinite;
  animation-delay: 2.5s;
}

@keyframes neonRunTop {
  0%   { left: -35%; }
  100% { left: 100%; }
}

@keyframes neonRunBottom {
  0%   { right: -35%; }
  100% { right: 100%; }
}

/* Logo mirror shine — diagonal sweep across .logo-hover (img + brand text) */
.logo-hover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg,
    transparent 25%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.55) 55%,
    transparent 75%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  background-position: -120% 0;
  animation: logoMirrorSweep 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}

@keyframes logoMirrorSweep {
  0%, 65%, 100% { background-position: -120% 0; }
  82%           { background-position: 220% 0; }
}

/* Reduce motion: tắt cả 3 animation trên */
@media (prefers-reduced-motion: reduce) {
  .has-neon-sections section::before,
  .has-neon-sections section::after,
  .logo-hover::after {
    animation: none !important;
    opacity: 0.4;
  }
}

/* ==================== Buy button — fire animation (S12.10) ====================
   Hiệu ứng "rực lửa" cho mọi nút Mua + Thanh toán: gradient đỏ động + shimmer vàng
   sweep + outer ring pulse + glow shadow nhấp nháy. Áp cho 3 selectors:
   - `.resource-buy-btn` (Resources + AI Tools rows)
   - `.detail-action-buy` (Product detail modal)
   - `.btn-buy-fire` (course Mua ngay + checkout confirm — class thêm thủ công) */

.resource-buy-btn,
.detail-action-buy,
.btn-buy-fire {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #FF4000 0%, #E03000 45%, #C72E00 100%) !important;
  background-size: 220% 220%;
  color: #FEEFDD !important;
  border: 0 !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  animation: fireGradientShift 4s ease-in-out infinite, fireGlowPulse 2.2s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(255, 64, 0, 0.55),
    0 6px 18px -4px rgba(255, 64, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(120, 20, 0, 0.35);
}

/* Inner flame shimmer — yellow streak sweeps across */
.resource-buy-btn::before,
.detail-action-buy::before,
.btn-buy-fire::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 220, 100, 0.55) 45%,
    rgba(255, 240, 200, 0.7) 50%,
    rgba(255, 220, 100, 0.55) 55%,
    transparent 100%);
  filter: blur(2px);
  z-index: 0;
  animation: fireShimmerSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

/* Outer pulsing ring — fading red halo */
.resource-buy-btn::after,
.detail-action-buy::after,
.btn-buy-fire::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(255, 90, 30, 0.55);
  z-index: -1;
  animation: fireRingPulse 2.4s ease-out infinite;
  pointer-events: none;
}

/* Make sure inner content stays above shimmer pseudo */
.resource-buy-btn > *,
.detail-action-buy > *,
.btn-buy-fire > * {
  position: relative;
  z-index: 1;
}

@keyframes fireGradientShift {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}

@keyframes fireGlowPulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255, 64, 0, 0.5),
      0 6px 18px -4px rgba(255, 64, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  50% {
    box-shadow:
      0 0 18px 3px rgba(255, 110, 30, 0.7),
      0 12px 30px -6px rgba(255, 64, 0, 0.85),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
}

@keyframes fireShimmerSweep {
  0%   { left: -60%; }
  55%, 100% { left: 160%; }
}

@keyframes fireRingPulse {
  0%   { transform: scale(0.98); opacity: 0.6; }
  60%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* Hover — đẩy nhanh animation + lift + brightness boost */
.resource-buy-btn:hover,
.detail-action-buy:hover,
.btn-buy-fire:hover {
  transform: translateY(-2px) scale(1.04) !important;
  filter: brightness(1.12) saturate(1.18);
  animation-duration: 1.5s, 1.2s;
  background: linear-gradient(135deg, #FF5A1A 0%, #FF4000 40%, #D63300 100%) !important;
}

.resource-buy-btn:active,
.detail-action-buy:active,
.btn-buy-fire:active {
  transform: translateY(0) scale(1) !important;
  filter: brightness(0.95);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .resource-buy-btn,
  .detail-action-buy,
  .btn-buy-fire,
  .resource-buy-btn::before,
  .detail-action-buy::before,
  .btn-buy-fire::before,
  .resource-buy-btn::after,
  .detail-action-buy::after,
  .btn-buy-fire::after {
    animation: none !important;
  }
}

/* ==================== Product detail modal (S12.9) ====================
   Click vào sản phẩm/dịch vụ/tài nguyên/khóa học → mở popup chi tiết.
   Backdrop full-screen, panel max-w-560px, scale-in animation. */

.product-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(32, 30, 31, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: backdropFadeIn 0.2s ease-out;
}

.product-detail-backdrop.hidden { display: none; }

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.product-detail-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: linear-gradient(180deg, #FFFFFF 0%, #FEEFDD 100%);
  border-radius: 28px;
  border: 1px solid #F2C5A5;
  box-shadow: 0 30px 60px -20px rgba(32, 30, 31, 0.35), 0 0 0 1px rgba(255, 64, 0, 0.08);
  padding: 28px 26px 24px;
  animation: detailModalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes detailModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.product-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(32, 30, 31, 0.06);
  border: 1px solid transparent;
  color: #4A4548;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.product-detail-close:hover {
  background: rgba(255, 64, 0, 0.12);
  color: #FF4000;
  transform: rotate(90deg);
}

.product-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-right: 36px;
}

.product-detail-emoji {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FEEFDD, #FAD9C0);
  border: 1px solid rgba(255, 64, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 8px 18px -8px rgba(255, 64, 0, 0.35);
}

.product-detail-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-detail-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #FF4000;
}

.product-detail-name {
  font-family: inherit;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.2;
  color: #201E1F;
  margin: 0;
}

.product-detail-tagline {
  font-size: 13px;
  color: #4A4548;
  font-weight: 500;
}

.product-detail-price-block {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.08), rgba(80, 178, 192, 0.06));
  border: 1px solid rgba(255, 64, 0, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.product-detail-price-block.hidden { display: none; }

.product-detail-price-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8E8588;
  margin-bottom: 4px;
}

.product-detail-price {
  font-family: inherit;
  font-weight: 800;
  font-size: 26px;
  color: #FF4000;
  line-height: 1.1;
}

.product-detail-desc {
  font-size: 14px;
  line-height: 1.65;
  color: #4A4548;
  margin-bottom: 14px;
}

.product-detail-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-detail-features.hidden { display: none; }

.product-detail-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: #4A4548;
  line-height: 1.5;
}

.detail-feat-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(91, 168, 90, 0.18);
  color: #5BA85A;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.product-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed #F2C5A5;
}

.detail-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, box-shadow 0.25s ease;
}

.detail-action-buy {
  background: #FF4000;
  color: #FEEFDD;
  box-shadow: 0 8px 18px -8px rgba(255, 64, 0, 0.5);
}

.detail-action-buy:hover {
  background: #E03800;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(255, 64, 0, 0.6);
}

.detail-action-zalo {
  background: #201E1F;
  color: #FEEFDD;
}

.detail-action-zalo:hover {
  background: #FF4000;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(255, 64, 0, 0.45);
}

.detail-action-msger {
  background: #FFFFFF;
  color: #201E1F;
  border: 1px solid #F2C5A5;
}

.detail-action-msger:hover {
  background: #FCE0CE;
  border-color: rgba(255, 64, 0, 0.32);
  transform: translateY(-2px);
}

@media (min-width: 481px) {
  .product-detail-actions {
    flex-direction: row;
  }
  .detail-action-btn {
    flex: 1;
  }
}

/* Product info button reset (S12.9) — `<button>` thay <div> để semantic clickable */
button.resource-product-info {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.2s ease;
}

button.resource-product-info:hover {
  opacity: 0.78;
}

button.resource-product-info:focus-visible {
  outline: 2px solid #FF4000;
  outline-offset: 4px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .product-detail-backdrop,
  .product-detail-modal,
  .product-detail-close,
  .detail-action-btn {
    animation: none !important;
    transition: none !important;
  }
}

/* ==================== Resources nested hierarchy (S12.7) ====================
   3-level: tabs (Via/BM/Fanpage) → grid sub-categories → product rows với Mua + Zalo buttons.
   Render từ RESOURCE_TREE_SEED qua IIFE inline trong index.html. */

[data-resources-root] {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.resource-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 24px;
  padding: 8px;
}

.resource-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.resource-tab:hover {
  background: rgba(255, 64, 0, 0.06);
}

.resource-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.12), rgba(80, 178, 192, 0.10));
  border-color: rgba(255, 64, 0, 0.32);
  box-shadow: 0 6px 16px -8px rgba(255, 64, 0, 0.4);
}

.resource-tab-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.resource-tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.resource-tab-name {
  font-family: inherit;
  font-weight: 800;
  font-size: 18px;
  color: #201E1F;
}

.resource-tab-tagline {
  font-size: 11px;
  color: #8E8588;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.resource-subs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .resource-tabs {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .resource-tab {
    padding: 10px 12px;
  }
  .resource-tab-name { font-size: 16px; }
  .resource-subs-grid {
    grid-template-columns: 1fr;
  }
}

.resource-sub-card {
  background: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 24px;
  padding: 20px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.resource-sub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 64, 0, 0.35);
  box-shadow: 0 24px 48px -20px rgba(250, 170, 141, 0.5);
}

.resource-sub-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #F2C5A5;
}

.resource-sub-emoji {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FEEFDD, #FAD9C0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.resource-sub-name {
  font-family: inherit;
  font-weight: 800;
  font-size: 17px;
  color: #201E1F;
  margin-bottom: 2px;
}

.resource-sub-desc {
  font-size: 12px;
  color: #8E8588;
  line-height: 1.4;
}

.resource-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #FCE0CE;
  border: 1px solid #F2C5A5;
  border-radius: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.resource-product-row:hover {
  background: linear-gradient(135deg, #FEEFDD, #FCE0CE);
  border-color: rgba(255, 64, 0, 0.4);
}

.resource-product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.resource-product-name {
  font-weight: 600;
  font-size: 14px;
  color: #201E1F;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-product-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.resource-product-badge.is-hot {
  background: rgba(255, 64, 0, 0.15);
  color: #FF4000;
  border: 1px solid rgba(255, 64, 0, 0.3);
}

.resource-product-badge.is-new {
  background: rgba(80, 178, 192, 0.18);
  color: #2D7585;
  border: 1px solid rgba(80, 178, 192, 0.35);
}

.resource-product-badge.is-best {
  background: rgba(250, 170, 141, 0.25);
  color: #C73000;
  border: 1px solid rgba(250, 170, 141, 0.45);
}

/* "Hết hàng" badge — variant đỏ rõ rệt, position cùng row với product name */
.resource-product-badge.is-oos {
  background: rgba(255, 64, 0, 0.12);
  color: #C53000;
  border: 1px solid rgba(255, 64, 0, 0.4);
  font-weight: 800;
}

/* "Nổi bật" badge — gradient cam vàng, admin đánh dấu featured trên public */
.resource-product-badge.is-featured {
  background: linear-gradient(135deg, #FFB930, #FF4000);
  color: #FFFFFF;
  border: 1px solid rgba(255, 64, 0, 0.6);
  font-weight: 800;
  box-shadow: 0 2px 6px -2px rgba(255, 64, 0, 0.4);
}

/* Row featured: subtle accent background — đứng đầu danh sách public */
.resource-product-row.is-featured {
  background: linear-gradient(90deg, rgba(255, 185, 48, 0.08), transparent 70%);
  border-left: 3px solid #FF4000;
  padding-left: 13px;
}

/* ⭐ Featured ribbon trên course/service card public — góc trên trái, gradient cam-vàng nổi bật */
.featured-ribbon {
  position: absolute;
  top: 14px;
  left: -8px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px 5px 12px;
  background: linear-gradient(135deg, #FFB930 0%, #FF4000 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0 999px 999px 0;
  box-shadow: 0 6px 14px -4px rgba(255, 64, 0, 0.5);
  pointer-events: none;
  animation: featured-ribbon-pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.featured-ribbon::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 8px 0 0;
  border-color: #B22A00 transparent transparent transparent;
}
@keyframes featured-ribbon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 14px -4px rgba(255, 64, 0, 0.5); }
  50%      { transform: scale(1.04); box-shadow: 0 8px 20px -4px rgba(255, 64, 0, 0.7); }
}

/* Card có featured: viền accent + glow nhẹ — visual cue admin's choice */
.is-featured-card {
  border-color: rgba(255, 64, 0, 0.55) !important;
  box-shadow:
    0 0 0 2px rgba(255, 185, 48, 0.25),
    0 18px 36px -16px rgba(255, 64, 0, 0.35),
    var(--card-extra-shadow, none);
}

@media (prefers-reduced-motion: reduce) {
  .featured-ribbon { animation: none; }
}

/* Row khi sản phẩm hết hàng — text mờ + giá gạch ngang */
.resource-product-row.is-oos {
  opacity: 0.7;
}
.resource-product-row.is-oos .resource-product-price {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  color: #8E5430;
}

/* Nút Mua bị vô hiệu hóa khi hết hàng */
.resource-buy-btn.is-disabled,
.resource-buy-btn[disabled],
.resource-buy-btn[aria-disabled="true"] {
  background: rgba(255, 64, 0, 0.10);
  color: #C53000;
  cursor: not-allowed;
  pointer-events: none;
  border: 1px solid rgba(255, 64, 0, 0.3);
}
.resource-buy-btn.is-disabled:hover,
.resource-buy-btn[disabled]:hover {
  transform: none;
  background: rgba(255, 64, 0, 0.10);
  box-shadow: none;
}

.resource-product-price {
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  color: #FF4000;
}

/* Contact-only variant (giá ẩn) — text nhẹ thay cho số tiền */
.resource-product-contact {
  font-weight: 600;
  font-size: 13px;
  color: #4A4548;
  letter-spacing: 0.01em;
}

/* Zalo vs Messenger CTAs in resource rows */
.resource-buy-btn.resource-cta-msger {
  background: #FFFFFF;
  color: #201E1F;
  border: 1px solid #F2C5A5;
}
.resource-buy-btn.resource-cta-msger:hover {
  background: #FEEFDD;
  border-color: #FF4000;
  color: #201E1F;
  box-shadow: 0 10px 22px -8px rgba(250, 170, 141, 0.45);
}

.resource-product-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.resource-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #201E1F;
  color: #FEEFDD;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.resource-buy-btn:hover {
  transform: translateY(-2px);
  background: #FF4000;
  box-shadow: 0 10px 22px -8px rgba(255, 64, 0, 0.5);
}

.resource-zalo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(80, 178, 192, 0.15);
  color: #2D7585;
  border: 1px solid rgba(80, 178, 192, 0.32);
  font-size: 16px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, border-color 0.25s ease;
}

.resource-zalo-btn:hover {
  background: rgba(80, 178, 192, 0.3);
  border-color: rgba(80, 178, 192, 0.55);
  transform: translateY(-2px) rotate(-6deg);
}

@media (max-width: 480px) {
  .resource-product-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .resource-product-actions {
    justify-content: space-between;
  }
  .resource-buy-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-tab,
  .resource-sub-card,
  .resource-product-row,
  .resource-buy-btn,
  .resource-zalo-btn {
    transition: none !important;
  }
}

/* ==================== Header polish + animations (S12.5) ====================
   Áp cho mọi trang có chung navbar (index/login/account/learn/blog/admin/checkout).
   Target qua existing markup: header.fixed, .logo-hover, .nav-link,
   [data-user-dropdown-trigger], [data-user-avatar], .cart-nav-btn, .cart-badge.
   KHÔNG cần edit HTML — toàn bộ pages đều hưởng. */

/* Animated gradient line dưới header */
header.fixed {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

header.fixed::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 64, 0, 0.35) 18%,
    rgba(80, 178, 192, 0.45) 50%,
    rgba(250, 170, 141, 0.4) 82%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: headerGlowSweep 9s ease-in-out infinite;
  opacity: 0.85;
  pointer-events: none;
}

@keyframes headerGlowSweep {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Brand logo nhấn mạnh */
.logo-hover {
  position: relative;
  padding: 4px 8px 4px 4px;
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

.logo-hover:hover {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.06), rgba(80, 178, 192, 0.06));
}

.logo-hover img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.logo-hover:hover img {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 8px 22px -6px rgba(255, 64, 0, 0.55), 0 0 0 3px rgba(255, 64, 0, 0.18);
}

.logo-hover span {
  transition: letter-spacing 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.logo-hover:hover span {
  letter-spacing: -0.025em;
  filter: drop-shadow(0 0 10px rgba(255, 64, 0, 0.28));
}

/* Nav link micro-lift on hover (existing underline expand giữ nguyên) */
header .nav-link {
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

header .nav-link:hover {
  transform: translateY(-1px);
}

/* User dropdown trigger — gradient pill + animated avatar ring + online dot */
[data-user-dropdown-trigger] {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.08), rgba(80, 178, 192, 0.08)) !important;
  border: 1px solid rgba(255, 64, 0, 0.18);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

[data-user-dropdown-trigger]:hover {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.16), rgba(80, 178, 192, 0.16)) !important;
  border-color: rgba(255, 64, 0, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -8px rgba(255, 64, 0, 0.42);
}

[data-user-dropdown-trigger] [data-user-avatar] {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px rgba(255, 64, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  animation: avatarRingPulse 3.2s ease-in-out infinite;
}

@keyframes avatarRingPulse {
  0%, 100% { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px rgba(255, 64, 0, 0.42); }
  50%      { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 5px rgba(80, 178, 192, 0.5); }
}

[data-user-dropdown-trigger]:hover [data-user-avatar] {
  transform: rotate(8deg) scale(1.06);
}

/* "Online" dot nhấp nháy ở góc avatar */
[data-user-dropdown-trigger]::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 30px;
  width: 9px;
  height: 9px;
  background: #5BA85A;
  border: 2px solid #FEEFDD;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  animation: onlineDotPulse 2.4s ease-in-out infinite;
}

@keyframes onlineDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 168, 90, 0.6); }
  50%      { box-shadow: 0 0 0 7px rgba(91, 168, 90, 0); }
}

/* User name luôn rõ; tăng max-width một chút để fit tên Việt */
[data-user-dropdown-trigger] [data-user-name] {
  max-width: 130px !important;
  font-weight: 600 !important;
  color: #201E1F !important;
}

/* Caret xoay khi dropdown mở */
[data-user-dropdown-trigger] svg:last-child {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-user-dropdown-trigger][aria-expanded="true"] svg:last-child {
  transform: rotate(180deg);
}

/* Cart button — gradient bg + bounce + shake icon + animated badge */
.cart-nav-btn {
  background: linear-gradient(135deg, rgba(80, 178, 192, 0.12), rgba(255, 64, 0, 0.10)) !important;
  border: 1px solid rgba(80, 178, 192, 0.28);
  transition: background 0.35s ease, border-color 0.35s ease,
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease !important;
}

.cart-nav-btn:hover {
  background: linear-gradient(135deg, rgba(80, 178, 192, 0.25), rgba(255, 64, 0, 0.20)) !important;
  border-color: rgba(80, 178, 192, 0.5);
  transform: translateY(-2px) rotate(-3deg);
  box-shadow: 0 10px 22px -7px rgba(80, 178, 192, 0.5);
}

.cart-nav-btn > span:first-child {
  display: inline-block;
  transform-origin: 50% 70%;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-nav-btn:hover > span:first-child {
  animation: cartShake 0.7s cubic-bezier(0.36, 0, 0.66, -0.56) both;
}

@keyframes cartShake {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-14deg) scale(1.1); }
  45%  { transform: rotate(11deg) scale(1.1); }
  70%  { transform: rotate(-7deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Cart badge bouncy entrance */
.cart-nav-btn .cart-badge:not(.is-empty) {
  animation: cartBadgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Pulse ring tỏa ra từ badge */
.cart-nav-btn .cart-badge:not(.is-empty)::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid rgba(255, 64, 0, 0.55);
  animation: cartBadgePulseRing 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes cartBadgePop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes cartBadgePulseRing {
  0%   { transform: scale(1);   opacity: 0.85; }
  100% { transform: scale(2.3); opacity: 0; }
}

/* Zalo CTA: shimmer sweep nhẹ định kỳ — thu hút mắt mà không gắt */
header .btn-hover.bg-ink {
  position: relative;
  overflow: hidden;
}

header .btn-hover.bg-ink::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
  animation: btnShimmerSweep 4.5s ease-in-out infinite;
  animation-delay: 1.5s;
}

@keyframes btnShimmerSweep {
  0%, 70%, 100% { left: -120%; }
  88%           { left: 220%; }
}

/* Mobile menu button polish */
#mobileMenuBtn {
  border-radius: 10px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobileMenuBtn:hover {
  color: #FF4000;
  background: rgba(255, 64, 0, 0.08);
  transform: scale(1.08);
}

/* Reduce motion: tắt animation nhưng giữ hover state */
@media (prefers-reduced-motion: reduce) {
  header.fixed::after,
  [data-user-dropdown-trigger] [data-user-avatar],
  [data-user-dropdown-trigger]::before,
  .cart-nav-btn .cart-badge::after,
  .cart-nav-btn:hover > span:first-child,
  .cart-nav-btn .cart-badge:not(.is-empty),
  header .btn-hover.bg-ink::after {
    animation: none !important;
  }
  .logo-hover img,
  .logo-hover span,
  [data-user-dropdown-trigger],
  .cart-nav-btn,
  .cart-nav-btn > span:first-child,
  #mobileMenuBtn,
  header .nav-link {
    transition: none !important;
  }
}

/* =============================================================================
   S13 — Mobile audit safety overrides (≤640px)
   Aim: prevent horizontal scroll, ensure touch targets ≥44px, modal full-width.
   ============================================================================= */

@media (max-width: 640px) {
  body { word-break: break-word; }

  h1, h2, h3 {
    overflow-wrap: break-word;
  }

  /* Modal: full-width with safe gutters trên màn hình nhỏ */
  .confirm-modal-backdrop .confirm-modal,
  .product-detail-modal,
  .verify-modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 12px auto !important;
  }

  /* Touch targets ≥44px cho icon buttons */
  .cart-nav-btn,
  #mobileMenuBtn,
  [data-user-dropdown-trigger],
  .modal-close-x,
  .product-detail-close {
    min-width: 44px;
    min-height: 44px;
  }

  /* Footer newsletter form — stack vertically */
  form[data-newsletter-form] {
    flex-direction: column;
    align-items: stretch;
    gap: 8px !important;
    max-width: 100% !important;
  }
  form[data-newsletter-form] input,
  form[data-newsletter-form] button {
    width: 100%;
  }

  /* Resource tabs — gợi ý scrollable */
  .resource-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  /* Admin form grid — stack 1 col trên màn hình nhỏ */
  .admin-form-grid.cols-2,
  .admin-form-grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* Tablet ≤768px — admin tables compact */
@media (max-width: 768px) {
  .admin-shell .data-table {
    font-size: 13px;
  }
  .admin-shell .data-table th[data-col-priority="3"],
  .admin-shell .data-table td[data-col-priority="3"] {
    display: none;
  }
}

/* =============================================================================
   B17 — Image fallback placeholder
   Khi auth-api.js setupImageFallback() swap <img> src sang inline SVG monogram,
   class .img-placeholder được apply để styled cho consistent look.
   ============================================================================= */
.img-placeholder {
  background: linear-gradient(135deg, #FF4000 0%, #FAAA8D 60%, #FEEFDD 100%);
  object-fit: contain;
  /* Inline SVG đã có rounded corners nên không override radius ở đây */
}

/* =============================================================================
   B19 — Lesson video frame (16:9 aspect, rounded, replaces .video-placeholder)
   ============================================================================= */

.video-placeholder.has-video {
  cursor: default;
  background: transparent;
  padding: 0;
  border: none;
}

.video-placeholder.is-loading {
  opacity: 0.6;
}

.lesson-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  border: 1px solid #F8DBC0;
  background: #000;
  display: block;
}

/* =============================================================================
   Custom lesson video player — ẩn logo YouTube/Vimeo native UI, chỉ controls
   tự build (play/pause + volume). Read-only progress bar (không seek).
   Anti-download cơ bản: chặn right-click, controlsList=nodownload, blocker overlay.
   ============================================================================= */

.lesson-player-shell {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid #F8DBC0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lesson-player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.lesson-player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* Blocker overlay: chặn click trực tiếp lên iframe (không cho YT/Vimeo native action),
   click → toggle play/pause qua API (giúp UX click-anywhere-to-pause vẫn còn). */
.lesson-player-blocker {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  background: transparent;
}

.lesson-player-controls {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.78));
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-player-progress {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}

.lesson-player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #FAAA8D 0%, #FF4000 100%);
  border-radius: 2px;
  transition: width 240ms linear;
}

.lesson-player-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FEEFDD;
}

.lesson-player-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #FEEFDD;
  border: 0;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  padding: 0;
}

.lesson-player-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.lesson-player-btn[data-player-toggle] {
  background: #FF4000;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 12px -2px rgba(255, 64, 0, 0.45);
}

.lesson-player-btn[data-player-toggle]:hover {
  background: #E63A00;
}

.lesson-player-vol-display {
  font-size: 12px;
  font-weight: 700;
  width: 44px;
  text-align: center;
  color: #FEEFDD;
  font-variant-numeric: tabular-nums;
}

.lesson-player-time {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  color: rgba(254, 239, 221, 0.85);
}

@media (max-width: 480px) {
  .lesson-player-controls { padding: 10px 12px; }
  .lesson-player-controls-row { gap: 8px; }
  .lesson-player-btn { width: 32px; height: 32px; }
  .lesson-player-btn[data-player-toggle] { width: 38px; height: 38px; }
  .lesson-player-vol-display { width: 36px; font-size: 11px; }
  .lesson-player-time { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-player-btn,
  .lesson-player-progress-fill { transition: none !important; }
}

/* =============================================================================
   Auth modal (B-buy-gate) — popup login/signup khi click "Mua ngay" mà chưa
   đăng nhập. CHỈ đóng được qua nút X (không backdrop click, không Escape).
   ============================================================================= */

.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal.is-open {
  display: flex;
  animation: auth-modal-fade 200ms ease-out;
}

@keyframes auth-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(32, 30, 31, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* KHÔNG có pointer-events handler — backdrop click không đóng modal */
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 36px 28px 28px;
  box-shadow: 0 30px 80px -16px rgba(255, 64, 0, 0.4);
  border: 1px solid #F8DBC0;
  animation: auth-modal-pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes auth-modal-pop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FEEFDD;
  border: 0;
  color: #201E1F;
  font-size: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, transform 150ms ease;
  line-height: 1;
}

.auth-modal-close:hover {
  background: #FAAA8D;
  transform: scale(1.05);
}

.auth-modal-tabs {
  display: flex;
  gap: 4px;
  background: #FEEFDD;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 22px;
  margin-top: 4px;
}

.auth-modal-tabs button {
  flex: 1;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  background: transparent;
  color: #8E8588;
  cursor: pointer;
  transition: all 180ms ease;
}

.auth-modal-tabs button.is-active {
  background: #FFFFFF;
  color: #201E1F;
  box-shadow: 0 2px 8px -2px rgba(255, 64, 0, 0.2);
}

.auth-modal-card h3 {
  font-family: inherit;
  font-weight: 800;
  font-size: 20px;
  color: #201E1F;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.auth-modal-subtitle {
  font-size: 13px;
  color: #4A4548;
  margin: 0 0 18px;
  line-height: 1.5;
}

.auth-modal-card form .auth-modal-field {
  display: block;
  margin-bottom: 12px;
}

.auth-modal-card form .auth-modal-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4A4548;
  margin-bottom: 6px;
}

.auth-modal-card form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #F2C5A5;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  background: #FEEFDD;
  color: #201E1F;
  box-sizing: border-box;
  transition: border-color 150ms ease, background 150ms ease;
}

.auth-modal-card form input:focus {
  outline: none;
  border-color: #FF4000;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.12);
}

.auth-modal-submit {
  width: 100%;
  padding: 14px;
  background: #FF4000;
  color: #FEEFDD;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 150ms ease, transform 150ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-modal-submit:hover:not(:disabled) {
  background: #E63A00;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -6px rgba(255, 64, 0, 0.45);
}

.auth-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-modal-error {
  color: #C73000;
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
  text-align: center;
  font-weight: 600;
}

.auth-modal-switch {
  text-align: center;
  font-size: 13px;
  color: #4A4548;
  margin: 16px 0 0;
}

.auth-modal-switch a {
  color: #FF4000;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms;
}

.auth-modal-switch a:hover {
  border-bottom-color: #FF4000;
}

.auth-modal-context-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FF4000;
  background: rgba(255, 64, 0, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal.is-open,
  .auth-modal-card { animation: none !important; }
  .auth-modal-submit,
  .auth-modal-close { transition: none !important; }
}

/* Google OAuth button trong modal — priority CTA (top) */
.auth-modal-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid #DADCE0;
  background: #FFFFFF;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
  margin-bottom: 8px;
}

.auth-modal-google:hover:not([aria-disabled="true"]) {
  background: #F8F9FA;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.auth-modal-google[aria-disabled="true"],
.auth-modal-google.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-modal-google.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.auth-modal-google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-modal-google-text {
  font-size: 14px;
  font-weight: 600;
  color: #3C4043;
  letter-spacing: 0.01em;
}

.auth-modal-google-note {
  text-align: center;
  font-size: 11px;
  color: #8E8588;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Divider giữa Google + form email */
.auth-modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
}

.auth-modal-divider::before,
.auth-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #F8DBC0;
}

.auth-modal-divider span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8E8588;
  font-weight: 600;
}

/* Password input wrap với eye toggle bên trong */
.auth-modal-input-wrap {
  position: relative;
}

.auth-modal-input-wrap input {
  padding-right: 44px !important;
}

.auth-modal-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #8E8588;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease, background 150ms ease;
}

.auth-modal-eye:hover {
  color: #201E1F;
  background: rgba(255, 64, 0, 0.08);
}

/* Label row với forgot link bên phải */
.auth-modal-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-modal-label-row .auth-modal-label {
  margin-bottom: 0 !important;
}

.auth-modal-forgot-link {
  font-size: 11px;
  color: #FF4000;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}

.auth-modal-forgot-link:hover {
  border-bottom-color: #FF4000;
}

/* OTP input — center align + tracked spacing */
.auth-modal-input-otp {
  text-align: center !important;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace !important;
  letter-spacing: 0.4em !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

/* Forgot password back row */
.auth-modal-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.auth-modal-btn-row .auth-modal-submit {
  flex: 1;
  margin-top: 0;
}

.auth-modal-secondary {
  flex: 1;
  padding: 14px;
  background: #FEEFDD;
  color: #4A4548;
  border: 1px solid #F2C5A5;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.auth-modal-secondary:hover {
  background: #FAD9C0;
  color: #201E1F;
}

/* ==================== 🚫 GIÁ ẨN TOÀN SITE (2026-05-13) ====================
   User yêu cầu: bỏ HOÀN TOÀN giá + nút Mua → thay bằng nút liên hệ Zalo trên mọi trang.
   Apply mọi trang trừ admin.html (admin nội bộ vẫn cần xem giá để quản lý).
   Body khi có .is-prices-hidden (set bởi script.js cho non-admin pages) → kích hoạt rules. */

body.is-prices-hidden .cart-nav-btn,
body.is-prices-hidden .btn-buy-fire,
body.is-prices-hidden [data-buy-id],
body.is-prices-hidden [data-course-price-original],
body.is-prices-hidden [data-course-price-sale-big],
body.is-prices-hidden [data-course-price-sale-small],
body.is-prices-hidden [data-cart-count],
body.is-prices-hidden [data-cart-row],
body.is-prices-hidden [data-cart-items],
body.is-prices-hidden [data-cart-summary],
body.is-prices-hidden [data-cart-total],
body.is-prices-hidden [data-checkout-confirm],
body.is-prices-hidden [data-checkout-grid],
body.is-prices-hidden [data-payment-methods],
body.is-prices-hidden [data-payment-instructions],
body.is-prices-hidden [data-pricing-block],
body.is-prices-hidden [data-detail-price-block],
body.is-prices-hidden .price-hidden-by-scrubber {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Floating Zalo CTA — bottom-right, always visible non-admin */
.floating-zalo-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #FF4000;
  color: #FEEFDD;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 12px 28px -8px rgba(255, 64, 0, 0.55), 0 4px 12px -4px rgba(0,0,0,0.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease;
  animation: floating-zalo-pulse 2.4s ease-in-out infinite;
}
.floating-zalo-cta:hover {
  transform: translateY(-3px) scale(1.04);
  background: #E03500;
  box-shadow: 0 18px 36px -10px rgba(255, 64, 0, 0.65), 0 6px 16px -4px rgba(0,0,0,0.18);
}
.floating-zalo-cta .floating-zalo-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FEEFDD;
  color: #FF4000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
@keyframes floating-zalo-pulse {
  0%, 100% { box-shadow: 0 12px 28px -8px rgba(255, 64, 0, 0.55), 0 0 0 0 rgba(255, 64, 0, 0.45); }
  50%      { box-shadow: 0 12px 28px -8px rgba(255, 64, 0, 0.55), 0 0 0 14px rgba(255, 64, 0, 0); }
}
@media (max-width: 480px) {
  .floating-zalo-cta {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .floating-zalo-cta {
    animation: none;
  }
  .floating-zalo-cta:hover {
    transform: none;
  }
}
