/* =====================================================================
   Trang đăng ký xét tuyển online – giao diện 2026
   Mọi lớp đều có tiền tố .ts- để không đụng CSS Metronic (style.bundle.css)
   ===================================================================== */
/* Màu sắc: xem tuyensinh-themes.css (chọn mẫu: dòng TuyenSinh.Theme.* có value="active" trong Web.config) */
.ts {
    --ts-r: 12px;
    width: 100%;
    align-self: stretch;
    font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ts-ink);
    background: var(--ts-bg);
}
body.ts-body { background: var(--ts-bg) !important; }
.ts *, .ts *::before, .ts *::after { box-sizing: border-box; }
.ts h1, .ts h2, .ts h3, .ts h4 { margin: 0; line-height: 1.2; color: inherit; text-wrap: balance; }
.ts-wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ts :focus-visible { outline: 3px solid var(--ts-red); outline-offset: 2px; }

/* ---------- header ---------- */
.ts-top { background: var(--ts-surface); border-bottom: 1px solid var(--ts-line); position: sticky; top: 0; z-index: 90; }
.ts-top .ts-wrap { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.ts-brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none !important; color: inherit; }
.ts-brand img { width: 52px; height: 52px; flex: none; }
.ts-brand .n1 { font-weight: 800; color: var(--ts-brand); font-size: 15.5px; line-height: 1.15; }
.ts-brand .n2 { font-size: 11.5px; color: var(--ts-blue); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.ts-sp { flex: 1; }
.ts-hot { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ts-hot small { font-size: 11px; color: var(--ts-muted); text-transform: uppercase; letter-spacing: .08em; }
.ts-hot a { font-weight: 700; color: var(--ts-acc); font-variant-numeric: tabular-nums; }

.ts-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid transparent; padding: 10px 18px; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; line-height: 1.3; }
.ts-btn svg { width: 18px; height: 18px; }
.ts-btn-primary { background: var(--ts-red); color: #fff !important; }
.ts-btn-primary:hover { background: var(--ts-red-ink); }
.ts-btn-primary:disabled { opacity: .7; cursor: wait; }
.ts-btn-ghost { background: var(--ts-surface); border-color: var(--ts-line); color: var(--ts-ink); }
.ts-btn-ghost:hover { border-color: var(--ts-red); color: var(--ts-red); }

/* ---------- hero ---------- */
.ts-hero { background: var(--ts-hero); color: #fff; position: relative; overflow: hidden; }
.ts-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); }
.ts-hero .ts-wrap { padding-top: 34px; padding-bottom: 70px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: end; position: relative; z-index: 1; }
.ts-eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.ts-hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; margin-top: 8px; color: #fff; }
.ts-hero p { margin: 10px 0 0; opacity: .9; max-width: 52ch; }
.ts-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ts-fact { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px; }
.ts-fact b { display: block; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ts-fact span { font-size: 12.5px; opacity: .88; line-height: 1.3; display: block; }

/* ---------- main ---------- */
.ts-main .ts-wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; margin-top: -44px; position: relative; z-index: 2; padding-bottom: 48px; }
.ts-side { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.ts-panel { background: var(--ts-surface); border: 1px solid var(--ts-line); border-radius: var(--ts-r); box-shadow: var(--ts-shadow); }
.ts-steps { padding: 10px; }
.ts-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ts-step-btn { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px; cursor: pointer; color: var(--ts-ink); }
.ts-step-btn:hover { background: var(--ts-surface-2); }
.ts-step-btn .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 2px solid var(--ts-line); color: var(--ts-muted); flex: none; }
.ts-step-btn .t { font-weight: 600; font-size: 14px; line-height: 1.25; display: block; }
.ts-step-btn .s { font-size: 12px; color: var(--ts-muted); line-height: 1.3; display: block; }
.ts-step-btn.cur { background: var(--ts-red-soft); }
.ts-step-btn.cur .dot { border-color: var(--ts-red); background: var(--ts-red); color: #fff; }
.ts-step-btn.done .dot { border-color: var(--ts-ok); background: var(--ts-ok-soft); color: var(--ts-ok); }
.ts-prog { padding: 4px 12px 12px; }
.ts-bar { height: 6px; border-radius: 99px; background: var(--ts-line); overflow: hidden; }
.ts-bar i { display: block; height: 100%; background: var(--ts-acc); border-radius: 99px; transition: width .3s; }
.ts-prog small { display: flex; justify-content: space-between; color: var(--ts-muted); font-size: 12px; margin-top: 6px; }
.ts-help { padding: 16px; }
.ts-help h3 { font-size: 14px; margin-bottom: 6px; }
.ts-help p { margin: 0 0 10px; color: var(--ts-muted); font-size: 13px; }
.ts-help a { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; color: var(--ts-ink); }
.ts-help svg { width: 16px; height: 16px; color: var(--ts-acc); }

.ts-card { padding: 28px; }
.ts-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--ts-line); margin-bottom: 22px; flex-wrap: wrap; }
.ts-head .k { font-size: 12px; color: var(--ts-acc); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ts-head h2 { font-size: 22px; font-weight: 800; margin-top: 4px; }
.ts-head p { margin: 4px 0 0; color: var(--ts-muted); font-size: 13.5px; }
.ts-req-note { font-size: 12.5px; color: var(--ts-muted); background: var(--ts-surface-2); border: 1px solid var(--ts-line); border-radius: 8px; padding: 6px 10px; }
.ts-req-note em { color: var(--ts-danger); font-style: normal; font-weight: 700; }

.ts-group { margin-bottom: 26px; }
.ts-group:last-child { margin-bottom: 0; }
.ts-gtitle { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ts-muted); margin-bottom: 14px; }
.ts-gtitle::after { content: ""; flex: 1; height: 1px; background: var(--ts-line); }
.ts-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.ts-c3 { grid-column: span 3; } .ts-c4 { grid-column: span 4; } .ts-c5 { grid-column: span 5; } .ts-c6 { grid-column: span 6; }
.ts-c7 { grid-column: span 7; } .ts-c8 { grid-column: span 8; } .ts-c12 { grid-column: span 12; }
.ts-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ts-f > label, .ts-f > .ts-lb { font-size: 13.5px; font-weight: 600; margin: 0; color: var(--ts-ink); }
.ts-req::after { content: " *"; color: var(--ts-danger); }
.ts-hint { font-size: 12px; color: var(--ts-muted); }
.ts-err { font-size: 12px; color: var(--ts-danger); display: none; }
.ts-f.invalid .ts-err { display: block; }

