/* ============================================================
   ระบบรับสมัครนักศึกษา — Design tokens
   Palette: Ink Navy / Indigo / cool Paper / Gold seal accent
   Type: Noto Serif Thai (display) + Noto Sans Thai (body) + JetBrains Mono (data)
   ============================================================ */

:root {
  --ink: #14213d;
  --indigo: #1b2a56;
  --indigo-deep: #101a38;
  --indigo-soft: #eef1f8;
  --paper: #f5f6fb;
  --card: #ffffff;
  --line: #e1e4ee;
  --muted: #5b6b8c;
  --gold: #c9a227;
  --gold-soft: #f6ecc9;
  --success: #2f7d5c;
  --success-soft: #e4f3ec;
  --warning: #b8791a;
  --warning-soft: #fbf0dd;
  --danger: #b3423a;
  --danger-soft: #fbe9e7;
  --info: #35608f;
  --info-soft: #e6eef8;
  --radius: 12px;
  --shadow: 0 10px 30px -14px rgba(20, 33, 61, 0.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4, .display {
  font-family: "Noto Serif Thai", "Times New Roman", serif;
  color: var(--ink);
  margin: 0 0 0.4em;
  font-weight: 700;
}

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.brand-mark img { height: 100%; width: auto; object-fit: contain; display: block; }
.brand-text { line-height: 1.2; }
.brand-text strong { display: block; font-family: "Noto Serif Thai", serif; font-size: 17px; }
.brand-text span { color: var(--muted); font-size: 12.5px; }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 12% 15%, rgba(201,162,39,0.10), transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(27,42,86,0.08), transparent 45%),
    var(--paper);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.auth-card .brand { justify-content: center; flex-direction: column; text-align: center; margin-bottom: 22px; }
.auth-card .brand-text strong { font-size: 20px; }
.auth-title { text-align: center; margin-bottom: 4px; font-size: 21px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=tel], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
input[readonly] { background: var(--indigo-soft); color: var(--muted); cursor: not-allowed; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(27,42,86,0.14);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform .05s ease, opacity .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-deep); text-decoration: none; }
.btn-gold { background: var(--gold); color: #1b1400; }
.btn-gold:hover { opacity: .9; text-decoration: none; }
.btn-warning-bright { background: #f5c518; color: #1b1400; border-color: #f5c518; font-weight: 700; }
.btn-warning-bright:hover { background: #e0b310; text-decoration: none; }
.btn-outline { background: transparent; color: var(--indigo); border-color: var(--indigo); }
.btn-outline:hover { background: var(--indigo-soft); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: rgba(47,125,92,.25); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(179,66,58,.25); }
.alert ul { margin: 4px 0 0 18px; padding: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
}
.badge-slate   { background: var(--indigo-soft); color: var(--muted); }
.badge-info    { background: var(--info-soft); color: var(--info); }
.badge-amber   { background: var(--warning-soft); color: var(--warning); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }

/* ---------- Top bar (applicant) ---------- */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); }
.topbar-user strong { color: var(--ink); }

.page { padding: 32px 0 64px; }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }

/* ---------- Card ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px;
}
.card h3 { font-size: 16.5px; margin-bottom: 14px; }

/* ---------- Stepper (application flow) ---------- */
.stepper { display: flex; gap: 6px; margin-bottom: 28px; list-style: none; padding: 0; }
.stepper li {
  flex: 1; text-align: center; padding: 10px 6px 12px;
  border-bottom: 3px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.stepper li .num {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  background: var(--indigo-soft); color: var(--muted);
  align-items: center; justify-content: center; font-size: 12px; margin-bottom: 6px;
}
.stepper li.active { border-color: var(--indigo); color: var(--ink); }
.stepper li.active .num { background: var(--indigo); color: #fff; }
.stepper li.done { border-color: var(--gold); color: var(--ink); }
.stepper li.done .num { background: var(--gold); color: #1b1400; }

/* ---------- Seal / official stamp — signature element ---------- */
.seal {
  width: 128px; height: 128px; border-radius: 50%;
  border: 2px double var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--indigo); text-align: center;
  transform: rotate(-6deg);
  margin: 0 auto;
  background: var(--gold-soft);
}
.seal .seal-eyebrow { font-size: 9.5px; letter-spacing: .08em; color: var(--gold); font-weight: 700; }
.seal .seal-no { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 13px; margin-top: 4px; }
.seal .seal-foot { font-size: 8.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Dashboard stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-card .n { font-family: "Noto Serif Thai", serif; font-size: 30px; font-weight: 700; color: var(--indigo); }
.stat-card .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Table ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 12px; background: var(--indigo-soft);
  color: var(--ink); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em;
}
table.data th:first-child { border-radius: 8px 0 0 8px; }
table.data th:last-child { border-radius: 0 8px 8px 0; }

/* ---------- Data table: หัวตารางเรียงลำดับได้ + ตัวแบ่งหน้า ---------- */
table.data-table-enhanced th.sortable-th { cursor: pointer; user-select: none; position: relative; padding-right: 22px; }
table.data-table-enhanced th.sortable-th:hover { background: var(--indigo-soft); }
table.data-table-enhanced th.sortable-th::after {
  content: '↕'; position: absolute; right: 8px; color: var(--muted); font-size: 12px; opacity: .6;
}
table.data-table-enhanced th.sort-asc::after { content: '↑'; opacity: 1; color: var(--indigo); }
table.data-table-enhanced th.sort-desc::after { content: '↓'; opacity: 1; color: var(--indigo); }
.data-table-pager { display: flex; align-items: center; justify-content: center; margin-top: 14px; }
.data-table-search { margin-bottom: 12px; }
.data-table-search input {
  width: 100%; max-width: 340px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit;
}
.data-table-search input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }


/* ---------- Toggle switch (เปิด/ปิดรับสมัคร) ---------- */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; vertical-align: middle; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .toggle-slider {
  position: absolute; inset: 0; background: var(--muted); border-radius: 999px;
  transition: background-color .2s ease;
}
.toggle-switch .toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--indigo); outline-offset: 2px; }

