/* TSU-TEP redesign — พอร์ตมาจากไฟล์ดีไซน์ใน D:\งานปี2569\redesign
   ใช้กับหน้าที่ใส่ class "tu" ที่ <body> เท่านั้น หน้าอื่นยังใช้ธีม Hyper เดิม */

.tu, .tu *, .tu *::before, .tu *::after { box-sizing: border-box; }
.tu {
  --tu-primary: #1F6FAE; --tu-primary-dark: #175A8E; --tu-primary-soft: #E6F1FA; --tu-primary-faint: #F0F7FC;
  --tu-ink: #0E1A33; --tu-muted: #556079; --tu-line: #E1E6EF; --tu-line-soft: #EEF1F6; --tu-line-input: #C5CCDA;
  --tu-bg: #F4F6FA; --tu-white: #FFFFFF; --tu-card: #FFFFFF; --tu-ink-2: #33405C; --tu-ink-3: #44506B; --tu-edge: #CFE3F4; --tu-edge-2: #BFD9EF; --tu-hero-a: #175A8E; --tu-hero-b: #1F6FAE;
  --tu-accent: #F58A21; --tu-warn-bg: #FEF0E1; --tu-warn-ink: #A8520D; --tu-warn-dark: #7A3D08; --tu-warn-line: #D9690B;
  --tu-ok: #15803D; --tu-ok-bg: #E7F6EC; --tu-err-bg: #FDECEC; --tu-err-ink: #9B1C1C;
  margin: 0; background: var(--tu-bg); color: var(--tu-ink);
  font-family: Prompt, Kanit, system-ui, sans-serif; font-size: 15px; line-height: 1.55;
}
.tu a { color: var(--tu-primary); }
.tu a:hover { color: var(--tu-primary-dark); }
.tu h1, .tu h2, .tu h3, .tu p, .tu dl, .tu dd, .tu ul, .tu ol { margin: 0; padding: 0; }
.tu ul, .tu ol { list-style: none; }
.tu button, .tu input, .tu select { font: inherit; }
.tu :focus-visible { outline: 3px solid #8CBCE3; outline-offset: 2px; }

/* ---------- ปุ่ม / ชิป ---------- */
.tu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1.5px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer; background: none; }
.tu-btn-lg { min-height: 48px; padding: 0 22px; }
.tu-btn-primary { background: var(--tu-primary); color: #fff !important; }
.tu-btn-primary:hover { background: var(--tu-primary-dark); }
.tu-btn-accent { background: var(--tu-accent); color: var(--tu-ink) !important; }
.tu-btn-accent:hover { background: #E27A12; }
.tu-btn-outline { border-color: var(--tu-primary); color: var(--tu-primary) !important; background: var(--tu-card); }
.tu-btn-outline:hover { background: var(--tu-primary-faint); }
.tu-btn-ghost { border-color: var(--tu-line); color: var(--tu-ink) !important; background: var(--tu-card); }
.tu-btn-white { background: var(--tu-card); color: var(--tu-ink) !important; }
.tu-btn-block { width: 100%; }
.tu-btn[disabled], .tu-btn.is-disabled { background: var(--tu-line); color: var(--tu-muted) !important; cursor: not-allowed; border-color: transparent; }
.tu-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--tu-primary-soft); color: var(--tu-primary); }
.tu-chip-warn { background: var(--tu-warn-bg); color: var(--tu-warn-ink); }
.tu-chip-ok { background: var(--tu-ok-bg); color: var(--tu-ok); }
.tu-chip-grey { background: var(--tu-line); color: var(--tu-muted); }
.tu-link { font-weight: 600; text-decoration: none; }

/* ---------- ตัวสลับภาษา ---------- */
.tu-lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--tu-line); border-radius: 10px; background: var(--tu-card); }
.tu-lang button { min-width: 40px; height: 36px; padding: 0 8px; border: none; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; color: var(--tu-muted); }
.tu-lang button[aria-pressed="true"] { background: var(--tu-primary); color: #fff; }

/* ---------- เมนูบน ---------- */
.tu-header { background: var(--tu-card); border-bottom: 1px solid var(--tu-line); position: relative; z-index: 20; }
.tu-header-in { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.tu-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tu-ink) !important; }
.tu-brand img { height: 40px; width: auto; display: block; }
.tu-brand-sep { width: 1px; height: 32px; background: var(--tu-line); }
.tu-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.tu-brand-txt b { font-weight: 600; font-size: 17px; }
.tu-brand-txt span { font-size: 12px; color: var(--tu-muted); }
.tu-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.tu-nav a { padding: 10px 14px; border-radius: 8px; color: var(--tu-ink); text-decoration: none; }
.tu-nav a:hover { background: var(--tu-bg); color: var(--tu-ink); }
.tu-nav a[aria-current="page"] { background: var(--tu-primary-soft); color: var(--tu-primary); font-weight: 600; }
.tu-tools { display: flex; align-items: center; gap: 8px; }
.tu-acct { position: relative; }
.tu-acct summary { list-style: none; width: 44px; height: 44px; border-radius: 50%; background: var(--tu-ink); color: #fff; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tu-acct summary::-webkit-details-marker { display: none; }
.tu-acct-menu { position: absolute; right: 0; top: 52px; min-width: 240px; background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: 12px; box-shadow: 0 8px 24px rgba(14, 26, 51, .14); padding: 8px; }
.tu-acct-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--tu-line-soft); margin-bottom: 6px; line-height: 1.35; }
.tu-acct-who b { display: block; font-weight: 600; }
.tu-acct-who span { font-size: 13px; color: var(--tu-muted); }
.tu-acct-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--tu-ink); text-decoration: none; }
.tu-acct-menu a:hover { background: var(--tu-bg); color: var(--tu-ink); }