/* inputs (ghi đè Metronic trong phạm vi .ts) */
.ts .form-control, .ts .form-select { height: 46px; border: 1px solid var(--ts-line); border-radius: 10px; background-color: #fff; padding: 0 12px; font-size: 15px; color: var(--ts-ink); box-shadow: none; }
.ts textarea.form-control { height: auto; padding: 10px 12px; }
.ts .form-control:focus, .ts .form-select:focus { border-color: var(--ts-red); box-shadow: 0 0 0 4px var(--ts-ring); }
.ts .form-control:disabled, .ts .form-control[readonly].ts-ro { background: var(--ts-surface-2); color: var(--ts-muted); }
.ts .form-control::placeholder { color: #a39699; }
.ts .select2-container--bootstrap5 .select2-selection { min-height: 46px; border: 1px solid var(--ts-line); border-radius: 10px; display: flex; align-items: center; font-size: 15px; background-color: #fff; }
.ts .select2-container--bootstrap5.select2-container--focus .select2-selection,
.ts .select2-container--bootstrap5.select2-container--open .select2-selection { border-color: var(--ts-red); box-shadow: 0 0 0 4px var(--ts-ring); }
.ts-f.invalid .form-control, .ts-f.invalid .form-select, .ts-f.invalid .select2-selection { border-color: var(--ts-danger) !important; }
.ts .select2-container--disabled .select2-selection { background: var(--ts-surface-2); }

.ts-seg { display: flex; border: 1px solid var(--ts-line); border-radius: 10px; padding: 3px; height: 46px; background: #fff; }
.ts-seg label { flex: 1; display: grid; place-items: center; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ts-muted); margin: 0; position: relative; }
.ts-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ts-seg label.on { background: var(--ts-red); color: #fff; }
.ts-f.invalid .ts-seg { border-color: var(--ts-danger); }

/* previews */
.ts-preview { grid-column: span 12; display: flex; gap: 12px; align-items: flex-start; background: var(--ts-surface-2); border: 1px dashed var(--ts-line); border-radius: 10px; padding: 12px 14px; }
.ts-preview svg { width: 20px; height: 20px; color: var(--ts-acc); flex: none; margin-top: 2px; }
.ts-preview .lb { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ts-muted); font-weight: 700; }
.ts-preview .v { font-weight: 600; min-height: 1.5em; }
.ts-preview .v.empty { color: var(--ts-muted); font-weight: 400; font-style: italic; }
.ts-trail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.ts-trail span { background: #fff; border: 1px solid var(--ts-line); border-radius: 99px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.ts-trail i { color: var(--ts-muted); font-style: normal; }
.ts-muted-box { grid-column: span 12; font-size: 13px; color: var(--ts-muted); background: var(--ts-surface-2); border-radius: 10px; padding: 12px 14px; }

/* trình độ */
.ts-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ts-choice { position: relative; border: 1px solid var(--ts-line); border-radius: 12px; padding: 14px 40px 14px 14px; cursor: pointer; background: #fff; margin: 0; transition: border-color .15s, background .15s; }
.ts-choice input { position: absolute; opacity: 0; }
.ts-choice b { display: block; font-size: 15px; }
.ts-choice.on { border-color: var(--ts-red); background: var(--ts-red-soft); }
.ts-choice.on::after { content: "✓"; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--ts-red); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ts-f.invalid .ts-choice { border-color: var(--ts-danger); }
.ts-thcs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin: 0; cursor: pointer; }
.ts-thcs input { width: 18px; height: 18px; accent-color: var(--ts-red); }

/* chips */
.ts-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-chip { position: relative; margin: 0; }
.ts-chip input { position: absolute; opacity: 0; }
.ts-chip span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ts-line); border-radius: 99px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; background: #fff; transition: all .15s; }
.ts-chip span::before { content: "+"; font-weight: 700; color: var(--ts-muted); }
.ts-chip input:checked + span { background: var(--ts-red-soft); border-color: var(--ts-red); color: var(--ts-red-ink); }
.ts-chip input:checked + span::before { content: "✓"; color: var(--ts-red); }
.ts-chip input:focus-visible + span { outline: 3px solid var(--ts-red); outline-offset: 2px; }

/* review */
.ts-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ts-rv { border: 1px solid var(--ts-line); border-radius: 12px; padding: 14px 16px; background: var(--ts-surface-2); }
.ts-rv h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ts-muted); display: flex; justify-content: space-between; }
.ts-rv h4 button { background: none; border: 0; color: var(--ts-acc); font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 12.5px; padding: 0; }
.ts-rv dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 13.5px; }
.ts-rv dt { color: var(--ts-muted); font-weight: 400; }
.ts-rv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ts-agree { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ts-line); border-radius: 12px; padding: 14px; cursor: pointer; margin: 0; font-weight: 500; }
.ts-agree input { width: 18px; height: 18px; accent-color: var(--ts-red); margin-top: 2px; flex: none; }
.ts-f.invalid .ts-agree { border-color: var(--ts-danger); }
.ts-captcha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ts-captcha #captcha { background: repeating-linear-gradient(-45deg, var(--ts-surface-2), var(--ts-surface-2) 6px, var(--ts-red-soft) 6px, var(--ts-red-soft) 12px); border: 1px solid var(--ts-line); border-radius: 10px; height: 46px; overflow: hidden; display: flex; align-items: center; padding: 0 6px; }
.ts-captcha #captcha canvas { height: 46px; width: auto; }
.ts-icon-btn { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--ts-line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ts-ink); }
.ts-icon-btn svg { width: 18px; height: 18px; }
.ts-captcha .form-control { max-width: 180px; }

