/* =========================================================================================
   ui.css — v52: giao diện mới theo mẫu "Wharf" (video người dùng gửi).
   Nạp SAU style.css: đổi bộ màu (biến CSS) + kiểu chữ + khung chung, rồi tới từng trang được làm lại.
     • Font Hanken Grotesk tự lưu ở /static/fonts (có bảng chữ tiếng Việt), không còn gọi Google Fonts.
     • Icon Lucide (icons.css) thay webfont Tabler — markup <i class="ti ti-xxx"> giữ nguyên.
     • Chế độ: Sáng / Theo máy / Tối (data-theme="dark" khi tối). Màu nhấn: data-acc = yellow | teal | pink | blue.
     • Mật độ bảng đơn: data-density = compact | comfy. Hiệu ứng: data-motion="off" để tắt.
   Màu chữ đã đo tương phản ≥ 4,5:1 trên nền thẻ ở cả Sáng lẫn Tối (audit_dark.py).
   ========================================================================================= */

/* ---------- Font ---------- */
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 400;
    src: url(../fonts/hanken-grotesk-vietnamese-400-normal.woff2) format('woff2');
    unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 400;
    src: url(../fonts/hanken-grotesk-latin-ext-400-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 400;
    src: url(../fonts/hanken-grotesk-latin-400-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 500;
    src: url(../fonts/hanken-grotesk-vietnamese-500-normal.woff2) format('woff2');
    unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 500;
    src: url(../fonts/hanken-grotesk-latin-ext-500-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 500;
    src: url(../fonts/hanken-grotesk-latin-500-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 600;
    src: url(../fonts/hanken-grotesk-vietnamese-600-normal.woff2) format('woff2');
    unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 600;
    src: url(../fonts/hanken-grotesk-latin-ext-600-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 600;
    src: url(../fonts/hanken-grotesk-latin-600-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 700;
    src: url(../fonts/hanken-grotesk-vietnamese-700-normal.woff2) format('woff2');
    unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 700;
    src: url(../fonts/hanken-grotesk-latin-ext-700-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 700;
    src: url(../fonts/hanken-grotesk-latin-700-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- Màu nhấn (4 bộ như video: vàng · xanh ngọc · hồng · xanh dương) ----------
   --acc: cột / thanh / vùng biểu đồ · --acc-strong: đường nhấn đậm · --acc-soft: nền icon, vùng tô · --acc-tint: nền nhạt
   --acc-text: chữ màu nhấn (≥ 4,5:1 trên nền thẻ) · --glow: quầng màu góc trang · --plan: ô Mục tiêu tháng */
:root, :root[data-acc="yellow"] {
    --acc: #ebb840; --acc-strong: #b98516; --acc-soft: #f6dfa6; --acc-tint: #faf0d3; --acc-text: #7a580c; --acc-ink: #3b2a04;
    --glow: rgba(242, 196, 92, 0.50); --glow2: rgba(242, 196, 92, 0.20); --plan: #f4d68c; --plan-ink: #3a2d0c;
}
:root[data-acc="teal"] {
    --acc: #7fd6c0; --acc-strong: #2a9d82; --acc-soft: #c7eddf; --acc-tint: #e3f5ee; --acc-text: #1a6352; --acc-ink: #0d3a2f;
    --glow: rgba(140, 215, 195, 0.50); --glow2: rgba(140, 215, 195, 0.20); --plan: #a8dccd; --plan-ink: #0f3a30;
}
:root[data-acc="pink"] {
    --acc: #f2a7c3; --acc-strong: #c9557f; --acc-soft: #f8d4e2; --acc-tint: #fceaf1; --acc-text: #93325a; --acc-ink: #4a1229;
    --glow: rgba(242, 170, 198, 0.45); --glow2: rgba(242, 170, 198, 0.18); --plan: #f4c0d3; --plan-ink: #4a1229;
}
:root[data-acc="blue"] {
    --acc: #8fb6f0; --acc-strong: #3c74c9; --acc-soft: #d3e3f9; --acc-tint: #e8f0fc; --acc-text: #29548f; --acc-ink: #10284d;
    --glow: rgba(150, 185, 240, 0.45); --glow2: rgba(150, 185, 240, 0.18); --plan: #bad0f4; --plan-ink: #10284d;
}

/* ---------- Bộ màu Sáng (ghi đè biến của style.css — mọi trang đang dùng các biến này) ---------- */
:root {
    --bg-page: #f1f0e9;
    --bg-card: #fbfaf6;
    --bg-input: #fdfcf9;
    --bg-sidebar: #f7f6f1;
    --bg-hover: rgba(40, 34, 18, 0.045);
    --border: #e4e1d8;
    --line2: #eeece5;
    --card-line: rgba(40, 34, 18, 0.07);
    --text-primary: #1c1b1f;
    --text-secondary: #55534d;
    --text-muted: #646259;
    --accent: var(--acc-text);
    --accent-bg: var(--acc-tint);
    --success: #286640; --success-bg: #d9eedd;
    --warning: #8f520e; --warning-bg: #f8e4c9;
    --danger: #a8303c; --danger-bg: #f6d9da;
    --accent-solid: #1d1c20; --success-solid: #2b7448; --warning-solid: #a2580f; --danger-solid: #b0323d;
    --dark: #1d1c20; --dark-ink: #ffffff; --dark-hover: #36332c;
    --row-hover: #f2f1ed; --bg-sidebar-a: rgba(247, 246, 241, 0.92);
    --seg-bg: #ebe9e2;
    --radius: 16px;
    --r-card: 18px;
    --sh-card: 0 1px 2px rgba(40, 32, 10, 0.04), 0 8px 26px rgba(70, 56, 20, 0.06);
    --sh-pop: 0 18px 50px rgba(40, 32, 10, 0.16), 0 2px 6px rgba(40, 32, 10, 0.06);
    --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color-scheme: light;
}

/* ---------- Bộ màu Tối (thiết kế cùng tinh thần — video không có bản tối) ---------- */
[data-theme="dark"] {
    --bg-page: #121211;
    --bg-card: #1c1c19;
    --bg-input: #171715;
    --bg-sidebar: #161614;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --border: #2f2e2a;
    --line2: #272622;
    --card-line: rgba(255, 255, 255, 0.06);
    --text-primary: #f2f0e8;
    --text-secondary: #cfccc3;
    --text-muted: #a5a299;
    --success: #7dd3a0; --success-bg: #183324;
    --warning: #f0b46a; --warning-bg: #3a2a14;
    --danger: #f39a9a; --danger-bg: #3d1c1e;
    --accent-solid: #3a3934;
    --dark: #f2f0e8; --dark-ink: #161614; --dark-hover: #dcd8cb;
    --row-hover: #252421; --bg-sidebar-a: rgba(22, 22, 20, 0.92);
    --seg-bg: #24231f;
    --sh-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.30);
    --sh-pop: 0 20px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}
[data-theme="dark"], [data-theme="dark"][data-acc="yellow"] {
    --acc-strong: #e2ad3a; --acc-soft: #4a3c1b; --acc-tint: #2c2617; --acc-text: #f1c965; --acc-ink: #2a1f04;
    --glow: rgba(235, 184, 64, 0.13); --glow2: rgba(235, 184, 64, 0.06); --plan: #3a311b; --plan-ink: #f4e2b6;
}
[data-theme="dark"][data-acc="teal"] {
    --acc-strong: #5cc8ad; --acc-soft: #1d4a3e; --acc-tint: #172b25; --acc-text: #86dcc6; --acc-ink: #082a21;
    --glow: rgba(127, 214, 192, 0.12); --glow2: rgba(127, 214, 192, 0.05); --plan: #1d3a32; --plan-ink: #c9f0e4;
}
[data-theme="dark"][data-acc="pink"] {
    --acc-strong: #ee8fb2; --acc-soft: #4d2939; --acc-tint: #301c25; --acc-text: #f6b5cd; --acc-ink: #3a0f21;
    --glow: rgba(242, 167, 195, 0.12); --glow2: rgba(242, 167, 195, 0.05); --plan: #3d2430; --plan-ink: #fad6e3;
}
[data-theme="dark"][data-acc="blue"] {
    --acc-strong: #7aa7ec; --acc-soft: #24364f; --acc-tint: #1a2333; --acc-text: #a9c7f4; --acc-ink: #0d203f;
    --glow: rgba(143, 182, 240, 0.12); --glow2: rgba(143, 182, 240, 0.05); --plan: #22314a; --plan-ink: #d6e5fb;
}

/* ---------- Nền + chữ ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 14px;
    letter-spacing: 0.002em;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(1100px 680px at 100% -8%, var(--glow), transparent 62%),
        radial-gradient(900px 600px at 96% 108%, var(--glow2), transparent 62%),
        var(--bg-page);
    background-attachment: fixed;
}
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--acc-soft); color: var(--text-primary); }
:focus-visible { outline: 2px solid var(--acc-strong); outline-offset: 2px; }
code, kbd, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- Thanh bên ---------- */
.sidebar {
    width: 248px;
    background: var(--bg-sidebar);
    background: var(--bg-sidebar-a);   /* (màu cụ thể, không color-mix: công cụ đo tương phản đọc được) */
    border-right: 1px solid var(--border);
    padding: 16px 12px 12px;
    gap: 0;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); }
.sidebar-brand img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.sb-search { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 7px 0 11px; margin: 0 0 4px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg-input); color: var(--text-muted); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02); }
.sb-search .ti { font-size: 15px; }
.sb-search input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; height: 32px; font-size: 13.5px; color: var(--text-primary); box-shadow: none; }
.sb-search input[type="search"]:focus { outline: none; box-shadow: none; }
.sb-search:focus-within { border-color: var(--acc-strong); box-shadow: 0 0 0 3px var(--acc-tint); }
.sb-search kbd { font: 600 10.5px var(--font); border: 1px solid var(--border); border-radius: 6px; padding: 2px 5px; color: var(--text-muted); background: var(--bg-sidebar); }
.nav-list { gap: 1px; }
/* v52: chỉ danh sách mục cuộn — thẻ mục tiêu + thẻ người dùng luôn nằm dưới đáy (như video), nút thu nhỏ không bị cắt */
@media (min-width: 769px) {
    .sidebar { overflow: visible; }
    .nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -6px; padding: 0 6px 4px;
        scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
    .nav-list > *, .nav-subgroup > * { flex-shrink: 0; }
    .nav-list::-webkit-scrollbar { width: 6px; } .nav-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
}
.nav-sec { font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 14px 10px 5px; letter-spacing: 0.01em; }
.nav-item {
    gap: 11px; height: 37px; padding: 0 10px; border-radius: 10px; border-left: 0;
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: background-color 0.15s, color 0.15s;
}
.nav-item i, .nav-item .ti { font-size: 17px; width: 18px; color: var(--text-muted); }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--dark); color: var(--dark-ink); font-weight: 600; border-left-color: transparent; }
.nav-item.active i, .nav-item.active .ti { color: var(--acc); }
[data-theme="dark"] .nav-item.active i, [data-theme="dark"] .nav-item.active .ti { color: var(--dark-ink); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group-toggle { width: 100%; background: none; border: none; cursor: pointer; text-align: left; font: inherit; font-size: 14.5px; font-weight: 500; }
.nav-chev { width: auto !important; font-size: 14px !important; transition: transform 0.15s; }
.nav-subitem { padding-left: 22px; height: 33px; font-size: 13.5px; }
.nav-subitem .ti { font-size: 15px; }
.nav-badge { flex: 0 0 auto; margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
    font-size: 11px; font-weight: 700; line-height: 1; background: var(--acc); color: var(--acc-ink); }
.nav-badge.is-warm { background: #ea8a52; color: #2a1205; }
.nav-badge.is-live { background: var(--success-bg); color: var(--success); }
.nav-item.active .nav-badge { box-shadow: 0 0 0 2px var(--dark); }
.sidebar-toggle-btn { top: 22px; right: -12px; background: var(--bg-card); border-color: var(--border); color: var(--text-muted); }

.sidebar-bottom { margin-top: auto; padding-top: 14px; gap: 8px; }
.sb-goal { display: block; background: var(--plan); color: var(--plan-ink); border-radius: 12px; padding: 11px 12px 10px; }
.sb-goal-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.sb-goal-h b { font-weight: 700; }
.sb-goal-edit { font-size: 12px; color: inherit; opacity: 0.75; }
.sb-goal-edit:hover { opacity: 1; text-decoration: underline; }
.sb-goal-bar { height: 5px; border-radius: 9px; background: rgba(0, 0, 0, 0.12); margin: 9px 0 7px; overflow: hidden; }
.sb-goal-bar i { display: block; height: 100%; border-radius: 9px; background: currentColor; }
[data-theme="dark"] .sb-goal-bar { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .sb-goal-bar i { background: var(--acc); }
.sb-goal-s { font-size: 11.5px; opacity: 0.9; line-height: 1.35; }
.user-card { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--border); border-radius: 0;
    background: transparent; padding: 10px 6px 2px; cursor: pointer; color: var(--text-primary); text-align: left; }
.user-card:hover .user-name { text-decoration: underline; }
.user-avatar { width: 34px; height: 34px; border-radius: 999px; background: #f0c9a8; color: #5b3e22; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 13.5px; font-weight: 600; }
.role-badge { align-self: flex-start; font-size: 11px; padding: 0 7px; margin-top: 2px; }
.user-chev { color: var(--text-muted); font-size: 15px; }

/* thanh bên thu nhỏ */
.sidebar.collapsed { width: 68px; padding: 16px 10px 12px; }
.sidebar.collapsed .nav-sec, .sidebar.collapsed .sb-search, .sidebar.collapsed .sb-goal { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0; }
.sidebar.collapsed .user-card { justify-content: center; padding: 10px 0 2px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 2px 0 14px; }

/* ---------- Menu người dùng (giao diện · màu nhấn · mật độ · ngôn ngữ · đăng xuất) ---------- */
.user-menu { position: fixed; z-index: 1001; left: 12px; bottom: 70px; width: 288px; max-width: calc(100vw - 16px);
    background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--sh-pop);
    padding: 14px 14px 12px; display: none; font-size: 13px; }
.user-menu.show { display: block; }
.um-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.um-who { display: flex; flex-direction: column; min-width: 0; }
.um-who b { font-size: 14px; } .um-who small { color: var(--text-muted); font-size: 12px; }
.um-lbl { font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 12px 0 6px; }
.um-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.user-menu .seg { display: flex; width: 100%; }
.user-menu .seg > * { flex: 1; justify-content: center; }
.user-menu .btn-logout { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; height: 36px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.user-menu .btn-logout:hover { color: var(--danger); border-color: var(--danger-bg); }
.acc-swatches { display: flex; gap: 10px; }
.acc-sw { width: 28px; height: 28px; border-radius: 999px; border: 0; cursor: pointer; padding: 0; position: relative; }
.acc-sw[data-accent-choice="yellow"] { background: #ebb840; } .acc-sw[data-accent-choice="teal"] { background: #7fd6c0; }
.acc-sw[data-accent-choice="pink"] { background: #f2a7c3; } .acc-sw[data-accent-choice="blue"] { background: #8fb6f0; }
.acc-sw.is-on { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--text-primary); }
.acc-sw.is-on::after { content: ""; position: absolute; inset: 10px; border-radius: 99px; background: #1d1c20; }

/* công tắc */
input.tgl { -webkit-appearance: none; appearance: none; width: 36px; height: 21px; border-radius: 999px; background: var(--seg-bg); position: relative; cursor: pointer;
    border: 0; padding: 0; margin: 0; flex: 0 0 auto; transition: background 0.18s; box-shadow: inset 0 0 0 1px var(--border); }
input.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.18s; }
input.tgl:checked { background: var(--dark); box-shadow: none; }
input.tgl:checked::after { transform: translateX(15px); background: var(--dark-ink); }

/* ---------- Thanh nút phân đoạn (giống "7 days · 30 days · 90 days" trong video) ---------- */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--seg-bg); border: 0; }
.seg > a, .seg > button, .seg > span, .seg > label { display: inline-flex; align-items: center; gap: 6px; height: 29px; padding: 0 12px; border-radius: 8px; border: 0;
    background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; }
.seg > a:hover, .seg > button:hover { color: var(--text-primary); }
.seg > .is-on, .seg > [aria-pressed="true"], .seg > .active { background: var(--dark); color: var(--dark-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg .ti { font-size: 14px; }
.seg.sm > * { height: 25px; padding: 0 10px; font-size: 12px; }

/* ---------- Góc phải trên: chuông (hoạt động + thông báo trên thiết bị) ---------- */
.main-content { position: relative; padding: 20px 26px 28px; min-width: 0; }
.top-actions { position: absolute; top: 20px; right: 26px; z-index: 30; display: flex; gap: 9px; align-items: center; }
.ph { padding-right: 50px; }
.top-bell, .ph-bell { position: relative; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card);
    display: grid; place-items: center; color: var(--text-primary); cursor: pointer; padding: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.top-bell .ti { font-size: 17px; }
.top-bell:hover { background: var(--bg-input); }
.top-bell .push-dot { display: block; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 99px; border: 1.5px solid var(--bg-card); background: transparent; }
.push-state-off .push-dot, .push-state-warn .push-dot { background: #e5484d; }
.push-state-on .push-dot { background: transparent; border-color: transparent; }
.push-pill-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.main-content > .page-header:first-of-type, .main-content > .top-actions + .page-header { padding-right: 56px; }

.push-panel { width: 340px; border-radius: 16px; padding: 14px 16px 14px; box-shadow: var(--sh-pop); font-size: 13px; }
.push-panel-head { font-size: 14.5px; font-weight: 700; margin-bottom: 8px; }
.bell-feed { display: flex; flex-direction: column; max-height: 300px; overflow: auto; margin: 0 -6px; }
.bell-wait { color: var(--text-muted); padding: 8px 6px; font-size: 12.5px; }
.bell-it { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 8px 6px; border-radius: 10px; color: var(--text-primary); }
a.bell-it:hover { background: var(--bg-hover); }
.bell-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--acc-tint); color: var(--acc-text); font-size: 14px; }
.bell-tx { min-width: 0; line-height: 1.3; }
.bell-tx b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-tx small { display: block; color: var(--text-muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-t { font-size: 11px; color: var(--text-muted); white-space: nowrap; padding-top: 2px; }
.bell-all { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--accent); margin: 6px 0 2px; }
.push-sec { border-top: 1px solid var(--line2); margin-top: 10px; padding-top: 10px; }
.push-sec-h { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }

/* ---------- Tiêu đề trang ---------- */
.page-header { font-size: 25px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin: 2px 0 16px; gap: 10px; color: var(--text-primary); }
.page-header .subtitle { font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.main-content > .page-header + p, .main-content > .page-header + .cfd-sub { margin-top: -10px !important; margin-bottom: 16px; color: var(--text-secondary) !important; font-size: 13.5px !important; }
/* tiêu đề kiểu mới (Tổng quan, Danh sách, Cài đặt): tên + 1 dòng mô tả bên trái, nút bên phải */
.ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0 0 18px; position: relative; z-index: 6; }
.ph h1 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.ph p { margin: 3px 0 0; color: var(--text-secondary); font-size: 13.5px; }
.ph-a { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; padding-top: 2px; }

/* ---------- Thẻ ---------- */
.card { background: var(--bg-card); border: 1px solid var(--card-line); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 16px 18px; margin-bottom: 14px; }
.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 10px; color: var(--text-primary); }
.card-title > .ti { color: var(--text-muted); }
.card-sub, .cs { font-size: 12.5px; color: var(--text-muted); font-weight: 400; }
.metric-card { background: var(--bg-input); border: 1px solid var(--line2); border-radius: 12px; }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-size: 13px; font-weight: 600; line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); transition: border-color 0.15s, transform 0.08s; text-decoration: none; }
/* (không chuyển màu nền dần: nút vừa hết 'disabled' mà nền còn đang đổi thì chữ trắng nằm trên nền sáng ~0,15 s) */
.btn:hover { background: var(--bg-input); border-color: color-mix(in srgb, var(--border) 70%, var(--text-muted)); }
.btn:active { transform: translateY(1px); }
.btn .ti { font-size: 15px; }
.btn-primary, [data-theme="dark"] .btn-primary { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.btn-primary:hover, [data-theme="dark"] .btn-primary:hover { background: var(--dark-hover); border-color: var(--dark-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger-bg); background: var(--bg-card); }
.btn-success { color: var(--success); border-color: var(--success-bg); background: var(--bg-card); }
.btn-acc { background: var(--acc-soft); border-color: transparent; color: var(--acc-ink); }
[data-theme="dark"] .btn-acc { color: var(--acc-text); }
.btn-block { display: flex; width: 100%; }
.link-btn { color: var(--accent); font-weight: 600; }

/* ---------- Ô nhập ---------- */
label.field-label { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); margin-bottom: 5px; }
input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="number"], input[type="date"],
input[type="month"], input[type="time"], input[type="url"], input[type="tel"], select, textarea {
    border: 1px solid var(--border); border-radius: 10px; background-color: var(--bg-input); color: var(--text-primary);
    font-size: 13.5px; padding: 0.5rem 0.7rem; transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="search"]:focus, input[type="password"]:focus, input[type="number"]:focus,
input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="tel"]:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--acc-strong); box-shadow: 0 0 0 3px var(--acc-tint);
}
select { -webkit-appearance: none; appearance: none; padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386847e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 14px; }
select[multiple], select[size] { background-image: none; padding-right: 0.7rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--text-primary); }
[data-theme="dark"] input[type="checkbox"], [data-theme="dark"] input[type="radio"] { accent-color: var(--acc); }
::placeholder { color: color-mix(in srgb, var(--text-muted) 85%, transparent); }

/* ---------- Bảng ---------- */
table.data-table { font-size: 13px; }
table.data-table th { font-size: 12px; font-weight: 700; color: var(--text-secondary); padding: 9px 10px; border-bottom: 1px solid var(--border); }
table.data-table td { padding: 10px 10px; border-bottom: 1px solid var(--line2); }
table.data-table tbody tr:hover td { background: var(--bg-hover); }
table.data-table tr.selected td, table.data-table tr.selected { background: var(--acc-tint); }