/* ---------- โครงหน้า ---------- */
.tu-main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 24px; }
.tu-footer { border-top: 1px solid var(--tu-line); background: var(--tu-card); }
.tu-footer-in { max-width: 1200px; margin: 0 auto; padding: 18px 24px; font-size: 13px; color: var(--tu-muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.tu-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tu-eyebrow { font-size: 14px; color: var(--tu-muted); }
.tu-h1 { font-weight: 600; font-size: 28px; line-height: 1.3; margin-top: 4px !important; }
.tu-h1-lg { font-size: 30px; }
.tu-sub { color: var(--tu-muted); margin-top: 4px !important; }
.tu-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.tu-split-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.tu-split-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.tu-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* ---------- การ์ด ---------- */
.tu-card { background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: 14px; padding: 20px 22px; }
.tu-card-flush { padding: 0; }
.tu-card-stat { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tu-card-dark { background: var(--tu-ink); color: #fff; border-color: var(--tu-ink); }
.tu-card-dark .tu-card-label { color: #C9D3EA; }
.tu-card-soft { background: var(--tu-primary-soft); border: 0; display: flex; flex-direction: column; gap: 8px; }
.tu-card-label { font-size: 14px; font-weight: 600; color: var(--tu-muted); }
.tu-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--tu-line); }
.tu-h2 { font-weight: 600; font-size: 19px; }
.tu-h3 { font-weight: 600; font-size: 17px; }
.tu-big { font-weight: 700; font-size: 40px; line-height: 1; }
.tu-row { display: flex; align-items: baseline; gap: 8px; }
.tu-muted { color: var(--tu-muted); }
.tu-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.tu-dl dt { color: var(--tu-muted); }
.tu-dl dd { font-weight: 500; }
.tu-dl-fit { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.tu-dl-fit dd { font-weight: 600; margin-top: 2px; }
.tu-next-top { background: var(--tu-primary); color: #fff; padding: 18px 22px; }
.tu-next-top small { display: block; font-size: 13px; font-weight: 600; color: #EAF3FB; }
.tu-next-top strong { display: block; font-weight: 600; font-size: 22px; line-height: 1.35; margin-top: 2px; }
.tu-next-top span { font-size: 14px; color: #EAF3FB; }

/* CEFR scale */
.tu-scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; font-size: 12px; text-align: center; color: var(--tu-muted); }
.tu-scale > span { display: flex; flex-direction: column; gap: 4px; }
.tu-scale i { display: block; height: 8px; border-radius: 4px; background: var(--tu-line); }
.tu-scale .on i { background: var(--tu-primary); }
.tu-scale .cur { color: var(--tu-ink); font-weight: 600; }
.tu-scale-lg { gap: 4px; font-size: 14px; }
.tu-scale-lg i { height: 14px; }

/* รายการรอบสอบ */
.tu-round { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 18px 22px; border-bottom: 1px solid var(--tu-line-soft); }
.tu-round:last-child { border-bottom: 0; }
.tu-date { width: 64px; flex: none; text-align: center; border-radius: 10px; background: var(--tu-primary-soft); padding: 8px 0; line-height: 1.2; }
.tu-date b { display: block; font-weight: 700; font-size: 24px; color: var(--tu-primary); }
.tu-date > span { display: block; font-size: 13px; color: var(--tu-primary); font-weight: 600; }
.tu-round-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tu-round-body .t { font-weight: 600; }
.tu-round-body .p { font-size: 14px; color: var(--tu-muted); }
.tu-meter { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--tu-muted); }
.tu-meter-bar { flex: 0 1 140px; height: 6px; border-radius: 3px; background: var(--tu-line); overflow: hidden; }
.tu-meter-bar span { display: block; height: 100%; background: var(--tu-primary); }
.tu-meter-bar.full span { background: var(--tu-warn-line); }

/* ตาราง */
.tu-table-wrap { overflow-x: auto; }
.tu-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tu-table th { text-align: left; padding: 10px 8px; font-weight: 600; color: var(--tu-muted); border-bottom: 1px solid var(--tu-line); white-space: nowrap; }
.tu-table td { padding: 12px 8px; border-bottom: 1px solid var(--tu-line-soft); vertical-align: top; }
.tu-table tr:last-child td { border-bottom: 0; }
.tu-table .c { text-align: center; }
.tu-table .r { text-align: right; }
.tu-table .strong { font-weight: 600; }
.tu-empty { padding: 28px 22px; text-align: center; color: var(--tu-muted); }

/* รายการติ๊กถูก */
.tu-checks { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.tu-checks > li { display: flex; gap: 10px; align-items: flex-start; }
.tu-checks svg { flex: none; margin-top: 1px; }
.tu-checks .tu-rule-sub li { display: list-item; }

/* ---------- ฟอร์ม ---------- */
.tu-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.tu-field > span { font-weight: 600; }
.tu-input { min-height: 48px; padding: 0 14px; border: 1px solid var(--tu-line-input); border-radius: 10px; color: var(--tu-ink); background: var(--tu-card); width: 100%; }
.tu-input-wrap { position: relative; display: flex; }
.tu-input-wrap .tu-input { padding-right: 52px; }
.tu-eye { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: none; background: transparent; color: var(--tu-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tu-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tu-tabs button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 14px 10px 12px; line-height: 1.3; border: 1.5px solid var(--tu-line); border-radius: 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--tu-card); color: var(--tu-muted); text-align: center; transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s, transform .15s; }
.tu-tabs button:hover { border-color: var(--tu-primary); color: var(--tu-primary); background: var(--tu-primary-faint); }
.tu-tabs button:active { transform: scale(.98); }
.tu-tab-ico { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--tu-bg); color: var(--tu-muted); transition: background-color .15s, color .15s; }
.tu-tabs button:hover .tu-tab-ico { background: var(--tu-primary-soft); color: var(--tu-primary); }
.tu-tab-check { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--tu-primary); color: #fff; opacity: 0; transform: scale(.5); transition: opacity .15s, transform .15s; }
.tu-tabs button[aria-selected="true"] { border-color: var(--tu-primary); background: var(--tu-primary-faint); color: var(--tu-primary); box-shadow: 0 0 0 3px var(--tu-primary-soft), 0 4px 10px rgba(31, 111, 174, .12); }
.tu-tabs button[aria-selected="true"] .tu-tab-ico { background: var(--tu-primary); color: #fff; }
.tu-tabs button[aria-selected="true"] .tu-tab-check { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .tu-tabs button, .tu-tab-ico, .tu-tab-check { transition: none; } }
.tu-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.tu-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--tu-primary); }
.tu-notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--tu-warn-bg); color: var(--tu-warn-dark); font-size: 14px; }
.tu-notice svg { flex: none; margin-top: 2px; }
.tu-notice-err { background: var(--tu-err-bg); color: var(--tu-err-ink); }
.tu-notice-err a { color: var(--tu-err-ink); font-weight: 600; }
.tu-notice ol { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.tu-rule-sub { list-style: disc; margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
.tu-checks .tu-rule-sub { font-size: 13px; }
/* กำหนดการวันสอบ (enrollAdd.jsp) */
.tu-notice .tu-sched-h { display: block; margin-top: 12px; }
.tu-sched { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.tu-sched li { display: flex; gap: 10px; align-items: baseline; }
.tu-sched b { flex: none; min-width: 108px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tu-sched-note { margin-top: 8px; font-size: 13px; font-weight: 600; }
.tu-warnbox { padding: 12px 14px; border-radius: 10px; background: var(--tu-warn-bg); color: var(--tu-warn-dark); font-size: 13px; }

/* ขั้นตอน */
.tu-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tu-steps li { display: flex; flex-direction: column; gap: 8px; }
.tu-steps .bar { display: block; height: 4px; border-radius: 2px; background: var(--tu-line); }
.tu-steps .lab { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tu-muted); }
.tu-steps .dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; background: var(--tu-line); color: var(--tu-muted); }
.tu-steps .on .bar { background: var(--tu-primary); }
.tu-steps .on .dot { background: var(--tu-primary); color: #fff; }
.tu-steps .on .lab { font-weight: 600; color: var(--tu-ink); }

/* ตัวเลือกรอบสอบ */
.tu-pick { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: 12px; color: var(--tu-ink) !important; text-align: left; background: var(--tu-card); border: 2px solid var(--tu-line); text-decoration: none; cursor: pointer; }
.tu-pick:hover { border-color: var(--tu-primary); }
.tu-pick.full { background: var(--tu-bg); border: 1px solid var(--tu-line); cursor: not-allowed; }
.tu-pick.full:hover { border-color: var(--tu-line); }
.tu-pick .d { width: 58px; flex: none; text-align: center; line-height: 1.2; }
.tu-pick .d b { display: block; font-weight: 700; font-size: 22px; color: var(--tu-primary); }
.tu-pick .d > span { display: block; font-size: 13px; color: var(--tu-muted); }
.tu-pick .b { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tu-pick .b .t { font-weight: 600; }
.tu-pick .b .p { font-size: 14px; color: var(--tu-muted); }
.tu-pick .s { flex: none; }
.tu-stack { display: flex; flex-direction: column; gap: 10px; }
.tu-stack-lg { gap: 14px; }
.tu-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tu-filter button { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--tu-card); color: var(--tu-ink); border: 1px solid var(--tu-line-input); }
.tu-filter button[aria-pressed="true"] { background: var(--tu-ink); color: #fff; border-color: var(--tu-ink); }
.tu-pickbox { padding: 16px; border-radius: 10px; background: var(--tu-primary-soft); display: flex; flex-direction: column; gap: 4px; }
.tu-pickbox small { font-size: 13px; color: var(--tu-primary); font-weight: 600; }
.tu-pickbox strong { font-weight: 600; font-size: 18px; }
.tu-pickbox span { font-size: 14px; color: var(--tu-ink-2); }

/* ผลสอบ */
.tu-hero { background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: 16px; padding: 28px; display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: center; }
.tu-ring { width: 132px; height: 132px; flex: none; border-radius: 50%; border: 10px solid var(--tu-primary); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.tu-ring b { font-weight: 700; font-size: 38px; }
.tu-ring span { font-size: 12px; color: var(--tu-muted); }
.tu-ring.warn { border-color: var(--tu-warn-line); }
.tu-ring.ok { border-color: var(--tu-ok); }
.tu-skill { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 0; border-bottom: 1px solid var(--tu-line-soft); }
.tu-skill:last-of-type { border-bottom: 0; }
.tu-skill .n { flex: 1 1 180px; min-width: 0; display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.tu-skill .n i { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--tu-primary-soft); color: var(--tu-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; font-style: normal; }
.tu-skill .n b { display: block; font-weight: 600; }
.tu-skill .n small { font-size: 13px; color: var(--tu-muted); }
.tu-skill .score { flex: 0 0 auto; font-weight: 700; font-size: 18px; }
.tu-steps-dark { display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.tu-steps-dark li { display: flex; gap: 12px; }
.tu-steps-dark li > b { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--tu-card); color: var(--tu-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.tu-steps-dark small { color: #C9D3EA; font-size: 14px; }
.tu-refbox { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--tu-bg); font-size: 14px; }
.tu-refbox b { font-family: ui-monospace, monospace; }
.tu-ok-row td { background: #F2FAF5; }

/* ---------- หน้าเข้าสู่ระบบ ---------- */
.tu-login { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--tu-card); }
.tu-login-hero { flex: 1 1 460px; min-width: 0; background: var(--tu-primary); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.tu-login-hero-in { display: flex; flex-direction: column; gap: 22px; max-width: 460px; }
.tu-pill { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--tu-primary-dark); font-size: 13px; font-weight: 600; }
.tu-login-hero h2 { font-weight: 600; font-size: 40px; line-height: 1.3; }
.tu-login-hero p { font-size: 16px; color: #EAF3FB; }
.tu-feats { margin-top: 8px !important; display: flex; flex-direction: column; gap: 14px; }
.tu-feats li { display: flex; gap: 12px; align-items: flex-start; }
.tu-feats li > span:first-child { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--tu-accent); color: var(--tu-ink); display: flex; align-items: center; justify-content: center; }
.tu-login-hero .campus { font-size: 13px; }
.tu-login-pane { flex: 1 1 440px; min-width: 0; padding: 32px 24px 40px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.tu-login-top { width: 100%; display: flex; justify-content: flex-end; }
.tu-login-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; margin: auto 0; }
.tu-login-box > img { height: 56px; width: auto; align-self: flex-start; display: block; }
.tu-login-box h1 { font-weight: 600; font-size: 28px; line-height: 1.3; }
.tu-form { display: flex; flex-direction: column; gap: 16px; }
.tu-form-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.tu-login-links { font-size: 13px; color: var(--tu-muted); text-align: center; }
.tu-login-links a { text-decoration: none; }
.tu-login-hero-staff { background: var(--tu-ink); }
.tu-login-hero-staff .tu-pill { background: rgba(255, 255, 255, .12); }
.tu-login-hero-staff p { color: #C9D3EA; }
.tu-back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--tu-muted) !important; }
.tu-back-link:hover { background: var(--tu-bg); color: var(--tu-ink) !important; }
.tu-btn[aria-busy="true"] { opacity: .75; cursor: progress; }

/* ---------- มือถือ ---------- */
@media (max-width: 640px) {
  .tu-header-in { padding: 10px 16px; gap: 10px 16px; }
  .tu-nav { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tu-nav a { white-space: nowrap; }
  .tu-tools { margin-left: auto; }
  .tu-main { padding: 20px 16px 40px; }
  .tu-h1-lg { font-size: 24px; }
  .tu-login-hero { padding: 32px 24px; }
  .tu-login-hero h2 { font-size: 30px; }
  .tu-hero { padding: 20px; }
}

/* ---------- ผลการสมัคร / หน้าสถานะ ---------- */
.tu-result { max-width: 640px; width: 100%; margin: 0 auto; background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: 16px; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.tu-result h2 { font-weight: 600; font-size: 24px; }
.tu-result-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tu-ok-bg); color: var(--tu-ok); }
.tu-result-icon.warn { background: var(--tu-warn-bg); color: var(--tu-warn-ink); }
.tu-result-icon.err { background: var(--tu-err-bg); color: var(--tu-err-ink); }
.tu-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.tu-back { font-size: 14px; font-weight: 600; text-decoration: none; }
.tu-pick.mine { background: var(--tu-primary-faint); border-color: var(--tu-primary); }

/* ---------- ฟอร์มหลายช่อง / หน้าคู่มือ ---------- */
.tu-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.tu-form-grid .wide { grid-column: 1 / -1; }
.tu-form-grid .tu-input:disabled { background: var(--tu-bg); }
.tu select.tu-input { appearance: auto; padding-right: 10px; }
.tu .tu-input:focus { border-color: var(--tu-primary); outline: 3px solid #CFE3F4; outline-offset: 0; }
.tu-hint { font-size: 13px; color: var(--tu-muted); }
.tu-honey { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.tu .mb-0 { margin-bottom: 0; }
.tu-notice-info { background: var(--tu-primary-soft); color: #0F3B63; }
.tu-notice-info strong { color: #0F3B63; }
.tu-notice-h { font-weight: 600; margin-bottom: 4px; }
.tu-bordered th, .tu-bordered td { border: 1px solid var(--tu-line); }
.tu-bordered th { background: var(--tu-bg); }
.tu-arrow { color: var(--tu-muted); }
.tu-manual-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.tu-toc { flex: 0 0 260px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.tu-toc a { padding: 8px 10px; border-radius: 8px; color: var(--tu-ink); text-decoration: none; font-size: 14px; }
.tu-toc a:hover { background: var(--tu-primary-soft); color: var(--tu-primary); }
.tu-manual { flex: 999 1 560px; min-width: 0; }
.tu-manual .manual-section { scroll-margin-top: 16px; margin-bottom: 36px; }
.tu-manual h4 { font-weight: 600; font-size: 20px; border-bottom: 2px solid var(--tu-primary); padding-bottom: 6px; margin-bottom: 14px; }
.tu-manual h5 { font-weight: 600; font-size: 16px; margin: 18px 0 8px; }
.tu-manual p { margin: 0 0 10px; }
.tu-manual ol, .tu-manual ul { list-style: revert; padding-left: 22px; margin: 0 0 12px; display: block; }
.tu-manual li { margin-bottom: 4px; }
.tu-manual dt { font-weight: 600; margin-top: 12px; }
.tu-manual dd { margin: 2px 0 0; color: var(--tu-ink-2); }
.tu-manual .tu-table-wrap { margin-bottom: 14px; }
.tu-manual .tu-notice { margin-bottom: 14px; }
.tu-manual .manual-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.tu-manual .text-danger { color: var(--tu-err-ink); }
.tu-manual .text-muted { color: var(--tu-muted); }
@media print { .tu-header, .tu-footer, .tu-toc { display: none !important; } .tu-main { padding: 0; } .tu-manual { flex-basis: 100%; } }

/* ---------- หน้าหลัก (main.jsp) ---------- */
.tu-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tu-link-sm { font-size: 14px; }
.tu-h-gap { margin-bottom: 12px !important; }
.tu-help-txt { font-size: 14px; color: var(--tu-ink-2); }
.tu-row-wrap { align-items: center; flex-wrap: wrap; gap: 12px; }
.tu-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tu-table-pad { padding: 0 22px 14px; }
.tu-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; }
.tu-paid { display: inline-flex; align-items: center; gap: 6px; color: var(--tu-ok); font-weight: 500; }
.tu-dark-title { font-weight: 600; font-size: 20px; line-height: 1.4; }
.tu-dark-sub { color: #C9D3EA; font-size: 14px; }
.tu-dark-btn { align-self: flex-start; margin-top: 4px; }

/* แจ้งเตือนที่ต้องทำ */
.tu-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-radius: 14px; background: var(--tu-warn-bg); border: 1px solid #F3C99A; color: var(--tu-warn-dark); }
.tu-alert-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--tu-card); color: var(--tu-warn-line); display: flex; align-items: center; justify-content: center; }
.tu-alert-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.tu-alert-body strong { font-weight: 600; font-size: 16px; color: var(--tu-ink); }
.tu-alert-body span { font-size: 14px; }

/* การสอบครั้งถัดไป */
.tu-next { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; padding: 28px; border-radius: 16px; background: var(--tu-primary); color: #fff; }
.tu-next-count { flex: none; min-width: 124px; padding: 16px 20px; border-radius: 14px; background: rgba(255, 255, 255, .14); text-align: center; line-height: 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.tu-next-count b { font-weight: 700; font-size: 60px; }
.tu-next-count b.tu-next-today { font-size: 34px; padding: 12px 0; }
.tu-next-count span { font-size: 14px; color: #EAF3FB; }
.tu-next-info { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tu-next-info small { align-self: flex-start; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.tu-next-info strong { font-weight: 600; font-size: 26px; line-height: 1.35; }
.tu-next-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px !important; font-size: 16px; color: #fff; }
.tu-next-meta li { display: flex; align-items: center; gap: 8px; }
.tu-next-meta svg { flex: none; opacity: .85; }
.tu-next-act { flex: none; }

/* ที่นั่งสอบ: อาคาร / ห้อง / เครื่อง */
.tu-seat { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tu-seat > div { padding: 14px 18px; border-radius: 12px; background: var(--tu-card); color: var(--tu-ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tu-seat dt { font-size: 13px; font-weight: 600; color: var(--tu-muted); }
.tu-seat dd { font-size: 26px; font-weight: 700; line-height: 1.25; word-break: break-word; color: var(--tu-primary-dark); }
.tu-seat-wait { flex: 1 1 100%; padding: 14px 18px; border-radius: 12px; background: rgba(255, 255, 255, .14); font-size: 15px; }

.tu-journey { flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .22); }
.tu-journey li { display: flex; flex-direction: column; gap: 8px; }
.tu-journey .bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.tu-journey .lab { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tu-edge); }
.tu-journey .dot { width: 24px; height: 24px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .22); color: #fff; }
.tu-journey .done .bar { background: var(--tu-card); }
.tu-journey .done .dot { background: var(--tu-card); color: var(--tu-primary); }
.tu-journey .done .lab { color: #fff; }
.tu-journey .now .bar { background: var(--tu-accent); }
.tu-journey .now .dot { background: var(--tu-accent); color: var(--tu-ink); }
.tu-journey .now .lab { color: #fff; font-weight: 600; }

/* ยังไม่มีนัดสอบ */
.tu-empty-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 24px 28px; border-radius: 16px; background: var(--tu-card); border: 1px dashed var(--tu-line-input); }
.tu-empty-hero > div { flex: 1 1 280px; min-width: 0; }
.tu-empty-hero-ico { width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--tu-primary-soft); color: var(--tu-primary); display: flex; align-items: center; justify-content: center; }

@media (max-width: 720px) { .tu-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .tu-next { padding: 20px; }
  .tu-next-count { flex-direction: row; justify-content: center; width: 100%; min-width: 0; padding: 12px 16px; gap: 10px; }
  .tu-next-count b { font-size: 44px; }
  .tu-next-count b.tu-next-today { padding: 4px 0; }
  .tu-next-info strong { font-size: 22px; }
  .tu-next-act, .tu-next-act .tu-btn { width: 100%; }
  .tu-seat { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tu-seat > div { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .tu-seat dd { font-size: 22px; }
  .tu-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .tu-alert .tu-btn { width: 100%; }
}

/* ---------- หน้าหลัก: ตัวอักษร หัวข้อ ปุ่ม และการจัดสมดุล (ใช้เฉพาะ body.tu-home) ---------- */
.tu-home { font-size: 16px; }
.tu-home .tu-main, .tu-home .tu-header-in, .tu-home .tu-footer-in { max-width: 1280px; }

/* หัวข้อ: ใหญ่ หนา มีแถบสีนำ */
.tu-home .tu-h1 { font-weight: 700; }
.tu-home .tu-eyebrow { font-size: 15px; font-weight: 500; }
.tu-home .tu-h2 { font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--tu-ink); }
.tu-home .tu-h3 { font-size: 18px; font-weight: 700; color: var(--tu-ink); }
.tu-home .tu-card-head { background: var(--tu-primary-faint); border-radius: 14px 14px 0 0; padding: 16px 22px; }
.tu-home .tu-card-head .tu-h2, .tu-home .tu-card > .tu-h3 { display: flex; align-items: center; gap: 10px; }
.tu-home .tu-card-head .tu-h2::before, .tu-home .tu-card > .tu-h3::before { content: ""; width: 5px; height: 1.1em; flex: none; border-radius: 3px; background: var(--tu-primary); }
.tu-home .tu-card-soft > .tu-h3::before { background: var(--tu-primary-dark); }
.tu-home .tu-card-label { font-size: 16px; font-weight: 700; color: var(--tu-ink); }
.tu-home .tu-card-dark .tu-card-label { color: #fff; }
.tu-home .tu-card-top .tu-card-label { margin: 0; }

/* ขนาดตัวอักษรเนื้อหา: ขยายจาก 13–14px เป็น 14–15px */
.tu-home .tu-chip { font-size: 14px; padding: 4px 12px; }
.tu-home .tu-link-sm { font-size: 15px; }
.tu-home .tu-help-txt, .tu-home .tu-checks { font-size: 15px; }
.tu-home .tu-checks { gap: 12px; }
.tu-home .tu-scale { font-size: 13px; color: var(--tu-ink-3); }
.tu-home .tu-table { font-size: 15px; }
.tu-home .tu-table th { font-size: 14px; color: var(--tu-ink-2); }
.tu-home .tu-table td { padding: 14px 8px; }
.tu-home .tu-paid { font-size: 15px; }
.tu-home .tu-seat dt { font-size: 14px; }

/* ปุ่ม: ปุ่มสมัครในรายการรอบสอบเป็นปุ่มหลักสีทึบ */
.tu-home .tu-btn-reg { min-width: 104px; }

/* รายการรอบสอบ: ชื่อรอบ + เวลา/สถานที่ แยกบรรทัดชัดเจน */
.tu-home .tu-round { gap: 16px 22px; padding: 20px 22px; }
.tu-home .tu-date { width: 76px; padding: 10px 0; }
.tu-home .tu-date i { display: block; font-style: normal; font-size: 13px; font-weight: 600; color: var(--tu-primary); }
.tu-home .tu-date b { font-size: 28px; line-height: 1.15; }
.tu-home .tu-round-body { gap: 6px; }
.tu-home .tu-round-body .t { font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--tu-ink); }
.tu-home .tu-round-body .p { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 15px; color: var(--tu-ink-3); }
.tu-mi { display: inline-flex; align-items: center; gap: 6px; }
.tu-mi svg { flex: none; color: var(--tu-muted); }
.tu-home .tu-meter { font-size: 14px; color: var(--tu-ink-3); margin-top: 2px; }

/* คอลัมน์ขวา: ผลสอบอยู่บนสุด ตามด้วยข้อมูลเตรียมตัว */

/* การ์ดผลสอบล่าสุด: พื้นหลังฟ้าไล่สี ขอบและเงา เด่นกว่าการ์ดอื่น */
.tu-home .tu-card-feature { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: linear-gradient(160deg, #F0F7FC 0%, #D9EAF8 100%); border: 1.5px solid #8FBDE3; box-shadow: 0 8px 22px rgba(31, 111, 174, .14); }
.tu-home .tu-card-feature .tu-card-label { color: var(--tu-primary-dark); }
.tu-feature-date { margin-top: -6px !important; font-size: 14px; color: var(--tu-ink-2); }
.tu-home .tu-big-xl { font-size: 60px; color: var(--tu-primary-dark); }
.tu-home .tu-card-feature .tu-scale { color: var(--tu-ink-2); }
.tu-home .tu-card-feature .tu-scale > span:not(.on) i { background: var(--tu-card); }
.tu-home .tu-card-feature .tu-chip-grey { background: var(--tu-card); }

/* ปุ่มรองสีฟ้าอ่อน (ใช้กับ "ดูรอบสอบทั้งหมด") */
.tu-home .tu-btn-soft { background: var(--tu-primary-soft); border-color: var(--tu-edge-2); color: var(--tu-primary-dark) !important; }
.tu-home .tu-btn-soft:hover { background: #D3E6F6; border-color: var(--tu-primary); }

/* ---------- หน้าผลสอบ (score.jsp) ใช้ร่วมกับ body.tu-home ---------- */
.tu-home .tu-card-head > div { min-width: 0; }
.tu-pad { padding: 16px 22px 20px; }
.tu-pad-note { margin-bottom: 6px; }
.tu-col-card { display: flex; flex-direction: column; gap: 12px; }
.tu-actions-left { justify-content: flex-start; }
.tu-btn-ondark { border-color: #5B6A8C; color: #fff !important; }
.tu-btn-ondark:hover { background: rgba(255, 255, 255, .1); }
.tu-home .tu-card-dark > .tu-h3 { color: #fff; }
.tu-home .tu-card-dark > .tu-h3::before { background: var(--tu-accent); }
.tu-table-wide { min-width: 720px; }

/* การ์ดสรุปผลสีน้ำเงิน: ระดับ CEFR + ตัวเลขสรุป + แถบตำแหน่ง */
.tu-score-hero .tu-next-count b { font-size: 56px; }
.tu-seat-sm dd { font-size: 24px; }
.tu-score-scale { flex: 1 1 100%; display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .22); }
.tu-score-scale > span { font-size: 15px; font-weight: 600; }
.tu-score-scale .tu-scale { color: #EAF3FB; font-size: 15px; }
.tu-score-scale .tu-scale i { background: rgba(255, 255, 255, .28); }
.tu-score-scale .tu-scale .on i { background: var(--tu-card); }
.tu-score-scale .tu-scale .cur { color: #fff; font-weight: 700; }
.tu-score-scale .tu-scale .cur i { background: var(--tu-accent); }
.tu-score-scale .tu-scale small { font-size: 13px; font-weight: 400; color: var(--tu-edge); }

/* แถบคะแนนรายหมวด */
.tu-home .tu-skill .n b { font-size: 16px; }
.tu-home .tu-skill .score { font-size: 19px; min-width: 64px; text-align: right; }
.tu-skill-bar { flex: 2 1 240px; font-size: 14px; }
.tu-skill-bar .tu-meter-bar { flex: 1 1 auto; height: 8px; border-radius: 4px; }
.tu-pct { min-width: 40px; text-align: right; color: var(--tu-ink-3); }
@media (max-width: 640px) {
  .tu-score-scale .tu-scale small { display: none; }
}

/* ---------- การ์ดนัดสอบ/สรุปผล (main.jsp, score.jsp): สลับสี — การ์ดพื้นขาว แผ่นข้อมูลพื้นฟ้า ---------- */
.tu-home .tu-next { background: var(--tu-card); color: var(--tu-ink); border: 1px solid var(--tu-line); box-shadow: 0 2px 10px rgba(14, 26, 51, .05); }
.tu-home .tu-next-count { background: var(--tu-primary-soft); color: var(--tu-primary-dark); }
.tu-home .tu-next-count b { color: var(--tu-primary-dark); }
.tu-home .tu-next-count span { color: var(--tu-primary); font-weight: 600; }
.tu-home .tu-next-info small { background: var(--tu-primary-soft); color: var(--tu-primary-dark); }
.tu-home .tu-next-info strong { color: var(--tu-ink); }
.tu-home .tu-next-meta { color: var(--tu-ink-2); }
.tu-home .tu-next-meta svg { color: var(--tu-primary); opacity: 1; }
.tu-home .tu-next .tu-btn-white { background: var(--tu-primary); color: #fff !important; }
.tu-home .tu-next .tu-btn-white:hover { background: var(--tu-primary-dark); }

/* แผ่นข้อมูล (ที่นั่งสอบ / ตัวเลขสรุป): พื้นฟ้า ตัวอักษรขาว */
.tu-home .tu-seat > div { background: var(--tu-primary); color: #fff; }
.tu-home .tu-seat dt { color: #D6E8F7; }
.tu-home .tu-seat dd { color: #fff; }
.tu-home .tu-seat-wait { background: var(--tu-primary-faint); color: var(--tu-ink); border: 1px solid var(--tu-edge); }

/* แถบความคืบหน้า 4 ขั้น */
.tu-home .tu-journey { border-top-color: var(--tu-line); }
.tu-home .tu-journey .bar { background: var(--tu-line); }
.tu-home .tu-journey .lab { color: var(--tu-muted); }
.tu-home .tu-journey .dot { background: var(--tu-line); color: var(--tu-muted); }
.tu-home .tu-journey .done .bar { background: var(--tu-primary); }
.tu-home .tu-journey .done .dot { background: var(--tu-primary); color: #fff; }
.tu-home .tu-journey .done .lab { color: var(--tu-ink); }
.tu-home .tu-journey .now .bar { background: var(--tu-accent); }
.tu-home .tu-journey .now .dot { background: var(--tu-accent); color: var(--tu-ink); }
.tu-home .tu-journey .now .lab { color: var(--tu-ink); font-weight: 700; }

/* แถบตำแหน่งบนกรอบ CEFR (score.jsp) */
.tu-home .tu-score-scale { border-top-color: var(--tu-line); }
.tu-home .tu-score-scale > span { color: var(--tu-ink); }
.tu-home .tu-score-scale .tu-scale { color: var(--tu-muted); }
.tu-home .tu-score-scale .tu-scale i { background: var(--tu-line); }
.tu-home .tu-score-scale .tu-scale .on i { background: var(--tu-primary); }
.tu-home .tu-score-scale .tu-scale .cur { color: var(--tu-ink); font-weight: 700; }
.tu-home .tu-score-scale .tu-scale .cur i { background: var(--tu-accent); }
.tu-home .tu-score-scale .tu-scale small { color: var(--tu-muted); }

/* ---------- เลขที่นั่งสอบ (seat.jsp) และสมัครสอบ (quiz.jsp) ---------- */
.tu-seat-note { flex: 1 1 100%; font-size: 14px; color: var(--tu-muted); }

/* รายการเลือกรอบสอบ: สไตล์เดียวกับรายการรอบสอบในหน้าหลัก */
.tu-home .tu-pick { gap: 14px 20px; padding: 18px 20px; border: 1px solid var(--tu-line); border-radius: 14px; background: var(--tu-card); transition: border-color .15s, box-shadow .15s; }
.tu-home .tu-pick:not(.full):not(.mine):hover { border-color: var(--tu-primary); box-shadow: 0 4px 14px rgba(31, 111, 174, .12); }
.tu-home .tu-pick.mine { background: var(--tu-primary-faint); border-color: var(--tu-edge-2); }
.tu-home .tu-pick.full { background: var(--tu-bg); }
.tu-home .tu-pick .tu-date { display: block; flex: none; }
.tu-home .tu-pick .b { gap: 6px; flex: 1 1 260px; }
.tu-home .tu-pick .b .t { font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--tu-ink); }
.tu-home .tu-pick .b .p { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 15px; color: var(--tu-ink-3); }
.tu-home .tu-pick .s { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.tu-pick-sub { font-size: 14px; font-weight: 600; color: var(--tu-primary); }
.tu-home .tu-pick .tu-meter { display: flex; font-size: 14px; color: var(--tu-ink-3); margin-top: 2px; }
.tu-home .tu-card-head .tu-filter { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .tu-home .tu-pick { transition: none; } }
@media (max-width: 640px) {
  .tu-home .tu-pick .s { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .tu-home .tu-pick .s .tu-btn { width: 100%; }
}

/* ---------- ปฏิทินนัดสอบ + แผ่นข้อมูลสีฟ้าอ่อน (main.jsp, seat.jsp, score.jsp) ---------- */
.tu-cal { flex: none; width: 132px; display: flex; flex-direction: column; text-align: center; overflow: hidden; border: 1px solid var(--tu-line); border-radius: 14px; background: var(--tu-card); box-shadow: 0 2px 8px rgba(14, 26, 51, .08); }
.tu-cal-top { background: var(--tu-primary); color: #fff; font-size: 14px; font-weight: 600; padding: 7px 8px; }
.tu-cal-day { padding-top: 6px; font-size: 54px; font-weight: 700; line-height: 1.1; color: var(--tu-ink); }
.tu-cal-dow { padding-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--tu-muted); }
.tu-cal-count { padding: 8px; font-size: 14px; font-weight: 700; border-top: 1px solid var(--tu-line); background: var(--tu-primary-soft); color: var(--tu-primary-dark); }
.tu-cal-count.today { background: var(--tu-accent); border-top-color: var(--tu-accent); color: var(--tu-ink); }
.tu-cal-count.past { background: var(--tu-line); color: var(--tu-muted); }

/* แผ่นข้อมูล (ที่นั่งสอบ / ตัวเลขสรุป): ฟ้าอ่อน ตัวอักษรเข้ม (แทนฟ้าเข้มเดิม) */
.tu-home .tu-seat > div { background: var(--tu-primary-faint); border: 1px solid var(--tu-edge); color: var(--tu-ink); }
.tu-home .tu-seat dt { color: var(--tu-ink-3); }
.tu-home .tu-seat dd { color: var(--tu-primary-dark); }

@media (max-width: 640px) { .tu-cal { align-self: flex-start; } }

/* ---------- seat.jsp: ปุ่มการทำงาน + บัตรประจำตัวเข้าสอบ (พิมพ์) ---------- */

#tu-print-root { display: none; }
#tu-print-root .tu-ticket { border: 2px solid #0E1A33; border-radius: 12px; padding: 20px 24px; color: #0E1A33; background: #fff; font-size: 14px; line-height: 1.5; }
#tu-print-root .tk-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid #0E1A33; }
#tu-print-root .tk-head img { height: 56px; width: auto; }
#tu-print-root .tk-title { flex: 1; }
#tu-print-root .tk-title h2 { font-size: 24px; font-weight: 700; margin: 0; }
#tu-print-root .tk-title p { margin: 2px 0 0; color: #44506B; }
#tu-print-root .tk-no { text-align: right; }
#tu-print-root .tk-no span { display: block; font-size: 12px; color: #44506B; }
#tu-print-root .tk-no b { font-size: 30px; line-height: 1.1; }
#tu-print-root .tk-body { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; padding: 16px 0; }
#tu-print-root .tk-info { display: flex; flex-direction: column; gap: 10px; margin: 0; }
#tu-print-root .tk-info > div { padding-bottom: 6px; border-bottom: 1px dashed #C5CCDA; }
#tu-print-root .tk-info dt { font-size: 12px; color: #556079; }
#tu-print-root .tk-info dd { margin: 0; font-size: 16px; font-weight: 600; }
#tu-print-root .tk-seat { display: flex; flex-direction: column; gap: 8px; }
#tu-print-root .tk-seat > div { border: 1.5px solid #0E1A33; border-radius: 10px; padding: 8px 12px; background: #F0F7FC; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#tu-print-root .tk-seat span { display: block; font-size: 12px; color: #44506B; }
#tu-print-root .tk-seat b { font-size: 20px; }
#tu-print-root .tk-seat b.tk-big { font-size: 46px; line-height: 1.1; }
#tu-print-root .tk-notes { margin: 0 0 6px; padding-left: 20px; list-style: disc; font-size: 12.5px; line-height: 1.7; }
#tu-print-root .tk-notes-h { margin: 12px 0 2px; font-size: 13px; font-weight: 700; }
#tu-print-root ol.tk-notes { list-style: decimal; }
#tu-print-root .tu-rule-sub { margin: 2px 0 0; padding-left: 18px; font-size: 12px; }
#tu-print-root .tk-rule-en { margin-top: 2px; font-size: 11.5px; color: #555; }
#tu-print-root .tk-foot { margin: 16px 0 0; font-size: 11px; color: #556079; text-align: right; }

@media print {
  @page { size: A4; margin: 14mm; }
  body.tu-printing { background: #fff; }
  body.tu-printing > *:not(#tu-print-root) { display: none !important; }
  body.tu-printing #tu-print-root { display: block; }
}

/* ปุ่มมุมขวาบนของหัวหน้า (seat.jsp) */
.tu-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 12px; }
@media (max-width: 640px) { .tu-head-actions { width: 100%; justify-content: stretch; } .tu-head-actions .tu-btn { width: 100%; } }

/* ---------- คู่มือ (manual.jsp) ---------- */
.tu-toc-print { margin-top: 10px; }
.tu-home .tu-manual h4 { font-size: 22px; font-weight: 700; }
.tu-home .tu-manual .tu-table td, .tu-home .tu-manual .tu-table th { font-size: 15px; }
.tu-home .tu-toc a { font-size: 15px; padding: 9px 12px; }
.tu-home .tu-toc a:hover { background: var(--tu-primary-soft); color: var(--tu-primary-dark); }

/* ---------- แถบเมนูล่างบนมือถือ (z_ui_header.jsp) ---------- */
.tu-tabbar { display: none; }
@media (max-width: 640px) {
  .tu-nav { display: none; }
  .tu-tabbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--tu-card); border-top: 1px solid var(--tu-line); padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(14, 26, 51, .06); }
  .tu-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; font-size: 11px; line-height: 1.25; color: var(--tu-muted) !important; text-decoration: none; text-align: center; }
  .tu-tabbar a[aria-current="page"] { color: var(--tu-primary) !important; font-weight: 600; background: var(--tu-primary-soft); }
  .tu.tu-home, .tu { padding-bottom: 72px; }
}
@media print { .tu-tabbar { display: none !important; } }

/* ---------- วงแหวนระดับ CEFR (main.jsp) ---------- */
.tu-donut { position: relative; width: 112px; height: 112px; flex: none; }
.tu-donut svg { transform: rotate(-90deg); display: block; }
.tu-donut-v { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 34px; line-height: 1; color: var(--tu-primary-dark); }
.tu-donut .trk { stroke: #fff; }
.tu-donut .val { stroke: var(--tu-primary); transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .tu-donut .val { transition: none; } }

/* =====================================================================
   v18 — ฮีโร่นัดสอบไล่สี + นับถอยหลัง + โหมดมืด (ตามต้นแบบ design-prototype)
   ===================================================================== */

/* ---------- ฮีโร่ไล่สี (main.jsp, seat.jsp: section.tu-next.tu-next-grad) ---------- */
.tu-home .tu-next.tu-next-grad { position: relative; overflow: hidden; padding: 30px; border: 0; border-radius: 22px; color: #fff; background: linear-gradient(120deg, var(--tu-hero-a), var(--tu-hero-b)); box-shadow: 0 10px 28px rgba(23, 90, 142, .25); }
.tu-next-grad::before { content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 138, 33, .32), transparent 65%); pointer-events: none; }
.tu-next-grad::after { content: ""; position: absolute; left: 30%; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .10), transparent 65%); pointer-events: none; }
.tu-next-grad > * { position: relative; z-index: 1; }
.tu-home .tu-next-grad .tu-next-info small { background: rgba(255, 255, 255, .16); color: #fff; }
.tu-home .tu-next-grad .tu-next-info strong { color: #fff; }
.tu-home .tu-next-grad .tu-next-meta { color: #fff; }
.tu-home .tu-next-grad .tu-next-meta svg { color: #fff; opacity: .9; }
.tu-home .tu-next-grad .tu-seat > div { background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.tu-home .tu-next-grad .tu-seat dt { color: #DCEBFA; }
.tu-home .tu-next-grad .tu-seat dd { color: #fff; }
.tu-home .tu-next-grad .tu-seat-wait { background: rgba(255, 255, 255, .14); border: 0; color: #fff; }
.tu-home .tu-next-grad .tu-seat-note { color: #DCEBFA; }
.tu-home .tu-next-grad .tu-btn-white { background: #fff; color: #0E1A33 !important; }
.tu-home .tu-next-grad .tu-btn-white:hover { background: #EAF3FB; }
.tu-home .tu-next-grad .tu-journey { border-top-color: rgba(255, 255, 255, .22); }
.tu-home .tu-next-grad .tu-journey .bar { background: rgba(255, 255, 255, .24); }
.tu-home .tu-next-grad .tu-journey .lab { color: #CFE3F4; }
.tu-home .tu-next-grad .tu-journey .dot { background: rgba(255, 255, 255, .22); color: #fff; }
.tu-home .tu-next-grad .tu-journey .done .bar { background: #fff; }
.tu-home .tu-next-grad .tu-journey .done .dot { background: #fff; color: var(--tu-hero-a); }
.tu-home .tu-next-grad .tu-journey .done .lab { color: #fff; }
.tu-home .tu-next-grad .tu-journey .now .bar { background: var(--tu-accent); }
.tu-home .tu-next-grad .tu-journey .now .dot { background: var(--tu-accent); color: #2A1500; }
.tu-home .tu-next-grad .tu-journey .now .lab { color: #fff; font-weight: 700; }

/* นับถอยหลัง วัน/ชม./นาที */
.tu-count { display: flex; gap: 10px; margin-top: 12px; }
.tu-count > div { min-width: 64px; padding: 6px 12px; border-radius: 12px; text-align: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); line-height: 1.2; }
.tu-count b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tu-count span { font-size: 12px; color: #DCEBFA; }
@media (max-width: 640px) {
  .tu-home .tu-next.tu-next-grad { padding: 20px 18px; }
  .tu-count > div { flex: 1 1 0; min-width: 0; }
}

/* ---------- ปุ่มสลับโหมดมืด ---------- */
.tu-theme { width: 44px; height: 44px; flex: none; border-radius: 11px; border: 1px solid var(--tu-line); background: var(--tu-card); color: var(--tu-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tu-theme:hover { border-color: var(--tu-primary); color: var(--tu-primary); }
.tu-theme .i-sun { display: none; }
html[data-theme="dark"] .tu-theme .i-sun { display: block; }
html[data-theme="dark"] .tu-theme .i-moon { display: none; }
.tu-login-top { gap: 10px; align-items: center; }

/* ---------- โหมดมืด ---------- */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] .tu {
  --tu-primary: #6AAAF0; --tu-primary-dark: #8CBFF6; --tu-primary-soft: #16294A; --tu-primary-faint: #12213C;
  --tu-ink: #EAF0FB; --tu-muted: #9AA8C2; --tu-line: #27334D; --tu-line-soft: #1E2840; --tu-line-input: #3A4866;
  --tu-bg: #0B1222; --tu-white: #131C31; --tu-card: #131C31; --tu-ink-2: #C5D0E6; --tu-ink-3: #AEBBD4;
  --tu-edge: #27406B; --tu-edge-2: #2C4A7C;
  --tu-accent: #F7A04A; --tu-warn-bg: #3A2410; --tu-warn-ink: #FFCB94; --tu-warn-dark: #FFD9AE; --tu-warn-line: #F7A04A;
  --tu-ok: #4ADE80; --tu-ok-bg: #10301E; --tu-err-bg: #3B1715; --tu-err-ink: #FF8A80;
  --tu-hero-a: #16315A; --tu-hero-b: #1D4A86;
}
html[data-theme="dark"] .tu :focus-visible { outline-color: #6AAAF0; }
html[data-theme="dark"] .tu-btn-primary, html[data-theme="dark"] .tu-lang button[aria-pressed="true"], html[data-theme="dark"] .tu-tabs button[aria-selected="true"] .tu-tab-ico { color: #06142A !important; }
html[data-theme="dark"] .tu-btn-accent { color: #2A1500 !important; }
html[data-theme="dark"] .tu-btn-white { background: #EAF0FB; color: #0B1222 !important; }
html[data-theme="dark"] .tu-acct summary { background: #EAF0FB; color: #0B1222; }
html[data-theme="dark"] .tu-tab-check, html[data-theme="dark"] .tu-steps .on .dot { color: #06142A; }
html[data-theme="dark"] .tu-filter button[aria-pressed="true"] { background: var(--tu-primary); color: #06142A; border-color: var(--tu-primary); }
html[data-theme="dark"] .tu-card-dark { background: #1B2A4A; border-color: #27406B; color: #fff; }
html[data-theme="dark"] .tu-header { background: rgba(19, 28, 49, .92); }
html[data-theme="dark"] .tu-brand img, html[data-theme="dark"] .tu-login-box > img { background: #fff; border-radius: 10px; padding: 4px 8px; box-sizing: content-box; }
html[data-theme="dark"] .tu-brand img { height: 32px; }
html[data-theme="dark"] .tu-login-box > img { height: 44px; }
html[data-theme="dark"] .tu-login-hero { background: linear-gradient(150deg, #0F2342, #1D4A86); }
html[data-theme="dark"] .tu-pill { background: rgba(255, 255, 255, .14); color: #fff; }
html[data-theme="dark"] .tu-feats li > span:first-child { color: #2A1500; }
html[data-theme="dark"] .tu-input, html[data-theme="dark"] .tu select.tu-input { background: var(--tu-card); color: var(--tu-ink); }
html[data-theme="dark"] .tu-input::placeholder { color: #6F7E9C; }
html[data-theme="dark"] .tu .tu-input:focus { outline-color: #2C4A7C; }
html[data-theme="dark"] .tu-alert { border-color: #6B4318; }
html[data-theme="dark"] .tu-alert-ico { background: #2A1A0A; }
html[data-theme="dark"] .tu-alert-body strong { color: var(--tu-ink); }
html[data-theme="dark"] .tu-ok-row td { background: #0F2A1B; }
html[data-theme="dark"] .tu-home .tu-card-feature { background: linear-gradient(160deg, #16294A, #131C31 70%); border-color: #27406B; box-shadow: none; }
html[data-theme="dark"] .tu-home .tu-card-feature .tu-scale > span:not(.on) i { background: #27334D; }
html[data-theme="dark"] .tu-home .tu-card-feature .tu-chip-grey { background: #27334D; }
html[data-theme="dark"] .tu-donut .trk { stroke: #27334D; }
html[data-theme="dark"] .tu-home .tu-btn-soft { background: var(--tu-primary-soft); border-color: #27406B; color: var(--tu-primary-dark) !important; }
html[data-theme="dark"] .tu-home .tu-btn-soft:hover { background: #1E3A66; }
html[data-theme="dark"] .tu-home .tu-next { box-shadow: none; }
html[data-theme="dark"] .tu-notice-info, html[data-theme="dark"] .tu-notice-info strong { color: #CFE3F9; }
html[data-theme="dark"] .tu-tabbar { background: var(--tu-card); box-shadow: none; }
html[data-theme="dark"] .tu-bordered th { background: var(--tu-line-soft); }
html[data-theme="dark"] .tu-footer { background: var(--tu-card); }
html[data-theme="dark"] .tu-btn[disabled], html[data-theme="dark"] .tu-btn.is-disabled { background: var(--tu-line); }

/* ---------- วงแหวน CEFR ขนาดใหญ่ (score.jsp) + คำถามที่พบบ่อยแบบพับเปิด (manual.jsp) ---------- */
.tu-donut-lg { width: 148px; height: 148px; }
.tu-donut-lg .trk { stroke: var(--tu-line); }
.tu-donut-lg .tu-donut-v { flex-direction: column; gap: 2px; font-size: 44px; }
.tu-donut-lg .tu-donut-v small { font-size: 12px; font-weight: 600; color: var(--tu-muted); letter-spacing: .04em; }
@media (max-width: 640px) { .tu-donut-lg { align-self: center; } }

.tu-faq { border-top: 1px solid var(--tu-line-soft); }
.tu-faq:last-of-type { border-bottom: 1px solid var(--tu-line-soft); }
.tu-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 4px; font-weight: 600; }
.tu-faq summary::-webkit-details-marker { display: none; }
.tu-faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--tu-muted); border-bottom: 2px solid var(--tu-muted); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.tu-faq[open] summary::after { transform: rotate(-135deg); }
.tu-faq summary:hover { color: var(--tu-primary); }
.tu-faq > div { padding: 0 4px 16px; color: var(--tu-ink-2); }
@media (prefers-reduced-motion: reduce) { .tu-faq summary::after { transition: none; } }
@media print { .tu-faq > div { display: block !important; } }

/* =====================================================================
   v20 — main.jsp ตามภาพต้นแบบ (body.tu-v2) + เมนูบน 5 รายการมีไอคอน + โลโก้ในกรอบ
   ===================================================================== */

/* ---------- เมนูบน (ทุกหน้า) ---------- */
.tu-nav a { display: inline-flex; align-items: center; gap: 8px; }
.tu-nav a svg { flex: none; }
.tu-brand img { height: 34px; padding: 5px 9px; background: #fff; border: 1px solid var(--tu-line); border-radius: 11px; box-sizing: content-box; }
html[data-theme="dark"] .tu-brand img { height: 34px; border-color: transparent; }
@media (max-width: 640px) { .tu-tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tu-tabbar a { font-size: 12px; } }

/* ---------- main.jsp ---------- */
.tu-v2 .tu-main, .tu-v2 .tu-header-in, .tu-v2 .tu-footer-in { max-width: 1200px; }
.tu-v2 .tu-h1 { font-weight: 600; }

/* แจ้งเตือนชำระเงิน: ไอคอนทึบสีส้ม */
.tu-v2 .tu-alert-ico { background: var(--tu-accent); color: #2A1500; }
.tu-v2 .tu-alert { border-radius: 16px; }

/* ฮีโร่นัดสอบ: ปฏิทิน | ข้อมูล | กล่องที่นั่ง แล้วตามด้วยแถบขั้นตอน */
.tu-v2 .tu-next.tu-next-grad { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; }
.tu-v2 .tu-next-grad .tu-cal { width: 112px; border: 0; border-radius: 18px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.tu-v2 .tu-next-grad .tu-cal-top { background: var(--tu-accent); color: #2A1500; font-size: 13px; font-weight: 700; padding: 5px 0; }
.tu-v2 .tu-next-grad .tu-cal-day { font-size: 46px; }
.tu-v2 .tu-next-grad .tu-cal-dow { font-size: 13px; }
.tu-v2 .tu-next-grad .tu-cal-count:not(.today):not(.past) { display: none; }
.tu-v2 .tu-next-grad .tu-next-info { gap: 2px; }
.tu-v2 .tu-next-grad .tu-next-info small { align-self: auto; padding: 0; margin: 0; background: none; border-radius: 0; font-size: 14.5px; font-weight: 500; opacity: .9; }
.tu-v2 .tu-next-grad .tu-next-info strong { font-size: 28px; font-weight: 600; }
.tu-v2 .tu-next-grad .tu-next-meta { margin-top: 6px !important; gap: 4px 22px; }
.tu-v2 .tu-next-grad .tu-seatlink { display: block; text-decoration: none; color: inherit; border-radius: 16px; }
.tu-v2 .tu-next-grad .tu-seatlink:hover .tu-seat { background: rgba(255, 255, 255, .2); }
.tu-v2 .tu-next-grad .tu-seat { flex: none; display: grid; grid-template-columns: repeat(3, auto); gap: 0; padding: 14px 6px; border-radius: 16px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); text-align: center; transition: background .15s; }
.tu-v2 .tu-next-grad .tu-seat > div { background: none; border: 0; border-radius: 0; padding: 0 18px; align-items: center; backdrop-filter: none; }
.tu-v2 .tu-next-grad .tu-seat > div + div { border-left: 1px solid rgba(255, 255, 255, .22); }
.tu-v2 .tu-next-grad .tu-seat dt { font-size: 13px; font-weight: 500; }
.tu-v2 .tu-next-grad .tu-seat dd { font-size: 26px; }
.tu-v2 .tu-next-grad .tu-seat-wait { grid-column: 2 / -1; }
.tu-v2 .tu-next-grad .tu-journey { grid-column: 1 / -1; border-top: 0; padding-top: 6px; }
@media (max-width: 960px) {
  .tu-v2 .tu-next.tu-next-grad { grid-template-columns: auto minmax(0, 1fr); }
  .tu-v2 .tu-next-grad .tu-seatlink, .tu-v2 .tu-next-grad .tu-seat-wait { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tu-v2 .tu-next.tu-next-grad { grid-template-columns: minmax(0, 1fr); }
  .tu-v2 .tu-next-grad .tu-cal { width: auto; flex-direction: row; align-items: stretch; justify-self: start; }
  .tu-v2 .tu-next-grad .tu-cal > div[aria-hidden] { display: flex; align-items: center; }
  .tu-v2 .tu-next-grad .tu-cal-top { padding: 0 12px; display: grid; place-items: center; align-self: stretch; }
  .tu-v2 .tu-next-grad .tu-cal-day { padding: 6px 12px 0; font-size: 34px; }
  .tu-v2 .tu-next-grad .tu-cal-dow { padding: 0 14px 0 0; }
  .tu-v2 .tu-next-grad .tu-next-info strong { font-size: 22px; }
  .tu-v2 .tu-next-grad .tu-seat dd { font-size: 20px; }
  .tu-v2 .tu-next-grad .tu-seat > div { padding: 0 8px; }
}

/* หัวการ์ด: เรียบ ไม่มีแถบสี/พื้นฟ้า */
.tu-v2 .tu-card-head { background: none; border-radius: 0; padding: 18px 22px; }
.tu-v2 .tu-card-head .tu-h2::before, .tu-v2 .tu-card > .tu-h3::before { display: none; }
.tu-v2 .tu-card-head .tu-h2 { font-size: 19px; font-weight: 600; }
.tu-v2 .tu-card > .tu-h3 { font-size: 19px; font-weight: 600; }
.tu-v2 .tu-card { border-radius: 16px; box-shadow: 0 1px 2px rgba(14, 26, 51, .05), 0 6px 20px rgba(14, 26, 51, .05); }

/* รอบสอบที่เปิดรับสมัคร */
.tu-v2 .tu-round { padding: 16px 22px; }
.tu-v2 .tu-date { width: 64px; border-radius: 14px; padding: 6px 0; }
.tu-v2 .tu-date b { font-size: 26px; }
.tu-v2 .tu-btn-reg { border-radius: 12px; }
.tu-meter-bar.hot span { background: var(--tu-accent); }
.tu-chip svg { flex: none; }
.tu-v2 .tu-chip { display: inline-flex; align-items: center; gap: 6px; }

/* ตารางประวัติ: หัวตารางพื้นเทา เต็มความกว้างการ์ด */
.tu-v2 .tu-table-pad { padding: 0; }
.tu-v2 .tu-table th { background: var(--tu-line-soft); padding: 10px 22px; font-size: 13px; border-bottom: 0; }
.tu-v2 .tu-table td { padding: 13px 22px; vertical-align: middle; }

/* การ์ดผลสอบล่าสุด: วงแหวนซ้าย ข้อมูลขวา */
.tu-v2 .tu-card-feature { border-radius: 16px; gap: 14px; }
.tu-res-row { display: flex; align-items: center; gap: 18px; }
.tu-res-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.tu-res-side .tu-help-txt { line-height: 1.5; }
.tu-donut-v { flex-direction: column; gap: 2px; }
.tu-donut-v small { font-size: 10.5px; font-weight: 500; color: var(--tu-muted); letter-spacing: 0; }
.tu-v2 .tu-donut .trk { stroke: var(--tu-line); }
html[data-theme="dark"] .tu-v2 .tu-donut .trk { stroke: #27334D; }
@media (max-width: 420px) { .tu-res-row { flex-direction: column; align-items: flex-start; } }

/* การ์ดเตรียมตัววันสอบ */

/* ---------- v22: ปรับสัดส่วนคอลัมน์และความกว้างเมนูบนให้พอดีหนึ่งแถว ---------- */
.tu-header-in { gap: 12px 18px; }
.tu-nav a { padding: 10px 12px; }
.tu-v2 .tu-split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.tu-v2 .tu-split-main, .tu-v2 .tu-split-side { flex: none; }
/* หน้าสมัครสอบ: กล่องสรุป (ข้อปฏิบัติ + กำหนดการ) กว้างเท่าคอลัมน์ซ้าย */
.tu-v2 .tu-split.tu-split-even { grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr); }
@media (max-width: 960px) { .tu-v2 .tu-split, .tu-v2 .tu-split.tu-split-even { grid-template-columns: minmax(0, 1fr); } }

/* v23: กล่องที่นั่งบนมือถือ — ให้ป้ายอยู่บน ค่าอยู่ล่าง 3 ช่องเท่ากัน */
@media (max-width: 640px) {
  .tu-v2 .tu-next-grad .tu-seat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tu-v2 .tu-next-grad .tu-seat > div { flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-width: 0; }
  .tu-v2 .tu-next-grad .tu-seat dd { font-size: 19px; line-height: 1.25; word-break: break-word; }
}

/* =====================================================================
   v25 — ทั้งระบบตามต้นแบบ design-prototype: ขั้นตอนสมัคร, การ์ดเลือกรอบ, บัตรแบบตั๋ว, คู่มือ, ผลสอบ, หน้าเข้าสู่ระบบ
   ===================================================================== */

/* ---------- แถบขั้นตอน (z_ui_steps.jsp) ---------- */
.tu-stepper { display: flex; align-items: center; gap: 10px; }
.tu-stepper .s { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--tu-muted); white-space: nowrap; }
.tu-stepper .dot { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tu-line); color: var(--tu-muted); font-weight: 700; font-size: 14px; }
.tu-stepper .s.on { color: var(--tu-ink); font-weight: 600; }
.tu-stepper .s.on .dot { background: var(--tu-primary); color: #fff; }
.tu-stepper .s.done .dot { background: var(--tu-ok); color: #fff; }
.tu-stepper .ln { flex: 1 1 auto; height: 2px; min-width: 16px; background: var(--tu-line); }
.tu-stepper .ln.done { background: var(--tu-ok); }
html[data-theme="dark"] .tu-stepper .s.on .dot, html[data-theme="dark"] .tu-stepper .s.done .dot { color: #06142A; }
@media (max-width: 640px) { .tu-stepper .s:not(.on) .lab { display: none; } }

/* ---------- การ์ดเลือกรอบสอบ (quiz.jsp) ---------- */
.tu-opts { display: flex; flex-direction: column; gap: 12px; }
.tu-opt { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1.5px solid var(--tu-line); border-radius: 16px; background: var(--tu-card); cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.tu-opt:hover { border-color: var(--tu-edge-2); }
.tu-opt .rad { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tu-line-input); display: grid; place-items: center; }
.tu-opt[aria-checked="true"] { border-color: var(--tu-primary); background: var(--tu-primary-soft); box-shadow: 0 0 0 4px rgba(31, 111, 174, .14); }
.tu-opt[aria-checked="true"] .rad { border-color: var(--tu-primary); background: var(--tu-primary); }
.tu-opt[aria-checked="true"] .rad::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.tu-opt:focus-within { outline: 3px solid #8CBCE3; outline-offset: 2px; }
.tu-opt .tu-date { width: 64px; padding: 6px 0; margin: 0; }
.tu-opt .b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tu-opt .t { font-weight: 600; font-size: 17px; line-height: 1.4; }
.tu-opt .p { font-size: 15px; color: var(--tu-muted); }
.tu-opt .s { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tu-opt .tu-chip svg { flex: none; }
.tu-opt.is-off { opacity: .6; cursor: not-allowed; background: var(--tu-bg); }
.tu-opt.is-off:has(a) { opacity: 1; cursor: default; }
.tu-opts-foot { display: flex; justify-content: flex-end; margin-top: 20px; }
.tu-v2 .tu-btn-primary[disabled] { background: var(--tu-primary); color: #fff !important; opacity: .45; border-color: transparent; }
html[data-theme="dark"] .tu-v2 .tu-btn-primary[disabled] { color: #06142A !important; }
@media (max-width: 640px) {
  .tu-opt { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 14px; }
  .tu-opt .tu-date { display: none; }
  .tu-opt .s { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .tu-opts-foot .tu-btn { width: 100%; }
}

/* ---------- หน้าตรวจสอบ/ชำระเงิน: รายการแบบ label–value คั่นเส้นประ (enrollAdd, payIn) ---------- */
.tu-v2 .tu-dl-fit { display: block; padding-top: 6px; }
.tu-v2 .tu-dl-fit > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 12px 0; border-bottom: 1px dashed var(--tu-line); }
.tu-v2 .tu-dl-fit > div:last-child { border-bottom: 0; }
.tu-v2 .tu-dl-fit dt { flex: none; }
.tu-v2 .tu-dl-fit dd { margin: 0; text-align: right; font-weight: 600; }
.tu-v2 .tu-card-flush > .tu-dl-fit { padding-left: 22px; padding-right: 22px; }
.tu-v2 .tu-notice-err { background: var(--tu-primary-soft); color: var(--tu-ink); border: 0; }
.tu-v2 .tu-notice-err svg { color: var(--tu-primary); }
.tu-v2 .tu-notice-err strong { color: var(--tu-ink); }
.tu-v2 .tu-pickbox { border-radius: 14px; }
.tu-v2 .tu-big { color: var(--tu-primary); }

/* ---------- บัตรเข้าสอบแบบตั๋ว (seat.jsp) ---------- */
.tu-tkt-list { display: flex; flex-direction: column; gap: 22px; }
.tu-tkt { display: grid; grid-template-columns: minmax(0, 1fr) 250px; border-radius: 22px; overflow: hidden; background: var(--tu-card); border: 1px solid var(--tu-line); box-shadow: 0 1px 2px rgba(14, 26, 51, .05), 0 6px 20px rgba(14, 26, 51, .06); }
.tu-tkt-main { padding: 28px 30px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.tu-tkt-head { display: flex; align-items: center; gap: 12px; }
.tu-tkt-head img { height: 34px; padding: 5px 9px; background: #fff; border: 1px solid var(--tu-line); border-radius: 11px; box-sizing: content-box; }
.tu-tkt-ttl { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tu-tkt-ttl b { font-size: 17px; font-weight: 600; }
.tu-tkt-ttl small { font-size: 12.5px; color: var(--tu-muted); }
.tu-tkt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; }
.tu-tkt-grid .wide { grid-column: 1 / -1; }
.tu-tkt-grid dt { font-size: 13px; color: var(--tu-muted); }
.tu-tkt-grid dd { font-weight: 600; font-size: 17px; line-height: 1.35; word-break: break-word; }
.tu-tkt-grid dd.lg { font-size: 22px; }
.tu-tkt-grid .big dd { font-size: 30px; line-height: 1.15; color: var(--tu-primary); }
.tu-tkt-person { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--tu-bg); }
.tu-tkt-person .photo { width: 58px; height: 70px; flex: none; border-radius: 10px; background: var(--tu-line); color: var(--tu-muted); display: grid; place-items: center; }
.tu-tkt-person b { display: block; font-weight: 600; }
.tu-tkt-person small { font-size: 13.5px; color: var(--tu-muted); }
.tu-tkt-stub { position: relative; padding: 26px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; color: #fff; background: linear-gradient(160deg, var(--tu-hero-a), var(--tu-hero-b)); border-left: 2px dashed rgba(255, 255, 255, .4); }
.tu-tkt-stub::before, .tu-tkt-stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--tu-bg); }
.tu-tkt-stub::before { top: -12px; }
.tu-tkt-stub::after { bottom: -12px; }
.tu-tkt-stub p { font-size: 14px; color: #E4EFFA; max-width: 200px; }
.tu-tkt-stub .tu-cal { box-shadow: 0 10px 28px rgba(0, 0, 0, .25); border: 0; }
.tu-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tu-tip { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.tu-tip .ti { width: 40px; height: 40px; border-radius: 12px; background: var(--tu-primary-soft); color: var(--tu-primary); display: grid; place-items: center; }
@media (max-width: 900px) {
  .tu-tkt { grid-template-columns: minmax(0, 1fr); }
  .tu-tkt-stub { border-left: 0; border-top: 2px dashed rgba(255, 255, 255, .4); flex-direction: row; justify-content: center; }
  .tu-tkt-stub::before, .tu-tkt-stub::after { top: -12px; bottom: auto; }
  .tu-tkt-stub::before { left: -12px; }
  .tu-tkt-stub::after { left: auto; right: -12px; }
  .tu-tips { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) { .tu-tkt-main { padding: 20px 18px; } .tu-tkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tu-tkt-grid .big dd { font-size: 24px; } .tu-tkt-stub { flex-direction: column; } }

/* ---------- ผลสอบ: คำอธิบายระดับ CEFR ---------- */
.tu-cefr-desc { display: flex; flex-direction: column; }
.tu-cefr-desc li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 10px 0; align-items: start; font-size: 14.5px; color: var(--tu-ink-2); }
.tu-cefr-desc li b { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 8px; background: var(--tu-line-soft); color: var(--tu-ink); font-size: 13px; }
.tu-cefr-desc li.cur { color: var(--tu-ink); font-weight: 500; }
.tu-cefr-desc li.cur b { background: var(--tu-primary); color: #fff; }
html[data-theme="dark"] .tu-cefr-desc li.cur b { color: #06142A; }

/* ---------- คู่มือ: ขั้นตอนภาพรวมแบบไอคอน ---------- */
.tu-gflow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; list-style: none; padding: 0; }
.tu-gflow li { display: grid; justify-items: center; text-align: center; gap: 6px; font-size: 13.5px; font-weight: 500; position: relative; margin: 0; }
.tu-gflow li b { font-size: 12px; color: var(--tu-muted); }
.tu-gflow li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: calc(50% + 28px); right: calc(-50% + 28px); height: 2px; background: var(--tu-line); }
.tu-gflow .gi { width: 46px; height: 46px; border-radius: 14px; background: var(--tu-primary-soft); color: var(--tu-primary); display: grid; place-items: center; }
@media (max-width: 720px) { .tu-gflow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .tu-gflow li::after { display: none !important; } }

/* ---------- หน้าเข้าสู่ระบบ: แผงซ้ายไล่สีมีแสงส้ม ---------- */
.tu-v2 .tu-login-hero { position: relative; overflow: hidden; background: linear-gradient(150deg, #0F2F5C, #1F6FAE); }
.tu-v2 .tu-login-hero::before { content: ""; position: absolute; right: -120px; bottom: -120px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 138, 33, .35), transparent 65%); pointer-events: none; }
.tu-v2 .tu-login-hero > * { position: relative; }
.tu-v2 .tu-pill { background: rgba(255, 255, 255, .16); }
.tu-v2 .tu-feats li { align-items: center; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.tu-v2 .tu-login-box > img { height: 44px; padding: 6px 10px; border: 1px solid var(--tu-line); border-radius: 12px; box-sizing: content-box; background: #fff; }

/* =====================================================================
   v26 — score.jsp ตามต้นแบบ: การ์ดสรุปผล (วงแหวน | ระดับ | คะแนนสูงสุด) + แถบทักษะ
   ===================================================================== */
.tu-rhero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: 30px; border: 1px solid var(--tu-line); border-radius: 20px; background: linear-gradient(160deg, var(--tu-primary-faint), var(--tu-card) 70%); box-shadow: 0 1px 2px rgba(14, 26, 51, .05), 0 6px 20px rgba(14, 26, 51, .05); }
.tu-donut-xl { width: 176px; height: 176px; }
.tu-donut-xl .trk { stroke: var(--tu-line); }
.tu-donut-xl .tu-donut-v { flex-direction: column; gap: 4px; font-size: 52px; }
.tu-donut-xl .tu-donut-v small { font-size: 12px; font-weight: 500; color: var(--tu-muted); }
.tu-rhero .rbody { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.tu-rhero .rtitle { font-size: 24px; font-weight: 600; line-height: 1.35; margin: 0; }
.tu-rhero .tu-scale { width: 100%; max-width: 460px; margin-top: 6px; }
.tu-rhero .tu-scale > span:not(.on) i { background: var(--tu-line); }
.tu-rhero .rstat { min-width: 190px; padding: 18px 22px; border-radius: 16px; background: var(--tu-card); border: 1px solid var(--tu-line); box-shadow: 0 1px 2px rgba(14, 26, 51, .05), 0 6px 20px rgba(14, 26, 51, .05); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.tu-rhero .rstat .muted { font-size: 13px; color: var(--tu-muted); }
.tu-rhero .rstat b { font-size: 40px; font-weight: 700; line-height: 1.2; }
html[data-theme="dark"] .tu-rhero { background: linear-gradient(160deg, #16294A, #131C31 70%); }
html[data-theme="dark"] .tu-donut-xl .trk { stroke: #27334D; }
@media (max-width: 960px) {
  .tu-rhero { grid-template-columns: auto minmax(0, 1fr); }
  .tu-rhero .rstat { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tu-rhero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 24px 18px; }
  .tu-rhero .rbody { align-items: center; }
  .tu-rhero .rtitle { font-size: 20px; }
}

/* แถบทักษะ: ไอคอนมน + แถบหนาไล่สี */
.tu-v2 .tu-skill { gap: 10px 16px; padding: 12px 0; }
.tu-v2 .tu-skill .n i { border-radius: 10px; width: 36px; height: 36px; font-size: 14px; }
.tu-v2 .tu-skill-bar .tu-meter-bar { height: 10px; border-radius: 10px; }
.tu-v2 .tu-skill-bar .tu-meter-bar span { background: linear-gradient(90deg, var(--tu-primary), #5FB0FF); border-radius: 10px; }
html[data-theme="dark"] .tu-v2 .tu-skill-bar .tu-meter-bar span { background: linear-gradient(90deg, #4F94E0, var(--tu-primary)); }
.tu-v2 .tu-skill .score { color: var(--tu-primary); }

/* ---------- กล่องแจ้งผลสอบแบบกระดาษ (ui_function.jsp: uiPaperResultNotice) ---------- */
.tu-paperform { align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.tu-paperform > div { flex: 1 1 320px; min-width: 0; line-height: 1.5; }
.tu-paperform > svg { margin-top: 0; color: var(--tu-primary); }
.tu-paperform .tu-btn { flex: none; }
@media (max-width: 640px) { .tu-paperform .tu-btn { width: 100%; } }

/* ---------- login: ข้อความชื่อระบบใหญ่ขึ้น + ลิงก์ศูนย์ภาษา ---------- */
.tu-login-hero .tu-login-hero-in > p { font-size: 22px; line-height: 1.5; font-weight: 500; color: #fff; }
.tu-login-hero .campus { font-size: 16px; }
.tu-login-hero .campus a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tu-login-hero .campus a:hover { color: #FFD9AE; }
@media (max-width: 640px) { .tu-login-hero .tu-login-hero-in > p { font-size: 18px; } }

/* ---------- คู่มือ: ภาพรวมขั้นตอนต้องเป็นกริด 6 คอลัมน์ (ชนะกฎ .tu-manual ol เดิม) ---------- */
.tu-manual ol.tu-gflow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 18px; }
.tu-manual ol.tu-gflow > li { display: grid; justify-items: center; align-content: start; text-align: center; gap: 6px; margin: 0; position: relative; }
.tu-manual ol.tu-gflow > li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: calc(50% + 28px); right: calc(-50% + 28px); height: 2px; background: var(--tu-line); }
@media (max-width: 720px) { .tu-manual ol.tu-gflow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .tu-manual ol.tu-gflow > li::after { display: none !important; } }