.ts-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ts-line); }

/* success */
.ts-success { text-align: center; padding: 40px 20px; }
.ts-success .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ts-ok-soft); color: var(--ts-ok); display: grid; place-items: center; margin: 0 auto 14px; }
.ts-success .ic svg { width: 32px; height: 32px; }
.ts-success h2 { font-size: 24px; font-weight: 800; }
.ts-success p { color: var(--ts-muted); max-width: 56ch; margin: 8px auto 0; }
.ts-code { display: inline-flex; flex-direction: column; margin: 18px auto 0; border: 1px dashed var(--ts-red); border-radius: 12px; padding: 10px 26px; }
.ts-code small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ts-muted); }
.ts-code b { font-size: 24px; color: var(--ts-red); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.ts-success .acts { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

[data-step] { display: none; }
[data-step].on { display: block; animation: tsFade .25s ease; }
@keyframes tsFade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ts * { animation: none !important; transition: none !important; } }

/* footer */
.ts-foot { background: var(--ts-surface); border-top: 1px solid var(--ts-line); }
.ts-foot .ts-wrap { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 28px; padding-top: 32px; padding-bottom: 24px; }
.ts-foot h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ts-muted); }
.ts-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.ts-foot a { color: var(--ts-ink); }
.ts-foot a:hover { color: var(--ts-acc); }
.ts-foot iframe { width: 100%; height: 180px; border: 0; border-radius: 12px; }
.ts-foot .copy { grid-column: 1 / -1; border-top: 1px solid var(--ts-line); padding-top: 16px; font-size: 12.5px; color: var(--ts-muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- modal tra cứu hồ sơ ---------- */
.ts-modal .modal-dialog { max-width: 680px; }
.ts-modal .modal-content { border-radius: 18px; border: 0; overflow: hidden; background: var(--ts-surface); box-shadow: 0 24px 64px rgba(15, 20, 30, .22); }
.ts-modal .hidden { display: none !important; }

.ts-lk-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 18px; border-bottom: 1px solid var(--ts-line); position: relative; }
.ts-lk-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--ts-topbar); }
.ts-lk-ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ts-red-soft); color: var(--ts-red); }
.ts-lk-ico svg { width: 24px; height: 24px; }
.ts-lk-ttl { flex: 1; min-width: 0; }
.ts-lk-ttl .modal-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; color: var(--ts-brand); }
.ts-lk-ttl p { margin: 2px 0 0; font-size: 13.5px; color: var(--ts-muted); }
.ts-lk-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ts-muted); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.ts-lk-x:hover { background: var(--ts-surface-2); color: var(--ts-ink); }
.ts-lk-x svg { width: 20px; height: 20px; }