/* ---------- Nhãn / huy hiệu ---------- */
.badge { border-radius: 999px; font-size: 12px; font-weight: 600; padding: 2px 9px; line-height: 1.45; }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-paid { background: var(--success-bg); color: var(--success); }
.badge-cancelled { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--seg-bg); color: var(--text-secondary); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before, .badge.is-dot::before { content: ""; width: 5px; height: 5px; border-radius: 9px; background: currentColor; flex: 0 0 auto; }
.badge.is-dot { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Thanh chọn hàng loạt, thông báo, hộp nổi ---------- */
.selection-bar { background: var(--acc-tint); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); border-radius: 14px; padding: 8px 12px; }
.toast { background: var(--dark); color: var(--dark-ink); border-radius: 12px; font-weight: 600; font-size: 13px; box-shadow: var(--sh-pop); padding: 10px 14px; }
.lightbox-overlay, .modal-overlay { background: rgba(28, 26, 20, 0.32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.empty-state { color: var(--text-muted); }

/* ---------- Hiệu ứng (tắt được ở menu người dùng · tự tắt khi máy bật "giảm chuyển động") ---------- */
@keyframes ui-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ui-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ui-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ui-draw { from { stroke-dashoffset: var(--len, 2000); } to { stroke-dashoffset: 0; } }
@keyframes ui-slide { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
/* chỉ chạy lúc MỞ TRANG (html.ui-enter, app.js gỡ sau ~0,9 s) — thẻ ẩn/hiện về sau không nháy mờ lại */
html.ui-enter:not([data-motion="off"]) .main-content > .card,
html.ui-enter:not([data-motion="off"]) .main-content > .ph,
html:not([data-motion="off"]) .anim-in > * { animation: ui-rise 0.42s cubic-bezier(.2, .7, .2, 1) backwards; }
/* backwards (không phải both): chạy xong là bỏ hẳn hiệu ứng — nếu giữ transform sau khi chạy, mỗi thẻ thành 1 lớp riêng
   và khung bật ra (Hiện / ẩn khu vực, Filter…) bị thẻ phía sau đè lên */
html:not([data-motion="off"]) .anim-in > *:nth-child(2) { animation-delay: 0.04s; }
html:not([data-motion="off"]) .anim-in > *:nth-child(3) { animation-delay: 0.08s; }
html:not([data-motion="off"]) .anim-in > *:nth-child(4) { animation-delay: 0.12s; }
html:not([data-motion="off"]) .anim-in > *:nth-child(5) { animation-delay: 0.16s; }
html:not([data-motion="off"]) .anim-in > *:nth-child(n+6) { animation-delay: 0.2s; }
html:not([data-motion="off"]) .user-menu.show, html:not([data-motion="off"]) .push-panel.show { animation: ui-pop 0.18s ease-out backwards; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 768px) {
    /* chữ ô nhập 16px: iPhone không tự phóng to trang khi chạm vào ô (giữ như các bản trước) */
    input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="number"], input[type="date"],
    input[type="month"], input[type="time"], input[type="url"], input[type="tel"], select, textarea { font-size: 16px !important; }
    .sidebar { width: 100%; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); background: var(--bg-sidebar); }
    .sidebar-brand { padding: 0 0 8px; }
    .sb-search { margin-bottom: 8px; }
    .nav-sec { display: none; }
    .nav-list { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
    .nav-item { height: 34px; white-space: nowrap; border-bottom: 0; flex: 0 0 auto; font-size: 13.5px; }
    .nav-item.active { border-bottom-color: transparent; }
    .nav-label { overflow: visible; }
    .sidebar-bottom { padding-top: 6px; flex-direction: row; align-items: center; }
    .sb-goal { flex: 1; padding: 7px 10px; }
    .sb-goal-bar { margin: 5px 0 4px; }
    .user-card { width: auto; border-top: 0; padding: 0; }
    .user-card .user-meta, .user-card .user-chev { display: none; }
    .main-content { padding: 14px 14px 22px; }
    .top-actions { top: 14px; right: 14px; }
    .ph { flex-direction: column; align-items: stretch; }
    .ph-a { justify-content: flex-start; }
    .ph h1, .page-header { font-size: 21px; }
    .user-menu { left: 8px; right: 8px; width: auto; bottom: auto; top: 60px; }
    /* v53: điện thoại — mục con của Tool nằm thẳng trên hàng menu ngang (không bung cột dọc làm hở khoảng trống) */
    .nav-group, .nav-subgroup { display: contents !important; }
    .nav-group-toggle { display: none !important; }
    .nav-subitem { padding-left: 10px !important; margin-left: 0 !important; }
}
@media print {
    body { background: #fff; }
    .top-actions, .user-menu, .push-panel { display: none !important; }
    .card { box-shadow: none; border-color: #ddd; }
}

/* =========================================================================================
   TỔNG QUAN (v52) — bố cục như "Overview" trong video:
   biểu đồ lớn (chỉ số đang chọn) + 4 thẻ chỉ số 2×2 · Tiến độ đơn / Doanh thu theo tài khoản / Mẫu bán chạy ·
   Đơn mới nhất + Hoạt động · Hôm nay / Việc cần làm / Mục tiêu · Lãi lỗ / Nhân viên / Nguồn khách · Dịp lễ
   ========================================================================================= */
:root {
    --ov-s1: var(--text-primary);       /* đường "kỳ này" — màu chữ như video */
    --ov-area: var(--acc-soft);         /* vùng tô dưới đường */
    --ov-area-top: 1; --ov-area-bot: 0.5;
    --ov-line-w: 1.7;
    --ov-end-fill: var(--bg-card); --ov-end-ring: var(--acc-strong);
    --ov-prev: #bdb8ab; --ov-grid: #ebe8df; --ov-cost: #8a877f; --ov-fee: #d9d5ca;
    --ov-spark-line: #4a4843; --ov-ring: var(--bg-card);
    --ov-flow-0: var(--acc); --ov-flow-1: var(--acc-strong); --ov-flow-2: #3d3c38; --ov-flow-3: #1d1c20;
    --ov-flow-cancel: #c9c4b7; --ov-flow-other: #dcd8cd;
}
[data-theme="dark"] {
    --ov-s1: #f2f0e8; --ov-area-top: 0.95; --ov-area-bot: 0.3;
    --ov-prev: #6b675d; --ov-grid: #2a2925; --ov-cost: #8f8b80; --ov-fee: #4a4840; --ov-spark-line: #d6d2c8;
    --ov-flow-2: #8a877d; --ov-flow-3: #f2f0e8; --ov-flow-cancel: #5d5a52; --ov-flow-other: #3d3b35;
}
.ov-ph { margin-bottom: 16px; }
.ov-insight { background: var(--acc-tint); border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--text-primary); }
.ov-insight > i, .ov-insight > .ti { color: var(--acc-text); font-size: 17px; }
.ov-muted { font-size: 12.5px; color: var(--text-muted); }
.ov-delta { font-size: 12.5px; font-weight: 600; gap: 2px; }
.ov-delta .ti { font-size: 13px; }

/* hàng 1 */
.ov-g1 { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.ov-g1.is-single { grid-template-columns: minmax(0, 1fr); }
.ov-g1 > .card, .ov-g1 > .ov-kpi { margin: 0; min-width: 0; }
.ov-main { display: flex; flex-direction: column; padding: 16px 18px 12px; }
.ov-main-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ov-main .ct, .ov-pc .ct { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.ov-main .cs, .ov-pc .cs { margin-top: 2px; }
.ov-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 2px; }
.ov-big b { font-size: 40px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ov-big .ov-tabs { margin-left: auto; align-self: center; }
.ov-chart { flex: 1; min-height: 232px; margin-top: 4px; }
.ov-axis { font-size: 11px; fill: var(--text-muted); }
.ov-main-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.ov-legend { font-size: 12px; color: var(--text-secondary); }
.ov-key { width: 14px; height: 2px; }
.ov-tip { background: var(--bg-card); border-radius: 12px; box-shadow: var(--sh-pop); border-color: var(--border); font-size: 12.5px; }
.ov-period select { border: 0 !important; background-color: transparent !important; box-shadow: none !important; height: 29px; padding: 0 1.6rem 0 0.6rem; font-size: 13px;
    color: var(--text-secondary); border-radius: 8px; background-position: right 0.4rem center; }
.ov-period select.is-on { background-color: var(--dark) !important; color: var(--dark-ink); font-weight: 600; }

.ov-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ov-tile { margin: 0; padding: 14px 16px 12px; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; overflow: hidden;
    border: 1px solid var(--card-line); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.ov-tile:hover { transform: translateY(-1px); }
.ov-tile.is-on { border-color: color-mix(in srgb, var(--acc-strong) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc-strong) 70%, transparent), var(--sh-card); }
.ov-tile-head { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: flex-start; }
.ov-tile-head .ov-label { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-tile.is-on .ov-label { color: var(--text-primary); font-weight: 600; }
.ov-tile-ic { width: 30px; height: 30px; border-radius: 9px; border: 0; display: inline-grid; place-items: center; font-size: 16px; flex: none; }
.ov-tile-ic.is-rev { background: var(--acc-soft); color: var(--acc-ink); }
.ov-tile-ic.is-pro { background: var(--dark); color: var(--dark-ink); }
.ov-tile-ic.is-n { background: #f8dccb; color: #9a4a1c; }
.ov-tile-ic.is-aov { background: var(--seg-bg); color: var(--text-secondary); }
[data-theme="dark"] .ov-tile-ic.is-rev { color: var(--acc-text); }
[data-theme="dark"] .ov-tile-ic.is-n { background: rgba(240, 140, 90, 0.18); color: #f3a77a; }
.ov-go { color: var(--text-muted); font-size: 15px; }
.ov-v1 { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-top: 10px; font-variant-numeric: tabular-nums; }
.ov-tile-delta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 3px 0 8px; font-size: 12px; }
.ov-tile-delta .ov-muted { font-size: 12px; }
.ov-spark { width: 100%; height: 44px; margin-top: auto; display: block; overflow: visible; }

/* hàng 2 */
.ov-g2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ov-pc { padding: 16px 18px; min-height: 250px; }
.ov-pc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.ov-pc-link { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.ov-pc-link:hover { text-decoration: underline; }
.ov-stack { height: 11px; gap: 2px; border-radius: 9px; overflow: hidden; margin: 6px 0 14px; }
.ov-stack .ov-seg:first-child, .ov-stack .ov-seg:last-child { border-radius: 0; }
.ov-flow-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 22px; font-size: 13px; }
.ov-flow-legend .ov-sw { width: 9px; height: 9px; border-radius: 3px; }
.ov-flow-legend b { font-weight: 600; margin-left: auto; }
.ov-flow-name { color: var(--text-secondary); }
.ov-foot { border-top: 1px solid var(--line2); color: var(--text-muted); font-size: 12.5px; }
.ov-hbars { gap: 2px; }
.ov-hbars .ov-dl-row { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr) 66px 34px; align-items: center; gap: 12px; padding: 9px 2px;
    border: 0; border-radius: 8px; font-size: 13px; color: var(--text-secondary); }
.ov-hbars .ov-dl-row b { text-align: right; color: var(--text-primary); font-weight: 600; }
.ov-hbars button.ov-dl-row:hover { background: var(--bg-hover); }
.ov-dl-name { display: inline-flex; align-items: center; gap: 7px; }
.ov-dl-sw { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.ov-hb-t { display: block; height: 8px; border-radius: 9px; background: var(--line2); overflow: hidden; }
.ov-hb-t > i { display: block; height: 100%; border-radius: 9px; background: var(--acc); }
.ov-hb-t.sm { height: 3px; }
.ov-rank-list { gap: 0; }
.ov-rank-list .ov-item { display: flex; align-items: flex-start; gap: 12px; padding: 0 0 11px; border-top: 0; }
.ov-rank-n { width: 12px; flex: none; font-size: 12.5px; color: var(--text-muted); padding-top: 1px; }
.ov-rank-list .ov-item-txt { flex: 1; min-width: 0; display: block; font-size: 13px; }
.ov-item-r { display: flex; justify-content: space-between; gap: 10px; font-weight: 500; }
.ov-item-r b { font-weight: 600; }
.ov-item-r2 { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ov-item-r2 .ov-hb-t { flex: 1; }
.ov-item-r2 small { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* hàng 3: đơn mới nhất + hoạt động */
.ov-two { gap: 14px; margin-bottom: 14px; }
.ov-two.ov-wide { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
.ov-three, .ov-top { gap: 14px; margin-bottom: 14px; }
.ov-card-head { margin-bottom: 12px; }
.ov-card-head .card-title { font-size: 14.5px; }
.ov-chips { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--seg-bg); flex-wrap: wrap; }
.ov-chip { border: 0; border-radius: 8px; height: 25px; padding: 0 10px; font-size: 12px; font-weight: 500; color: var(--text-secondary); background: transparent; }
.ov-chip:hover { color: var(--text-primary); }
.ov-chip.is-on { background: var(--dark); color: var(--dark-ink); font-weight: 600; }
.ov-rtable { font-size: 13px; }
.ov-rtable th { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ov-rtable td { padding: 9px 10px; border-bottom: 1px solid var(--line2); }
.ov-rtable tbody tr:hover td { background: var(--bg-hover); }
.ov-oid { font-family: var(--font); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; }
.ov-rtable .ov-avatar { border-radius: 99px; width: 28px; height: 28px; font-size: 10.5px; font-weight: 700; }
.ov-more { border-top: 1px solid var(--line2); color: var(--accent); font-size: 12.5px; }
.ov-live { font-size: 11.5px; }
.ov-fi { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line2); border-radius: 0; }
.ov-fi:first-child { border-top: 0; }
a.ov-fi:hover { background: var(--bg-hover); }
.ov-fi-ic { width: 30px; height: 30px; border: 0; border-radius: 99px; background: var(--acc-tint); color: var(--acc-text); font-size: 14px; }
.ov-fi-ic.k-order { color: var(--acc-text); }
.ov-fi-ic.k-pay, .ov-fi-ic.k-ship { background: var(--success-bg); color: var(--success); }
.ov-fi-ic.k-track { background: #f8dccb; color: #9a4a1c; }
.ov-fi-ic.k-att { background: var(--seg-bg); color: var(--text-secondary); }
.ov-fi-ic.k-sms { background: var(--danger-bg); color: var(--danger); }
.ov-fi-ic.k-edit { background: var(--seg-bg); color: var(--text-secondary); }
[data-theme="dark"] .ov-fi-ic.k-track { background: rgba(240, 140, 90, 0.18); color: #f3a77a; }
.ov-fi-body b { font-size: 13px; }
.ov-fi-body small { font-size: 12px; }
.ov-fi-t { font-size: 12px; }

/* hàng 4–6 */
.ov-today-cell .ov-v2, .ov-goal-head .ov-v2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.ov-week-bar { background: var(--ov-fee); border-radius: 5px 5px 2px 2px; }
.ov-week-bar.is-today { background: var(--acc); }
.ov-todo-row { border-top: 1px solid var(--line2); border-radius: 8px; padding: 9px 6px; }
.ov-todo-row:hover { background: var(--bg-hover); }
.ov-todo-ic { border-radius: 99px; }
.ov-todo-ic.is-accent { background: var(--acc-tint); color: var(--acc-text); }
.ov-todo-ic.is-neutral { background: var(--seg-bg); }
.ov-todo-all { border-top: 1px solid var(--line2); color: var(--accent); }
.ov-meter { height: 6px; border-radius: 9px; background: var(--line2); }
.ov-meter-fill { border-radius: 9px; background: var(--acc-strong); }
.ov-meter-pace { background: var(--text-primary); width: 2px; }
.ov-pl-rows > div, .ov-staff-row, .ov-bar-row, .ov-item, .ov-dl-row { border-top-color: var(--line2); }
.ov-bar { height: 6px; border-radius: 9px; background: var(--line2); }
.ov-bar > span { height: 6px; border-radius: 9px; background: var(--acc); }
.ov-seg.is-profit, .ov-sw.is-profit { background: var(--acc); }
.ov-seg.is-cost, .ov-sw.is-cost { background: var(--ov-flow-2); }
.ov-seg.is-fee, .ov-sw.is-fee { background: var(--ov-fee); }
.ov-holiday { border-color: var(--line2); border-radius: 12px; background: var(--bg-input); }
.ov-holiday.is-soon { border-color: color-mix(in srgb, var(--acc) 60%, transparent); background: var(--acc-tint); }
.ov-pop { border-radius: 14px; box-shadow: var(--sh-pop); }
.ov-empty .empty-state { padding: 3rem 0 2rem; }

@media (max-width: 1180px) {
    .ov-g1 { grid-template-columns: minmax(0, 1fr); }
    .ov-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ov-two.ov-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .ov-g2 { grid-template-columns: minmax(0, 1fr); }
    .ov-big b { font-size: 32px; }
    .ov-big .ov-tabs { margin-left: 0; }
    .ov-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ov-v1 { font-size: 21px; }
}
.ov-period.seg { border: 0; padding: 3px; gap: 2px; background: var(--seg-bg); flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ov-period.seg > a { flex: 0 0 auto; }
.ov-period.seg > a { font-size: 13px; padding: 0 12px; height: 29px; border-radius: 8px; color: var(--text-secondary); }
.ov-period.seg > a:hover { background: transparent; color: var(--text-primary); }
.ov-period.seg > a.is-on { background: var(--dark); color: var(--dark-ink); font-weight: 600; }
.ov-tabs.seg { border: 0; }
.ov-tabs.seg > .ov-tab { border-radius: 8px; height: 25px; padding: 0 10px; font-size: 12px; color: var(--text-secondary); }
.ov-tabs.seg > .ov-tab.is-on { background: var(--dark); color: var(--dark-ink); box-shadow: none; }

/* =========================================================================================
   DANH SÁCH ĐƠN HÀNG (v52) — tiêu đề kiểu "Orders" của video · hàng lọc (Status phân đoạn) · thẻ tổng ·
   bảng Gọn (mặc định) / Thoáng · ngăn xem nhanh bên phải
   ========================================================================================= */
.ds-ph { margin-bottom: 14px; }
.ds-ph p .ti { font-size: 14px; vertical-align: -2px; }
.ds-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ds-bar .ds-st { flex: 0 0 auto; }
.ds-bar .ds-search { flex: 1 1 200px; min-width: 160px; width: auto; height: 35px; padding: 0 12px; }
.ds-bar > .btn, .ds-bar .ds-fbtn { height: 35px; min-height: 35px; font-size: 13px; white-space: nowrap; }
.ds-bar .ds-go { padding: 0 14px; }
.ds-count { margin-left: auto; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; padding-left: 6px; }
.ds-filter { position: relative; }
.ds-fbtn.is-on { border-color: var(--acc-strong); color: var(--text-primary); }
.ds-fbtn b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--dark); color: var(--dark-ink); font-size: 11px; }
.ds-fpanel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: min(660px, 92vw); background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--sh-pop); padding: 14px; }
.ds-fpanel[hidden] { display: none; }
.ds-fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.ds-fgrid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.ds-fgrid select, .ds-fgrid input { width: 100%; min-width: 0; font-size: 13px; padding: 0.42rem 0.6rem; }
.ds-fgrid select { padding-right: 1.8rem; }
.ds-fgrid .is-on { border-color: var(--acc-strong); background-color: var(--acc-tint); color: var(--text-primary); }
.ds-ffoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.ds-ffoot .btn { font-size: 12.5px; min-height: 30px; }
.ds-clear { padding: 0 10px !important; }
.ds-chips { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ship-chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-secondary); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ship-chip b { color: var(--text-primary); }
.ship-chip.is-soon { background: var(--acc-tint); border-color: color-mix(in srgb, var(--acc) 45%, transparent); color: var(--acc-text); }
.ship-chip.is-late { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.ship-chip.is-late b, .ship-chip.is-soon b { color: inherit; }
.ship-chip.is-on { box-shadow: inset 0 0 0 1.5px currentColor; }
@media (max-width: 1750px) { .ds-chips .ship-chip.is-ice .cl, .ds-chips .ship-chip.is-lech .cl, .ds-chips .ship-chip.is-addr .cl { display: none; } }

/* thẻ tổng — như hàng "Products · Below par · Out of stock · Stock value" của video */
.ds-kpis { gap: 14px; margin-bottom: 14px; }
.ds-kpis .metric-card { background: var(--bg-card); border: 1px solid var(--card-line); border-radius: 16px; box-shadow: var(--sh-card); padding: 14px 16px; }
.ds-kpis .metric-card .lbl { font-size: 12.5px; color: var(--text-muted); }
.ds-kpis .metric-card .val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ds-kpis .metric-card .val.success { color: var(--success); }

/* thanh thao tác (tick đơn) + Columns */
.order-bar { height: 46px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--bg-card); box-shadow: var(--sh-card); padding: 0 6px 0 12px; margin-bottom: 12px; }
.order-bar.has-sel { background: var(--acc-tint); border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.order-bar .selection-bar .ob-hint { font-size: 12.5px; color: var(--text-muted); }
.order-bar .selection-bar .actions .btn, .order-bar .ob-cols > .btn { min-height: 30px; font-size: 12.5px; padding: 0 10px; }
.btn-cancel { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

/* bảng — bỏ kẻ ô kiểu bảng tính, chỉ còn đường ngang mảnh như video; mặc định Gọn */
.orders-scroll-wrap.card { padding: 4px 8px !important; border-radius: 18px; }
#ordersTable { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
#ordersTable th, #ordersTable td { border: 0; border-bottom: 1px solid var(--line2); padding: 4px 8px; line-height: 1.3; }
#ordersTable thead th { padding: 9px 8px 8px; font-size: 12.5px; font-weight: 700; color: var(--text-primary); border-bottom: 1px solid var(--border); background: var(--bg-card); }
#ordersTable tbody tr:last-child td { border-bottom: 0; }
#ordersTable tbody tr:nth-child(even) td { background: transparent; }
/* v77: cột Order ID ghim khi cuộn ngang — dòng chẵn (nền trong suốt) cần nền ĐẶC, nếu không chữ các cột cuộn qua lộ đè lên số đơn */
#ordersTable tbody tr:nth-child(even):where(:not([data-row-status]):not([data-rc])) td[data-order-id-col] { background: var(--bg-card); }
/* v53: (bỏ) ô Order ID ở dòng chẵn từng bị ép nền trắng → màu xen kẽ; nay cùng màu với cả dòng */
#ordersTable tbody tr:hover td, #ordersTable tbody tr:hover td[data-order-id-col] { background: var(--row-hover); }
#ordersTable tbody tr.row-selected td, #ordersTable tbody tr.row-selected:hover td,
#ordersTable tbody tr.row-selected td[data-order-id-col] { background: var(--acc-tint); }
#ordersTable tbody tr.drw-sel td, #ordersTable tbody tr.drw-sel td[data-order-id-col] { background: var(--acc-tint); box-shadow: inset 0 0 0 0 transparent; }
#ordersTable td[data-order-id-col] { font-weight: 600; box-shadow: 1px 0 0 var(--line2); }
#ordersTable th[data-order-id-col] { box-shadow: 1px 0 0 var(--border); }
#ordersTable td .mockup-thumb { width: 22px !important; height: 22px !important; border-radius: 5px !important; border: 1px solid var(--line2) !important; }
#ordersTable td img { max-height: 22px !important; }
#ordersTable td .badge { font-size: 11.5px; padding: 0 7px; height: 20px; line-height: 20px; }
#ordersTable td .link-btn, #ordersTable td button { font-size: 12px; line-height: 18px; }
#ordersTable td.cell-editing input, #ordersTable td.cell-editing select { height: 26px; border-radius: 6px; font-size: 12.5px; border: 2px solid var(--acc-strong); }
#ordersTable .tl-badge { border-radius: 999px; }
.oid-copy { font-weight: 600; }
.dr-open { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 4px; border-radius: 7px; border: 1px solid transparent;
    background: transparent; color: var(--text-muted); cursor: pointer; padding: 0 !important; vertical-align: middle; }
.dr-open .ti { font-size: 14px; }
.dr-open:hover { background: var(--acc-tint); color: var(--acc-text); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.row-acts { display: inline-flex; gap: 2px; }
.row-acts .link-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer; padding: 2px 6px !important; border-radius: 7px; color: var(--text-secondary); font-weight: 500; }
.row-acts .link-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.row-acts .ra-del:hover { color: var(--danger); }
.row-acts .ra-t { font-size: 12px; }

/* Thoáng (như video): dòng cao hơn, chữ to hơn, ảnh mockup lớn hơn */
[data-density="comfy"] #ordersTable { font-size: 13.5px; }
[data-density="comfy"] #ordersTable td { padding: 10px 10px; }
[data-density="comfy"] #ordersTable thead th { padding: 11px 10px 10px; }
[data-density="comfy"] #ordersTable td .mockup-thumb { width: 34px !important; height: 34px !important; border-radius: 8px !important; }
[data-density="comfy"] #ordersTable td img { max-height: 34px !important; }
[data-density="comfy"] #ordersTable td .badge { font-size: 12px; height: 22px; line-height: 22px; padding: 0 9px; }
[data-density="comfy"] .dr-open { width: 26px; height: 26px; }

/* ngăn xem nhanh bên phải — như "Order NL-3063" trong video */
.drw-scrim { position: fixed; inset: 0; z-index: 900; background: rgba(28, 26, 20, 0.22); }
.drw-scrim[hidden], .drawer[hidden] { display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 901; width: 400px; max-width: 100vw; background: var(--bg-card); color: var(--text-primary);
    border-left: 1px solid var(--border); box-shadow: -24px 0 60px rgba(40, 30, 10, 0.16); display: flex; flex-direction: column; }
html:not([data-motion="off"]) .drawer:not([hidden]) { animation: ui-slide 0.24s cubic-bezier(.2, .7, .2, 1) both; }
html:not([data-motion="off"]) .drw-scrim:not([hidden]) { animation: ui-fade 0.2s ease-out both; }
.drw-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px; border-bottom: 1px solid var(--line2); }
.drw-h b { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.drw-x { border: 0; background: none; color: var(--text-muted); padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.drw-x:hover { background: var(--bg-hover); color: var(--text-primary); }
.drw-x .ti { font-size: 18px; }
.drw-c { flex: 1; overflow-y: auto; padding: 16px 20px 22px; font-size: 13px; }
.drw-wait { color: var(--text-muted); padding: 20px 0; }
.drw-cust { display: flex; align-items: center; gap: 12px; }
.drw-av { width: 40px; height: 40px; border-radius: 99px; background: #f0c9a8; color: #5b3e22; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.drw-who { flex: 1; min-width: 0; line-height: 1.3; }
.drw-who b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drw-who small { display: block; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drw-st { flex: none; }
.drw-steps { display: flex; align-items: flex-start; margin: 22px 2px 18px; }
.drw-step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 62px; font-size: 11.5px; color: var(--text-muted); text-align: center; flex: none; }
.drw-dot { width: 18px; height: 18px; border-radius: 99px; border: 1.5px solid #cfcbbf; background: var(--bg-card); display: grid; place-items: center; }
.drw-dot .ti { font-size: 11px; }
.drw-step.done .drw-dot { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
.drw-step.cur .drw-dot { border: 2.5px solid var(--acc-strong); box-shadow: 0 0 0 4px var(--acc-tint); }
.drw-step.cur span { color: var(--text-primary); font-weight: 600; }
.drw-ln { flex: 1; height: 1.5px; background: #dcd8cc; margin-top: 9px; }
.drw-ln.done { background: var(--dark); }
.drw-steps.is-cancel { opacity: 0.45; }
.drw-note { border-radius: 10px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 12px; }
.drw-note.is-bad { background: var(--danger-bg); color: var(--danger); }
.drw-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.drw-kv small { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 1px; }
.drw-kv b { font-size: 13.5px; font-weight: 600; }
.drw-kv b.c-bad { color: var(--danger); } .drw-kv b.c-good { color: var(--success); }
.drw-sec { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 20px 0 6px; }
.drw-mini { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.drw-mini:hover { background: var(--acc-tint); }
.drw-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.drw-th { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; border: 1px solid var(--line2); cursor: zoom-in; background: var(--bg-input); }
.drw-th.is-empty { display: grid; place-items: center; color: var(--text-muted); cursor: default; }
.drw-lt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drw-lt1 { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drw-lt small { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drw-num { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.drw-fix { color: #075985 !important; }
[data-theme="dark"] .drw-fix { color: #7dd3fc !important; }
.drw-q { font-weight: 600; flex: none; }
.drw-dl { display: inline-flex; gap: 4px; margin-top: 2px; }
.drw-chip { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 6px; background: var(--success-bg); color: var(--success); }
.drw-addr { line-height: 1.5; color: var(--text-secondary); background: var(--bg-input); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; }
.drw-empty { color: var(--text-muted); padding: 4px 0; }
.drw-tl { margin-top: 8px; border-left: 1.5px solid var(--line2); margin-left: 4px; padding-left: 12px; display: flex; flex-direction: column; gap: 8px; }
.drw-ti { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 12px; position: relative; }
.drw-ti::before { content: ""; position: absolute; left: -16.5px; top: 4px; width: 7px; height: 7px; border-radius: 99px; background: var(--border); }
.drw-ti:first-child::before { background: var(--acc-strong); }
.drw-td { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.drw-tx b { display: block; font-weight: 500; } .drw-tx small { color: var(--text-muted); }
.drw-notes { white-space: pre-wrap; color: var(--text-secondary); }
.drw-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.drw-acts .btn { min-height: 33px; font-size: 12.5px; }

/* ---------- v53: SỬA ĐƠN NGAY TRONG NGĂN + LỊCH SỬ ĐƠN ---------- */
.drawer { width: 460px; }
.drw-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 10px; }
.drw-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 11.5px; font-weight: 500; color: var(--text-muted); }
.drw-f.full, .drw-form .full { grid-column: 1 / -1; }
.drw-form .q4 { grid-column: span 1; }
.drw-form:has(.q4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.drw-form:has(.q4) .drw-f:not(.q4):not(.full) { grid-column: span 2; }
.drw-form:has(.q4) .drw-f.t3:not(.q4):not(.full) { grid-column: span 3; }   /* v82: Personalization cạnh Size */
.drw-f input, .drw-f select, .drw-f textarea, .drw-dzr input { width: 100%; min-width: 0; font-size: 13px; padding: 6px 9px; border-radius: 9px; height: auto; }
.drw-f textarea { resize: vertical; min-height: 38px; line-height: 1.45; }
.drw-f select { padding-right: 1.8rem; }
.drw-f .is-dirty, .drw-dzr .is-dirty { border-color: var(--acc-strong); box-shadow: 0 0 0 3px var(--acc-tint); }
.drw-f .is-bad, .drw-dzr .is-bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.drw-cpa { margin: 4px 0 0 -4px; }
.drw-lcard { border: 1px solid var(--line2); border-radius: 13px; padding: 10px; margin: 6px 0 10px; background: var(--bg-input); }
.drw-lh { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.drw-line .drw-lh { margin: 0; flex: 1; min-width: 0; }
.drw-dz { display: flex; flex-direction: column; gap: 6px; }
.drw-dz-h { font-size: 11.5px; font-weight: 500; color: var(--text-muted); }
.drw-dzr { display: flex; gap: 6px; align-items: center; }
.drw-dzr .drw-chip { flex: none; height: 28px; display: inline-flex; align-items: center; }
.drw-hint { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 9px; border-radius: 10px; background: var(--acc-tint);
    border: 1px dashed color-mix(in srgb, var(--acc) 55%, transparent); font-size: 12px; color: var(--acc-text); }
.drw-hint .btn { min-height: 26px; padding: 0 10px; font-size: 12px; }
.drw-foot { position: sticky; bottom: -22px; margin: 18px -20px -22px; padding: 11px 20px 13px; background: var(--bg-card); border-top: 1px solid var(--line2);
    display: flex; align-items: center; gap: 8px; z-index: 2; }
.drw-foot-t { flex: 1; font-size: 12px; color: var(--text-muted); }
.drw-foot.is-dirty .drw-foot-t { color: var(--warning); font-weight: 600; }
.drw-foot .btn { min-height: 34px; }
.drw-log { list-style: none; margin: 4px 0 0 4px; padding: 0 0 0 14px; border-left: 1.5px solid var(--line2); display: flex; flex-direction: column; gap: 11px; }
.drw-log li { position: relative; font-size: 12.5px; line-height: 1.4; }
.drw-log li::before { content: ""; position: absolute; left: -19.5px; top: 4px; width: 8px; height: 8px; border-radius: 99px; background: var(--bg-card); border: 1.5px solid var(--text-muted); }
.drw-log li.is-edit::before { background: var(--acc-strong); border-color: var(--acc-strong); }
.drw-log li.is-create::before { background: var(--dark); border-color: var(--dark); }
.drw-log-c { color: var(--text-secondary); word-break: break-word; }
.drw-log del { color: var(--text-muted); } .drw-log ins { text-decoration: none; font-weight: 600; color: var(--text-primary); }
.drw-log small { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 1px; }
#ordersTable tbody tr { cursor: pointer; }
#ordersTable tbody tr td[data-col="mockup"], #ordersTable tbody tr td:first-child { cursor: default; }
@media (max-width: 760px) { .drw-form:has(.q4) { grid-template-columns: 1fr 1fr; } .drw-form .q4 { grid-column: span 1; } }
@media (max-width: 760px) {
    .ds-bar { flex-direction: row; align-items: center; }
    .ds-bar .ds-st { width: 100%; overflow-x: auto; scrollbar-width: none; }
    .ds-bar .ds-search { flex: 1 1 100%; width: 100%; }
    .ds-count { margin-left: 0; }
    .drawer { width: 100vw; }
    .ds-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ds-bar .ds-search { flex-basis: 100%; }
}

/* =========================================================================================
   v52 · CÀI ĐẶT — chia tab gạch chân (như video) + thẻ "Giao diện"
   ========================================================================================= */
.st-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { position: relative; flex: 0 0 auto; background: none; border: 0; padding: 9px 2px 11px; margin: 0; font: inherit; font-size: 14px; font-weight: 500;
    color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.st-tab:hover { color: var(--text-primary); }
.st-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: transparent; }
.st-tab:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; border-radius: 6px; }
html[data-st-tab="chung"] .st-tab[data-tab="chung"], html[data-st-tab="don-hang"] .st-tab[data-tab="don-hang"],
html[data-st-tab="ket-noi"] .st-tab[data-tab="ket-noi"], html[data-st-tab="thong-bao"] .st-tab[data-tab="thong-bao"],
html[data-st-tab="giao-dien"] .st-tab[data-tab="giao-dien"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="chung"] .st-tab[data-tab="chung"]::after, html[data-st-tab="don-hang"] .st-tab[data-tab="don-hang"]::after,
html[data-st-tab="ket-noi"] .st-tab[data-tab="ket-noi"]::after, html[data-st-tab="thong-bao"] .st-tab[data-tab="thong-bao"]::after,
html[data-st-tab="giao-dien"] .st-tab[data-tab="giao-dien"]::after { background: var(--text-primary); }

.st-pane { display: none; }
html[data-st-tab="chung"] .st-pane[data-pane="chung"], html[data-st-tab="don-hang"] .st-pane[data-pane="don-hang"],
html[data-st-tab="ket-noi"] .st-pane[data-pane="ket-noi"], html[data-st-tab="thong-bao"] .st-pane[data-pane="thong-bao"],
html[data-st-tab="giao-dien"] .st-pane[data-pane="giao-dien"] { display: block; animation: stIn 0.22s ease backwards; }
@keyframes stIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
html[data-motion="off"] .st-pane { animation: none !important; }

/* trong tab: mục luôn mở — tiêu đề không còn là nút thu gọn */
.st-pane .settings-toggle { cursor: default !important; user-select: text !important; font-size: 15px; margin-bottom: 4px; }
.st-pane .settings-arrow { display: none !important; }
.st-card { padding: 20px 22px; }
.st-card .settings-body > p:first-child { margin-top: 0 !important; }

/* thẻ Giao diện */
.st-sub { margin: -2px 0 16px; }
.st-gd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 30px; align-items: start; }
.st-lbl { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.st-hint { margin: 7px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.st-gd .seg > button { height: 32px; padding: 0 13px; font-size: 13px; }
.st-gd .acc-swatches { gap: 12px; padding: 2px 0 0 2px; }
.st-gd .acc-sw { width: 30px; height: 30px; }
.st-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); cursor: pointer; line-height: 1.4; }
.st-row .tgl { flex: 0 0 auto; }

@media (max-width: 768px) {
    .st-tabs { gap: 18px; margin-top: 0; }
    .st-tab { font-size: 13.5px; }
    .st-card { padding: 16px; }
}

/* =========================================================================================
   v52 · ĐĂNG NHẬP — cùng font / màu / nút với app
   ========================================================================================= */
.login-wrap { background: radial-gradient(900px 520px at 85% -10%, var(--glow), transparent 70%),
    radial-gradient(700px 420px at 0% 110%, var(--glow2), transparent 70%), var(--bg-page); }
.login-card { max-width: 380px; padding: 30px 28px 28px; border-radius: 20px; border: 1px solid var(--card-line); box-shadow: var(--sh-pop); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); margin-bottom: 22px; }
.login-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.login-title { text-align: left; font-size: 25px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px; }
.login-sub { margin: 0 0 20px; color: var(--text-secondary); font-size: 13.5px; }
.login-card input[type="text"], .login-card input[type="password"] { width: 100%; height: 40px; }
.login-card .btn-block { min-height: 40px; margin-top: 4px; font-size: 14px; }
.login-error { border-radius: 10px; }
.dr-hint { font-size: 11px; margin-left: 2px; cursor: help; }

/* ---------- v53: popup Add order ---------- */
.ao-ov { position: fixed; inset: 0; z-index: 950; background: rgba(28, 26, 20, 0.30); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.ao-ov[hidden] { display: none; }
.ao-box { width: 860px; max-width: 100%; background: var(--bg-card); border-radius: 20px; box-shadow: var(--sh-pop); padding: 18px 22px 16px; border: 1px solid var(--card-line); }
html:not([data-motion="off"]) .ao-ov:not([hidden]) .ao-box { animation: ui-pop 0.18s ease-out backwards; }
.ao-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ao-h h2 { margin: 0; font-size: 19px; font-weight: 700; flex: 1; letter-spacing: -0.01em; }
.ao-tabs > a { text-decoration: none; }
.ao-x { min-height: 32px; padding: 0 9px; }
.ao-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.ao-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-secondary); min-width: 0; }
.ao-grid .s2 { grid-column: span 2; } .ao-grid .s3 { grid-column: span 3; } .ao-grid .s4 { grid-column: 1 / -1; }
.ao-grid input, .ao-grid select, .ao-grid textarea { width: 100%; min-width: 0; }
.ao-grid textarea { resize: vertical; }
.ao-locked { pointer-events: none; background-color: var(--seg-bg) !important; }
.ao-hint { font-size: 11.5px; font-weight: 500; color: var(--text-muted); min-height: 14px; }
.ao-hint.is-ok { color: var(--success); } .ao-hint.is-bad { color: var(--danger); }
.ao-msg { border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.ao-msg.is-bad { background: var(--danger-bg); color: var(--danger); } .ao-msg.is-ok { background: var(--success-bg); color: var(--success); }
.ao-f { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ao-tip { flex: 1; color: var(--text-muted); font-size: 12px; }
body.ao-open { overflow: hidden; }
@media (max-width: 760px) {
    .ao-ov { padding: 0; }
    .ao-box { border-radius: 0; min-height: 100%; padding: 14px; }
    .ao-grid { grid-template-columns: 1fr 1fr; } .ao-grid .s2, .ao-grid .s3, .ao-grid .s4 { grid-column: 1 / -1; }
    .ao-tip { display: none; }
}

/* ---------- v53: BurgerPrints gọn hơn ---------- */
.bp-qf { margin: 0 0 10px; }
.bp-item { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 6px; }
.bp-item:last-of-type { margin-bottom: 2px; }
.bp-item .bp-thumbs { margin: 0; flex-wrap: nowrap; gap: 4px; flex: none; }
.bp-c-items .bp-item .bp-th { width: 38px; font-size: 0; }
.bp-c-items .bp-item .bp-th > img, .bp-c-items .bp-item .bp-th > .bp-th-e, .bp-c-items .bp-item .bp-th.try > svg { width: 38px; height: 38px; border-radius: 8px; font-size: 0.9rem; }
.bp-item-t { min-width: 0; flex: 1; }
.bp-item-t .bp-li { font-size: 13px; font-weight: 600; max-width: 340px; }
.bp-item-t .bp-li-sub { margin: 1px 0 3px; }
.bp-item-t .bp-kinds { margin: 0; }
.bp-dd.is-chip { display: inline-flex; padding: 2px 4px 2px 9px; border-radius: 999px; margin: 3px 0 0; font-size: 12px; font-weight: 600; gap: 5px; }
.bp-dd.is-chip .btn { min-height: 22px; padding: 0 8px; font-size: 11.5px; border-radius: 999px; }
.bp-steps { display: flex; align-items: center; width: 150px; }
.bp-steps i { width: 10px; height: 10px; border-radius: 99px; border: 1.5px solid #cfcbbf; background: var(--bg-card); flex: none; }
.bp-steps i.d { background: var(--dark); border-color: var(--dark); }
.bp-steps i.c { border: 2.5px solid var(--acc-strong); background: var(--acc); }
.bp-steps b { flex: 1; height: 1.5px; background: #dcd8cc; }
.bp-steps b.d { background: var(--dark); }
[data-theme="dark"] .bp-steps i { border-color: #57544b; } [data-theme="dark"] .bp-steps b { background: #3a3832; }
[data-theme="dark"] .bp-steps b.d { background: var(--dark); }
.bp-steps-l { display: flex; justify-content: space-between; width: 158px; margin: 3px 0 3px -4px; font-size: 10.5px; color: var(--text-muted); }
.bp-st-txt { display: block; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.bp-table .bp-track { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.bp-1l { white-space: nowrap; }
.bp-table td { padding-top: 10px; padding-bottom: 10px; }
.bp-table tr[hidden] { display: none; }
.bp-table td:first-child { max-width: 230px; }
.bp-table td:first-child .bp-muted { white-space: normal; }
.bp-item-t .bp-li { max-width: 280px; }
.bp-table .bp-1l { font-size: 11.5px; }
/* thẻ số liệu đầu trang BurgerPrints: 1 hàng gọn (như thẻ KPI video) */
.bp-top { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(240px, 1.3fr) auto; gap: 12px; align-items: stretch; }
.bp-top .bp-stat { min-width: 0; padding: 12px 14px; }
.bp-top .bp-import { max-width: none; }
.bp-stat-k { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-weight: 500; }
.bp-stat-v { font-size: 20px; }
.bp-top .bp-dash { align-self: start; }
@media (max-width: 1200px) { .bp-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bp-top .bp-dash { justify-self: start; } }
.bp-steps { width: 128px; } .bp-steps-l { width: 136px; }
.bp-item-t .bp-li { max-width: 250px; }
.bp-table td.bp-acts { width: 92px; }
.bp-table td.bp-acts .btn { white-space: normal; line-height: 1.2; padding: 4px 8px; min-height: 26px; font-size: 11.5px; text-align: center; }
.bp-table td:first-child .cb-mono, .bp-table td:first-child .cb-mono.bp-muted { white-space: nowrap; }
.bp-table td:first-child { min-width: 150px; }

/* ---------- v53: Khách hàng ---------- */
.kh-bar { align-items: center; }
.kh-bar input[type="search"] { flex: 0 1 380px; min-width: 220px; }
.kh-count { margin-left: auto; color: var(--text-muted); font-size: 13px; }
.kh-card { padding: 4px 10px; }
.kh-table td { vertical-align: middle; }
.kh-row { cursor: pointer; }
.kh-row:hover td { background: var(--row-hover); }
.kh-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.kh-who small { display: block; color: var(--text-muted); font-size: 11.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-u { font-weight: 600; color: var(--text-primary); }
.kh-av { width: 34px; height: 34px; font-size: 12px; }
.kh-av-lg { width: 48px; height: 48px; font-size: 16px; }
.kh-chip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; margin: 1px 3px 1px 0; border-radius: 99px; background: var(--seg-bg); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.kh-thumbs { display: flex; gap: 4px; align-items: center; }
.kh-thumbs img, .kh-noimg { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line2); background: var(--bg-input); }
.kh-noimg { display: inline-grid; place-items: center; font-weight: 700; color: var(--text-muted); font-size: 13px; }
.kh-noimg-lg { width: 60px; height: 60px; font-size: 18px; flex: none; }
.kh-th { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line2); flex: none; }
.kh-muted { color: var(--text-muted); font-size: 12px; }
.kh-pages { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; gap: 8px; flex-wrap: wrap; }
.kh-head { display: flex; gap: 12px; align-items: center; }
.kh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kh-kpis .card { margin: 0; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.kh-kpis small { color: var(--text-muted); font-size: 12px; }
.kh-kpis b { font-size: 18px; font-weight: 700; }
.kh-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.kh-pc { display: flex; gap: 10px; border: 1px solid var(--line2); border-radius: 14px; padding: 10px; background: var(--bg-input); min-width: 0; }
.kh-pc img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex: none; cursor: zoom-in; border: 1px solid var(--line2); }
.kh-pc > div { min-width: 0; }
.kh-pc b { display: block; font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kh-pc small { display: block; color: var(--text-muted); font-size: 11.5px; margin: 2px 0 4px; }
.kh-eye { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--text-secondary); }
.kh-eye:hover { background: var(--acc-tint); color: var(--acc-text); }
@media (max-width: 760px) { .kh-kpis { grid-template-columns: 1fr 1fr; } .kh-table th:nth-child(3), .kh-table td:nth-child(3), .kh-table th:nth-child(6), .kh-table td:nth-child(6) { display: none; } }
.kh-table th.num, .kh-table td.num { text-align: right; }

/* ---------- v53: ⚠️ Vero (VeRO / Trademark) — Ảnh Mockup + Cài đặt ---------- */
.vero-badge { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 8px; border-radius: 99px; background: var(--warning-bg); color: var(--warning); font-size: 11.5px; font-weight: 600; line-height: 1.6; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.vero-kw { display: inline-block; margin: 1px 3px 1px 0; padding: 0 7px; border-radius: 99px; background: var(--warning-bg); color: var(--warning); font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.mk-act { display: flex; align-items: center; gap: 10px 14px; margin-top: 10px; flex-wrap: wrap; }
.mk-act-tip { color: var(--text-muted); font-size: 12px; flex: 1; min-width: 220px; }
.mk-act-tip .vero-badge { margin-top: 0; }
.vero-kept { border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--warning-bg); color: var(--warning); font-size: 13px; }
.mk-search { display: flex; gap: 6px; align-items: center; margin-bottom: 0.6rem; flex-wrap: wrap; }
.mk-search input[type="text"] { flex: 1; min-width: 180px; }
.vero-filter { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line2); background: var(--bg-card); color: var(--warning); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.vero-filter:hover { background: var(--warning-bg); }
.vero-filter.is-on { background: var(--warning-bg); border-color: transparent; }
.mk-log { margin-bottom: 2px; }
.mk-log.is-bad { color: var(--danger); } .mk-log.is-warn { color: var(--warning); }
.vero-box { width: 680px; }
.vero-sub { margin: -4px 0 10px; color: var(--text-secondary); font-size: 13px; }
.vero-tbl-wrap { max-height: 52vh; overflow: auto; border: 1px solid var(--line2); border-radius: 12px; }
.vero-tbl { margin: 0; }
.vero-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-card); }
.vero-tbl td.vero-t { max-width: 330px; overflow-wrap: anywhere; font-size: 13px; }
/* Cài đặt */
.vero-intro { font-size: 0.82rem; color: var(--text-secondary); margin-top: -0.3rem; }
.vero-stats { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.vero-stats span { padding: 3px 10px; border-radius: 99px; background: var(--seg-bg); font-size: 12px; color: var(--text-secondary); }
.vero-stats b { color: var(--text-primary); }
.vero-try { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.vero-try input { flex: 1; min-width: 220px; max-width: 460px; }
.vero-try-out { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.vero-try-out.is-hit { color: var(--warning); } .vero-try-out.is-ok { color: var(--success); }
.vero-list { margin-top: 12px; font-size: 12.5px; }
.vero-list summary { cursor: pointer; color: var(--text-secondary); font-weight: 600; padding: 4px 0; }
.vero-cat { padding: 6px 0; border-top: 1px solid var(--line2); color: var(--text-secondary); line-height: 1.6; }
.vero-cat b { display: block; color: var(--text-primary); font-size: 12px; }
.vero-cat .is-off { text-decoration: line-through; color: var(--text-muted); }

/* ---------- v53: Tài khoản chia tab ---------- */
html[data-st-tab="danh-sach"] .st-tab[data-tab="danh-sach"], html[data-st-tab="phan-cong"] .st-tab[data-tab="phan-cong"],
html[data-st-tab="phan-quyen"] .st-tab[data-tab="phan-quyen"], html[data-st-tab="luong"] .st-tab[data-tab="luong"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="danh-sach"] .st-tab[data-tab="danh-sach"]::after, html[data-st-tab="phan-cong"] .st-tab[data-tab="phan-cong"]::after,
html[data-st-tab="phan-quyen"] .st-tab[data-tab="phan-quyen"]::after, html[data-st-tab="luong"] .st-tab[data-tab="luong"]::after { background: var(--text-primary); }
html[data-st-tab="danh-sach"] .st-pane[data-pane="danh-sach"], html[data-st-tab="phan-cong"] .st-pane[data-pane="phan-cong"],
html[data-st-tab="phan-quyen"] .st-pane[data-pane="phan-quyen"], html[data-st-tab="luong"] .st-pane[data-pane="luong"] { display: block; animation: stIn 0.22s ease backwards; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tk-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--seg-bg); font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.tk-msg { background: var(--accent-bg); color: var(--accent); border-radius: 10px; padding: 0.6rem 1rem; margin-bottom: 1rem; font-size: 0.85rem; }
.tk-card { padding: 18px 20px; }
.tk-card .card-title { font-size: 15px; }
.tk-card form .field-label { margin-top: 8px; }
.tk-card form select, .tk-card form input[type="text"], .tk-card form input[type="number"] { width: 100%; }
.tk-card form .btn-block { margin-top: 12px; }
.tk-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tk-seg b { font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.tk-seg > button.is-on b { color: inherit; }
.tk-search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg-input); min-width: 240px; flex: 0 1 320px; color: var(--text-muted); }
.tk-search input { border: 0 !important; background: transparent !important; padding: 0 !important; box-shadow: none !important; height: 100%; flex: 1; min-width: 0; outline: none; }
.tk-search:focus-within { border-color: var(--text-secondary); }
.tk-tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tk-table td { vertical-align: middle; }
.tk-table th.num, .tk-table td.num { text-align: right; white-space: nowrap; }
.tk-who { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.tk-av { width: 34px; height: 34px; font-size: 12px; }
.tk-av.is-none { background: var(--seg-bg); color: var(--text-muted); }
.tk-name { display: block; font-weight: 600; color: var(--text-primary); }
.tk-who small { display: block; color: var(--text-muted); font-size: 11.5px; }
.tk-role { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--seg-bg); color: var(--text-secondary); white-space: nowrap; }
.tk-role.is-admin { background: var(--accent-bg); color: var(--accent); }
.tk-role.is-manager { background: var(--success-bg); color: var(--success); }
.tk-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin: 1px 3px 1px 0; border-radius: 99px; background: var(--seg-bg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tk-warn { color: var(--warning); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tk-muted { color: var(--text-muted); font-size: 12.5px; }
.tk-perm { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.tk-perm.is-custom { color: var(--warning); font-weight: 600; }
.tk-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.tk-acts { white-space: nowrap; text-align: right; }
.tk-acts form { display: inline; }
.tk-act { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; padding: 0; }
.tk-act:hover { background: var(--seg-bg); color: var(--text-primary); }
.tk-act.is-danger:hover { background: var(--danger-bg); color: var(--danger); }
/* v114: tài khoản đã khoá (xoá mềm) */
.tk-off { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--bg-card); }
.tk-off summary { cursor: pointer; font-weight: 600; font-size: 0.86rem; display: flex; align-items: center; gap: 6px; }
.tk-off summary small { font-weight: 400; color: var(--text-muted); }
.tk-off-t { margin-top: 8px; font-size: 0.84rem; }
.tk-off-t form { display: inline; }
.tk-act:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; }
.tk-act:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.tk-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }
.tk-foot, .tk-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 10px 0 0; }
.tk-card > .tk-note:first-of-type { margin-top: -2px; }
.tk-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tk-team { border: 1px solid var(--line2); border-radius: 14px; padding: 12px; background: var(--bg-input); }
.tk-team.is-none { border-style: dashed; background: transparent; }
.tk-team-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tk-team-h b { display: block; font-size: 13.5px; }
.tk-team-h small { display: block; font-size: 11.5px; color: var(--text-muted); }
.tk-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tk-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tk-grid3 > .card, .tk-grid2 > .card { margin: 0; }
.tk-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin-top: 12px; }
.tk-pm { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); cursor: pointer; }
.tk-pm:hover { background: var(--row-hover); }
.tk-pm:has(input:checked) { border-color: var(--text-secondary); }
.tk-pm input { margin-top: 3px; flex: none; }
.tk-pm small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.tk-f { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.tk-f .tk-note { flex: 1; margin: 0; }
.tk-box { width: 640px; }
.tk-box.is-sm { width: 440px; }
.tk-cgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-auto { display: flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 10px; border: 1px dashed var(--border); border-radius: 10px; font-size: 13px; color: var(--text-secondary); font-weight: 400; }
@media (max-width: 1100px) { .tk-grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
    .tk-grid3, .tk-grid2 { grid-template-columns: 1fr; }
    .tk-cgrid { grid-template-columns: 1fr 1fr; }
    .tk-cgrid .s2 { grid-column: 1 / -1; }
    .tk-search { flex: 1 1 100%; min-width: 0; }
    .tk-table th:nth-child(5), .tk-table td:nth-child(5), .tk-table th:nth-child(6), .tk-table td:nth-child(6),
    .tk-table th:nth-child(8), .tk-table td:nth-child(8) { display: none; }
}

/* ---------- v53: Tool › Mã 2FA ---------- */
.tf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: none; }
.tf-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--card-line); font-size: 13px; color: var(--text-secondary); min-width: 0; }
.tf-steps li > b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 99px; background: var(--dark); color: var(--dark-ink); font-size: 12px; flex: none; }
.tf-steps li > span { display: block; line-height: 1.45; }
.tf-steps li > span .ti { margin-right: 4px; vertical-align: -2px; }
.tf-steps li b { color: var(--text-primary); }
.tf-steps li > b { color: var(--dark-ink); }
.tf-pend { border: 1px solid transparent; background: var(--warning-bg); padding: 14px 16px; }
.tf-pend-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--warning); font-size: 14px; }
.tf-pend-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--warning); color: var(--bg-card); font-size: 11.5px; font-weight: 700; }
.tf-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--warning); box-shadow: 0 0 0 0 var(--warning); animation: tfPulse 1.6s ease-out infinite; }
@keyframes tfPulse { 0% { box-shadow: 0 0 0 0 rgba(143, 82, 14, 0.45); } 100% { box-shadow: 0 0 0 9px rgba(143, 82, 14, 0); } }
html[data-motion="off"] .tf-dot { animation: none; }
.tf-pend-list { display: flex; flex-direction: column; gap: 8px; }
.tf-req { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-card); flex-wrap: wrap; }
.tf-req-t { flex: 1; min-width: 180px; font-size: 13.5px; }
.tf-req-t small { display: block; color: var(--text-muted); font-size: 12px; }
.tf-card { padding: 18px 20px; }
.tf-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tf-count { font-size: 12.5px; color: var(--text-muted); }
.tf-table td { vertical-align: middle; height: 58px; }
.tf-acc { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.tf-acc small { display: block; color: var(--text-muted); font-size: 11.5px; }
.tf-label { font-weight: 700; letter-spacing: 0.01em; }
.tf-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--seg-bg); color: var(--text-secondary); flex: none; font-size: 15px; }
.tf-ic.is-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 24px; }
.tf-secret, .tf-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.tf-secret { font-size: 13px; padding: 3px 8px; border-radius: 8px; background: var(--seg-bg); color: var(--text-primary); white-space: nowrap; }
.tf-sec-cell { white-space: nowrap; }
.tf-eye { vertical-align: middle; }
.tf-code-cell { white-space: nowrap; min-width: 230px; }
.tf-code-cell > * { vertical-align: middle; }
.tf-code { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-primary); margin-right: 8px; font-variant-numeric: tabular-nums; }
.tf-ring { --p: 1; position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; margin-right: 4px;
    background: conic-gradient(var(--text-primary) calc(var(--p) * 360deg), var(--seg-bg) 0); }
.tf-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 99px; background: var(--bg-card); }
.tf-ring > span { position: relative; font-size: 10px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tf-ring.is-low { background: conic-gradient(var(--danger) calc(var(--p) * 360deg), var(--seg-bg) 0); }
.tf-copy.is-ok { color: var(--success); background: var(--success-bg); }
.tf-left { margin-left: 6px; font-size: 12px; color: var(--warning); font-weight: 600; }
.tf-state { font-size: 12.5px; color: var(--text-muted); }
.tf-state.is-wait { color: var(--warning); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.tf-state.is-bad { color: var(--danger); font-weight: 600; white-space: normal; }
.tf-spin { animation: tfSpin 0.9s linear infinite; display: inline-block; }
@keyframes tfSpin { to { transform: rotate(360deg); } }
.tf-sm { min-height: 28px; height: 28px; padding: 0 10px; font-size: 12px; }
.tf-get { white-space: nowrap; }
.tf-wait { color: var(--text-muted); }
.tf-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 10px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.tf-empty b { color: var(--text-primary); font-size: 15px; }
.tf-st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--seg-bg); color: var(--text-secondary); white-space: nowrap; }
.tf-st.is-pending { background: var(--warning-bg); color: var(--warning); }
.tf-st.is-approved { background: var(--success-bg); color: var(--success); }
.tf-st.is-denied { background: var(--danger-bg); color: var(--danger); }
.tf-hist td { font-size: 13px; }
.tf-hist th.num, .tf-hist td.num { text-align: right; }
.tf-audit { margin-top: 12px; font-size: 12.5px; }
.tf-audit summary { cursor: pointer; color: var(--text-secondary); font-weight: 600; }
.tf-audit ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; color: var(--text-secondary); }
.tf-who { margin-top: 12px; }
.tf-who-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tf-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line2); font-size: 12.5px; cursor: pointer; }
.tf-pick:has(input:checked) { border-color: var(--text-primary); background: var(--seg-bg); }
.tf-pick small { color: var(--text-muted); font-size: 10.5px; font-weight: 600; }
.tf-adv { margin-top: 12px; font-size: 12.5px; }
.tf-adv summary { cursor: pointer; color: var(--text-secondary); margin-bottom: 8px; }
@media (max-width: 760px) {
    .tf-steps { grid-template-columns: 1fr; }
    .tf-code { font-size: 19px; }
    .tf-table th:nth-child(2), .tf-table td:nth-child(2) { display: none; }
    .tf-code-cell { min-width: 0; white-space: normal; }
}
/* v53: cột Tiền BP — số tiền không xuống dòng, dòng chi tiết (hàng + phí label BP · giá label → Cost) được xuống dòng để bảng không tràn */
.bp-c-money { white-space: nowrap; min-width: 112px; }
.bp-c-money .bp-1l, .bp-c-money .bp-cost { white-space: normal; max-width: 150px; margin-left: auto; line-height: 1.35; }

/* ---------- v54: Danh sách — cảnh báo địa chỉ nằm ở cột Note, ô Order ID là chỗ bấm mở ngăn ---------- */
.ab-n { display: inline-block; margin-right: 5px; font-size: 11px; font-weight: 700; line-height: 17px; padding: 0 7px; border-radius: 99px; white-space: nowrap; vertical-align: 1px; cursor: help; }
#ordersTable td.ds-note .ab-i { margin-right: 4px; }
#ordersTable td[data-quick-preview] { cursor: pointer; }
#ordersTable td[data-quick-preview]:focus-visible { outline: 2px solid var(--text-primary); outline-offset: -2px; }

/* ---------- v54: popup Thêm đơn — tab Import từ eBay / Import CSV ---------- */
.ao-box.is-wide { width: 1120px; }
.ao-tabs > button { font: inherit; }
.ao-pane[hidden] { display: none !important; }
.imp { font-size: 13px; }
.imp-intro { margin: -4px 0 12px; color: var(--text-secondary); font-size: 12.5px; line-height: 1.5; }
.imp-intro code { font-size: 11.5px; }
.imp-dl { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-weight: 600; white-space: nowrap; }
.imp-drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 22px 18px; border: 1.5px dashed var(--border); border-radius: 16px;
    background: var(--bg-input); cursor: pointer; }
.imp-drop:hover, .imp-drop:focus-within { border-color: var(--text-secondary); }
.imp-drop > .ti { font-size: 26px; color: var(--text-secondary); }
.imp-drop b { display: block; font-size: 14px; }
.imp-drop small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.imp-drop input[type="file"] { margin-left: auto; max-width: 300px; font-size: 12.5px; }
.imp-new { background: var(--acc-tint); color: var(--text-primary); }
.imp-dup { background: var(--warning-bg); color: var(--warning); }
.imp-ids { margin-top: 4px; font-size: 11.5px; word-break: break-all; opacity: 0.9; max-height: 60px; overflow: auto; }
.imp-am { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.imp-h { font-size: 12.5px; color: var(--text-secondary); margin: 2px 0 8px; }
.imp-tbl { max-height: 46vh; overflow: auto; border: 1px solid var(--line2); border-radius: 12px; }
.imp-tbl .data-table { margin: 0; font-size: 12.5px; }
.imp-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-card); }
.imp-tbl th.num, .imp-tbl td.num { text-align: right; }
.imp-tbl tr.is-dup td { opacity: 0.55; }
.imp-nw { white-space: nowrap; }
.ao-imp.is-busy { opacity: 0.55; pointer-events: none; }
.ao-imp.is-busy::after { content: "Đang xử lý…"; display: block; text-align: center; padding: 8px; font-weight: 600; color: var(--text-secondary); }
.imp-page { padding: 18px 20px; }
.imp-banner a { margin-left: 8px; font-weight: 600; }
@media (max-width: 760px) {
    .imp-am { grid-template-columns: 1fr; }
    .imp-drop { flex-wrap: wrap; }
    .imp-drop input[type="file"] { margin-left: 0; max-width: 100%; }
}
/* v54: nút ₫ / $ */
.cur-seg > button { font: inherit; font-size: 12.5px; font-weight: 600; }
.ds-cur { display: flex; flex: 0 0 auto; }

/* ===== v54: Tổng quan chia 4 tab (dùng chung khung .st-tabs của Cài đặt; tab đang mở = html[data-st-tab]) ===== */
html[data-st-tab="tong-quan"] .st-tab[data-tab="tong-quan"], html[data-st-tab="viec-can-lam"] .st-tab[data-tab="viec-can-lam"],
html[data-st-tab="don-moi"] .st-tab[data-tab="don-moi"], html[data-st-tab="lai-lo"] .st-tab[data-tab="lai-lo"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="tong-quan"] .st-tab[data-tab="tong-quan"]::after, html[data-st-tab="viec-can-lam"] .st-tab[data-tab="viec-can-lam"]::after,
html[data-st-tab="don-moi"] .st-tab[data-tab="don-moi"]::after, html[data-st-tab="lai-lo"] .st-tab[data-tab="lai-lo"]::after { background: var(--text-primary); }
html[data-st-tab="tong-quan"] .st-pane[data-pane="tong-quan"], html[data-st-tab="viec-can-lam"] .st-pane[data-pane="viec-can-lam"],
html[data-st-tab="don-moi"] .st-pane[data-pane="don-moi"], html[data-st-tab="lai-lo"] .st-pane[data-pane="lai-lo"] { display: block; animation: stIn 0.22s ease backwards; }
.ov-ptabs { margin: 0 0 16px; }
.tab-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; margin-left: 4px; border-radius: 99px;
    background: var(--seg-bg); font-size: 11px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tab-n.is-bad { background: var(--danger-bg); color: var(--danger); }
.ov-pane-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.ov-pane-empty { text-align: center; padding: 28px 12px; }
.ov-pop-g { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 10px 0 2px; }
.ov-pop-g:first-of-type { margin-top: 2px; }
.ov-flow { display: flex; flex-direction: column; }
.ov-todo-slow { cursor: default; }
.ov-todo-slow .ov-todo-go { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; }
.ov-todo-slow .ov-todo-go:hover { background: var(--seg-bg); color: var(--text-primary); }
.ov-slow-id { color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 2px; white-space: nowrap; }
.ov-slow-id:hover { color: var(--text-primary); text-decoration-color: currentColor; }
@media print { .ov-pane { display: block !important; animation: none !important; } .ov-pane-h .ov-period { display: none; } }

/* v54: mở từ thông báo "xin mã 2FA" → tô sáng đúng yêu cầu */
.tf-req.is-focus { box-shadow: 0 0 0 2px var(--warning); animation: tfFocus 1.2s ease 2; }
@keyframes tfFocus { 50% { box-shadow: 0 0 0 5px var(--warning); } }
html[data-motion="off"] .tf-req.is-focus { animation: none; }

/* ===== v54: Ảnh Mockup chia 4 tab ===== */
html[data-st-tab="upload"] .st-tab[data-tab="upload"], html[data-st-tab="da-luu"] .st-tab[data-tab="da-luu"],
html[data-st-tab="import-cu"] .st-tab[data-tab="import-cu"], html[data-st-tab="dong-bo"] .st-tab[data-tab="dong-bo"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="upload"] .st-tab[data-tab="upload"]::after, html[data-st-tab="da-luu"] .st-tab[data-tab="da-luu"]::after,
html[data-st-tab="import-cu"] .st-tab[data-tab="import-cu"]::after, html[data-st-tab="dong-bo"] .st-tab[data-tab="dong-bo"]::after { background: var(--text-primary); }
html[data-st-tab="upload"] .st-pane[data-pane="upload"], html[data-st-tab="da-luu"] .st-pane[data-pane="da-luu"],
html[data-st-tab="import-cu"] .st-pane[data-pane="import-cu"], html[data-st-tab="dong-bo"] .st-pane[data-pane="dong-bo"] { display: block; animation: stIn 0.22s ease backwards; }
.mk-tabs { margin: 0 0 16px; }

/* ===== v55: Ảnh Mockup — hộp "Kiểm tra trước khi upload" (trùng Title + VeRO) ===== */
.vero-box { width: 900px; max-width: calc(100vw - 32px); }
.mk-chk-body { max-height: calc(100vh - 230px); overflow: auto; margin: 0 -4px; padding: 0 4px; }
.mk-chk-body > section + section { margin-top: 16px; }
.mk-chk-h { font-size: 14px; font-weight: 700; margin: 2px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mk-chk-def { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--warning-bg); color: var(--warning); }
.mk-dup { border: 1px solid var(--line2); border-radius: 14px; padding: 12px; margin: 10px 0; background: var(--bg-input); }
.mk-dup-h { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.mk-dup-h b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mk-dup-k { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.mk-dup-k.is-bad { background: var(--danger-bg); color: var(--danger); }
.mk-dup-k.is-warn { background: var(--warning-bg); color: var(--warning); }
.mk-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-side { border-radius: 12px; background: var(--bg-card); padding: 10px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line2); min-width: 0; }
.mk-side.is-new { border: 2px solid var(--acc-strong); }
.mk-side .t { font-size: 12.5px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.mk-side .t small { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 3px; }
.mk-side .k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.mk-dup-img { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--seg-bg); display: grid; place-items: center;
    border: 1px solid var(--line2); cursor: zoom-in; }
.mk-dup-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-dup-img.is-none { cursor: default; font-size: 11px; color: var(--text-muted); text-align: center; padding: 6px; }
.mk-dup-img.is-none::after { content: "Không xem trước được"; }
span.mk-dup-img.is-none::after { content: none; }
.mk-ch { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.mk-ch label { display: flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 12.5px;
    background: var(--bg-card); cursor: pointer; }
.mk-ch label.on { border-color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); font-weight: 600; }
.mk-ch label input { margin: 0; accent-color: var(--text-primary); }
.mk-dup-own { font-size: 12px; color: var(--text-muted); }
@media (max-width: 640px) { .mk-pair { grid-template-columns: 1fr; } .mk-dup-img { width: 72px; height: 72px; } }

/* ===== v55: tiêu đề cột (header) của MỌI bảng in đậm, màu chữ chính — giống bảng Danh sách đơn ===== */
table thead th, table.data-table th, .ov-rtable th, .cb-tbl th, .bp-dz-table th, .bl-table th, #buylabel .bl-pkg-table thead th {
    font-weight: 700; color: var(--text-primary);
}

/* ===== v55: "Số liệu của: …" (Báo cáo + Tổng quan) ===== */
.rp-pick { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 10px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-card); font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.rp-pick select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--text-primary); padding: 4px 22px 4px 2px; height: 30px; min-width: 0; max-width: 170px; box-shadow: none; }
.rp-pick.is-on { border-color: var(--acc-strong); background: var(--acc-tint); color: var(--acc-text); }
.rp-pick.is-on select { color: var(--acc-text); }
.rp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.rp-note { font-size: 13px; color: var(--text-secondary); }
.rp-note a { color: var(--accent); }
/* v65: quyền chỉ Admin — không làm mờ cả dòng (chữ khó đọc, tương phản 2,3); viền nét đứt + 🔒, chữ đủ tương phản */
.tk-pm.is-dis { opacity: 1; border-style: dashed; background: var(--bg-page); cursor: not-allowed; }
.tk-pm.is-dis b, .tk-pm.is-dis small { color: var(--text-secondary); }
@media (max-width: 760px) { .rp-pick .rp-l { display: none; } }

.tk-sa-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tk-sa { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tk-sa-c { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 99px; font-size: 13px; cursor: pointer; }
.tk-sa-c:has(input:checked) { border-color: var(--text-primary); font-weight: 600; }
#adminSaCard { margin-top: 14px; }

/* ===== v55: Trợ lý CSKH (AI) — nút nổi + khung chat (theo kiểu ảnh mẫu: nút tròn góc phải, khung bo tròn, 👍👎) ===== */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 880; width: 56px; height: 56px; border-radius: 99px; border: 2px solid var(--dark);
    background: var(--bg-card); color: var(--text-primary); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab:focus-visible { outline: 3px solid var(--acc-strong); outline-offset: 3px; }
.ai-fab .ti { font-size: 27px; }
.ai-fab.is-open { background: var(--dark); color: var(--dark-ink); }
.ai-panel { position: fixed; right: 22px; bottom: 90px; z-index: 890; width: 410px; max-width: calc(100vw - 24px); height: min(700px, calc(100vh - 110px));
    background: var(--bg-card); border-radius: 20px; box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28); border: 1px solid var(--card-line);
    display: flex; flex-direction: column; overflow: hidden; font-size: 13px; }
.ai-panel[hidden] { display: none; }
html:not([data-motion="off"]) .ai-panel:not([hidden]) { animation: ui-pop 0.18s ease-out; }
.ai-h { background: var(--dark); color: var(--dark-ink); padding: 12px 10px 12px 14px; display: flex; gap: 8px; align-items: center; }
.ai-av { width: 36px; height: 36px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); display: grid; place-items: center; flex: none; }
:root[data-theme="dark"] .ai-av { background: rgba(0, 0, 0, 0.10); }
.ai-av .ti { font-size: 20px; }
.ai-ht { flex: 1; min-width: 0; }
.ai-ht b { display: block; font-size: 14.5px; }
.ai-ht small { display: block; opacity: 0.82; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); flex: none; }
:root[data-theme="dark"] .ai-pill { background: rgba(0, 0, 0, 0.10); }
.ai-hb { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; flex: none; }
.ai-hb:hover { background: rgba(127, 127, 127, 0.18); }
.ai-hb .ti { font-size: 17px; }
.ai-body { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-page); }
.ai-intro { background: var(--bg-card); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; line-height: 1.5; color: var(--text-secondary); }
.ai-intro b { color: var(--text-primary); }
.ai-intro ul { margin: 6px 0 0; padding-left: 18px; }
.ai-me { align-self: flex-end; max-width: 88%; background: var(--dark); color: var(--dark-ink); border-radius: 16px 16px 4px 16px; padding: 9px 12px; line-height: 1.45; }
.ai-me small { display: block; opacity: 0.72; font-size: 11px; margin-bottom: 2px; }
.ai-me-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-ai { align-self: flex-start; width: 100%; background: var(--bg-card); border: 1px solid var(--line2); border-radius: 16px 16px 16px 4px; padding: 10px 12px; line-height: 1.5; }
.ai-lb { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.ai-sum { color: var(--text-primary); }
.ai-ask { font-weight: 700; margin-top: 8px; color: var(--text-primary); }
.ai-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-op { border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; background: var(--bg-card);
    color: var(--text-primary); cursor: pointer; }
.ai-op:hover { border-color: var(--text-primary); }
.ai-op.is-other { color: var(--text-secondary); font-weight: 500; }
.ai-ans { border-radius: 12px; border: 1px solid var(--line2); padding: 8px 10px; margin-top: 8px; background: var(--bg-input); }
.ai-ans p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-primary); font-size: 13px; }
.ai-ans-h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; margin-bottom: 4px; color: var(--text-secondary); }
.ai-cp { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 11.5px; font-weight: 600; border: 1px solid var(--border);
    border-radius: 8px; padding: 2px 8px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.ai-note { margin-top: 8px; font-size: 12px; color: var(--warning); }
.ai-tw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-twb { font: inherit; font-size: 11.5px; font-weight: 600; border: 0; border-radius: 99px; padding: 4px 10px; background: var(--seg-bg); color: var(--text-primary); cursor: pointer; }
.ai-twb:hover { background: var(--line2); }
.ai-err { align-self: stretch; background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: 9px 12px; line-height: 1.45; }
.ai-err a { color: inherit; font-weight: 700; }
.ai-muted { color: var(--text-muted); font-size: 12px; }
.ai-ro { text-align: center; }
.ai-typing { align-self: flex-start; color: var(--text-muted); font-size: 12px; display: flex; gap: 4px; align-items: center; }
.ai-typing span { width: 6px; height: 6px; border-radius: 99px; background: var(--text-muted); animation: aiDot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: 0.15s; } .ai-typing span:nth-child(3) { animation-delay: 0.3s; margin-right: 4px; }
@keyframes aiDot { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
html[data-motion="off"] .ai-typing span { animation: none; opacity: 0.6; }
.ai-rate { border-top: 1px solid var(--line2); padding: 8px 14px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-secondary); background: var(--bg-card); }
.ai-rate[hidden] { display: none; }
.ai-rb { width: 42px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); display: grid; place-items: center; cursor: pointer; }
.ai-rb.is-on { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.ai-in { border-top: 1px solid var(--line2); padding: 8px 10px 6px; background: var(--bg-card); }
.ai-in-row { display: flex; gap: 8px; align-items: flex-end; }
.ai-in textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--border); border-radius: 14px; padding: 9px 12px; font: inherit; font-size: 13px;
    line-height: 1.4; max-height: 180px; background: var(--bg-input); color: var(--text-primary); }
