/*
 * Sổ tiêm gia đình (/so-tiem, web/assets/so-tiem.js).
 * Dùng token màu của portal.css nên tự theo giao diện sáng/tối; vài màu riêng khai báo ở --st-*.
 */
.st-page {
  --st-r: 14px;
  --st-r-sm: 10px;
  --st-shadow: 0 1px 2px rgb(20 48 42 / 6%), 0 4px 16px rgb(20 48 42 / 6%);
  --st-shadow-lg: 0 2px 4px rgb(20 48 42 / 6%), 0 12px 32px rgb(20 48 42 / 10%);
  --st-grad: linear-gradient(135deg, #E3F4EE 0%, #F2FAF7 55%, #FEF7E8 100%);
  background: var(--nen-phu);
  padding: 20px 0 64px;
  min-height: 70vh;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .st-page { --st-grad: linear-gradient(135deg, #173A31 0%, #14231F 60%, #2A2512 100%); --st-shadow: 0 1px 2px rgb(0 0 0 / 30%); --st-shadow-lg: 0 8px 28px rgb(0 0 0 / 35%); }
}
:root[data-theme="dark"] .st-page { --st-grad: linear-gradient(135deg, #173A31 0%, #14231F 60%, #2A2512 100%); --st-shadow: 0 1px 2px rgb(0 0 0 / 30%); --st-shadow-lg: 0 8px 28px rgb(0 0 0 / 35%); }
.st-logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-logo-light { display: none; } :root:not([data-theme="light"]) .st-logo-dark { display: block; } }
:root[data-theme="dark"] .st-logo-light { display: none; }
:root[data-theme="dark"] .st-logo-dark { display: block; }

.st-app [hidden] { display: none !important; }
.st-app h2 { font-size: 1.125rem; margin: 18px 0 10px; }
.st-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.st-ico-sm { width: 16px; height: 16px; }
.st-app .btn { border-radius: 10px; gap: 6px; }
.st-app .btn-sm { min-height: 34px; padding: 4px 12px; }
.st-btn-lg { min-height: 50px; font-size: 1rem; }
.btn.is-busy { opacity: .7; cursor: progress; }
.btn:disabled { opacity: .6; cursor: default; }
.st-link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--xanh-dam); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.st-link-btn:disabled { color: var(--chu-phu); text-decoration: none; cursor: default; font-weight: 600; }

/* ================= Khung ứng dụng ================= */
.st-content { max-width: 920px; margin: 0 auto; }
.st-topbar {
  max-width: 920px; margin: 0 auto 22px; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  background: var(--be-mat); border: 1px solid var(--vien); border-radius: var(--st-r); box-shadow: var(--st-shadow); padding: 10px 12px 10px 16px;
}
.st-brand { display: flex; align-items: center; gap: 10px; color: var(--than); }
.st-brand img { width: 34px; height: 34px; }
.st-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.st-brand strong { font-size: 1.0625rem; }
.st-brand small { font-size: .75rem; color: var(--chu-phu); }
.st-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.st-nav-item { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .9375rem; color: var(--chu-phu); }
.st-nav-item:hover { background: var(--nen-phu); color: var(--than); }
.st-nav-item.is-active { background: var(--xanh-nhat); color: var(--xanh-dam); }
.st-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--nut); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.st-user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.st-user-text strong { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.st-user-text small { font-size: .75rem; color: var(--chu-phu); }
.st-icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--vien); background: var(--be-mat); color: var(--chu-phu); display: grid; place-items: center; cursor: pointer; }
.st-icon-btn:hover { color: var(--do); border-color: var(--vien-do); background: var(--do-nhat); }

.st-head { margin: 4px 0 18px; }
.st-head-row { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.st-title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 2px 0 4px; outline: 0; letter-spacing: -.01em; }
.st-sub { margin: 0; color: var(--chu-phu); }
.st-back { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; font-weight: 600; color: var(--xanh-dam); margin-bottom: 6px; }
.st-back:hover { text-decoration: underline; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.st-hint { color: var(--chu-phu); font-size: .875rem; margin: 10px 2px; }
.st-sync-note { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--chu-phu); font-size: .8125rem; margin-top: 22px; text-align: center; }

/* Khung xương khi đang tải */
.st-skel { background: linear-gradient(90deg, var(--vien) 0%, var(--nen-phu) 50%, var(--vien) 100%); background-size: 200% 100%; animation: st-shimmer 1.2s linear infinite; border-radius: 8px; margin-bottom: 12px; }
.st-skel-title { height: 32px; width: 45%; }
.st-skel-line { height: 16px; width: 30%; margin-bottom: 22px; }
.st-skel-card { height: 120px; border-radius: var(--st-r); }
@keyframes st-shimmer { to { background-position: -200% 0; } }

/* ================= Thẻ, form chung ================= */
.st-card, .st-panel { border: 1px solid var(--vien); background: var(--be-mat); padding: 18px; margin: 0 0 16px; border-radius: var(--st-r); box-shadow: var(--st-shadow); }
.st-card > h2:first-child, .st-panel > h2:first-child { margin-top: 0; }
.st-form { display: flex; flex-direction: column; gap: 16px; }
.st-form > * { margin-top: 0; margin-bottom: 0; }
.st-form > div:empty { display: none; }
.st-stack { display: flex; flex-direction: column; gap: 16px; }
.st-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.st-form .st-buttons { margin: 4px 0 0; }

.st-field { display: flex; flex-direction: column; gap: 6px; }
.st-field label, .st-label, .st-choice legend { font-weight: 700; font-size: .9375rem; color: var(--than); }
.st-field p { margin: 0; }
.st-req { color: var(--do); }
.st-app input[type="text"], .st-app input[type="tel"], .st-app input[type="date"], .st-app input[type="search"], .st-app textarea, .st-app select {
  font: inherit; color: var(--chu); background: var(--be-mat); border: 1.5px solid var(--vien-dam); border-radius: var(--st-r-sm); padding: 11px 13px; width: 100%; max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.st-app input:focus, .st-app textarea:focus, .st-app select:focus { border-color: var(--xanh-dam); box-shadow: 0 0 0 4px var(--xanh-nhat); outline: 0; }
.st-app input[aria-invalid="true"] { border-color: var(--do); }
.st-app input:disabled, .st-app textarea:disabled { opacity: .75; background: var(--nen-phu); }
.st-app textarea { resize: vertical; min-height: 84px; }
.st-error { color: var(--do); font-size: .875rem; }

.st-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.st-choice legend { padding: 0; margin-bottom: 8px; }
.st-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.st-pill { position: relative; display: inline-flex; }
.st-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.st-pill span { display: inline-block; padding: 8px 15px; border: 1.5px solid var(--vien-dam); border-radius: 999px; font-size: .9375rem; background: var(--be-mat); cursor: pointer; transition: background .15s, border-color .15s; }
.st-pill:hover span { border-color: var(--xanh); }
.st-pill input:checked + span { border-color: var(--xanh-dam); background: var(--xanh-nhat); color: var(--xanh-dam); font-weight: 700; }
.st-pill input:focus-visible + span { outline: 3px solid #F5B83D; outline-offset: 2px; }
.st-pill input:disabled + span { cursor: default; opacity: .7; }

.st-toggle, .st-check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.st-toggle input, .st-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--xanh-dam); }
.st-toggle > span, .st-check > span { display: flex; flex-direction: column; gap: 2px; }
.st-check small { color: var(--chu-phu); font-size: .8125rem; }
.st-list { display: flex; flex-direction: column; border-top: 1px solid var(--vien); }
.st-list > .st-toggle { border-bottom: 1px solid var(--vien); }

.st-notice { padding: 13px 16px; border: 1px solid var(--vien); border-left: 4px solid var(--xanh); background: var(--be-mat); margin: 0 0 14px; border-radius: var(--st-r-sm); }
.st-notice p { margin: 4px 0 0; }
.st-notice ul { margin: 6px 0; padding-left: 20px; }
.st-notice-title { display: block; margin-bottom: 2px; }
.st-danger { border-color: var(--vien-do); border-left-color: var(--do); background: var(--do-nhat); }
.st-danger .st-notice-title { color: var(--do); }
.st-warning { border-color: var(--vien-vang); border-left-color: #E0A42C; background: var(--vang-nhat); }
.st-success { border-color: var(--vien-xanh); border-left-color: var(--xanh-dam); background: var(--xanh-nhat); }
.st-info { border-color: var(--xanh-duong-nhat); border-left-color: var(--xanh-duong); background: var(--xanh-duong-nhat); }
.st-pre { white-space: pre-line; }
.st-alert { padding: 0; }
.st-alert summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; list-style: none; }
.st-alert summary::-webkit-details-marker { display: none; }
.st-alert summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .5; flex: none; transition: transform .15s; }
.st-alert[open] summary::after { transform: rotate(-135deg); }
.st-alert p { padding: 0 16px 13px 40px; margin: 0; }
.st-danger.st-alert summary { color: var(--do); }
.st-app .status { border-radius: 999px; padding: 2px 10px; }

