/* =====================================================================================
   LCD Pro 2 - DIỆN MẠO MỚI (từ 2.6.0: bộ nhận diện "mực tím")
   Nạp SAU style.css + components2.css, chỉ trong layouts/modern.html. Mọi luật nằm trong phạm vi
   `body.ui2` nên KHÔNG ảnh hưởng giao diện cũ (layouts/classic.html).

   Muốn đổi màu chủ đạo: sửa 6 dòng đầu mục 1 (--primary, --primary-dark, --primary-light,
   --primary-rgb, --primary-soft, --brand-a/--brand-b). Mọi trang đổi theo.

   Mục lục: 1 biến · 2 thanh trên · 3 menu bên · 4 đế điều hướng (điện thoại) · 5 khung nội dung
            6 thẻ · 7 nút · 8 ô nhập · 9 bảng · 10 nhãn & bộ lọc · 11 hộp thoại & thông báo
            12 đơn hàng / quy trình · 13 trang Hôm nay · 14 đăng nhập · 15 in ấn
   ===================================================================================== */

/* ---------- 1. Bộ biến ---------- */
body.ui2 {
    --primary: #6246EA;
    --primary-dark: #4F35D2;
    --primary-light: #EFEBFF;
    --primary-rgb: 98, 70, 234;
    --primary-soft: #B9A8FF;
    --brand-a: #7C5CFF;
    --brand-b: #4A2FCB;
    --brand-grad: linear-gradient(135deg, var(--brand-a) 0%, var(--primary) 48%, var(--brand-b) 100%);
    --brand-grad-x: linear-gradient(90deg, #7350F2 0%, var(--primary) 45%, #5133D6 100%);
    --accent: #FFD15C;                 /* tia sét trên biểu tượng */

    --ink: #17142D;                    /* khung tối: menu bên, đế điều hướng */
    --ink-2: #231F42;
    --bg: #F4F3FA;
    --bg-card: #FFFFFF;
    --bg-soft: #F8F7FD;                /* nền phụ trong thẻ */
    --text: #17142D;
    --text-muted: #6F6B8A;
    --muted: #6F6B8A;                  /* nhiều trang dùng var(--muted) nhưng bản cũ chưa hề khai báo */
    --secondary: #524E6B;
    --border: #E7E4F1;
    --line: #F0EEF7;                   /* đường kẻ mảnh trong thẻ */

    --sidebar-bg: var(--ink);
    --sidebar-text: #B9B5D3;
    --sidebar-active: var(--primary);
    --sidebar-width: 248px;

    --top-bar-height: 56px;
    --dock-h: 62px;                    /* đế điều hướng dưới (điện thoại) */
    --radius: 16px;
    --radius-sm: 12px;
    --ring: 0 0 0 1px rgba(23, 20, 45, .06);
    --shadow: 0 0 0 1px rgba(23, 20, 45, .05), 0 1px 2px rgba(23, 20, 45, .04), 0 8px 22px rgba(23, 20, 45, .05);
    --shadow-lg: 0 20px 48px rgba(23, 20, 45, .2);

    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -.003em;
    font-variant-numeric: tabular-nums;
    -webkit-tap-highlight-color: transparent;
}
/* trang không có khung (đăng nhập, trang tra cứu của khách): bỏ khoảng trống dành cho thanh trên */
body.ui2:not(.has-bottom-nav) { padding-top: 0; }
body.ui2 a:focus-visible,
body.ui2 button:focus-visible,
body.ui2 .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.ui2 ::selection { background: rgba(var(--primary-rgb), .22); }
body.ui2 input[type="checkbox"], body.ui2 input[type="radio"], body.ui2 progress { accent-color: var(--primary); }

/* ---------- 2. Thanh trên ---------- */
/* Điện thoại: thanh màu thương hiệu, chữ trắng (khác hẳn thanh trắng của bản cũ) */
body.ui2 .top-bar {
    gap: 8px;
    padding: 0 10px 0 6px;
    background: var(--brand-grad-x);
    border-bottom: none;
    color: #fff;
}
body.ui2 .top-bar-left { flex: 1 1 auto; gap: 4px; }
body.ui2 .top-bar-right { gap: 8px; }
body.ui2 .hamburger { color: #fff; border-radius: 12px; font-size: 20px; }
body.ui2 .hamburger:active { background: rgba(255, 255, 255, .16); }
body.ui2 .page-title { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }

body.ui2 .tb-search {
    flex: 0 0 38px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font: inherit; font-size: 16px;
    cursor: pointer;
}
body.ui2 .tb-search-text, body.ui2 .tb-search kbd { display: none; }
body.ui2 .tb-search:active { background: rgba(255, 255, 255, .28); }
body.ui2 .tb-new { display: none; }
body.ui2 .top-bar .btn-icon {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 16px;
}
body.ui2 .top-bar .btn-icon:active { background: rgba(255, 255, 255, .28); }
body.ui2 .notif-badge { box-shadow: 0 0 0 2px var(--primary); }

@media (min-width: 768px) {
    /* Máy tính: thanh sáng, mờ nền, dính trên cùng */
    body.ui2 { --top-bar-height: 64px; }
    body.ui2 .top-bar {
        position: sticky; top: 0; z-index: 90;
        height: var(--top-bar-height);
        padding: 0 28px;
        gap: 18px;
        background: rgba(244, 243, 250, .86);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        color: var(--text);
    }
    body.ui2 .top-bar-left { flex: 1 1 0; }
    body.ui2 .top-bar-right { flex: 1 1 0; justify-content: flex-end; gap: 10px; }
    body.ui2 .page-title { color: var(--text); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

    body.ui2 .tb-search {
        flex: 0 1 460px; width: auto; height: 40px;
        justify-content: flex-start;
        padding: 0 10px 0 14px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: #fff;
        font-size: 13.5px;
        color: var(--text-muted);
        box-shadow: 0 1px 2px rgba(23, 20, 45, .04);
        transition: border-color .15s, box-shadow .15s;
    }
    body.ui2 .tb-search i { font-size: 14px; }
    body.ui2 .tb-search-text { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    body.ui2 .tb-search kbd {
        display: inline-block; margin-left: auto;
        padding: 2px 8px; border-radius: 999px;
        border: 1px solid var(--border); background: var(--bg);
        font: 600 11px/1.5 inherit; color: var(--secondary); white-space: nowrap;
    }
    body.ui2 .tb-search:hover { border-color: var(--primary-soft); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .08); }

    body.ui2 .tb-new {
        display: inline-flex; align-items: center; gap: 7px;
        height: 40px; padding: 0 16px;
        border-radius: 999px;
        background: var(--brand-grad); color: #fff;
        font-size: 13.5px; font-weight: 700;
        box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35);
    }
    body.ui2 .tb-new:hover { filter: brightness(1.07); opacity: 1; }
    body.ui2 .top-bar .btn-icon {
        width: 40px; height: 40px;
        border: 1px solid var(--border); border-radius: 50%;
        background: #fff; color: var(--secondary);
        font-size: 15px;
    }
    body.ui2 .top-bar .btn-icon:hover { border-color: var(--primary-soft); color: var(--primary); opacity: 1; }
    body.ui2 .notif-badge { box-shadow: 0 0 0 2px #fff; }
}

/* ---------- 3. Menu bên ---------- */
body.ui2 .sidebar {
    background:
        radial-gradient(520px 260px at -20% -6%, rgba(124, 92, 255, .38), transparent 62%),
        radial-gradient(420px 240px at 120% 104%, rgba(98, 70, 234, .22), transparent 60%),
        var(--ink);
    border-right: none; box-shadow: none;
}
body.ui2 .sidebar.open { box-shadow: 10px 0 44px rgba(10, 8, 26, .5); }
body.ui2 .sidebar-header { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
body.ui2 .brand-icon {
    width: 40px; height: 40px; border-radius: 13px; font-size: 18px;
    background: var(--brand-grad);
    color: var(--accent);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
body.ui2 .brand-name { color: #fff; font-size: 17.5px; font-weight: 800; letter-spacing: -.02em; }
body.ui2 .brand-sub { color: #8F8AAE; }
body.ui2 .sidebar-brand:hover { opacity: 1; }
body.ui2 .sidebar-close { background: rgba(255, 255, 255, .09); color: #D6D2EA; }

body.ui2 .sidebar-nav { padding: 4px 10px 14px; scrollbar-width: thin; scrollbar-color: #3B3660 transparent; }
body.ui2 .sidebar-nav::-webkit-scrollbar { width: 6px; }
body.ui2 .sidebar-nav::-webkit-scrollbar-thumb { background: #3B3660; border-radius: 3px; }
body.ui2 .nav-section {
    padding: 18px 12px 7px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #7772A0;
}
body.ui2 .nav-item {
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-left: none;
    border-radius: 12px;
    color: var(--sidebar-text);
    font-size: 13.5px;
}
body.ui2 .nav-item i { width: 20px; font-size: 15px; color: #8F8AAE; transition: color .15s; }
body.ui2 .nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; opacity: 1; }
body.ui2 .nav-item:hover i { color: #D6D2EA; }
body.ui2 .nav-item:active { background: rgba(255, 255, 255, .11); }
body.ui2 .nav-item.active {
    background: var(--brand-grad); color: #fff; font-weight: 600;
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), .42), inset 0 1px 0 rgba(255, 255, 255, .2);
}
body.ui2 .nav-item.active i { color: #fff; }
body.ui2 .nav-count {
    margin-left: auto; min-width: 20px; padding: 1px 6px;
    border-radius: 999px; background: #FF5C7A; color: #fff;
    font-style: normal; font-size: 11px; font-weight: 700; text-align: center;
}

body.ui2 .sidebar-foot { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
body.ui2 .sidebar-user { padding: 9px 10px; border: none; border-radius: 14px; background: rgba(255, 255, 255, .06); }
body.ui2 .sidebar-user:hover { background: rgba(255, 255, 255, .1); opacity: 1; }
body.ui2 .user-avatar, body.ui2 .user-avatar-img { width: 36px; height: 36px; font-size: 14px; }
body.ui2 .user-avatar { background: var(--brand-grad); }
body.ui2 .user-name { color: #fff; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui2 .user-role { color: #8F8AAE; font-size: 11.5px; }
body.ui2 .sidebar-foot-actions { display: flex; gap: 6px; margin-top: 8px; }
body.ui2 .sidebar-foot-actions a {
    flex: 1; padding: 8px 6px; border-radius: 10px;
    background: rgba(255, 255, 255, .05); color: #A7A3C2;
    font-size: 12px; font-weight: 500; text-align: center; white-space: nowrap;
}
body.ui2 .sidebar-foot-actions a:hover { background: rgba(255, 255, 255, .11); color: #fff; opacity: 1; }
body.ui2 .sidebar-foot-actions .foot-logout:hover { background: rgba(255, 92, 122, .2); color: #FFB3C1; }
body.ui2 .overlay { background: rgba(23, 20, 45, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* ---------- 4. Đế điều hướng dưới (điện thoại) ---------- */
body.ui2 .bottom-nav {
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    height: var(--dock-h);
    padding: 0 6px;
    border: none; border-radius: 22px;
    background: rgba(23, 20, 45, .95);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 32px rgba(23, 20, 45, .38), 0 2px 6px rgba(23, 20, 45, .2);
}
body.ui2 .bottom-nav-item {
    margin: 7px 2px;
    border-radius: 16px;
    color: #A7A3C2;
    font-size: 10px; font-weight: 600;
    gap: 3px;
}
body.ui2 button.bottom-nav-item { border: none; background: none; font: inherit; font-size: 10px; font-weight: 600; cursor: pointer; }
body.ui2 .bottom-nav-item i { font-size: 18px; }
body.ui2 .bottom-nav-item:active { background: rgba(255, 255, 255, .09); }
body.ui2 .bottom-nav-item.active { color: #fff; background: rgba(124, 92, 255, .34); }
body.ui2 .bottom-nav-center, body.ui2 .bottom-nav-center:active { background: none; }
body.ui2 .fab-btn {
    width: 56px; height: 56px;
    margin-top: -26px;
    border: 4px solid var(--ink);
    background: var(--brand-grad);
    font-size: 21px;
    box-shadow: 0 10px 22px rgba(var(--primary-rgb), .55);
}
body.ui2 .bn-count {
    position: absolute; top: 3px; left: calc(50% + 6px);
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: #FF5C7A; color: #fff;
    font-style: normal; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--ink);
}

/* ---------- 5. Khung nội dung ---------- */
@media (max-width: 767px) {
    /* Bản cũ ép thẻ sát hai mép màn hình; diện mạo mới: thẻ bo tròn, tách khỏi mép 12px */
    body.ui2 .content-body { padding: 12px 12px 6px !important; }
    body.ui2 .main-content {
        padding-bottom: calc(var(--dock-h) + 30px + env(safe-area-inset-bottom, 0px));
    }
    body.ui2 .card { border-radius: var(--radius) !important; }
    body.ui2 .card-body, body.ui2 .card-header, body.ui2 .card-footer { padding-left: 14px !important; padding-right: 14px !important; }
    body.ui2 .card-body.p-0 { padding-left: 0 !important; padding-right: 0 !important; }
    body.ui2 .card + .card { margin-top: 12px !important; }
    /* bảng nằm trong thẻ: dàn hết bề ngang thẻ để lấy lại chỗ đã nhường cho lề */
    body.ui2 .card-body:not(.p-0) > table.table,
    body.ui2 .card-body:not(.p-0) > form > table.table,
    body.ui2 .card-body:not(.p-0) > .table-container { width: calc(100% + 28px); max-width: none; margin-left: -14px; margin-right: -14px; }
    /* bảng bọc trong khung cuộn ngang (div style="overflow-x:auto"): cho cả khung dàn hết bề ngang thẻ */
    body.ui2 .card-body:not(.p-0) > div[style*="overflow-x"]:has(> table.table),
    body.ui2 .card-body:not(.p-0) > form > div[style*="overflow-x"]:has(> table.table) { margin-left: -14px; margin-right: -14px; }
    body.ui2 .table th { letter-spacing: .04em; }
    body.ui2 .card-body table.table th, body.ui2 .card-body table.table td { padding-left: 8px; padding-right: 8px; }
    body.ui2 .card-body table.table th:first-child, body.ui2 .card-body table.table td:first-child { padding-left: 14px; }
    body.ui2 .card-body table.table th:last-child, body.ui2 .card-body table.table td:last-child { padding-right: 14px; }
    body.ui2 .ov-nav { margin-left: -12px; margin-right: -12px; }
    body.ui2 .flash-popup-wrap { bottom: calc(var(--dock-h) + 22px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 768px) {
    body.ui2 .content-body { padding: 24px 28px 44px; }
}
@media (min-width: 1500px) {
    body.ui2 .content-body { max-width: 1480px; }
}

/* ---------- 6. Thẻ ---------- */
body.ui2 .card {
    border-color: transparent;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
body.ui2 .card-header { padding: 15px 18px; border-bottom: 1px solid var(--line); }
body.ui2 .card-header h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
body.ui2 .card-header h3 > i:first-child { color: var(--primary); }
body.ui2 .card-body { padding: 16px 18px; }
body.ui2 .card-footer { background: var(--bg-soft); border-top-color: var(--line); }

body.ui2 .section-title {
    border-bottom: none; padding-bottom: 0; margin-bottom: 12px;
    font-size: 15.5px; font-weight: 700; letter-spacing: -.01em;
}
body.ui2 .section-title:not(:first-child) { margin-top: 18px; }
body.ui2 .section-title::before {
    content: ""; flex: 0 0 4px; width: 4px; height: 18px; border-radius: 3px;
    background: var(--brand-grad);
}

body.ui2 .stat-card {
    border: 1px solid transparent;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
body.ui2 .stat-card .stat-label { font-weight: 600; color: var(--text-muted); }
body.ui2 .stat-card .stat-value { font-weight: 800; letter-spacing: -.02em; }
body.ui2 .stat-card .stat-icon { border-radius: 11px; opacity: 1; }
body.ui2 a.stat-card:hover { opacity: 1; box-shadow: var(--ring), 0 10px 26px rgba(23, 20, 45, .1); }
body.ui2 .stat-bar { border-color: transparent; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
body.ui2 .big-number { font-weight: 800; letter-spacing: -.02em; }
body.ui2 .empty-state { color: var(--text-muted); }
body.ui2 .empty-state i { color: var(--primary-soft); opacity: 1; }

/* ---------- 7. Nút ---------- */
body.ui2 .btn { border-radius: var(--radius-sm); font-weight: 600; letter-spacing: -.005em; }
body.ui2 .btn-primary {
    background: var(--brand-grad); background-origin: border-box;
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), .3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
body.ui2 .btn-primary:hover { filter: brightness(1.07); opacity: 1; }
body.ui2 .btn-primary:active { filter: brightness(.95); }
body.ui2 .btn-primary:disabled, body.ui2 .btn-primary[disabled] { filter: grayscale(.35); opacity: .6; box-shadow: none; }
body.ui2 .btn-success { box-shadow: 0 6px 14px rgba(22, 163, 74, .22); }
body.ui2 .btn-danger { box-shadow: 0 6px 14px rgba(220, 38, 38, .2); }
body.ui2 .btn-outline { background: #fff; border-color: #DCD8EB; color: var(--text); }
body.ui2 .btn-outline:hover { background: var(--bg-soft); border-color: var(--primary-soft); color: var(--primary-dark); opacity: 1; }
body.ui2 .btn-ghost:hover { background: var(--bg); opacity: 1; }
body.ui2 .btn-dark { background: var(--ink); }
body.ui2 .btn-sm { border-radius: 10px; }
@media (min-width: 768px) {
    /* máy tính dùng chuột: nút gọn hơn; điện thoại giữ cỡ 44px cho dễ chạm */
    body.ui2 .btn { min-height: 40px; padding: 8px 16px; font-size: 13.5px; }
    body.ui2 .btn-sm { min-height: 31px; padding: 5px 11px; font-size: 12px; }
    body.ui2 .btn-lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
    body.ui2 .btn-icon-only { width: 40px; height: 40px; padding: 0; }
}

/* ---------- 8. Ô nhập ---------- */
body.ui2 .form-label { color: #3B3757; font-weight: 600; }
body.ui2 .form-input {
    border: 1.5px solid #DEDAEC;
    border-radius: var(--radius-sm);
    background-color: #fff;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
body.ui2 .form-input:hover { border-color: #C9C3E2; }
body.ui2 .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .14);
}
body.ui2 .form-input::placeholder { color: #A5A1BD; }
body.ui2 .form-input:disabled, body.ui2 .form-input[readonly] { background-color: var(--bg-soft); }
@media (min-width: 768px) {
    body.ui2 .form-input { padding: 9px 12px; font-size: 14px; }
}
body.ui2 .search-box .search-icon { color: #A5A1BD; }
body.ui2 .suggestions-box { border-color: var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
body.ui2 .suggestion-item { border-bottom-color: var(--line); }
body.ui2 .suggestion-item:hover { background: var(--bg-soft); }
body.ui2 .ss-item:hover, body.ui2 .ss-item.active { background: rgba(var(--primary-rgb), .1); }

/* ---------- 9. Bảng ---------- */
body.ui2 .table th {
    background: var(--bg-soft);
    color: #8581A0;
    font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
    border-bottom: 1px solid var(--border);
}
body.ui2 .table tbody tr { border-bottom-color: var(--line); }
body.ui2 .table tbody tr:last-child { border-bottom-color: transparent; }
@media (min-width: 768px) {
    body.ui2 .table th { padding-top: 11px; padding-bottom: 11px; }
    body.ui2 .table th, body.ui2 .table td { padding-left: 14px; padding-right: 14px; }
    body.ui2 .table td { padding-top: 11px; padding-bottom: 11px; }
}
@media (hover: hover) {
    body.ui2 .table tbody tr:hover { background-color: #F9F7FF; }
    body.ui2 .order-table tbody tr:hover { background-color: #F9F7FF; }
}

/* danh sách đơn (máy tính): cả bảng là một thẻ bo tròn */
@media (min-width: 768px) {
    body.ui2 .order-table {
        border-collapse: separate; border-spacing: 0;
        background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
    }
    body.ui2 .order-table tbody tr { border-bottom: none; }
    body.ui2 .order-table tbody td { border-bottom: 1px solid var(--line); }
    body.ui2 .order-table tbody tr:last-child td { border-bottom: none; }
}

/* ---------- 10. Nhãn, bộ lọc, tab ---------- */
body.ui2 .badge { border-radius: 999px; padding: 3px 9px; font-weight: 650; }
body.ui2 .badge-primary { background: var(--primary-light); color: var(--primary-dark); }
body.ui2 .badge-secondary { background: #EEECF6; color: var(--secondary); }

/* bộ lọc đang chọn: nền mực (phân biệt với nút hành động màu tím) */
body.ui2 .filter-tab { border-radius: 999px; border-color: var(--border); color: var(--secondary); font-weight: 600; }
body.ui2 .filter-tab:hover { border-color: var(--primary-soft); opacity: 1; }
body.ui2 .filter-tab.active,
body.ui2 .lt-chip.active,
body.ui2 .rp-tab.active {
    background: var(--ink); border-color: var(--ink); color: #fff;
    box-shadow: 0 4px 12px rgba(23, 20, 45, .22);
}
body.ui2 .lt-chip, body.ui2 .rp-tab, body.ui2 .ov-chip { border-color: var(--border); color: var(--secondary); }
body.ui2 .lt-chip:hover, body.ui2 .rp-tab:hover, body.ui2 .ov-chip:hover { border-color: var(--primary-soft); }
body.ui2 .ov-chip.is-primary { background: var(--brand-grad); border-color: transparent; color: #fff; }
body.ui2 .ov-chip.is-action { border-color: #D9D0FF; background: var(--primary-light); color: var(--primary-dark); }
body.ui2 .ov-chip.is-action:hover { background: #E4DDFF; }

body.ui2 .tabs { background: #EAE7F5; border-radius: 14px; padding: 4px; }
body.ui2 .tab { border-radius: 11px; font-weight: 600; }
body.ui2 .tab.active { color: var(--primary-dark); box-shadow: 0 1px 2px rgba(23, 20, 45, .08), 0 4px 10px rgba(23, 20, 45, .08); }

/* ---------- 11. Hộp thoại, thông báo ---------- */
body.ui2 .modal { background: rgba(23, 20, 45, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
body.ui2 .modal-content { border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg); }
body.ui2 .modal-header { border-bottom-color: var(--line); }
body.ui2 .modal-header h3 { font-weight: 700; letter-spacing: -.01em; }
body.ui2 .modal-close { background: var(--bg); }
body.ui2 .modal-footer { background: var(--bg-soft); border-top-color: var(--line); }
@media (min-width: 768px) {
    body.ui2 .modal-content, body.ui2 .modal-full .modal-content { border-radius: 20px; }
}
body.ui2 .alert { border-radius: var(--radius-sm); }
body.ui2 .flash-popup { border-radius: 16px; border-color: transparent; box-shadow: var(--ring), 0 18px 40px rgba(23, 20, 45, .2); }
body.ui2 .cp-box { border-radius: 20px; }
body.ui2 .cp-item.active { background: var(--primary-light); }

/* ---------- 12. Đơn hàng, quy trình ---------- */
body.ui2 .order-item { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
body.ui2 .order-item:active { background: var(--bg-soft); }
body.ui2 .order-item-code { font-weight: 800; letter-spacing: -.01em; }
body.ui2 .order-item-pay { background: var(--bg-soft); border-radius: 12px; }
body.ui2 .order-item-footer { border-top-color: var(--line); }

body.ui2 .kanban-section, body.ui2 .kanban-group { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
body.ui2 .kanban-section-header { background: var(--bg-soft); border-bottom-color: var(--line); }
body.ui2 .kanban-card { background: #fff; border-color: var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(23, 20, 45, .04); }
body.ui2 .kanban-card:active { background: var(--bg-soft); }
body.ui2 .kanban-card-footer { border-top-color: var(--line); }
body.ui2 .step-item.is-doing { background: var(--primary-light); border-color: #D9D0FF; }

/* dòng hàng trong form đơn: màu xen kẽ - dòng đầu theo màu thương hiệu */
body.ui2 #batteryList > .battery-item:nth-child(4n+1) { background: #F3EFFF !important; border-left-color: var(--primary) !important; }
body.ui2 #batteryList > .battery-item:nth-child(4n+1) > .flex-between > span:first-child { color: var(--primary); }

/* thanh Lưu của form đơn (điện thoại): nổi như đế điều hướng */
@media (max-width: 1099px) {
    body.ui2 .of-bar {
        left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        padding: 9px 10px 9px 12px;
        border: none; border-radius: 20px;
        box-shadow: var(--ring), 0 14px 32px rgba(23, 20, 45, .22);
    }
    body.ui2.of-active .main-content { padding-bottom: 96px; }
    body.ui2 .of-side.is-open { left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); border-radius: 20px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
    body.ui2 .of-bar { left: calc(var(--sidebar-width) + 16px); right: 16px; }
    body.ui2 .of-side.is-open { left: calc(var(--sidebar-width) + 16px); right: 16px; }
}
body.ui2 .of-panel { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
body.ui2 .rp-card, body.ui2 .td-pipe-item, body.ui2 .cu-stat { border-radius: 14px; }
body.ui2 .rp-card { border-color: transparent; box-shadow: var(--shadow); }
body.ui2 .rp-card:hover { box-shadow: var(--ring), 0 12px 28px rgba(23, 20, 45, .1); }
body.ui2 .rp-card-icon, body.ui2 .cu-ava { background: var(--primary-light); }

/* ---------- 13. Trang "Hôm nay" ---------- */
body.ui2 .td-top {
    position: relative; overflow: hidden;
    margin-bottom: 18px;
    padding: 22px 22px 20px;
    border-radius: 24px;
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 16px 36px rgba(var(--primary-rgb), .3);
}
body.ui2 .td-top::before, body.ui2 .td-top::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    background: rgba(255, 255, 255, .09);
}
body.ui2 .td-top::before { width: 260px; height: 260px; right: -70px; top: -120px; }
body.ui2 .td-top::after { width: 180px; height: 180px; right: 120px; bottom: -110px; background: rgba(255, 255, 255, .06); }
body.ui2 .td-top > * { position: relative; z-index: 1; }
body.ui2 .td-top .td-hero { margin-bottom: 16px; }
body.ui2 .td-top .td-hello { color: #fff; font-size: 24px; }
body.ui2 .td-top .td-date { color: rgba(255, 255, 255, .8); }
body.ui2 .td-top .btn-outline { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); color: #fff; }
body.ui2 .td-top .btn-outline:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .4); color: #fff; }
body.ui2 .td-top .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 8px 20px rgba(23, 20, 45, .2); }
body.ui2 .td-top .td-stats { margin-bottom: 0; }
body.ui2 .td-top .td-stat {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    color: #fff;
}
body.ui2 .td-top a.td-stat:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .34); box-shadow: none; transform: translateY(-1px); }
body.ui2 .td-top .td-stat-label { color: rgba(255, 255, 255, .88); }
body.ui2 .td-top .td-stat-label i,
body.ui2 .td-top .td-stat.is-warn .td-stat-label i,
body.ui2 .td-top .td-stat.is-good .td-stat-label i,
body.ui2 .td-top .td-stat.is-money .td-stat-label i { background: rgba(255, 255, 255, .22); color: #fff; }
body.ui2 .td-top .td-stat-note { color: rgba(255, 255, 255, .72); }
body.ui2 .td-group { background: var(--bg-soft); border-bottom-color: var(--line); }
body.ui2 .td-row { border-bottom-color: var(--line); }
body.ui2 a.td-row:hover { background: #F9F7FF; }
body.ui2 .td-ico { border-radius: 12px; }
body.ui2 .td-pipe-bar { background: #EAE7F5; }
@media (max-width: 767px) {
    /* điện thoại: khối chào nối liền với thanh trên thành một mảng màu, bo tròn hai góc dưới */
    body.ui2 .td-top {
        margin: -12px -12px 16px;
        padding: 8px 16px 20px;
        border-radius: 0 0 28px 28px;
        background: var(--brand-grad-x);
        box-shadow: 0 14px 30px rgba(var(--primary-rgb), .28);
    }
    body.ui2 .td-top .td-hello { font-size: 22px; }
    body.ui2 .td-top .td-hero-actions { width: 100%; }
    body.ui2 .td-top .td-hero-actions .btn { flex: 1 1 0; }
}

/* ---------- 14. Trang đăng nhập ---------- */
body.ui2 .login-page {
    background:
        radial-gradient(820px 480px at 8% -8%, rgba(124, 92, 255, .6), transparent 62%),
        radial-gradient(680px 460px at 104% 108%, rgba(98, 70, 234, .5), transparent 60%),
        radial-gradient(420px 320px at 80% 0%, rgba(255, 209, 92, .1), transparent 60%),
        #120F26;
}
body.ui2 .login-card {
    max-width: 410px;
    border-radius: 26px;
    padding: 36px 26px 26px;
    box-shadow: 0 30px 70px rgba(8, 6, 22, .55), 0 0 0 1px rgba(255, 255, 255, .08);
}
body.ui2 .login-logo {
    width: 68px; height: 68px; border-radius: 20px; font-size: 30px;
    background: var(--brand-grad);
    color: var(--accent);
    box-shadow: 0 12px 28px rgba(var(--primary-rgb), .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
body.ui2 .login-title { font-weight: 800; letter-spacing: -.025em; }
body.ui2 .login-input { border: 1.5px solid #DEDAEC; border-radius: 14px; background: var(--bg-soft); }
body.ui2 .login-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .14); }
body.ui2 .login-card .btn-primary { border-radius: 14px !important; }

/* ---------- 15. In ấn: ẩn khung ---------- */
@media print {
    body.ui2 .tb-search, body.ui2 .tb-new, body.ui2 .sidebar-foot { display: none !important; }
    body.ui2, body.ui2 .main-content { background: #fff !important; }
    body.ui2, body.ui2 .main-content { min-height: 0 !important; }      /* không thì in thừa một trang trắng */
    body.ui2 .main-content { padding-bottom: 0 !important; }
    body.ui2 .content-body { padding: 0 !important; }
    body.ui2 .card, body.ui2 .stat-card { box-shadow: none; border-color: #ddd; }
    body.ui2 .td-top { background: none; color: #000; box-shadow: none; }
    /* Bảng in ra giấy: không khung cuộn ngang (cột cuối bị cắt), ô hẹp lại cho vừa khổ A4 */
    body.ui2 .card, body.ui2 .card-body, body.ui2 .table-container, body.ui2 .card-body div[style*="overflow-x"] { overflow: visible !important; }
    body.ui2 .table th { letter-spacing: 0; }
    body.ui2 .card-body table.table th, body.ui2 .card-body table.table td { padding-left: 6px; padding-right: 6px; }
}
