/* ============================================================
   IEAT Theme — Bootstrap 5 customization
   Brand: navy + orange · Thai-optimized typography
   ============================================================ */

:root {
  --ieat-navy: #744b9a;
  --ieat-blue: #9268b8;
  --ieat-sky: #b594d5;
  --ieat-orange: #F39C12;
  --ieat-amber: #FFB347;
  --ieat-ink: #0F172A;
  --ieat-slate: #475569;
  --ieat-mist: #F1F5F9;

  --emerald-500: #10b981;
  --emerald-700: #047857;
  --rose-700: #be123c;
  --violet-700: #6d28d9;

  --shadow-soft: 0 4px 24px -8px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 30px -12px rgba(116, 75, 154, 0.18);
  --shadow-glow: 0 0 0 6px rgba(243, 156, 18, 0.18);

  --bs-primary: #744b9a;
  --bs-link-color: #9268b8;
  --bs-link-hover-color: #744b9a;
  --bs-border-radius: 0.5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sarabun', system-ui, sans-serif;
  color: var(--ieat-ink);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  font-family: 'Prompt', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 3px solid var(--ieat-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 1000;
  background: var(--ieat-navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* ============== UTILITY COLORS ============== */
.text-ieat-navy {
  color: var(--ieat-navy) !important;
}

.text-ieat-blue {
  color: var(--ieat-blue) !important;
}

.text-ieat-orange {
  color: var(--ieat-orange) !important;
}

.text-ieat-amber {
  color: var(--ieat-amber) !important;
}

.text-ieat-ink {
  color: var(--ieat-ink) !important;
}

.text-ieat-slate {
  color: var(--ieat-slate) !important;
}

.text-white-85 {
  color: rgba(255, 255, 255, 0.85) !important;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.bg-ieat-navy {
  background-color: var(--ieat-navy) !important;
}

.bg-ieat-blue {
  background-color: var(--ieat-blue) !important;
}

.bg-ieat-orange {
  background-color: var(--ieat-orange) !important;
}

.bg-ieat-mist {
  background-color: var(--ieat-mist) !important;
}

.bg-emerald-500 {
  background-color: var(--emerald-500) !important;
}

.shadow-soft {
  box-shadow: var(--shadow-soft) !important;
}

.shadow-card {
  box-shadow: var(--shadow-card) !important;
}

/* ============== UTILITY BAR ============== */
.utility-bar {
  background: var(--ieat-navy);
  color: #fff;
  font-size: 0.875rem;
}

.utility-link {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.utility-link:hover {
  color: var(--ieat-amber);
}

.utility-muted {
  color: rgba(255, 255, 255, 0.8);
  cursor: default;
}

.utility-icon {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
}

.utility-icon:hover {
  color: var(--ieat-amber);
}

.utility-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.3);
}

.btn-lang {
  background: transparent;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-lang:hover {
  color: var(--ieat-amber);
}

/* ============== NAVBAR ============== */
.navbar {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-brand .brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #e9d0ff 100%);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
  flex-shrink: 0;
}

.navbar-brand:hover .brand-mark {
  box-shadow: var(--shadow-glow);
}

.brand-dot {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ieat-orange);
  border: 2px solid #fff;
}

.brand-text {
  font-size: 1.0625rem;
}

.brand-text .small {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

/* Navbar contact strip — homepage left side */
.nav-contact-strip {
  padding-left: 1rem;
  border-left: 1px solid #e5e7eb;
}

.nav-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ieat-ink);
  transition: color 0.2s;
}

.nav-contact-link:hover {
  color: var(--ieat-navy);
}

.nav-contact-link:hover .nav-contact-icon {
  background: var(--ieat-navy);
  color: #fff;
}

.nav-contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ieat-mist);
  color: var(--ieat-navy);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color 0.2s, color 0.2s;
}

.nav-contact-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-contact-label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ieat-slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-contact-value {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ieat-ink);
  margin-top: 1px;
}

.nav-contact-divider {
  width: 1px;
  height: 28px;
  background: #e5e7eb;
}

.nav-link-ieat {
  position: relative;
  color: var(--ieat-ink) !important;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link-ieat:hover {
  background: var(--ieat-mist);
  color: var(--ieat-navy) !important;
}

.nav-link-ieat.active {
  color: var(--ieat-navy) !important;
}

.nav-link-ieat.active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2px;
  background: var(--ieat-orange);
  border-radius: 2px;
}