/* Danh sách dạng hàng (các màn form, phác đồ, chia sẻ) */
.st-members, .st-rows { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--vien); border-radius: var(--st-r); background: var(--be-mat); overflow: hidden; box-shadow: var(--st-shadow); }
.st-members li + li, .st-rows li + li { border-top: 1px solid var(--vien); }
.st-member, .st-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; }
a.st-member:hover, a.st-row:hover, button.st-row:hover { background: var(--nen-phu); color: inherit; }
button.st-row { cursor: pointer; }
.st-row-box { border: 1px solid var(--vien); border-radius: var(--st-r); background: var(--be-mat); margin-bottom: 10px; }
.st-member-text, .st-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.st-row-text > span { color: var(--chu-phu); font-size: .875rem; }
.st-row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.st-chevron { color: var(--chu-phu); font-size: 1.5rem; line-height: 1; }

.st-empty { text-align: center; padding: 30px 18px; border: 1.5px dashed var(--vien-dam); border-radius: var(--st-r); margin-bottom: 14px; background: var(--be-mat); }
.st-empty img { width: 220px; max-width: 70%; margin: 0 auto 6px; display: block; }
.st-empty h2 { margin-top: 0; }
.st-empty p { color: var(--chu-phu); max-width: 460px; margin: 0 auto 14px; }
.st-empty-sm { padding: 22px 16px; }
.st-empty-sm p { margin-bottom: 0; }

