:root {
  --bg-page: #faf7f2;
  --bg-card: #ffffff;
  --bg-subtle: #f4efe6;
  --text-main: #18221f;
  --text-secondary: #4a5753;
  --text-muted: #76847f;

  --brand-emerald: #135d47;
  --brand-emerald-dark: #0c4131;
  --brand-emerald-light: #e6f4ef;
  --brand-amber: #d97706;
  --brand-amber-light: #fef3c7;
  --brand-coral: #c2593f;
  --brand-indigo: #4f46e5;

  --border-color: #e4ddd3;
  --border-focus: #135d47;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  --shadow-sm: 0 2px 8px rgba(24, 34, 31, 0.05);
  --shadow-md: 0 12px 32px -4px rgba(24, 34, 31, 0.08), 0 4px 12px -2px rgba(24, 34, 31, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(19, 93, 71, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: 'IBM Plex Sans Thai', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Decorative Ambient Background */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.55;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #fde68a 0%, rgba(253, 230, 138, 0) 70%);
  top: -140px;
  right: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #a7f3d0 0%, rgba(167, 243, 208, 0) 70%);
  top: 420px;
  left: -180px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(19, 93, 71, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 221, 211, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-emerald), var(--brand-emerald-dark));
  color: #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(19, 93, 71, 0.22);
  flex-shrink: 0;
}

.brand-logo svg {
  width: 28px;
  height: 28px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-emerald);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--brand-emerald);
}

.btn-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-admin-toggle:hover {
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
  transform: translateY(-1px);
}

.count-pill {
  background: var(--brand-emerald);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--brand-emerald-light);
  color: var(--brand-emerald-dark);
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(19, 93, 71, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

.hero-heading {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-emerald) 0%, #c2593f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subline {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 620px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.highlight-icon {
  font-size: 1.45rem;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.highlight-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.highlight-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.btn-lg {
  padding: 0.95rem 1.65rem;
  font-size: 1.02rem;
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-emerald) 0%, var(--brand-emerald-dark) 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px -6px rgba(19, 93, 71, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(19, 93, 71, 0.55);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
  transform: translateY(-2px);
}

/* Tutor Showcase Card */
.tutor-showcase-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.tutor-showcase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-emerald), #f59e0b, var(--brand-coral));
}

.tutor-card-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

.tutor-avatar-main {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-emerald);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.tutor-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-emerald);
  background: var(--brand-emerald-light);
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.3rem;
}

.tutor-name {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}

.tutor-cred {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.schedule-mini-list {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.schedule-mini-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.schedule-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.48rem 0.65rem;
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  border: 1px solid rgba(228, 221, 211, 0.7);
}

.schedule-mini-item:last-child {
  margin-bottom: 0;
}

.day-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
  min-width: 74px;
  text-align: center;
}

.day-mon {
  background: #fef3c7;
  color: #92400e;
}

.day-tue {
  background: #fce7f3;
  color: #9d174d;
}

.day-sun {
  background: #fee2e2;
  color: #991b1b;
}

.course-mini-name {
  font-weight: 600;
  flex: 1;
  margin-left: 0.75rem;
}

.time-mini {
  font-weight: 600;
  color: var(--brand-emerald);
  font-size: 0.82rem;
}

.partner-course-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  margin-bottom: 1rem;
}

.tutor-avatar-sub {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d97706;
  flex-shrink: 0;
}

.partner-info {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
}

.partner-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
}

.partner-info strong {
  font-size: 0.9rem;
  color: #78350f;
}

.partner-info span {
  color: #92400e;
}

.contact-strip {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contact-pill {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.contact-pill:hover {
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
}

/* Course Showcase Section */
.courses-section {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-emerald);
  background: var(--brand-emerald-light);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.course-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.65rem;
}

.course-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.course-card.selected {
  border-color: var(--brand-emerald);
  box-shadow: 0 0 0 4px rgba(19, 93, 71, 0.14), var(--shadow-lg);
}

.course-poster-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f3e8d8;
  overflow: hidden;
  cursor: zoom-in;
}

.course-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.course-poster-wrap:hover .course-poster-img {
  transform: scale(1.04);
}

.poster-zoom-hint {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(24, 34, 31, 0.78);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.course-price-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--brand-emerald);
  color: #fde68a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.course-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.level-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
}

.level-m4 {
  background: #ffedd5;
  color: #9a3412;
}

.level-m5 {
  background: #fef3c7;
  color: #92400e;
}

.level-alevel {
  background: #e0e7ff;
  color: #3730a3;
}

.schedule-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.course-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.course-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.topic-list {
  list-style: none;
  margin-bottom: 1.25rem;
  flex: 1;
}

.topic-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.topic-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-emerald);
  font-weight: 800;
}

.course-meta-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.location-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.btn-select-course {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--brand-emerald);
  background: transparent;
  color: var(--brand-emerald);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: all 0.2s;
}

.btn-select-course:hover {
  background: var(--brand-emerald-light);
}

.course-card.selected .btn-select-course {
  background: var(--brand-emerald);
  color: #ffffff;
}