/* ============== BUTTONS ============== */
.btn-ieat-navy {
  background: var(--ieat-navy);
  color: #fff;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.btn-ieat-navy:hover,
.btn-ieat-navy:focus {
  background: var(--ieat-blue);
  color: #fff;
}

.btn-ieat-orange {
  background: var(--ieat-orange);
  color: #fff;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-card);
  transition: background-color 0.2s, color 0.2s;
}

.btn-ieat-orange:hover,
.btn-ieat-orange:focus {
  background: var(--ieat-amber);
  color: var(--ieat-navy);
}

.btn-ieat-glass {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  backdrop-filter: blur(8px);
  transition: background-color 0.2s;
}

.btn-ieat-glass:hover,
.btn-ieat-glass:focus {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-outline-ieat {
  background: #fff;
  color: var(--ieat-navy);
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline-ieat:hover,
.btn-outline-ieat:focus {
  border-color: var(--ieat-blue);
  color: var(--ieat-blue);
}

/* ============== HERO ============== */
.hero-bg {
  background:
    radial-gradient(circle at 12% 20%, rgba(243, 156, 18, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 88% 80%, rgba(181, 148, 213, 0.22) 0%, transparent 50%),
    linear-gradient(135deg, #744b9a 0%, #9268b8 55%, #5d3a7d 100%);
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
}

.hero-blob-1 {
  top: -96px;
  right: -96px;
  width: 384px;
  height: 384px;
  background: rgba(243, 156, 18, 0.2);
}

.hero-blob-2 {
  bottom: -128px;
  left: -80px;
  width: 448px;
  height: 448px;
  background: rgba(146, 104, 184, 0.3);
}

.hero-highlight {
  background: linear-gradient(90deg, var(--ieat-amber), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats .col {
  position: relative;
}

.hero-stats .stat-divider {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 1rem;
}

@media (min-width: 576px) {
  .hero-stats .stat-divider {
    padding-left: 1.5rem;
  }
}

.hero-wave {
  display: block;
  width: 100%;
  height: 48px;
  position: relative;
  margin-bottom: -1px;
}

/* ============== BADGES & PILLS ============== */
.badge-pill-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
}

.badge-pill-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid rgba(243, 156, 18, 0.3);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ieat-orange);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-emerald {
  background: #d1fae5;
  color: var(--emerald-700);
}

.badge-blue {
  background: #dbeafe;
  color: var(--ieat-blue);
}

.badge-gray {
  background: #f3f4f6;
  color: #4b5563;
}

.badge-orange {
  background: #fef3c7;
  color: var(--ieat-orange);
}

/* ============== ANNOUNCEMENT CARD (HERO RIGHT) ============== */
.announcement-card {
  border-radius: 1rem;
  overflow: visible;
}

.ribbon {
  position: absolute;
  top: -12px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--ieat-orange);
  color: #fff;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  z-index: 1;
}

.timeline {
  display: grid;
  gap: 0.75rem;
}

.timeline li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.timeline-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ieat-mist);
  color: var(--ieat-navy);
  flex-shrink: 0;
  margin-top: 4px;
}

/* ============== QUICK ACCESS TILES ============== */
.quick-tiles-wrap {
  position: relative;
  z-index: 2;
  margin-top: -2.5rem;
}

@media (min-width: 576px) {
  .quick-tiles-wrap {
    margin-top: -3.5rem;
  }
}

.quick-tile {
  display: block;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
  height: 100%;
}

.quick-tile:hover {
  box-shadow: var(--shadow-card);
  border-color: rgba(146, 104, 184, 0.4);
}

.qt-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  transition: background-color 0.2s, color 0.2s;
}

.qt-icon-blue {
  background: #eff6ff;
  color: var(--ieat-blue);
}

.qt-icon-orange {
  background: #fffbeb;
  color: var(--ieat-orange);
}

.qt-icon-emerald {
  background: #ecfdf5;
  color: #059669;
}

.qt-icon-rose {
  background: #fff1f2;
  color: var(--rose-700);
}

.qt-icon-violet {
  background: #f5f3ff;
  color: var(--violet-700);
}

.quick-tile:hover .qt-icon-blue {
  background: var(--ieat-blue);
  color: #fff;
}

.quick-tile:hover .qt-icon-orange {
  background: var(--ieat-orange);
  color: #fff;
}

.quick-tile:hover .qt-icon-emerald {
  background: #059669;
  color: #fff;
}

.quick-tile:hover .qt-icon-rose {
  background: var(--rose-700);
  color: #fff;
}

.quick-tile:hover .qt-icon-violet {
  background: var(--violet-700);
  color: #fff;
}

/* ============== ANNOUNCEMENT CARDS ============== */
.announce-card {
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.announce-card:hover {
  box-shadow: var(--shadow-card) !important;
}

.card-stripe {
  height: 8px;
}

.stripe-emerald {
  background: linear-gradient(90deg, #34d399, #059669);
}

.stripe-blue {
  background: linear-gradient(90deg, var(--ieat-blue), var(--ieat-sky));
}

.stripe-gray {
  background: linear-gradient(90deg, #d1d5db, #9ca3af);
}

.stripe-orange {
  background: linear-gradient(90deg, var(--ieat-amber), var(--ieat-orange));
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============== FOOTER ============== */
.footer-ieat {
  background: var(--ieat-navy);
  color: rgba(255, 255, 255, 0.8);
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--ieat-amber);
}

.footer-logo-mark {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  color: var(--ieat-amber);
}

.footer-social {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: background-color 0.2s;
}

.footer-social:hover {
  background: var(--ieat-orange);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============== ANIMATIONS ============== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.7s ease-out both;
}

/* ============== PAGE HERO (rounds, faq) ============== */
.page-bg {
  background:
    radial-gradient(circle at 8% 0%, rgba(243, 156, 18, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 92% 0%, rgba(181, 148, 213, 0.18) 0%, transparent 45%),
    linear-gradient(180deg, var(--ieat-navy) 0%, var(--ieat-blue) 100%);
  position: relative;
  overflow: hidden;
}

.page-bg .grid-pattern {
  opacity: 0.5;
}

.breadcrumb-light {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-light ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-light a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-light a:hover {
  color: var(--ieat-amber);
}

.breadcrumb-light .sep {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-light .current {
  color: #fff;
  font-weight: 500;
}

.section-rounded-top {
  background: #fff;
  border-radius: 1.5rem 1.5rem 0 0;
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

/* ============== PILL TABS (rounds) ============== */
.pill-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.375rem;
  background: var(--ieat-mist);
  border-radius: 0.75rem;
}

.pill-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ieat-slate);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.pill-tab:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ieat-navy);
}

.pill-tab.active {
  background: #fff;
  color: var(--ieat-navy);
  box-shadow: var(--shadow-soft);
}

.pill-tab .count {
  margin-left: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  background: var(--ieat-mist);
  color: var(--ieat-slate);
  font-size: 0.6875rem;
  font-weight: 700;
}

.pill-tab[data-tab="open"] .count {
  background: #d1fae5;
  color: var(--emerald-700);
}

.pill-tab[data-tab="result"] .count {
  background: #dbeafe;
  color: var(--ieat-blue);
}

.pill-tab[data-tab="closed"] .count {
  background: #f3f4f6;
  color: #4b5563;
}

@media (max-width: 575.98px) {
  .pill-tabs {
    display: flex;
    width: 100%;
  }

  .pill-tab {
    flex: 1;
    padding: 0.625rem 0.5rem;
  }
}

/* ============== ROUND CARD ============== */
.round-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-soft);
}

.round-card:hover {
  box-shadow: var(--shadow-card);
}

.round-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--ieat-mist);
  color: var(--ieat-navy);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
}

.countdown-box {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fed7aa;
  border-radius: 0.75rem;
  padding: 1rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.countdown-cell {
  text-align: center;
}

.countdown-num {
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ieat-navy);
  font-variant-numeric: tabular-nums;
}

.countdown-num.accent {
  color: var(--ieat-orange);
}

.countdown-label {
  font-size: 0.625rem;
  color: var(--ieat-slate);
  margin-top: 0.25rem;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ieat-mist);
  color: var(--ieat-slate);
  display: grid;
  place-items: center;
  margin: 0 auto;
}

/* ============== FAQ PAGE ============== */
.faq-search {
  position: relative;
}

.faq-search input {
  width: 100%;
  padding: 1rem 3rem;
  border-radius: 0.75rem;
  border: 0;
  font-weight: 500;
  color: var(--ieat-ink);
  box-shadow: var(--shadow-card);
}

.faq-search input::placeholder {
  color: var(--ieat-slate);
}

.faq-search input:focus {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.4), var(--shadow-card);
}

.faq-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ieat-slate);
}

.faq-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--ieat-slate);
  cursor: pointer;
  display: none;
  transition: background-color 0.2s, color 0.2s;
}

.faq-clear:hover {
  background: var(--ieat-mist);
  color: var(--ieat-ink);
}

.faq-clear.show {
  display: inline-flex;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--ieat-mist);
  color: var(--ieat-slate);
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.cat-pill:hover {
  background: #e0f2fe;
  color: var(--ieat-navy);
}