/* ================= Đăng nhập ================= */
.st-auth {
  max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--be-mat); border: 1px solid var(--vien); border-radius: 22px; box-shadow: var(--st-shadow-lg); overflow: hidden;
}
.st-auth-side { background: var(--st-grad); padding: 36px 40px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.st-auth-logo { height: 40px; width: auto; align-self: flex-start; }
.st-auth-title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: 8px 0 0; letter-spacing: -.015em; }
.st-auth-lead { color: var(--chu-phu); font-size: 1.0625rem; margin: 0; max-width: 440px; }
.st-auth-art { width: 100%; max-width: 330px; height: auto; align-self: center; margin: 4px 0; }
.st-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.st-benefits li { display: flex; gap: 12px; align-items: flex-start; }
.st-benefits li > span:last-child { display: flex; flex-direction: column; font-size: .875rem; color: var(--chu-phu); line-height: 1.45; }
.st-benefits strong { color: var(--than); font-size: .9375rem; }
.st-benefit-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--be-mat); color: var(--xanh-dam); display: grid; place-items: center; flex: none; box-shadow: var(--st-shadow); }
.st-auth-secure { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--chu-phu); margin: 6px 0 0; }

.st-auth-main { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.st-auth-card { max-width: 420px; width: 100%; margin: 0 auto; }
.st-auth-card h2 { font-size: 1.5rem; margin: 0 0 8px; letter-spacing: -.01em; }
.st-auth-card .muted { margin: 0 0 20px; }
.st-auth-step { display: flex; flex-direction: column; }

.st-steps { list-style: none; display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 26px; font-size: .8125rem; font-weight: 700; color: var(--chu-phu); }
.st-steps li { display: flex; align-items: center; gap: 8px; }
.st-steps li + li::before { content: ""; width: 28px; height: 2px; background: var(--vien-dam); border-radius: 2px; margin-right: 2px; }
.st-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--vien-dam); background: var(--be-mat); }
.st-steps li.is-active { color: var(--xanh-dam); }
.st-steps li.is-active span { border-color: var(--xanh-dam); background: var(--nut); color: #fff; }
.st-steps li.is-done span { border-color: var(--xanh-dam); color: var(--xanh-dam); }
.st-steps li.is-done + li::before { background: var(--xanh-dam); }

.st-phone {
  display: flex; align-items: stretch; border: 1.5px solid var(--vien-dam); border-radius: 12px; background: var(--be-mat); overflow: hidden;
  transition: border-color .15s, box-shadow .15s; margin-bottom: 14px;
}
.st-phone:focus-within { border-color: var(--xanh-dam); box-shadow: 0 0 0 4px var(--xanh-nhat); }
.st-phone-prefix { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--nen-phu); border-right: 1.5px solid var(--vien); font-weight: 700; color: var(--than); }
.st-flag { width: 22px; height: 15px; border-radius: 3px; background: #DA251D; position: relative; flex: none; }
.st-flag::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; color: #FFCD00; font-size: 11px; line-height: 1; }
.st-app .st-phone input.st-phone-input { border: 0; box-shadow: none; border-radius: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: .04em; padding: 14px; }
.st-app .st-phone input.st-phone-input:focus { box-shadow: none; }
.st-auth-step .st-check { padding: 0 0 18px; }

.st-otp-art { width: 170px; height: auto; margin: -8px auto 4px; display: block; }
.st-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 4px 0 20px; }
.st-app .st-otp input.st-otp-box {
  width: 100%; aspect-ratio: 5 / 6; min-width: 0; text-align: center; font-size: 1.75rem; font-weight: 800; color: var(--than);
  border: 2px solid var(--vien-dam); border-radius: 12px; background: var(--nen-phu); padding: 0;
  caret-color: var(--xanh-dam); transition: border-color .15s, background .15s, transform .1s;
}
.st-app .st-otp input.st-otp-box:focus { border-color: var(--xanh-dam); background: var(--be-mat); box-shadow: 0 0 0 4px var(--xanh-nhat); transform: translateY(-1px); }
.st-app .st-otp input.st-otp-box.is-filled { border-color: var(--xanh); background: var(--be-mat); }
.st-otp-box:nth-child(3) { margin-right: 8px; }
.st-app .st-otp.is-error input.st-otp-box { border-color: var(--do); background: var(--do-nhat); }
.st-otp.is-error { animation: st-shake .35s; }
@keyframes st-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .st-otp.is-error, .st-skel { animation: none; } }
.st-resend { text-align: center; margin: 16px 0 0 !important; }
.st-auth-error:empty { display: none; }
.st-auth-error .st-notice { margin: 16px 0 0; }
.st-legal { font-size: .8125rem; color: var(--chu-phu); margin: 22px 0 0; text-align: center; }
.st-legal a, .st-auth-app a { color: var(--xanh-dam); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.st-auth-app { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--nen-phu); font-size: .8125rem; color: var(--chu-phu); }
.st-auth-app .st-ico { color: var(--xanh-dam); }