.ts-lk-body { padding: 20px 22px 24px; }
.ts-lk-lb { display: block; font-weight: 600; font-size: 14px; color: var(--ts-ink); margin-bottom: 8px; }
.ts-lk-search { display: flex; gap: 10px; margin: 0; }
.ts-lk-input { position: relative; flex: 1; min-width: 0; }
.ts-lk-input svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ts-muted); pointer-events: none; }
.ts-lk-input .form-control { height: 48px; padding-left: 42px; border-radius: 12px; font-size: 15px; border: 1px solid var(--ts-line); background: var(--ts-surface); color: var(--ts-ink); }
.ts-lk-input .form-control:focus { border-color: var(--ts-red); box-shadow: 0 0 0 4px var(--ts-ring); }
.ts-lk-search .ts-btn { height: 48px; padding: 0 24px; border-radius: 12px; }
.ts-btn.is-loading { position: relative; color: transparent !important; }
.ts-btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: ts-spin .7s linear infinite; }
@keyframes ts-spin { to { transform: rotate(360deg); } }
.ts-lk-hint { margin: 10px 0 0; font-size: 13px; color: var(--ts-muted); }
#id_ThongTinTimKiem > div:not(.hidden):first-child, #id_ThongTinTimKiem > div:not(.hidden) { margin-top: 18px; }

/* thẻ hồ sơ */
.ts-lk-card { border: 1px solid var(--ts-line); border-radius: 16px; overflow: hidden; background: var(--ts-surface); }
.ts-lk-top { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--ts-surface-2); border-bottom: 1px solid var(--ts-line); }
.ts-lk-av { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ts-red); color: #fff; font-weight: 800; font-size: 20px; }
.ts-lk-who { flex: 1; min-width: 0; }
.ts-lk-who .nm { font-weight: 800; font-size: 17px; color: var(--ts-ink); line-height: 1.3; overflow-wrap: anywhere; }
.ts-lk-who .sub { margin-top: 2px; font-size: 13.5px; color: var(--ts-muted); }
.ts-lk-who .sub b { color: var(--ts-ink); font-weight: 600; letter-spacing: .02em; }
.ts-lk-pill, .ts-lk-pay { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ts-lk-pill::before, .ts-lk-pay::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ts-modal [data-tone="info"] { background: var(--ts-acc-soft); color: var(--ts-acc); }
.ts-modal [data-tone="ok"] { background: var(--ts-ok-soft); color: var(--ts-ok); }
.ts-modal [data-tone="warn"] { background: #FFF4E0; color: var(--ts-warn); }
.ts-modal [data-tone="mute"] { background: var(--ts-surface-2); color: var(--ts-muted); border: 1px solid var(--ts-line); }

/* tiến trình hồ sơ */
.ts-lk-prog { list-style: none; margin: 0; padding: 18px 18px 4px; display: grid; grid-template-columns: repeat(4, 1fr); }
.ts-lk-prog li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; color: var(--ts-muted); }
.ts-lk-prog li::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 2px; background: var(--ts-line); z-index: 0; }
.ts-lk-prog li:first-child::before { display: none; }
.ts-lk-prog i { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--ts-surface); border: 2px solid var(--ts-line); }
.ts-lk-prog li.done, .ts-lk-prog li.now { color: var(--ts-ink); }
.ts-lk-prog li.done::before, .ts-lk-prog li.now::before { background: var(--ts-ok); }
.ts-lk-prog li.done i { background: var(--ts-ok); border-color: var(--ts-ok); }
.ts-lk-prog li.done i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ts-lk-prog li.now i { border-color: var(--ts-red); box-shadow: 0 0 0 4px var(--ts-ring); }
.ts-lk-prog li.now i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ts-red); }
.ts-lk-prog li.now span { font-weight: 700; }