.cat-pill.active {
  background: var(--ieat-navy);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.cat-pill .cat-count {
  margin-left: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
}

.cat-pill:not(.active) .cat-count {
  background: #fff;
  color: var(--ieat-slate);
}

.search-status {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  font-size: 0.875rem;
  color: var(--ieat-ink);
}

.faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: rgba(146, 104, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.faq-trigger {
  width: 100%;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.faq-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: var(--ieat-mist);
  color: var(--ieat-navy);
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-icon {
  width: 20px;
  height: 20px;
  margin-top: 0.5rem;
  color: var(--ieat-slate);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-item[data-open="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, margin-top 0.3s ease;
  padding: 0 1.25rem;
}

.faq-answer>div {
  overflow: hidden;
}

.faq-item[data-open="true"] .faq-answer {
  grid-template-rows: 1fr;
  margin-top: 0;
}

.faq-answer-inner {
  margin-left: 56px;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: var(--ieat-slate);
  line-height: 1.7;
}

.faq-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
}

.faq-cat-apply {
  background: #dbeafe;
  color: var(--ieat-blue);
}

.faq-cat-exam {
  background: #d1fae5;
  color: var(--emerald-700);
}

.faq-cat-report {
  background: #fef3c7;
  color: var(--ieat-orange);
}

.faq-cat-docs {
  background: #ffe4e6;
  color: var(--rose-700);
}

.faq-cat-other {
  background: #ede9fe;
  color: var(--violet-700);
}

mark {
  background: #FFE9B6;
  color: var(--ieat-ink);
  padding: 0 2px;
  border-radius: 3px;
}

/* Contact card sidebar */
.contact-card {
  background: linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.contact-card::before,
.contact-card::after {
  content: "";
  position: absolute;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.contact-card::before {
  top: -40px;
  right: -40px;
  background: rgba(243, 156, 18, 0.3);
}

.contact-card::after {
  bottom: -48px;
  left: -48px;
  background: rgba(181, 148, 213, 0.3);
}

.contact-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: var(--ieat-amber);
  position: relative;
}

.contact-link {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: #fff;
  transition: background-color 0.2s;
  position: relative;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.contact-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: var(--ieat-orange);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.contact-link:hover .contact-link-icon {
  transform: scale(1.05);
}

.tip-card {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 1rem;
  padding: 1.25rem;
}

.sticky-sidebar {
  position: sticky;
  top: 7rem;
}

/* Hide tab panel content not active */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ============== REPORT PAGE — INTRO CTA CARD ============== */
.intro-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.intro-card-banner {
  background:
    radial-gradient(circle at 90% 0%, rgba(243, 156, 18, 0.18) 0%, transparent 40%),
    linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  padding: 2rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.intro-card-banner::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.intro-icon-pad {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  color: var(--ieat-amber);
  backdrop-filter: blur(8px);
  position: relative;
}

/* ============== ALERT — ACCESS REQUIREMENT ============== */
.access-alert {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1px solid #fcd34d;
  border-left: 6px solid var(--ieat-orange);
  border-radius: 1rem;
  padding: 1.5rem;
}

.access-alert-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: var(--ieat-orange);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.access-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.access-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(243, 156, 18, 0.25);
  border-radius: 0.625rem;
}

.access-list .check-bubble {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ieat-orange);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--ieat-navy);
  color: #fff;
  font-family: 'Sarabun', system-ui, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ============== STEP INFOGRAPHIC ============== */
.step-track {
  position: relative;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .step-track {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }

  .step-track::before {
    content: "";
    position: absolute;
    top: 44px;
    left: 8%;
    right: 8%;
    height: 2px;
    background-image: linear-gradient(90deg, var(--ieat-navy) 25%, transparent 25%);
    background-size: 16px 2px;
    background-repeat: repeat-x;
    z-index: 0;
  }
}

.step-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.step-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.step-num-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.step-num {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 6px 20px -6px rgba(116, 75, 154, 0.4);
  position: relative;
  z-index: 1;
}

.step-num .step-label {
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--ieat-amber);
  margin-bottom: -2px;
  text-transform: uppercase;
}

.step-num .step-digit {
  font-size: 2rem;
  line-height: 1;
}

.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ieat-orange);
  color: #fff;
  display: grid;
  place-items: center;
  position: absolute;
  bottom: -2px;
  right: -8px;
  border: 3px solid #fff;
  z-index: 2;
}

.step-card h3 {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ieat-navy);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.step-card p {
  font-size: 0.8125rem;
  color: var(--ieat-slate);
  line-height: 1.6;
  margin: 0;
}

/* Last step gets a special "complete" gradient */
.step-card.step-final .step-num {
  background: linear-gradient(135deg, var(--ieat-orange), var(--ieat-amber));
  box-shadow: 0 6px 20px -6px rgba(243, 156, 18, 0.5);
}

.step-card.step-final .step-icon {
  background: var(--emerald-500);
}

/* ============== DOCUMENT CHECKLIST CARDS ============== */
.doc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1.125rem;
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  height: 100%;
}

.doc-card:hover {
  border-color: rgba(146, 104, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.625rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #eff6ff;
  color: var(--ieat-blue);
}

.doc-card.required .doc-card-icon {
  background: #fff1f2;
  color: var(--rose-700);
}

.doc-card.optional {
  background: #fafafa;
  border-style: dashed;
}

.doc-card.optional .doc-card-icon {
  background: #f3f4f6;
  color: var(--ieat-slate);
}

.doc-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
}

.doc-tag.required {
  background: #ffe4e6;
  color: var(--rose-700);
}

.doc-tag.optional {
  background: #f3f4f6;
  color: var(--ieat-slate);
}

.doc-tag.conditional {
  background: #fef3c7;
  color: var(--ieat-orange);
}

.file-spec-banner {
  background: var(--ieat-mist);
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--ieat-slate);
}

.file-spec-banner strong {
  color: var(--ieat-navy);
}

/* ============== DASHBOARD — PROFILE CARD ============== */
.dashboard-bg {
  background:
    radial-gradient(circle at 0% 0%, rgba(243, 156, 18, 0.06) 0%, transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(146, 104, 184, 0.08) 0%, transparent 35%),
    #F8FAFC;
  min-height: calc(100vh - 80px);
}

.profile-card {
  background: linear-gradient(135deg, var(--ieat-navy) 0%, var(--ieat-blue) 100%);
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.profile-card::before,
.profile-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.profile-card::before {
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(243, 156, 18, 0.3);
}

.profile-card::after {
  bottom: -80px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: rgba(146, 104, 184, 0.4);
}

.profile-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 767.98px) {
  .profile-grid {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .profile-grid .profile-actions {
    grid-column: 1 / -1;
  }
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ieat-amber), var(--ieat-orange));
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ieat-navy);
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.profile-status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #34d399;
  border: 3px solid var(--ieat-navy);
}

.profile-info .profile-name {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.profile-info .profile-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
}

.profile-tag svg {
  color: var(--ieat-amber);
}

.profile-tag strong {
  color: var(--ieat-amber);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* ============== COUNTDOWN STRIP ============== */
.deadline-strip {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  border: 1px solid #fcd34d;
  border-left: 5px solid var(--ieat-orange);
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.deadline-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.625rem;
  background: var(--ieat-orange);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.deadline-text {
  flex-grow: 1;
  min-width: 0;
}

.deadline-text .label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ieat-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deadline-text .value {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ieat-ink);
  margin-top: 2px;
}

.deadline-countdown {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.deadline-countdown .ct-cell {
  background: #fff;
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  padding: 0.4rem 0.625rem;
  text-align: center;
  min-width: 56px;
}

.deadline-countdown .ct-num {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ieat-navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.deadline-countdown .ct-cell.accent .ct-num {
  color: var(--ieat-orange);
}

.deadline-countdown .ct-label {
  font-size: 0.625rem;
  color: var(--ieat-slate);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ============== PROGRESS BAR ============== */
.progress-strip {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
}

.progress-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 0.625rem;
}

.progress-strip-head .label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  color: var(--ieat-navy);
}

.progress-strip-head .pct {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  color: var(--ieat-orange);
}

.progress-bar-rail {
  height: 8px;
  background: var(--ieat-mist);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ieat-orange), var(--ieat-amber));
  border-radius: 9999px;
  width: 0%;
  transition: width 0.4s ease;
}

/* ============== STEPPER (LOCKED STATES) ============== */
.stepper {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  overflow-x: auto;
}

.stepper-node {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 0.5rem;
  background: transparent;
  border: 0;
  cursor: default;
  user-select: none;
  text-decoration: none !important;
}

/* locked step — แค่ทำให้ดูจางลง (ไม่ต้องมี cursor pointer/not-allowed เพราะคลิกไม่ได้) */
.stepper-node.locked {
  opacity: 0.55;
}

.stepper-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(50% + 26px);
  right: calc(-50% + 26px);
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.stepper-node.completed:not(:last-child)::after {
  background: var(--emerald-500);
}

.stepper-circle {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e5e7eb;
  color: var(--ieat-slate);
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.stepper-node.current .stepper-circle {
  background: var(--ieat-navy);
  border-color: var(--ieat-navy);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(116, 75, 154, 0.12);
}

.stepper-node.completed .stepper-circle {
  background: var(--emerald-500);
  border-color: var(--emerald-500);
  color: #fff;
}

.stepper-node.locked .stepper-circle {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
}

.stepper-label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ieat-slate);
  margin-top: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stepper-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ieat-ink);
  margin-top: 0.125rem;
  line-height: 1.3;
}

.stepper-node.current .stepper-label {
  color: var(--ieat-navy);
}

.stepper-node.completed .stepper-label {
  color: var(--emerald-700);
}

.stepper-node.locked .stepper-title,
.stepper-node.locked .stepper-label {
  color: #9ca3af;
}

/* ============== STEP CONTENT CARD ============== */
.step-content-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

.step-content-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 1.5rem;
}

.step-content-num {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(116, 75, 154, 0.4);
}

.step-content-meta .label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ieat-orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.step-content-meta h2 {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--ieat-navy);
  margin: 2px 0 0;
}