/* Hoàn tất tài khoản: dùng khung đăng nhập, cột trái gọn hơn */
.st-auth-compact .st-benefits { display: none; }
.st-auth-card a { color: var(--xanh-dam); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.st-auth-card a.btn { color: #fff; text-decoration: none; }
.st-auth-compact .st-auth-card { max-width: 480px; }

/* ================= Danh sách thành viên ================= */
.st-hero {
  display: flex; align-items: center; gap: 20px; background: var(--st-grad); border: 1px solid var(--vien); border-radius: 20px;
  padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--st-shadow); overflow: hidden;
}
.st-hero-text { flex: 1; min-width: 0; }
.st-hero-kicker { margin: 0; font-weight: 700; color: var(--xanh-dam); }
.st-hero-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 14px; color: var(--chu-phu); }
.st-hero-stats strong { color: var(--than); font-size: 1.125rem; }
.st-hero-stats .is-danger, .st-hero-stats .is-danger strong { color: var(--do); }
.st-hero .st-buttons { margin: 0; }
.st-hero-art { width: 210px; height: auto; flex: none; margin: -12px -6px -18px 0; }

.st-mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.st-mcard {
  display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 18px; background: var(--be-mat); border: 1px solid var(--vien);
  border-radius: var(--st-r); box-shadow: var(--st-shadow); color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.st-mcard:hover { transform: translateY(-2px); box-shadow: var(--st-shadow-lg); border-color: var(--vien-xanh); color: inherit; }
.st-mcard-head { display: flex; align-items: center; gap: 12px; }
.st-mcard-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.st-mcard-name strong { font-size: 1.0625rem; color: var(--than); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-mcard-name span { font-size: .875rem; color: var(--chu-phu); }
.st-mcard-next { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--nen-phu); min-height: 72px; }
.st-mcard-next-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.st-mcard-next-text small { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--chu-phu); }
.st-mcard-next-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-mcard-next-text span { font-size: .8125rem; color: var(--chu-phu); }
.st-mcard-empty { display: flex; align-items: center; gap: 8px; color: var(--chu-phu); font-size: .875rem; }
.st-mcard-foot { display: flex; align-items: center; gap: 14px; font-size: .8125rem; color: var(--chu-phu); margin-top: auto; }
.st-mcard-foot > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.st-mcard-foot .st-ico { color: var(--xanh-dam); }
.st-mcard-foot .is-danger, .st-mcard-foot .is-danger .st-ico { color: var(--do); }
.st-mcard-go { margin-left: auto; font-weight: 700; color: var(--xanh-dam); }
.st-mcard-add { align-items: center; justify-content: center; text-align: center; border: 1.5px dashed var(--vien-dam); box-shadow: none; background: transparent; min-height: 200px; gap: 6px; }
.st-mcard-add span:last-child { color: var(--chu-phu); font-size: .875rem; }
.st-add-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--xanh-nhat); color: var(--xanh-dam); display: grid; place-items: center; margin-bottom: 4px; }