/* thông tin */
.ts-lk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 18px 0; background: var(--ts-line); border: 1px solid var(--ts-line); border-radius: 12px; overflow: hidden; }
.ts-lk-grid > div { background: var(--ts-surface); padding: 12px 14px; min-width: 0; }
.ts-lk-grid > div.full { grid-column: 1 / -1; }
.ts-lk-grid dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ts-muted); margin: 0 0 3px; }
.ts-lk-grid dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ts-ink); overflow-wrap: anywhere; }

/* lệ phí */
.ts-lk-fee { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 18px 18px; padding: 14px 16px; border-radius: 12px; background: var(--ts-red-soft); }
.ts-lk-fee.is-free { background: var(--ts-surface-2); }
.ts-lk-fee-l { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.ts-lk-fee-l .k { font-size: 12.5px; color: var(--ts-muted); font-weight: 600; }
.ts-lk-fee-l .v { font-size: 18px; font-weight: 800; color: var(--ts-ink); }
.ts-lk-fee.is-free .v { font-size: 15px; font-weight: 600; color: var(--ts-muted); }
.ts-lk-fee .ts-btn { margin-left: auto; }

/* không tìm thấy */
.ts-lk-empty { font-size: 14px; color: var(--ts-ink); }
.ts-lk-empty-h { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--ts-surface-2); border: 1px dashed var(--ts-line); margin-bottom: 14px; }
.ts-lk-empty-h .ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ts-red-soft); color: var(--ts-red); }
.ts-lk-empty-h .ic svg { width: 20px; height: 20px; }
.ts-lk-empty-h b { display: block; font-size: 15px; margin-bottom: 2px; }
.ts-lk-empty-h p { margin: 0; color: var(--ts-muted); }
.ts-lk-empty-h a { color: var(--ts-acc); font-weight: 600; }
.ts-lk-empty ol { padding-left: 20px; margin-bottom: 10px; }
.ts-lk-empty li { margin-bottom: 4px; }

/* hồ sơ nhập học */
#id_CD04, #id_TC04, #id_TC04_VH { border: 1px solid var(--ts-line); border-radius: 14px; padding: 4px 18px 10px; font-size: 14px; }
#id_CD04 h4, #id_TC04 h4, #id_TC04_VH h4 { font-size: 13px !important; letter-spacing: .08em; text-align: left !important; margin: 14px 0 8px !important; color: var(--ts-acc) !important; }
#id_CD04 li, #id_TC04 li, #id_TC04_VH li { margin-bottom: 4px; }

/* mã QR */
.ts-lk-qr { text-align: center; border: 1px solid var(--ts-line); border-radius: 16px; padding: 18px; }
.ts-lk-qr h4 { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--ts-ink); }
.ts-lk-qr p { margin: 0 auto 14px; max-width: 380px; font-size: 13.5px; color: var(--ts-muted); }
.ts-lk-qr-box { display: inline-flex; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--ts-line); box-shadow: var(--ts-shadow); }
.ts-lk-qr-box canvas, .ts-lk-qr-box img { display: block; max-width: 100%; height: auto; }
.ts-lk-qr-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.ts-lk-qr-logo img { height: 28px; }
.ts-lk-qr-logo img:not([src]), .ts-lk-qr-logo img[src=""] { display: none; }
.ts-lk-qr-logo span { width: 1px; height: 22px; background: var(--ts-line); }
.ts-lk-qr .ts-btn { margin-top: 14px; }

