/* ============================================================
 * UI kit — trạng thái đang tải: thanh tiến trình đầu trang (SPA), khung xương (.placeholder) và khung xương khởi động
 * Đổi ở đây là mọi trang đổi theo; chỉ đọc token --ui-*
 * ============================================================ */
.placeholder { background-color: var(--ui-line-strong); border-radius: var(--ui-radius-sm); opacity: .5; }
.ui-loadbar {
    position: fixed; top: 0; left: 0; z-index: var(--ui-z-top, 1090);
    height: 2px; width: 0; opacity: 0; background: var(--ui-brand);
    box-shadow: 0 0 8px rgba(var(--ui-brand-rgb), .6);
    transition: width .4s ease, opacity .3s ease;
}
.ui-loadbar.is-loading { opacity: 1; width: 75%; transition: width 8s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
.ui-loadbar.is-done { opacity: 0; width: 100%; transition: width .2s ease, opacity .4s ease .2s; }
.boot-skeleton[hidden] { display: none; }

/* Khung xương: chiều rộng giả của từng ô chữ + biểu đồ giữ đúng tỉ lệ viewBox của biểu đồ thật
   để nội dung thật thay vào không nhảy bố cục. */
.ui-sk-w-title { width: 14rem; max-width: 100%; }
.ui-sk-w-sub { width: 11rem; max-width: 100%; }
.ui-sk-w-btn { width: 3.2rem; }
.ui-sk-w-label { width: 6rem; max-width: 100%; }
.ui-sk-w-label2 { width: 9rem; max-width: 100%; }
.ui-sk-w-value { width: 5rem; }
.ui-sk-w-hint { width: 7rem; max-width: 100%; }
.ui-sk-w-title2 { width: 8rem; max-width: 100%; }
.ui-sk-w-sub2 { width: 11rem; max-width: 100%; }
.ui-sk-w-total { width: 2.5rem; }
.ui-sk-w-count { width: 2.2rem; }
.ui-sk-w-tab { width: 4.5rem; }
.ui-sk-w-search { width: 14rem; max-width: 100%; }
.skel-chip { display: inline-block; width: 1.9rem; height: 1.9rem; border-radius: var(--ui-radius); }
.skel-check { display: inline-block; width: 1rem; height: 1rem; vertical-align: middle; }
/* Biểu đồ: khung có chiều cao cố định bằng đúng `height` truyền cho <x-ui::chart> (320 chính, 260/300 phụ) nên khung xương
   dùng cùng số đo; mobile giữ nguyên vì biểu đồ Chart.js co theo bề rộng, không theo tỉ lệ. */
.skel-chart { width: 100%; height: 300px; border-radius: var(--ui-radius); }
.skel-chart.is-primary { height: 320px; }
/* Ô chữ giả nằm sát đỉnh dòng để dòng giữ đúng line-height của chữ thật (không cộng thêm ~1px do canh giữa). */
.boot-skeleton .placeholder:not(.d-block):not(.skel-chip):not(.skel-check):not(.admin-thumb) { vertical-align: top; }
/* Tiêu đề cột thật chứa liên kết sắp xếp cao hơn chữ thường ~1.8px. */
.boot-skeleton thead .placeholder { min-height: calc(1em + 1.8px); }
@media (prefers-reduced-motion: reduce) { .placeholder-glow .placeholder { animation: none; } }
.boot-row { min-height: 2.4rem; }
.boot-heading { display: block; width: 32%; height: 1.1rem; }
.boot-label { width: 35%; height: .8rem; margin-bottom: .5rem; }
.boot-control { height: var(--ui-control-h); border-radius: var(--ui-radius); opacity: .35; }
.boot-area .boot-control { height: 7.5rem; }
.boot-switch { width: 55%; height: 1.25rem; }
.boot-media { aspect-ratio: 4 / 3; border-radius: var(--ui-radius); opacity: .35; }
.boot-savebar { animation: none; }
.boot-savebar .admin-savebar-inner { gap: 10px; }
.boot-sb-icon { width: 34px; height: 34px; border-radius: 9px; }
.boot-sb-title { width: 140px; height: .9rem; }
.boot-sb-btn { width: 84px; height: 34px; border-radius: 9px; }