.st-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; font-weight: 800; color: #14302A; flex: none; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 60%); }
.st-avatar-lg { width: 52px; height: 52px; font-size: 1.375rem; }
.st-avatar-xl { width: 72px; height: 72px; font-size: 1.875rem; box-shadow: 0 0 0 4px var(--be-mat), var(--st-shadow); }

/* Khối ngày */
.st-date { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; padding: 6px 4px; line-height: 1.1; background: var(--nen-phu); border: 1px solid var(--vien); color: var(--chu-phu); }
.st-date strong { font-size: 1.375rem; font-weight: 800; color: var(--than); }
.st-date span { font-size: .6875rem; font-weight: 700; white-space: nowrap; }
.st-date-primary { background: var(--xanh-duong-nhat); border-color: transparent; }
.st-date-primary strong, .st-date-primary span { color: var(--xanh-duong); }
.st-date-success { background: var(--xanh-nhat); border-color: transparent; }
.st-date-success strong, .st-date-success span { color: var(--xanh-dam); }
.st-date-warning { background: var(--vang-nhat); border-color: transparent; }
.st-date-warning strong, .st-date-warning span { color: var(--vang); }
.st-date-danger { background: var(--do-nhat); border-color: transparent; }
.st-date-danger strong, .st-date-danger span { color: var(--do); }

/* ================= Trang thành viên ================= */
.st-profile { background: var(--st-grad); border: 1px solid var(--vien); border-radius: 20px; padding: 18px 22px 20px; margin-bottom: 18px; box-shadow: var(--st-shadow); }
.st-profile-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.st-profile-text { flex: 1; min-width: 200px; }
.st-profile-text .st-sub + .st-sub { margin-top: 6px; }
.st-profile .st-actions .btn { background: var(--be-mat); }
.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.st-stat { background: var(--be-mat); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; border: 1px solid var(--vien); }
.st-stat strong { font-size: 1.5rem; line-height: 1.2; color: var(--than); }
.st-stat span { font-size: .8125rem; color: var(--chu-phu); font-weight: 600; }
.st-stat-ok strong { color: var(--xanh-dam); }
.st-stat-danger { border-color: var(--vien-do); background: var(--do-nhat); }
.st-stat-danger strong, .st-stat-danger span { color: var(--do); }
.st-stat-warn strong { color: var(--vang); }

.st-panel { padding: 8px 8px 12px; }
.st-tabs { display: flex; gap: 4px; padding: 4px; background: var(--nen-phu); border-radius: 12px; margin: 0 0 14px; }
.st-tabs a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px; border-radius: 9px; font-weight: 700; color: var(--chu-phu); }
.st-tabs a:hover { color: var(--than); }
.st-tabs a.is-active { background: var(--be-mat); color: var(--xanh-dam); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }
.st-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--vien); color: var(--chu-phu); font-size: .75rem; display: inline-grid; place-items: center; }
.st-tabs a.is-active .st-count { background: var(--xanh-nhat); color: var(--xanh-dam); }
.st-tab-body { padding: 0 8px; }
.st-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }

.st-doses { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-dose { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--vien); border-radius: 12px; background: var(--be-mat); color: inherit; transition: border-color .15s, background .15s; }
.st-dose:hover { border-color: var(--vien-xanh); background: var(--nen-phu); color: inherit; }
.st-dose-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.st-dose-text strong { color: var(--than); }
.st-dose-text > span { font-size: .875rem; color: var(--chu-phu); }
.st-dose-go { color: var(--chu-phu); }
.st-progress { display: block; height: 6px; border-radius: 6px; background: var(--vien); overflow: hidden; max-width: 220px; margin-top: 4px; }
.st-progress span { display: block; height: 100%; background: var(--xanh); border-radius: 6px; }

