/**
 * MỤC ĐÍCH: Giao diện các bề mặt do plugin vbf-core in ra — form gửi hồ sơ, trang "Nhập thông tin", hàng chờ duyệt,
 *           thanh "Chế độ VBF" + hộp sửa hồ sơ. Ngôn ngữ của mockup CSDL (Barlow/Archivo, đỏ #e01b24, ô cao 44 px).
 *           Viết tường minh, KHÔNG dựa vào reset .vbf — markup của plugin không mang class đó (plugin độc lập với theme).
 * PHỤ THUỘC: tokens.css.
 * ADMIN SỬA ĐƯỢC: không.
 * MỞ RỘNG: không.
 * GỠ AN TOÀN: xoá file ⇒ form vẫn dùng được, chỉ mất trang trí.
 */

.vbf-form, .vbf-hub, .vbf-review, .vbf-fe { font-family: var(--vbf-font-ui); color: #1c202b; line-height: 1.5; }
.vbf-note { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; background: #f7f7f8; border-left: 3px solid var(--vbf-red-db); font-size: 14.5px; color: #3a3a3a; }

/* ---------- Ô nhập dùng chung ---------- */
.vbf-form :is(input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], input[type=date], select, textarea),
.vbf-fe__dialog :is(input[type=text], input[type=number], input[type=url], input[type=date], select, textarea) {
	width: 100%; box-sizing: border-box; min-height: 44px; margin: 0; padding: 10px 13px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff;
	font: 400 14px/1.4 var(--vbf-font-ui); color: #111; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.vbf-form :is(input, select, textarea):focus, .vbf-fe__dialog :is(input, select, textarea):focus { border-color: var(--vbf-red-db); box-shadow: 0 0 0 3px rgba(224, 27, 36, .1); }
.vbf-form textarea, .vbf-fe__dialog textarea { min-height: 110px; resize: vertical; }
.vbf-form label, .vbf-fe__dialog label { font: 600 13.5px/1.3 var(--vbf-font-ui); color: #3a3a3a; }
.vbf-form small, .vbf-fe__dialog small { font-weight: 400; color: #8d8d8d; }

/* ---------- Form gửi hồ sơ ---------- */
.vbf-form { max-width: 760px; }
.vbf-form form { display: flex; flex-direction: column; gap: 22px; }
.vbf-form fieldset { margin: 0; padding: 22px 24px 8px; border: 1px solid #ededed; border-radius: 12px; background: #fff; }
.vbf-form legend { padding: 0 8px; font: 800 15px/1 var(--vbf-font-head); letter-spacing: .3px; text-transform: uppercase; color: #111; }
.vbf-form legend small { text-transform: none; letter-spacing: 0; }
.vbf-form fieldset > p { margin: 0 0 16px; }
.vbf-form fieldset > p > label + br { display: none; }
.vbf-form fieldset > p > label { display: block; margin-bottom: 7px; }
.vbf-form input[type=checkbox] { width: 18px; height: 18px; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--vbf-red-db); }
.vbf-form input[type=checkbox] + * , .vbf-form label:has(input[type=checkbox]) { font-weight: 500; }
.vbf-form button[type=submit] { align-self: flex-start; min-width: 220px; height: 50px; padding: 0 28px; border: 0; border-radius: 8px; background: var(--vbf-red-db); color: #fff; font: 700 15px var(--vbf-font-ui); cursor: pointer; transition: background .2s ease, box-shadow .25s ease; }
.vbf-form button[type=submit]:hover { background: #c0141c; box-shadow: 0 10px 24px -10px rgba(224, 27, 36, .7); }
.vbf-form__note { padding: 14px 18px; border-radius: 10px; background: #f7f7f8; font-size: 15px; }
.vbf-form__note--ok { background: #eefaf2; border-left: 3px solid #1f9d55; }
.vbf-form__note--error { background: #fdeeee; border-left: 3px solid var(--vbf-red-db); }

/* ---------- Trang "Nhập thông tin" ---------- */
.vbf-hub { max-width: 1100px; margin: 0 auto; }
.vbf-hub__lead { margin: 0 0 22px; font-size: 16px; color: #4b5160; }
.vbf-hub__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.vbf-hub__card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 22px 22px 46px; border-radius: 14px; background: #0b0b0d; color: #fff; text-decoration: none; box-shadow: 0 16px 38px rgba(16, 20, 30, .16); transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease; }
.vbf-hub__card::before { content: ""; position: absolute; left: 22px; top: 0; width: 44px; height: 3px; background: var(--vbf-red-db); }
.vbf-hub__card:hover { transform: translateY(-6px); box-shadow: 0 28px 54px rgba(224, 27, 36, .28); color: #fff; }
.vbf-hub__card strong { font: 800 20px/1.2 var(--vbf-font-head); text-transform: uppercase; letter-spacing: .3px; }
.vbf-hub__card span { font-size: 14px; line-height: 1.5; color: #c4c4c4; }
.vbf-hub__card em { position: absolute; right: 20px; bottom: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--vbf-red-db); display: flex; align-items: center; justify-content: center; font-style: normal; }
.vbf-hub__card--alt { background: #fff; color: #111; border: 1px solid #ededed; box-shadow: none; }
.vbf-hub__card--alt span { color: #5a5a5a; }
.vbf-hub__card--alt:hover { color: #111; }
.vbf-hub__back { font-weight: 600; color: var(--vbf-red-db); text-decoration: none; }
.vbf-hub__title { margin: 10px 0 20px; font: 800 clamp(24px, 2.4vw, 34px)/1.15 var(--vbf-font-head); text-transform: uppercase; color: #111; }

/* ---------- Hàng chờ duyệt ---------- */
.vbf-review h2 { margin: 28px 0 14px; font: 800 18px/1.2 var(--vbf-font-head); text-transform: uppercase; color: #111; }
.vbf-review h2 span { font-family: var(--vbf-font-ui); font-weight: 500; color: #8d8d8d; }
.vbf-review__list { margin: 0; padding: 0; list-style: none; border: 1px solid #eee; border-radius: 10px; overflow: hidden; }
.vbf-review__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.vbf-review__list li:last-child { border-bottom: 0; }
.vbf-review__list li > span { font-size: 13.5px; color: #6a6a6a; }
.vbf-review__list a { color: #111; text-decoration: none; }
.vbf-review__list a.vbf-review__go, .vbf-review__links a { margin-left: auto; font-weight: 700; color: var(--vbf-red-db); } /* cùng đặc hiệu với .vbf-review__list a (0,1,1) — khai sau nên thắng */
.vbf-review__links { margin-left: auto; display: flex; gap: 16px; }

/* ---------- Thanh "Chế độ VBF" (chỉ cán bộ VBF thấy) ---------- */
.vbf-fe { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 58px); z-index: 50; }
.vbf-fe__bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px clamp(16px, 3vw, 40px); background: #111318; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.vbf-fe__brand { font: 800 12.5px/1 var(--vbf-font-head); letter-spacing: 1px; color: #ff5a61; }
.vbf-fe__status { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 12.5px; font-weight: 600; }
.vbf-fe__status--pending { background: #f0a020; color: #111; }
.vbf-fe__status--publish { background: #1f9d55; }
.vbf-fe__notice { font-size: 13px; color: #9be3b8; }
.vbf-fe__actions { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vbf-fe__actions form { margin: 0; }
.vbf-fe__btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 7px; background: transparent; color: #fff; font: 700 13px var(--vbf-font-ui); text-decoration: none; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.vbf-fe__btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.vbf-fe__btn--ok { border-color: var(--vbf-red-db); background: var(--vbf-red-db); }
.vbf-fe__btn--ok:hover { background: #c0141c; }
.vbf-fe__btn--no { border-color: rgba(255, 90, 97, .6); color: #ff9aa0; }
.vbf-fe__btn--ghost { border-color: #e2e2e2; color: #3a3a3a; }
.vbf-fe__btn--ghost:hover { background: #f4f4f5; color: #111; }
.vbf-fe__link { font-size: 12.5px; color: #c9cedd; text-decoration: underline; }
.vbf-fe__dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); color: #1c202b; }
.vbf-fe__dialog::backdrop { background: rgba(8, 8, 10, .6); }
.vbf-fe__dialog form { max-height: calc(100vh - 48px); overflow: auto; } /* MỘT vùng cuộn cho cả hộp — ĐÃ ĐO 17/10: hai vùng cuộn lồng nhau, lưới ô nhập bị kẹp */
.vbf-fe__head { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid #eee; }
.vbf-fe__head h2 { margin: 0; font: 800 18px var(--vbf-font-head); text-transform: uppercase; }
.vbf-fe__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f4f4f5; font-size: 20px; cursor: pointer; }
.vbf-fe__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px 18px; padding: 20px 24px; }
.vbf-fe__grid p { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.vbf-fe__wide { grid-column: 1 / -1; }
.vbf-fe__dialog label.vbf-fe__check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.vbf-fe__members { padding: 0 24px 16px; overflow-x: auto; }
.vbf-fe__members h3 { margin: 4px 0 10px; font: 800 15px var(--vbf-font-head); text-transform: uppercase; }
.vbf-fe__members table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vbf-fe__members :is(th, td) { padding: 8px; border-bottom: 1px solid #eee; text-align: left; }
.vbf-fe__members p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.vbf-fe__members :is(select, input) { width: auto; min-height: 38px; }
.vbf-fe__foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid #eee; background: #fafafa; }

/* Hộp "Canh chỉnh ảnh / logo" (Chế độ VBF). */
.vbf-frame { width: min(760px, 94vw); }
.vbf-frame__body { display: grid; gap: 22px; padding: 20px; }
@media (min-width: 680px) { .vbf-frame__body { grid-template-columns: 320px 1fr; } }
.vbf-frame__stage { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #12141d; cursor: grab; touch-action: none; outline: 3px solid #e01b24; outline-offset: 3px; }
.vbf-frame__stage.is-logo { border-radius: 14px; background: #f1f2f5; }
.vbf-frame__stage.is-drag { cursor: grabbing; }
.vbf-frame__stage img, .vbf-frame__pv img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; transform-origin: center; }
.vbf-frame__stage.is-logo img, .vbf-frame__stage.is-logo ~ .vbf-frame__side .vbf-frame__pv img { object-fit: contain; }
.vbf-frame__stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) center / 1px 100% no-repeat, linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) center / 100% 1px no-repeat; }
.vbf-frame__help { font-size: 13.5px; line-height: 1.55; color: #555; }
.vbf-frame__zoom { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-weight: 600; font-size: 13.5px; }
.vbf-frame__zoom input { flex: 1; accent-color: #e01b24; }
.vbf-frame__previews { display: flex; gap: 14px; margin-top: 18px; }
.vbf-frame__pv { width: 72px; height: 72px; overflow: hidden; border-radius: 10px; background: #f1f2f5; }
.vbf-frame__pv.is-round { border-radius: 50%; background: #12141d; }
.vbf-frame__acts { display: flex; gap: 10px; margin-top: 20px; }
.vbf-frame__msg { margin-top: 12px; font-size: 13px; color: #1a7f37; min-height: 1.2em; }

/* ---------- Form VĐV chia nhóm (17/10/2026) ---------- */
.vbf-form:has(.vbf-form__form--grouped) { max-width: 880px; }
.vbf-form__trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.vbf-form__group { position: relative; }
.vbf-form .vbf-form__group legend { display: flex; align-items: center; gap: 10px; }
.vbf-form__step { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--vbf-red-db); color: #fff; font: 800 13px/1 var(--vbf-font-head); }
.vbf-form__gnote { margin: -2px 0 16px !important; font-size: 13.5px; color: #6b7280; }
.vbf-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.vbf-form__f { margin: 0 0 16px; }
.vbf-form__f > label { display: block; margin-bottom: 7px; }
.vbf-form__f--wide { grid-column: 1 / -1; }
.vbf-form__f--sm input { max-width: 140px; }
.vbf-form__help { display: block; margin-top: 6px; font-size: 12.5px; }
.vbf-form__grid .small-text, .vbf-form__grid .regular-text, .vbf-form__grid .large-text { width: 100%; }
.vbf-form__note--preview { background: #fff7e6; border-left: 3px solid #d97706; }
.vbf-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0; }
.vbf-form__submit small { font-size: 13px; }
@media (max-width: 640px) { .vbf-form__grid { grid-template-columns: 1fr; } .vbf-form fieldset { padding: 18px 16px 4px; } }
/* Form sửa hồ sơ: thẻ hồ sơ đích */
.vbf-form__target { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #ededed; border-radius: 12px; background: #fafafa; }
.vbf-form__tthumb { width: 54px; height: 54px; flex: none; border-radius: 50%; overflow: hidden; background: #eceef2; }
.vbf-form__tthumb img { width: 100%; height: 100%; object-fit: cover; }
.vbf-form__target > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.vbf-form__target small { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #8d8d8d; }
.vbf-form__target strong { font: 700 17px/1.2 var(--vbf-font-head); }
.vbf-form__target code { font: 600 12px/1 var(--vbf-font); color: var(--vbf-red-db); }
.vbf-form__target a { font-size: 13.5px; font-weight: 600; color: var(--vbf-red-db); }
.vbf-form__find { height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--vbf-red-db); color: #fff; font: 700 14px var(--vbf-font-ui); cursor: pointer; }

/* Thang cỡ chữ mobile (Gout.md §8, 20/10/2026): tên thẻ chọn loại ở trang Nhập thông tin. */
@media (max-width: 760px) { .vbf-hub__card strong { font-size: 15px; } }

/* 12/11/2026: thanh Chế độ VBF bám ngay dưới header thật (cao 62 đến 82 px theo cỡ màn) thay vì 58px cố định, khỏi chui dưới header. */
html body .vbf-fe { top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--vbf-head-h, 72px)); }