.check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.course-card.selected .check-circle::after {
  content: '✓';
  font-size: 0.72rem;
  font-weight: 900;
}

/* Registration Form Section */
.registration-section {
  padding: 2rem 0 4.5rem;
}

.reg-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 2rem;
  align-items: start;
}

.reg-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 2.2rem;
}

.form-card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.4rem;
  margin-bottom: 1.8rem;
}

.step-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.step-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-emerald-light);
  color: var(--brand-emerald-dark);
}

.step-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.form-main-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.req {
  color: var(--danger);
  font-weight: 700;
}

.opt-tag {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.form-section-block {
  margin-bottom: 2.2rem;
}

.block-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.block-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-emerald);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.block-subtext {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: -0.45rem;
  margin-bottom: 1rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: #fdfcfb;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text-main);
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-emerald);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(19, 93, 71, 0.12);
}

.form-input.invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.grade-input-wrapper {
  position: relative;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.grade-quick-chips {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.chip-btn {
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.chip-btn:hover,
.chip-btn.active {
  background: var(--brand-emerald);
  color: #fff;
  border-color: var(--brand-emerald);
}

.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

.field-error.visible {
  display: block;
}

/* Course Checkbox Items inside Form */
.course-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.course-check-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  background: #fdfcfb;
  cursor: pointer;
  transition: all 0.2s;
}

.course-check-item:hover {
  border-color: #9ca3af;
}

.course-check-item.checked {
  border-color: var(--brand-emerald);
  background: #f2fbf7;
  box-shadow: 0 4px 14px rgba(19, 93, 71, 0.08);
}

.course-check-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--brand-emerald);
  cursor: pointer;
  flex-shrink: 0;
}

.mini-poster-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.course-check-info {
  flex: 1;
}

.course-check-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.course-check-top strong {
  font-size: 1.02rem;
}

.price-pill {
  background: var(--brand-emerald-light);
  color: var(--brand-emerald-dark);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

.course-check-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.time-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-emerald);
}

/* Payment & Upload */
.payment-instruction-box {
  background: var(--bg-subtle);
  border-radius: 16px;
  padding: 1.15rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.payment-rule-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.rule-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-text strong {
  display: block;
  font-size: 0.98rem;
}

.rule-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.highlight-pp {
  color: var(--brand-emerald);
  font-size: 1rem;
  text-decoration: underline;
}

.payment-options-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.pay-type-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.pay-type-card.active {
  border-color: var(--brand-emerald);
  background: #f2fbf7;
}

.pay-type-card input[type="radio"] {
  margin-top: 0.25rem;
  accent-color: var(--brand-emerald);
}

.pay-type-body {
  display: flex;
  flex-direction: column;
}

.pay-type-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pay-type-amount {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--brand-emerald-dark);
}

.pay-type-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Slip Dropzone */
.slip-dropzone {
  border: 2px dashed #9ca3af;
  border-radius: 16px;
  background: #fdfcfb;
  padding: 1.6rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.slip-dropzone:hover,
.slip-dropzone.dragover {
  border-color: var(--brand-emerald);
  background: #f2fbf7;
}

.upload-cloud-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand-emerald-light);
  color: var(--brand-emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.dropzone-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.dropzone-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dropzone-preview {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
}

.dropzone-preview img {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--brand-emerald);
  box-shadow: var(--shadow-sm);
}

.slip-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slip-ok-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-emerald-dark);
  background: var(--brand-emerald-light);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  width: fit-content;
}

.btn-remove-slip {
  margin-top: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}

.btn-remove-slip:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-submit-full {
  width: 100%;
  padding: 1.05rem;
  font-size: 1.08rem;
  border-radius: 14px;
}

/* Sticky Payment Sidebar */
.reg-sidebar {
  position: sticky;
  top: 94px;
}

.sticky-payment-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.promptpay-header {
  text-align: center;
  margin-bottom: 1rem;
}

.pp-logo-badge {
  display: inline-block;
  background: #003d6b;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

.promptpay-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.qr-box {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.qr-code-img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
  display: block;
}

.qr-amount-pill {
  background: var(--brand-emerald-light);
  color: var(--brand-emerald-dark);
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  font-size: 0.86rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pp-number-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
}

.pp-number-info {
  display: flex;
  flex-direction: column;
}

.pp-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.pp-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-emerald-dark);
  letter-spacing: 0.02em;
}

.pp-owner {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.btn-copy-pp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--brand-emerald);
  background: var(--bg-card);
  color: var(--brand-emerald);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-pp:hover {
  background: var(--brand-emerald);
  color: #fff;
}

.order-summary-box {
  border-top: 1px solid var(--border-color);
  padding-top: 1.1rem;
  margin-bottom: 1.1rem;
}

.order-summary-box h4 {
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
}

.summary-course-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.summary-course-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  background: var(--bg-subtle);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}

.summary-empty {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
}

.summary-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.65rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.highlight-row {
  font-size: 0.98rem;
  color: var(--brand-emerald-dark);
  background: var(--brand-emerald-light);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-weight: 700;
}

.remain-row {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.help-contact-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 0.85rem;
  font-size: 0.82rem;
}

.help-title {
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.2rem;
}