.ai-ic { width: 38px; height: 38px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); display: grid; place-items: center; cursor: pointer; flex: none; }
.ai-go { height: 38px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--dark); color: var(--dark-ink); font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.ai-go:disabled { opacity: 0.5; cursor: default; }
.ai-tip { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 4px; }
.ai-ord { display: flex; gap: 8px; align-items: center; font-size: 12px; background: var(--acc-tint); color: var(--acc-text); border-radius: 12px; padding: 6px 6px 6px 10px; margin-bottom: 8px; line-height: 1.35; }
.ai-ord[hidden] { display: none; }
.ai-ord span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ai-ord small { opacity: 0.85; }
.ai-ord-in { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.ai-ord-in[hidden] { display: none; }
.ai-ord-in input { flex: 1; min-width: 0; height: 34px; }
.ai-hist { display: flex; flex-direction: column; gap: 8px; }
.ai-hist-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-hist-h b { flex: 1; font-size: 13.5px; }
.ai-hist-all { font-size: 12px; display: flex; gap: 4px; align-items: center; color: var(--text-secondary); }
.ai-hist-list { display: flex; flex-direction: column; gap: 6px; }
.ai-hist-i { text-align: left; font: inherit; border: 1px solid var(--line2); border-radius: 12px; padding: 8px 10px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.ai-hist-i:hover { border-color: var(--text-primary); }
.ai-hist-t { display: block; font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ai-hist-i small { color: var(--text-muted); font-size: 11px; }
@media (max-width: 640px) {
    .ai-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; }
    .ai-panel { inset: 0; width: auto; max-width: none; height: auto; border-radius: 0; border: 0; }
}
@media print { .ai-fab, .ai-panel { display: none !important; } }

/* v55: Cài đặt › AI chăm sóc khách hàng */
.ai-set-st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--warning-bg); color: var(--warning); }
.ai-set-st.is-ok { background: var(--success-bg); color: var(--success); }
.ai-set-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ai-set-g > label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-primary); min-width: 0; }
.ai-set-g > label.s2 { grid-column: 1 / -1; }
.ai-set-g small, .ai-set-mut { font-weight: 400; color: var(--text-muted); font-size: 11.5px; }
.ai-set-clr label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; font-size: 12px; color: var(--text-secondary); }
.ai-set-h { font-size: 13.5px; font-weight: 700; margin: 14px 0 6px; }
.ai-set-h small { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.ai-set-tw { overflow-x: auto; }
.ai-scn input { width: 100%; min-width: 140px; }
.ai-scn td:last-child { width: 40px; }
.ai-set-f { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ai-set-try { margin-top: 10px; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; background: var(--bg-input); font-size: 13px; line-height: 1.5; }
.ai-set-try p { margin: 0 0 6px; }
@media (max-width: 760px) { .ai-set-g { grid-template-columns: 1fr; } }
.main-content.has-ai { padding-bottom: 88px; }   /* chừa chỗ nút AI nổi — không che nút / phân trang cuối trang */

/* v55.1 — số phiên bản nhỏ ở góc dưới phải (nằm dưới nút AI, không chặn bấm) */
.app-ver { position: fixed; right: 6px; bottom: 2px; z-index: 870; font-size: 10px; line-height: 1.2; font-weight: 600;
    color: var(--text-secondary); pointer-events: none; user-select: none; letter-spacing: 0.02em; }
@media print { .app-ver { display: none; } }
/* v155 — số phiên bản nhỏ cạnh chữ "B2Q Ecom" ở góc trên bên trái (thay cho góc dưới phải trong trang đã đăng nhập) */
.app-ver-tag { font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: 0.02em; color: var(--text-secondary);
    background: var(--surface-2, rgba(127,127,127,.12)); border-radius: 6px; padding: 2px 5px; margin-left: 3px; vertical-align: 3px; }

/* v56 — mua label qua API BulkZSPP */
.bz-chip { display: inline-block; margin: 2px 0 0 4px; padding: 1px 7px; border-radius: 99px; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
    border: 1px solid var(--border); color: var(--text-secondary); background: var(--bg-card); }
.bz-chip.is-done { color: var(--success, #2e7d4f); border-color: currentColor; background: var(--success-bg, rgba(46,125,79,.08)); }
.bz-chip.is-check { color: var(--warning, #9a6700); border-color: currentColor; background: var(--warning-bg, rgba(154,103,0,.08)); }
.bz-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bz-svc { display: flex; align-items: center; gap: 8px; font-weight: 600; flex: 1; min-width: 240px; }
.bz-svc select { flex: 1; min-width: 0; }
.bz-bal { text-align: right; font-size: 0.78rem; color: var(--text-secondary); }
.bz-bal b { display: block; font-size: 1.15rem; color: var(--text-primary); }
.bz-sum { margin: 6px 0 8px; font-size: 0.88rem; }
.bz-sum b { font-weight: 700; }
.bz-warn { margin-bottom: 8px; }
.bz-table td.bz-price { font-weight: 700; white-space: nowrap; text-align: right; }
.bz-trk { font-size: 0.75rem; margin-top: 3px; word-break: break-all; }
.bz-pdf { font-size: 0.78rem; display: inline-block; margin-top: 3px; }
.bz-msg { font-size: 0.74rem; margin-top: 3px; max-width: 360px; }
.bz-acts { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* v57 — ô Base URL (chỉ hiện với nhà cung cấp Codex API) */
.ai-set-g label[hidden] { display: none !important; }

/* v58 — Báo cáo › Phân tích eBay */
.pa-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pa-days { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.pa-days .btn, .pa-tabs .btn { padding: 0.28rem 0.7rem; font-size: 0.78rem; }
.pa-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.pa-body .metric-grid { margin-bottom: 12px; }
.pa-sub { font-size: 0.72rem; color: var(--text-secondary); font-weight: 400; }
.pa-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 8px; }
.pa-bar .tx-note { margin: 0; }
.pa-sort { width: auto; padding: 0.28rem 0.5rem; font-size: 0.8rem; }
.pa-tbl td, .pa-tbl th { vertical-align: top; }
.pa-tbl .pa-n, .pa-tbl th.pa-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pa-tbl .pa-title { max-width: 320px; }
.pa-tbl .pa-id { font-size: 0.72rem; color: var(--text-secondary); }
.pa-tbl .pa-acc { font-size: 0.72rem; color: var(--text-secondary); }
.pa-neg { color: var(--danger) !important; }
.pa-pos { color: var(--success); }
.pa-tbl tr.pa-bad td { background: var(--danger-bg, rgba(207,74,82,.06)); }
.pa-tbl tr.pa-warn td { background: var(--warning-bg, rgba(180,83,9,.06)); }
.pa-chip { display: inline-block; margin: 0 4px 3px 0; padding: 1px 7px; border-radius: 99px; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
    border: 1px solid var(--border); color: var(--text-secondary); }
.pa-chip.bad { color: var(--danger); border-color: currentColor; }
.pa-chip.warn { color: var(--warning); border-color: currentColor; }
.pa-chip.ok { color: var(--success); border-color: currentColor; }
.pa-h { margin: 16px 0 6px; font-size: 0.88rem; font-weight: 700; }
.pa-small { font-size: 0.82rem; }
.pa-bank { display: flex; gap: 4px; align-items: center; }
.pa-bank-in { width: 92px; padding: 0.25rem 0.4rem; font-size: 0.8rem; }
.pa-unbank { margin-top: 3px; }
.metric-card .val.warning { color: var(--warning); }

/* ===== v59: FlashShip ===== */
.btn-fs { border-color: var(--success); color: var(--success); font-weight: 600; }
.btn-fs:hover { background: var(--success-bg); }
.fs-chip { display: inline-block; margin: 2px 0 0 4px; padding: 1px 7px; border-radius: 99px; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
    text-decoration: none; border: 1px solid currentColor; }
a.fs-chip:hover { text-decoration: underline; }
.fs-chip.fs-q { color: var(--warning); background: var(--warning-bg); }
.fs-chip.fs-p { color: var(--accent); background: var(--accent-bg); }
.fs-chip.fs-s { color: var(--success); background: var(--success-bg); }
.fs-chip.fs-w { color: var(--danger); background: var(--danger-bg); }
.fs-chip.fs-x { color: var(--text-secondary); background: var(--bg-page); }
.fs-chip.fs-mini { padding: 1px 4px; margin-left: 3px; }
.fs-box { width: 1040px; }
.fs-opts { display: flex; gap: 12px 18px; flex-wrap: wrap; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
    background: var(--bg-page); border: 1px solid var(--border); }
.fs-opt { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; min-width: 220px; flex: 1; }
.fs-opt select { min-width: 0; }
.fs-opt small { font-weight: 400; }
.fs-opt.is-need select { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-bg); }
.fs-req { color: var(--danger); }
.fs-g { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); }
.fs-g.is-on { border-color: var(--success); }
.fs-g.is-block, .fs-g.is-bad { background: var(--bg-page); }
.fs-g-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fs-g-id { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.fs-g-id input { width: 16px; height: 16px; }
.fs-addr { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.45; }
.fs-addr b { color: var(--text-primary); }
.fs-msgs, .fs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fs-msgs:empty { display: none; }
.fs-lines { display: flex; flex-direction: column; gap: 6px; }
.fs-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding-top: 6px; border-top: 1px dashed var(--border); }
.fs-line.is-pick .fs-var { border-color: var(--warning); }
.fs-line-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fs-line-v { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.fs-pick { display: flex; gap: 6px; width: 100%; }
.fs-pick .fs-style { flex: 0 1 42%; min-width: 0; }
.fs-pick .fs-var { flex: 1 1 58%; min-width: 0; }
.fs-foot-n { font-size: 0.8rem; }
.fs-res { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fs-res li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.fs-res li.is-ok { border-color: var(--success); }
.fs-res li.is-warn { border-color: var(--warning); }
.fs-res li.is-bad { border-color: var(--danger); }
.fs-uat { background: var(--warning-bg); color: var(--warning); }
.fs-stat-bad .bp-stat-v { color: var(--danger); }
.fs-unk { margin-bottom: 0.8rem; }
.fs-search { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.fs-search input[type=search] { width: 230px; max-width: 52vw; }
.fs-empty { padding: 1rem 0; text-align: center; }
.fs-hook { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.fs-hook code { word-break: break-all; }
.fs-cbox { width: 460px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 8px; }
.fs-cbox textarea { width: 100%; }
.fs-cl { font-size: 0.82rem; font-weight: 600; }
.fs-cbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@media (max-width: 720px) {
    .fs-line { grid-template-columns: 1fr; }
    .fs-pick { flex-direction: column; }
    .fs-pick .fs-style, .fs-pick .fs-var { flex: 1 1 auto; width: 100%; }
    .fs-search { margin-left: 0; width: 100%; }
    .fs-search input[type=search] { flex: 1; width: auto; max-width: none; }
    .fs-opt { min-width: 0; flex: 1 1 100%; }
}

/* ===== v60 ===== */
.oid-copy.trk-copy { font-weight: inherit; }
/* v66: bấm tên khách (Client Name) để sao chép — cùng kiểu với Order ID / tracking, không đậm */
.cn-copy { cursor: copy; border-radius: 4px; padding: 1px 2px; margin: -1px -2px; transition: background 0.15s; }
.cn-copy:hover, .cn-copy:focus-visible { background: var(--accent-bg); color: var(--accent); outline: none; }
.cn-copy.is-copied { background: var(--success-bg); color: var(--success); }
.badge.pay-one { white-space: nowrap; }
.tfq-sub { font-weight: 400; font-size: 12px; color: var(--text-muted); margin-left: 6px; }
.tfq-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tfq-form #tfqSecret { flex: 2 1 320px; min-width: 0; }
.tfq-form #tfqLabel { flex: 1 1 180px; min-width: 0; }
.tfq-out { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-page); border: 1px solid var(--border); }
.tfq-code { font-size: 28px; }
.tfq-info { color: var(--text-secondary); font-size: 12.5px; }
.tfq-bar { flex: 1 1 120px; height: 6px; border-radius: 99px; background: var(--seg-bg); overflow: hidden; min-width: 80px; }
.tfq-bar i { display: block; height: 100%; background: var(--success); transition: width 1s linear; }
.tfq-left { font-size: 12px; color: var(--text-secondary); min-width: 64px; }
.tfq-err { color: var(--danger); font-size: 13px; }
.tfq-hist { margin-top: 12px; }
.tfq-hist summary { cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.tfq-acts { white-space: nowrap; }
.att-comm-basis { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; font-weight: 400; }
/* v60: Báo cáo chia tab (Tổng quan · eBay) */
html[data-st-tab="bc-tong"] .st-tab[data-tab="bc-tong"], html[data-st-tab="bc-ebay"] .st-tab[data-tab="bc-ebay"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="bc-tong"] .st-tab[data-tab="bc-tong"]::after, html[data-st-tab="bc-ebay"] .st-tab[data-tab="bc-ebay"]::after { background: var(--text-primary); }
html[data-st-tab="bc-tong"] .st-pane[data-pane="bc-tong"], html[data-st-tab="bc-ebay"] .st-pane[data-pane="bc-ebay"] { display: block; animation: stIn 0.22s ease backwards; }
.bc-tabs { margin: 0 0 14px; }
.metric-card .sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
.acc-tbl td.num, .acc-tbl th.num { text-align: right; white-space: nowrap; }
.acc-payouts, .acc-fee { margin-top: 12px; }
.acc-payouts summary, .acc-fee summary { cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.acc-fee-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.acc-fee-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; max-width: 260px; }
.acc-bank { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.acc-bank .field-label { flex-basis: 100%; }
.acc-bank-o { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.acc-fee-form .btn { align-self: flex-start; }
/* v61: Telegram */
.tg-chat-row { display: flex; gap: 6px; }
.tg-chat-row input { flex: 1; min-width: 0; }
.tg-chats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12.5px; }
.tg-chats-h { flex-basis: 100%; color: var(--text-secondary); }
.tg-opts { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.tg-o { display: inline-flex; align-items: center; gap: 6px; font-size: 12.8px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); }
.tg-o:has(input:checked) { border-color: var(--text-secondary); font-weight: 600; }
.tg-time { width: 58px; padding: 2px 6px; font-size: 12.5px; }
/* v62: By Account */
html[data-st-tab="bc-acc"] .st-tab[data-tab="bc-acc"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="bc-acc"] .st-tab[data-tab="bc-acc"]::after { background: var(--text-primary); }
html[data-st-tab="bc-acc"] .st-pane[data-pane="bc-acc"] { display: block; animation: stIn 0.22s ease backwards; }
.ba-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; font-size: 13px; }
.ba-filter label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.ba-tbl td.num, .ba-tbl th.num { text-align: right; white-space: nowrap; }
.ba-tbl .ba-prow td { background: var(--bg-page); border-top: 1px solid var(--border); }
.ba-tbl .ba-sub td { font-size: 0.95em; }
.ba-tbl .ba-total td { font-weight: 700; background: var(--bg-page); }
.ba-pos { color: var(--success); font-weight: 600; }
.ba-neg { color: var(--danger); font-weight: 600; }
.ba-hold { color: var(--warning); font-weight: 600; }
.ba-cancel { color: var(--danger); }
.ds-fz { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.ds-fz span { flex: 1; }
.ds-fz .btn { padding: 2px 9px; font-size: 0.8rem; min-height: 0; }
.ds-fz b { min-width: 40px; text-align: center; color: var(--text-primary); font-variant-numeric: tabular-nums; }
/* v63: tab Tiền eBay · Transaction report · Phân tích eBay (tách từ tab eBay) */
html[data-st-tab="bc-tx"] .st-tab[data-tab="bc-tx"], html[data-st-tab="bc-pt"] .st-tab[data-tab="bc-pt"] { color: var(--text-primary); font-weight: 600; }
html[data-st-tab="bc-tx"] .st-tab[data-tab="bc-tx"]::after, html[data-st-tab="bc-pt"] .st-tab[data-tab="bc-pt"]::after { background: var(--text-primary); }
html[data-st-tab="bc-tx"] .st-pane[data-pane="bc-tx"], html[data-st-tab="bc-pt"] .st-pane[data-pane="bc-pt"] { display: block; animation: stIn 0.22s ease backwards; }
/* v63: By Account — payout Hôm nay (xanh lá) · Tuần này (xanh dương) · Tháng này (tím) */
:root { --ba-d: #22663f; --ba-d-bg: #dcf0e2; --ba-w: #1d5a9e; --ba-w-bg: #dde9f8; --ba-m: #6a3c9c; --ba-m-bg: #ece2f7; }
[data-theme="dark"] { --ba-d: #7dd3a0; --ba-d-bg: #17321f; --ba-w: #8fbaf0; --ba-w-bg: #172638; --ba-m: #c7a8f0; --ba-m-bg: #2a1f3b; }
.ba-d { --ba: var(--ba-d); --ba-bg: var(--ba-d-bg); }
.ba-w { --ba: var(--ba-w); --ba-bg: var(--ba-w-bg); }
.ba-m { --ba: var(--ba-m); --ba-bg: var(--ba-m-bg); }
.ba-pay-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.ba-pc { background: var(--ba-bg); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ba-pc-l { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--ba); }
.ba-pc-l span { font-weight: 500; color: var(--text-secondary); }
.ba-pc-l i, .ba-pay-tbl th i { width: 8px; height: 8px; border-radius: 99px; background: var(--ba); display: inline-block; flex: 0 0 auto; }
.ba-pc-v { font-size: 22px; font-weight: 700; color: var(--ba); margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ba-pc-s { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ba-pay-tbl td.num, .ba-pay-tbl th.num { text-align: right; white-space: nowrap; }
.ba-pay-tbl th.ba-c { color: var(--ba); box-shadow: inset 0 -3px 0 var(--ba); }
.ba-pay-tbl th.ba-c i { margin-right: 6px; vertical-align: 1px; }
.ba-pay-tbl th small { display: block; font-weight: 500; font-size: 11px; color: var(--text-secondary); }
.ba-pay-tbl td.ba-c .ba-amt { color: var(--ba); font-weight: 700; font-variant-numeric: tabular-nums; }
.ba-pay-tbl td.ba-c .ba-zero { color: var(--text-muted); }
.ba-pay-tbl .ba-total td { font-weight: 700; background: var(--bg-page); }
.ba-pay-tbl .ba-total td.ba-c { background: var(--ba-bg); }
.tab-n.ba-tab-d { background: var(--ba-d-bg); color: var(--ba-d); }
@media (max-width: 640px) {
    .ba-pay-cards { grid-template-columns: 1fr; gap: 8px; }
    .ba-pc { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
    .ba-pc-l { flex: 1 1 100%; }
    .ba-pc-v { font-size: 19px; margin-top: 0; }
}
/* v64: By Account — payout thật + đối chiếu từng payout */
.ba-pc-v small { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-left: 6px; }
.ba-pc-s.ba-est, .ba-est { color: var(--text-secondary); font-style: italic; }
.ba-est { font-size: 12.5px; margin-top: 2px; }
.ba-est .tk-muted { font-style: normal; }
.ba-chip { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--warning-bg); color: var(--warning); margin-left: 2px; }
.ba-tr { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ba-warnbar { background: var(--warning-bg); color: var(--warning); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.ba-warn { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--warning); margin-left: 4px; white-space: nowrap; }
.ba-okc { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--success); white-space: nowrap; }
.ba-tg { width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 12px; line-height: 1; margin-right: 8px; padding: 0; vertical-align: middle; }
.ba-tg:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.ba-tg:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.ba-tg-sp { display: inline-block; width: 32px; }
.ba-meth { font-size: 11.5px; margin-left: 4px; }
.ba-pay-tbl tr.ba-det > td { background: var(--bg-page); padding: 10px 12px 12px; }
.ba-po { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); margin: 0 0 8px; }
.ba-po > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; font-size: 13px; list-style: none; }
.ba-po > summary::-webkit-details-marker { display: none; }
.ba-po > summary::before { content: "▸"; color: var(--text-muted); font-size: 11px; }
.ba-po[open] > summary::before { content: "▾"; }
.ba-po-d { font-weight: 700; }
.ba-po-r { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.ba-st { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--bg-page); color: var(--text-secondary); }
.ba-st-done { background: var(--success-bg); color: var(--success); }
.ba-st-transit { background: var(--accent-bg); color: var(--accent); }
.ba-st-held, .ba-st-failed { background: var(--danger-bg); color: var(--danger); }
.ba-po-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; padding: 4px 14px 12px; }
.ba-bx { min-width: 0; }
.ba-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 4px 0 6px; }
.ba-ln { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.ba-ln small { color: var(--text-muted); font-size: 11.5px; }
.ba-ln b { white-space: nowrap; }
.ba-ln.neg b { color: var(--danger); }
.ba-ln.sum { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; font-weight: 700; }
.ba-okl { font-size: 12px; font-weight: 600; color: var(--success); margin-top: 6px; }
.ba-warnl { font-size: 12px; font-weight: 600; color: var(--warning); margin-top: 6px; line-height: 1.45; }
.ba-note { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.45; }
.ba-small { font-size: 12px; margin-top: 6px; }
.tx-fix { margin: 8px 0; font-size: 13px; }
.tx-fix summary { cursor: pointer; font-weight: 600; }
@media (max-width: 760px) {
    .ba-po-body { grid-template-columns: 1fr; gap: 6px; }
    .ba-po-r { margin-left: 0; }
}
/* v65: FlashShip — "Địa chỉ đúng, vẫn gửi" (giống BurgerPrints) */
.fs-addr-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--warning); margin: 2px 8px 2px 0; cursor: pointer; }
.fs-addr-ok input { width: auto; margin: 0; }

/* ===== v66 · Báo cáo › Transaction report: kết quả nhập dạng bảng, tab nhỏ, payout, khung chi tiết payout ===== */
.txr { margin-top: 10px; }
.txr-sum { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.txr-w { color: var(--warning); }
.txr-b { color: var(--danger); }
.txr-tbl td, .txr-tbl th { font-size: 12.5px; vertical-align: top; }
.txr-tbl td.num, .txr-tbl th.num, .txp-tbl td.num, .txp-tbl th.num, .tx-tbl td.num, .tx-tbl th.num, .txd-tbl td.num, .txd-tbl th.num {
    text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.txr-tbl tr.txr-dup td, .txr-tbl tr.txr-partial td { background: var(--warning-bg); }
.txr-tbl tr.txr-err td { background: var(--danger-bg); }
.txr-tbl tr.txr-dup td, .txr-tbl tr.txr-partial td, .txr-tbl tr.txr-err td { color: var(--text-primary); }
.txr-f { word-break: break-all; max-width: 260px; }
.txr-wl { margin-top: 3px; font-size: 12px; color: var(--text-secondary); }
.tx-st.tx-ok, .tx-st.txp-ok { background: var(--success-bg); color: var(--success); }
.tx-st.txp-warn { background: var(--warning-bg); color: var(--warning); }
.tx-st.txp-bad { background: var(--danger-bg); color: var(--danger); }
.tx-st.tx-muted, .tx-st.txp-muted { background: var(--bg-hover); color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--border); }

.txs-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.txs-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.txs-tab:hover { color: var(--text-primary); }
.txs-tab:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.txs-tab b { min-width: 20px; height: 19px; padding: 0 6px; border-radius: 99px; background: var(--bg-hover); color: var(--text-secondary);
    font-size: 11.5px; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1px var(--border); }
.txs-tab.is-warn b { background: var(--warning-bg); color: var(--warning); box-shadow: none; }
.txs-tab.is-on { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.txs-tab.is-on b { background: var(--dark-ink); color: var(--dark); box-shadow: none; }
.txs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.txs-f { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
#txReport .txs-f select, #txReport .txs-q { height: 32px; width: auto; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-card);
    color: var(--text-primary); padding: 0 10px; font: inherit; font-size: 13px; }
#txReport .txs-q { width: 260px; flex: 0 1 260px; max-width: 100%; }
#txReport [hidden], .txd [hidden] { display: none !important; }
.seg > .is-on:hover, .seg > [aria-pressed="true"]:hover, .seg > .active:hover { color: var(--dark-ink); }
.txr-tbl td { white-space: normal; }
.txr-tbl td:last-child { min-width: 320px; line-height: 1.45; }
.txs-tot { margin-left: auto; font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.txs-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.txs-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg-card); }
.txs-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 12px 0 6px; }
.txs-box .txs-h { margin-top: 0; }
.txs-hw { color: var(--warning); }
.txs-ln { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.txs-ln small { color: var(--text-muted); margin-left: 4px; }
.txs-sum { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; font-weight: 700; }
#txReport .neg { color: var(--danger); }
#txReport .pos, .txd .pos { color: var(--success); font-weight: 700; }
.txd .neg { color: var(--danger); }
.txs-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.txs-chips button { height: 29px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary);
    font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.txs-chips button b { margin-left: 4px; }
.txs-chips button.is-on { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.txs-chips button:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.txs-more { text-align: center; margin: 8px 0 0; }
.txs-old > summary { cursor: pointer; font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.txp-tbl td { vertical-align: top; }
.txp-pid { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer;
    text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.txp-pid:hover { text-decoration-style: solid; }
.txp-pid:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.txp-d { white-space: nowrap; }
.txp-warn { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; max-width: 360px; line-height: 1.4; white-space: normal; }

/* khung chi tiết payout — rộng (bảng nhiều cột); điện thoại: toàn màn hình */
.drawer.txd { width: min(1080px, 100vw); }
html.txd-open, html.txd-open body { overflow: hidden; }
.txd-act { display: flex; align-items: center; gap: 8px; }
.txd-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.txd-box { border-radius: 10px; padding: 9px 11px; background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border); }
.txd-box .l { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.txd-box .v { font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.txd-box.neg .v { color: var(--danger); }
.txd-box.ok { background: var(--success-bg); box-shadow: none; }
.txd-box.ok .l, .txd-box.ok .v { color: var(--success); }
.txd-box.warn { background: var(--warning-bg); box-shadow: none; }
.txd-box.warn .l, .txd-box.warn .v { color: var(--warning); }
.txd-warn { background: var(--warning-bg); color: var(--warning); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; margin-bottom: 10px; line-height: 1.45; }
.txd-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.txd-cats .tx-st { line-height: 20px; padding: 0 9px; font-weight: 600; }
.txd-tbl { font-size: 12.5px; }
.txd-tbl td { vertical-align: top; }
.txd-oid { font-weight: 600; white-space: nowrap; }
.txd-ti { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.txd-tbl td.txd-h { font-weight: 700; }
.txd-act .btn { white-space: nowrap; }
.txd-tbl td.txd-n { min-width: 120px; white-space: normal; }
.txd-nw { display: block; white-space: nowrap; }
.txd-tbl td.txd-n .tx-st { margin: 1px 0; }
.txd-tbl td.txd-r { white-space: normal; max-width: 170px; }
.txd-grp td { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); background: var(--bg-hover); }
.txd-tbl tfoot td { font-weight: 700; border-top: 1px solid var(--border); }
.txd-tbl tfoot .txd-tot td { background: var(--bg-hover); }
.txd-tbl tfoot .txd-fin td { background: var(--success-bg); color: var(--success); }
.txd-tbl tfoot .txd-finw td { background: var(--warning-bg); color: var(--warning); }
@media (max-width: 760px) {
    .drawer.txd { width: 100vw; border-left: 0; }
    .txd-strip { grid-template-columns: 1fr 1fr; }
    .txs-two { grid-template-columns: 1fr; }
    .txs-tot { margin-left: 0; width: 100%; }
    #txReport .txs-q { width: 100%; flex: 1 1 100%; }
    .txd-act .btn { padding: 0 9px; }
    /* điện thoại: mỗi đơn 1 thẻ — nhãn cột lấy từ data-l */
    .txd-wrap { overflow: visible; }
    table.data-table.txd-tbl, .txd-tbl tbody, .txd-tbl tfoot { display: block; overflow: visible; }
    .txd-tbl thead { display: none; }
    .txd-tbl tr.txd-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
    .txd-tbl tr.txd-row td { border: 0; padding: 0; text-align: left; white-space: normal; background: none !important; max-width: none; min-width: 0; }
    .txd-tbl tr.txd-row td::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); }
    .txd-tbl tr.txd-row td.txd-o, .txd-tbl tr.txd-row td.txd-n { grid-column: 1 / -1; }
    .txd-tbl tr.txd-row td.txd-o::before, .txd-tbl tr.txd-row td.txd-n::before { content: none; }
    .txd-tbl tr.txd-row td.txd-empty, .txd-tbl tfoot td.txd-empty { display: none; }
    .txd-tbl tr.txd-row .txd-ti { max-width: none; white-space: normal; }
    .txd-tbl tr.txd-grp { display: block; }
    .txd-tbl tr.txd-grp td { display: block; }
    .txd-tbl tfoot tr { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 10px; border-radius: 10px; margin-top: 6px; }
    .txd-tbl tfoot td { border: 0; padding: 0; text-align: left; background: none !important; }
    .txd-tbl tfoot td.txd-fl { flex: 1 1 100%; }
    .txd-tbl tfoot td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; opacity: 0.8; }
    .txd-tbl tfoot .txd-tot { background: var(--bg-hover); }
    .txd-tbl tfoot .txd-fin { background: var(--success-bg); }
    .txd-tbl tfoot .txd-finw { background: var(--warning-bg); }
}

/* ===== v67 · Tool › Quét VeRO ===== */
.vr-page [hidden] { display: none !important; }
.vr-tabs { margin: 6px 0 14px; }
.vr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0; }
.vr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.vr-stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 0; }
.vr-st { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; border-radius: 10px; padding: 9px 11px;
    background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-secondary); font: inherit; }
button.vr-st { cursor: pointer; }
.vr-st span { font-size: 12px; font-weight: 600; }
.vr-st b { font-size: 19px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.vr-st-b { background: var(--danger-bg); box-shadow: none; } .vr-st-b span, .vr-st-b b { color: var(--danger); }
.vr-st-h { background: var(--warning-bg); box-shadow: none; } .vr-st-h span, .vr-st-h b { color: var(--warning); }
.vr-st-o { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border); } .vr-st-o span, .vr-st-o b { color: var(--text-secondary); }
button.vr-st.is-on { outline: 2px solid var(--text-primary); outline-offset: 1px; }
button.vr-st:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vr-tbl td, table.data-table.vr-tbl td { vertical-align: top; white-space: normal; }
table.data-table.vr-tbl td.num, table.data-table.vr-tbl td.txp-d { text-align: right; white-space: nowrap; }
.vr-ti { overflow-wrap: anywhere; }
.vr-tbl .tx-st, table.data-table.vr-tbl td.vr-nw { white-space: nowrap; }
.vr-hist-new { font-size: 12.5px; font-weight: 600; color: var(--success); background: var(--success-bg); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.vr-page .table-wrap, #txReport .table-wrap { overflow-x: auto; max-width: 100%; }
.vr-ti { max-width: 380px; min-width: 180px; line-height: 1.4; }
.vr-hit { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 7px; margin: 1px 4px 1px 0; line-height: 18px; }
.vr-hit-block { background: var(--danger-bg); color: var(--danger); }
.vr-hit-high { background: var(--warning-bg); color: var(--warning); }
.vr-why { font-size: 11.5px; margin-top: 2px; }
.vr-act { min-width: 140px; max-width: 280px; }
.btn.vr-mini { font-size: 11.5px; padding: 2px 8px; min-height: 0; height: auto; margin: 1px 4px 1px 0; }
.vr-rm { font-size: 11.5px; font-weight: 700; color: var(--danger); margin-top: 3px; }
.vr-two { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.vr-two > div > .card + .card { margin-top: 14px; }
.vr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.vr-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
    background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-primary); }
.vr-chip.is-bad { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.vr-pick { cursor: pointer; }
.vr-pick input { margin: 0; width: auto; }
.vr-x { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--text-muted); font: inherit; font-size: 12px; }
.vr-x:hover, .vr-x:focus-visible { color: var(--text-primary); }
.vr-warn { background: var(--warning-bg); color: var(--warning); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; margin: 8px 0; line-height: 1.45; }
.vr-page .vr-q { width: 280px; max-width: 100%; }
.vr-own, .vr-hist { max-height: 560px; overflow: auto; }
.vr-prev-sum { font-weight: 700; margin: 10px 0 6px; }
.vr-save { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.vr-mk { margin: 4px 0 8px 18px; padding: 0; font-size: 13px; }
.vr-det { margin-top: 10px; font-size: 13px; }
.vr-det summary { cursor: pointer; font-weight: 600; }
.vr-sync { font-size: 13px; line-height: 1.6; }
.vero-badge.is-block { background: var(--danger-bg); color: var(--danger); }
.vero-badge.is-high { background: var(--warning-bg); color: var(--warning); }
.vero-removed { display: inline-block; font-size: 11px; font-weight: 700; color: var(--danger); margin-left: 4px; }
.lc-vero { margin: 0 0 0.6rem; font-size: 0.8rem; }
.lc-vero table { margin-top: 4px; }
@media (max-width: 900px) {
    .vr-two { grid-template-columns: minmax(0, 1fr); }
    .vr-stats, .vr-stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vr-page .vr-q { width: 100%; }
}

/* v68: ô Track — gõ thẳng tracking khi trống · nút sao chép khi đã có */
#ordersTable .trk-in { width: 150px; max-width: 100%; height: 26px; min-height: 0; padding: 2px 8px; margin: 0; font-size: 12.5px; font-family: inherit;
    border: 1px dashed var(--border); border-radius: 6px; background: transparent; color: var(--text-primary); box-shadow: none; }
#ordersTable .trk-in:hover { border-color: var(--text-muted); }
#ordersTable .trk-in:focus { border-style: solid; border-color: var(--accent); background: var(--bg-card); outline: none; box-shadow: 0 0 0 2px var(--accent-bg); }
#ordersTable .trk-in::placeholder { color: var(--text-muted); opacity: 1; }
#ordersTable .trk-in:disabled { opacity: .55; }
#ordersTable .trk-cp { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 22px; padding: 0; margin: 0 0 0 4px; vertical-align: middle;
    border: 0; border-radius: 5px; background: none; color: var(--text-muted); font-size: 15px; line-height: 1; cursor: pointer; min-height: 0; box-shadow: none; }
#ordersTable .trk-cp:hover, #ordersTable .trk-cp:focus-visible { background: var(--accent-bg); color: var(--accent); outline: none; }
#ordersTable .trk-cp.is-copied { background: var(--success-bg); color: var(--success); }

/* v72: FlashShip — Loại hàng (segment) · Label type · label của đơn · đơn tạo ngoài tool */
.fs-opt-cat { flex: 2 1 420px; }
.fs-opt-lt { flex: 1 1 100%; }
.fs-segs { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fs-seg-g { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fs-seg-l { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.fs-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg-card); }
.fs-seg-b { border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--text-primary); font: inherit; font-size: 13px;
    font-weight: 600; padding: 6px 12px; cursor: pointer; min-height: 0; border-radius: 0; box-shadow: none; }
.fs-seg-b:last-child { border-right: 0; }
.fs-seg-b:hover { background: var(--accent-bg); }
.fs-seg-b.is-on, .fs-seg-b.is-on:hover { background: var(--text-primary); color: var(--bg-card); }
.fs-seg-b:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fs-opt.is-need .fs-seg { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-bg); }
.fs-lts { display: flex; gap: 8px; flex-wrap: wrap; }
.fs-lt { flex: 1 1 260px; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; border: 1px solid var(--border);
    border-radius: 10px; padding: 7px 10px; cursor: pointer; background: var(--bg-card); font-weight: 400; }
.fs-lt input { width: auto; margin: 0; }
.fs-lt small { grid-column: 2; font-weight: 400; line-height: 1.35; }
.fs-lt.is-on { border-color: var(--accent); background: var(--accent-bg); }
.fs-lab { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 6px 8px; border-radius: 9px; border: 1px dashed var(--border); font-size: 12.5px; }
.fs-lab.is-ok { border-style: solid; border-color: var(--success); background: var(--success-bg); }
.fs-lab.is-bad { border-style: solid; border-color: var(--danger); }
.fs-lab.is-need { border-color: var(--warning); background: var(--warning-bg); }
.fs-lab.is-off { border: 0; padding: 0; }
.fs-lab-f { font-weight: 700; margin-right: 4px; word-break: break-all; }
.fs-lab-pick { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fs-lab-pick .fs-lab-link { width: 260px; max-width: 100%; height: 28px; min-height: 0; padding: 3px 8px; font-size: 12.5px; }
.fs-lab-note { flex-basis: 100%; }
.fs-vid { height: 32px; }
.fs-imp { margin-bottom: 12px; }
.fs-imp-h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-size: 13px; }
.fs-imp-row { display: flex; gap: 8px; align-items: stretch; }
.fs-imp-row textarea { flex: 1; min-height: 44px; resize: vertical; font-size: 13px; }
.fs-imp-out { margin-top: 6px; }
.fs-out { margin-top: 3px; white-space: normal; max-width: 260px; font-size: 12px; }
.bp-kind.is-out { background: var(--accent-bg); color: var(--accent); }
.fs-mnote { font-size: 11.5px; white-space: normal; max-width: 260px; }
form.fs-link { display: flex; gap: 4px; margin-top: 4px; }
form.fs-link .fs-link-in { width: 140px; height: 26px; min-height: 0; padding: 2px 7px; font-size: 12px; }
@media (max-width: 720px) {
    .fs-imp-row { flex-direction: column; }
    .fs-lab-pick .fs-lab-link { width: 100%; }
}

/* v72: BurgerPrints — ô chọn mẫu có toàn bộ danh mục + ô tìm */
.bp-pick .bp-mwrap { display: inline-flex; flex-direction: column; gap: 3px; max-width: 100%; }
.bp-pick .bp-mq { width: 100%; min-width: 240px; padding: 0.25rem 0.5rem; font-size: 0.78rem; border-style: dashed; }
.bp-pick .bp-msel { min-width: 240px; max-width: 360px; }
@media (max-width: 720px) {
    .bp-pick .bp-mwrap, .bp-pick .bp-msel, .bp-pick .bp-mq { width: 100%; max-width: 100%; min-width: 0; }
}

/* v73: khung Gửi FlashShip làm giống khung Gửi BP — rộng như BP, thanh chọn loại hàng / label cố định ở trên */
.fs-box { width: 1180px; }
.fs-top { padding: 0.6rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--bg-page); flex: 0 0 auto; }
.fs-top:empty { display: none; }
.fs-top .fs-opts { background: transparent; border: 0; padding: 0; }
.fs-addr-det { margin-top: 6px; }
.fs-addr-det .bp-addr { margin-top: 6px; }
.fs-lab-off { margin-top: 6px; font-size: 12px; }
.fs-ord .fs-pick { flex-wrap: nowrap; }
.fs-ord .fs-pick .fs-style { flex: 0 1 42%; min-width: 0; }
.fs-ord .fs-pick .fs-var { flex: 1 1 58%; min-width: 0; }
@media (max-width: 720px) {
    .fs-top { max-height: 40vh; overflow-y: auto; padding: 0.5rem 0.8rem; }
    .fs-ord .fs-pick { flex-wrap: wrap; }
    .fs-ord .fs-pick .fs-style, .fs-ord .fs-pick .fs-var { flex: 1 1 100%; }
}

/* ===== v74: 2 tài khoản Cloudflare trong Quản lý domain ===== */
.cfd-accs .cfd-acc { border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 0.9rem; margin-bottom: 0.7rem; }
.cfd-acc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.5rem; }
.cfd-acc-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
    background: var(--accent-bg); color: var(--accent); }
.cfd-acc-tag.is-2 { background: #ede9fe; color: #6d28d9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cfd-acc-tag.is-2 { background: rgba(139,92,246,.18); color: #c4b5fd; } }
:root[data-theme="dark"] .cfd-acc-tag.is-2 { background: rgba(139,92,246,.18); color: #c4b5fd; }
.cfd-acc-st { font-weight: 400; font-size: 0.8rem; color: var(--text-secondary); }
.cfd-acc-st.is-ok { color: var(--success); }
.cfd-acc-st.is-bad { color: var(--danger); }
.cfd-acc-def { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.cfd-acc-def select { width: auto; min-width: 200px; }
.cfd-accpick { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem 0.7rem; margin-bottom: 0.7rem;
    border: 1px dashed var(--border); border-radius: 8px; background: var(--bg-page); }
.cfd-accpick b { font-size: 0.85rem; }
.cfd-accpick select { width: auto; min-width: 180px; }
.cfd-conn-acc { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cfd-tab .cfd-acc-tag { margin-right: 2px; }
.cfd-tabs .cfd-tab { padding-left: 0.75rem; padding-right: 0.75rem; }   /* v74: thêm tab TK2 — vẫn vừa 1 hàng ở màn 1440px */

/* ===== v75: Listing File Csv — Hoodie / Sweatshirt ===== */
.lc-prod { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 0.8rem; }
.lc-prod .field-label { margin-right: 4px; }
.lc-prod-opt { position: relative; cursor: pointer; margin: 0; }
.lc-prod-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lc-prod-opt span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border: 1px solid var(--border);
    border-radius: 999px; font-weight: 600; font-size: 0.86rem; background: var(--bg-card); color: var(--text-primary); }
.lc-prod-opt input:checked + span { background: var(--text-primary); color: var(--bg-card); border-color: var(--text-primary); }
.lc-prod-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.lc-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.7rem; }
.lc-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
    background: var(--accent-bg); color: var(--accent); }
.lc-pill.is-dark { background: var(--text-primary); color: var(--bg-card); }
.lc-pill.is-ok { background: var(--success-bg); color: var(--success); }
.lc-pill.is-warn { background: var(--warning-bg); color: var(--warning); }
.lc-note { font-size: 0.76rem; color: var(--text-secondary); margin-top: 4px; }
.lc-cfg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .lc-cfg-grid { grid-template-columns: minmax(0, 1fr); } }
.lc-ptabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0.9rem; }
.lc-ptab { border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); border-radius: 999px;
    padding: 5px 13px; font-weight: 600; font-size: 0.84rem; cursor: pointer; }
.lc-ptab.is-on { background: var(--text-primary); color: var(--bg-card); border-color: var(--text-primary); }
.lc-sub { font-weight: 700; font-size: 0.86rem; margin-bottom: 0.6rem; }
.lc-sep { border-top: 1px solid var(--border); margin: 1rem 0 0.8rem; }
.lc-ptbl-wrap { overflow-x: auto; }
.lc-ptbl { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.8rem; }
.lc-ptbl th, .lc-ptbl td { padding: 4px 3px; border-bottom: 1px solid var(--border); text-align: center; }
.lc-ptbl th:first-child, .lc-ptbl td:first-child { text-align: left; white-space: nowrap; padding-right: 8px; }
.lc-ptbl td:first-child small { display: block; font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }
.lc-ptbl th { color: var(--text-secondary); font-weight: 600; }
.lc-ptbl input { width: 100%; min-width: 58px; padding: 5px 4px; text-align: center; font-size: 0.8rem; }
.lc-imgs { font-family: ui-monospace, Menlo, monospace; font-size: 0.74rem; white-space: pre; overflow-x: auto; }
.lc-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.5rem; }
.lc-thumb { width: 58px; height: 58px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex;
    align-items: center; justify-content: center; font-size: 0.62rem; text-align: center; color: var(--text-secondary);
    background: var(--bg-page); text-decoration: none; }