@media (max-width: 575.98px) {
    .ts-modal .modal-dialog { margin: 10px; }
    .ts-lk-head { padding: 16px 16px 14px; gap: 12px; }
    .ts-lk-ico { width: 38px; height: 38px; }
    .ts-lk-ttl .modal-title { font-size: 16px; }
    .ts-lk-body { padding: 16px; }
    .ts-lk-search .ts-btn { padding: 0 16px; }
    .ts-lk-top { flex-wrap: wrap; padding: 14px; }
    .ts-lk-pill { order: 3; margin-left: 62px; }
    .ts-lk-prog { padding: 16px 8px 2px; }
    .ts-lk-prog li { font-size: 11.5px; }
    .ts-lk-grid { grid-template-columns: 1fr; margin: 12px 14px 0; }
    .ts-lk-fee { margin: 12px 14px 14px; }
    .ts-lk-fee .ts-btn { width: 100%; margin-left: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .ts-hero .ts-wrap { grid-template-columns: 1fr; }
    .ts-main .ts-wrap { grid-template-columns: minmax(0, 1fr); }
    .ts-side { position: static; min-width: 0; }
    .ts-card { min-width: 0; }
    .ts-step-btn { min-width: 0; flex: 1; }
    .ts-steps ol { gap: 4px; }
    .ts-steps ol { flex-direction: row; overflow-x: auto; }
    .ts-step-btn { flex-direction: column; gap: 4px; text-align: center; padding: 8px 4px; }
    .ts-step-btn .t { font-size: 12.5px; }
    .ts-step-btn .s, .ts-help { display: none; }
    .ts-foot .ts-wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .ts-hot, .ts-top .ts-btn-ghost .lbl, .ts-brand .n2 { display: none; }
    .ts-brand img { width: 44px; height: 44px; }
    .ts-hero .ts-wrap { padding-top: 22px; padding-bottom: 60px; }
    .ts-fact b { font-size: 15px; }
    .ts-card { padding: 20px 16px; }
    .ts-c3, .ts-c4, .ts-c5, .ts-c6, .ts-c7, .ts-c8 { grid-column: span 12; }
    .ts-m4 { grid-column: span 4; } .ts-m6 { grid-column: span 6; } .ts-m8 { grid-column: span 8; }
    .ts-review { grid-template-columns: 1fr; }
    .ts .form-control, .ts .form-select, .ts .select2-selection { font-size: 16px; } /* iPhone không tự zoom */
    .ts-nav { position: sticky; bottom: 0; z-index: 5; background: var(--ts-surface); margin: 20px -16px -20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 0 0 var(--ts-r) var(--ts-r); }
    .ts-nav #ts-next { flex: 1; }
    .ts-foot .ts-wrap { grid-template-columns: 1fr; }
}

/* ---------- điểm nhấn theo mẫu màu ---------- */
.ts-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ts-topbar); }
.ts-gtitle::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--ts-acc); flex: none; }

/* ---------- phần Metronic gắn ngoài khung .ts (danh sách chọn, lịch, hộp thông báo) ---------- */
body.ts-body .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--highlighted { background-color: var(--ts-red-soft); color: var(--ts-red-ink); }
body.ts-body .select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected { background-color: var(--ts-red); color: #fff; }
body.ts-body .flatpickr-day.selected, body.ts-body .flatpickr-day.selected:hover { background: var(--ts-red); border-color: var(--ts-red); color: #fff; }
body.ts-body .flatpickr-day.today { border-color: var(--ts-acc); }
body.ts-body .swal2-popup .btn.btn-primary { background-color: var(--ts-red) !important; border-color: var(--ts-red) !important; color: #fff !important; }
body.ts-body .swal2-popup .btn.btn-primary:hover { background-color: var(--ts-red-ink) !important; }

/* =====================================================================
   HƯỚNG DẪN NHẬP LIỆU (Scripts/TuyenSinhHuongDan.js)
   ===================================================================== */
/* nút mở hướng dẫn ở đầu mỗi bước */
.ts-head-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-hd-link { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ts-line); background: var(--ts-surface); color: var(--ts-acc); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s; }
.ts-hd-link:hover { background: var(--ts-acc-soft); border-color: var(--ts-acc); }
.ts-hd-link svg { width: 16px; height: 16px; }

/* mẹo tại ô */
.ts-tip { display: none; align-items: flex-start; gap: 7px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--ts-acc-soft); color: var(--ts-ink); font-size: 12.5px; line-height: 1.45; }
.ts-tip.on { display: flex; animation: ts-tip-in .18s ease-out; }
@keyframes ts-tip-in { from { opacity: 0; transform: translateY(-3px); } }
.ts-tip svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; color: var(--ts-acc); }
.ts-f.invalid .ts-tip { display: none; }