.step-content-meta p {
  font-size: 0.8125rem;
  color: var(--ieat-slate);
  margin: 4px 0 0;
}

.step-form .form-label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--ieat-ink);
  margin-bottom: 0.375rem;
}

.step-form .form-control,
.step-form .form-select {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.step-form .form-control:focus,
.step-form .form-select:focus {
  border-color: var(--ieat-blue);
  box-shadow: 0 0 0 4px rgba(146, 104, 184, 0.1);
}

.required-mark {
  color: var(--ieat-orange);
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #f3f4f6;
}

.btn-step-prev {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: var(--ieat-slate);
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
}

.btn-step-prev:hover:not(:disabled) {
  border-color: var(--ieat-navy);
  color: var(--ieat-navy);
}

.btn-step-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-step-next {
  background: linear-gradient(135deg, var(--ieat-orange), #FF8C00);
  color: #fff;
  border: 0;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 14px -6px rgba(243, 156, 18, 0.5);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-step-next:hover {
  background: linear-gradient(135deg, var(--ieat-amber), var(--ieat-orange));
  box-shadow: 0 10px 18px -6px rgba(243, 156, 18, 0.6);
  color: #fff;
}

.lock-notice {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: var(--ieat-mist);
  border: 1px dashed #cbd5e1;
  border-radius: 0.625rem;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--ieat-slate);
}

.lock-notice svg {
  color: var(--ieat-slate);
  flex-shrink: 0;
}

/* ============== PDF PREVIEW (STEP 6) ============== */
.pdf-toolbar {
  background: #2d3748;
  color: #fff;
  padding: 0.625rem 1rem;
  border-radius: 0.625rem 0.625rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.8125rem;
}

.pdf-toolbar-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.pdf-toolbar-name svg {
  color: #f87171;
  flex-shrink: 0;
}

.pdf-toolbar-name span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-toolbar-actions {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.pdf-toolbar-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pdf-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pdf-toolbar-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.25rem;
}

.pdf-page-num {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
}

.pdf-viewer {
  background: #525659;
  padding: 1.5rem 1rem;
  border-radius: 0 0 0.625rem 0.625rem;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: auto;
  max-height: 720px;
}

.pdf-page {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #fff;
  padding: 3rem 2.75rem 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  font-family: 'Sarabun', system-ui, sans-serif;
  color: #1f2937;
  font-size: 0.875rem;
  line-height: 1.6;
}

.pdf-watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.pdf-watermark span {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 800;
  font-size: 5.5rem;
  color: rgba(243, 156, 18, 0.10);
  transform: rotate(-28deg);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pdf-page>*:not(.pdf-watermark) {
  position: relative;
  z-index: 1;
}

.pdf-doc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ieat-navy);
  margin-bottom: 1.25rem;
}

.pdf-logo-mark {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pdf-doc-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--ieat-slate);
  letter-spacing: 0.04em;
}

.pdf-doc-name {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ieat-navy);
  margin-top: 2px;
  line-height: 1.3;
}

.pdf-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  font-size: 0.6875rem;
  color: var(--ieat-slate);
  margin-top: 6px;
  font-family: 'Prompt', system-ui, sans-serif;
}

.pdf-doc-meta strong {
  color: var(--ieat-ink);
  font-weight: 600;
}

.pdf-section {
  margin-top: 1.25rem;
}

.pdf-section-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--ieat-navy);
  background: #f1f5f9;
  padding: 0.5rem 0.875rem;
  border-left: 3px solid var(--ieat-orange);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.pdf-row {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 0.625rem;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px dotted #e5e7eb;
}

.pdf-row:last-child {
  border-bottom: 0;
}

.pdf-label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 500;
  color: var(--ieat-slate);
  font-size: 0.8125rem;
}

.pdf-label::after {
  content: " :";
  color: #cbd5e1;
}

.pdf-value {
  color: #1f2937;
  font-weight: 500;
  font-size: 0.875rem;
}

.pdf-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.375rem;
}

.pdf-doc-list li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px dotted #e5e7eb;
}

.pdf-doc-list li:last-child {
  border-bottom: 0;
}

.pdf-doc-check {
  width: 18px;
  height: 18px;
  border-radius: 0.25rem;
  background: #d1fae5;
  color: #047857;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pdf-doc-list .doc-name {
  flex-grow: 1;
  color: var(--ieat-ink);
}

.pdf-doc-list .doc-status {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  color: var(--emerald-700);
  font-weight: 600;
  background: #ecfdf5;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.pdf-signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.pdf-sign-block {
  text-align: center;
}

.pdf-sign-line {
  border-bottom: 1px solid #1f2937;
  margin-bottom: 0.5rem;
  height: 3rem;
  display: grid;
  align-items: end;
  justify-content: center;
  padding-bottom: 0.25rem;
}

.pdf-sign-line .signature-mark {
  font-family: 'Sarabun', cursive, system-ui;
  font-style: italic;
  color: var(--ieat-blue);
  font-weight: 700;
  font-size: 1.25rem;
  transform: rotate(-3deg);
}

.pdf-sign-label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--ieat-ink);
  font-weight: 500;
  line-height: 1.4;
}

.pdf-sign-date {
  font-size: 0.6875rem;
  color: var(--ieat-slate);
  margin-top: 2px;
}

.pdf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  color: var(--ieat-slate);
  border-top: 1px solid #e5e7eb;
  padding-top: 0.625rem;
  margin-top: 1.5rem;
  font-family: 'Prompt', system-ui, sans-serif;
}

@media (max-width: 575.98px) {
  .pdf-page {
    padding: 2rem 1.25rem;
  }

  .pdf-row {
    grid-template-columns: 1fr;
    gap: 0.125rem;
    padding: 0.25rem 0;
  }

  .pdf-row .pdf-label {
    font-size: 0.75rem;
  }

  .pdf-signature {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pdf-watermark span {
    font-size: 3rem;
  }

  .pdf-doc-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============== STEP 6 — DOCUMENT REVIEWER (multi-doc) ============== */
.doc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  flex-wrap: wrap;
}

.doc-summary-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: rgb(220, 38, 38);
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.doc-summary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-summary-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  background: #fff;
  color: var(--ieat-ink);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-summary-light:hover {
  border-color: var(--ieat-navy);
  color: var(--ieat-navy);
}

.btn-summary-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--ieat-navy);
  color: #fff;
  border: 1px solid var(--ieat-navy);
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-summary-primary:hover {
  background: var(--ieat-blue);
  color: #fff;
}

/* Two-column grid */
.doc-viewer-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

@media (max-width: 991.98px) {
  .doc-viewer-grid {
    grid-template-columns: 1fr;
  }
}

/* Document list (sidebar) */
.doc-list-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  max-height: 640px;
  overflow-y: auto;
}

.doc-list-panel-header {
  padding: 8px 10px 10px;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--ieat-slate);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-list-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ieat-ink);
  font-family: inherit;
  transition: background-color 0.15s, border-color 0.15s;
}

.doc-list-item:hover {
  background: var(--ieat-mist);
}

.doc-list-item.active {
  background: rgba(116, 75, 154, 0.06);
  border-color: rgba(116, 75, 154, 0.3);
}

.doc-list-num {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  flex-shrink: 0;
  background: #eef0f7;
  color: var(--ieat-slate);
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.doc-list-item.active .doc-list-num {
  background: var(--ieat-navy);
  color: #fff;
}

.doc-list-body {
  flex: 1;
  min-width: 0;
}

.doc-list-code {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ieat-slate);
  margin-bottom: 2px;
}

.doc-list-item.active .doc-list-code {
  color: var(--ieat-navy);
}

.doc-list-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-list-meta {
  font-size: 11.5px;
  color: var(--ieat-slate);
  margin-top: 2px;
}

/* Doc viewer (right) */
.doc-viewer {
  background: #525659;
  border-radius: 12px;
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  min-height: 640px;
}