table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 224px; background: var(--indigo); color: #eef1f8; flex-shrink: 0;
  padding: 22px 16px; display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar .brand-text strong, .admin-sidebar .brand-text span { color: #fff; }
.admin-sidebar .brand { margin-bottom: 26px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.admin-sidebar nav a {
  color: #cfd7ec; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 16px 28px; display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar .topbar-user { color: var(--muted); }
.admin-topbar .topbar-user strong { color: var(--ink); }
.admin-content { padding: 26px 28px 60px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-left: 22px; padding-bottom: 18px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 2px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid #fff;
}
.timeline .t-status { font-weight: 700; font-size: 13.5px; }
.timeline .t-note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.timeline .t-time { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-14 { gap: 14px; }
.mt-0 { margin-top: 0; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

@media (max-width: 760px) {
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; }
  .admin-sidebar nav { flex-direction: row; }
  .stepper { flex-wrap: wrap; }
}

/* Print (ใบสมัคร PDF) */
@media print {
  .no-print { display: none !important; }
}

/* ============================================================
   Landing Page (หน้าแรกสาธารณะ)
   ============================================================ */

.landing-nav {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px 0; position: sticky; top: 0; z-index: 20;
}
.landing-nav-links { display: flex; gap: 26px; }
.landing-nav-links a { color: var(--ink); font-weight: 600; font-size: 14px; }
.landing-nav-links a:hover { color: var(--indigo); text-decoration: none; }
.landing-nav-cta { display: flex; gap: 10px; }

.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(201,162,39,0.18), transparent 45%),
    linear-gradient(150deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  padding: 72px 0;
  color: #fff;
}
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px;
  font-weight: 700; color: var(--gold); background: rgba(201,162,39,0.15);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { color: #fff; font-size: 38px; line-height: 1.3; margin-bottom: 16px; }
.hero-sub { color: #cfd7ec; font-size: 15.5px; max-width: 520px; margin-bottom: 26px; line-height: 1.7; }
.hero-emblem-wrap { display: flex; justify-content: center; }
.hero-emblem {
  width: 240px; height: 240px; border-radius: 50%;
  border: 3px double var(--gold);
  background: rgba(255,255,255,0.06);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.hero-emblem-eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--gold); font-weight: 700; }
.hero-emblem-title { font-family: "Noto Serif Thai", serif; font-size: 21px; font-weight: 700; margin: 10px 0; line-height: 1.4; }
.hero-emblem-foot { font-size: 12px; color: #cfd7ec; }

/* Rotating hero banner carousel */
.hero-banner { position: relative; overflow: hidden; }
.hero-banner-track { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); align-items: stretch; }
.hero-banner-slide { flex: 0 0 100%; min-width: 100%; display: flex; align-items: center; min-height: 360px; }
.hero-banner-slide-image { min-height: 0; }
.hero-banner-slide-image a,
.hero-banner-slide-image img {
  display: block; width: 100%; height: 360px; object-fit: cover; border-radius: 12px; overflow: hidden;
}
.hero-banner-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.hero-banner-dots .dot {
  width: 8px; height: 8px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  background: rgba(255,255,255,0.35); transition: background .2s ease, width .2s ease, border-radius .2s ease;
}
.hero-banner-dots .dot.active { background: var(--gold); width: 24px; border-radius: 4px; }
.hero-banner-dots .dot:hover { background: rgba(255,255,255,0.6); }

.section { padding: 64px 0; }
.section-alt { background: var(--indigo-soft); }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 36px; }
.section-head h2 { font-size: 26px; margin-bottom: 8px; }
.section-head p { color: var(--muted); margin: 0; }

.announcement-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.announcement-card {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.announcement-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.announcement-cover {
  width: calc(100% + 44px); margin: -20px -22px 16px; display: block;
  height: 150px; object-fit: cover;
}
.announcement-card.pinned { border-left-color: var(--gold); }
.announcement-card h3 { font-size: 16px; margin: 8px 0 4px; }
.announcement-date { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.announcement-body { font-size: 14px; line-height: 1.7; margin: 0; color: var(--ink); }
.announcement-readmore { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--indigo); }

/* ---------- Accordion วิทยาลัย/โควตา บนหน้าแรก (ใช้ <details> ของ HTML ไม่ต้องพึ่ง JS) ---------- */
.college-accordion {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.college-accordion > summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; transition: background .15s ease;
}
.college-accordion > summary::-webkit-details-marker { display: none; }
.college-accordion > summary:hover { background: var(--indigo-soft); }
.college-accordion > summary::after {
  content: '▾'; color: var(--muted); font-size: 14px; transition: transform .2s ease; margin-left: auto;
}
.college-accordion[open] > summary::after { transform: rotate(180deg); }
.college-accordion[open] > summary { border-bottom: 1px solid var(--line); }
.college-accordion .ca-name { font-weight: 700; font-size: 15.5px; color: var(--ink); }
.college-accordion .ca-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.college-accordion .ca-body { padding: 16px 20px 20px; }
.college-accordion .ca-body table.data { margin-top: 0; }

.quota-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.quota-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.quota-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.quota-card h3 { font-size: 16.5px; margin: 0; }
.quota-criteria { font-size: 12.5px; color: var(--indigo); background: var(--indigo-soft); padding: 8px 10px; border-radius: 8px; margin: 0; }
.quota-meta { display: flex; gap: 20px; font-size: 13px; color: var(--muted); margin: 4px 0 6px; }
.quota-meta strong { color: var(--ink); font-size: 15px; }

.landing-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.landing-step { text-align: center; padding: 0 8px; }
.landing-step-num {
  display: inline-flex; width: 46px; height: 46px; border-radius: 50%;
  background: var(--indigo); color: #fff; align-items: center; justify-content: center;
  font-family: "Noto Serif Thai", serif; font-weight: 700; font-size: 18px; margin-bottom: 14px;
}
.landing-step h4 { font-size: 15px; margin: 0 0 8px; }
.landing-step p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

.landing-footer { background: var(--indigo-deep); padding: 28px 0; margin-top: 0; }

/* User menu dropdown (nav, logged-in state) */
.user-menu { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--indigo-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px 6px 6px; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.user-menu-trigger:hover { background: #e4e8f4; }
.user-menu-trigger svg { transition: transform .15s ease; color: var(--muted); flex-shrink: 0; }
.user-menu-trigger.open svg { transform: rotate(180deg); }
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--indigo); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.user-menu-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px; display: none; flex-direction: column; z-index: 30;
}
.user-menu-dropdown.open { display: flex; }
.user-menu-dropdown a { padding: 9px 12px; border-radius: 7px; font-size: 13.5px; color: var(--ink); font-weight: 500; }
.user-menu-dropdown a:hover { background: var(--indigo-soft); text-decoration: none; }
.user-menu-dropdown hr { border: none; border-top: 1px solid var(--line); margin: 6px 4px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-emblem-wrap { order: -1; }
  .hero-emblem { width: 180px; height: 180px; }
  .landing-nav-links { display: none; }
  .landing-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .landing-steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}

/* ---------- PDPA consent modal (บังคับยินยอมก่อนกรอกใบสมัคร) ---------- */
.pdpa-overlay {
  position: fixed; inset: 0; background: rgba(20, 33, 61, .72);
  z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.pdpa-modal {
  background: #fff; border-radius: 14px; max-width: 640px; width: 100%;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.pdpa-modal-head { padding: 20px 24px 0; }
.pdpa-modal-head h2 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.pdpa-modal-body {
  padding: 12px 24px; overflow-y: auto; font-size: 13.5px; line-height: 1.7; color: var(--text, #333);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 12px 0;
}
.pdpa-modal-body h3 { font-size: 14px; color: var(--ink); margin: 14px 0 4px; }
.pdpa-modal-body h3:first-child { margin-top: 0; }
.pdpa-modal-body ul { margin: 4px 0 8px 18px; padding: 0; }
.pdpa-modal-foot { padding: 4px 24px 22px; }
.pdpa-consent-check {
  display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; margin-bottom: 16px; cursor: pointer;
}
.pdpa-consent-check input { width: auto; margin-top: 3px; }
@media (max-width: 480px) {
  .pdpa-modal { max-height: 92vh; }
  .pdpa-modal-head, .pdpa-modal-foot { padding-left: 16px; padding-right: 16px; }
  .pdpa-modal-body { padding-left: 16px; padding-right: 16px; }
}