.help-phones {
  margin-top: 0.35rem;
  color: #78350f;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: #18221f;
  color: #d1d5db;
  padding: 2.2rem 0;
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner strong {
  color: #ffffff;
  display: block;
  margin-bottom: 0.2rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-links a,
.link-btn {
  color: #9ca3af;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.footer-links a:hover,
.link-btn:hover {
  color: #ffffff;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 20, 0.72);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

.lightbox-dialog {
  position: relative;
  max-width: 640px;
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.lightbox-dialog img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
}

.lightbox-caption {
  margin-top: 0.65rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
}

.success-modal-card {
  max-width: 580px;
}

.ticket-header {
  text-align: center;
  margin-bottom: 1.4rem;
}

.success-check-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.ticket-status-pill {
  display: block;
  width: fit-content;
  margin: 0 auto 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--brand-emerald-light);
  color: var(--brand-emerald-dark);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
}

.ticket-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.registration-ticket {
  background: var(--bg-subtle);
  border: 2px dashed var(--brand-emerald);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.4rem;
}

.ticket-top-bar {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
}

.ticket-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.ticket-body-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  font-size: 0.88rem;
}

.ticket-field span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticket-field.full {
  grid-column: 1 / -1;
}

.ticket-course-highlight {
  color: var(--brand-emerald-dark);
  font-size: 0.96rem;
}

.text-emerald {
  color: var(--brand-emerald);
}

.success-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.success-actions .btn {
  flex: 1;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
}

/* Admin Dashboard Modal */
.admin-modal-card {
  max-width: 1080px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
}

.admin-header-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-box span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.stat-box strong {
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

.btn-webhook-cfg {
  margin-top: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}

.webhook-config-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.15rem;
  font-size: 0.85rem;
}

.webhook-config-box p {
  color: var(--text-secondary);
  margin: 0.3rem 0 0.75rem;
}

.webhook-input-row {
  display: flex;
  gap: 0.6rem;
}

.admin-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-search {
  flex: 1;
}

.admin-filter {
  max-width: 240px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.empty-table-cell {
  text-align: center;
  padding: 2.5rem !important;
  color: var(--text-muted);
}

.status-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.status-verified {
  background: #d1fae5;
  color: #065f46;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.btn-table-action {
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  margin-right: 0.25rem;
}

.btn-table-action:hover {
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #18221f;
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid,
  .reg-layout {
    grid-template-columns: 1fr;
  }

  .course-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reg-sidebar {
    position: static;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .header-nav .nav-link {
    display: none;
  }

  .hero-highlights,
  .course-cards-grid,
  .form-grid-2,
  .payment-options-row,
  .ticket-body-grid {
    grid-template-columns: 1fr;
  }

  .reg-form-card {
    padding: 1.35rem;
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-filter {
    max-width: 100%;
  }
}

/* Refinements for clear course selection and a dedicated timetable */
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
section[id] { scroll-margin-top: 100px; }
.hero-description { max-width: 58ch; line-height: 1.75; }
.highlight-card, .course-card, .tutor-showcase-card { box-shadow: 0 10px 28px rgba(20, 48, 38, .07); }
.schedule-section { padding: 4.5rem 0; background: #f7f8f3; }
.schedule-grid { max-width: 920px; margin: 2rem auto 0; border: 1px solid #dce8df; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 14px 34px rgba(20,48,38,.06); }
.schedule-row { display: grid; grid-template-columns: 120px 1fr 170px 120px; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; border-bottom: 1px solid #edf0ec; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-day { color: #0c6049; background: #e5f5ed; border-radius: 999px; padding: .4rem .8rem; font-weight: 700; text-align: center; }
.schedule-row a { color: #0b624b; font-weight: 700; text-decoration: none; }
.schedule-row a:hover, .poster-link:hover { text-decoration: underline; }
.schedule-footnote { text-align: center; color: #52655a; font-size: .9rem; margin-top: 1.2rem; }
.course-cover { height: 245px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 2rem; color: #123b30; background: linear-gradient(135deg,#e8f1e9,#c9e6d4); }
.course-cover-m5 { background: linear-gradient(135deg,#fff0d1,#f6dca1); }
.course-cover-alevel { background: linear-gradient(135deg,#e3ece4,#c9d8cb); }
.course-cover-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .16em; opacity: .7; }
.course-cover strong { font-size: clamp(3rem,5vw,4.4rem); line-height: 1.1; margin: .3rem 0; position: relative; z-index: 1; }
.course-cover > span:nth-child(3) { position: relative; z-index: 1; font-weight: 600; }
.course-cover img { position: absolute; right: 2%; bottom: -35%; height: 130%; max-width: 52%; object-fit: contain; }
.poster-link { border: 0; background: none; color: #0b624b; font: inherit; font-weight: 700; padding: .4rem 0 1rem; text-align: left; cursor: pointer; }
@media (max-width: 680px) { .schedule-section { padding: 3rem 0; } .schedule-row { grid-template-columns: 88px 1fr; gap: .45rem 1rem; padding: 1rem; } .schedule-row a { grid-column: 2; } .course-cover { height: 210px; } }