.doc-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgb(229, 231, 235);
  font-size: 13px;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
  font-family: 'Prompt', system-ui, sans-serif;
}

.doc-viewer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.doc-viewer-name .sep {
  opacity: 0.6;
}

.doc-viewer-name .doc-cur-name {
  opacity: 0.85;
}

.doc-viewer-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.doc-tool-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgb(255, 255, 255);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s;
}

.doc-tool-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.doc-tool-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

.doc-viewer-page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.doc-page {
  width: 560px;
  max-width: 100%;
  min-height: 792px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  position: relative;
  padding: 40px 44px 56px;
  color: rgb(26, 26, 26);
  font-size: 11.5px;
  line-height: 1.55;
  font-family: 'Sarabun', system-ui, sans-serif;
}

.doc-page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid rgb(26, 26, 26);
  margin-bottom: 14px;
}

.doc-page-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ieat-navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.doc-page-title-strip {
  flex: 1;
}

.doc-page-org {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.doc-page-orgsub {
  font-size: 10px;
  color: rgb(85, 85, 85);
}

.doc-page-meta {
  text-align: right;
  font-size: 10px;
  color: rgb(85, 85, 85);
  font-family: 'Prompt', system-ui, sans-serif;
}

.doc-page-doctitle {
  text-align: center;
  margin-bottom: 14px;
}

.doc-page-doctitle .name {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.doc-page-doctitle .num {
  font-size: 11px;
  color: rgb(85, 85, 85);
}

.doc-page-section {
  margin-bottom: 14px;
}

.doc-page-section-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 11.5px;
}

.doc-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 18px;
  font-size: 11px;
}

.doc-field {
  display: flex;
  gap: 8px;
}

.doc-field-label {
  color: rgb(102, 102, 102);
  min-width: 90px;
  font-size: 10.5px;
  font-family: 'Prompt', system-ui, sans-serif;
}

.doc-field-value {
  flex: 1;
  font-weight: 500;
  border-bottom: 1px dotted rgb(204, 204, 204);
  padding-bottom: 1px;
}

.doc-page-statement {
  margin-bottom: 18px;
  font-size: 11px;
  line-height: 1.7;
  color: rgb(51, 51, 51);
}

.doc-page-statement strong {
  font-family: 'Prompt', system-ui, sans-serif;
}

.doc-page-statement-divider {
  height: 0.5px;
  background: rgb(229, 229, 229);
  margin: 8px 0;
}

.doc-page-itemlist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 14px;
  font-size: 10.5px;
}

.doc-page-itemlist-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted rgb(204, 204, 204);
  padding-bottom: 2px;
}

.doc-page-itemlist-row span:first-child {
  color: rgb(119, 119, 119);
}

.doc-page-footer {
  position: absolute;
  bottom: 18px;
  left: 44px;
  right: 44px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgb(153, 153, 153);
  border-top: 1px solid rgb(238, 238, 238);
  padding-top: 6px;
  font-family: 'Prompt', system-ui, sans-serif;
}

.doc-page-footer .ref {
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* Bottom doc nav */
.doc-viewer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgb(229, 231, 235);
  font-size: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.doc-viewer-nav button {
  background: transparent;
  border: 0;
  color: rgb(255, 255, 255);
  cursor: pointer;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.doc-viewer-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.doc-viewer-nav-page {
  opacity: 0.7;
  font-family: 'Prompt', system-ui, sans-serif;
}

/* Certification section */
.cert-section {
  margin-top: 22px;
}

.cert-section-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--ieat-slate);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-card {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.cert-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cert-card-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(116, 75, 154, 0.08);
  color: var(--ieat-navy);
  display: grid;
  place-items: center;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
}

.cert-card-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ieat-ink);
}

.cert-card-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ieat-ink);
}

.cert-card-checkbox input {
  accent-color: var(--ieat-navy);
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.cert-card-checkbox span {
  line-height: 1.7;
}

/* Signer strip */
.signer-strip {
  margin-top: 14px;
  padding: 14px 18px;
  background: rgb(248, 250, 254);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ieat-slate);
  display: flex;
  align-items: center;
  gap: 10px;
}

.signer-strip svg {
  color: var(--ieat-slate);
  flex-shrink: 0;
}

.signer-strip strong {
  color: var(--ieat-ink);
}