.lc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-thumb.is-mock { background: var(--accent-bg); color: var(--accent); font-weight: 700; padding: 3px; }
.lc-thumb.is-bad { color: var(--danger); background: var(--danger-bg); padding: 3px; }
.lc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 0.9rem; }
.lc-fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem 0.8rem; margin-top: 0.8rem; }
.lc-fgrid .field-label { margin-top: 0; }
@media (max-width: 640px) {
    .lc-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lc-ptbl { min-width: 640px; }
    .lc-ptbl input { min-width: 68px; }
}
/* v75b: Listing File Csv chia tab theo loại sản phẩm */
.lc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.lc-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
    padding: 0.6rem 1rem; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.lc-tab:hover { color: var(--text-primary); }
.lc-tab.is-on { color: var(--text-primary); border-bottom-color: var(--accent); }
.lc-tab-n { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-size: 0.72rem; }
.lc-gen-for { font-weight: 600; color: var(--text-secondary); }

/* ---------- v77: khách quay lại — chip ở cột Note + 2 nút lọc nhanh ---------- */
/* inline (không inline-block): ô Note hẹp thì chữ chip bị cắt "…" chứ không mất cả chip */
#ordersTable td.ds-note .ab-n.rb { display: inline; cursor: help; font-size: 10.5px; padding: 1px 6px; margin-right: 0; }
#ordersTable td.ds-note .ab-n.rb + .ab-n.rb { margin-left: 4px; }
/* "cùng acc" = xanh dương cố định (không theo màu chủ đề — chủ đề vàng sẽ lẫn với chip cam "khác acc") */
.ab-n.rb-same { background: #dbeafe; color: #1e40af; }
[data-theme="dark"] .ab-n.rb-same { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.ab-n.rb-diff { background: var(--warning-bg); color: var(--warning); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warning) 45%, transparent); }
.ship-chip.is-rpd { border-color: color-mix(in srgb, var(--warning) 55%, transparent); }
.ship-chip.is-rps { border-color: rgba(59, 130, 246, 0.55); }
.ship-chip.is-rpd.is-on { background: var(--warning-bg); color: var(--warning); }
.ship-chip.is-rps.is-on { background: #dbeafe; color: #1e40af; }
[data-theme="dark"] .ship-chip.is-rps.is-on { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.ship-chip.is-rpd.is-on b, .ship-chip.is-rps.is-on b { color: inherit; }
@media (max-width: 1750px) { .ds-chips .ship-chip.is-rpd .cl, .ds-chips .ship-chip.is-rps .cl { display: none; } }

/* ---------- v78: Báo cáo › By Account — chọn kỳ (5 ô) + bảng chi tiết từng kỳ ---------- */
:root { --ba-lw: #0f766e; --ba-lw-bg: #dcf3ef; --ba-lm: #9a3412; --ba-lm-bg: #fbe9df; }
[data-theme="dark"] { --ba-lw: #5eead4; --ba-lw-bg: #10302c; --ba-lm: #fdba74; --ba-lm-bg: #3a2216; }
.ba-lw { --ba: var(--ba-lw); --ba-bg: var(--ba-lw-bg); }
.ba-lm { --ba: var(--ba-lm); --ba-bg: var(--ba-lm-bg); }
.ba-periods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.ba-periods .ba-pc { display: block; text-align: left; font: inherit; border: 2px solid transparent; cursor: pointer; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.ba-periods .ba-pc > span { display: block; }
.ba-periods .ba-pc > .ba-pc-l { display: flex; }
.ba-periods .ba-pc:hover { border-color: color-mix(in srgb, var(--ba) 35%, transparent); }
.ba-periods .ba-pc.is-on { border-color: var(--ba); box-shadow: 0 2px 10px color-mix(in srgb, var(--ba) 22%, transparent); }
.ba-periods .ba-pc:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.ba-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 12px; }
.ba-kp { border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; background: var(--bg-card); min-width: 0; }
.ba-kp.is-main { background: var(--ba-bg); border-color: transparent; }
.ba-kp-l { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.ba-kp-l small { font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.ba-kp-v { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ba-kp.is-main .ba-kp-v, .ba-kp.is-main .ba-kp-l { color: var(--ba); }
.ba-kp-s { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }
.ba-dtbl { font-size: 13px; }
.ba-dtbl td.num, .ba-dtbl th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ba-dtbl tr.ba-grp th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); text-align: center; padding-bottom: 2px; border-bottom: 0; }
.ba-dtbl .ba-g1 { background: color-mix(in srgb, var(--success) 6%, transparent); border-radius: 8px 8px 0 0; }
.ba-dtbl .ba-g2 { background: color-mix(in srgb, var(--ba) 9%, transparent); border-radius: 8px 8px 0 0; }
.ba-dtbl .ba-g3 { background: color-mix(in srgb, var(--warning) 8%, transparent); border-radius: 8px 8px 0 0; }
.ba-sort { all: unset; cursor: pointer; font-weight: 600; white-space: nowrap; }
.ba-sort::after { content: " ↕"; color: var(--text-muted); font-size: 0.85em; }
.ba-sort[data-dir="desc"]::after { content: " ↓"; color: var(--text-primary); }
.ba-sort[data-dir="asc"]::after { content: " ↑"; color: var(--text-primary); }
.ba-sort:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; border-radius: 4px; }
.ba-dtbl td.ba-acc { white-space: nowrap; }
.ba-dtbl .ba-amt { color: var(--ba); font-weight: 700; }
.ba-dtbl .ba-zero { color: var(--text-muted); }
.ba-dtbl .ba-est { font-style: italic; color: var(--text-secondary); font-size: inherit; margin: 0; }
.ba-dtbl tfoot .ba-total td { font-weight: 700; background: var(--bg-page); border-top: 1px solid var(--border); }
.ba-dtbl tr.ba-det > td { background: var(--bg-page); padding: 10px 12px 12px; white-space: normal; }
.ba-share { white-space: nowrap; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ba-bar { display: inline-block; width: 70px; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--ba) 14%, transparent); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.ba-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ba); }
@media (max-width: 1100px) { .ba-periods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .ba-periods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ba-periods .ba-pc { display: block; padding: 9px 11px; }
    .ba-periods .ba-pc-v { font-size: 17px; }
    .ba-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ba-kp-v { font-size: 15px; }
}
/* v78: đơn huỷ — ô Thanh toán không còn "Pending" */
.pay-cx { color: var(--text-muted); font-weight: 600; }
/* v78: FlashShip — dòng tự dò đơn cũ theo mã đơn eBay */
.fs-scan { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; }

/* ---------- v79: Listing File Csv › 🧩 Gộp 3 loại (T-shirt + Hoodie + Sweatshirt vào 1 listing) ---------- */
:root { --ty-t: #1e40af; --ty-t-bg: #dbeafe; --ty-h: #6d28d9; --ty-h-bg: #ede9fe; --ty-s: #0f766e; --ty-s-bg: #dcf3ef; }
[data-theme="dark"] { --ty-t: #93c5fd; --ty-t-bg: rgba(59, 130, 246, 0.18); --ty-h: #c4b5fd; --ty-h-bg: rgba(139, 92, 246, 0.2);
    --ty-s: #5eead4; --ty-s-bg: rgba(20, 184, 166, 0.16); }
.lc-ty { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 0.76rem; font-weight: 700;
    white-space: nowrap; background: var(--bg-page); color: var(--text-secondary); }
.lc-ty small { font-weight: 600; font-size: inherit; opacity: 0.9; }
.lc-ty.is-t { background: var(--ty-t-bg); color: var(--ty-t); }
.lc-ty.is-h { background: var(--ty-h-bg); color: var(--ty-h); }
.lc-ty.is-s { background: var(--ty-s-bg); color: var(--ty-s); }
.lc-ty.is-q { background: var(--warning-bg); color: var(--warning); }
.lc-merge { margin-top: 1rem; }
.lc-merge-msg { font-size: 0.8rem; color: var(--text-secondary); min-height: 1.1em; margin-bottom: 4px; }
.lc-mwrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.lc-mtbl { border-collapse: collapse; width: 100%; min-width: 880px; font-size: 0.8rem; }
.lc-mtbl th, .lc-mtbl td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.lc-mtbl th { color: var(--text-secondary); font-weight: 600; font-size: 0.74rem; white-space: nowrap; background: var(--bg-page); }
.lc-mtbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.lc-mtbl tr.lc-mrow.is-warn > td { background: color-mix(in srgb, var(--warning) 6%, transparent); }
.lc-mtbl tbody tr:last-child > td { border-bottom: 0; }
.lc-mtg { all: unset; cursor: pointer; font-weight: 700; white-space: nowrap; padding: 2px 5px; border-radius: 6px; }
.lc-mtg:hover { background: var(--bg-page); }
.lc-mtg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lc-mti { min-width: 220px; max-width: 360px; line-height: 1.35; }
.lc-mti ins { text-decoration: none; background: color-mix(in srgb, #facc15 38%, transparent); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.lc-mlen { color: var(--text-muted); font-size: 0.7rem; white-space: nowrap; }
.lc-mtys { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.lc-mimgs { white-space: nowrap; }
.lc-mth { display: inline-flex; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; margin-right: 4px;
    vertical-align: middle; background: var(--bg-page); align-items: center; justify-content: center; font-size: 0.8rem; text-decoration: none; }
.lc-mth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-mth.is-main { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.lc-mth.is-bad { color: var(--danger); background: var(--danger-bg); }
.lc-mnote { font-size: 0.76rem; color: var(--text-secondary); min-width: 210px; max-width: 340px; }
.lc-mnote > div + div { margin-top: 3px; }
.lc-mwarn { color: var(--warning); }
.lc-msel { display: inline-block; width: auto; margin: 2px 0 0 4px; padding: 2px 6px; font-size: 0.76rem; }
.lc-mut { color: var(--text-muted); font-size: 0.74rem; }
.lc-mtbl tr.lc-mdet > td { background: var(--bg-page); padding: 10px 12px 12px; }
.lc-mdh { font-weight: 700; font-size: 0.8rem; margin-bottom: 6px; }
.lc-mpm td.lc-mut { text-align: center; }
.lc-mzero { color: var(--danger); font-weight: 700; }
.lc-mstrip { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.lc-mstrip .lc-mth { width: 40px; height: 40px; }
.lc-mcfg { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0.75rem 1rem; align-items: center; }
.lc-mcfg .field-label { margin: 0; }
.lc-mlabels { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.lc-mlabels label { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.lc-mlabels input { width: 150px; }
.lc-mchk { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.lc-mchk input { width: auto; flex: none; }
@media (max-width: 640px) {
    .lc-mcfg { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
    .lc-mcfg > .field-label:not(:first-child) { margin-top: 0.5rem; }
}
/* v79: Danh sách — loại áo khách chọn ở biến thể (đơn từ listing gộp) */
.pt-chip { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-right: 4px; white-space: nowrap; }
.pt-chip.is-t { background: var(--ty-t-bg); color: var(--ty-t); }
.pt-chip.is-h { background: var(--ty-h-bg); color: var(--ty-h); }
.pt-chip.is-s { background: var(--ty-s-bg); color: var(--ty-s); }
/* ---------- v80: 🧩 Gộp 3 loại — ảnh từng loại (dòng / Kho Ảnh / 🪄 tạo / tạm bỏ) + file design + tiến trình tạo ảnh ---------- */
.lc-mtbl { min-width: 1000px; }
.lc-mtbl .lc-mti { min-width: 200px; }
.lc-mtitle { line-height: 1.35; }
.lc-mti .lc-mnote { margin-top: 5px; min-width: 0; }
.lc-mtc { min-width: 140px; }
.lc-mcell { display: flex; gap: 8px; align-items: flex-start; }
.lc-mcell .lc-mth { flex: none; }
.lc-mtx { display: flex; flex-direction: column; gap: 1px; font-size: 0.74rem; color: var(--text-secondary); line-height: 1.3; min-width: 0; }
.lc-mtx b { color: var(--text-primary); font-size: 0.76rem; white-space: nowrap; }
.lc-mtx a, .lc-mlink { font-size: 0.72rem; }
.lc-mth.is-todo { border: 2px dashed color-mix(in srgb, var(--warning) 70%, transparent); background: var(--warning-bg); color: var(--warning); font-size: 1.05rem; }
.lc-mth.is-miss { border: 2px dashed color-mix(in srgb, var(--danger) 60%, transparent); background: var(--danger-bg); color: var(--danger); font-weight: 700; }
.lc-mok { color: var(--success) !important; }
.lc-mbad { color: var(--danger) !important; }
.lc-mtx b.lc-mwarn { color: var(--warning); }
.lc-mlink { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; }
.lc-mlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lc-mdes { min-width: 150px; max-width: 220px; }
.lc-mdes > .lc-mbad { font-size: 0.74rem; font-weight: 600; margin-bottom: 4px; }
.lc-mdin { display: flex; gap: 4px; }
.lc-mdin[hidden] { display: none; }
.lc-mdes .lc-mcell + .lc-mdin { margin-top: 6px; }
.lc-mdin input { min-width: 0; flex: 1; padding: 4px 7px; font-size: 0.76rem; }
.lc-mdin .btn { padding: 3px 10px; font-size: 0.76rem; }
.lc-mjobs { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; background: var(--bg-page); }
.lc-mjobs-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lc-mjobs[hidden], .lc-mjobs [hidden] { display: none !important; }   /* thuộc tính hidden thắng .btn { display: inline-flex } */
.lc-mtplwarn { font-size: 0.78rem; color: var(--warning); margin-top: 6px; }
.lc-mprog { margin-top: 8px; max-width: 640px; }
.lc-mprog-t { font-weight: 700; font-size: 0.82rem; }
.lc-mbar { height: 9px; border-radius: 99px; background: color-mix(in srgb, var(--text-primary) 10%, transparent); overflow: hidden; margin: 6px 0; }
.lc-mbar i { display: block; height: 100%; width: 0; background: var(--text-primary); border-radius: 99px; transition: width 0.25s; }
.lc-mlog { max-height: 150px; overflow-y: auto; font-size: 0.74rem; line-height: 1.5; }
.lc-mtpl { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: center; max-width: 620px; }
.lc-mtpl select { width: 100%; }
.lc-mtpl-k { font-size: 0.82rem; font-weight: 600; }
.st-cost-tbl input { min-width: 64px; }
@media (max-width: 640px) {
    .lc-mtpl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .lc-mtpl > span:first-child { display: none; }
    .lc-mtpl-k { grid-column: 1 / -1; margin-top: 4px; }
}
/* v80: Auto Mockup — Tạo luôn bộ 3 (Hoodie + Sweatshirt) */
.am-bo3 { display: flex; gap: 8px; align-items: flex-start; margin: 0.7rem 0 0; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 10px; font-size: 0.84rem; font-weight: 500; cursor: pointer; }
.am-bo3 input { width: auto; margin-top: 3px; flex: none; }
.am-bo3 small { display: block; color: var(--text-secondary); font-size: 0.76rem; margin-top: 2px; }
.am-bo3.is-off { opacity: 0.75; cursor: default; }
/* ---------- v81: Thưởng doanh số = Đã giao + Đã về payout · chốt tháng · đối soát tháng · đơn huỷ ngoài tool ---------- */
.bn-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bn-sub { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.bn-st { margin-left: auto; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.bn-st.is-open { background: var(--warning-bg); color: var(--warning); }
.bn-st.is-closed { background: var(--success-bg); color: var(--success); }
.bn-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: -0.3rem; line-height: 1.5; }
.bn-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 0.8rem; font-size: 12px; }
.bn-tbl .bn-name { white-space: nowrap; }
.bn-tg { all: unset; cursor: pointer; display: inline-flex; width: 20px; justify-content: center; color: var(--text-secondary); font-size: 12px; margin-right: 4px; }
.bn-tg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.bn-hh { font-weight: 700; color: var(--success); white-space: nowrap; }
.bn-neg { color: var(--danger); font-weight: 600; }
.bn-pos { color: var(--success); font-weight: 600; }
.bn-wait { min-width: 170px; }
.bn-chip { display: inline-flex; align-items: center; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
    background: var(--bg-hover); color: var(--text-secondary); white-space: nowrap; }
.bn-chip.bn-stuck { background: var(--danger-bg); color: var(--danger); }
.bn-chip.bn-confirm { background: var(--accent-bg); color: var(--accent); }
.bn-chip.bn-wait_deliv, .bn-chip.bn-wait_pay { background: var(--warning-bg); color: var(--warning); }
.bn-total td { font-weight: 700; background: var(--bg-page); }
.bn-det > td { background: var(--bg-page); padding: 8px 10px 12px; }
.bn-items { font-size: 12.5px; }
.bn-items td { vertical-align: top; }
.bn-oid { font-family: ui-monospace, monospace; font-size: 12px; white-space: nowrap; }
.bn-ti { font-size: 11.5px; color: var(--text-muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-nw { white-space: nowrap; }
.bn-why { font-size: 12px; color: var(--text-secondary); min-width: 200px; }
.bn-pill { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--bg-hover); color: var(--text-secondary); }
.bn-p-ok { background: var(--success-bg); color: var(--success); }
.bn-p-warn { background: var(--warning-bg); color: var(--warning); }
.bn-p-bad { background: var(--danger-bg); color: var(--danger); }
.bn-p-acc { background: var(--accent-bg); color: var(--accent); }
.bn-k-adjust td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.bn-k-late td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.bn-k-wait td { opacity: 0.85; }
.bn-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 14px; background: var(--bg-page); }
.bn-h { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.bn-h .tk-muted { font-weight: 500; font-size: 12px; }
.bn-ck { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 3px 0; line-height: 1.45; }
.bn-ck i { font-style: normal; flex: none; width: 18px; text-align: center; }
.bn-ck-bad { color: var(--danger); font-weight: 600; }
.bn-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.bn-acts .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.bn-reopen { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12px; }
.ba-sub2 { font-size: 11.5px; color: var(--text-secondary); margin: -1px 0 5px 10px; line-height: 1.4; }
.ba-sub2.is-done { color: var(--success); }
.ba-ln.ba-cx span { font-weight: 600; }
.dt-rg { display: inline-block; margin: 1px 6px 1px 0; padding: 0 7px; border-radius: 6px; background: var(--success-bg); color: var(--success); font-size: 12px; font-weight: 600; white-space: nowrap; }
.dt-acc { margin-bottom: 12px; max-width: 760px; }
.dt-miss b { color: var(--warning); }
.pf-bonus { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border); font-size: 0.74rem; line-height: 1.4; display: flex; flex-direction: column; gap: 2px; }
.pf-bonus span { color: var(--text-secondary); }
.pf-b-ok b { color: var(--success); }
.pf-b-warn b { color: var(--warning); }
.pf-b-bad b { color: var(--danger); }
.pf-b-acc b { color: var(--accent); }
@media (max-width: 640px) {
    .bn-st { margin-left: 0; }
    .bn-why { min-width: 140px; }
}
.bn-wd { margin-top: 8px; }
/* bảng thưởng: chip "đang chờ" + ghi chú xuống dòng thay vì kéo bảng rộng quá thẻ (trang bị cuộn ngang) */
#bonusCard .table-wrap { overflow-x: auto; max-width: 100%; }
.txp-sub { font-size: 11px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.ba-ln.ba-miss b { color: var(--warning); }
#bonusCard table.bn-tbl td.bn-wait, #bonusCard td.bn-why { white-space: normal; }
.bn-wd > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; padding: 4px 0; }
.bn-wd > summary .tk-muted { font-weight: 500; }

/* ---------- v82: Size + Personalization · Thanh toán Hold / Paid ---------- */
#ordersTable td.ds-size { white-space: nowrap; }
.ds-sz { font-weight: 700; font-size: 13px; letter-spacing: .2px; }
.ds-sz.is-t { color: var(--text-secondary); font-weight: 600; }          /* size lấy từ [..] cuối Item Title */
#ordersTable td.ds-perso { max-width: 220px; }
.ds-mut { color: var(--text-muted); }
.ds-mock { color: var(--text-secondary); }                                 /* v83: khách không ghi → Mockup */
.badge.pay-man { white-space: nowrap; background: var(--success-bg); color: var(--success); opacity: .85; outline: 1px dashed currentColor; outline-offset: -1px; }
.badge.pay-hold-b { white-space: nowrap; }

/* ---------- v84: Loại áo tuỳ chỉnh (🏷️ Loại áo) · bảng giá từng loại · Gộp loại theo Title · Tạo luôn bộ ---------- */
:root { --ty-l: #92400e; --ty-l-bg: #fef3c7; --ty-x: #9f1239; --ty-x-bg: #ffe4e6; }
[data-theme="dark"] { --ty-l: #fcd34d; --ty-l-bg: rgba(245, 158, 11, 0.18); --ty-x: #fda4af; --ty-x-bg: rgba(244, 63, 94, 0.16); }
.lc-ty.is-l, .pt-chip.is-l { background: var(--ty-l-bg); color: var(--ty-l); }
.lc-ty.is-x, .pt-chip.is-x { background: var(--ty-x-bg); color: var(--ty-x); }
.lc-ty.is-offtype { opacity: 0.55; text-decoration: line-through; }
.lc-tab.is-offtype { opacity: 0.6; }
.lc-pill.is-bad { background: var(--danger-bg); color: var(--danger); }
.lc-pnote { font-size: 0.8rem; line-height: 1.45; color: var(--text-secondary); background: var(--bg-page); border: 1px solid var(--border);
    border-radius: 8px; padding: 7px 10px; margin: 0 0 0.75rem; }
.lc-pnote b { color: var(--text-primary); }
.lc-mtypes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.lc-mblock { font-size: 0.8rem; font-weight: 600; color: var(--danger); background: var(--danger-bg); border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; }
.lc-mtbl tr.lc-mrow.is-bad > td { background: color-mix(in srgb, var(--danger) 6%, transparent); }
.lc-msold { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lc-msold .lc-ty { font-size: 0.7rem; padding: 1px 6px; }
.lc-mth.is-shared { position: relative; outline: 2px dashed color-mix(in srgb, var(--text-muted) 70%, transparent); outline-offset: 1px; }
.lc-mth.is-shared img { opacity: 0.55; }
.lc-mbadge { position: absolute; right: 1px; bottom: 0; font-style: normal; font-size: 0.8rem; line-height: 1; }
/* bảng loại áo — khung cuộn làm mốc cho chữ ẩn (sr-only) trong bảng, để không kéo rộng trang trên điện thoại */
.lc-ptbl-wrap { position: relative; }
.lc-ttbl { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 0.8rem; }
.lc-ttbl th, .lc-ttbl td { padding: 6px 5px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.lc-ttbl th { color: var(--text-secondary); font-weight: 600; font-size: 0.74rem; background: var(--bg-page); }
.lc-ttbl th small { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.68rem; }
.lc-trow.is-off .lc-tin { opacity: 0.6; }
.lc-trow.is-new > td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.lc-trow.is-drag { opacity: 0.5; }
.lc-tt-ord { width: 74px; white-space: nowrap; color: var(--text-muted); }
.lc-tdrag { cursor: grab; padding: 0 4px; font-weight: 700; letter-spacing: -2px; color: var(--text-muted); }
.lc-tmv, .lc-tdel { all: unset; cursor: pointer; padding: 3px 5px; border-radius: 6px; font-size: 0.72rem; line-height: 1; }
.lc-tmv:hover:not(:disabled), .lc-tdel:hover { background: var(--bg-page); }
.lc-tmv:disabled { opacity: 0.3; cursor: default; }
.lc-tmv:focus-visible, .lc-tdel:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lc-tdel { font-size: 0.95rem; }
.lc-tt-on { width: 42px; text-align: center !important; }
.lc-tt-on input { width: auto; }
.lc-tt-ic { width: 54px; }
.lc-tt-ic input { width: 46px; text-align: center; padding: 5px 2px; }
.lc-tt-lab { min-width: 140px; }
.lc-tt-w { min-width: 200px; }
.lc-tt-f { min-width: 120px; }
.lc-tt-del { width: 86px; white-space: nowrap; }
.lc-tin { width: 100%; padding: 5px 6px; font-size: 0.8rem; }
.lc-tnew { display: block; color: var(--accent); font-size: 0.68rem; margin-top: 2px; }
.lc-tlock { color: var(--text-muted); font-size: 0.72rem; }
.lc-tadd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 0.7rem; }
.lc-tadd select { width: auto; max-width: 200px; }
.lc-tadd-sp { flex: 1 1 auto; }
.lc-tdirty { color: var(--warning) !important; font-weight: 600; margin: 0 !important; }
.lc-trules { margin: 0.7rem 0 0; padding-left: 1.1rem; font-size: 0.76rem; color: var(--text-secondary); line-height: 1.5; }
.lc-trules code { font-size: 0.74rem; }
.lc-ttest { display: flex; gap: 8px; align-items: center; }
.lc-ttest input { flex: 1 1 auto; min-width: 0; }
.lc-ttest .btn { flex: none; white-space: nowrap; }
.lc-tex { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-top: 6px; }
.lc-tex-b { font-size: 0.74rem; text-align: left; }
.lc-tres { margin-top: 0.6rem; font-size: 0.8rem; display: flex; flex-direction: column; gap: 4px; min-height: 1.2em; }
.lc-tres-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lc-tres-row .lc-note { margin: 0; }
/* bảng giá từng loại */
.lc-pmx { min-width: 760px; }
.lc-pmx th[scope="row"] { text-align: left; white-space: nowrap; vertical-align: middle; border-right: 1px solid var(--border); padding-right: 10px; }
.lc-pmx th[scope="row"] small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--text-muted); margin-top: 3px; }
.lc-pmx td:nth-child(2), .lc-pmx tr.lc-pmx-2 td:first-child { text-align: left; white-space: nowrap; }
.lc-pmx td small { display: block; font-size: 0.66rem; color: var(--text-muted); font-weight: 500; }
.lc-pmx tr.lc-pmx-1 > td, .lc-pmx tr.lc-pmx-1 > th { border-bottom: 1px dashed var(--border); }
.lc-pmx tr.is-off { opacity: 0.6; }
@media (max-width: 640px) {
    .lc-ttest { flex-wrap: wrap; }
    .lc-ttest input { flex-basis: 100%; }
    .lc-ttest .btn { flex: 1 1 auto; }
}
/* Auto Mockup — Tạo luôn bộ: tích chọn loại */
.am-bo { margin: 0.7rem 0 0; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 10px; font-size: 0.84rem; }
.am-bo-h { font-weight: 500; }
.am-bo-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 2px; }
.am-bo-it { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-weight: 600; cursor: pointer; }
.am-bo-it input { width: auto; flex: none; }
.am-bo-it.is-off { opacity: 0.55; cursor: default; }
.am-bo-it small { font-weight: 500; color: var(--text-muted); }
.am-bo > small { display: block; color: var(--text-secondary); font-size: 0.76rem; }
.am-bo.is-off { opacity: 0.8; }

/* ---------- v85: 📷 Theo ảnh (AI) — bảng listing theo ảnh · cấu hình AI đọc ảnh · áo trơn cho Tạo luôn bộ ---------- */
.lc-ptab { min-width: 980px; }
.lc-ptab td { vertical-align: top; }
.lc-ptab .lc-mth { width: 56px; height: 56px; margin: 0; }
.lc-pai { min-width: 170px; max-width: 240px; line-height: 1.35; }
.lc-pai .lc-note, .lc-ptab td > .lc-note { margin: 2px 0 0; font-size: 0.72rem; }
.lc-pok { color: var(--success); }
.lc-pold { color: var(--text-muted); }
.lc-pold del { color: var(--text-muted); }
.lc-ptab .lc-msel { margin: 0; padding: 3px 26px 3px 8px; background-position: right 7px center; }
.lc-ptab .link-btn { display: block; margin-top: 3px; font-size: 0.74rem; }
.lc-aicfg { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.lc-aicfg select { width: auto; }
.lc-aicfg label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-secondary); }
.lc-aicfg input[type=number] { padding: 4px 8px; }
.am-bocfg { display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: center; max-width: 640px; }
.am-bocfg .am-bocfg-k { font-weight: 600; font-size: 0.85rem; }
.am-bocfg .lc-note { margin: 0; }
@media (max-width: 640px) {
    .am-bocfg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .am-bocfg .am-bocfg-k { grid-column: 1 / -1; margin-top: 4px; }
    .am-bocfg > .am-bocfg-h { display: none; }
}

/* ---------- v86: 🧹 Dọn ảnh Cloudflare ---------- */
.da-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.da-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.da-acts form { margin: 0; }
.da-job { margin-top: 10px; font-weight: 600; font-size: 0.85rem; }
.da-err { color: var(--danger); font-size: 0.82rem; margin-bottom: 6px; }
.da-cfg { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 0.85rem; }
.da-cfg label { display: inline-flex; align-items: center; gap: 6px; }
.da-cfg input[type=number] { padding: 4px 8px; }
.da-chk input { width: auto; }
.da-chk small { color: var(--text-muted); }
.da-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.da-tab { border: 1px solid var(--border); border-radius: 9px; padding: 6px 11px; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.da-tab.is-on { background: var(--text-primary); color: var(--bg-card, #fff); border-color: var(--text-primary); }
.da-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.da-filter input[type=text] { width: 16rem; max-width: 100%; }
.da-filter select { width: auto; }
.da-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.da-tbl td { vertical-align: middle; }
.da-tbl input[type=checkbox] { width: auto; }
.da-th { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.da-gone { font-size: 1.3rem; }
.da-name { max-width: 380px; word-break: break-word; }
.da-id { font-family: ui-monospace, monospace; font-size: 0.7rem; color: var(--text-muted); word-break: break-all; }
.da-pages { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; align-items: center; }
.mk-gone { background: var(--bg-page); color: var(--text-muted); border: 1px dashed var(--border); font-size: 0.7rem; }

/* v93 — ô vừa sao chép ở Danh sách đơn: sáng 2 phút / tới khi sao chép ô khác */
#ordersTable td.cp-mark { background: var(--warning-bg) !important; box-shadow: inset 3px 0 0 var(--warning); }
#ordersTable .oid-copy.cp-mark, #ordersTable .cn-copy.cp-mark { background: var(--warning-bg); color: var(--text-primary, inherit); font-weight: 700; border-radius: 4px; }

/* v114 — Cài đặt › Sao lưu: gửi bản mã hoá ra ngoài (Telegram) + hộp xác nhận mật khẩu */
.bko { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; background: var(--bg-input); }
.bko-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.bko-note { font-size: 12px; color: var(--text-secondary); margin: 6px 0 8px; line-height: 1.5; }
.bko-rows { display: grid; gap: 8px; }
.bko-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; font-size: 13px; }
.bko-row > span:first-child { font-weight: 600; padding-top: 6px; color: var(--text-primary); }
.bko-row > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bko-row small { color: var(--text-muted); font-size: 11.5px; font-weight: 400; }
.bko-tg { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; padding-top: 6px; }
.bko-tg input { width: auto; }
.bko-ok { padding-top: 6px; }
.bko-pw summary { cursor: pointer; font-size: 12px; color: var(--accent, var(--text-secondary)); }
.bko-pw-g { display: flex; gap: 8px; flex-wrap: wrap; }
.bko-pw-g input { flex: 1; min-width: 160px; }
.bko-help { font-size: 12.5px; margin-top: 10px; color: var(--text-secondary); }
.bko-help summary { cursor: pointer; font-weight: 600; }
.bko-help ol { padding-left: 1.2rem; margin: 6px 0 0; line-height: 1.6; }
.bko-code { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; overflow-x: auto; margin: 4px 0; user-select: all; }
.bk-dlg { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; width: min(420px, 92vw); background: var(--bg-card); color: var(--text-primary); }
.bk-dlg::backdrop { background: rgba(0, 0, 0, 0.35); }
.bk-dlg-t { font-weight: 700; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.bk-dlg input[type=password] { width: 100%; }
@media (max-width: 640px) { .bko-row { grid-template-columns: 1fr; gap: 2px; } .bko-row > span:first-child { padding-top: 0; } }

/* v115 — Thưởng: tháng chưa hết → khối kiểm tra thu gọn 1 dòng */
.bn-pre > summary { cursor: pointer; list-style: none; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 0.86rem; }
.bn-pre > summary::-webkit-details-marker { display: none; }
.bn-pre-m { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); }
.bn-pre[open] .bn-pre-m { visibility: hidden; }
.bn-pre[open] > summary { margin-bottom: 8px; }

/* v115 — Báo cáo: tab nhỏ trong Tổng quan + nút ⓘ giải thích */
.bc-subs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.bc-subt { border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); border-radius: 999px; padding: 5px 13px;
    font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.bc-subt:hover { background: var(--seg-bg); }
.bc-subt.on { background: var(--text-primary); color: var(--bg-card); border-color: var(--text-primary); }
.bc-sub[hidden] { display: none !important; }
.xp-i { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--text-muted); background: transparent;
    color: var(--text-muted); font: 700 10.5px/1 Georgia, "Times New Roman", serif; font-style: italic; cursor: help; padding: 0; margin: 0 4px; vertical-align: 2px; flex: none; }
.xp-i:hover, .xp-i:focus-visible { border-color: var(--accent, var(--text-primary)); color: var(--accent, var(--text-primary)); }
.xp-pop { position: fixed; z-index: 1200; background: var(--text-primary); color: var(--bg-card); border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
    line-height: 1.55; box-shadow: 0 10px 28px rgba(0,0,0,0.28); max-height: 60vh; overflow: auto; }
.xp-pop a { color: inherit; text-decoration: underline; }
.xp-pop .xp-part + .xp-part { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.18); }
.xp-pop p, .xp-pop div { margin: 0; color: inherit !important; font-size: inherit !important; }
.xp-pop .tx-sub, .xp-pop .bn-sub { display: block; margin: 0; color: inherit; font-weight: 400; }

/* v115 — ảnh mockup hiện TRỌN trong ô (không cắt) · 🌹 đơn đã trả hoa hồng */
.mockup-thumb, #ordersTable td .mockup-thumb, .bp-thumb, .kh-thumbs img { object-fit: contain !important; background: #fff; }
.hh-rose { display: inline-block; font-size: 12px; line-height: 1; margin-right: 3px; vertical-align: 1px; cursor: help; }
.bn-acts > [hidden] { display: none !important; }

/* v142: Listing CSV — 📷 Theo ảnh: dòng chưa có loại + nút Đoán theo Title · 🔤 Theo Title · 🧩 Gộp loại */
.lc-guess { display: block; margin-top: 5px; padding: 0.25rem 0.6rem; font-size: 0.74rem; border-radius: 8px; white-space: nowrap; }
.lc-need { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lc-need .btn { padding: 0.32rem 0.75rem; font-size: 0.78rem; }
.lc-msel.is-need { border-color: var(--danger); color: var(--danger); font-weight: 600; }
.lc-mper { display: flex; align-items: center; gap: 6px; margin: 2px 0; white-space: nowrap; }
.lc-mper small { color: var(--text-secondary); font-size: 0.74rem; }

/* v143: Listing CSV — Title đã tự sửa từ cấm eBay */
.lc-fix { margin-bottom: 0.6rem; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--bg-card); font-size: 0.8rem; }
.lc-fix-h { font-weight: 600; margin-bottom: 4px; }
.lc-fix-w { max-height: 220px; overflow: auto; }
.lc-fix-r { padding: 4px 0; border-top: 1px solid var(--border); }
.lc-fix-r del { color: var(--danger); }

/* v146 — chặn mặc định khi tạo file: khung kết quả ở Xem trước + thẻ cấu hình ở Tool › Quét VeRO */
.vr-ai-st { border-radius: 10px; padding: 7px 10px; font-size: 12.5px; margin: 0 0 10px; line-height: 1.45; }
.vr-ai-st.is-on { background: var(--bg-hover); color: var(--text-secondary); }
.vr-ai-st.is-off { background: var(--warning-bg); color: var(--warning); }
.vr-gate-form { display: grid; gap: 8px; max-width: 720px; }
.vr-gate-form select { max-width: 420px; }
.vr-gate-ck { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.vr-gate-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; align-items: center; }
.vr-gate-row input[type=number] { width: 84px; display: inline-block; margin: 0 4px; }
.vr-gate-form .btn { justify-self: start; }
.vr-allow { margin-top: 12px; font-size: 13px; } .vr-allow summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.lc-gate-h { border-radius: 10px; padding: 8px 11px; font-size: 13px; line-height: 1.5; margin: 0 0 6px; font-weight: 600; }
.lc-gate-h.is-out { background: var(--danger-bg); color: var(--danger); }
.lc-gate-h.is-warn { background: var(--warning-bg); color: var(--warning); }
.lc-gate-h.is-none { background: var(--bg-hover); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border); font-weight: 500; }
.lc-gate-h small { display: block; font-weight: 400; font-size: 12px; margin-top: 2px; color: var(--text-secondary); }
.lc-gate-ai { font-size: 12px; color: var(--text-secondary); margin: 0 0 6px; }
.lc-gate-ai.is-bad { color: var(--warning); font-weight: 600; }
.lc-gate-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.lc-gate-wrap { overflow: auto; max-height: 340px; border: 1px solid var(--border); border-radius: 8px; }
.lc-gate-wrap table { margin: 0; }
.lc-gate-wrap tr.is-out td.vr-ti { text-decoration: line-through; text-decoration-color: var(--danger); }
.lc-gate-wrap tr.is-pass td { opacity: 0.75; }
.lc-gate-prog { height: 6px; border-radius: 4px; background: var(--bg-hover); overflow: hidden; margin: 6px 0; }
.lc-gate-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s; }

/* v147 — listing Custom của từng acc: hộp hỏi khi Tạo & Tải + phần cài ở 👤 Account Profile */
.lc-cus-ov { position: fixed; inset: 0; z-index: 9999; background: rgba(20, 18, 15, 0.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lc-cus-box { background: var(--bg-card, #fff); color: var(--text-primary); border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; }
.lc-cus-box h3 { margin: 0 0 6px; font-size: 17px; }
.lc-cus-acc { font-size: 13.5px; } .lc-cus-acc b { background: var(--bg-hover); border-radius: 999px; padding: 2px 10px; }
.lc-cus-item { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin: 12px 0; }
.lc-cus-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--bg-hover); flex: none; }
.lc-cus-t { font-weight: 600; font-size: 14px; line-height: 1.35; }
.lc-cus-btns { display: grid; gap: 8px; margin-top: 10px; }
.lc-cus-b { text-align: left; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card, #fff); color: inherit; cursor: pointer; }
.lc-cus-b small { display: block; font-weight: 400; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.lc-cus-b.is-p { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-card, #fff); } .lc-cus-b.is-p small { color: inherit; opacity: 0.82; }
.lc-cus-b:hover { filter: brightness(0.97); } .lc-cus-b:focus-visible, .lc-cus-x:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.lc-cus-x { margin-top: 10px; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 12.5px; color: var(--text-secondary); text-decoration: underline; cursor: pointer; }
.lc-cus-st { border-radius: 10px; padding: 7px 10px; font-size: 12.5px; margin: 0 0 10px; }
.lc-cus-st.is-ok { background: var(--bg-hover); color: var(--text-secondary); } .lc-cus-st.is-off { background: var(--warning-bg); color: var(--warning); }
.lc-cus-form { display: grid; gap: 6px; max-width: 760px; } .lc-cus-form .btn { justify-self: start; margin-top: 4px; }
.lc-cus-ck { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.lc-cus-yes { color: var(--success); font-weight: 600; } .lc-cus-no { color: var(--warning); font-weight: 600; }

/* ---------- v157: ⛔ khách trong Blacklist — chip đỏ ở cột Note + nút lọc ---------- */
#ordersTable td.ds-note .ab-n.bl-hit { display: inline; cursor: help; font-size: 10.5px; padding: 1px 6px; margin-right: 0; }
.ab-n.bl-hit { background: var(--danger-bg); color: var(--danger); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.ship-chip.is-blk { border-color: color-mix(in srgb, var(--danger) 60%, transparent); color: var(--danger); }
.ship-chip.is-blk.is-on { background: var(--danger-bg); color: var(--danger); }
.ship-chip.is-blk.is-on b { color: inherit; }
@media (max-width: 1750px) { .ds-chips .ship-chip.is-blk .cl { display: none; } }
/* v157: tab dạng link (trang Khách hàng: 👥 Khách hàng · ⛔ Blacklist) */
a.st-tab { text-decoration: none; }
.st-tab.is-on { color: var(--text-primary); font-weight: 600; }
.st-tab.is-on::after { background: var(--text-primary); }
/* v157: Tổng quan › ô Lợi nhuận — số đơn lỗ + tiền lỗ trong kỳ */
.ov-loss { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; align-self: flex-start; padding: 2px 8px; border-radius: 7px;
    background: var(--danger-bg); color: var(--danger); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ov-loss b { font-weight: 800; }
.ov-loss:hover { filter: brightness(0.96); }
/* v157: tab "Tiến độ & Mục tiêu" còn 2 thẻ (Việc cần làm chuyển sang To Do) → chia đôi hàng trên */
@media (min-width: 900px) { #stPane-viec-can-lam .ov-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