/* tour */
.ts-tour-mask { position: fixed; inset: 0; z-index: 1990; display: none; background: rgba(12, 16, 26, .58); }
.ts-tour-hole { position: fixed; z-index: 1991; display: none; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 3px var(--ts-red), 0 0 0 8px rgba(213, 27, 35, .25); }
.ts-tour-pop { position: fixed; z-index: 1992; display: none; width: 340px; max-width: calc(100vw - 24px); background: var(--ts-surface); color: var(--ts-ink); border-radius: 16px; padding: 16px 18px 14px; box-shadow: 0 18px 48px rgba(10, 14, 24, .3); transition: top .3s ease, left .3s ease, opacity .2s; font-family: inherit; }
.ts-tour-mask.on, .ts-tour-hole.on, .ts-tour-pop.on { display: block; }
.ts-tour-pop.moving { opacity: .92; }
.ts-tour-pop.nudge { animation: ts-nudge .3s; }
@keyframes ts-nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.ts-tour-k { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--ts-acc); letter-spacing: .06em; }
.ts-tour-skip { border: 0; background: none; color: var(--ts-muted); font-size: 13px; font-weight: 600; padding: 4px 0 4px 8px; cursor: pointer; }
.ts-tour-skip:hover { color: var(--ts-ink); text-decoration: underline; }
.ts-tour-pop h4 { margin: 6px 0 6px; font-size: 17px; font-weight: 800; color: var(--ts-ink); }
.ts-tour-b { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ts-ink); }
.ts-tour-b b { font-weight: 700; }
.ts-tour-b b.r { color: var(--ts-danger); }
.ts-tour-f { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ts-tour-dots { flex: 1; display: flex; gap: 4px; flex-wrap: wrap; }
.ts-tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ts-line); }
.ts-tour-dots i.on { width: 16px; border-radius: 3px; background: var(--ts-red); }
.ts-tour-f .ts-btn { padding: 8px 14px; font-size: 14px; }
/* điện thoại: khung hướng dẫn dạng tấm trượt dưới đáy */
.ts-tour-pop.sheet { top: auto !important; left: 0 !important; right: 0; bottom: 0; width: auto; max-width: none; border-radius: 18px 18px 0 0; padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.ts-tour-pop.sheet .ts-tour-f .ts-btn { flex: 0 0 auto; padding: 10px 16px; }
body.ts-touring .select2-container--open { display: none; }

/* lời mời lần đầu */
.ts-hd-moi { position: fixed; z-index: 1980; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 24px); display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--ts-surface); border: 1px solid var(--ts-line); box-shadow: 0 16px 40px rgba(10, 14, 24, .2); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.ts-hd-moi.on { opacity: 1; transform: none; }
.ts-hd-moi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 16px 16px 0 0; background: var(--ts-topbar); }
.ts-hd-moi .ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ts-red-soft); color: var(--ts-red); }
.ts-hd-moi .ic svg { width: 22px; height: 22px; }
.ts-hd-moi .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; color: var(--ts-muted); }
.ts-hd-moi .tx b { font-size: 15px; color: var(--ts-ink); margin-bottom: 2px; }
.ts-hd-moi .ac { flex: 1 0 100%; display: flex; justify-content: flex-end; gap: 8px; }
.ts-hd-moi .ac .ts-btn { padding: 8px 14px; font-size: 14px; }
@media (max-width: 640px) {
    .ts-hd-moi { left: 12px; right: 12px; bottom: 84px; width: auto; }
    .ts-hd-moi .ac .ts-btn { flex: 1; }
    .ts-head-r { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .ts-tour-pop, .ts-hd-moi { transition: none; }
    .ts-tip.on { animation: none; }
}