/* Save draft button (in step-nav) */
.btn-save-draft {
  background: transparent;
  border: 0;
  color: var(--ieat-slate);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-save-draft:hover {
  color: var(--ieat-navy);
}

@media (max-width: 575.98px) {
  .doc-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .doc-summary-actions {
    display: flex;
  }

  .doc-summary-actions button {
    flex: 1;
    justify-content: center;
  }

  .doc-page {
    padding: 24px 20px 40px;
  }

  .doc-field-grid {
    grid-template-columns: 1fr;
  }

  .doc-page-itemlist {
    grid-template-columns: 1fr 1fr;
  }

  .doc-page-footer {
    left: 20px;
    right: 20px;
  }

  .doc-viewer-toolbar {
    font-size: 12px;
  }
}

/* ============================================================
   DARK MODE
   ============================================================ */

/* Smooth transition on theme switch (only on body bg + text) */
body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Theme toggle button — sits in utility bar */
.utility-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

.utility-toggle:hover {
  color: var(--ieat-amber);
}

.utility-toggle .theme-icon {
  width: 16px;
  height: 16px;
}

.utility-toggle .theme-label {
  font-size: 0.8125rem;
}

/* ============== DARK MODE OVERRIDES ============== */
[data-theme="dark"] {
  /* Re-tone semantic colors for dark surfaces */
  --ieat-ink: #e8e6f0;
  --ieat-slate: #a8a5c2;
  --ieat-mist: #1f1b32;
}

/* Page surfaces */
[data-theme="dark"] body {
  background: #0d0c18;
  color: #e8e6f0;
}

/* White-bg sections become deep purple-tinted dark */
[data-theme="dark"] .navbar.bg-white,
[data-theme="dark"] .bg-white {
  background-color: #19162a !important;
}

[data-theme="dark"] .navbar.bg-white {
  border-color: #2a2640 !important;
}

/* Section that uses bg-ieat-mist as page break — even darker */
[data-theme="dark"] .bg-ieat-mist {
  background-color: #14111f !important;
}

/* Cards & panels */
[data-theme="dark"] .card,
[data-theme="dark"] .quick-tile,
[data-theme="dark"] .announce-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .step-content-card,
[data-theme="dark"] .progress-strip,
[data-theme="dark"] .stepper,
[data-theme="dark"] .doc-summary,
[data-theme="dark"] .cert-card,
[data-theme="dark"] .doc-list-panel,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .round-card,
[data-theme="dark"] .intro-card,
[data-theme="dark"] .signer-strip,
[data-theme="dark"] .file-spec-banner,
[data-theme="dark"] .doc-card,
[data-theme="dark"] .lock-notice,
[data-theme="dark"] .empty-icon {
  background-color: #19162a !important;
  border-color: #2a2640 !important;
  color: #e8e6f0;
}

[data-theme="dark"] .section-rounded-top {
  background: #19162a !important;
}

/* Doc-card optional (dashed) */
[data-theme="dark"] .doc-card.optional {
  background-color: #15121f !important;
  border-color: #2a2640 !important;
}

/* Subtle pinkish/yellowish notice cards — desaturate for dark */
[data-theme="dark"] .access-alert {
  background: linear-gradient(135deg, #2a2138, #2c1f2a) !important;
  border-color: #5d4a2e !important;
}

[data-theme="dark"] .deadline-strip {
  background: linear-gradient(135deg, #2a2138, #2c1f2a) !important;
  border-color: #5d4a2e !important;
}

[data-theme="dark"] .login-warning {
  background: linear-gradient(135deg, #2a2138, #2c1f2a) !important;
  border-color: #5d4a2e !important;
  color: #e8e6f0 !important;
}

[data-theme="dark"] .tip-card {
  background: #2a2138 !important;
  border-color: #5d4a2e !important;
}

[data-theme="dark"] .search-status {
  background: #2a2138 !important;
  border-color: #5d4a2e !important;
  color: #e8e6f0 !important;
}

/* Profile-card / page-bg (purple gradient) — already dark, keep */
/* Hero-bg, footer-ieat — already dark, keep */

/* Text utilities */
[data-theme="dark"] .text-ieat-ink {
  color: #e8e6f0 !important;
}

[data-theme="dark"] .text-ieat-slate {
  color: #a8a5c2 !important;
}

[data-theme="dark"] .text-ieat-navy {
  color: #c8b3df !important;
}

[data-theme="dark"] .text-ieat-blue {
  color: #b594d5 !important;
}

/* Faded purple text in cards */
[data-theme="dark"] .step-content-meta h2,
[data-theme="dark"] .pdf-doc-name,
[data-theme="dark"] .doc-page-org,
[data-theme="dark"] .pdf-section-title,
[data-theme="dark"] .doc-page-section-title,
[data-theme="dark"] .step-card h3 {
  color: #c8b3df !important;
}

/* Profile tags / quick tile titles already use brand purple — soften */
[data-theme="dark"] .quick-tile h3 {
  color: #c8b3df !important;
}

/* Borders */
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
  border-color: #2a2640 !important;
}

/* Form controls */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea.form-control {
  background-color: #221d35 !important;
  border-color: #2a2640 !important;
  color: #e8e6f0 !important;
}

[data-theme="dark"] .form-control::placeholder {
  color: #7a7595 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #2a2440 !important;
  border-color: var(--ieat-blue) !important;
  box-shadow: 0 0 0 4px rgba(146, 104, 184, 0.18) !important;
}

/* Light icon background tiles → darken */
[data-theme="dark"] .qt-icon-blue {
  background: rgba(146, 104, 184, 0.18);
}

[data-theme="dark"] .qt-icon-orange {
  background: rgba(243, 156, 18, 0.18);
}

[data-theme="dark"] .qt-icon-emerald {
  background: rgba(16, 185, 129, 0.18);
}

[data-theme="dark"] .qt-icon-rose {
  background: rgba(190, 18, 60, 0.18);
}

[data-theme="dark"] .qt-icon-violet {
  background: rgba(109, 40, 217, 0.18);
}

[data-theme="dark"] .doc-card-icon {
  background: rgba(146, 104, 184, 0.18);
}

/* Pill tabs (rounds page) */
[data-theme="dark"] .pill-tabs {
  background: #14111f;
}

[data-theme="dark"] .pill-tab.active {
  background: #2a2440;
  color: #c8b3df;
}

[data-theme="dark"] .pill-tab .count {
  background: #2a2440;
  color: #a8a5c2;
}

/* Cat pills (FAQ) */
[data-theme="dark"] .cat-pill {
  background: #14111f;
  color: #a8a5c2;
}

[data-theme="dark"] .cat-pill.active {
  background: var(--ieat-navy);
  color: #fff;
}

[data-theme="dark"] .cat-pill:not(.active) .cat-count {
  background: #2a2440;
  color: #a8a5c2;
}

/* FAQ trigger numbered tile + answer */
[data-theme="dark"] .faq-num {
  background: #2a2440;
  color: #c8b3df;
}

[data-theme="dark"] .faq-answer-inner {
  color: #a8a5c2;
  border-top-color: #2a2640;
}

/* Mark highlight (search) */
[data-theme="dark"] mark {
  background: #5d4a2e;
  color: #ffe9b6;
}

/* Round card stripes stay vivid (decorative gradients), no change */

/* Round-card tag badges (mist bg) */
[data-theme="dark"] .round-tag {
  background: #2a2440;
  color: #c8b3df;
}

/* Countdown box (orange) — keep but darken bg */
[data-theme="dark"] .countdown-box {
  background: linear-gradient(135deg, #2c1f2a, #2a2138) !important;
  border-color: #5d4a2e !important;
}

[data-theme="dark"] .countdown-num {
  background: #19162a !important;
  color: #c8b3df !important;
}

/* PDF / doc viewer — keep dark gray viewer, page stays white inside */
[data-theme="dark"] .pdf-toolbar {
  background: #2d2640;
}

[data-theme="dark"] .pdf-viewer {
  background: #0a0915;
}

[data-theme="dark"] .doc-viewer {
  background: #0a0915;
}

[data-theme="dark"] .pdf-page,
[data-theme="dark"] .doc-page {
  background: #fff !important;
  color: #1a1a1a !important;
}

/* Reset child text colors inside pdf-page since they should remain dark on white */
[data-theme="dark"] .pdf-page * {
  color: inherit;
}

/* Stepper circles default state */
[data-theme="dark"] .stepper-circle {
  background: #19162a;
  border-color: #2a2640;
  color: #a8a5c2;
}

[data-theme="dark"] .stepper-node.locked .stepper-circle {
  background: #14111f;
  border-color: #2a2640;
  color: #6b6885;
}

/* Buttons (light bg) */
[data-theme="dark"] .btn-step-prev,
[data-theme="dark"] .btn-summary-light,
[data-theme="dark"] .btn-outline-ieat {
  background: #221d35;
  color: #e8e6f0;
  border-color: #2a2640;
}

[data-theme="dark"] .btn-step-prev:hover:not(:disabled),
[data-theme="dark"] .btn-summary-light:hover,
[data-theme="dark"] .btn-outline-ieat:hover {
  border-color: var(--ieat-blue);
  color: var(--ieat-blue);
}

/* Doc list active item */
[data-theme="dark"] .doc-list-item:hover {
  background: #221d35;
}

[data-theme="dark"] .doc-list-item.active {
  background: rgba(146, 104, 184, 0.15);
  border-color: rgba(146, 104, 184, 0.4);
}

[data-theme="dark"] .doc-list-num {
  background: #2a2440;
  color: #a8a5c2;
}

/* Cert card num */
[data-theme="dark"] .cert-card-num {
  background: rgba(146, 104, 184, 0.18);
  color: #c8b3df;
}

/* FAQ category labels */
[data-theme="dark"] .faq-cat-apply {
  background: rgba(146, 104, 184, 0.2);
  color: #c8b3df;
}

[data-theme="dark"] .faq-cat-exam {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

[data-theme="dark"] .faq-cat-report {
  background: rgba(243, 156, 18, 0.18);
  color: #fbbf77;
}

[data-theme="dark"] .faq-cat-docs {
  background: rgba(190, 18, 60, 0.18);
  color: #fda4af;
}

[data-theme="dark"] .faq-cat-other {
  background: rgba(109, 40, 217, 0.22);
  color: #c4b5fd;
}

/* Doc tags */
[data-theme="dark"] .doc-tag.required {
  background: rgba(190, 18, 60, 0.22);
  color: #fda4af;
}

[data-theme="dark"] .doc-tag.optional {
  background: #2a2440;
  color: #a8a5c2;
}

[data-theme="dark"] .doc-tag.conditional {
  background: rgba(243, 156, 18, 0.18);
  color: #fbbf77;
}

/* Status badges */
[data-theme="dark"] .badge-emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

[data-theme="dark"] .badge-blue {
  background: rgba(146, 104, 184, 0.2);
  color: #c8b3df;
}

[data-theme="dark"] .badge-gray {
  background: #2a2440;
  color: #a8a5c2;
}

/* Ribbon (announcement card) — keep orange */

/* Step nav border-top */
[data-theme="dark"] .step-nav {
  border-top-color: #2a2640 !important;
}

/* Section titles in PDF: navy text on light bg → keep */
/* Footer is already dark — no override */

/* Subtle bg-light fix (rgb(248 250 254)) — adjust for dark */
[data-theme="dark"] [style*="rgb(248, 250, 254)"],
[data-theme="dark"] [style*="rgb(248,250,254)"] {
  background: #221d35 !important;
}

/* Inline grey backgrounds via [style*=...] */
[data-theme="dark"] [style*="background:#f1f5f9"],
[data-theme="dark"] [style*="background: #f1f5f9"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"] {
  background: #221d35 !important;
}

/* Meta text inside hero on top of utility bar already light — no change */

/* ============================================================
   DARK MODE — LOGIN PAGE (split-screen layout)
   ============================================================ */
[data-theme="dark"] .form-pane {
  background: #19162a !important;
  color: #e8e6f0;
}
[data-theme="dark"] .form-heading { color: #e8e6f0 !important; }
[data-theme="dark"] .form-heading-sub { color: #a8a5c2 !important; }
[data-theme="dark"] .form-pane .section-label { color: var(--ieat-amber); }
[data-theme="dark"] .form-pane .section-label::before,
[data-theme="dark"] .form-pane .section-label::after { background: #2a2640; }
[data-theme="dark"] .login-form .form-label { color: #e8e6f0; }
[data-theme="dark"] .login-form .form-control {
  background: #221d35 !important;
  border-color: #2a2640 !important;
  color: #e8e6f0 !important;
}
[data-theme="dark"] .login-form .form-control::placeholder { color: #7a7595 !important; }
[data-theme="dark"] .login-form .form-control:focus {
  background: #2a2440 !important;
  border-color: var(--ieat-blue) !important;
  box-shadow: 0 0 0 4px rgba(146, 104, 184, 0.2) !important;
}
[data-theme="dark"] .input-icon { color: #a8a5c2; }
[data-theme="dark"] .password-toggle { color: #a8a5c2; }
[data-theme="dark"] .password-toggle:hover { background: #2a2440; color: #e8e6f0; }
[data-theme="dark"] .terms-check {
  background: #221d35 !important;
}
[data-theme="dark"] .terms-check:hover { background: #2a2440 !important; }
[data-theme="dark"] .terms-check label { color: #d8d5e8; }
[data-theme="dark"] .form-contact { border-top-color: #2a2640 !important; }
[data-theme="dark"] .form-contact-title { color: #a8a5c2; }
[data-theme="dark"] .form-contact-link {
  background: #221d35;
  color: #e8e6f0;
}
[data-theme="dark"] .form-contact-link:hover {
  background: #2a2440;
  color: #fff;
}

/* Login theme toggle button styling in dark mode */
[data-theme="dark"] .login-theme-toggle {
  border-color: #2a2640;
  color: #c8b3df;
}
[data-theme="dark"] .login-theme-toggle:hover {
  background: #2a2440;
  border-color: var(--ieat-blue);
  color: var(--ieat-blue);
}
[data-theme="dark"] .back-home {
  color: #a8a5c2;
}
[data-theme="dark"] .back-home:hover {
  background: #2a2440;
  color: #c8b3df;
}

/* Login warning callout (already covered, refresh) */
[data-theme="dark"] .login-warning {
  background: linear-gradient(135deg, #2a2138, #2c1f2a) !important;
  border-color: #5d4a2e !important;
  color: #e8e6f0 !important;
}

/* Section divider label inside login form */
[data-theme="dark"] .section-label::before,
[data-theme="dark"] .section-label::after { background: #2a2640; }

/* ============================================================
   DARK MODE — DASHBOARD inline backgrounds
   ============================================================ */
/* dashboard STEP 4/5 doc cards have inline style="background:#fff" */
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"] {
  background-color: #19162a !important;
  color: #e8e6f0;
}
/* RGB white variants */
[data-theme="dark"] [style*="background:#FFF"],
[data-theme="dark"] [style*="background: #FFF"] {
  background-color: #19162a !important;
}

/* Smooth transitions on theme switch — applied to common color-change properties */
body, .navbar, .card, .quick-tile, .announce-card, .step-card, .step-content-card,
.faq-item, .round-card, .doc-card, .position-card, .pdf-page, .doc-page,
.form-pane, .login-card, .form-control, .form-select, .btn, .stepper-circle,
.cat-pill, .pill-tab, .doc-list-item, .step-form .form-control, .nav-link-ieat,
.profile-card, .deadline-strip, .progress-strip, .stepper, .doc-summary, .cert-card,
.intro-card, .access-alert, .signer-strip, .file-spec-banner, .empty-icon, .lock-notice,
.utility-bar, .footer-ieat, .login-warning, .terms-check, .login-theme-toggle, .back-home {
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.2s ease,
    box-shadow 0.25s ease;
}

/* ============================================================
   POSITION DETAIL MODAL (rounds page)
   ============================================================ */

.position-modal .modal-content {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
}

.position-modal-header {
  background: linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  padding: 1.5rem 1.75rem 1.25rem;
  align-items: flex-start;
  border-bottom: 0;
}

.position-modal-header .btn-close {
  filter: invert(1) brightness(2);
  margin-top: 4px;
  opacity: 0.85;
}

.position-modal-header .btn-close:hover {
  opacity: 1;
}

.position-modal-code {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.position-modal-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0.625rem 0 0;
  line-height: 1.3;
  color: #fff;
}

.position-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.position-modal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.position-modal-body {
  padding: 1.5rem;
  background: #fafbfc;
}

.position-list-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ieat-orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.position-list-title::before,
.position-list-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* รายละเอียดประกาศ (ระดับ M_RECRUIT_ANN) — แสดงครั้งเดียวด้านบน */
.position-ann-detail {
  background: linear-gradient(135deg, rgba(116, 75, 154, 0.06), rgba(243, 156, 18, 0.06));
  border: 1px solid rgba(116, 75, 154, 0.18);
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  margin-bottom: 1.125rem;
}

.position-ann-detail-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ieat-navy);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.position-ann-detail-title svg {
  color: var(--ieat-orange);
}

.position-ann-detail-body {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--ieat-ink);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.position-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.position-card:hover {
  box-shadow: var(--shadow-soft);
  border-color: rgba(116, 75, 154, 0.25);
}

.position-card-head {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(135deg, rgba(116, 75, 154, 0.04), rgba(243, 156, 18, 0.04));
}

.position-card-num {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: rgba(116, 75, 154, 0.1);
  color: var(--ieat-navy);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.position-card-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ieat-navy);
  margin: 0.5rem 0 0;
  line-height: 1.3;
}

.position-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.position-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
}

.position-tag svg {
  flex-shrink: 0;
}

.position-tag.slots {
  background: #fef3c7;
  color: var(--ieat-orange);
}

.position-tag.level {
  background: rgba(116, 75, 154, 0.1);
  color: var(--ieat-navy);
}

.position-tag.dept {
  background: #ecfdf5;
  color: var(--emerald-700);
}

.position-tag.location {
  background: #f3f4f6;
  color: var(--ieat-slate);
}

.position-card-body {
  padding: 1.125rem 1.25rem 1.25rem;
}

.position-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem 1rem;
  padding: 1rem;
  background: var(--ieat-mist);
  border-radius: 0.625rem;
  margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
  .position-meta-grid {
    grid-template-columns: 1fr;
  }
}

.position-meta-item {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}

.position-meta-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  color: var(--ieat-navy);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

.position-meta-text {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.position-meta-label {
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ieat-slate);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.position-meta-value {
  font-weight: 500;
  color: var(--ieat-ink);
  font-size: 0.8125rem;
  margin-top: 2px;
}

.position-section {
  margin-top: 1.125rem;
}

.position-section-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--ieat-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.625rem;
}

.position-section-title::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--ieat-orange);
  border-radius: 2px;
}

.position-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.position-list li {
  display: flex;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ieat-ink);
}

.position-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ieat-orange);
  margin-top: 8px;
}

.position-card-footer {
  padding: 1rem 1.25rem;
  background: var(--ieat-mist);
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.position-deadline {
  font-size: 0.75rem;
  color: var(--ieat-slate);
  font-family: 'Prompt', system-ui, sans-serif;
}

.btn-position-apply {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: linear-gradient(135deg, var(--ieat-orange), #FF8C00);
  color: #fff;
  border: 0;
  border-radius: 0.5rem;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 14px -6px rgba(243, 156, 18, 0.5);
}

.btn-position-apply:hover {
  background: linear-gradient(135deg, var(--ieat-amber), var(--ieat-orange));
  color: #fff;
  box-shadow: 0 10px 18px -6px rgba(243, 156, 18, 0.6);
}

.btn-position-apply.disabled,
.btn-position-apply[disabled] {
  background: #d1d5db;
  color: #6b7280;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Dark mode for modal ===== */
[data-theme="dark"] .position-modal .modal-content {
  background: #19162a;
  color: #e8e6f0;
}

[data-theme="dark"] .position-modal-body {
  background: #14111f !important;
}

[data-theme="dark"] .position-card {
  background: #19162a !important;
  border-color: #2a2640 !important;
}

[data-theme="dark"] .position-card-head {
  background: linear-gradient(135deg, rgba(146, 104, 184, 0.08), rgba(243, 156, 18, 0.06));
  border-color: #2a2640 !important;
}

[data-theme="dark"] .position-card-title {
  color: #c8b3df;
}

[data-theme="dark"] .position-card-num {
  background: rgba(146, 104, 184, 0.18);
  color: #c8b3df;
}

[data-theme="dark"] .position-meta-grid {
  background: #221d35 !important;
}

[data-theme="dark"] .position-meta-icon {
  background: #19162a;
  color: #c8b3df;
  border-color: #2a2640;
}

[data-theme="dark"] .position-meta-value {
  color: #e8e6f0;
}

[data-theme="dark"] .position-list-title::before,
[data-theme="dark"] .position-list-title::after {
  background: #2a2640;
}

[data-theme="dark"] .position-card-footer {
  background: #221d35 !important;
  border-color: #2a2640 !important;
}

[data-theme="dark"] .position-tag.slots {
  background: rgba(243, 156, 18, 0.18);
  color: #fbbf77;
}

[data-theme="dark"] .position-tag.level {
  background: rgba(146, 104, 184, 0.2);
  color: #c8b3df;
}

[data-theme="dark"] .position-tag.dept {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

[data-theme="dark"] .position-tag.location {
  background: #2a2440;
  color: #a8a5c2;
}

[data-theme="dark"] .position-list li {
  color: #e8e6f0;
}

[data-theme="dark"] .position-section-title {
  color: #c8b3df;
}

/* ============================================================
   NEWS PAGE
   ============================================================ */

/* Featured news card */
.news-featured {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(243, 156, 18, 0.22) 0%, transparent 40%),
    linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  box-shadow: var(--shadow-card);
}

.news-featured::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(243, 156, 18, 0.18);
  filter: blur(60px);
  pointer-events: none;
}

.news-featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ieat-amber);
  position: relative;
}

.news-featured-tag .dot {
  background: var(--ieat-amber);
}

.news-featured-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.3;
  margin: 0.875rem 0 0.625rem;
  color: #fff;
  position: relative;
}

.news-featured-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  margin: 0 0 1rem;
  position: relative;
}

.news-featured-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  flex-wrap: wrap;
  position: relative;
  font-family: 'Prompt', system-ui, sans-serif;
}

.news-featured-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.news-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--ieat-orange);
  color: #fff;
  text-decoration: none;
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  position: relative;
  transition: background 0.2s;
}

.news-featured-cta:hover {
  background: var(--ieat-amber);
  color: var(--ieat-navy);
}

/* News list row */
.news-list {
  display: grid;
  gap: 0.75rem;
}

.news-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.25rem;
  padding: 1.125rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  align-items: start;
}

.news-row:hover {
  box-shadow: var(--shadow-soft);
  border-color: rgba(116, 75, 154, 0.3);
  color: inherit;
}

.news-date-block {
  background: linear-gradient(135deg, var(--ieat-navy), var(--ieat-blue));
  color: #fff;
  border-radius: 0.625rem;
  padding: 0.875rem 0.5rem;
  text-align: center;
  font-family: 'Prompt', system-ui, sans-serif;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-date-day {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1;
}

.news-date-month {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.9;
}

.news-date-year {
  font-size: 0.625rem;
  margin-top: 2px;
  opacity: 0.7;
  letter-spacing: 0.04em;
}

.news-content {
  min-width: 0;
}

.news-meta-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.news-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.625rem;
  border-radius: 9999px;
  font-family: 'Prompt', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
}

.news-cat-announce {
  background: rgba(116, 75, 154, 0.1);
  color: var(--ieat-navy);
}

.news-cat-activity {
  background: #ecfdf5;
  color: var(--emerald-700);
}

.news-cat-award {
  background: #fef3c7;
  color: var(--ieat-orange);
}

.news-cat-invest {
  background: #fff7ed;
  color: #c2410c;
}

.news-cat-pr {
  background: #f3f4f6;
  color: var(--ieat-slate);
}

.news-title {
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ieat-navy);
  margin: 0 0 0.5rem;
  line-height: 1.4;
  transition: color 0.2s;
}

.news-row:hover .news-title {
  color: var(--ieat-blue);
}

.news-excerpt {
  color: var(--ieat-slate);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta-bottom {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--ieat-slate);
  flex-wrap: wrap;
  font-family: 'Prompt', system-ui, sans-serif;
}

.news-meta-bottom span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.news-readmore {
  margin-left: auto;
  color: var(--ieat-orange);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
}

.news-row:hover .news-readmore {
  gap: 0.5rem;
}

/* Pagination */
.pagination-news {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 0.875rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: var(--ieat-ink);
  font-family: 'Prompt', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--ieat-navy);
  color: var(--ieat-navy);
}

.page-btn.active {
  background: var(--ieat-navy);
  border-color: var(--ieat-navy);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Mobile: stack news row vertically */
@media (max-width: 575.98px) {
  .news-row {
    grid-template-columns: 1fr;
  }

  .news-date-block {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    align-self: flex-start;
    align-items: baseline;
  }

  .news-date-day {
    font-size: 1.125rem;
  }

  .news-date-month {
    margin-top: 0;
  }

  .news-date-year {
    margin-top: 0;
  }

  .news-featured {
    padding: 1.5rem;
  }
}

/* Dark mode news */
[data-theme="dark"] .news-row {
  background: #19162a !important;
  border-color: #2a2640 !important;
}

[data-theme="dark"] .news-row:hover {
  border-color: rgba(146, 104, 184, 0.5) !important;
}

[data-theme="dark"] .news-title {
  color: #c8b3df;
}

[data-theme="dark"] .news-row:hover .news-title {
  color: #e8d4ff;
}

[data-theme="dark"] .news-excerpt {
  color: #a8a5c2;
}

[data-theme="dark"] .news-meta-bottom {
  color: #a8a5c2;
}

[data-theme="dark"] .page-btn {
  background: #19162a;
  border-color: #2a2640;
  color: #e8e6f0;
}

[data-theme="dark"] .page-btn:hover:not(:disabled) {
  border-color: var(--ieat-blue);
  color: var(--ieat-blue);
}

[data-theme="dark"] .page-btn.active {
  background: var(--ieat-navy);
  color: #fff;
  border-color: var(--ieat-navy);
}

[data-theme="dark"] .news-cat-announce {
  background: rgba(146, 104, 184, 0.2);
  color: #c8b3df;
}

[data-theme="dark"] .news-cat-activity {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

[data-theme="dark"] .news-cat-award {
  background: rgba(243, 156, 18, 0.18);
  color: #fbbf77;
}

[data-theme="dark"] .news-cat-invest {
  background: rgba(234, 88, 12, 0.18);
  color: #fb923c;
}

[data-theme="dark"] .news-cat-pr {
  background: #2a2440;
  color: #a8a5c2;
}