.st-history { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: inherit; }
.st-history:hover { border-color: var(--vien-xanh); color: inherit; }
.st-history-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--xanh-nhat); color: var(--xanh-dam); display: grid; place-items: center; flex: none; }
.st-history-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.st-history-text strong { color: var(--than); }
.st-history-text > span { font-size: .875rem; color: var(--chu-phu); }
.st-history-text .st-history-note { color: var(--chu); margin-top: 4px; }

/* ================= Các màn khác ================= */
.st-picker { list-style: none; margin: 4px 0 8px; padding: 0; border: 1px solid var(--vien); border-radius: var(--st-r-sm); overflow: hidden; }
.st-picker:empty { display: none; }
.st-picker li + li { border-top: 1px solid var(--vien); }
.st-picker button { width: 100%; text-align: left; padding: 10px 13px; background: var(--be-mat); border: 0; font: inherit; color: inherit; cursor: pointer; }
.st-picker button:hover { background: var(--xanh-nhat); }
.st-picked { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 11px 13px; background: var(--nen-phu); border-radius: var(--st-r-sm); }

.st-proof-view img { max-width: 100%; max-height: 420px; border: 1px solid var(--vien); border-radius: var(--st-r-sm); margin-top: 8px; }
.st-code-card { text-align: center; }
.st-code { font-size: 2.25rem; font-weight: 800; letter-spacing: .25em; color: var(--xanh-dam); margin: 6px 0; font-variant-numeric: tabular-nums; user-select: all; }
.st-code-card .st-buttons { justify-content: center; }

.btn.st-btn-danger { color: var(--do); border-color: var(--vien-do); }
.btn.st-btn-danger:hover { background: var(--do-nhat); color: var(--do); border-color: var(--do); }
.btn.st-btn-danger-solid { background: var(--do); border-color: var(--do); }
.btn.st-btn-danger-solid:hover { background: #A31F1F; border-color: #A31F1F; }
.st-danger-zone summary { cursor: pointer; font-weight: 700; color: var(--do); }
.st-danger-zone[open] summary { margin-bottom: 10px; }
.topbar-account { font-weight: 700; }

/* ================= Màn hình hẹp ================= */
@media (max-width: 900px) {
  .st-auth { grid-template-columns: 1fr; border-radius: 18px; }
  .st-auth-side { padding: 22px 22px 18px; gap: 10px; }
  .st-auth-art, .st-benefits, .st-auth-secure { display: none; }
  .st-auth-title { font-size: 1.5rem; margin-top: 4px; }
  .st-auth-lead { font-size: .9375rem; }
  .st-auth-main { padding: 24px 22px 28px; }
  .st-nav { order: 3; flex-basis: 100%; justify-content: stretch; border-top: 1px solid var(--vien); padding-top: 8px; }
  .st-nav-item { flex: 1; justify-content: center; }
  .st-user { margin-left: auto; }
}
@media (max-width: 560px) {
  .st-page { padding: 12px 0 40px; }
  .st-topbar { padding: 8px 10px; gap: 8px; border-radius: 12px; }
  .st-brand small, .st-user-text { display: none; }
  .st-nav-item { padding: 8px 6px; font-size: .8125rem; flex-direction: column; gap: 2px; }
  .st-hero { padding: 20px; border-radius: 16px; }
  .st-hero-art { display: none; }
  .st-hero .st-buttons .btn { flex: 1 1 auto; }
  .st-stats { grid-template-columns: repeat(2, 1fr); }
  .st-profile { padding: 16px; }
  .st-profile .st-avatar-xl { width: 60px; height: 60px; font-size: 1.5rem; }
  .st-tabs a { font-size: .8125rem; flex-direction: column; gap: 2px; }
  .st-panel { padding: 6px 4px 10px; }
  .st-tab-body { padding: 0 4px; }
  .st-otp { gap: 6px; }
  .st-app .st-otp input.st-otp-box { font-size: 1.5rem; }
  .st-otp-box:nth-child(3) { margin-right: 4px; }
  .st-buttons .btn, .st-toolbar .btn { flex: 1 1 auto; }
  .st-date { width: 50px; }
}

/* Đồng bộ NIIS */
.st-kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--vien); }
.st-kv span { color: var(--chu-phu); }
.st-kv strong { text-align: right; color: var(--than); }
.st-terms { max-height: 280px; overflow: auto; padding: 12px 14px; border-radius: var(--st-r-sm); background: var(--nen-phu); border: 1px solid var(--vien); font-size: .9375rem; }
.st-terms p { margin: 0 0 8px; }
.st-terms p:last-child { margin-bottom: 0; }
